Replacing master with contents of rel/v1.15.0
diff --git a/.asf.yaml b/.asf.yaml
index 003d459..61fbd85 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -7,6 +7,57 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+github:
+  description: "Apache Geode Native"
+  homepage: https://geode.apache.org/
+  labels:
+    - geode
+    - datagrid
+    - apache
+  features:
+    # To enable wiki for documentation
+    wiki: false
+    # To enable issue management
+    issues: false
+    # To enable projects for project management boards
+    projects: true
+
+  enabled_merge_buttons:
+    # enable squash button:
+    squash:  true
+    # enable merge button:
+    merge:  true
+    # enable rebase button:
+    rebase:  true
+
+  protected_branches:
+    develop:
+      required_status_checks:
+        # strict means "Require branches to be up to date before merging".
+        strict: false
+        # contexts are the names of checks that must pass
+        contexts: []
+        #- "concourse-ci/build-rhel-7-debug"
+        #- "concourse-ci/build-rhel-8-debug"
+        #- "concourse-ci/build-ubuntu-16.04-debug"
+        #- "concourse-ci/build-ubuntu-18.04-debug"
+        #- "concourse-ci/build-ubuntu-20.04-debug"
+        #- "concourse-ci/build-windows-2016-vs-2017-debug"
+        # - "concourse-ci/build-windows-2019-vs-2019-debug"
+        #- "concourse-ci/clang-format"
+        #- "concourse-ci/clang-tidy"
+        #- "concourse-ci/rat-check"
+        # - "LGTM analysis: C#"
+        # - "LGTM analysis: JavaScript"
+        # - "LGTM analysis: C/C++"
+
+      required_pull_request_reviews:
+        dismiss_stale_reviews: false
+        require_code_owner_reviews: false
+        required_approving_review_count: 0
+
+      required_signatures: false
+
 notifications:
     commits: commits@geode.apache.org
     issues: issues@geode.apache.org
diff --git a/.clang-tidy b/.clang-tidy
index 6d39ded..1019b3c 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -1,8 +1,8 @@
 ---
-Checks:          '-*,clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-alpha*,google-*,-google-readability-todo,-google-runtime-references,-google-default-arguments,-clang-analyzer-core.uninitialized.UndefReturn,-clang-analyzer-core.UndefinedBinaryOperatorResult,-clang-analyzer-optin.cplusplus.VirtualCall'
+Checks: '-*,clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-alpha*,google-*,-google-readability-todo,-google-runtime-references,-google-default-arguments'
 WarningsAsErrors: '*'
 HeaderFilterRegex: '.*'
-FormatStyle:     file
+FormatStyle: file
 ...
 
 # Disable Checks
@@ -14,5 +14,3 @@
 # clang-analyzer-core.uninitialized.UndefReturn - Generates errors in ACE, how do we ignore?
 # clang-analyzer-core.UndefinedBinaryOperatorResult - Generates errors in ACE, how do we ignore?
 
-# TEMP
-# clang-analyzer-optin.cplusplus.VirtualCall
\ No newline at end of file
diff --git a/.lcovrc b/.lcovrc
index df58c70..3b3edc2 100644
--- a/.lcovrc
+++ b/.lcovrc
@@ -1,2 +1,2 @@
-# branch coverage generates lots of misses due to emmitted exception code.
+# branch coverage generates lots of misses due to emitted exception code.
 lcov_branch_coverage=0
diff --git a/.lgtm.yml b/.lgtm.yml
index 50949d4..2f0029d 100644
--- a/.lgtm.yml
+++ b/.lgtm.yml
@@ -2,12 +2,15 @@
   cpp:
     configure:
       command:
-        - GEODE_VERSION=1.14.3
+        - GEODE_VERSION=1.14.4
         - mkdir _lgtm_build_dir
         - cd _lgtm_build_dir
         - wget -O apache-geode.tgz https://downloads.apache.org/geode/${GEODE_VERSION}/apache-geode-${GEODE_VERSION}.tgz
         - tar xzf apache-geode.tgz
-        - cmake -DGEODE_ROOT="`pwd`/apache-geode-${GEODE_VERSION}" ..
+        - "curl -o cmake.tgz -L $(curl -s https://api.github.com/repos/Kitware/CMake/releases | grep -P -i 'browser_download_url.*cmake-\\d+\\.\\d+\\.\\d+-linux-x86_64\\.sh' | head -n 1 | cut -d: -f 2,3 | tr -d \\\")"
+        - bash cmake.tgz --skip-license --prefix=`pwd`
+        - PATH="`pwd`/bin":$PATH
+        - cmake -DGEODE_ROOT="`pwd`/apache-geode-${GEODE_VERSION}" -DCMAKE_INSTALL_PREFIX=/home/build ..
         - cd dependencies && cmake --build . -- -j2
     index:
       build_command:
diff --git a/.ratignore b/.ratignore
index dbf556f..7f4a17a 100644
--- a/.ratignore
+++ b/.ratignore
@@ -23,16 +23,8 @@
 .*\.md
 .*\.md.erb
 
-# contrib/pdxautoserializer
-# public domain sources
-CPPDictionary.hpp
-CPPSymbol.hpp
-CPP_parser.g
-DictEntry.hpp
-Dictionary.cpp
-Dictionary.hpp
-STDCTokenTypes.txt
-Support.cpp
+# docker/
+bellsoft.repo
 
 # well known build directories
 build
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index a365e68..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,51 +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.
-
-# cpp tools are outdated, so use docker
-language: generic
-
-# required for docker
-sudo: required
-
-services:
-  - docker
-
-env:
-  global:
-    - DOCKER_ARGS="--rm --volume=${TRAVIS_BUILD_DIR}:/geode-native"
-    - DOCKER_IMAGE="apachegeode/geode-native-build:1.14.3"
-    - SOURCE_DIR="/geode-native"
-
-  matrix:
-    - DOCKER_COMMAND="echo rat && mkdir build && cd build && cmake ${SOURCE_DIR} -DUSE_RAT=ON && cmake --build . --target rat-check"
-    - DOCKER_COMMAND="echo test && mkdir build && cd build && cmake ${SOURCE_DIR} -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_CXX_CLANG_TIDY=clang-tidy && cmake --build . -- -j2 && ./cppcache/test/apache-geode_unittests && git -C ${SOURCE_DIR} diff --exit-code"
-
-install:
-  - docker pull "${DOCKER_IMAGE}"
-
-script:
-  - docker run ${DOCKER_ARGS} "${DOCKER_IMAGE}" bash -c "${DOCKER_COMMAND}"
-
-notifications:
-  email:
-    recipients:
-      - dev@geode.apache.org
-    on_success: change
-    on_failure: change
-
-branches:
-  except:
-    - /^feature.*$/
-    - asf-site
diff --git a/BUILDING.md b/BUILDING.md
index db793c5..e8cd6d2 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -1,7 +1,8 @@
 # Building
 
 ## Prerequisites (All Platforms)
-* [CMake 3.12](https://cmake.org/) or newer
+
+* [CMake 3.18](https://cmake.org/) or newer
 * C++11 compiler *(see platform specific requirements)*
 * [Doxygen 1.8.11 or greater](https://sourceforge.net/projects/doxygen/) *(for building source documentation)*
 * [OpenSSL](https://www.openssl.org) *(for building source documentation)*
@@ -17,13 +18,13 @@
 * [Mac OS X](#mac-os-x)
 * [Solaris](#solaris)
 
-
 ## Setting Path to Geode
+
 Building requires access to an installation of Geode. There are two ways to achieve this:
 
 * Set an environment variable called `GEODE_HOME` that points to your Geode installation path.
 * Pass in `GEODE_ROOT` during the CMake configuration step.
-  * e.g.  add `-DGEODE_ROOT=/path/to/geode` to the _initial_ `cmake` execution command.
+    * e.g. add `-DGEODE_ROOT=/path/to/geode` to the _initial_ `cmake` execution command.
 
 ## Steps to build
 
@@ -36,16 +37,25 @@
 # build step
 $ cmake --build . -- <platform-specific parallelism parameters (see below)>
 ```
-If OpenSSL is installed in a custom location, then you  must pass `OPENSSL_ROOT_DIR` during the CMake configuration step. For example, `-DOPENSSL_ROOT_DIR=/path/to/openssl`.
 
-To explicitly specify the location in which the Native Client will be installed, add `-DCMAKE_INSTALL_PREFIX=/path/to/installation/destination` to this initial `cmake` execution command.
+If OpenSSL is installed in a custom location, then you must pass `OPENSSL_ROOT_DIR` during the CMake configuration step.
+For example, `-DOPENSSL_ROOT_DIR=/path/to/openssl`.
 
-To set the version header on the API docs, specify PRODUCT_VERSION on the configuration command line. For example, `-DPRODUCT_VERSION=1.2.3`.
+To explicitly specify the location in which the Native Client will be installed,
+add `-DCMAKE_INSTALL_PREFIX=/path/to/installation/destination` to this initial `cmake` execution command.
+
+To set the version header on the API docs, specify PRODUCT_VERSION on the configuration command line. For
+example, `-DPRODUCT_VERSION=1.2.3`.
 
 ### Generator
-CMake uses a "generator" to produce configuration files for use by a variety of build tools, e.g., UNIX makefiles, Visual Studio projects. By default a system-specific generator is used by CMake during configuration. (Please see [the CMake documentation](https://cmake.org/documentation/) for further information.) However, in many cases there is a better choice.
+
+CMake uses a "generator" to produce configuration files for use by a variety of build tools, e.g., UNIX makefiles,
+Visual Studio projects. By default a system-specific generator is used by CMake during configuration. (Please
+see [the CMake documentation](https://cmake.org/documentation/) for further information.) However, in many cases there
+is a better choice.
 
 #### CLion / Eclipse / Other
+
 The recommended generator for most unix platforms is 'Makefiles' (default):
 
 ```console
@@ -55,47 +65,47 @@
 #### Mac OSX Xcode
 
 Install XCode from the App Store
+
 * You have to run XCode once to get it initialize properly (software agreement).
 * Install the command line tools for xcode - run `xcode-select --install` from terminal
 
-Install the required dependencies through homebrew.   If you use another package manager for your mac feel free to use that.
+Install the required dependencies through homebrew. If you use another package manager for your mac feel free to use
+that.
 
-```bash
+```console
 $ brew install geode
 $ brew install openssl
 $ brew install doxygen
 $ brew install cmake
 ```
 
-Follow these steps to build the geode native client.   The recommended code generator is `Xcode`.
+You will need to provide the path to the brew installed OpenSSL headers since macOS already has a system installed
+version but without the required headers.
 
-```bash
-$ cd <clone>
-$ mkdir build
-$ cd build
-$ cmake .. -G "Xcode" -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCMAKE_INSTALL_PREFIX=`pwd`/install
-$ cmake --build . --target docs
-$ cmake --build . --target install -j8
+```console
+$ cmake .. -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl
 ```
 
-At the end of the process the geode native client will be in the  `<clone>/build/install` directory.
-
 #### Windows / Visual Studio
-When running cmake commands on Windows, be sure to use [Visual Studio Native Tools Command Prompt](https://msdn.microsoft.com/en-us/library/f35ctcxw.aspx) so environment variables are set properly.
 
-The recommended generator on Windows is `Visual Studio 15 2017 Win64`:
+For Visual Studio 2017 and newer you only need to specify the correct architecture, toolset and SDK for Windows. To
+build a 64-bit library using the 64 bit toolset version 14.1 with minimum ABI compatibility of 14.16 for minimum Windows
+version 10.0.16299.0 use the following options.
 
 ```console
-$ cmake .. -G "Visual Studio 15 2017 Win64" -Thost=x64
+$ cmake .. -A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0
 ```
 
-Visual Studio 2019 is also supported. For this generator you must leave off the Win64:
+At a bare minimum you will likely need to specify the architecture, since MSVC still defaults to 32 bit, and the 64 bit
+version of the toolset, because of large object files. The latest toolset version and Windows SDK will likely get picked
+up.
 
 ```console
-$ cmake .. -G "Visual Studio 16 2019" -Thost=x64
+$ cmake .. -A x64 -Thost=x64
 ```
 
 ### Build Parallelism
+
 For faster builds, use optional parallelism parameters in the last build step:
 
 #### Unix
@@ -120,62 +130,23 @@
 $ cmake … -DWITH_IPV6=ON …
 ```
 
-#### Code Coverage
-
-If building with GCC or Clang you can enable C++ code coverage by adding `-DUSE_CPP_COVERAGE=ON` to the CMake [Generator](#generator) command. 
+#### Interprocedural, Link-Time, or Whole-Program Optimizations
+These optimizations are enabled by default where available. You can disable them at configure time.
 
 ```console
-$ cmake … -DUSE_CPP_COVERAGE=ON …
-```
-You can then generate a C++ code coverage report by downloading [lcov](http://ltp.sourceforge.net/coverage/lcov.php).  After acquiring lcov, finish the [Steps to build](#Steps-to-build) section above.  Then, run the tests as described in the [CONTRIBUTING.md](CONTRIBUTING.md). Finally, run the following commands from the `build` directory:
-
-```console
-$ lcov --capture --directory . --output-file coverage.info
-$ genhtml coverage.info --output-directory coverage_report
-```
-
-You can then open the `index.html` file in the `coverage_report` directory using any browser.
-
-#### Clang-Tidy
-To enable `clang-tidy`:
-
-```console
-$ cmake … -DCMAKE_CXX_CLANG_TIDY=clang-tidy …
-```
-To use specific `clang-tidy`:
-
-```console
-$ cmake … -DCMAKE_CXX_CLANG_TIDY=/path/to/clang-tidy …
-```
-By default `clang-tidy` uses the configuration found in `.clang-tidy`
-To override `clang-tidy` options:
-
-```console
-$ cmake … -DCMAKE_CXX_CLANG_TIDY=clang-tidy;<options> …
-```
-#### Clang-format
-Individual targets in the build tree have their own dependency of the form `<<targetName>>-clangformat`, which uses the `clang-format` executable, wherever it is found, to format and modified files according to the rules specfied in the .clang-format file.  This is helpful when submitting changes to geode-native, because an improperly formatted file will fail Travis-CI and have to be fixed prior to merging any pull request.  If clang-format is not installed on your system, clangformat targets will not be added to your project files, and geode-native should build normally.  Under some circumstances, however, it may become necessary to disable `clang-format` on a system where it _is_ installed.
-
-To disable `clang-format` in the build:
-
-```
-$ cmake … -DClangFormat_EXECUTABLE='' …
-```
-
-On the other hand, it may also be desirable to run clang-format on the entire source tree.  This is also easily done via the `all-clangformat` _in a build with clang-format enabled_.  If clang-format has been disabled in the cmake configuration step, as above, the `all-clangformat` target will not exist, and the cmake configuration step will have to be re-run with clang-format enabled.
-
-To run clang-format on the entire source tree:
-
-```
-$ cmake --build . --target all-clangformat
+$ cmake … -DUSE_IPO=NO …
 ```
 
 
 ## Installing
-By default a system-specific location is used by CMake as the destination of the `install` target, e.g., `/usr/local` on UNIX system. To explicitly specify the location in which the Native Client will be installed, add `-DCMAKE_INSTALL_PREFIX=/path/to/installation/destination` to the _initial_ `cmake` execution command.
 
-**Note:** For consistent results, avoid using the "~" (tilde) abbreviation when specifying paths on the CMake command line.
-Interpretation of the symbol varies depending on the option being specified, and on the system or command shell in use.
+By default a system-specific location is used by CMake as the destination of the `install` target, e.g., `/usr/local` on
+UNIX system. To explicitly specify the location in which the Native Client will be installed,
+add `-DCMAKE_INSTALL_PREFIX=/path/to/installation/destination` to the _initial_ `cmake` execution command.
+
+**Note:** For consistent results, avoid using the "~" (tilde) abbreviation when specifying paths on the CMake command
+line. Interpretation of the symbol varies depending on the option being specified, and on the system or command shell in
+use.
 
 Due to limitations in CMake, the documentation must be built as a separate step before installation:
 
@@ -188,50 +159,65 @@
 
 # Platform-Specific Prerequisites
 
-## <a id="windows"></a>Windows
-* Windows 8.1 64-bit
+## Windows
+
 * Windows 10 64-bit
-* Windows Server 2012 R2 64-bit
 * Windows Server 2016 64-bit
-* NUnit 2.6.4 (to run clicache tests)
+* Windows Server 2019 64-bit
 
 ### Required Tools
-* [Visual Studio 2015](https://www.visualstudio.com) or newer
-* .NET 4.5.2 or later
-* Chocolatey
-* [Other dependencies installed via Powershell](packer/windows/install-dependencies.ps1)
 
-## <a id="linux"></a>Linux
-* RHEL/CentOS 6
+* [Visual Studio](https://www.visualstudio.com) 2017 or newer
+* [.NET](https://dotnet.microsoft.com/learn/dotnet/what-is-dotnet-framework) 4.5.2 or later
+* Other dependencies installed by [Packer](packer/build-windows-2016-vs-2017.json) scripts
+
+## Linux
+
 * RHEL/CentOS 7
-* SLES 11
-* SLES 12
+* RHEL/CentOS 8
+* Ubuntu 2016.04 (Xenial)
+* Ubuntu 2018.04 (Bionic)
+* Ubuntu 2020.04 (Focal)
+
+Other distributions and versions may be supported given C++11 compatible compiler and runtime library.
 
 ### Required Tools
+
 * [GCC 5](https://gcc.gnu.org) or newer
 
 ### Optional Tools
-* [Eclipse CDT 8.8](https://eclipse.org/cdt/) or newer
 
-## <a id="mac-os-x"></a>Mac OS X
-* Mac OS X 10.12 (Sierra) or newer
-* Xcode 8.2 or newer
+* [CLion](https://www.jetbrains.com/clion/)
 
+## macOS
+
+* macOS X 10.15 (Catalina) or newer
+* Xcode 11 or newer
+
+Older versions of macOS or Mac OS X and Xcode may work but are not regularly tested or developed on.
+  
 ### Required Tools
+
 * [Xcode](https://developer.apple.com/xcode/download/)
 * Xcode command line developer tools
+
 ```console
 $ xcode-select --install
 ```
 
 ### Optional Tools
+
 * [CMake GUI](https://cmake.org/)
 * [Doxygen GUI](http://ftp.stack.nl/pub/users/dimitri/Doxygen-1.8.11.dmg)
 * [CLion](https://www.jetbrains.com/clion/)
 
-## <a id="solaris"></a>Solaris
+## Solaris
 * Solaris 11 SPARC
 * Solaris 11 x86
 
+Solaris is not actively developed or tested. While no effort has been made to remove Solaris support it is likely
+broken.
+
 ### Required Tools
+
 * [Solaris Studio 12.6](http://www.oracle.com/technetwork/server-storage/developerstudio/downloads/index.html) or newer
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 60fd2ed..d820960 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.12)
+cmake_minimum_required(VERSION 3.19.7)
 project(nativeclient LANGUAGES C CXX)
 
 option(USE_PCH "Use precompiled headers (PCH)." OFF)
@@ -48,8 +48,6 @@
   set(CMAKE_BUILD_TYPE Debug CACHE STRING "Specifies the build type on single-configuration generators." FORCE)
 endif()
 
-set(CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION "4.5.2")
-set(DOTNET_TARGET_FRAMEWORK_VERSION "4.5.2")
 set(BUILD_BITS 64 CACHE STRING "Build for 64 (Geode default) or 32 bit.")
 option(BUILD_BENCHMARKS "Build benchmarks" ON)
 
@@ -139,13 +137,8 @@
 
 list(APPEND CPACK_SOURCE_IGNORE_FILES ${IGNORED_FULL})
 
-if(CMAKE_GENERATOR MATCHES Win64*)
-  set(CMAKE_GENERATOR_TOOLSET "host=x64")
-else()
-  set(CMAKE_GENERATOR_TOOLSET )
-endif()
-
 include(CPack)
+
 include(CheckCXXCompilerFlag)
 include(CheckCCompilerFlag)
 
@@ -180,12 +173,10 @@
 add_library(_WarningsAsError INTERFACE)
 add_library(_CppCodeCoverage INTERFACE)
 
-include(CheckIPOSupported)
-check_ipo_supported(RESULT ipo_supported)
-if(ipo_supported)
-  set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE)
-  set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE)
-endif()
+include(CheckLinkerFlag)
+check_linker_flag(CXX -Wl,--exclude-libs,ALL has_linker_exclude_libs)
+
+include(CXXFlags)
 
 include(CheckCXXSymbolExists)
 check_cxx_symbol_exists("PRId8" "cinttypes" HAVE_STDC_FORMAT_MACROS)
@@ -241,7 +232,6 @@
     -Wextra
     -Wno-unused-variable #TODO fix
     -Wno-unused-function #TODO fix
-    -Wno-used-but-marked-unused #TODO fix
     -Wpedantic
     -Weverything
     -Wno-non-virtual-dtor #TODO fix
@@ -272,6 +262,8 @@
   endif()
 
 elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+  set(CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION "v4.5.2")
+
   set(BUILD_CLI 1)
 
   # Interface for C++/CLI language.
@@ -281,9 +273,9 @@
 
   target_compile_options(_WarningsAsError INTERFACE
     /WX
-	/wd4996
-	/wd4068 # TODO fix
-	)
+    /wd4996
+    /we4596
+  )
 
   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ignore:4099")
   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /ignore:4099")
@@ -291,15 +283,11 @@
   # Enables multiprocess compiles
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
 
-  # Enables strong name signing
-  set(STRONG_NAME_KEY "" CACHE FILEPATH "Strong Name Key File")
-  if(EXISTS "${STRONG_NAME_KEY}")
-    set(SHARED_LINKER_FLAGS_STRONG_KEY "/keyfile:${STRONG_NAME_KEY}")
-    execute_process(COMMAND sn -p ${STRONG_NAME_KEY} ${CMAKE_CURRENT_BINARY_DIR}/public.snk)
-    execute_process(COMMAND sn -tp ${CMAKE_CURRENT_BINARY_DIR}/public.snk OUTPUT_VARIABLE STRONG_NAME_PUBLIC_KEY)
-    string(REPLACE "\n" "" STRONG_NAME_PUBLIC_KEY ${STRONG_NAME_PUBLIC_KEY})
-    string(REGEX REPLACE ".*sha1\\):([a-f0-9]+).*" "\\1" STRONG_NAME_PUBLIC_KEY ${STRONG_NAME_PUBLIC_KEY})
-  endif()
+  find_program(NUGET nuget)
+  add_custom_target(nuget-restore 
+    COMMAND ${NUGET} restore ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.sln
+  )
+
 endif()
 
 find_package(Java 1.8.0.60 REQUIRED COMPONENTS Development)
@@ -374,6 +362,7 @@
 add_subdirectory(examples)
 if (${BUILD_CLI})
   add_subdirectory(clicache)
+  add_subdirectory(templates/security/csharp)
 endif()
 add_subdirectory(tests)
 
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ac090d4..669d6e8 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -6,192 +6,296 @@
 
 ## Next steps
 * Make your changes/add your feature/fix a bug.
-* Test your feature branch changes.
-* Check your formatting.
+* Conform to established [versioning requirements](README.md#versioning).
+* [Test](#testing) your feature branch changes.
+* Check your [formatting](#clang-format) and [style](#clang-tidy).
 * Submit a pull request.
 
 ## Testing
-Before submitting a pull request all tests must pass. This includes all unit tests, integration tests, and acceptance tests. We are using CTest for running tests (please see [the CTest documentation](https://cmake.org/Wiki/CMake/Testing_With_CTest) for further information) and [Google Test](https://github.com/google/googletest) as testing framework.
+Before submitting a pull request all tests must pass. This includes all unit tests, integration tests, and acceptance 
+tests. We are using CTest for running tests (please see [the CTest documentation](https://cmake.org/Wiki/CMake/Testing_With_CTest)
+for further information) and [Google Test](https://github.com/google/googletest) as testing framework.
 
 ### Running unit tests
-```bash
-$ cd <clone>
-$ cd build
-$ cd cppcache/test/<Debug|Release|if needed>
+```console
+$ cd build/cppcache/test/<Debug|Release|if needed>
 $ ./apache-geode_unittests
 ```
 
 ### Running integration tests
-There are two test suites of integration tests based on different testing frameworks. The old integration tests (stored in `geode-native/cppcache/integration-test`) are based on a custom testing framework, and the newer ones (stored in `geode-native/cppcache/integration/test`) are based on [Google Test](https://github.com/google/googletest).
+There are two test suites of integration tests based on different testing frameworks. The old integration tests (stored
+in `geode-native/cppcache/integration-test`) are based on a custom testing framework, and the newer ones (stored in 
+`geode-native/cppcache/integration/test`) are based on [Google Test](https://github.com/google/googletest).
 
-Old integration tests are deprecated. If your changes include the implementation of new integration test/s to be verified, they should be written using Google Test. If your change implies a significant change in one or more old test cases, you should create the equivalent test case/s using Google Test to substitute the old one/s instead of adapting them.
+Old integration tests are deprecated. If your changes include the implementation of new integration test/s to be
+verified, they should be written using Google Test. If your change implies a significant change in one or more old test
+cases, you should create the equivalent test case/s using Google Test to substitute the old one/s instead of adapting
+them.
 
-Both integration test suites can be executed together using CTest.
+Both integration test suites can be executed using CTest.
 
-#### Running old integration test suite
-```bash
+#### Running heritage integration test suite
+```console
 $ cd build/cppcache/integration-test
-$ ctest --timeout 2000 -L STABLE -C <Debug|Release> -j1
+$ ctest -C <Debug|RelWithDebInfo> --timeout 300 -j1
 ```
-Execution will take 2 hours approximately. It is possible to increase the number of jobs changing the value of `-j` parameter (up to `4`) for running tests in parallel, although it may end up with failed tests that will need to be re-run sequentially. Standalone tests can also be run as follows:
+Execution will take 2 hours approximately. It is possible to increase the number of jobs changing the value of `-j`
+parameter (up to `4`) for running tests in parallel, although it may end up with failed tests that will need to be
+re-run sequentially.
 
-```bash
+Standalone tests can also be run as follows:
+```console
 $ cd build/cppcache/integration-test
-$ ctest -R <test_name> -C <Debug|Release>
+$ ctest -C <Debug|RelWithDebInfo> -R <test_name>
 ```
-For example: `$ ctest --timeout 2000 -L STABLE -C Release -R testCacheless -j1`
+For example:
+```console
+$ ctest -C RelWithDebInfo -R testCacheless
+```
 
 .NET integration tests can be executed similarly from `build/clicache/integration-test`.
 
-#### Running Google Test integration test suite
+#### Running new Google Test integration test suite
 Make sure Docker is installed as it is required for SNI Tests
-```bash
-$ cd <clone>
+```console
 $ cd build/cppcache/integration/test
-$ ctest -j1
+$ ctest -C <Debug|RelWithDebInfo> -j1
 ```
-It is possible to increase the number of jobs changing the value of `-j` parameter for running tests in parallel, although it may end up with failed tests that will need to be re-run sequentially. Standalone tests can also be run as follows:
 
-```bash
-$ cd <clone>
+It is possible to increase the number of jobs changing the value of `-j` parameter for running tests in parallel,
+although it may end up with failed tests that will need to be re-run sequentially. Standalone tests can also be run as
+follows:
+```console
 $ cd build/cppcache/integration/test
-$ ctest -R <test_name> -j1
+$ ctest -C <Debug|RelWithDebInfo> -R <test_name> -j1
 ```
-For example: `$ ctest -R AuthInitializeTest.putGetWithBasicAuth -j1`
+For example:
+```console
+$ ctest -C RelWithDebInfo -R AuthInitializeTest.putGetWithBasicAuth -j1
+```
 
-Notice that `BasicIPv6Test` test is expected to fail due to IPv6 support is disabled by default. [BUILDING.md](BUILDING.md) explains how to enable it.
+Notice that `BasicIPv6Test` test is expected to fail due to IPv6 support is disabled by default. [BUILDING.md](BUILDING.md)
+explains how to enable it.
 
 ### Running acceptance tests
-Acceptance tests is a new category of tests that are designed to test end to end connectivity of a geode-native client with a cloud based geode cluster that sits behind a proxy server.
+Acceptance tests is a new category of tests that are designed to test end to end connectivity of a geode-native client
+with a cloud based geode cluster that sits behind a proxy server.
 
-These tests are stored in `geode-native/cppcache/acceptance-test` and `geode-native/clicache/acceptance-test` for C++ and .NET clients respectively. They utilize docker containers for the proxy server and geode servers. They are enabled during cmake configuration only if docker and docker-compose are found. 
+These tests are stored in `geode-native/cppcache/acceptance-test` and `geode-native/clicache/acceptance-test` for C++
+and .NET clients respectively. They utilize docker containers for the proxy server and geode servers. They are enabled
+during cmake configuration only if docker and docker-compose are found. 
 
-The acceptance tests can be run using ctest as follows. Note: Currently, the tests can only be run sequentially, hence the -j1 flag below.
+The acceptance tests can be run using ctest as follows. Note: Currently, the tests can only be run sequentially, hence
+the -j1 flag below.
 
 For C++ clients:
-```bash
-$ cd <clone>
+```console
 $ cd build/cppcache/acceptance-test
-$ ctest -R <test_name> -j1
+$ ctest -C <Debug|RelWithDebInfo> -R <test_name> -j1
 ```
 For .NET clients:
-```bash
-$ cd <clone>
+```console
 $ cd build/clicache/acceptance-test
-$ ctest -R <test_name> -j1
+$ ctest -C <Debug|RelWithDebInfo> -R <test_name> -j1
 ```
 
+## Google Sanitizers
+You can use the [Google Sanitizers](https://github.com/google/sanitizers), where available. These sanitizers can
+be used to diagnose possible issues when running tests. You can enable them using combinations of the options below.
+
+Address Sanitizer:
+```console
+$ cmake … -DUSE_SANITIZE_ADDRESS=YES …
+```
+Undefined Behavior Sanitizer:
+```console
+$ cmake … -DUSE_SANITIZE_UNDEFINED=YES …
+```
+Make sanitizer warnings fatal and exit:
+```console
+$ cmake … -DUSE_SANITIZE_FATAL=YES …
+```
+
+
 ## Style
 
 ### Formatting C++
-For C++ it is required to follow the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html) and have a build target that uses [clang-format](https://clang.llvm.org/docs/ClangFormat.html) to achieve compliance.
-```bash
-$ clang-format -i --style=file <PATH_TO_FILES>
+For C++ it is required to follow the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html) and
+have a build target that uses [clang-format](https://clang.llvm.org/docs/ClangFormat.html) to achieve compliance.
+
+#### Clang-format
+
+Individual targets in the build tree have their own dependency of the form `<<targetName>>-clangformat`, which uses
+the `clang-format` executable, wherever it is found, to format and modified files according to the rules specfied in the
+.clang-format file. This is helpful when submitting changes to geode-native, because an improperly formatted file will
+fail Travis-CI and have to be fixed prior to merging any pull request. If clang-format is not installed on your system,
+clangformat targets will not be added to your project files, and geode-native should build normally. Under some
+circumstances, however, it may become necessary to disable `clang-format` on a system where it _is_ installed. The
+clang-format rules are defined in the `.clang-format` files.
+
+To enable `clang-tidy` if CMake does not find `clang-format`:
+
+```console
+$ cmake … -DClangFormat_EXECUTABLE=/path/to/clang-format …
 ```
 
-### Code
-When writing new or refactoring old code please make the following changes.
+To disable `clang-format` in the build:
 
- * Prefer the use of [`auto`](http://en.cppreference.com/w/cpp/language/auto) C++ or [`var`](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/var) in C# where applicable.
-   ```c++
-   std::vector<Cars> cars = lot.getCars();
-   ```
-   should be changed to
-   ```c++
-   auto cars = lot.getCars();
-   ```
+```console
+$ cmake … -DClangFormat_EXECUTABLE='' …
+```
 
- * Prefer [range for](http://en.cppreference.com/w/cpp/language/range-for) loops over traditional for loops where applicable.
-   ```c++
-   for (std::vector<Car>::iterator i = cars.begin(); i != cars.end(), ++i) {
-     Car car = *i;
-     std::cout << car.getName();
-   }
-   ```
-   should be changed to
-   ```c++
-   for (const auto& car : cars) {
-     std::cout << car.getName();
-   }
-   ```
+On the other hand, it may also be desirable to run clang-format on the entire source tree. This is also easily done via
+the `all-clangformat` _in a build with clang-format enabled_. If clang-format has been disabled in the cmake
+configuration step, as above, the `all-clangformat` target will not exist, and the cmake configuration step will have to
+be re-run with clang-format enabled.
 
-  * Fix bad variable names. Variable names should be expressive.
-    ```c++
-    double i = car.getFuelLevel();
-    ```
-    should be changed to
-    ```c++
-    auto fuelLevel = car.getFuelLevel();
-    ```
+To run clang-format on the entire source tree:
 
-  * Use [`override`](http://en.cppreference.com/w/cpp/language/override) on all method overrides.
+```console
+$ cmake --build . --target all-clangformat
+```
 
-    Given a base class
-    ```c++
-    class Base {
-     public:
-      Base();
-      virtual ~Base();
-      virtual virtualMethod();
-      virtual pureVirtualMethod() = 0;
-    }
-    ```
-    the derived class
-    ```c++
-    class Derived : public Base {
-     public:
-      virtual ~Derived();
-      virtual virtualMethod();
-      virtual pureVirtualMethod();
-    }
-    ```
-    should be changed to
-    ```c++
-    class Derived : public Base {
-     public:
-      Derived();
-      ~Derived() override;
-      virtualMethod() override;
-      pureVirtualMethod() override;
-    }
-    ```
+#### Clang-Tidy
 
-  * Fix [`std::string::c_str()`](http://en.cppreference.com/w/cpp/string/basic_string/c_str) calls where passed to [`std::string`](http://en.cppreference.com/w/cpp/string/basic_string) parameters.
-    ```c++
-    auto name = std::string("Delorean");
-    ...
-    car.setName(name.c_str());
-    ```
-    should be changed to
-    ```c++
-    auto name = std::string("Delorean");
-    ...
-    car.setName(name);
-    ```
+Code style and conventions are enforced with clang-tidy. The clang-tidy rules can be found in the `.clang-tidy` files.
 
-  * Replace [`sprintf`](http://en.cppreference.com/w/cpp/io/c/fprintf) for logging messages with [`std::string`](http://en.cppreference.com/w/cpp/string/basic_string) or [`std::stringstream`](http://en.cppreference.com/w/cpp/io/basic_stringstream).
-    ```c++
-    char[1024] buffer;
-    sprintf(buffer, "Car::crashed: name=%s", car.getName().c_str());
-    LOG(buffer);
-    ```
-    should be changed to
-    ```c++
-    LOG("Car::crashed: name=" + car.getName());
-    ```
+To enable `clang-tidy`:
 
-  * Replace [`dynamic_cast`](http://en.cppreference.com/w/cpp/language/dynamic_cast) on [`std::shared_ptr`](http://en.cppreference.com/w/cpp/memory/shared_ptr) with [`std::dynamic_pointer_cast`](http://en.cppreference.com/w/cpp/memory/shared_ptr/pointer_cast). Same goes for [`static_cast`](http://en.cppreference.com/w/cpp/language/static_cast) to [`std::static_pointer_cast`](http://en.cppreference.com/w/cpp/memory/shared_ptr/pointer_cast), etc.
-    ```c++
-    std::shared_ptr<Car> car = garage.getCar();
-    Delorean* delorean = dynamic_cast<Delorean*>(car.get());
-    if (nullptr != delorean) {
-      delorean->setSpeed(88);
-    }
-    ```
-    should be changed to
-    ```c++
-    auto car = garage.getCar();
-    if (auto delorean = std::dynamic_pointer_cast<Delorean>(car)) {
-      delorean->setSpeed(88);
-    }
-    ```
+```console
+$ cmake … -DCMAKE_CXX_CLANG_TIDY=/path/to/clang-tidy …
+```
+
+### Code Cleanup
+When editing old code please make the following changes.
+
+* Prefer the use of [`auto`](http://en.cppreference.com/w/cpp/language/auto) C++ or [`var`](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/var)
+  in C# where applicable.
+  ```c++
+  std::vector<Cars> cars = lot.getCars();
+  ```
+  should be changed to
+  ```c++
+  auto cars = lot.getCars();
+  ```
+
+* Prefer [range for](http://en.cppreference.com/w/cpp/language/range-for) loops over traditional for loops where
+  applicable.
+  ```c++
+  for (std::vector<Car>::iterator i = cars.begin(); i != cars.end(), ++i) {
+    Car car = *i;
+    std::cout << car.getName();
+  }
+  ```
+  should be changed to
+  ```c++
+  for (const auto& car : cars) {
+    std::cout << car.getName();
+  }
+  ```
+
+* Fix bad variable names. Variable names should be expressive.
+  ```c++
+  double i = car.getFuelLevel();
+  ```
+  should be changed to
+  ```c++
+  auto fuelLevel = car.getFuelLevel();
+  ```
+
+* Use [`override`](http://en.cppreference.com/w/cpp/language/override) on all method overrides.
+
+  Given a base class
+  ```c++
+  class Base {
+   public:
+    Base();
+    virtual ~Base();
+    virtual virtualMethod();
+    virtual pureVirtualMethod() = 0;
+  }
+  ```
+  the derived class
+  ```c++
+  class Derived : public Base {
+   public:
+    virtual ~Derived();
+    virtual virtualMethod();
+    virtual pureVirtualMethod();
+  }
+  ```
+  should be changed to
+  ```c++
+  class Derived : public Base {
+   public:
+    Derived();
+    ~Derived() override;
+    virtualMethod() override;
+    pureVirtualMethod() override;
+  }
+  ```
+
+* Fix [`std::string::c_str()`](http://en.cppreference.com/w/cpp/string/basic_string/c_str) calls where passed to 
+  [`std::string`](http://en.cppreference.com/w/cpp/string/basic_string) parameters.
+  ```c++
+  auto name = std::string("Delorean");
+  ...
+  car.setName(name.c_str());
+  ```
+  should be changed to
+  ```c++
+  auto name = std::string("Delorean");
+  ...
+  car.setName(name);
+  ```
+
+* Replace [`sprintf`](http://en.cppreference.com/w/cpp/io/c/fprintf) for logging messages with [`std::string`](http://en.cppreference.com/w/cpp/string/basic_string)
+  or [`std::stringstream`](http://en.cppreference.com/w/cpp/io/basic_stringstream).
+  ```c++
+  char[1024] buffer;
+  sprintf(buffer, "Car::crashed: name=%s", car.getName().c_str());
+  LOG(buffer);
+  ```
+  should be changed to
+  ```c++
+  LOG("Car::crashed: name=" + car.getName());
+  ```
+
+* Replace [`dynamic_cast`](http://en.cppreference.com/w/cpp/language/dynamic_cast) on [`std::shared_ptr`](http://en.cppreference.com/w/cpp/memory/shared_ptr)
+  with [`std::dynamic_pointer_cast`](http://en.cppreference.com/w/cpp/memory/shared_ptr/pointer_cast). Same goes for
+  [`static_cast`](http://en.cppreference.com/w/cpp/language/static_cast) to [`std::static_pointer_cast`](http://en.cppreference.com/w/cpp/memory/shared_ptr/pointer_cast),
+  etc.
+  ```c++
+  std::shared_ptr<Car> car = garage.getCar();
+  Delorean* delorean = dynamic_cast<Delorean*>(car.get());
+  if (nullptr != delorean) {
+    delorean->setSpeed(88);
+  }
+  ```
+  should be changed to
+  ```c++
+  auto car = garage.getCar();
+  if (auto delorean = std::dynamic_pointer_cast<Delorean>(car)) {
+    delorean->setSpeed(88);
+  }
+  ```
+
+## Code Coverage
+
+If building with GCC or Clang you can enable C++ code coverage by adding `-DUSE_CPP_COVERAGE=ON` to the CMake generator
+command.
+
+```console
+$ cmake .. -DUSE_CPP_COVERAGE=ON …
+```
+
+You can then generate a C++ code coverage report by downloading [lcov](http://ltp.sourceforge.net/coverage/lcov.php).
+After acquiring lcov, finish the [Steps to build](BUILDING.md#Steps-to-build) section above. Then, run the tests as 
+described in the this document. Finally, run the following commands from the `build` directory:
+
+```console
+$ lcov --capture --directory . --output-file coverage.info
+$ genhtml coverage.info --output-directory coverage_report
+```
+
+You can then open the `index.html` file in the `coverage_report` directory using any browser.
diff --git a/README.md b/README.md
index f333bef..741c23f 100644
--- a/README.md
+++ b/README.md
@@ -1,27 +1,53 @@
-[<img src="https://geode.apache.org/img/Apache_Geode_logo.png" align="center"/>](http://geode.apache.org)
+[![Apache Geode](https://geode.apache.org/img/Apache_Geode_logo.png)](http://geode.apache.org)
 
-[![Build Status](https://travis-ci.org/apache/geode-native.svg?branch=develop)](https://travis-ci.org/apache/geode-native) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0) [![Total alerts](https://img.shields.io/lgtm/alerts/g/apache/geode-native.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/geode-native/alerts/) [![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/apache/geode-native.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/geode-native/context:cpp) [![Language grade: C#](https://img.shields.io/lgtm/grade/csharp/g/apache/geode-native.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/geode-native/context:csharp) [![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/apache/geode-native.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/geode-native/context:javascript)
+[![Build Status](https://concourse.apachegeode-ci.info/api/v1/teams/main/pipelines/geode-native-develop/badge)](https://concourse.apachegeode-ci.info/teams/main/pipelines/geode-native-develop)
+[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
+[![LGTM Total Alerts](https://img.shields.io/lgtm/alerts/g/apache/geode-native.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/geode-native/alerts/)
+[![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/apache/geode-native.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/geode-native/context:cpp)
+[![Language grade: C#](https://img.shields.io/lgtm/grade/csharp/g/apache/geode-native.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/geode-native/context:csharp)
+[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/apache/geode-native.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/geode-native/context:javascript)
 
-**[Overview](#overview)**  
-**[Building from Source](#building)**  
-**[Application Development](#development)**  
+Table of Contents
+=================
+* [Overview](#overview)
+* [Building from Source](#building-from-source)
+* [Application Development](#application-development)
+* [Versioning](#versioning)
+* [Export Control](#export-control)
 
-## <a name="overview"></a>Overview
+# Overview
 
-Native Client is a client implementation for [Apache Geode](http://geode.apache.org/) that does not require the Java server JARs.
+Native Client is a client implementation for [Apache Geode](http://geode.apache.org/) that does not require the Java
+server JARs.
 
-## <a name="building"></a>Building from Source
+# Building from Source
 
 Directions to build Native Client from source can be found in the source distribution in [BUILDING.md](BUILDING.md).
 
-## <a name="development"></a>Application Development
+# Application Development
 
 Native Client applications can be written in these client technologies:
 
-* [C++] (https://isocpp.org)
-* [C#] (https://msdn.microsoft.com/en-us/library/ms228593.aspx)
+* [C++](https://isocpp.org)
+* [.NET Framework](https://dotnet.microsoft.com/learn/dotnet/what-is-dotnet-framework)
 
-## Export Control
+# Versioning
+
+Geode Native follows the [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html) specification (semver). This
+specification only addresses the [API](https://en.wikipedia.org/wiki/API) compatibility with libraries and does not
+cover [ABI](https://en.wikipedia.org/wiki/Application_binary_interface) compatibility.
+
+## C++
+
+ABI compatibility is not preserved similarly to the API compatibility. ABI compatibility is only guaranteed between
+patch releases. Recompilation is required for both minor and major releases.
+
+## .NET
+
+ABI compatibility is preserved similarly to the API compatibility. ABI compatibility is guaranteed between patch and
+minor releases. Recompilation is only require for major releases or to utilize new APIs added in minor releases.
+
+# Export Control
 
 This distribution includes cryptographic software.
 The country in which you currently reside may have restrictions
@@ -45,5 +71,3 @@
 The following provides more details on the included cryptographic software:
 
 * Apache Geode links to and uses [OpenSSL](https://www.openssl.org/) ciphers.
-
-
diff --git a/bin/vcvarsall.bat b/bin/vcvarsall.bat
deleted file mode 100644
index df53c10..0000000
--- a/bin/vcvarsall.bat
+++ /dev/null
@@ -1,20 +0,0 @@
-@echo off
-
-rem Licensed to the Apache Software Foundation (ASF) under one or more
-rem contributor license agreements.  See the NOTICE file distributed with
-rem this work for additional information regarding copyright ownership.
-rem The ASF licenses this file to You under the Apache License, Version 2.0
-rem (the "License"); you may not use this file except in compliance with
-rem the License.  You may obtain a copy of the License at
-rem 
-rem      http://www.apache.org/licenses/LICENSE-2.0
-rem 
-rem Unless required by applicable law or agreed to in writing, software
-rem distributed under the License is distributed on an "AS IS" BASIS,
-rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-rem See the License for the specific language governing permissions and
-rem limitations under the License.
-
-call "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %1
-C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build
-echo Environment setup for %vs% %1.
diff --git a/bin/vcvarsall.ps1 b/bin/vcvarsall.ps1
deleted file mode 100644
index ce91281..0000000
--- a/bin/vcvarsall.ps1
+++ /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.
-
-$arch = $args[0]
-if ([string]::IsNullOrEmpty($arch)) {
-  $arch = "amd64"
-}
-
-$basedir = split-path $SCRIPT:MyInvocation.MyCommand.Path -parent
-
-cmd /c "$basedir\vcvarsall.bat $arch & set" |
-foreach {
-  if ($_ -match "=") {
-    $v = $_.split("="); set-item -force -path "ENV:\$($v[0])"  -value "$($v[1])"
-  }
-}
-
-write-host "Environment setup for VS $env:VisualStudioVersion $arch." -ForegroundColor Yellow
diff --git a/ci/README.md b/ci/README.md
new file mode 100644
index 0000000..1d5d9aa
--- /dev/null
+++ b/ci/README.md
@@ -0,0 +1,123 @@
+# Geode Native Concourse Pipeline
+
+The Geode Native Concourse pipeline is actually two Concourse pipelines. The primary release pipeline builds the release
+artifacts for a given branch, like develop, release or support branch. The secondary pull request (pr) pipeline builds
+the same artifacts as the release pipeline but for pull requests and without actually releasing or publishing anything.
+
+The pipeline is fully self updating and can easily be bootstrapped into a properly configured Concourse deployment.
+Concourse configuration requires TBD. Changes to the `ci` source directory will results in auto updates to the
+pipelines.
+
+Because Concourse workers aren't available on all platforms and have issues with resource sharing this pipeline utilizes
+external builders. These builders are currently Google Compute VMs that are launched on demand for each build.
+
+# Pipeline Setup
+
+The pipeline can be installed or reconfigured via the `set-pipelin.sh` shell script.
+
+```console
+./set-pipeline.sh --help
+```
+
+## Examples
+
+Given the local repository looks like the following:
+
+```console
+$ git remote get-url origin
+git@github.com:some-user/geode-native.git
+
+$ git branch --show-current
+wip/some-branch
+```
+
+### Typical
+
+The most typical usage should require nothing more than the Concourse target, unless that happens to be named "default".
+Everything else has reasonable defaults based on the currently checked out branch.
+
+```console
+$ ./set-pipeline.sh --target=some-concourse
+```
+
+Executes `fly` from the path setting pipeline to target `some-concourse` for GitHub owner `some-user`
+repository `geode-native.git`. Pipeline names will be `some-user-wip-something`
+and `some-user-wip-something-pr`.
+
+### Alternative repository URL and fly version
+
+Sometimes you will have to support multiple versions of Concourse `fly` or need to fetch sources via https.
+
+```console
+$ ./set-pipeline.sh \
+  --fly=/path/to/fly \
+  --target=some-concourse \
+  --github-owner=other-user
+```
+
+Executes fly at `/path/to/fly` setting pipeline to target `some-concourse` for GitHub owner `other-user`
+repository `geode-native.git`. Pipelines name will be `some-user-wip-something`
+and `some-user-wip-something-pr`.
+
+# Pipeline Steps
+
+## Release
+
+* Detects new version or source
+* Build for each platform and configuration
+    * Creates VM instances
+    * Waits for VM instance to be accessible
+    * Builds and packages
+    * Runs all tests
+    * If anything fails it downloads the build directory for later analysis
+    * Deletes the VM instances
+    * Uploads artifacts to GCS
+* Publishes to GitHub release (TODO)
+* Detects changes to pipeline sources and auto updates
+
+## Pull Release (PR)
+
+* Detects new PR
+* Build for each platform and configuration
+    * Creates VM instances
+    * Waits for VM instance to be accessible
+    * Builds and packages
+    * Runs all tests
+    * If anything fails it downloads the build directory for later analysis
+    * Deletes the VM instances
+    * Updates PR status
+* Detects changes to pipeline sources and auto updates
+
+# Details
+
+This Concourse pipeline YAML is rendered using `ytt`. Depends on output from `git` and `gcloud`.
+
+## Dependencies
+
+* [Google Cloud](https://console.cloud.google.com)
+* [Concourse](https://concourse-ci.org) v6.5.0+
+* [`ytt`](https://get-ytt.io) v0.28.0+
+* [`git`](https://git-scm.com) v2.25.2+
+* [`yq`](https://github.com/mikefarah/yq) v4.6.0+ (optional for set-pipeline script)
+* [`gcloud`](https://cloud.google.com/sdk/docs/install) SDK
+
+## Layout
+
+* base - Defines all common tasks across both pipelines.
+* release - Defines tasks tasks for release pipeline only.
+* pr - Defines tasks for pr pipeline only.
+* lib - ytt functions used by all templates.
+* docker/task - Minimal image required to communicate with builders.
+
+# TODO
+
+## Concourse Installation
+
+* Resolve chicken/egg problem with external API address.
+    * `helm install concourse concourse/concourse`
+    * `helm upgrade concourse concourse/concourse --set web.service.api.type=LoadBalancer,concourse.web.externalUrl=http://1.2.3.4:8080`
+* Task for getting secrets into k8s.
+    * `kubectl create secret generic gcr-json-key --from-literal "value=$(cat XXX.json)" --namespace=concourse-main`
+    * `kubectl create secret generic github-access-token --from-literal "value=XXX" --namespace=concourse-main`
+    * `kubectl create secret generic github-private-key --from-literal "value=$(cat XXX)" --namespace=concourse-main`
+* Use docker locally for initial pipeline deployment to avoid `gcloud`, `ytt`, and `fly` version issues.
diff --git a/ci/base/base.yml b/ci/base/base.yml
new file mode 100644
index 0000000..da26493
--- /dev/null
+++ b/ci/base/base.yml
@@ -0,0 +1,114 @@
+#! 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.
+
+#@ load("@ytt:template", "template")
+
+---
+#@ def new_build(name, package="Linux-64bit.tar.gz"):
+name: #@ name
+with_dot_net: #@ False
+params:
+  CMAKE_CONFIGURE_FLAGS:
+  CMAKE_BUILD_FLAGS: "-j16"
+  CPACK_GENERATORS: "TGZ"
+packages:
+  - name: archive
+    regexp: #@ "apache-geode-native-(?P<version>.*)-" + package
+    glob: #@ "*-" + package
+  - name: archive.sha512
+    regexp: #@ "apache-geode-native-(?P<version>.*)-" + package + ".sha512"
+    glob: #@ "*-" + package + ".sha512"
+#@ end
+
+#@data/values
+---
+pipeline:
+  name: develop
+  version: 1.15.0
+  pre: build
+
+github:
+  owner: apache
+  repository: geode-native
+
+repository:
+  branch: develop
+
+google:
+  project: apachegeode-ci
+  zone: us-central1-f
+  storage:
+    bucket: apachegeode-ci-concourse
+    key: geode-native/develop
+
+builds:
+  - _: #@ template.replace(new_build("windows-2016-vs-2017", "Windows-64bit.zip"))
+    image_family: build-windows-2016-vs-2017
+    source_image_family: windows-2016
+    #@yaml/map-key-override
+    with_dot_net: #@ True
+    #@yaml/map-key-override
+    params:
+      CMAKE_CONFIGURE_FLAGS: "-A x64 -Tv141,version=14.16,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0"
+      CMAKE_BUILD_FLAGS: "/m"
+      CPACK_GENERATORS: "ZIP"
+
+  - _: #@ template.replace(new_build("windows-2019-vs-2019", "Windows-64bit.zip"))
+    image_family: build-windows-2019-vs-2019
+    source_image_family: windows-2019
+    #@yaml/map-key-override
+    with_dot_net: #@ True
+    #@yaml/map-key-override
+    params:
+      CMAKE_CONFIGURE_FLAGS: "-A x64 -Tv142,version=14.20.27508,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0"
+      CMAKE_BUILD_FLAGS: "/m"
+      CPACK_GENERATORS: "ZIP"
+
+  - _: #@ template.replace(new_build("rhel-7"))
+    image_family: build-rhel-7
+    source_image_family: rhel-7
+
+  - _: #@ template.replace(new_build("rhel-8"))
+    image_family: build-rhel-8
+    source_image_family: rhel-8
+    #@yaml/map-key-override
+    params:
+      CMAKE_CONFIGURE_FLAGS: "-DUSE_IPO=NO"
+      CMAKE_BUILD_FLAGS: "-j16"
+      CPACK_GENERATORS: "TGZ"
+
+  - _: #@ template.replace(new_build("ubuntu-16.04"))
+    image_family: build-ubuntu-16-04
+    source_image_family: ubuntu-1604-lts
+
+  - _: #@ template.replace(new_build("ubuntu-18.04"))
+    image_family: build-ubuntu-18-04
+    source_image_family: ubuntu-1804-lts
+    #@yaml/map-key-override
+    params:
+      CMAKE_CONFIGURE_FLAGS: "-DCMAKE_INSTALL_PREFIX=/home/build"
+      CMAKE_BUILD_FLAGS: "-j16"
+      CPACK_GENERATORS: "TGZ"
+
+  - _: #@ template.replace(new_build("ubuntu-20.04"))
+    image_family: build-ubuntu-20-04
+    source_image_family: ubuntu-2004-lts
+    #@yaml/map-key-override
+    params:
+      CMAKE_CONFIGURE_FLAGS: "-DCMAKE_INSTALL_PREFIX=/home/build"
+      CMAKE_BUILD_FLAGS: "-j16"
+      CPACK_GENERATORS: "TGZ"
+
+configs: [ ]
diff --git a/ci/base/pipeline.yml b/ci/base/pipeline.yml
new file mode 100644
index 0000000..a69b93d
--- /dev/null
+++ b/ci/base/pipeline.yml
@@ -0,0 +1,82 @@
+#! 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.
+
+#@ load("templates.lib.yml",
+#@      "resource_type",
+#@      "gcr_image_resource",
+#@      "project_gcr_image_resource",
+#@      "github_resource",
+#@      "registry_image_resource",
+#@      "semver_resource",
+#@      "apache_directory_index_resource",
+#@      "maven_resource",
+#@      "build_resources",
+#@      "build_jobs",
+#@      "build_job_name",
+#@      "check_source_job",
+#@      "check_source_job_name",
+#@      "update_pipeline_job",
+#@      "update_pipeline_job_name",
+#@ )
+#@ load("functions.lib.yml",
+#@      "initial_version",
+#@      "version_pattern",
+#@ )
+#@ load("@ytt:data", "data")
+#@ load("@ytt:template", "template")
+
+---
+resource_types:
+  - #@ resource_type("gci-resource", "smgoller/gci-resource")
+  - #@ resource_type("gcs-resource", "frodenas/gcs-resource")
+  - #@ resource_type("apache-directory-index-resource", "jakepivotal/apache-directory-index-resource")
+  - #@ resource_type("maven-resource", "jakepivotal/maven-resource")
+
+resources:
+  - #@ semver_resource("version", initial_version())
+  - #@ gcr_image_resource("gcloud-image", "google.com/cloudsdktool/cloud-sdk", "alpine")
+  - #@ project_gcr_image_resource("task-image", "geode-native-task")
+  - #@ project_gcr_image_resource("clang-tools-image", "geode-native-clang-tools")
+  - #@ github_resource("source", data.values.github.owner, data.values.github.repository, data.values.repository.branch, ignore_paths=["ci/*", "packer/*"])
+  - #@ template.replace(build_resources(data.values.builds, data.values.configs))
+  - #@ registry_image_resource("ytt-image", "gerritk/ytt")
+  - #@ github_resource("ci-source", data.values.github.owner, data.values.github.repository, data.values.repository.branch, ["ci/*"])
+  - #@ maven_resource("geode-latest", "https://maven.apachegeode-ci.info/snapshots", "org.apache.geode:apache-geode:tgz", version_pattern())
+  #! - #@ apache_directory_index_resource("geode", "https://archive.apache.org/dist/geode/", "$VERSION", "apache-geode-$VERSION.tgz")
+
+jobs:
+  - #@ template.replace(build_jobs(data.values.builds, data.values.configs))
+  - #@ check_source_job()
+  - #@ update_pipeline_job()
+
+groups:
+  - name: builds
+    jobs:
+      #@ for build in data.values.builds:
+      #@ for/end config in data.values.configs:
+      - #@ build_job_name(build, config)
+      #@ end
+      - #@ check_source_job_name()
+  - name: meta
+    jobs:
+      - #@ update_pipeline_job_name()
+  - name: all
+    jobs:
+      - #@ update_pipeline_job_name()
+        #@ for build in data.values.builds:
+      #@ for/end config in data.values.configs:
+      - #@ build_job_name(build, config)
+      #@ end
+      - #@ check_source_job_name()
diff --git a/ci/docker/clang-tools/Dockerfile b/ci/docker/clang-tools/Dockerfile
new file mode 100644
index 0000000..0674479
--- /dev/null
+++ b/ci/docker/clang-tools/Dockerfile
@@ -0,0 +1,60 @@
+# 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.
+
+FROM ubuntu:focal
+LABEL maintainer="Apache Geode <dev@geode.apache.org>"
+LABEL description="Minimal image for building with clang toolset."
+
+ARG DEBIAN_FRONTEND=noninteractive
+ARG CLANG_VERSION=12
+RUN apt-get update \
+    && apt-get install -y \
+        curl \
+        software-properties-common \
+    && apt-get remove -y unattended-upgrades \
+    && curl -s https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
+    && add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-${CLANG_VERSION} main" \
+    && apt-get update \
+    && apt-get install -y \
+        bash \
+        libssl-dev \
+        patch \
+        git \
+        doxygen \
+        openjdk-8-jdk-headless \
+        jq \
+        make \
+        clang-${CLANG_VERSION} \
+        lld-${CLANG_VERSION} \
+        clang-format-${CLANG_VERSION} \
+        clang-tidy-${CLANG_VERSION} \
+    && update-alternatives --install /usr/bin/clang           clang           /usr/bin/clang-${CLANG_VERSION} 10 \
+    && update-alternatives --install /usr/bin/clang++         clang++         /usr/bin/clang++-${CLANG_VERSION} 10 \
+    && update-alternatives --install /usr/bin/lld             lld             /usr/bin/lld-${CLANG_VERSION} 10 \
+    && update-alternatives --install /usr/bin/clang-tidy      clang-tidy      /usr/bin/clang-tidy-${CLANG_VERSION} 10 \
+    && update-alternatives --install /usr/bin/run-clang-tidy  run-clang-tidy  /usr/bin/run-clang-tidy-${CLANG_VERSION} 10 \
+    && update-alternatives --install /usr/bin/clang-format    clang-format    /usr/bin/clang-format-${CLANG_VERSION} 10 \
+    && update-alternatives --install /usr/bin/cc              cc              /usr/bin/clang 10 \
+    && update-alternatives --install /usr/bin/c++             c++             /usr/bin/clang++ 10 \
+    && update-alternatives --install /usr/bin/ld              ld              /usr/bin/lld 10 \
+    && apt-get -y autoremove \
+    && apt-get -y autoclean \
+    && rm -rf /var/lib/apt/lists/*
+
+RUN installer=$(mktemp) \
+    && curl -o ${installer} -L $(curl -s https://api.github.com/repos/Kitware/CMake/releases/latest | jq -r '.assets[].browser_download_url | select(test("linux-x86_64.sh"))') \
+    && bash ${installer} --skip-license --prefix=/usr/local \
+    && rm ${installer}
diff --git a/ci/docker/task/Dockerfile b/ci/docker/task/Dockerfile
new file mode 100644
index 0000000..dc1269f
--- /dev/null
+++ b/ci/docker/task/Dockerfile
@@ -0,0 +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.
+
+FROM alpine:3.13
+LABEL maintainer="Apache Geode <dev@geode.apache.org>"
+LABEL description="Minimal image for executing CI tasks."
+RUN apk add --no-cache bash git openssh-client
diff --git a/ci/lib/functions.lib.yml b/ci/lib/functions.lib.yml
new file mode 100644
index 0000000..f5702a7
--- /dev/null
+++ b/ci/lib/functions.lib.yml
@@ -0,0 +1,45 @@
+#! 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.
+
+#@ load("@ytt:data", "data")
+#@ load("@ytt:overlay", "overlay")
+#@ load("@ytt:struct", "struct")
+
+---
+#@ def hyphenated(value):
+#! TODO [a-z0-9-]
+#@ return value.lower().replace(".", "-").replace("/", "-")
+#@ end
+
+---
+#@ def gci_label_value(value):
+#! TODO [a-z0-9_-]
+#@ return hyphenated(value[0:62])
+#@ end
+
+---
+#@ def image_family_name(family):
+#@ return (data.values.pipeline.name + "-" + family)[0:62]
+#@ end
+
+---
+#@ def initial_version():
+#@ return data.values.pipeline.version + ("-" + data.values.pipeline.pre + ".0" if data.values.pipeline.pre else "")
+#@ end
+
+---
+#@ def version_pattern():
+#@ return (data.values.pipeline.version + ("-" + data.values.pipeline.pre + "." if data.values.pipeline.pre else "")).replace(".", "\.") + ".*"
+#@ end
diff --git a/ci/lib/templates.lib.txt b/ci/lib/templates.lib.txt
new file mode 100644
index 0000000..01e3b93
--- /dev/null
+++ b/ci/lib/templates.lib.txt
@@ -0,0 +1,307 @@
+# 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.
+
+(@ load("@ytt:data", "data") -@)
+(@ load("functions.lib.yml",
+        "gci_label_value",
+        "image_family_name")
+-@)
+
+(@ def google_variables(): -@)
+GOOGLE_PROJECT=(@=data.values.google.project @)
+GOOGLE_ZONE=(@=data.values.google.zone @)
+(@- end @)
+
+
+(@ def instance_variables(): -@)
+INSTANCE_USER=build
+INSTANCE_DIR=$(pwd)/instance
+
+if [ ! -d "${INSTANCE_DIR}" ]; then
+  echo "${INSTANCE_DIR} not found."
+  exit 1
+fi
+(@- end @)
+
+(@ def remote_functions(): -@)
+(@=instance_variables() @)
+
+SSH_OPTIONS=${SSH_OPTIONS:-"-o StrictHostKeyChecking=no -o PasswordAuthentication=no"}
+
+ssh_key_file=${INSTANCE_DIR}/identity
+if [ ! -r "${ssh_key_file}" ]; then
+  echo "${ssh_key_file} not readable."
+  exit 1
+fi
+
+instance_file=${INSTANCE_DIR}/instance.sh
+if [ ! -r "${instance_file}" ]; then
+  echo "${instance_file} not readable."
+  exit 1
+fi
+
+external_ip=$(source ${instance_file} && echo -n ${networkInterfaces_accessConfigs_natIP})
+
+function remote_shell {
+  ssh ${SSH_OPTIONS} -i ${ssh_key_file} ${INSTANCE_USER}@${external_ip} "$@"
+}
+
+function remote_download {
+  scp ${SSH_OPTIONS} -i ${ssh_key_file} -q -r "${INSTANCE_USER}@${external_ip}:${1}" "$2"
+}
+
+function remote_download_directory {
+  ssh ${SSH_OPTIONS} -i ${ssh_key_file} ${INSTANCE_USER}@${external_ip} tar -C $(dirname ${1}) -czf - $(basename ${1}) | tar -C ${2} -zxf -
+}
+
+function remote_upload {
+  scp ${SSH_OPTIONS} -i ${ssh_key_file} -q -r "$1" "${INSTANCE_USER}@${external_ip}:${2}"
+}
+
+(@- end @)
+
+(@ def ctest_bash_task(path, timeout=300, parallel=6): -@)
+set -ueo pipefail
+(@= remote_functions() @)
+remote_shell cmake -E chdir (@= path @) ctest -C ${CMAKE_CONFIG} -j(@= str(parallel) @) --timeout=(@= str(timeout) @) --output-on-failure --repeat until-pass:4 --schedule-random
+(@- end @)
+
+(@ def clang_tidy_bash_task(): -@)
+set -ueo pipefail
+export GEODE_HOME=$(pwd)/geode
+log=$(mktemp)
+cd build
+cmake ../source -DCMAKE_EXPORT_COMPILE_COMMANDS=ON >>${log} 2>&1 || (cat ${log}; exit 1)
+cmake --build dependencies --parallel $(nproc) >>${log} 2>&1 || (cat ${log}; exit 1)
+run-clang-tidy -j $(nproc) -quiet
+(@- end @)
+
+(@ def clang_format_bash_task(): -@)
+set -ueo pipefail
+export GEODE_HOME=$(pwd)/geode
+log=$(mktemp)
+cd build
+cmake ../source -DCMAKE_EXPORT_COMPILE_COMMANDS=ON >>${log} 2>&1 || (cat ${log}; exit 1)
+jq -r '.[].file' compile_commands.json | sort | uniq | grep -v $(pwd) | xargs clang-format --dry-run -Werror
+(@- end @)
+
+(@ def rat_check_bash_task(): -@)
+set -ueo pipefail
+export GEODE_HOME=$(pwd)/geode
+log=$(mktemp)
+cd build
+cmake ../source -DUSE_RAT=ON >>${log} 2>&1 || (cat ${log}; exit 1)
+cmake --build . --target rat-check
+(@- end @)
+
+(@ def packer_build_bash_task(build): -@)
+set -ueo pipefail
+cd source/packer
+packer build -only=googlecompute \
+    -var-file=default.json \
+    -var pipeline=(@= gci_label_value(data.values.pipeline.name) @) \
+    -var version=(@= data.values.pipeline.version @) \
+    -var pre=(@= data.values.pipeline.pre @) \
+    -var owner=(@= gci_label_value(data.values.github.owner) @) \
+    -var repository=(@= gci_label_value(data.values.github.repository) @) \
+    -var branch=(@= gci_label_value(data.values.repository.branch) @) \
+    -var image_name_prefix=(@= image_family_name(build.image_family)[0:51] @) \
+    -var image_family=(@= image_family_name(build.image_family) @) \
+    -var googlecompute_project=(@=  data.values.google.project @) \
+    -var googlecompute_zone=(@= data.values.google.zone @) \
+    (@= build.image_family @).json
+(@- end @)
+
+(@ def instance_create_bash_task(pipeline_name, build_config): -@)
+set -ueo pipefail
+(@= google_variables() @)
+(@= instance_variables() @)
+ssh_key_file=${INSTANCE_DIR}/identity
+ssh_pubkey_file=${ssh_key_file}.pub
+ssh-keygen -m pem  -t rsa -f ${ssh_key_file} -C "${INSTANCE_USER}" -N '' <<< y
+ssh_pubkey=$(cat ${ssh_pubkey_file})
+ssh_keys_file=${INSTANCE_DIR}/ssh_keys_file
+echo "${INSTANCE_USER}:${ssh_pubkey}" > ${ssh_keys_file}
+instance_name=build-$(cat /proc/sys/kernel/random/uuid)
+image_name=$(cat image/name)
+time_to_live=$(( $(date +%s) + ( 4 * 60 * 60 ) ))
+instance_file=${INSTANCE_DIR}/instance.sh
+gcloud compute instances create ${instance_name} \
+    --format='config[export](name,networkInterfaces[0].accessConfigs[0].natIP)' \
+    --project=${GOOGLE_PROJECT} \
+    --zone=${GOOGLE_ZONE} \
+    --subnet=default \
+    --machine-type=e2-standard-16 \
+    --boot-disk-size=200GB \
+    --boot-disk-type=pd-standard \
+    --boot-disk-device-name=${instance_name} \
+    --image-project=${GOOGLE_PROJECT} \
+    --image=${image_name} \
+    --metadata-from-file ssh-keys=${ssh_keys_file} \
+    --labels=time-to-live=${time_to_live},pipeline-name=(@= pipeline_name @),build-config=(@= build_config @) \
+    > ${instance_file}
+(@= remote_functions() @)
+SSH_OPTIONS="${SSH_OPTIONS} -o ConnectTimeout=10"
+echo "Waiting for ssh on ${instance_name} to be ready."
+console_file=$(mktemp)
+console_next=0
+while ! remote_shell echo ready 2>/dev/null ; do
+  gcloud compute instances get-serial-port-output ${instance_name} \
+      --start ${console_next} \
+      --project=${GOOGLE_PROJECT} \
+      --zone=${GOOGLE_ZONE} \
+      --format='value[separator="
+"](next,contents)' \
+      > ${console_file}
+  tmp_next=$(head -n 1 ${console_file})
+  if (( tmp_next != console_next )); then
+    console_next=${tmp_next}
+    sed '1d;s/\x1b\[[0-9;]*[JH]//g' ${console_file}
+  fi
+done
+(@- end @)
+
+(@ def instance_delete_bash_task(): -@)
+set -ueo pipefail
+(@= google_variables() @)
+(@= instance_variables() @)
+
+instance_file=${INSTANCE_DIR}/instance.sh
+instance_name=$(source ${instance_file} && echo -n ${name})
+
+gcloud compute instances delete ${instance_name} \
+    --project=${GOOGLE_PROJECT} \
+    --zone=${GOOGLE_ZONE} \
+    --delete-disks=all \
+    --quiet
+(@- end @)
+
+(@ def download_build_bash_task(): -@)
+set -ueo pipefail
+(@= remote_functions() @)
+remote_download_directory build .
+(@- end @)
+
+(@ def build_bash_task(): -@)
+set -ueo pipefail
+(@= remote_functions() @)
+pushd source
+git_url=$(git remote get-url origin)
+git_rev=$(git rev-parse HEAD)
+popd
+version=$(cat version/number)
+builddate=$(date "+%Y-%m-%d")
+remote_shell cmake -E make_directory build
+remote_shell cmake -E time cmake -E chdir build cmake ../source ${CMAKE_CONFIGURE_FLAGS} \
+    -DCMAKE_BUILD_TYPE=${CMAKE_CONFIG} \
+    -DGEODE_ROOT=../geode \
+    -DPRODUCT_VERSION=${version} \
+    -DPRODUCT_BUILDDATE=${builddate} \
+    -DPRODUCT_SOURCE_REVISION=${git_rev} \
+    -DPRODUCT_SOURCE_REPOSITORY=${git_url}
+remote_shell cmake -E time cmake --build build --config ${CMAKE_CONFIG} -- ${CMAKE_BUILD_FLAGS}
+remote_shell cmake -E time cmake --build build --config ${CMAKE_CONFIG} --target docs -- ${CMAKE_BUILD_FLAGS}
+remote_shell cmake -E time cmake -E chdir build cpack -C ${CMAKE_CONFIG} -G "${CPACK_GENERATORS}" | tee cpack.out
+packages=$(awk '/^CPack: - package: / {print $4}' cpack.out)
+for package in ${packages}; do
+  remote_download ${package} package/
+done
+checksums=$(awk '/^CPack: - checksum file: / {print $5}' cpack.out)
+for checksum in ${checksums}; do
+  remote_download ${checksum} package/
+done
+(@- end @)
+
+(@ def upload_source_bash_task(): -@)
+set -ueo pipefail
+(@= remote_functions() @)
+remote_upload source .
+(@- end @)
+
+
+(@ def upload_geode_bash_task(): -@)
+set -ueo pipefail
+(@= remote_functions() @)
+geode_version=$(cat geode-latest/version)
+geode_name="apache-geode-${geode_version}"
+geode_artifact="${geode_name}.tgz"
+remote_upload geode-latest/${geode_artifact} .
+remote_shell cmake -E tar xvf ${geode_artifact}
+remote_shell cmake -E rename ${geode_name} geode
+(@- end @)
+
+(@ def extract_geode_bash_task(): -@)
+set -ueo pipefail
+if (cmp -s geode-latest/version geode/version); then
+ exit 0
+fi
+geode_version=$(cat geode-latest/version)
+geode_name="apache-geode-${geode_version}"
+geode_artifact="${geode_name}.tgz"
+tar xvf geode-latest/${geode_artifact} --directory=geode --strip-components=1
+unzip -p geode/lib/geode-core-${geode_version}.jar org/apache/geode/internal/GemFireVersion.properties
+cp geode-latest/version geode/version
+(@- end @)
+
+(@ def is_source_from_pr_testable_bash_task(): -@)
+# Cribbed shamelessly from geode/ci/scripts/shared_utilities.sh
+is_source_from_pr_testable() {
+  if [[ $# -ne 3 ]]; then
+    >&2 echo "Invalid args. Try ${0} \"<repo_path>\" \"<list of exclusion dirs>\""
+    exit 1
+  fi
+  local repo_dir="${1}"
+  if [[ ! -d "${repo_dir}" ]]; then
+    # If the repo_dir does not exist, assume call from non-PR
+    return 0;
+  fi
+
+  pushd "${repo_dir}" 2>&1 >> /dev/null
+    local base_dir=$(git rev-parse --show-toplevel)
+    local github_pr_dir="${base_dir}/.git/resource"
+    pushd ${base_dir} 2>&1 >> /dev/null
+      local return_code=0
+      if [ -d "${github_pr_dir}" ]; then
+        # Modify this path list with directories to exclude
+        local exclude_dirs="${2}"
+        for d in $(echo ${exclude_dirs}); do
+          local exclude_pathspec="${exclude_pathspec} :(exclude,glob)${d}/**"
+        done
+        local exclude_files="${3}"
+        for f in "${exclude_files}"; do
+          local exclude_pathspec="${exclude_pathspec} :(exclude,glob)${f}"
+        done
+        pushd ${base_dir} &> /dev/null
+          local files=$(git diff --name-only $(cat "${github_pr_dir}/base_sha") $(cat "${github_pr_dir}/head_sha") -- . $(echo ${exclude_pathspec}))
+        popd &> /dev/null
+        if [[ -z "${files}" ]]; then
+          >&2 echo "Code changes are from CI only"
+          return_code=1
+        else
+          >&2 echo "real code change here!"
+        fi
+      else
+        >&2 echo "repo is not from a PR"
+      fi
+    popd 2>&1 >> /dev/null
+  popd 2>&1 >> /dev/null
+  return ${return_code}
+}
+
+exclude_dirs="ci packer docker tools"
+exclude_files="*/*.md"
+is_source_from_pr_testable "source" "${exclude_dirs}" "${exclude_files}" && exit 0 || exit 1
+
+(@- end @)
diff --git a/ci/lib/templates.lib.yml b/ci/lib/templates.lib.yml
new file mode 100644
index 0000000..f372806
--- /dev/null
+++ b/ci/lib/templates.lib.yml
@@ -0,0 +1,464 @@
+#! 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.
+
+#@ load("@ytt:data", "data")
+
+#@ load("functions.lib.yml",
+#@      "gci_label_value",
+#@      "image_family_name",
+#@ )
+
+#@ load("templates.lib.txt",
+#@      "remote_functions",
+#@      "instance_variables",
+#@      "google_variables",
+#@      "ctest_bash_task",
+#@      "clang_tidy_bash_task",
+#@      "clang_format_bash_task",
+#@      "rat_check_bash_task",
+#@      "packer_build_bash_task",
+#@      "instance_create_bash_task",
+#@      "instance_delete_bash_task",
+#@      "download_build_bash_task",
+#@      "build_bash_task",
+#@      "upload_source_bash_task",
+#@      "upload_geode_bash_task",
+#@      "extract_geode_bash_task",
+#@ )
+
+#@ load("@ytt:overlay", "overlay")
+#@ load("@ytt:struct", "struct")
+#@ load("@ytt:template", "template")
+#@ load("@ytt:struct", "struct")
+
+---
+#@ def resource_type(name, repository):
+name: #@ name
+type: docker-image
+source:
+  repository: #@ repository
+#@ end
+
+---
+#@ def resource(name, type, source=None, icon=None):
+#@ return {
+#@   "name": name,
+#@   "type": type,
+#@   "source": source,
+#@   "icon": icon
+#@ }
+#@ end
+
+---
+#@ def registry_image_resource(name, repository, tag="latest", username=None, password=None, mirror="mirror.gcr.io"):
+#@ return resource(name, "registry-image", {
+#@   "repository": repository,
+#@   "tag": tag,
+#@   "username": username,
+#@   "password": password,
+#@   "registry_mirror": {
+#@     "host": mirror
+#@   }
+#@ }, "docker")
+#@ end
+
+---
+#@ def gcr_image_resource(name, repository, tag="latest"):
+#@ return registry_image_resource(name, "gcr.io/" + repository, tag, "_json_key", "((concourse-gcp-key))", None)
+#@ end
+
+---
+#@ def docker_image_resource(name, repository, tag="latest", username=None, password=None):
+#@ return resource(name, "docker-image", {
+#@   "repository": repository,
+#@   "tag": tag,
+#@   "username": username,
+#@   "password": password,
+#@  }, "docker")
+#@ end
+
+---
+#@ def project_gcr_image_resource(name, repository, tag="latest"):
+#@ return docker_image_resource(name, "gcr.io/" + data.values.google.project + "/" + repository, tag, "_json_key", "((concourse-gcp-key))")
+#@ end
+
+---
+#@ def github_resource(name, owner, repository, branch, paths=[], ignore_paths=[], depth=1):
+#@ return resource(name, "git", {
+#@   "branch": branch,
+#@   "depth": depth,
+#@   "paths": paths,
+#@   "ignore_paths": ignore_paths,
+#@   "uri": "https://github.com/" + owner + "/" + repository + ".git"
+#@  }, "github")
+#@ end
+
+---
+#@ def gci_resource_name(family):
+#@ return family + "-gci"
+#@ end
+
+---
+#@ def gci_resource(family, project=data.values.google.project):
+#@ return resource(gci_resource_name(family), "gci-resource", {
+#@   "key": "((concourse-gcp-key))",
+#@   "family_project": project,
+#@   "family": family,
+#@  }, "google-cloud")
+#@ end
+
+---
+#@ def apache_directory_index_resource(name, directory, folder_pattern, file_pattern, expand=True):
+#@ return resource(name, "apache-directory-index-resource", {
+#@   "directory": directory,
+#@   "folder_pattern": folder_pattern,
+#@   "file_pattern": file_pattern,
+#@   "expand": expand
+#@  }, "file-multiple")
+#@ end
+
+---
+#@ def maven_resource(name, url, artifact, version=None):
+#@ return resource(name, "maven-resource", {
+#@   "url": url,
+#@   "artifact": artifact,
+#@   "version": version
+#@  }, "archive")
+#@ end
+
+---
+#@ def create_instance_task(build, config):
+#@ return bash_task(
+#@   "instance-create",
+#@   [{"name":gci_resource_name(image_family_name(build.image_family)), "path":"image"}],
+#@   [{"name":"instance"}],
+#@   instance_create_bash_task(gci_label_value(data.values.pipeline.name), config.name),
+#@   "gcloud-image")
+#@ end
+
+---
+#@ def build_task(config, params={}):
+#@ params = struct.decode(params)
+#@ params.update({"CMAKE_CONFIG": config})
+#@ return bash_task("build",
+#@   [{"name":"instance"},{"name":"version"},{"name":"source"}],
+#@   [{"name":"package"}],
+#@   build_bash_task(),
+#@   params=params)
+#@ end
+
+---
+#@ def remote_task(name, config, source, timeout, params={}):
+#@ params = struct.decode(params)
+#@ params.update({"CMAKE_CONFIG": config})
+#@ return bash_task(name,
+#@   [{"name":"instance"}],
+#@   [],
+#@   source,
+#@   params=params,
+#@   timeout=timeout)
+#@ end
+
+---
+#@ def download_build_task():
+#@ return bash_task("download-build", [{"name":"instance"}], [{"name":"build"}], download_build_bash_task())
+#@ end
+
+---
+#@ def build_job_name(build, config):
+#@ return "build-" + build.name + "-" + config.name
+#@ end
+
+---
+#@ def build_job(build, config):
+name: #@ build_job_name(build, config)
+public: true
+plan:
+  - in_parallel:
+      fail_fast: true
+      steps:
+        - get: version
+          trigger: true
+        - get: source
+          trigger: true
+        - get: task-image
+  - do:
+    - do:
+      - in_parallel:
+          fail_fast: true
+          steps:
+            - get: gcloud-image
+            - get: #@ gci_resource_name(image_family_name(build.image_family))
+      - in_parallel:
+          fail_fast: true
+          steps:
+            - #@ create_instance_task(build, config)
+            - get: geode-latest
+    - in_parallel:
+        fail_fast: true
+        steps:
+          - #@ bash_task("upload-source", [{"name":"instance"},{"name":"source"}], [], upload_source_bash_task())
+          - #@ bash_task("upload-geode", [{"name":"instance"},{"name":"geode-latest"}], [], upload_geode_bash_task())
+    - #@ build_task(config.config, build.params)
+    - #@ remote_task("cpp-unit-tests", config.config, ctest_bash_task("build/cppcache/test", parallel=8), "30m", build.params)
+    - #@ remote_task("cpp-integration-tests", config.config, ctest_bash_task("build/cppcache/integration/test", parallel=4), "1h", build.params)
+    - #@ remote_task("cpp-legacy-integration-tests", config.config, ctest_bash_task("build/cppcache/integration-test", timeout=500, parallel=4), "2h", build.params)
+    #@ if build.with_dot_net:
+    - #@ remote_task("net-unmanaged-unit-tests", config.config, ctest_bash_task("build/clicache/test", parallel=8), "10m", build.params)
+    - #@ remote_task("net-unit-tests", config.config, ctest_bash_task("build/clicache/test2", parallel=8), "30m", build.params)
+    - #@ remote_task("net-integration-tests", config.config, ctest_bash_task("build/clicache/integration-test2"), "1h", build.params)
+    - #@ remote_task("net-legacy-integration-tests", config.config, ctest_bash_task("build/clicache/integration-test", timeout=500, parallel=4), "2h", build.params)
+    #@ end
+    on_failure:
+      in_parallel:
+        steps:
+          - #@ download_build_task()
+    ensure:
+      in_parallel:
+        steps:
+          - #@ bash_task("instance-delete", [{"name":"instance"}], [], instance_delete_bash_task(), "gcloud-image")
+#@ end
+
+---
+#@ def packer_job_name(build):
+#@ return "packer-" + build.image_family
+#@ end
+
+---
+#@ def packer_job(build):
+name: #@ packer_job_name(build)
+plan:
+  - in_parallel:
+      fail_fast: true
+      steps:
+        - get: packer-image
+        - get: #@ gci_resource_name(build.source_image_family)
+          trigger: true
+        - get: packer-source
+          trigger: true
+  - #@ bash_task("packer-build", [{"name":"packer-source", "path":"source"}], [], packer_build_bash_task(build), "packer-image", attempts=5)
+#@ end
+
+---
+#@ def update_pipeline_job_name():
+#@ return "update-pipeline"
+#@ end
+
+---
+#@ def update_pipeline_job():
+name: #@ update_pipeline_job_name()
+public: true
+serial: true
+plan:
+  - in_parallel:
+      fail_fast: true
+      steps:
+        - get: ytt-image
+        - get: ci-source
+          trigger: true
+  - task: ytt
+    image: ytt-image
+    config:
+      platform: linux
+      inputs:
+        - name: ci-source
+          path: source
+      outputs:
+        - name: pipeline
+      params:
+      run:
+        path: /usr/bin/ytt
+        args:
+          - --file
+          - source/ci/lib
+          - --file
+          - source/ci/base
+          - --file
+          - #@ "source/ci/" + data.values.pipeline.variant
+          - --data-value
+          - #@ "pipeline.name=" + data.values.pipeline.name
+          - --data-value
+          - #@ "pipeline.variant=" + data.values.pipeline.variant
+          - --data-value
+          - #@ "github.owner=" + data.values.github.owner
+          - --data-value
+          - #@ "github.repository=" + data.values.github.repository
+          - --data-value
+          - #@ "repository.branch=" + data.values.repository.branch
+          - --data-value
+          - #@ "google.project=" + data.values.google.project
+          - --data-value
+          - #@ "google.zone=" + data.values.google.zone
+          - --data-value
+          - #@ "google.storage.bucket=" + data.values.google.storage.bucket
+          - --data-value
+          - #@ "google.storage.key=" + data.values.google.storage.key
+          - --output-files
+          - pipeline/
+  - set_pipeline: self
+    file: pipeline/pipeline.yml
+#@ end
+
+---
+#@ def docker_job_name(name):
+#@ return "docker-" + name
+#@ end
+
+---
+#@ def docker_job(name, source, path):
+name: #@ docker_job_name(name)
+plan:
+  - get: #@ source
+    trigger: true
+  - put: #@ name
+    params:
+      build: #@ source + "/" + path
+      cache: true
+#@ end
+
+---
+#@ def semver_resource(name, initialVersion="0.1.0-build.0"):
+#@ return resource(
+#@   name,
+#@   "semver",
+#@   {
+#@     "initial_version": initialVersion,
+#@     "driver": "gcs",
+#@     "bucket": data.values.google.storage.bucket,
+#@     "key": data.values.google.storage.key + "/" + name,
+#@     "json_key": "((concourse-gcp-key))"
+#@   },
+#@   "numeric-1-box-multiple")
+#@ end
+
+---
+#@ def version_source_job_name():
+#@   return "version-source"
+#@ end
+
+---
+#@ def version_source_job():
+name: #@ version_source_job_name()
+plan:
+  - in_parallel:
+      fail_fast: true
+      steps:
+        - get: version
+          params:
+            pre: build
+        - get: source
+          trigger: true
+  - put: version
+    params:
+      file: version/number
+#@ end
+
+---
+#@ def package_resource_name(build, config, package):
+#@   return "package-" + build.name + "-" + config.name + "-" + package.name
+#@ end
+
+---
+#@ def package_resource(build, config, package):
+#@ return resource(
+#@   package_resource_name(build, config, package),
+#@   "gcs-resource",
+#@   {
+#@     "bucket": data.values.google.storage.bucket,
+#@     "json_key": "((concourse-gcp-key))",
+#@     "regexp": data.values.google.storage.key + "/packages/" + build.name + "/" + config.name + "/" + package.regexp
+#@   },
+#@   "content-save")
+#@ end
+
+---
+#@ def put_package(build, config):
+in_parallel:
+  fail_fast: true
+  steps:
+    #@ for package in build.packages:
+    - put: #@ package_resource_name(build, config, package)
+      params:
+        file: #@ "package/" + package.glob
+    #@ end
+#@ end
+
+---
+#@ def build_resources(builds, configs):
+#@ for build in builds:
+  - #@ gci_resource(image_family_name(build.image_family))
+#@ end
+#@ end
+
+---
+#@ def build_jobs(builds, configs):
+#@ for build in builds:
+  #@ for/end config in configs:
+  - #@ build_job(build, config)
+#@ end
+#@ end
+
+---
+#@ def check_source_job_name():
+#@ return "check-source"
+#@ end
+
+---
+#@ def check_source_job():
+name: #@ check_source_job_name()
+public: true
+plan:
+  - in_parallel:
+      fail_fast: true
+      steps:
+        - get: clang-tools-image
+        - get: version
+          trigger: true
+        - get: source
+          trigger: true
+        - do:
+          - get: task-image
+          - get: geode-latest
+          - #@ bash_task("extract-geode", [{"name":"geode-latest"}], [{"name":"geode"}], extract_geode_bash_task(), caches=[{"path":"geode"}])
+  - in_parallel:
+      steps:
+        - #@ bash_task("clang-tidy", [{"name":"source"}, {"name":"geode"}], [{"name":"build"}], clang_tidy_bash_task(), "clang-tools-image")
+        - #@ bash_task("clang-format", [{"name":"source"}, {"name":"geode"}], [{"name":"build"}], clang_format_bash_task(), "clang-tools-image")
+        - #@ bash_task("rat-check", [{"name":"source"}, {"name":"geode"}], [{"name":"build"}], rat_check_bash_task(), "clang-tools-image")
+#@ end
+
+---
+#@ def bash_task(name, inputs, outputs, source, image="task-image", params={}, platform="linux", timeout=None, attempts=None, caches=None):
+task: #@ name
+#@ if timeout != None:
+timeout: #@ timeout
+#@ end
+#@ if attempts != None:
+attempts: #@ attempts
+#@ end
+image: #@ image
+config:
+  platform: #@ platform
+  inputs: #@ inputs
+  outputs: #@ outputs
+  caches: #@ caches
+  params:
+    _: #@ template.replace(params)
+  run:
+    path: bash
+    args:
+      - -c
+      - #@ source
+#@ end
diff --git a/ci/pr/data.yml b/ci/pr/data.yml
new file mode 100644
index 0000000..bfff207
--- /dev/null
+++ b/ci/pr/data.yml
@@ -0,0 +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.
+
+#@ load("@ytt:overlay", "overlay")
+
+#@data/values
+#@overlay/match-child-defaults missing_ok=True
+---
+pipeline:
+  variant: pr
+
+configs:
+  #@overlay/append
+  - name: debug
+    config: Debug
diff --git a/ci/pr/pipeline.yml b/ci/pr/pipeline.yml
new file mode 100644
index 0000000..b0e9b51
--- /dev/null
+++ b/ci/pr/pipeline.yml
@@ -0,0 +1,188 @@
+#! 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.
+
+#@ load("templates.lib.yml",
+#@      "bash_task",
+#@      "build_job_name",
+#@      "resource_type")
+#@ load("@ytt:data", "data")
+#@ load("@ytt:template", "template")
+#@ load("@ytt:overlay", "overlay")
+#@ load("templates.lib.txt",
+#@      "is_source_from_pr_testable_bash_task")
+
+---
+#@ def pr_status(context, status, description = None):
+try:
+  put: #@ "pr-status-" + status
+  resource: source
+  params:
+    path: source
+    status: #@ status
+    context: #@ context
+    description: #@ description
+  get_params:
+    skip_download: true
+  attempts: 5
+#@ end
+
+#@overlay/match by=overlay.all
+---
+resource_types:
+  #@overlay/append
+  - #@ resource_type("github-pr-resource", "teliaoss/github-pr-resource")
+
+resources:
+  #@overlay/match by="name"
+  #@overlay/replace
+  - name: source
+    type: github-pr-resource
+    check_every: 1m
+    icon: github
+    source:
+      repository: #@ data.values.github.owner + "/" + data.values.github.repository
+      access_token: ((github-pr-access-token))
+      base_branch: #@ data.values.repository.branch
+
+#@overlay/match-child-defaults missing_ok=True
+jobs:
+  #@ for build in data.values.builds:
+  #@ for config in data.values.configs:
+  #@ name = build_job_name(build, config)
+  #@overlay/match by="name"
+  - name: #@ name
+    plan:
+      #@overlay/match by=overlay.index(0)
+      - in_parallel:
+          steps:
+            - #@overlay/match by=overlay.subset({"get": "source"})
+              version: every
+              on_success: #@ pr_status(name, "pending")
+            - #@overlay/match by=overlay.subset({"get": "version"})
+              trigger: false
+      #@overlay/match by=overlay.index(0)
+      #@overlay/insert after=True
+      - _: #@ template.replace(bash_task("is-source-change", [{"name":"source"}], [], is_source_from_pr_testable_bash_task()))
+        on_failure:
+          do:
+          #@overlay/append
+          - #@ pr_status(name, "success", "Non-code changes are not compiled.")
+      - #@overlay/match by=overlay.index(2)
+        on_error:
+          in_parallel:
+            steps:
+              #@overlay/append
+              - #@ pr_status(name, "error")
+        on_abort:
+          in_parallel:
+            steps:
+              #@overlay/append
+              - #@ pr_status(name, "error", "Build canceled")
+        on_failure:
+          in_parallel:
+            steps:
+              #@overlay/append
+              - #@ pr_status(name, "failure")
+        on_success:
+          in_parallel:
+            steps:
+              #@overlay/append
+              - #@ pr_status(name, "success")
+
+  #@ end
+  #@ end
+  #@overlay/match by="name"
+  - name: check-source
+    plan:
+      #@overlay/match by=overlay.index(0)
+      - in_parallel:
+          steps:
+            - #@overlay/match by=overlay.subset({"get": "source"})
+              version: every
+              on_success:
+                in_parallel:
+                  steps:
+                    #@overlay/append
+                    - #@ pr_status("clang-format", "pending")
+                    - #@ pr_status("clang-tidy", "pending")
+                    - #@ pr_status("rat-check", "pending")
+            - #@overlay/match by=overlay.subset({"get": "version"})
+              trigger: false
+      #@overlay/match by=overlay.index(1)
+      - in_parallel:
+          steps:
+            - #@overlay/match by=overlay.subset({"task": "clang-tidy"})
+              on_error:
+                in_parallel:
+                  steps:
+                    #@overlay/append
+                    - #@ pr_status("clang-tidy", "error")
+              on_abort:
+                in_parallel:
+                  steps:
+                    #@overlay/appendxs
+                    - #@ pr_status("clang-tidy", "error", "Build canceled")
+              on_failure:
+                in_parallel:
+                  steps:
+                    #@overlay/append
+                    - #@ pr_status("clang-tidy", "failure")
+              on_success:
+                in_parallel:
+                  steps:
+                    #@overlay/append
+                    - #@ pr_status("clang-tidy", "success")
+            - #@overlay/match by=overlay.subset({"task": "clang-format"})
+              on_error:
+                in_parallel:
+                  steps:
+                    #@overlay/append
+                    - #@ pr_status("clang-format", "error")
+              on_abort:
+                in_parallel:
+                  steps:
+                    #@overlay/appendxs
+                    - #@ pr_status("clang-format", "error", "Build canceled")
+              on_failure:
+                in_parallel:
+                  steps:
+                    #@overlay/append
+                    - #@ pr_status("clang-format", "failure")
+              on_success:
+                in_parallel:
+                  steps:
+                    #@overlay/append
+                    - #@ pr_status("clang-format", "success")
+            - #@overlay/match by=overlay.subset({"task": "rat-check"})
+              on_error:
+                in_parallel:
+                  steps:
+                    #@overlay/append
+                    - #@ pr_status("rat-check", "error")
+              on_abort:
+                in_parallel:
+                  steps:
+                    #@overlay/appendxs
+                    - #@ pr_status("rat-check", "error", "Build canceled")
+              on_failure:
+                in_parallel:
+                  steps:
+                    #@overlay/append
+                    - #@ pr_status("rat-check", "failure")
+              on_success:
+                in_parallel:
+                  steps:
+                    #@overlay/append
+                    - #@ pr_status("rat-check", "success")
diff --git a/ci/release/data.yml b/ci/release/data.yml
new file mode 100644
index 0000000..201440b
--- /dev/null
+++ b/ci/release/data.yml
@@ -0,0 +1,31 @@
+#! 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.
+
+#@ load("@ytt:overlay", "overlay")
+
+#@data/values
+#@overlay/match-child-defaults missing_ok=True
+---
+pipeline:
+  variant: release
+
+configs:
+  #@overlay/append
+  - name: debug
+    config: Debug
+  #@overlay/append
+  - name: release
+    config: RelWithDebInfo
+
diff --git a/ci/release/pipeline.yml b/ci/release/pipeline.yml
new file mode 100644
index 0000000..5fecc83
--- /dev/null
+++ b/ci/release/pipeline.yml
@@ -0,0 +1,217 @@
+#! 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.
+
+#@ load("templates.lib.yml",
+#@      "github_resource",
+#@      "gci_resource",
+#@      "registry_image_resource",
+#@      "bash_task",
+#@      "build_job_name",
+#@      "packer_job",
+#@      "packer_job_name",
+#@      "docker_job",
+#@      "docker_job_name",
+#@      "package_resource",
+#@      "package_resource_name",
+#@      "put_package",
+#@      "version_source_job",
+#@      "version_source_job_name")
+#@ load("templates.lib.txt",
+#@       "extract_geode_bash_task")
+#@ load("@ytt:data", "data")
+#@ load("@ytt:overlay", "overlay")
+
+#@overlay/match by=overlay.all
+---
+resources:
+  #@overlay/append
+  - #@ registry_image_resource("packer-image", "hashicorp/packer")
+  #@overlay/append
+  - #@ github_resource("packer-source", data.values.github.owner, data.values.github.repository, data.values.repository.branch, ["packer/*"])
+
+  #@ for build in data.values.builds:
+  #@overlay/append
+  - #@ gci_resource(build.source_image_family)
+  #@ for config in data.values.configs:
+  #@ for package in build.packages:
+  #@overlay/append
+  - #@ package_resource(build, config , package)
+  #@ end
+  #@ end
+  #@ end
+  #@overlay/append
+  - name: github-pre-release
+    type: github-release
+    source:
+      owner: #@ data.values.github.owner
+      repository: #@ data.values.github.repository
+      access_token: ((github-pr-access-token))
+      release: false
+      pre_release: true
+    icon: github
+
+#@overlay/match-child-defaults missing_ok=True
+jobs:
+  #@overlay/append
+  - #@ version_source_job()
+  #@overlay/append
+  - #@ docker_job("task-image", "ci-source", "ci/docker/task")
+  #@overlay/append
+  - #@ docker_job("clang-tools-image", "ci-source", "ci/docker/clang-tools")
+
+  #@ for build in data.values.builds:
+  #@overlay/append
+  - #@ packer_job(build)
+  #@ for config in data.values.configs:
+  #@overlay/match by="name"
+  - name: #@ build_job_name(build, config)
+    plan:
+      #@overlay/match by=overlay.index(0)
+      - in_parallel:
+          steps:
+            - #@overlay/match by=overlay.subset({"get": "version"})
+              passed: [ version-source ]
+            - #@overlay/match by=overlay.subset({"get": "source"})
+              passed: [ version-source ]
+      #@overlay/append
+      - #@ put_package(build, config)
+  #@ end
+  #@ end
+  #@overlay/match by="name"
+  - name: check-source
+    plan:
+      #@overlay/match by=overlay.index(0)
+      - in_parallel:
+          steps:
+            - #@overlay/match by=overlay.subset({"get": "version"})
+              passed: [ version-source ]
+            - #@overlay/match by=overlay.subset({"get": "source"})
+              passed: [ version-source ]
+
+  #@overlay/append
+  - name: native-passed
+    plan:
+      - in_parallel:
+          fail_fast: true
+          steps:
+            - get: version
+              passed:
+                #@ for build in data.values.builds:
+                #@ for config in data.values.configs:
+                - #@ build_job_name(build, config)
+                #@ end
+                #@ end
+                - check-source
+              trigger: true
+            - get: source
+              passed:
+                #@ for build in data.values.builds:
+                #@ for config in data.values.configs:
+                - #@ build_job_name(build, config)
+                #@ end
+                #@ end
+                - check-source
+              trigger: true
+            #@ for build in data.values.builds:
+            #@ for config in data.values.configs:
+            #@ for package in build.packages:
+            - get: #@ package_resource_name(build, config, package)
+              passed:
+                - #@ build_job_name(build, config)
+              trigger: true
+            #@ end
+            #@ end
+            #@ end
+            - do:
+              - get: task-image
+              - get: geode-latest
+                passed:
+                - check-source
+              - #@ bash_task("extract-geode", [{"name":"geode-latest"}], [{"name":"geode"}], extract_geode_bash_task(), caches=[{"path":"geode"}])
+
+  #@overlay/append
+  - name: github-pre-release
+    plan:
+      - in_parallel:
+          fail_fast: true
+          steps:
+            - get: version
+              passed:
+                - native-passed
+              trigger: true
+            - get: source
+              passed:
+                - native-passed
+              trigger: true
+            #@ for build in data.values.builds:
+            #@ for config in data.values.configs:
+            #@ for package in build.packages:
+            - get: #@ package_resource_name(build, config, package)
+              passed:
+                - native-passed
+              trigger: true
+            #@ end
+            #@ end
+            #@ end
+      - put: github-pre-release
+        params:
+          commitish: source/.git/ref
+          name: version/version
+          tag: version/version
+          tag_prefix: pre-release/v
+          globs:
+            - "package-*-release-*/apache-geode-native-*"
+
+  #@overlay/append
+  - name: bump-minor-version
+    plan:
+      - put: version
+        params:
+          bump: minor
+          pre: #@ data.values.pipeline.pre
+
+#@overlay/match-child-defaults missing_ok=True
+groups:
+  #@overlay/match by="name"
+  - name: images
+    jobs:
+      #@ for/end build in data.values.builds:
+      - #@ packer_job_name(build)
+      - #@ docker_job_name("task-image")
+      - #@ docker_job_name("clang-tools-image")
+  #@overlay/match by="name"
+  - name: all
+    jobs:
+      #@ for build in data.values.builds:
+      #@overlay/append
+      - #@ packer_job_name(build)
+      #@ end
+      #@overlay/append
+      - #@ docker_job_name("task-image")
+      #@overlay/append
+      - #@ docker_job_name("clang-tools-image")
+      #@overlay/append
+      - #@ version_source_job_name()
+      #@overlay/append
+      - bump-minor-version
+      #@overlay/append
+      - github-pre-release
+      #@overlay/append
+      - native-passed
+  #@overlay/match by="name"
+  - name: version
+    jobs:
+      - #@ version_source_job_name()
+      - bump-minor-version
diff --git a/ci/set-pipeline.sh b/ci/set-pipeline.sh
new file mode 100755
index 0000000..76a62be
--- /dev/null
+++ b/ci/set-pipeline.sh
@@ -0,0 +1,135 @@
+#!/usr/bin/env bash
+# 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.
+
+set -euo pipefail
+
+function printHelp() {
+  cat << EOF
+$0 Usage:
+Sets Concourse pipelines for Geode Native builds.
+
+Options:
+Parameter                Description                         Default
+--target                 Fly target.                         "default"
+--branch                 Branch to build.                    Current checked out branch.
+--version                Version of Geode.                   1.14.0
+--pre                    Version pre release tag.            "" | Empty
+--pipeline               Name of pipeline to set.            Based on repository owner name and branch.
+--github-owner           GitHub owner for repository.        Current tracking branch repository owner.
+--github-repository      GitHub repository name.             Current tracking branch repository name.
+--google-project         Google Compute project.             Current default project.
+--google-zone            Google Compute zone.                Concourse worker's zone.
+--google-storage-bucket  Google Compute Storage bucket.      Based on google-project value.
+--google-storage-key     Google Compute Storage key prefix.  Based on pipeline value.
+--fly                    Path to fly executable.             "fly"
+--ytt                    Path to ytt executable.             "ytt"
+--variants               Pipeline variants of publish.       Both release and pr.
+--output                 Rendered pipeline files directory.  Temporary directory.
+
+Example:
+\$ $0 --target=my-target --google-zone=my-zone
+
+Environment Variables:
+All options can be specified via environment variables where hyphens (-) are replaced with underscore (_).
+
+Example:
+\$ target=my-target google_zone=my-zone $0
+
+EOF
+}
+
+while [ $# -gt 0 ]; do
+  if [[ $1 == "--help" ]]; then
+    printHelp;
+    exit 0;
+  elif [[ $1 == *"--"*"="* ]]; then
+    param="${1%%=*}"
+    param="${param#--}"
+    declare ${param//[^[:word:]]/_}="${1#--*=}"
+  elif [[ $1 == *"--"* ]]; then
+    param="${1/--/}"
+    declare ${param//[^[:word:]]/_}="${2}"
+    shift
+  fi
+  shift
+done
+
+ytt=${ytt:-ytt}
+fly=${fly:-fly}
+yq=${yq:-yq}
+
+target=${target:-default}
+output=${output:-$(mktemp -d)}
+
+branch=${branch:-$(git rev-parse --abbrev-ref HEAD)}
+git_tracking_branch=${git_tracking_branch:-$(git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD))}
+git_remote=${git_remote:-$(echo ${git_tracking_branch} | cut -d/ -f1)}
+git_repository_url=${git_repository_url:-$(git remote get-url ${git_remote})}
+
+if [[ ${git_repository_url} =~ ^((https|git)(:\/\/|@)github\.com[\/:])([^\/:]+)\/(.+)[\.git]?$ ]]; then
+  github_owner=${github_owner:-${BASH_REMATCH[4]}}
+  github_repository=${github_repository:-${BASH_REMATCH[5]}}
+fi
+
+pipeline=${pipeline:-${github_owner}-${branch}}
+pipeline=${pipeline//[^[:word:]-]/-}
+
+if (which ${yq} >/dev/null); then
+  version=${version:-$(bash -c "${yq} \"\$@\"" yq -N e '.pipeline.version | select(.) ' - < base/base.yml)}
+  pre=${pre:-$(bash -c "${yq} \"\$@\"" yq -N e '.pipeline.pre | select(.) ' - < base/base.yml)}
+fi
+
+pre=${pre:-"build"}
+if [ "${pre}" == "none" ]; then
+  pre=""
+fi
+
+google_project=${google_project:-$(gcloud config get-value project)}
+google_zone=${google_zone:-'$(curl "http://metadata.google.internal/computeMetadata/v1/instance/zone" -H "Metadata-Flavor: Google" -s | cut -d / -f 4)'}
+google_storage_bucket=${google_storage_bucket:-${google_project}-concourse}
+google_storage_key=${google_storage_key:-geode-native/${pipeline}}
+
+variants=${variants:-"release pr"}
+variants_release=${variant_release:-""}
+
+for variant in ${variants}; do
+  eval pipeline_suffix=\${variants_${variant}-"-${variant}"}
+
+  bash -c "${ytt} \"\$@\"" ytt \
+    --file lib \
+    --file base \
+    --file ${variant} \
+    --data-value "pipeline.name=${pipeline}" \
+    --data-value "pipeline.version=${version}" \
+    --data-value "pipeline.pre=${pre}" \
+    --data-value "pipeline.variant=${variant}" \
+    --data-value "repository.branch=${branch}" \
+    --data-value "github.owner=${github_owner}" \
+    --data-value "github.repository=${github_repository}" \
+    --data-value "google.project=${google_project}" \
+    --data-value "google.zone=${google_zone}" \
+    --data-value "google.storage.bucket=${google_storage_bucket}" \
+    --data-value "google.storage.key=${google_storage_key}" \
+    > "${output}/${variant}.yml"
+
+
+  bash -c "${fly} \"\$@\"" fly --target=${target} \
+    set-pipeline \
+      "--pipeline=${pipeline}${pipeline_suffix}" \
+      "--config=${output}/${variant}.yml"
+
+done
+
diff --git a/clicache/CMakeLists.txt b/clicache/CMakeLists.txt
index 9df76a7..d2217a4 100644
--- a/clicache/CMakeLists.txt
+++ b/clicache/CMakeLists.txt
@@ -13,15 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.10)
-
-project(clicache_src)
-
-find_program(NUGET nuget)
-add_custom_target(nuget-restore 
-  COMMAND ${NUGET} restore ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.sln
-)
-
 add_subdirectory(src)
 add_subdirectory(test)
 add_subdirectory(test2)
diff --git a/clicache/acceptance-test/CMakeLists.txt b/clicache/acceptance-test/CMakeLists.txt
index b73bcb2..369684d 100644
--- a/clicache/acceptance-test/CMakeLists.txt
+++ b/clicache/acceptance-test/CMakeLists.txt
@@ -49,27 +49,17 @@
 )
 
 set_target_properties( ${PROJECT_NAME} PROPERTIES
-  COMMON_LANGUAGE_RUNTIME ""
   VS_GLOBAL_ROOTNAMESPACE ${PROJECT_NAME}
   VS_GLOBAL_TreatWarningsAsErrors True
   VS_GLOBAL_TestProjectType UnitTest
   VS_GLOBAL_PROJECT_TYPES "{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
   VS_DOTNET_REFERENCES "System;System.Xml;System.Web;System.Configuration"
-  VS_DOTNET_REFERENCE_Microsoft.VisualStudio.TestPlatform.TestFramework "${CMAKE_BINARY_DIR}/clicache/packages/Microsoft.VisualStudio.TestPlatform.14.0.0.1/lib/net20/Microsoft.VisualStudio.TestPlatform.TestFramework.dll"
-  VS_DOTNET_REFERENCE_Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions "${CMAKE_BINARY_DIR}/clicache/packages/Microsoft.VisualStudio.TestPlatform.14.0.0.1/lib/net20/Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll"
-  VS_DOTNET_REFERENCE_xunit.core "${CMAKE_BINARY_DIR}/clicache/packages/xunit.extensibility.core.2.4.0/lib/netstandard1.1/xunit.core.dll"
-  VS_DOTNET_REFERENCE_xunit.assert "${CMAKE_BINARY_DIR}/clicache/packages/xunit.assert.2.4.0/lib/netstandard1.1/xunit.assert.dll"
-  VS_DOTNET_REFERENCE_xunit.abstractions "${CMAKE_BINARY_DIR}/clicache/packages/xunit.abstractions.2.0.2/lib/net35/xunit.abstractions.dll"
-  VS_DOTNET_REFERENCE_xunit.execution.desktop "${CMAKE_BINARY_DIR}/clicache/packages/xunit.extensibility.execution.2.4.0/lib/net452/xunit.execution.desktop.dll"
-  VS_DOTNET_REFERENCE_xunit.runner.visualstudio.testadapter "${CMAKE_BINARY_DIR}/clicache/packages/xunit.runner.visualstudio.2.4.0/build/_common/xunit.runner.visualstudio.testadapter.dll"
+  VS_DOTNET_REFERENCE_xunit.core "${CMAKE_BINARY_DIR}/packages/xunit.extensibility.core.2.4.0/lib/netstandard1.1/xunit.core.dll"
+  VS_DOTNET_REFERENCE_xunit.assert "${CMAKE_BINARY_DIR}/packages/xunit.assert.2.4.0/lib/netstandard1.1/xunit.assert.dll"
+  VS_DOTNET_REFERENCE_xunit.abstractions "${CMAKE_BINARY_DIR}/packages/xunit.abstractions.2.0.2/lib/net35/xunit.abstractions.dll"
+  VS_DOTNET_REFERENCE_xunit.execution.desktop "${CMAKE_BINARY_DIR}/packages/xunit.extensibility.execution.2.4.0/lib/net452/xunit.execution.desktop.dll"
+  VS_DOTNET_REFERENCE_xunit.runner.visualstudio.testadapter "${CMAKE_BINARY_DIR}/packages/xunit.runner.visualstudio.2.4.0/build/_common/xunit.runner.visualstudio.testadapter.dll"
   FOLDER cli/test/acceptance
 )
 
-if(NOT "${STRONG_NAME_KEY}" STREQUAL "")
-  set_target_properties( ${PROJECT_NAME} PROPERTIES
-    VS_GLOBAL_SignAssembly "true"
-    VS_GLOBAL_AssemblyOriginatorKeyFile ${STRONG_NAME_KEY}
-  )
-endif()
-
 add_dependencies(${PROJECT_NAME} nuget-restore)
diff --git a/clicache/acceptance-test/cache.xml b/clicache/acceptance-test/cache.xml
index 9840108..c205f3d 100644
--- a/clicache/acceptance-test/cache.xml
+++ b/clicache/acceptance-test/cache.xml
@@ -19,7 +19,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0">
 
   <pool name="default">
diff --git a/clicache/acceptance-test/packages.config b/clicache/acceptance-test/packages.config
index e7d725b..fb25d57 100644
--- a/clicache/acceptance-test/packages.config
+++ b/clicache/acceptance-test/packages.config
@@ -16,7 +16,6 @@
   limitations under the License.
 -->
 <packages>
-  <package id="Microsoft.VisualStudio.TestPlatform" version="14.0.0.1" targetFramework="net452" />
   <package id="xunit" version="2.4.0" targetFramework="net452" />
   <package id="xunit.abstractions" version="2.0.2" targetFramework="net35" />
   <package id="xunit.analyzers" version="0.10.0" targetFramework="net452" />
diff --git a/clicache/integration-test/AckMixTests.cs b/clicache/integration-test/AckMixTests.cs
deleted file mode 100644
index 8cf394d..0000000
--- a/clicache/integration-test/AckMixTests.cs
+++ /dev/null
@@ -1,264 +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.
- */
-
-using System;
-using System.Threading;
-
-namespace Apache.Geode.Client.UnitTests
-{
-  using NUnit.Framework;
-  using Apache.Geode.DUnitFramework;
-
-  [TestFixture]
-  [Category("unicast_only")]
-  public class AckMixTests : UnitTests
-  {
-    private TallyListener m_listener = new TallyListener();
-    private AckMixRegionWrapper m_regionw;
-    private const string RegionName = "ConfusedScope";
-
-    private UnitProcess m_client1, m_client2;
-
-    protected override ClientBase[] GetClients()
-    {
-      m_client1 = new UnitProcess();
-      m_client2 = new UnitProcess();
-      return new ClientBase[] { m_client1, m_client2 };
-    }
-
-    #region Private functions
-
-    private void Init()
-    {
-      Properties dsysConfig = new Properties();
-      dsysConfig.Insert("ack-wait-threshold", "5");
-      CacheHelper.InitConfig(dsysConfig);
-    }
-
-    #endregion
-
-    #region Functions called by the tests
-
-    public void CreateRegionNOIL(int clientNum, bool ack)
-    {
-      Init();
-      string ackStr;
-      if (ack)
-      {
-        ackStr = "with-ack";
-      }
-      else
-      {
-        ackStr = "no-ack";
-      }
-      Util.Log("Creating region in client {0}, " + ackStr +
-        ", no-mirror, cache, no-interestlist, with-listener", clientNum);
-      CacheHelper.CreateILRegion(RegionName, ack, true, m_listener);
-      m_regionw = new AckMixRegionWrapper(RegionName);
-    }
-
-    //Verify no events received by the process
-    public void VerifyNoEvents()
-    {
-      Util.Log("Verifying TallyListener has received nothing.");
-      Assert.AreEqual(0, m_listener.Creates, "Should be no creates");
-      Assert.AreEqual(0, m_listener.Updates, "Should be no updates");
-      Assert.IsNull(m_listener.LastKey, "Should be no key");
-      Assert.IsNull(m_listener.LastValue, "Should be no value");
-    }
-
-    public void SendCreate()
-    {
-      Util.Log("put(1,1) from Client 1 noack");
-      m_regionw.Put(1, 1);
-      m_listener.ShowTallies();
-    }
-
-    //Test cache didn't stored update
-    public void TestCreateFromAck()
-    {
-      Util.Log("test(1, -1) in Client 2 ack");
-      m_regionw.Test(1, -1);
-
-      // now define something of our own to test create going the other way.
-      Util.Log("put(2,2) from Client 2");
-      m_regionw.Put(2, 2);
-      Assert.AreEqual(1, m_listener.Creates, "Should be 1 create.");
-      // send update from ACK to NOACK
-      Util.Log("put(1,3) from Client 2");
-
-      Thread.Sleep(10000); // see if we can drop the incoming create before we define the key.
-      m_regionw.Test(1, -1);
-
-      m_regionw.Put(1, 3);
-      Assert.AreEqual(2, m_listener.Creates, "Should be 2 creates.");
-      m_listener.ShowTallies();
-    }
-
-    public void TestCreateFromNoAck()
-    {
-      Util.Log("test( 2, -1 ) in Client 1");
-      m_regionw.Test(2, -1);
-      Util.Log("test( 1, 3 ) in Client 1");
-      m_regionw.Test(1, 3);
-
-      // Now Updates from Client 1 to Client 2.
-      Util.Log("put( 1, 5) from Client 1");
-      m_regionw.Put(1, 5);
-      m_listener.ShowTallies();
-    }
-
-    public void TestUpdateFromAck()
-    {
-      Util.Log("test( 1, 5 ) in Client 2");
-      m_regionw.Test(1, 5, true);
-    }
-
-    public void TestEventCount(int clientNum)
-    {
-      Util.Log("check Client {0} event count.", clientNum);
-      m_listener.ShowTallies();
-      Assert.AreEqual(2, m_listener.ExpectCreates(2), "Should have been 2 creates.");
-      Assert.AreEqual(1, m_listener.ExpectUpdates(1), "Should have been 1 update.");
-    }
-
-    public void TestTimeoutSetup()
-    {
-      Util.Log("creating after timeout key to verify.");
-      m_regionw.Put(40000, 1);
-      m_regionw.SetupTimeout(m_listener);
-    }
-
-    public void TestPutTimeout(int newVal)
-    {
-      Util.Log("checking that timeout works.");
-      try
-      {
-        m_listener.IgnoreTimeout = true;
-        m_regionw.RequestTimeout();
-        Assert.Fail("Should have thrown TimeoutException.");
-      }
-      catch (TimeoutException)
-      {
-        // good.. expected this... now sleep a bit and move on.
-        Util.Log("Expected: Received TimeoutException ( good news. )");
-        m_listener.IgnoreTimeout = false;
-        Thread.Sleep(10000); // other process should be clear by now.
-        m_regionw.Put(40000, newVal); // Make sure we succeed with this next put.
-        Util.Log("Sent update to key 40000.");
-      }
-      catch (Exception ex)
-      {
-        Util.Log(ex.ToString());
-        Assert.Fail(ex.Message);
-      }
-    }
-
-    public void TestAfterPutTimeout(int newVal)
-    {
-      Util.Log("verifing values made it through from TestTimeout.");
-      m_regionw.CheckTimeout();
-      m_regionw.Test(40000, newVal);
-    }
-
-    #endregion
-
-    [Test]
-    public void AckMix()
-    {
-      m_client1.Call(CreateRegionNOIL, 1, false);
-      m_client2.Call(CreateRegionNOIL, 2, true);
-
-      m_client1.Call(VerifyNoEvents);
-      m_client2.Call(VerifyNoEvents);
-
-      m_client1.Call(SendCreate);
-      m_client2.Call(TestCreateFromAck);
-
-      m_client1.Call(TestCreateFromNoAck);
-      m_client2.Call(TestUpdateFromAck);
-
-      m_client1.Call(TestEventCount, 1);
-      m_client2.Call(TestEventCount, 2);
-
-      m_client1.Call(TestTimeoutSetup);
-      m_client2.Call(TestPutTimeout, 4000);
-
-      m_client1.Call(TestAfterPutTimeout, 4000);
-      m_client2.Call(TestPutTimeout, 5000);
-
-      m_client1.Call(TestAfterPutTimeout, 5000);
-    }
-  }
-
-  class AckMixRegionWrapper : RegionWrapper
-  {
-    private bool m_timeoutUpdate;
-
-    private static CacheableString timeoutKey =
-      new CacheableString("timeout");
-
-    public AckMixRegionWrapper(string name)
-      : base(name)
-    {
-      m_timeoutUpdate = false;
-    }
-
-    public void RequestTimeout()
-    {
-      string timeoutValue = "timeout";
-      if (m_timeoutUpdate)
-      {
-        timeoutValue = "timeoutUpdate";
-      }
-      DateTime start = DateTime.Now;
-      TimeSpan span;
-      try
-      {
-        m_region.Put(timeoutKey, timeoutValue);
-        span = DateTime.Now - start;
-        Util.Log("put took {0} millis value({1})", span.TotalMilliseconds, timeoutValue);
-      }
-      catch
-      {
-        span = DateTime.Now - start;
-        Util.Log("put took {0} millis value({1})", span.TotalMilliseconds, timeoutValue);
-        m_timeoutUpdate = true;
-        throw;
-      }
-    }
-
-    public void CheckTimeout()
-    {
-      string timeoutValue = "timeout";
-      if (m_timeoutUpdate)
-      {
-        timeoutValue = "timeoutUpdate";
-      }
-      CacheableString val = m_region.Get(timeoutKey) as CacheableString;
-      Assert.AreEqual(timeoutValue, val.ToString());
-      m_timeoutUpdate = true;
-    }
-
-    public void SetupTimeout(TallyListener listener)
-    {
-      listener.IgnoreTimeout = true;
-      m_region.Put(timeoutKey, timeoutKey);
-      listener.IgnoreTimeout = false;
-    }
-  }
-}
diff --git a/clicache/integration-test/BuiltinCacheableWrappersN.cs b/clicache/integration-test/BuiltinCacheableWrappersN.cs
index efc86b8..7f0ee18 100644
--- a/clicache/integration-test/BuiltinCacheableWrappersN.cs
+++ b/clicache/integration-test/BuiltinCacheableWrappersN.cs
@@ -112,6 +112,8 @@
       return ~crc32;
     }
 
+#pragma warning disable 618
+
     public static bool IsContainerTypeId(uint typeId)
     {
       return (typeId == GeodeClassIds.CacheableObjectArray) ||
diff --git a/clicache/integration-test/CMakeLists.txt b/clicache/integration-test/CMakeLists.txt
index d94d2e7..bc9c30e 100644
--- a/clicache/integration-test/CMakeLists.txt
+++ b/clicache/integration-test/CMakeLists.txt
@@ -13,108 +13,103 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-project(nativeclient.tests.clicache)
+project(Apache.Geode.Client.UnitTests CSharp )
 
-set (NUNIT "C:\\Program Files (x86)\\NUnit 2.6.4")
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/packages.config ${CMAKE_CURRENT_BINARY_DIR}/packages.config COPYONLY)
 
-if (64 EQUAL ${BUILD_BITS})
-  set (NUNIT_CONSOLE "nunit-console")
-else()
-  set (NUNIT_CONSOLE "nunit-console-x86")
-endif()
+file(GLOB_RECURSE SOURCE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cs")
+file(GLOB_RECURSE XML_SOURCE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.xml")
+set(RESOURCES
+  ${XML_SOURCE}
+  geode.properties.mixed
+  geode.properties.nativeclient
+  system.properties
+)
+
+add_library(Apache.Geode.Client.UnitTests SHARED
+  NUnitTestAddTests.ps1
+  packages.config
+  test.runsettings.in
+  ${SOURCE}
+  ${RESOURCES}
+)
+
+source_group("Source Files" FILES "${SOURCE}")
+source_group("Resource Files" FILES ${RESOURCES})
+
+set_source_files_properties(
+  ${RESOURCES}
+  PROPERTIES
+    VS_COPY_TO_OUT_DIR PreserveNewest
+    VS_TOOL_OVERRIDE None
+)
+
+target_link_libraries(Apache.Geode.Client.UnitTests
+  PUBLIC
+    Apache.Geode
+    DUnitFramework
+    NewTestObject
+    PdxClassLibrary
+    PdxVersion1Lib
+    PdxVersion2Lib
+    QueryWrapper
+    SecurityUtil
+)
+
+set_target_properties(Apache.Geode.Client.UnitTests PROPERTIES
+  VS_GLOBAL_ROOTNAMESPACE "Apache.Geode.Client.UnitTests"
+  VS_GLOBAL_TreatWarningsAsErrors False
+  VS_GLOBAL_IsTestProject True
+  VS_GLOBAL_TestProjectType UnitTest
+  VS_GLOBAL_RunSettingsFilePath "\$(MSBuildProjectDirectory)\\test.runsettings"
+  VS_GLOBAL_PROJECT_TYPES "{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+  VS_DOTNET_REFERENCES "System;System.Xml;System.Web;System.Configuration;System.Management"
+  VS_DOTNET_REFERENCE_NUnit "${CMAKE_BINARY_DIR}/packages/NUnit.2.6.4/lib/nunit.framework.dll"
+  FOLDER cli/test/integration
+)
+
+add_dependencies(Apache.Geode.Client.UnitTests FwkClient SqLiteImpl)
+add_dependencies(Apache.Geode.Client.UnitTests nuget-restore)
 
 
-foreach(var CMAKE_CURRENT_SOURCE_DIR CMAKE_SOURCE_DIR CMAKE_BINARY_DIR CMAKE_CURRENT_BINARY_DIR)
-  file(TO_NATIVE_PATH ${${var}} ${var}_NATIVE)
-endforeach()
-
-file(GLOB_RECURSE CSPROJECTS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.csproj.in")
-if(EXISTS "${STRONG_NAME_KEY}")
-  set(STRONG_NAME_KEY_ENABLED true)
-endif()
-
-foreach(FILE ${CSPROJECTS})
-  # TODO: make this a one line MATCH statement
-  string(REGEX REPLACE "\\.csproj.in" "" PROJDIR ${FILE})
-  string(REGEX REPLACE ".*/" "" PROJNAME ${PROJDIR})
-  configure_file(${FILE} ${CMAKE_CURRENT_BINARY_DIR}/${PROJNAME}.csproj)
-  include_external_msproject(
-      ${PROJNAME}  ${CMAKE_CURRENT_BINARY_DIR}/${PROJNAME}.csproj
-      TYPE FAE04EC0-301F-11D3-BF4B-00C04F79EFBC)
-  set_target_properties(${PROJNAME} PROPERTIES FOLDER cli/test/integration)
-
-endforeach()
+configure_file(test.runsettings.in test.runsettings.gen)
+file(GENERATE OUTPUT test.runsettings INPUT ${CMAKE_CURRENT_BINARY_DIR}/test.runsettings.gen)
 
 enable_testing()
 
-# Function to resolve both config and generate stage variables.
-macro(generate_config INPUT TEMP OUTPUT)
-    configure_file(${INPUT} ${TEMP})
-    file(GENERATE OUTPUT ${OUTPUT}
-      INPUT ${TEMP}
-      CONDITION 1
-    )
-endmacro()
+set(ctest_file_base "${CMAKE_CURRENT_BINARY_DIR}/NUnit")
+set(ctest_include_file "${ctest_file_base}_include.cmake")
+set(ctest_tests_file "${ctest_file_base}_tests.cmake")
 
-foreach( lib SQLite::sqlite3 )
-  get_target_property(runtime_path ${lib} INTERFACE_RUNTIME_DIR)
-  set(PATH ${PATH} ${runtime_path})
-endforeach()
-
-file(GLOB SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cs")
-
-foreach(FILE ${SOURCES})
-  # Find all non-deprecated tests
-  file(STRINGS ${FILE} HasTests REGEX "\\[Test\\]")
-
-  LIST(LENGTH HasTests length)
-  if (${length} GREATER 0)
-    # Get the namespace
-    file(STRINGS ${FILE} NameSpaceLine REGEX "namespace Apache.Geode.Client.UnitTests")
-    string(REGEX REPLACE "namespace.*Apache" "Apache" NAMESPACE ${NameSpaceLine})
-
-    string(REGEX REPLACE "\\.cs" "" TEST ${FILE})
-    set(TESTS ${TESTS} ${TEST})
-    set(TEST_DIR ${CMAKE_CURRENT_BINARY_DIR}/.tests/${TEST})
-
-    # Get the test class (NewAPI tests have N in the file name but not test class name)
-    string(REGEX REPLACE "N$" "" TESTCLASS ${TEST})
-
-    set(TEST_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/${TEST}.bat)
-    generate_config(${CMAKE_CURRENT_SOURCE_DIR}/test.bat.in ${CMAKE_CURRENT_BINARY_DIR}/.${TEST}.bat.in ${TEST_SCRIPT})
-
-    add_test(NAME ${TEST} COMMAND ${TEST_SCRIPT})
-    set_tests_properties(${TEST} PROPERTIES LABELS STABLE)
-
-    file(STRINGS ${FILE} IsDeprecated REGEX "\\[Category.*deprecated.*\\]")
-    if (IsDeprecated)
-      set_tests_properties(${TEST} PROPERTIES DISABLED TRUE)
-	  endif()
-  endif()
-endforeach()
-
-# Label any flaky tests here
-set_tests_properties(ThinClientCqStatusTestTwoServers
-    ThinClientPoolTestsN
-    ThinClientQueryTestsN
-  PROPERTIES
-    DISABLED TRUE
-    LABELS FLAKY
+add_custom_command(
+  TARGET Apache.Geode.Client.UnitTests POST_BUILD
+  BYPRODUCTS "${ctest_tests_file}"
+  COMMAND pwsh -File 
+          "$<SHELL_PATH:${CMAKE_CURRENT_SOURCE_DIR}/NUnitTestAddTests.ps1>"
+          -AssemblyPath "$<SHELL_PATH:$<TARGET_FILE:Apache.Geode.Client.UnitTests>>"
+          -NUnitConsolePath "$<SHELL_PATH:${CMAKE_BINARY_DIR}/packages/NUnit.Runners.2.6.4/tools/nunit-console.exe>"
+          -WorkingDirectory "$<TARGET_FILE_DIR:Apache.Geode.Client.UnitTests>"
+          -CTestFile "$<SHELL_PATH:${ctest_tests_file}>"
+          -SourcePath "$<SHELL_PATH:${CMAKE_CURRENT_SOURCE_DIR}>"
+          -ServerLogLevel "config"
+          -ServerSecurityLogLevel "config"
+          -ServerClasspath "$<SHELL_PATH:${CMAKE_BINARY_DIR}/tests/javaobject/javaobject.jar>"
+          -GeodePath "$<SHELL_PATH:${Geode_PATH}>"
+          -JavaPath "$<SHELL_PATH:${Java_JAVA_EXECUTABLE}>"
+          -EnvPath "$<SHELL_PATH:${CMAKE_BINARY_DIR}/packages/NUnit.Runners.2.6.4/tools>"
+  WORKING_DIRECTORY "$<TARGET_FILE_DIR:Apache.Geode.Client.UnitTests>"
 )
 
-# Label any tests that always fail here
-set_tests_properties(OverflowTestsN
-    ThinClientDeltaTestFailing
-    ThinClientDurableTestsN
-    ThinClientHARegionTestsN
-    ThinClientSecurityAuthTestsMUN
-    ThinClientSecurityAuthTestsN
-    RegionFailingTests
-    ThinClientSecurityAuthzTestsMUN
-    ThinClientSecurityAuthzTestsN
-  PROPERTIES
-    DISABLED TRUE
-    LABELS OMITTED
+file(WRITE "${ctest_include_file}"
+  "if(EXISTS \"${ctest_tests_file}\")\n"
+  "  include(\"${ctest_tests_file}\")\n"
+  "else()\n"
+  "  add_test(${TARGET}_NOT_BUILT ${TARGET}_NOT_BUILT)\n"
+  "endif()\n"
+)
+
+set_property(DIRECTORY
+  APPEND PROPERTY TEST_INCLUDE_FILES "${ctest_include_file}"
 )
 
 add_custom_target(run-stable-clicache-integration-tests
diff --git a/clicache/integration-test/CacheHelperN.cs b/clicache/integration-test/CacheHelperN.cs
index cdcd52e..a7e5a05 100644
--- a/clicache/integration-test/CacheHelperN.cs
+++ b/clicache/integration-test/CacheHelperN.cs
@@ -31,6 +31,7 @@
   using Apache.Geode.DUnitFramework;
   using Apache.Geode.Client;
   using System.Management;
+  using System.Threading;
 
   public class PropsStringToObject
   {
@@ -310,20 +311,12 @@
     private static bool m_localServer = true;
     private static string m_extraPropertiesFile = null;
 
-    private const string DefaultDSName = "dstest";
-    private const string DefaultCacheName = "cachetest";
-
-    private const string JavaServerName = "gfsh.bat";
-    private const string GeodeName = "gfsh.bat";
-    private static int JavaMcastPort = -1;
-    private const string JavaServerStartArgs =
-      "start server --J=-Xmx512m --J=-Xms128m --J=-XX:+UseConcMarkSweepGC --J=-XX:+UseParNewGC --J=-Xss256k --cache-xml-file=";
+    private static string gfsh = null;
+    private const string JavaServerStartArgs = "start server --max-heap=512m --cache-xml-file=";
     private const string JavaServerStopArgs = "stop server";
-    private const string LocatorStartArgs = "start locator";
+    private const string LocatorStartArgs = "start locator --max-heap=512m";
     private const string LocatorStopArgs = "stop locator";
-    private const int LocatorPort = 34755;
-    private const int MaxWaitMillis = 60000;
-    private static char PathSep = Path.DirectorySeparatorChar;
+    private const int MaxWaitMillis = 60000*5;
 
     private static string m_testDir = null;
     private static Dictionary<int, string> m_runningJavaServers =
@@ -331,6 +324,8 @@
     private static Dictionary<int, string> m_runningLocators =
       new Dictionary<int, string>();
     private static CacheTransactionManager m_cstxManager = null;
+
+    private static readonly string tempDirectoryRoot = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName());
     #endregion
 
     #region Public accessors
@@ -468,7 +463,7 @@
 
     public static void ConnectConfig(string dsName, Properties<string, string> config)
     {
-        DSConnect(dsName, config);
+      DSConnect(dsName, config);
     }
 
     public static void Init()
@@ -476,12 +471,12 @@
       InitConfig(null, null);
     }
 
-		public static void InitConfig(Properties<string, string> config, IAuthInitialize authInitialize)
-		{
-			InitConfig(config, null, authInitialize);
-		}
+    public static void InitConfig(Properties<string, string> config, IAuthInitialize authInitialize)
+    {
+      InitConfig(config, null, authInitialize);
+    }
 
-		public static void InitConfig(Properties<string, string> config)
+    public static void InitConfig(Properties<string, string> config)
     {
       InitConfig(config, null);
     }
@@ -563,10 +558,9 @@
 
     public static void InitConfig(Properties<string, string> config, string cacheXml, IAuthInitialize authIntialize)
     {
-      //Console.WriteLine(" in InitConfig1 " + System.AppDomain.CurrentDomain.Id);
       if (cacheXml != null)
       {
-        string duplicateXMLFile = Util.Rand(3536776).ToString() + cacheXml;
+        var duplicateXMLFile = Path.Combine(MakeTempDirectory(), cacheXml);
         createDuplicateXMLFile(cacheXml, duplicateXMLFile);
         cacheXml = duplicateXMLFile;
       }
@@ -1692,6 +1686,7 @@
       m_gfeDir = Util.GetEnvironmentVariable("GFE_DIR");
       Assert.IsNotNull(m_gfeDir, "GFE_DIR is not set.");
       Assert.IsNotEmpty(m_gfeDir, "GFE_DIR is not set.");
+      gfsh = Path.Combine(m_gfeDir, "bin", "gfsh.bat");
       m_gfeLogLevel = Util.GetEnvironmentVariable("GFE_LOGLEVEL");
       m_gfeSecLogLevel = Util.GetEnvironmentVariable("GFE_SECLOGLEVEL");
       if (m_gfeLogLevel == null || m_gfeLogLevel.Length == 0)
@@ -1713,30 +1708,17 @@
       else if (cacheXmls != null)
       {
         // Assume the GFE_DIR is for a local server
-        if (locators)
-        {
-          JavaMcastPort = 0;
-        }
-        else
-        {
-          JavaMcastPort = Util.Rand(2431, 31123);
-        }
 
         for (int i = 0; i < cacheXmls.Length; i++)
         {
           string cacheXml = cacheXmls[i];
           Assert.IsNotNull(cacheXml, "cacheXml is not set for Java cacheserver.");
           Assert.IsNotEmpty(cacheXml, "cacheXml is not set for Java cacheserver.");
-          string duplicateFile = "";
-          // Assume the GFE_DIR is for a local server
-          if (cacheXml.IndexOf(PathSep) < 0)
-          {
-            duplicateFile = Directory.GetCurrentDirectory() + PathSep + Util.Rand(2342350).ToString() + cacheXml;
-            cacheXml = Directory.GetCurrentDirectory() + PathSep + cacheXml;
-            createDuplicateXMLFile(cacheXml, duplicateFile);
-            //:create duplicate xml files
-            cacheXmls[i] = duplicateFile;
-          }
+
+          var duplicateFile = Path.Combine(MakeTempDirectory(), cacheXml);
+          cacheXml = Path.Combine(Directory.GetCurrentDirectory(), cacheXml);
+          createDuplicateXMLFile(cacheXml, duplicateFile);
+          cacheXmls[i] = duplicateFile;
 
           // Find the port number from the given cache.xml
           XmlDocument xmlDoc = new XmlDocument();
@@ -1764,23 +1746,23 @@
     {
       if (HOST_PORT_1 == 0)
       {
-        HOST_PORT_1 = Util.RandPort(10000, 64000);
-        HOST_PORT_2 = Util.RandPort(10000, 64000);
-        HOST_PORT_3 = Util.RandPort(10000, 64000);
-        HOST_PORT_4 = Util.RandPort(10000, 64000);
+        HOST_PORT_1 = Util.GetAvailablePort();
+        HOST_PORT_2 = Util.GetAvailablePort();
+        HOST_PORT_3 = Util.GetAvailablePort();
+        HOST_PORT_4 = Util.GetAvailablePort();
       }
 
       if (LOCATOR_PORT_1 == 0)
       {
-        LOCATOR_PORT_1 = Util.RandPort(10000, 64000);
-        LOCATOR_PORT_2 = Util.RandPort(10000, 64000);
-        LOCATOR_PORT_3 = Util.RandPort(10000, 64000);
-        LOCATOR_PORT_4 = Util.RandPort(10000, 64000);
+        LOCATOR_PORT_1 = Util.GetAvailablePort();
+        LOCATOR_PORT_2 = Util.GetAvailablePort();
+        LOCATOR_PORT_3 = Util.GetAvailablePort();
+        LOCATOR_PORT_4 = Util.GetAvailablePort();
       }
 
       if (JMX_MANAGER_PORT == 0)
       {
-        JMX_MANAGER_PORT = Util.RandPort(10000, 64000);
+        JMX_MANAGER_PORT = Util.GetAvailablePort();
       }
 
     }
@@ -1796,65 +1778,46 @@
       cachexmlstring = cachexmlstring.Replace("LOC_PORT1", LOCATOR_PORT_1.ToString());
       cachexmlstring = cachexmlstring.Replace("LOC_PORT2", LOCATOR_PORT_2.ToString());
       cachexmlstring = cachexmlstring.Replace("LOC_PORT3", LOCATOR_PORT_3.ToString());
-      //cachexmlstring = cachexmlstring.Replace("LOC_PORT4", LOCATOR_PORT_4.ToString());
+      cachexmlstring = cachexmlstring.Replace("LOC_PORT4", LOCATOR_PORT_4.ToString());
 
       File.Create(duplicateFilename).Close();
       File.WriteAllText(duplicateFilename, cachexmlstring);
     }
 
-    public static void StartJavaLocator(int locatorNum, string startDir)
+    public static void StartJavaLocator(int locatorNum, string locatorName)
     {
-      StartJavaLocator(locatorNum, startDir, null);
-    }
-    public static int getBaseLocatorPort()
-    {
-      return LocatorPort;
+      StartJavaLocator(locatorNum, locatorName, null);
     }
 
-    public static void StartJavaLocator(int locatorNum, string startDir,
+    public static void StartJavaLocator(int locatorNum, string locatorName,
       string extraLocatorArgs)
     {
-      StartJavaLocator(locatorNum, startDir, extraLocatorArgs, false);
+      StartJavaLocator(locatorNum, locatorName, extraLocatorArgs, false);
     }
 
-    public static void StartJavaLocator(int locatorNum, string startDir,
+    public static void StartJavaLocator(int locatorNum, string locatorName,
       string extraLocatorArgs, bool ssl)
     {
       if (m_localServer)
       {
-        Process javaProc;
-        string locatorPath = m_gfeDir + PathSep + "bin" + PathSep + GeodeName;
+        var startDir = MakeTempDirectory();
         Util.Log("Starting locator {0} in directory {1}.", locatorNum, startDir);
-        string serverName = "Locator" + Util.Rand(64687687).ToString();
-        if (startDir != null)
+        try
         {
-          startDir += serverName;
-          if (!Directory.Exists(startDir))
+          TextWriter tw = new StreamWriter(Path.Combine(startDir, "geode.properties"), false);
+          tw.WriteLine("locators=localhost[{0}],localhost[{1}],localhost[{2}]", LOCATOR_PORT_1, LOCATOR_PORT_2, LOCATOR_PORT_3);
+          if (ssl)
           {
-            Directory.CreateDirectory(startDir);
+            tw.WriteLine("ssl-enabled=true");
+            tw.WriteLine("ssl-require-authentication=true");
+            tw.WriteLine("ssl-ciphers=SSL_RSA_WITH_NULL_MD5");
+            tw.WriteLine("mcast-port=0");
           }
-          try
-          {
-            TextWriter tw = new StreamWriter(Directory.GetCurrentDirectory() + "\\" + startDir + "\\geode.properties", false);
-            tw.WriteLine("locators=localhost[{0}],localhost[{1}],localhost[{2}]", LOCATOR_PORT_1, LOCATOR_PORT_2, LOCATOR_PORT_3);
-            if (ssl)
-            {
-              tw.WriteLine("ssl-enabled=true");
-              tw.WriteLine("ssl-require-authentication=true");
-              tw.WriteLine("ssl-ciphers=SSL_RSA_WITH_NULL_MD5");
-              tw.WriteLine("mcast-port=0");
-            }
-            tw.Close();
-          }
-          catch (Exception ex)
-          {
-            Assert.Fail("Locator property file creation failed: {0}: {1}", ex.GetType().Name, ex.Message);
-          }
-          startDir = " --dir=" + startDir;
+          tw.Close();
         }
-        else
+        catch (Exception ex)
         {
-          startDir = string.Empty;
+          Assert.Fail("Locator property file creation failed: {0}: {1}", ex.GetType().Name, ex.Message);
         }
 
         string locatorPort = " --port=" + getLocatorPort(locatorNum);
@@ -1871,7 +1834,7 @@
 
         if (ssl)
         {
-          string sslArgs = String.Empty;
+          string sslArgs = string.Empty;
           string keystore = Util.GetEnvironmentVariable("CPP_TESTOUT") + "/keystore";
           sslArgs += " --J=-Djavax.net.ssl.keyStore=" + keystore + "/server_keystore.jks ";
           sslArgs += " --J=-Djavax.net.ssl.keyStorePassword=gemstone ";
@@ -1880,28 +1843,15 @@
           extraLocatorArgs += sslArgs;
         }
 
-        string locatorArgs = LocatorStartArgs + " --name=" + serverName + startDir + extraLocatorArgs + " --http-service-port=0";
+        string locatorArgs = LocatorStartArgs + " --name=" + locatorName + " --dir=" + startDir + extraLocatorArgs + " --http-service-port=0";
 
-        if (!Util.StartProcess(locatorPath, locatorArgs, false, null, true,
-          false, false, true, out javaProc))
+        var exitCode = ExecuteGfsh(locatorArgs);
+        if (0 != exitCode)
         {
-          Assert.Fail("Failed to run the locator: {0}.",
-            locatorPath);
+          KillLocatorByPidFile(startDir);
         }
+        Assert.AreEqual(0, exitCode, "Failed to start locator.");
 
-        StreamReader outSr = javaProc.StandardOutput;
-        // Wait for cache server to start
-        bool started = javaProc.WaitForExit(MaxWaitMillis);
-        Util.Log("Output from '{0} {1}':{2}{3}", GeodeName, locatorArgs,
-          Environment.NewLine, outSr.ReadToEnd());
-        outSr.Close();
-        if (!started)
-        {
-          javaProc.Kill();
-        }
-        Assert.IsTrue(started, "Timed out waiting for " +
-          "Locator to start.{0}Please check the locator logs.",
-          Environment.NewLine);
         m_runningLocators[locatorNum] = startDir;
         if (m_locators == null)
         {
@@ -1915,7 +1865,10 @@
       }
     }
 
-
+    private static void KillLocatorByPidFile(string startDir)
+    {
+      KillByPidFile(Path.Combine(startDir, "vf.gf.locator.pid"));
+    }
 
     static int getLocatorPort(int num)
     {
@@ -1933,39 +1886,24 @@
     }
 
     //this is for start locator independetly(will not see each other)
-    public static void StartJavaLocator_MDS(int locatorNum, string startDir,
+    public static void StartJavaLocator_MDS(int locatorNum, string locatorName,
       string extraLocatorArgs, int dsId)
     {
       if (m_localServer)
       {
-        Process javaProc;
-        string locatorPath = m_gfeDir + PathSep + "bin" + PathSep + GeodeName;
-        string serverName = "Locator" + Util.Rand(64687687).ToString();
+        var startDir = MakeTempDirectory();
         Util.Log("Starting locator {0} in directory {1}.", locatorNum, startDir);
-        if (startDir != null)
+        try
         {
-          startDir += serverName;
-          if (!Directory.Exists(startDir))
-          {
-            Directory.CreateDirectory(startDir);
-          }
-          try
-          {
-            TextWriter tw = new StreamWriter(Directory.GetCurrentDirectory() + "\\" + startDir + "\\geode.properties", false);
-            //tw.WriteLine("locators=localhost[{0}],localhost[{1}],localhost[{2}]", LOCATOR_PORT_1, LOCATOR_PORT_2, LOCATOR_PORT_3);
-            tw.WriteLine("distributed-system-id=" + dsId);
-            tw.WriteLine("mcast-port=0");
-            tw.Close();
-          }
-          catch (Exception ex)
-          {
-            Assert.Fail("Locator property file creation failed: {0}: {1}", ex.GetType().Name, ex.Message);
-          }
-          startDir = " --dir=" + startDir;
+          TextWriter tw = new StreamWriter(Path.Combine(startDir, "geode.properties"), false);
+          //tw.WriteLine("locators=localhost[{0}],localhost[{1}],localhost[{2}]", LOCATOR_PORT_1, LOCATOR_PORT_2, LOCATOR_PORT_3);
+          tw.WriteLine("distributed-system-id=" + dsId);
+          tw.WriteLine("mcast-port=0");
+          tw.Close();
         }
-        else
+        catch (Exception ex)
         {
-          startDir = string.Empty;
+          Assert.Fail("Locator property file creation failed: {0}: {1}", ex.GetType().Name, ex.Message);
         }
 
         if (dsId == 1)
@@ -1982,28 +1920,15 @@
         {
           extraLocatorArgs = locatorPort;
         }
-        string locatorArgs = LocatorStartArgs + " --name=" + serverName + startDir + extraLocatorArgs + " --http-service-port=0";
+        string locatorArgs = LocatorStartArgs + " --name=" + locatorName + " --dir=" + startDir + extraLocatorArgs + " --http-service-port=0";
 
-        if (!Util.StartProcess(locatorPath, locatorArgs, false, null, true,
-          false, false, true, out javaProc))
+        var exitCode = ExecuteGfsh(locatorArgs);
+        if (0 != exitCode)
         {
-          Assert.Fail("Failed to run the locator: {0}.",
-            locatorPath);
+          KillLocatorByPidFile(startDir);
         }
+        Assert.AreEqual(0, exitCode, "Failed to start locator MDS.");
 
-        StreamReader outSr = javaProc.StandardOutput;
-        // Wait for cache server to start
-        bool started = javaProc.WaitForExit(MaxWaitMillis);
-        Util.Log("Output from '{0} {1}':{2}{3}", GeodeName, locatorArgs,
-          Environment.NewLine, outSr.ReadToEnd());
-        outSr.Close();
-        if (!started)
-        {
-          javaProc.Kill();
-        }
-        Assert.IsTrue(started, "Timed out waiting for " +
-          "Locator to start.{0}Please check the locator logs.",
-          Environment.NewLine);
         m_runningLocators[locatorNum] = startDir;
         if (m_locators == null)
         {
@@ -2017,12 +1942,12 @@
       }
     }
 
-    public static void StartJavaServerWithLocators(int serverNum, string startDir, int numLocators)
+    public static void StartJavaServerWithLocators(int serverNum, string serverName, int numLocators)
     {
-      StartJavaServerWithLocators(serverNum, startDir, numLocators, false);
+      StartJavaServerWithLocators(serverNum, serverName, numLocators, false);
     }
 
-    public static void StartJavaServerWithLocators(int serverNum, string startDir, int numLocators, bool ssl)
+    public static void StartJavaServerWithLocators(int serverNum, string serverName, int numLocators, bool ssl)
     {
       string extraServerArgs = "--locators=";
       for (int locator = 0; locator < numLocators; locator++)
@@ -2044,31 +1969,31 @@
         sslArgs += " -J=-Djavax.net.ssl.trustStorePassword=gemstone ";
         extraServerArgs += sslArgs;
       }
-      StartJavaServer(serverNum, startDir, extraServerArgs);
+      StartJavaServer(serverNum, serverName, extraServerArgs);
     }
 
     //this is to start multiple DS
-    public static void StartJavaServerWithLocator_MDS(int serverNum, string startDir, int locatorNumber)
+    public static void StartJavaServerWithLocator_MDS(int serverNum, string serverName, int locatorNumber)
     {
       string extraServerArgs = "--locators=";
       extraServerArgs += "localhost[" + getLocatorPort(locatorNumber) + "]";
 
-      StartJavaServer(serverNum, startDir, extraServerArgs);
+      StartJavaServer(serverNum, serverName, extraServerArgs);
     }
 
 
-    public static void StartJavaServer(int serverNum, string startDir)
+    public static void StartJavaServer(int serverNum, string serverName)
     {
-      StartJavaServer(serverNum, startDir, null);
+      StartJavaServer(serverNum, serverName, null);
     }
 
-    public static void StartJavaServerWithLocators(int serverNum, string startDir,
+    public static void StartJavaServerWithLocators(int serverNum, string serverName,
       int numLocators, string extraServerArgs)
     {
-      StartJavaServerWithLocators(serverNum, startDir, numLocators, extraServerArgs, false);
+      StartJavaServerWithLocators(serverNum, serverName, numLocators, extraServerArgs, false);
     }
 
-    public static void StartJavaServerWithLocators(int serverNum, string startDir,
+    public static void StartJavaServerWithLocators(int serverNum, string serverName,
       int numLocators, string extraServerArgs, bool ssl)
     {
       extraServerArgs += " --locators=";
@@ -2091,11 +2016,10 @@
         sslArgs += " --J=-Djavax.net.ssl.trustStorePassword=gemstone ";
         extraServerArgs += sslArgs;
       }
-      StartJavaServer(serverNum, startDir, extraServerArgs);
+      StartJavaServer(serverNum, serverName, extraServerArgs);
     }
 
-    public static void StartJavaServer(int serverNum, string startDir,
-      string extraServerArgs)
+    public static void StartJavaServer(int serverNum, string serverName, string extraServerArgs)
     {
       if (m_localServer)
       {
@@ -2105,10 +2029,7 @@
             "could not find cache.xml for server number {0}", serverNum);
         }
         string cacheXml = m_cacheXmls[serverNum - 1];
-        Process javaProc;
-        string javaServerPath = m_gfeDir + PathSep + "bin" + PathSep + JavaServerName;
-        string serverName = "Server" + Util.Rand(372468723).ToString();
-        startDir += serverName;
+        var startDir = Path.Combine(MakeTempDirectory());
         int port = 0;
         switch (serverNum)
         {
@@ -2134,7 +2055,6 @@
           {
             Directory.CreateDirectory(startDir);
           }
-          startDir = " --dir=" + startDir;
         }
         else
         {
@@ -2149,36 +2069,98 @@
 
         string serverArgs = JavaServerStartArgs + cacheXml + " --name=" + serverName +
           " --server-port=" + port + " --classpath=" + classpath +
-          " --log-level=" + m_gfeLogLevel + startDir +
+          " --log-level=" + m_gfeLogLevel + " --dir=" + startDir +
           " --J=-Dsecurity-log-level=" + m_gfeSecLogLevel + extraServerArgs;
-        if (!Util.StartProcess(javaServerPath, serverArgs, false, null, true,
-          false, false, true, out javaProc))
-        {
-          Assert.Fail("Failed to run the java cacheserver executable: {0}.",
-            javaServerPath);
-        }
 
-        StreamReader outSr = javaProc.StandardOutput;
-        // Wait for cache server to start
-        bool started = javaProc.WaitForExit(MaxWaitMillis);
-        Util.Log("Output from '{0} {1}':{2}{3}", JavaServerName, serverArgs,
-          Environment.NewLine, outSr.ReadToEnd());
-        outSr.Close();
-        if (!started)
+        var exitCode = ExecuteGfsh(serverArgs);
+        if (0 != exitCode)
         {
+          KillServerByPidFile(startDir);
+        }
+        Assert.AreEqual(0, exitCode, "Failed to start server.");
+
+        m_runningJavaServers[serverNum] = startDir;
+      }
+    }
+
+    private static void KillServerByPidFile(string startDir)
+    {
+      KillByPidFile(Path.Combine(startDir, "vf.gf.server.pid"));
+    }
+
+    static string MakeTempDirectory()
+    {
+      var tempDirectory = Path.Combine(tempDirectoryRoot, Path.GetRandomFileName());
+      Directory.CreateDirectory(tempDirectory);
+      return tempDirectory;
+    }
+
+    static int ExecuteGfsh(string command)
+    {
+      Util.Log("ExecuteGfsh: {0}", command);
+
+      using (var process = new Process())
+      {
+        process.StartInfo.FileName = gfsh;
+        process.StartInfo.Arguments = command;
+        process.StartInfo.UseShellExecute = false;
+        process.StartInfo.RedirectStandardOutput = true;
+        process.StartInfo.RedirectStandardError = true;
+        process.StartInfo.CreateNoWindow = true;
+        process.StartInfo.EnvironmentVariables["JAVA_ARGS"] = "-Xmx256m";
+
+        process.OutputDataReceived += (sender, e) =>
+        {
+          if (!string.IsNullOrEmpty(e.Data))
+          {
+            Util.Log("Execute Gfsh stdout: {0}", e.Data);
+          }
+        };
+        process.ErrorDataReceived += (sender, e) =>
+        {
+          if (!string.IsNullOrEmpty(e.Data))
+          {
+            Util.Log("Execute Gfsh stderr: {0}", e.Data);
+          }
+        };
+
+        process.Start();
+
+        process.BeginOutputReadLine();
+        process.BeginErrorReadLine();
+
+        Util.Log("ExecuteGfsh: Waiting for exit {0}", process.Id);
+        if (!process.WaitForExit(MaxWaitMillis))
+        {
+          Util.Log("ExecuteGfsh: Timeout, killing {0}", process.Id);
+
+          CloseAndIgnore(process.StandardOutput);
+          CloseAndIgnore(process.StandardError);
+
           try
           {
-            javaProc.Kill();
+            process.Kill();
           }
-          catch
+          catch (Exception)
           {
             //ignore
           }
         }
-        Assert.IsTrue(started, "Timed out waiting for " +
-          "Java cacheserver to start.{0}Please check the server logs.",
-          Environment.NewLine);
-        m_runningJavaServers[serverNum] = startDir;
+
+        Util.Log("ExecuteGfsh: Exited {0}", process.Id);
+        return process.ExitCode;
+      }
+    }
+
+    public static void CloseAndIgnore(StreamReader streamRead)
+    {
+      try
+      {
+        streamRead.Close();
+      } 
+      catch (Exception)
+      {
+        // ignored
       }
     }
 
@@ -2201,8 +2183,6 @@
         if (m_runningLocators.TryGetValue(locatorNum, out startDir))
         {
           Util.Log("Stopping locator {0} in directory {1}.", locatorNum, startDir);
-          Process javaStopProc;
-          string javaLocatorPath = m_gfeDir + PathSep + "bin" + PathSep + GeodeName;
           string sslArgs = String.Empty;
           if (ssl)
           {
@@ -2211,43 +2191,21 @@
             sslArgs += " --J=-Djavax.net.ssl.keyStorePassword=gemstone ";
             sslArgs += " --J=-Djavax.net.ssl.trustStore=" + keystore + "/server_truststore.jks  ";
             sslArgs += " --J=-Djavax.net.ssl.trustStorePassword=gemstone ";
-            string propdir = startDir.Replace("--dir=", string.Empty).Trim();
-            File.Copy(propdir + "/geode.properties", Directory.GetCurrentDirectory() + "/geode.properties", true);
-          }
-          if (!Util.StartProcess(javaLocatorPath, LocatorStopArgs + startDir + sslArgs,
-            false, null, true, false, false, true, out javaStopProc))
-          {
-            Assert.Fail("Failed to run the executable: {0}.",
-              javaLocatorPath);
+            File.Copy(startDir + "/geode.properties", Directory.GetCurrentDirectory() + "/geode.properties", true);
           }
 
-          StreamReader outSr = javaStopProc.StandardOutput;
-          // Wait for cache server to stop
-          bool stopped = javaStopProc.WaitForExit(MaxWaitMillis);
-          Util.Log("Output from '{0} stop-locator':{1}{2}", GeodeName,
-            Environment.NewLine, outSr.ReadToEnd());
-          outSr.Close();
-          if (!stopped)
+          var exitCode = ExecuteGfsh(LocatorStopArgs + " --dir=" + startDir + sslArgs);
+          if (0 != exitCode)
           {
-            try
-            {
-              javaStopProc.Kill();
-            }
-            catch
-            {
-              //ignore
-            }
+            KillLocatorByPidFile(startDir);
           }
+
           if (ssl)
           {
             File.Delete(Directory.GetCurrentDirectory() + "/geode.properties");
           }
-          Assert.IsTrue(stopped, "Timed out waiting for " +
-            "Java locator to stop.{0}Please check the locator logs.",
-            Environment.NewLine);
           m_runningLocators.Remove(locatorNum);
-          Util.Log("Locator {0} in directory {1} stopped.", locatorNum,
-            startDir.Replace("--dir=", string.Empty).Trim());
+          Util.Log("Locator {0} in directory {1} stopped.", locatorNum, startDir);
         }
         else
         {
@@ -2274,38 +2232,15 @@
         if (m_runningJavaServers.TryGetValue(serverNum, out startDir))
         {
           Util.Log("Stopping server {0} in directory {1}.", serverNum, startDir);
-          Process javaStopProc;
-          string javaServerPath = m_gfeDir + PathSep + "bin" + PathSep + JavaServerName;
-          if (!Util.StartProcess(javaServerPath, JavaServerStopArgs + startDir,
-            false, null, true, false, false, true, out javaStopProc))
+
+          var exitCode = ExecuteGfsh(JavaServerStopArgs + " --dir=" + startDir);
+          if (0 != exitCode)
           {
-            Assert.Fail("Failed to run the java cacheserver executable: {0}.",
-              javaServerPath);
+            KillServerByPidFile(startDir);
           }
 
-          StreamReader outSr = javaStopProc.StandardOutput;
-          // Wait for cache server to stop
-          bool stopped = javaStopProc.WaitForExit(MaxWaitMillis);
-          Util.Log("Output from '{0} stop':{1}{2}", JavaServerName,
-            Environment.NewLine, outSr.ReadToEnd());
-          outSr.Close();
-          if (!stopped)
-          {
-            try
-            {
-              javaStopProc.Kill();
-            }
-            catch
-            {
-              //ignore
-            }
-          }
-          Assert.IsTrue(stopped, "Timed out waiting for " +
-            "Java cacheserver to stop.{0}Please check the server logs.",
-            Environment.NewLine);
           m_runningJavaServers.Remove(serverNum);
-          Util.Log("Server {0} in directory {1} stopped.", serverNum,
-            startDir.Replace("--dir=", string.Empty).Trim());
+          Util.Log("Server {0} in directory {1} stopped.", serverNum, startDir);
         }
         else
         {
@@ -2318,6 +2253,31 @@
       }
     }
 
+    private static void KillByPidFile(string pidFile)
+    {
+      if (File.Exists(pidFile))
+      {
+        Util.Log(Util.LogLevel.Info, "PID file {0} found.", pidFile);
+        var pid = int.Parse(File.ReadAllText(pidFile));
+        try 
+        {
+          using (var process = Process.GetProcessById(pid))
+          {
+            Util.Log(Util.LogLevel.Warning, "Killing process {0}.", pid);
+            process.Kill();
+            if (!process.WaitForExit(MaxWaitMillis))
+            {
+              Util.Log(Util.LogLevel.Error, "Failed to kill {0}.", pid);
+            }
+          }
+        }
+        catch (ArgumentException)
+        {
+          Util.Log(Util.LogLevel.Info, "Process {0} does not exist.", pid);
+        }
+      }
+    }
+
     public static void StopJavaServers()
     {
       int[] runningServers = new int[m_runningJavaServers.Count];
@@ -2403,7 +2363,7 @@
       StopJavaLocators();
       ClearEndpoints();
       ClearLocators();
-      KillJavaProcesses();
+      //KillJavaProcesses();
       Util.Log("Cache Helper EndTest completed.");
     }
 
diff --git a/clicache/integration-test/CacheServerMsgs.cs b/clicache/integration-test/CacheServerMsgs.cs
deleted file mode 100644
index 076e59a..0000000
--- a/clicache/integration-test/CacheServerMsgs.cs
+++ /dev/null
@@ -1,58 +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.
- */
-
-using System;
-
-namespace Apache.Geode.Client.UnitTests
-{
-  using NUnit.Framework;
-  using Apache.Geode.DUnitFramework;
-
-  [TestFixture]
-  [Category("unicast_only")]
-  public class CacheServerMsgs : UnitTests
-  {
-    Cache m_cache = null;
-
-    protected override ClientBase[] GetClients()
-    {
-      return null;
-    }
-
-    [TestFixtureSetUp]
-    public override void InitTests()
-    {
-      base.InitTests();
-      CacheHelper.InitConfig("MessagesTest", "theCache", "SERVER", null,
-        null, null);
-      m_cache = CacheHelper.DCache;
-    }
-
-    [TestFixtureTearDown]
-    public override void EndTests()
-    {
-      try
-      {
-        CacheHelper.Close();
-      }
-      finally
-      {
-        base.EndTests();
-      }
-    }
-  }
-}
diff --git a/clicache/integration-test/CacheableWrapper.cs b/clicache/integration-test/CacheableWrapper.cs
deleted file mode 100644
index cac4e42..0000000
--- a/clicache/integration-test/CacheableWrapper.cs
+++ /dev/null
@@ -1,208 +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.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Collections;
-using System.Runtime.Serialization;
-
-namespace Apache.Geode.Client.UnitTests
-{
-  using NUnit.Framework;
-
-  /// <summary>
-  /// Interface class for wrappers of geode cacheable types.
-  /// </summary>
-  /// <remarks>
-  /// This interface has various useful functions like setting value randomly,
-  /// and finding checksum.
-  /// </remarks>
-  public abstract class CacheableWrapper
-  {
-    #region Protected members
-
-    protected ISerializable m_cacheableObject = null;
-    protected uint m_typeId;
-
-    #endregion
-
-    public virtual ISerializable Cacheable
-    {
-      get
-      {
-        return m_cacheableObject;
-      }
-    }
-
-    public uint TypeId
-    {
-      get
-      {
-        return m_typeId;
-      }
-      set
-      {
-        m_typeId = value;
-      }
-    }
-
-    public abstract void InitRandomValue(int maxSize);
-
-    public abstract uint GetChecksum(ISerializable cacheableObject);
-
-    public virtual uint GetChecksum()
-    {
-      return GetChecksum(m_cacheableObject);
-    }
-  }
-
-  /// <summary>
-  /// Interface class for wrappers of geode cacheable key types.
-  /// </summary>
-  /// <remarks>
-  /// This interface has various useful functions like setting value randomly,
-  /// and finding checksum, initializing key etc.
-  /// </remarks>
-  public abstract class CacheableKeyWrapper : CacheableWrapper
-  {
-    public override ISerializable Cacheable
-    {
-      get
-      {
-        return m_cacheableObject;
-      }
-    }
-
-    public virtual ICacheableKey CacheableKey
-    {
-      get
-      {
-        return (ICacheableKey)m_cacheableObject;
-      }
-    }
-
-    public abstract int MaxKeys
-    {
-      get;
-    }
-
-    public abstract void InitKey(int keyIndex, int maxSize);
-  }
-
-  public delegate CacheableWrapper CacheableWrapperDelegate();
-  public delegate CacheableKeyWrapper CacheableKeyWrapperDelegate();
-
-  /// <summary>
-  /// Factory class to create <c>CacheableWrapper</c> objects.
-  /// </summary>
-  public static class CacheableWrapperFactory
-  {
-    #region Private members
-
-    private static Dictionary<UInt32, CacheableKeyWrapperDelegate>
-      m_registeredKeyTypeIdMap =
-      new Dictionary<UInt32, CacheableKeyWrapperDelegate>();
-    private static Dictionary<UInt32, Delegate>
-      m_registeredValueTypeIdMap = new Dictionary<UInt32, Delegate>();
-    private static Dictionary<UInt32, Type>
-      m_typeIdNameMap = new Dictionary<UInt32, Type>();
-
-    #endregion
-
-    #region Public methods
-
-    public static CacheableWrapper CreateInstance(UInt32 typeId)
-    {
-      Delegate wrapperDelegate;
-      lock (((ICollection)m_registeredValueTypeIdMap).SyncRoot)
-      {
-        if (m_registeredValueTypeIdMap.TryGetValue(typeId,
-          out wrapperDelegate))
-        {
-          CacheableWrapper wrapper =
-            (CacheableWrapper)wrapperDelegate.DynamicInvoke(null);
-          wrapper.TypeId = typeId;
-          return wrapper;
-        }
-      }
-      return null;
-    }
-
-    public static CacheableKeyWrapper CreateKeyInstance(UInt32 typeId)
-    {
-      CacheableKeyWrapperDelegate wrapperDelegate;
-      lock (((ICollection)m_registeredKeyTypeIdMap).SyncRoot)
-      {
-        if (m_registeredKeyTypeIdMap.TryGetValue(typeId,
-          out wrapperDelegate))
-        {
-          CacheableKeyWrapper wrapper = wrapperDelegate();
-          wrapper.TypeId = typeId;
-          return wrapper;
-        }
-      }
-      return null;
-    }
-
-    public static void RegisterType(UInt32 typeId,
-      Type type, CacheableWrapperDelegate wrapperDelegate)
-    {
-      m_registeredValueTypeIdMap[typeId] = wrapperDelegate;
-      m_typeIdNameMap[typeId] = type;
-    }
-
-    public static void RegisterKeyType(UInt32 typeId,
-      Type type, CacheableKeyWrapperDelegate wrapperDelegate)
-    {
-      m_registeredKeyTypeIdMap[typeId] = wrapperDelegate;
-      m_registeredValueTypeIdMap[typeId] = wrapperDelegate;
-      m_typeIdNameMap[typeId] = type;
-    }
-
-    public static void ClearStatics()
-    {
-      m_registeredKeyTypeIdMap.Clear();
-      m_registeredValueTypeIdMap.Clear();
-      m_typeIdNameMap.Clear();
-    }
-
-    public static Type GetTypeForId(UInt32 typeId)
-    {
-      Type type;
-      lock (((ICollection)m_typeIdNameMap).SyncRoot)
-      {
-        if (m_typeIdNameMap.TryGetValue(typeId, out type))
-        {
-          return type;
-        }
-      }
-      return null;
-    }
-
-    public static ICollection<UInt32> GetRegisteredKeyTypeIds()
-    {
-      return m_registeredKeyTypeIdMap.Keys;
-    }
-
-    public static ICollection<UInt32> GetRegisteredValueTypeIds()
-    {
-      return m_registeredValueTypeIdMap.Keys;
-    }
-
-    #endregion
-  }
-}
diff --git a/clicache/integration-test/DataIOTests.cs b/clicache/integration-test/DataIOTests.cs
deleted file mode 100644
index d4488e5..0000000
--- a/clicache/integration-test/DataIOTests.cs
+++ /dev/null
@@ -1,241 +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.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Reflection;
-
-namespace Apache.Geode.Client.UnitTests
-{
-  using NUnit.Framework;
-  using Apache.Geode.DUnitFramework;
-
-  [TestFixture]
-  [Category("unicast_only")]
-  public class DataIOTests : UnitTests
-  {
-    XmlNodeReaderWriter settings = Util.DefaultSettings;
-
-    protected override ClientBase[] GetClients()
-    {
-      return null;
-    }
-
-    [Test]
-    public void Byte()
-    {
-      List<Dictionary<string, string>> testbytes = settings.GetValues(MethodBase.GetCurrentMethod(), "byte");
-      if (testbytes != null)
-      {
-        foreach (Dictionary<string, string> dEntry in testbytes)
-        {
-          DataOutput dataOutput = new DataOutput();
-          byte testbyte = Util.String2Byte(dEntry["value"]);
-          dataOutput.WriteByte(testbyte);
-          byte[] buffer = dataOutput.GetBuffer();
-          Assert.AreEqual(testbyte, buffer[0]);
-
-          DataInput dataInput = new DataInput(buffer);
-          byte result = dataInput.ReadByte();
-          Assert.AreEqual(testbyte, result);
-        }
-      }
-    }
-
-    [Test]
-    public void Boolean()
-    {
-      List<Dictionary<string, string>> testbools = settings.GetValues(MethodBase.GetCurrentMethod(), "bool");
-      if (testbools != null)
-      {
-        foreach (Dictionary<string, string> dEntry in testbools)
-        {
-          DataOutput dataOutput = new DataOutput();
-          bool testbool = bool.Parse(dEntry["value"]);
-          dataOutput.WriteBoolean(testbool);
-          byte[] buffer = dataOutput.GetBuffer();
-          byte[] expectedBytes = Util.String2Bytes(dEntry["bytes"]);
-          Util.CompareTestArrays(expectedBytes, buffer);
-
-          DataInput dataInput = new DataInput(buffer);
-          bool result = dataInput.ReadBoolean();
-          Assert.AreEqual(testbool, result);
-        }
-      }
-    }
-
-    [Test]
-    public void Int16()
-    {
-      List<Dictionary<string, string>> testshorts = settings.GetValues(MethodBase.GetCurrentMethod(), "short");
-      if (testshorts != null)
-      {
-        foreach (Dictionary<string, string> dEntry in testshorts)
-        {
-          DataOutput dataOutput = new DataOutput();
-          short testshort = Util.String2Int16(dEntry["value"]);
-          dataOutput.WriteInt16(testshort);
-          byte[] buffer = dataOutput.GetBuffer();
-          byte[] expectedBytes = Util.String2Bytes(dEntry["bytes"]);
-          Util.CompareTestArrays(expectedBytes, buffer);
-
-          DataInput dataInput = new DataInput(buffer);
-          short result = dataInput.ReadInt16();
-          Assert.AreEqual(testshort, result);
-        }
-      }
-    }
-
-    [Test]
-    public void Int32()
-    {
-      List<Dictionary<string, string>> testints = settings.GetValues(MethodBase.GetCurrentMethod(), "int");
-      if (testints != null)
-      {
-        foreach (Dictionary<string, string> dEntry in testints)
-        {
-          DataOutput dataOutput = new DataOutput();
-          int testint = Util.String2Int32(dEntry["value"]);
-          dataOutput.WriteInt32(testint);
-          byte[] buffer = dataOutput.GetBuffer();
-          byte[] expectedBytes = Util.String2Bytes(dEntry["bytes"]);
-          Util.CompareTestArrays(expectedBytes, buffer);
-
-          DataInput dataInput = new DataInput(buffer);
-          int result = dataInput.ReadInt32();
-          Assert.AreEqual(testint, result);
-        }
-      }
-    }
-
-    [Test]
-    public void Int64()
-    {
-      List<Dictionary<string, string>> testints = settings.GetValues(MethodBase.GetCurrentMethod(), "int");
-      if (testints != null)
-      {
-        foreach (Dictionary<string, string> dEntry in testints)
-        {
-          DataOutput dataOutput = new DataOutput();
-          long testlong = Util.String2Int64(dEntry["value"]);
-          dataOutput.WriteInt64(testlong);
-          byte[] buffer = dataOutput.GetBuffer();
-          byte[] expectedBytes = Util.String2Bytes(dEntry["bytes"]);
-          Util.CompareTestArrays(expectedBytes, buffer);
-
-          DataInput dataInput = new DataInput(buffer);
-          long result = dataInput.ReadInt64();
-          Assert.AreEqual(testlong, result);
-        }
-      }
-    }
-
-    [Test]
-    public void Float()
-    {
-      List<Dictionary<string, string>> testfloats = settings.GetValues(MethodBase.GetCurrentMethod(), "float");
-      if (testfloats != null)
-      {
-        foreach (Dictionary<string, string> dEntry in testfloats)
-        {
-          DataOutput dataOutput = new DataOutput();
-          float testfloat = float.Parse(dEntry["value"]);
-          dataOutput.WriteFloat(testfloat);
-          byte[] buffer = dataOutput.GetBuffer();
-          byte[] expectedBytes = Util.String2Bytes(dEntry["bytes"]);
-          Util.CompareTestArrays(expectedBytes, buffer);
-
-          DataInput dataInput = new DataInput(buffer);
-          float result = dataInput.ReadFloat();
-          Assert.AreEqual(testfloat, result);
-        }
-      }
-    }
-
-    [Test]
-    public void Double()
-    {
-      List<Dictionary<string, string>> testdoubles = settings.GetValues(MethodBase.GetCurrentMethod(), "double");
-      if (testdoubles != null)
-      {
-        foreach (Dictionary<string, string> dEntry in testdoubles)
-        {
-          DataOutput dataOutput = new DataOutput();
-          double testdouble = double.Parse(dEntry["value"]);
-          dataOutput.WriteDouble(testdouble);
-          byte[] buffer = dataOutput.GetBuffer();
-          byte[] expectedBytes = Util.String2Bytes(dEntry["bytes"]);
-          Util.CompareTestArrays(expectedBytes, buffer);
-
-          DataInput dataInput = new DataInput(buffer);
-          double result = dataInput.ReadDouble();
-          Assert.AreEqual(testdouble, result);
-        }
-      }
-    }
-
-    [Test]
-    public void ASCIIString()
-    {
-      List<Dictionary<string, string>> testasciis = settings.GetValues(MethodBase.GetCurrentMethod(), "ascii");
-      if (testasciis != null)
-      {
-        foreach (Dictionary<string, string> dEntry in testasciis)
-        {
-          DataOutput dataOutput = new DataOutput();
-          string testascii = dEntry["value"];
-          dataOutput.WriteUTF(testascii);
-          byte[] buffer = dataOutput.GetBuffer();
-          Assert.AreEqual(Util.String2Byte(dEntry["byte0"]), buffer[0]);
-          Assert.AreEqual(Util.String2Byte(dEntry["byte1"]), buffer[1]);
-          for (int i = 0; i < testascii.Length; i++)
-          {
-            Assert.AreEqual(testascii[i], buffer[i + 2]);
-          }
-
-          DataInput dataInput = new DataInput(buffer);
-          string result = dataInput.ReadUTF();
-          Assert.AreEqual(testascii.Length, result.Length);
-          Assert.AreEqual(testascii, result);
-        }
-      }
-    }
-
-    [Test]
-    public void UTFString()
-    {
-      List<Dictionary<string, string>> testutfs = settings.GetValues(MethodBase.GetCurrentMethod(), "utf");
-      if (testutfs != null)
-      {
-        foreach (Dictionary<string, string> dEntry in testutfs)
-        {
-          DataOutput dataOutput = new DataOutput();
-          string testutf = Util.String2String(dEntry["value"]);
-          dataOutput.WriteUTF(testutf);
-          byte[] buffer = dataOutput.GetBuffer();
-          byte[] expectedBytes = Util.String2Bytes(dEntry["bytes"]);
-          Util.CompareTestArrays(expectedBytes, buffer);
-
-          DataInput dataInput = new DataInput(buffer);
-          string result = dataInput.ReadUTF();
-          Assert.AreEqual(testutf.Length, result.Length);
-          Assert.AreEqual(testutf, result);
-        }
-      }
-    }
-  }
-}
diff --git a/clicache/integration-test/DistGetTests.cs b/clicache/integration-test/DistGetTests.cs
deleted file mode 100644
index ce680bb..0000000
--- a/clicache/integration-test/DistGetTests.cs
+++ /dev/null
@@ -1,191 +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.
- */
-
-using System;
-using System.Threading;
-
-namespace Apache.Geode.Client.UnitTests
-{
-  using NUnit.Framework;
-  using Apache.Geode.DUnitFramework;
-
-  [TestFixture]
-  public class DistGetTests : UnitTests
-  {
-    private const string RootRegion = "DistGet";
-    private const string SomeDistRegion = "SomeDistReg";
-    private const string GetRegion = "GetWithInvalid";
-    private const string GetILRegion = "GetWithInvalid_IL";
-
-    private const int InvBeginKey = 2006;
-    private const int InvEndKey = 2260;
-    private const int Inv2BeginKey = 4006;
-    private const int Inv2EndKey = 4260;
-
-    private Region m_region;
-    private UnitProcess m_dataHolder, m_getter, m_invalidOne, m_invalidTwo;
-
-    protected override ClientBase[] GetClients()
-    {
-      m_dataHolder = new UnitProcess();
-      m_getter = new UnitProcess();
-      m_invalidOne = new UnitProcess();
-      m_invalidTwo = new UnitProcess();
-      return new ClientBase[] { m_dataHolder, m_getter, m_invalidOne, m_invalidTwo };
-    }
-
-    #region Functions used by the tests
-
-    public void Puts()
-    {
-      m_region = CacheHelper.CreateDistRegion(RootRegion,
-        ScopeType.DistributedAck, SomeDistRegion, 10);
-      Util.Log("Beginning puts.");
-      m_region.Put("findme", "hello");
-
-      CacheableString cRes = m_region.Get("findme") as CacheableString;
-      Assert.AreEqual("hello", cRes.Value);
-    }
-
-    public void FindItems()
-    {
-      m_region = CacheHelper.CreateDistRegion(RootRegion,
-        ScopeType.DistributedAck, SomeDistRegion, 10);
-
-      Util.Log("Created second process region.");
-
-      CacheableString cKey = new CacheableString("findme");
-      CacheableString cRes = m_region.Get(cKey) as CacheableString;
-      Assert.AreEqual("hello", cRes.Value);
-      Util.Log("Received value for findme: {0}", cRes.Value);
-
-      m_region.LocalInvalidateRegion();
-      Util.Log("invalidated region");
-      Assert.IsTrue(m_region.ContainsKey(cKey));
-      Assert.IsFalse(m_region.ContainsValueForKey(cKey));
-      Util.Log("passed invalid assertions.");
-
-      cRes = m_region.Get(cKey) as CacheableString;
-      Util.Log("get completed.");
-      Assert.AreEqual("hello", cRes.Value);
-      Util.Log("Received value for findme: {0}", cRes.Value);
-    }
-
-    public void MakeDataTwo(string regionName)
-    {
-      m_region = CacheHelper.CreateILRegion(regionName, true, true, null);
-      CacheableInt32 cKey;
-      for (int i = InvBeginKey; i <= InvEndKey; i++)
-      {
-        cKey = new CacheableInt32(i);
-        m_region.Put(cKey, cKey);
-      }
-    }
-
-    public void Join(string regionName)
-    {
-      m_region = CacheHelper.CreateILRegion(regionName, true, true, null);
-      CacheableInt32 cVal;
-      for (int i = InvBeginKey; i <= InvEndKey; i++)
-      {
-        cVal = m_region.Get(i) as CacheableInt32;
-        Assert.IsNotNull(cVal);
-        Assert.AreEqual(i, cVal.Value);
-      }
-      m_region.LocalInvalidateRegion();
-    }
-
-    public void CheckNotValid(string regionName)
-    {
-      m_region = CacheHelper.CreateILRegion(regionName, true, true, null);
-      CacheableInt32 cVal;
-      for (int i = InvBeginKey; i <= InvEndKey; i++)
-      {
-        cVal = m_region.Get(i) as CacheableInt32;
-        Assert.IsNotNull(cVal);
-        Assert.AreEqual(i, cVal.Value);
-      }
-      for (int i = InvBeginKey; i <= InvEndKey; i++)
-      {
-        m_region.Put(i, -i);
-      }
-      for (int i = InvBeginKey; i <= InvEndKey; i++)
-      {
-        cVal = m_region.Get(i) as CacheableInt32;
-        Assert.IsNotNull(cVal);
-        Assert.AreEqual(-i, cVal.Value);
-      }
-    }
-
-    public void PutKeys(int start, int end, int factor, bool invalidate)
-    {
-      for (int i = start; i <= end; i++)
-      {
-        m_region.Put(i, i * factor);
-        if (invalidate)
-        {
-          m_region.LocalInvalidate(i);
-        }
-      }
-    }
-
-    public void CheckKeys(int start, int end, int factor, bool invalidate, bool netSearch)
-    {
-      CacheableInt32 cKey, cVal;
-      for (int i = start; i <= end; i++)
-      {
-        cKey = new CacheableInt32(i);
-        if (netSearch)
-        {
-          Assert.IsFalse(m_region.ContainsKey(cKey));
-        }
-        else
-        {
-          Assert.IsTrue(m_region.ContainsValueForKey(cKey));
-        }
-        cVal = m_region.Get(cKey) as CacheableInt32;
-        Assert.IsNotNull(cVal);
-        Assert.AreEqual(i * factor, cVal.Value);
-        if (invalidate)
-        {
-          m_region.LocalInvalidate(cKey);
-        }
-      }
-    }
-
-    #endregion
-
-    [Test]
-    public void DistReg()
-    {
-      m_dataHolder.Call(Puts);
-      m_getter.Call(FindItems);
-    }
-
-    [Test]
-    public void GetWithInvalid()
-    {
-      m_dataHolder.Call(MakeDataTwo, GetRegion);
-      m_invalidOne.Call(Join, GetRegion);
-      m_invalidTwo.Call(Join, GetRegion);
-      m_getter.Call(CheckNotValid, GetRegion);
-
-      m_invalidTwo.Call(CheckKeys, InvBeginKey, InvEndKey, -1, false, false);
-      m_invalidOne.Call(CheckKeys, InvBeginKey, InvEndKey, -1, false, false);
-    }
-  }
-}
diff --git a/clicache/integration-test/DistOpsTests.cs b/clicache/integration-test/DistOpsTests.cs
deleted file mode 100644
index ae6ac4c..0000000
--- a/clicache/integration-test/DistOpsTests.cs
+++ /dev/null
@@ -1,85 +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.
- */
-
-using System;
-using System.Threading;
-
-namespace Apache.Geode.Client.UnitTests
-{
-  using NUnit.Framework;
-  using Apache.Geode.DUnitFramework;
-
-  [TestFixture]
-  public class DistOpsTests : DistOpsSteps
-  {
-    #region Private statics/constants and members
-
-    private static string[] AckRegionNames = { "DistRegionAck1", "DistRegionNoAck1" };
-    private static string[] ILRegionNames = { "IL_DistRegionAck", "IL_DistRegionNoAck" };
-
-    private UnitProcess m_client1, m_client2, m_client3;
-
-    #endregion
-
-    protected override ClientBase[] GetClients()
-    {
-      m_client1 = new UnitProcess();
-      m_client2 = new UnitProcess();
-      m_client3 = new UnitProcess();
-      return new ClientBase[] { m_client1, m_client2, m_client3 };
-    }
- 
-    [Test]
-    public void DistOps()
-    {
-      m_client1.Call(CreateRegions, AckRegionNames);
-      Util.Log("StepOne complete.");
-
-      m_client2.Call(CreateRegions, AckRegionNames);
-      Util.Log("StepTwo complete.");
-
-      m_client1.Call(StepThree);
-      Util.Log("StepThree complete.");
-
-      m_client2.Call(StepFour);
-      Util.Log("StepFour complete.");
-
-      m_client1.Call(StepFive, true);
-      Util.Log("StepFive complete.");
-
-      Util.Log("StepSix commencing.");
-      m_client2.Call(StepSix, true);
-      Util.Log("StepSix complete.");
-
-      m_client1.Call(StepSeven);
-      Util.Log("StepSeven complete.");
-
-      m_client2.Call(StepEight);
-      Util.Log("StepEight complete.");
-
-      m_client1.Call(StepNine);
-      Util.Log("StepNine complete.");
-
-      m_client2.Call(StepTen);
-      Util.Log("StepTen complete.");
-
-      m_client1.Call(StepEleven);
-      Util.Log("StepEleven complete.");
-    }
-
-  }
-}
diff --git a/clicache/integration-test/DistributedSystemTests.cs b/clicache/integration-test/DistributedSystemTests.cs
deleted file mode 100644
index 157eee2..0000000
--- a/clicache/integration-test/DistributedSystemTests.cs
+++ /dev/null
@@ -1,136 +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.
- */
-
-using System;
-
-namespace Apache.Geode.Client.UnitTests
-{
-  using NUnit.Framework;
-  using Apache.Geode.DUnitFramework;
-
-  [TestFixture]
-  [Category("unicast_only")]
-  public class DistributedSystemTests : UnitTests
-  {
-    protected override ClientBase[] GetClients()
-    {
-      return null;
-    }
-
-    [Test]
-    public void Connect()
-    {
-      try
-      {
-        DistributedSystem.Disconnect(CacheHelper.getCache());
-        Assert.Fail("NotConnectedException should have occurred when "
-          + "disconnecting without having connected.");
-      }
-      catch (NotConnectedException ex)
-      {
-        Util.Log("Got an expected exception in DistributedSystem.disconnect: "
-          + ex);
-      }
-      try
-      {
-        CacheHelper.ConnectName("ConnTest");
-      }
-      finally
-      {
-        CacheHelper.Close();
-      }
-    }
-
-    [Test]
-    public void ConnectToNull()
-    {
-      Util.Log("Creating DistributedSytem with null name...");
-      try
-      {
-        CacheHelper.ConnectName(null);
-        CacheHelper.Close();
-        Assert.Fail("IllegalArgumentException should have occurred when "
-          + "connecting to a null DistributedSystem.");
-      }
-      catch (IllegalArgumentException ex)
-      {
-        Util.Log("Got an expected exception in DistributedSystem.connect: "
-          + ex);
-      }
-    }
-
-    [Test]
-    public void Reconnect()
-    {
-      string[] memberTypes = { "PEER", "SERVER" };
-      foreach (string memberType in memberTypes)
-      {
-        // Connect and disconnect 10 times
-
-        for (int i = 0; i < 10; i++)
-        {
-          CacheHelper.InitConfig(memberType, null);
-
-          try
-          {
-            Region region1 = CacheHelper.CreatePlainRegion("R1");
-            Region region2 = CacheHelper.CreatePlainRegion("R2");
-          }
-          finally
-          {
-            CacheHelper.Close();
-          }
-        }
-      }
-    }
-
-    [Test]
-    public void Example()
-    {
-      CacheableString cVal;
-
-      Region region = CacheHelper.CreateLRURegion("exampleRegion",
-        1000, ScopeType.DistributedNoAck);
-      try
-      {
-        // put some values into the cache.
-        for (int i = 1; i <= 2000; i++)
-        {
-          region.Put("key-" + i, "value-" + i);
-        }
-
-        // do some gets... printing what we find in the cache.
-        for (int i = 1; i <= 2000; i += 100)
-        {
-          cVal = region.Get("key-" + i) as CacheableString;
-          if (cVal == null)
-          {
-            Util.Log("Didn't find key-{0} in the cache.", i);
-          }
-          else
-          {
-            Util.Log("Found key-{0} with value {1}.", i, cVal.Value);
-          }
-        }
-      }
-      finally
-      {
-        CacheHelper.Close();
-      }
-    }
-  }
-}
diff --git a/clicache/integration-test/LogTests.cs b/clicache/integration-test/LogTests.cs
index 45f2ec8..4eca1d1 100644
--- a/clicache/integration-test/LogTests.cs
+++ b/clicache/integration-test/LogTests.cs
@@ -23,7 +23,7 @@
   using NUnit.Framework;
   using Apache.Geode.DUnitFramework;
 
-
+  [Ignore("broken")]
   [TestFixture]
   [Category("unicast_only")]
   public class LogTests : UnitTests
diff --git a/clicache/integration-test/NUnitTestAddTests.ps1 b/clicache/integration-test/NUnitTestAddTests.ps1
new file mode 100644
index 0000000..b82e816
--- /dev/null
+++ b/clicache/integration-test/NUnitTestAddTests.ps1
@@ -0,0 +1,82 @@
+# 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.
+
+Param
+(
+    [Parameter(Mandatory)]
+    [string]$AssemblyPath,
+    [Parameter(Mandatory)]
+    [string]$NUnitConsolePath,
+    [Parameter(Mandatory)]
+    [string]$WorkingDirectory,
+    [Parameter(Mandatory)]
+    [string]$CTestFile,
+    [Parameter(Mandatory)]
+    [string]$SourcePath,
+    [Parameter(Mandatory)]
+    [string]$ServerLogLevel,
+    [Parameter(Mandatory)]
+    [string]$ServerSecurityLogLevel,
+    [Parameter(Mandatory)]
+    [string]$ServerClasspath,
+    [Parameter(Mandatory)]
+    [string]$GeodePath,
+    [Parameter(Mandatory)]
+    [string]$JavaPath,
+    [Parameter(Mandatory = $FALSE)]
+    [string]$EnvPath
+)
+
+#$ErrorActionPreference = "Stop
+
+Remove-Item -Path $CTestFile -Force -ErrorAction Ignore 
+
+$nunit = [reflection.assembly]::LoadFrom("nunit.Framework.dll")
+
+$assembly = [reflection.assembly]::LoadFrom($AssemblyPath)
+
+foreach ($type in $assembly.GetTypes())
+{
+    $ignoreFixture = $FALSE;
+
+    foreach ($customAttribute in $type.CustomAttributes)
+    {
+        if ($customAttribute.AttributeType.Equals([NUnit.Framework.IgnoreAttribute]))
+        {
+            $ignoreFixture = $TRUE
+        }
+    }
+
+    foreach ($method in $type.GetMethods())
+    {
+        foreach ($customAttribute in $method.CustomAttributes)
+        {
+            if ($customAttribute.AttributeType.Equals([NUnit.Framework.TestAttribute]))
+            {
+                $testName = "$($method.ReflectedType.NameSpace).$($method.ReflectedType.Name).$($method.Name)"
+                Add-Content -Path $CTestFile -Value "add_test( $testName [==[$NUnitConsolePath]==] /run:$testName [==[$AssemblyPath]==])"
+                Add-Content -Path $CTestFile -Value "set_tests_properties( $testName PROPERTIES `
+                        WORKING_DIRECTORY [==[$WorkingDirectory]==] `
+                        ENVIRONMENT [==[TESTSRC=$SourcePath;GFE_LOGLEVEL=$ServerLogLevel;GFE_SECLOGLEVEL=$ServerSecurityLogLevel;GF_JAVA=$JavaPath;GFE_DIR=$GeodePath;GF_CLASSPATH=$ServerClasspath;PATH=$EnvPath]==] `
+                        )"
+                if ($ignoreFixture -or $customAttribute.AttributeType.Equals([NUnit.Framework.IgnoreAttribute]))
+                {
+                    Add-Content -Path $CTestFile -Value "set_tests_properties( $testName PROPERTIES DISABLED True )"
+                }
+            }
+        }
+    }
+}
+
diff --git a/clicache/integration-test/NetTests.cs b/clicache/integration-test/NetTests.cs
deleted file mode 100644
index d667dc4..0000000
--- a/clicache/integration-test/NetTests.cs
+++ /dev/null
@@ -1,173 +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.
- */
-
-using System;
-using System.Threading;
-
-namespace Apache.Geode.Client.UnitTests
-{
-  using NUnit.Framework;
-  using Apache.Geode.DUnitFramework;
-
-  [TestFixture]
-  public class NetTests : UnitTests
-  {
-    private const string TestRegion = "TestRegion";
-    private const string TestRegionWrite = "TestRegionWrite";
-    private const int NumEntries = 200;
-
-    private Region m_region;
-    private Region m_netWriteRegion;
-
-    private TallyLoader m_ldr = new TallyLoader();
-    private TallyWriter m_lwr = new TallyWriter();
-
-    private UnitProcess m_client1, m_client2, m_client3;
-
-    protected override ClientBase[] GetClients()
-    {
-      m_client1 = new UnitProcess();
-      m_client2 = new UnitProcess();
-      m_client3 = new UnitProcess();
-      return new ClientBase[] { m_client1, m_client2, m_client3 };
-    }
-
-    #region Functions invoked by the tests
-
-    public void DoGets(Region region, int num)
-    {
-      for(int i = 0; i < num; i++)
-      {
-        CacheableInt32 val = region.Get(i) as CacheableInt32;
-        Assert.AreEqual(i, val.Value);
-      }
-    }
-
-    public void CreateRegionWithTallyLoader(ScopeType scope)
-    {
-      var regionAttributesFactory = new RegionAttributesFactory();
-      regionAttributesFactory.SetCacheLoader(m_ldr);
-      regionAttributesFactory.SetScope(scope);
-      regionAttributesFactory.SetCachingEnabled(true);
-
-      m_region = CacheHelper.CreateRegion(TestRegion,
-        regionAttributesFactory.Create());
-    }
-
-    public void CreateRegionAndGetNEntries(int num)
-    {
-      CacheHelper.CreateDistribRegion(TestRegion, false, true);
-      m_region = CacheHelper.GetVerifyRegion(TestRegion);
-      DoGets(m_region, num);
-      ISerializable[] arr = m_region.GetKeys();
-      Assert.AreEqual(num, arr.Length);
-    }
-
-    public void VerifyLoaderCallsAfterGets(int num)
-    {
-      Assert.AreEqual(num, m_ldr.Loads);
-      Util.Log("Calling doGets for verify");
-      //Thread.Sleep(2000);
-      //doGets(m_region, load);
-      ISerializable[] arr = m_region.GetKeys();
-      Assert.AreEqual(num, arr.Length);
-    }
-
-    public void RegionThreeLoadEntries(int num)
-    {
-      var regionAttributesFactory = new RegionAttributesFactory();
-      regionAttributesFactory.SetScope(ScopeType.Local);
-      regionAttributesFactory.SetCacheLoader(m_ldr);
-      m_region = CacheHelper.CreateRegion(TestRegion, regionAttributesFactory.Create());
-      m_ldr.Reset();
-      Thread.Sleep(100);
-      DoGets(m_region, num);
-      Assert.AreEqual(num, m_ldr.Loads);
-      ISerializable[] arr = m_region.GetKeys();
-      Assert.AreEqual(num, arr.Length);
-    }
-
-    public void CreateRegionWithTallyWriter(ScopeType scope)
-    {
-      var regionAttributesFactory = new RegionAttributesFactory();
-      regionAttributesFactory.SetCacheWriter(m_lwr);
-      regionAttributesFactory.SetScope(scope);
-      regionAttributesFactory.SetCachingEnabled(true);
-
-      m_netWriteRegion = CacheHelper.CreateRegion(TestRegionWrite,
-        regionAttributesFactory.Create());
-    }
-
-    public void RegionTwoCreateEntries(int num)
-    {
-      CacheHelper.CreateDistribRegion(TestRegionWrite, false, true);
-      m_netWriteRegion = CacheHelper.GetVerifyRegion(TestRegionWrite);
-      Thread.Sleep(100);
-      TestCreateEntryActions(num);
-    }
-
-    public void TestCreateEntryActions(int num)
-    {
-      for (int i = 0; i < num; i++)
-      {
-        CacheableInt32 key = new CacheableInt32(i);
-        m_netWriteRegion.Put(key, key);
-      }
-    }
-
-    public void TestUpdateActions(int num)
-    {
-      for (int i = 0; i < num; i++)
-      {
-        CacheableInt32 key = new CacheableInt32(i);
-        m_netWriteRegion.Put(key, key);
-      }
-    }
-
-    public void VerifyWriterCallsAfterCreate(int num)
-    {
-      Assert.AreEqual(num, m_lwr.Creates);
-    }
-
-    public void VerifyWriterCallsAfterUpdates(int num)
-    {
-      Assert.AreEqual(num, m_lwr.Creates);
-      Assert.AreEqual(num, m_lwr.Updates);
-    }
-
-    #endregion
-
-    [Test]
-    public void LoaderTest()
-    {
-      m_client1.Call(CreateRegionWithTallyLoader, ScopeType.DistributedNoAck);
-      m_client2.Call(CreateRegionAndGetNEntries, NumEntries);
-      m_client1.Call(VerifyLoaderCallsAfterGets, NumEntries);
-      m_client3.Call(RegionThreeLoadEntries, NumEntries);
-    }
-
-    [Test]
-    public void WriterTest()
-    {
-      m_client1.Call(CreateRegionWithTallyWriter, ScopeType.DistributedNoAck);
-      m_client2.Call(RegionTwoCreateEntries, NumEntries);
-      m_client1.Call(VerifyWriterCallsAfterCreate, NumEntries);
-      m_client2.Call(TestUpdateActions, NumEntries);
-      m_client1.Call(VerifyWriterCallsAfterUpdates, NumEntries);
-    }
-  }
-}
diff --git a/clicache/integration-test/OverflowTestsN.cs b/clicache/integration-test/OverflowTestsN.cs
index f82dddb..ea3b86c 100644
--- a/clicache/integration-test/OverflowTestsN.cs
+++ b/clicache/integration-test/OverflowTestsN.cs
@@ -29,6 +29,7 @@
   using Apache.Geode.DUnitFramework;
   using Apache.Geode.Client;
 
+  [Ignore("broken")]
   [TestFixture]
   [Category("group4")]
   [Category("unicast_only")]
diff --git a/clicache/integration-test/PutGetPerfTests.cs b/clicache/integration-test/PutGetPerfTests.cs
deleted file mode 100644
index 606df48..0000000
--- a/clicache/integration-test/PutGetPerfTests.cs
+++ /dev/null
@@ -1,333 +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.
- */
-
-using System;
-
-namespace Apache.Geode.Client.UnitTests
-{
-  using NUnit.Framework;
-  using Apache.Geode.DUnitFramework;
-
-  [TestFixture]
-  public class PutGetPerfTests : UnitTests
-  {
-    #region Constants
-
-    private const int MaxKeys = 25000;
-    private const bool Mirrored = false;
-
-    #endregion
-
-    private CacheableString[] keysA = null;
-    private CacheableString[] keysB = null;
-    private CacheableString[] valuesA = null;
-    private CacheableString[] valuesB = null;
-
-    private CacheableInt32[] intKeysA = null;
-    private CacheableInt32[] intKeysB = null;
-    private CacheableInt32[] intValuesA = null;
-    private CacheableInt32[] intValuesB = null;
-
-    private UnitProcess m_client1, m_client2, m_client3, m_client4;
-
-    protected override ClientBase[] GetClients()
-    {
-      m_client1 = new UnitProcess();
-      m_client2 = new UnitProcess();
-      m_client3 = new UnitProcess();
-      m_client4 = new UnitProcess();
-      return new ClientBase[] { m_client1, m_client2, m_client3, m_client4 };
-    }
-
-    #region Private functions
-
-    private void InitStringObjects(int num, string prefix,
-      ref CacheableString[] strings)
-    {
-      if (num > 0)
-      {
-        strings = new CacheableString[num];
-        for (int i = 1; i <= num; i++)
-        {
-          strings[i - 1] = new CacheableString(prefix + i.ToString());
-        }
-      }
-    }
-
-    private void InitIntObjects(int num, int offset, int factor,
-      ref CacheableInt32[] ints)
-    {
-      if (num > 0)
-      {
-        ints = new CacheableInt32[num];
-        for (int i = 1; i <= num; i++)
-        {
-          ints[i - 1] = new CacheableInt32(offset + i * factor);
-        }
-      }
-    }
-
-    private void Puts(CacheableKey[] keys, Serializable[] values,
-      int offset, int numIters, int step)
-    {
-      if (keys != null && values != null && keys.Length == values.Length)
-      {
-        int numKeys = keys.Length;
-        if (numIters <= 0)
-        {
-          numIters = numKeys;
-        }
-        for (int i = offset; i < offset + numIters; i += step)
-        {
-          CacheHelper.CurrentRegion.Put(keys[i % numKeys], values[i % numKeys]);
-        }
-      }
-    }
-
-    private void Gets(CacheableKey[] keys,
-      int offset, int numIters, int step)
-    {
-      if (keys != null)
-      {
-        int numKeys = keys.Length;
-        if (numIters <= 0)
-        {
-          numIters = numKeys;
-        }
-        for (int i = offset; i < offset + numIters; i += step)
-        {
-          CacheHelper.CurrentRegion.Get(keys[i % numKeys]);
-        }
-      }
-    }
-
-    #endregion
-
-    #region Functions that are invoked by the tests
-
-    public enum RegionOp { Put, Get }
-    public enum KeysSelect { KeysA, KeysB, IntKeysA, IntKeysB }
-
-    public void InitKeysValues(int num)
-    {
-      InitStringObjects(num, "KeysA - ", ref keysA);
-      InitStringObjects(num, "KeysB - ", ref keysB);
-      InitStringObjects(num, "ValuesA - ", ref valuesA);
-      InitStringObjects(num, "ValuesB - ", ref valuesB);
-
-      InitIntObjects(num, 1, 2, ref intKeysA);
-      InitIntObjects(num, 0, 2, ref intKeysB);
-      InitIntObjects(num, 0, 2, ref intValuesA);
-      InitIntObjects(num, 1, 2, ref intValuesB);
-    }
-
-    public void RegionOpsAB(RegionOp op, KeysSelect sel,
-      int offset, int numIters, int step)
-    {
-      CacheableKey[] keys = null;
-      Serializable[] values = null;
-      switch (sel)
-      {
-        case KeysSelect.KeysA:
-          keys = (CacheableKey[])keysA;
-          values = (Serializable[])valuesA;
-          break;
-        case KeysSelect.KeysB:
-          keys = (CacheableKey[])keysB;
-          values = (Serializable[])valuesB;
-          break;
-        case KeysSelect.IntKeysA:
-          keys = (CacheableKey[])intKeysA;
-          values = (Serializable[])intValuesA;
-          break;
-        case KeysSelect.IntKeysB:
-          keys = (CacheableKey[])intKeysB;
-          values = (Serializable[])intValuesB;
-          break;
-      }
-      switch (op)
-      {
-        case RegionOp.Put:
-          Puts(keys, values, offset, numIters, step);
-          break;
-        case RegionOp.Get:
-          Gets(keys, offset, numIters, step);
-          break;
-      }
-    }
-
-    public void CheckNumKeys(int numExpected)
-    {
-      int numKeys = 0;
-      string message;
-      ISerializable[] keys = CacheHelper.CurrentRegion.GetKeys();
-      if (keys != null)
-      {
-        numKeys = keys.Length;
-      }
-      if (numExpected == 0)
-      {
-        message = "Region is not empty.";
-      }
-      else
-      {
-        message = "Region does not contain the expected number of entries.";
-      }
-      Assert.AreEqual(numExpected, numKeys, message);
-    }
-
-    #endregion
-
-    [TestFixtureSetUp]
-    public override void InitTests()
-    {
-      base.InitTests();
-
-      m_client1.Call(InitKeysValues, MaxKeys);
-      m_client2.Call(InitKeysValues, MaxKeys);
-      m_client3.Call(InitKeysValues, MaxKeys);
-      m_client4.Call(InitKeysValues, MaxKeys);
-    }
-
-    private void DoCommonDistribTests(string putTestName, int putIters,
-      string failTestName, int failIters, string proc2TestName)
-    {
-      StartTimer();
-      m_client1.Call(RegionOpsAB, RegionOp.Put, KeysSelect.KeysA, 0, putIters, 1);
-      LogTaskTiming(m_client1, putTestName, putIters);
-
-      StartTimer();
-      m_client1.Call(RegionOpsAB, RegionOp.Get, KeysSelect.KeysB, 0, failIters, 1);
-      LogTaskTiming(m_client1, failTestName, failIters);
-
-     
-      m_client2.Call(CheckNumKeys, 0);
-      StartTimer();
-      m_client2.Call(RegionOpsAB, RegionOp.Get, KeysSelect.KeysA, 0, MaxKeys, 1);
-      LogTaskTiming(m_client2, proc2TestName, MaxKeys);
-      m_client2.Call(CheckNumKeys, MaxKeys);
-    }
-
-    [Test]
-    public void NoPeers()
-    {
-      int numIters = 50 * MaxKeys;
-
-      m_client1.Call(CacheHelper.CreateScopeRegion, "LocalOnly", ScopeType.Local, true);
-
-      StartTimer();
-      m_client1.Call(RegionOpsAB, RegionOp.Put, KeysSelect.KeysA, 0, numIters, 1);
-      LogTaskTiming(m_client1, "LocalPuts", numIters);
-
-      StartTimer();
-      m_client1.Call(RegionOpsAB, RegionOp.Get, KeysSelect.KeysA, 0, numIters, 1);
-      LogTaskTiming(m_client1, "LocalGets", numIters);
-
-      StartTimer();
-      m_client1.Call(RegionOpsAB, RegionOp.Get, KeysSelect.KeysB, 0, numIters, 1);
-      LogTaskTiming(m_client1, "LocalFailGets", numIters);
-
-      m_client1.Call(CacheHelper.DestroyRegion, "LocalOnly", false, true);
-
-      m_client1.Call(CacheHelper.CreateScopeRegion, "DistNoPeers", ScopeType.DistributedNoAck, true);
-
-      StartTimer();
-      m_client1.Call(RegionOpsAB, RegionOp.Put, KeysSelect.KeysA, 0, numIters, 1);
-      LogTaskTiming(m_client1, "DistNoPeersPuts", numIters);
-
-      m_client1.Call(CacheHelper.DestroyRegion, "DistNoPeers", false, true);
-    }
-
-    [Test]
-    public void NoAck2Proc()
-    {
-      m_client1.Call(CacheHelper.CreateScopeRegion, "NoAck2Proc", ScopeType.DistributedNoAck, true);
-      m_client2.Call(CacheHelper.CreateScopeRegion, "NoAck2Proc", ScopeType.DistributedNoAck, true);
-
-      DoCommonDistribTests("NoAck2ProcPuts", 10 * MaxKeys,
-        "NoAck2ProcNetsearchFail", 2 * MaxKeys, "NoAck2ProcNetsearch");
-
-      m_client1.Call(CacheHelper.DestroyRegion, "NoAck2Proc", false, true);
-    }
-
-    [Test]
-    public void Ack2Proc()
-    {
-      m_client1.Call(CacheHelper.CreateScopeRegion, "Ack2Proc", ScopeType.DistributedAck, true);
-      m_client2.Call(CacheHelper.CreateScopeRegion, "Ack2Proc", ScopeType.DistributedAck, true);
-
-      DoCommonDistribTests("Ack2ProcPuts", 2 * MaxKeys,
-        "Ack2ProcNetsearchFail", MaxKeys, "Ack2ProcNetsearch");
-
-      m_client1.Call(CacheHelper.DestroyRegion, "Ack2Proc", false, true);
-    }
-
-    [Test]
-    public void NoAck3Proc()
-    {
-      m_client1.Call(CacheHelper.CreateScopeRegion, "NoAck3Proc", ScopeType.DistributedNoAck, true);
-      m_client2.Call(CacheHelper.CreateScopeRegion, "NoAck3Proc", ScopeType.DistributedNoAck, true);
-      m_client3.Call(CacheHelper.CreateScopeRegion, "NoAck3Proc", ScopeType.DistributedNoAck, true);
-
-      DoCommonDistribTests("NoAck3ProcPuts", 2 * MaxKeys,
-        "NoAck3ProcNetsearchFail", MaxKeys, "NoAck3ProcNetsearch");
-
-      m_client1.Call(CacheHelper.DestroyRegion, "NoAck3Proc", false, true);
-    }
-
-    [Test]
-    public void Ack3Proc()
-    {
-      m_client1.Call(CacheHelper.CreateScopeRegion, "Ack3Proc", ScopeType.DistributedAck, true);
-      m_client2.Call(CacheHelper.CreateScopeRegion, "Ack3Proc", ScopeType.DistributedAck, true);
-      m_client3.Call(CacheHelper.CreateScopeRegion, "Ack3Proc", ScopeType.DistributedAck, true);
-
-      DoCommonDistribTests("Ack3ProcPuts", MaxKeys,
-        "Ack3ProcNetsearchFail", MaxKeys, "Ack3ProcNetsearch");
-
-      m_client1.Call(CacheHelper.DestroyRegion, "Ack3Proc", false, true);
-    }
-
-    [Test]
-    public void NoAck4Proc()
-    {
-      m_client1.Call(CacheHelper.CreateScopeRegion, "NoAck4Proc", ScopeType.DistributedNoAck, true);
-      m_client2.Call(CacheHelper.CreateScopeRegion, "NoAck4Proc", ScopeType.DistributedNoAck, true);
-      m_client3.Call(CacheHelper.CreateScopeRegion, "NoAck4Proc", ScopeType.DistributedNoAck, true);
-      m_client4.Call(CacheHelper.CreateScopeRegion, "NoAck4Proc", ScopeType.DistributedNoAck, true);
-
-      DoCommonDistribTests("NoAck4ProcPuts", MaxKeys,
-        "NoAck4ProcNetsearchFail", MaxKeys, "NoAck4ProcNetsearch");
-
-      m_client1.Call(CacheHelper.DestroyRegion, "NoAck4Proc", false, true);
-    }
-
-    [Test]
-    public void Ack4Proc()
-    {
-      m_client1.Call(CacheHelper.CreateScopeRegion, "Ack4Proc", ScopeType.DistributedAck, true);
-      m_client2.Call(CacheHelper.CreateScopeRegion, "Ack4Proc", ScopeType.DistributedAck, true);
-      m_client3.Call(CacheHelper.CreateScopeRegion, "Ack4Proc", ScopeType.DistributedAck, true);
-      m_client4.Call(CacheHelper.CreateScopeRegion, "Ack4Proc", ScopeType.DistributedAck, true);
-
-      DoCommonDistribTests("Ack4ProcPuts", MaxKeys,
-        "Ack4ProcNetsearchFail", MaxKeys, "Ack4ProcNetsearch");
-
-      m_client1.Call(CacheHelper.DestroyRegion, "Ack4Proc", false, true);
-    }
-  }
-}
diff --git a/tests/cli/QueryHelper/QueryHelperN.cs b/clicache/integration-test/QueryHelperN.cs
similarity index 100%
rename from tests/cli/QueryHelper/QueryHelperN.cs
rename to clicache/integration-test/QueryHelperN.cs
diff --git a/clicache/integration-test/RegionEntryTests.cs b/clicache/integration-test/RegionEntryTests.cs
deleted file mode 100644
index 9c74bd0..0000000
--- a/clicache/integration-test/RegionEntryTests.cs
+++ /dev/null
@@ -1,105 +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.
- */
-
-using System;
-
-namespace Apache.Geode.Client.UnitTests
-{
-  using NUnit.Framework;
-  using Apache.Geode.DUnitFramework;
-
-  [TestFixture]
-  [Category("unicast_only")]
-  public class RegionEntryTests : UnitTests
-  {
-    private const string hostName = "REGIONENTRYTEST";
-    private const string regionName = "TESTREGIONENTRY_ROOT_REGION";
-    private Region region;
-
-    protected override ClientBase[] GetClients()
-    {
-      return null;
-    }
-
-    [TestFixtureSetUp]
-    public override void InitTests()
-    {
-      base.InitTests();
-      CacheHelper.InitName(hostName, hostName);
-    }
-
-    [TestFixtureTearDown]
-    public override void EndTests()
-    {
-      try
-      {
-        CacheHelper.Close();
-      }
-      finally
-      {
-        base.EndTests();
-      }
-    }
-
-    public void TestEntries(Region region, int num)
-    {
-      string regionName = region.Name;
-      Util.Log("Creating {0} entries in Region {1}", num, regionName);
-
-      for (int i = 0; i < num; i++)
-      {
-        region.Create(regionName + ": " + i.ToString(),
-          regionName + ": value of " + i.ToString());
-      }
-      ICacheableKey[] cKeys = region.GetKeys();
-      ISerializable[] cValues = region.GetValues();
-      Assert.AreEqual(num, cKeys.Length, "Number of keys in region is incorrect.");
-      Assert.AreEqual(num, cValues.Length, "Number of values in region is incorrect.");
-
-      foreach (ICacheableKey key in cKeys)
-      {
-        region.LocalInvalidate(key);
-      }
-      cKeys = region.GetKeys();
-      cValues = region.GetValues();
-      Assert.AreEqual(num, cKeys.Length, "Number of keys in region is incorrect after invalidate.");
-      Assert.AreEqual(0, cValues.Length, "Number of values in region is incorrect after invalidate.");
-
-      foreach (ICacheableKey key in cKeys)
-      {
-        region.LocalDestroy(key);
-      }
-      cKeys = region.GetKeys();
-      cValues = region.GetValues();
-      Assert.AreEqual(0, cKeys.Length, "Number of keys in region is incorrect after destroy.");
-      Assert.AreEqual(0, cValues.Length, "Number of values in region is incorrect after destroy.");
-    }
-
-    [Test]
-    public void RegionEntryFunction()
-    {
-      CacheHelper.CreatePlainRegion(regionName);
-      region = CacheHelper.GetVerifyRegion(regionName);
-
-      TestEntries(region, 10);
-      TestEntries(region, 100);
-      TestEntries(region, 10000);
-
-      region.LocalDestroyRegion();
-    }
-  }
-}
diff --git a/clicache/integration-test/RegionFailingTests.cs b/clicache/integration-test/RegionFailingTests.cs
index da05188..5272822 100644
--- a/clicache/integration-test/RegionFailingTests.cs
+++ b/clicache/integration-test/RegionFailingTests.cs
@@ -26,6 +26,7 @@
   using DUnitFramework;
   using Client;
 
+  [Ignore("broken")]
   [TestFixture]
   [Category("group4")]
   [Category("unicast_only")]
diff --git a/clicache/integration-test/ThinClientDeltaTestFailing.cs b/clicache/integration-test/ThinClientDeltaTestFailing.cs
index f940105..78c0f98 100644
--- a/clicache/integration-test/ThinClientDeltaTestFailing.cs
+++ b/clicache/integration-test/ThinClientDeltaTestFailing.cs
@@ -148,6 +148,7 @@
       #endregion
     }
 
+    [Ignore("broken")]
     [TestFixture]
     [Category("group1")]
     [Category("unicast_only")]
diff --git a/clicache/integration-test/ThinClientDurableTestsN.cs b/clicache/integration-test/ThinClientDurableTestsN.cs
index 385a3ff..0a37257 100644
--- a/clicache/integration-test/ThinClientDurableTestsN.cs
+++ b/clicache/integration-test/ThinClientDurableTestsN.cs
@@ -27,6 +27,8 @@
 
 
   using AssertionException = Apache.Geode.Client.AssertionException;
+  
+  [Ignore("broken")]
   [TestFixture]
   [Category("group2")]
   [Category("unicast_only")]
diff --git a/clicache/integration-test/ThinClientHARegionTestsN.cs b/clicache/integration-test/ThinClientHARegionTestsN.cs
index 87be756..0eced60 100644
--- a/clicache/integration-test/ThinClientHARegionTestsN.cs
+++ b/clicache/integration-test/ThinClientHARegionTestsN.cs
@@ -28,6 +28,7 @@
 
   using Region = Apache.Geode.Client.IRegion<Object, Object>;
 
+  [Ignore("broken")]
   [TestFixture]
   [Category("group4")]
   [Category("unicast_only")]
diff --git a/clicache/integration-test/ThinClientPoolTestsN.cs b/clicache/integration-test/ThinClientPoolTestsN.cs
index 79ba314..84a6a0e 100644
--- a/clicache/integration-test/ThinClientPoolTestsN.cs
+++ b/clicache/integration-test/ThinClientPoolTestsN.cs
@@ -27,6 +27,7 @@
   using Apache.Geode.Client;
   using Region = Apache.Geode.Client.IRegion<Object, Object>;
 
+  [Ignore("flaky")]
   [TestFixture]
   [Category("group2")]
   [Category("unicast_only")]
diff --git a/clicache/integration-test/ThinClientQueryTestsN.cs b/clicache/integration-test/ThinClientQueryTestsN.cs
index d4edc35..6004400 100644
--- a/clicache/integration-test/ThinClientQueryTestsN.cs
+++ b/clicache/integration-test/ThinClientQueryTestsN.cs
@@ -31,6 +31,7 @@
   using QueryCategory = Apache.Geode.Client.Tests.QueryCategory;
   using QueryStrings = Apache.Geode.Client.Tests.QueryStrings;
 
+  [Ignore("flaky")]
   [TestFixture]
   [Category("group1")]
   [Category("unicast_only")]
diff --git a/clicache/integration-test/ThinClientSecurityAuthTestsMUN.cs b/clicache/integration-test/ThinClientSecurityAuthTestsMUN.cs
index 37df5fb..84bb93f 100644
--- a/clicache/integration-test/ThinClientSecurityAuthTestsMUN.cs
+++ b/clicache/integration-test/ThinClientSecurityAuthTestsMUN.cs
@@ -25,6 +25,8 @@
   using Apache.Geode.Client.Tests;
   using Apache.Geode.DUnitFramework;
   using Apache.Geode.Client;
+
+  [Ignore("broken")]
   [TestFixture]
   [Category("group4")]
   [Category("unicast_only")]
diff --git a/clicache/integration-test/ThinClientSecurityAuthTestsN.cs b/clicache/integration-test/ThinClientSecurityAuthTestsN.cs
index 40062dc..de2bd7b 100644
--- a/clicache/integration-test/ThinClientSecurityAuthTestsN.cs
+++ b/clicache/integration-test/ThinClientSecurityAuthTestsN.cs
@@ -26,6 +26,7 @@
   using Apache.Geode.DUnitFramework;
   using Apache.Geode.Client;
 
+  [Ignore("broken")]
   [TestFixture]
   [Category("group1")]
   [Category("unicast_only")]
diff --git a/clicache/integration-test/ThinClientSecurityAuthzTestsMUN.cs b/clicache/integration-test/ThinClientSecurityAuthzTestsMUN.cs
index 4ab7d21..1b1cb9f 100644
--- a/clicache/integration-test/ThinClientSecurityAuthzTestsMUN.cs
+++ b/clicache/integration-test/ThinClientSecurityAuthzTestsMUN.cs
@@ -71,6 +71,7 @@
     #endregion
   }
 
+  [Ignore("broken")]
   [TestFixture]
   [Category("group4")]
   [Category("unicast_only")]
diff --git a/clicache/integration-test/ThinClientSecurityAuthzTestsN.cs b/clicache/integration-test/ThinClientSecurityAuthzTestsN.cs
index 31bcd41..e608a1e 100644
--- a/clicache/integration-test/ThinClientSecurityAuthzTestsN.cs
+++ b/clicache/integration-test/ThinClientSecurityAuthzTestsN.cs
@@ -26,6 +26,7 @@
   using Apache.Geode.Client.Tests;
   using Apache.Geode.Client;
 
+  [Ignore("broken")]
   [TestFixture]
   [Category("group3")]
   [Category("unicast_only")]
diff --git a/clicache/integration-test/UnitTests.csproj.in b/clicache/integration-test/UnitTests.csproj.in
deleted file mode 100644
index c1c0152..0000000
--- a/clicache/integration-test/UnitTests.csproj.in
+++ /dev/null
@@ -1,679 +0,0 @@
-<?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.
--->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
-  <PropertyGroup>
-    <CMAKE_SOURCE_DIR>${CMAKE_SOURCE_DIR_NATIVE}</CMAKE_SOURCE_DIR>
-    <CMAKE_CURRENT_SOURCE_DIR>${CMAKE_CURRENT_SOURCE_DIR_NATIVE}</CMAKE_CURRENT_SOURCE_DIR>
-	<CMAKE_BINARY_DIR>${CMAKE_BINARY_DIR_NATIVE}</CMAKE_BINARY_DIR>
-	<CMAKE_CURRENT_BINARY_DIR>${CMAKE_CURRENT_BINARY_DIR_NATIVE}</CMAKE_CURRENT_BINARY_DIR>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">x64</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{CC6D226A-1DFF-31D1-89D1-D99420F6AF72}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Apache.Geode.Client.UnitTests</RootNamespace>
-    <AssemblyName>UnitTests</AssemblyName>
-    <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
-    <FileUpgradeFlags>
-    </FileUpgradeFlags>
-    <OldToolsVersion>2.0</OldToolsVersion>
-    <UpgradeBackupLocation />
-    <PublishUrl>publish\</PublishUrl>
-    <Install>true</Install>
-    <InstallFrom>Disk</InstallFrom>
-    <UpdateEnabled>false</UpdateEnabled>
-    <UpdateMode>Foreground</UpdateMode>
-    <UpdateInterval>7</UpdateInterval>
-    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
-    <UpdatePeriodically>false</UpdatePeriodically>
-    <UpdateRequired>false</UpdateRequired>
-    <MapFileExtensions>true</MapFileExtensions>
-    <ApplicationRevision>0</ApplicationRevision>
-    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
-    <IsWebBootstrapper>false</IsWebBootstrapper>
-    <UseApplicationTrust>false</UseApplicationTrust>
-    <BootstrapperEnabled>true</BootstrapperEnabled>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <IntermediateOutputPath>Debug</IntermediateOutputPath>
-    <OutputPath>Debug</OutputPath>
-    <Optimize>false</Optimize>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <PlatformTarget>x86</PlatformTarget>
-    <NoWarn>618</NoWarn>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <IntermediateOutputPath>Release</IntermediateOutputPath>
-    <OutputPath>Release</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <PlatformTarget>x86</PlatformTarget>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <NoWarn>618</NoWarn>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
-    <DebugSymbols>true</DebugSymbols>
-    <Optimize>false</Optimize>
-    <IntermediateOutputPath>Debug</IntermediateOutputPath>
-    <OutputPath>Debug</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DebugType>full</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <NoWarn>618</NoWarn>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <IntermediateOutputPath>Release</IntermediateOutputPath>
-    <OutputPath>Release</OutputPath>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <NoWarn>618</NoWarn>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' ">
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <IntermediateOutputPath>RelWithDebInfo</IntermediateOutputPath>
-    <OutputPath>RelWithDebInfo</OutputPath>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <NoWarn>618</NoWarn>
-  </PropertyGroup>
-  <PropertyGroup>
-    <SignAssembly>${STRONG_NAME_KEY_ENABLED}</SignAssembly>
-    <AssemblyOriginatorKeyFile>${STRONG_NAME_KEY}</AssemblyOriginatorKeyFile>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="nunit.framework">
-      <HintPath>${NUNIT}\bin\framework\nunit.framework.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="System" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Management" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="$(CMAKE_SOURCE_DIR)\tests\cli\NewTestObject\PortfolioPdx.cs">
-      <Link>PortfolioPdx.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_SOURCE_DIR)\tests\cli\NewTestObject\PositionPdx.cs">
-      <Link>PositionPdx.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_SOURCE_DIR)\tests\cli\QueryHelper\QueryHelperN.cs">
-      <Link>QueryHelperN.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_SOURCE_DIR)\tests\cli\NewTestObject\Portfolio.cs">
-      <Link>Portfolio.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_SOURCE_DIR)\tests\cli\NewTestObject\Position.cs">
-      <Link>Position.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_SOURCE_DIR)\tests\cli\NewTestObject\SimpleCacheListener.cs">
-      <Link>SimpleCacheListener.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\AssemblyInfo.cs">
-      <Link>AssemblyInfo.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DataOutputTests.cs">
-      <Link>DataOutputTests.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DefaultCacheableN.cs">
-      <Link>DefaultCacheableN.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\TallyListener.cs">
-      <Link>TallyListener.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\TallyResolverN.cs">
-      <Link>TallyResolverN.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\TallyWriter.cs">
-      <Link>TallyWriter.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientCallbackArgN.cs">
-      <Link>ThinClientCallbackArgN.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientDurableCqTestsN.cs">
-      <Link>ThinClientDurableCqTestsN.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientPdxTests1.cs">
-      <Link>ThinClientPdxTests1.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientPdxTests2.cs">
-      <Link>ThinClientPdxTests2.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientPdxTests3.cs">
-      <Link>ThinClientPdxTests3.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientNameTests.cs">
-      <Link>ThinClientNameTests.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientPdxLocalTests.cs">
-      <Link>ThinClientPdxLocalTests.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientPdxVersionTests.cs">
-      <Link>ThinClientPdxVersionTests.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientSecurityAuthSetAuthInitializeTests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\RegionAttributesFactoryTestsN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\AttributesMutatorTestsN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\CacheHelperN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\CachelessTestsN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DistOpsStepsN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\PutGetTestsN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\RegionWrapperN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\SecurityTestUtilN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\TallyListenerN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\TallyLoaderN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\TallyWriterN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRegionStepsN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRegionTestsN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\RegionFailoverTests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\RegionFailingTests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\RegionRemoveTests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\UnitTestsN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRegionInterestListTests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRegionInterestListWithPdxTests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRegionInterestList2Tests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRegionInterestRegexInterestTests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRegionInterestRegexInterest2Tests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRegionInterestRegexInterest3Tests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRegionInterestResultPolicyInvTests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRegionInterestFailoverInterestTests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRegionInterestFailoverInterest2Tests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRegionInterestFailoverRegexInterestTests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRegionInterestNotifyTests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientSecurityAuthTestsN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientSecurityAuthTestsMUN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientSecurityAuthzTestBaseN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientSecurityAuthzTestsMUN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientSecurityAuthzTestsN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientQueryTestsN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRemoteQueryResultSetTests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRemoteParamQueryResultSetTests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRemoteQueryStructSetTests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRemoteParamQueryStructSetTests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRemoteQueryFailoverTests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRemoteQueryExclusivenessTests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRegionQueryTests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientAppDomainQueryTests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientAppDomainFunctionExecutionTests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\TestCacheXmlInitializationN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\BuiltinCacheableWrappersN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\CacheableWrapperN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DupListenerN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\RegionOperationN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientFunctionExecutionTestsN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientHARegionTestsN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientListenerWriterN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientPoolTestsN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DurableListenerN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientDurableTestsN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ExpirationTestsN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\OverflowTestsN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\SerializationTestsN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientConflationTestsN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientCqIRTestsN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientCqPdxTest.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientCqAttributesMutatorTests.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientCqTest.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientCqStatusTest.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientCqStatusTestTwoServers.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientStringArrayTestsN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientCSTXN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientDeltaTest.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientDeltaTestFailing.cs" />
-    <Compile Include="$(CMAKE_SOURCE_DIR)\tests\cli\NewTestObject\DeltaTestImpl.cs">
-      <Link>DeltaTestImpl.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_SOURCE_DIR)\tests\cli\NewTestObject\TestObject1.cs">
-      <Link>TestObject1.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_SOURCE_DIR)\tests\cli\NewTestObject\DeltaEx.cs">
-      <Link>DeltaEx.cs</Link>
-    </Compile>
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="$(CMAKE_CURRENT_SOURCE_DIR)\geode.properties.mixed">
-      <Link>geode.properties.mixed</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Include="$(CMAKE_CURRENT_SOURCE_DIR)\geode.properties.nativeclient">
-      <Link>geode.properties.nativeclient</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Include="$(CMAKE_CURRENT_SOURCE_DIR)\system.properties">
-      <Link>system.properties</Link>
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </None>
-    <None Include="authz5_5.dtd" />
-    <None Include="cdb.pl" />
-    <None Include="runCSFunctions.sh" />
-    <None Include="runCSTests.sh" />
-  </ItemGroup>
-  <ItemGroup>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_notify_subscription_forDoc.xml">
-      <Link>cacheserver_notify_subscription_forDoc.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver1_partitioned.xml">
-      <Link>cacheserver1_partitioned.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver1_TradeKey.xml">
-      <Link>cacheserver1_TradeKey.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver2_partitioned.xml">
-      <Link>cacheserver2_partitioned.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver2_TradeKey.xml">
-      <Link>cacheserver2_TradeKey.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver3_TradeKey.xml">
-      <Link>cacheserver3_TradeKey.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserverDurableCqs.xml">
-      <Link>cacheserverDurableCqs.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_pdxinstance_hashcode.xml">
-      <Link>cacheserver_pdxinstance_hashcode.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_servergroup.xml">
-      <Link>cacheserver_servergroup.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_servergroup2.xml">
-      <Link>cacheserver_servergroup2.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\client_generics_plugins.xml">
-      <Link>client_generics_plugins.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\client_pdx.xml">
-      <Link>client_pdx.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\Settings.xml">
-      <Link>Settings.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\Timeouts.xml">
-      <Link>Timeouts.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\valid_overflowAttr.xml">
-      <Link>valid_overflowAttr.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver.xml">
-      <Link>cacheserver.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserverPdxSerializer.xml">
-      <Link>cacheserverPdxSerializer.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheServer_pdxreadserialized.xml">
-      <Link>cacheServer_pdxreadserialized.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserverPdx2.xml">
-      <Link>cacheserverPdx2.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserverForPdx.xml">
-      <Link>cacheserverForPdx.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserverMDS1.xml">
-      <Link>cacheserverMDS1.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserverMDS2.xml">
-      <Link>cacheserverMDS2.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserverPdx.xml">
-      <Link>cacheserverPdx.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver1_expiry.xml">
-      <Link>cacheserver1_expiry.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver1_fpr.xml">
-      <Link>cacheserver1_fpr.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver1_pool.xml">
-      <Link>cacheserver1_pool.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver1_pr.xml">
-      <Link>cacheserver1_pr.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver2.xml">
-      <Link>cacheserver2.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver2_fpr.xml">
-      <Link>cacheserver2_fpr.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver2_pool.xml">
-      <Link>cacheserver2_pool.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver2_pr.xml">
-      <Link>cacheserver2_pr.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver3.xml">
-      <Link>cacheserver3.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver3_fpr.xml">
-      <Link>cacheserver3_fpr.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver3_pool.xml">
-      <Link>cacheserver3_pool.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver3_pr.xml">
-      <Link>cacheserver3_pr.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_conflation.xml">
-      <Link>cacheserver_conflation.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_hashcode.xml">
-      <Link>cacheserver_hashcode.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_interest_notify.xml">
-      <Link>cacheserver_interest_notify.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_notify_subscription.xml">
-      <Link>cacheserver_notify_subscription.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_notify_subscription2.xml">
-      <Link>cacheserver_notify_subscription2.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_notify_subscription3.xml">
-      <Link>cacheserver_notify_subscription3.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_notify_subscription4.xml">
-      <Link>cacheserver_notify_subscription4.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_notify_subscription5.xml">
-      <Link>cacheserver_notify_subscription5.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_notify_subscription5N.xml">
-      <Link>cacheserver_notify_subscription5N.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_notify_subscription6.xml">
-      <Link>cacheserver_notify_subscription6.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_pool_client.xml">
-      <Link>cacheserver_pool_client.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_remoteoql.xml">
-      <Link>cacheserver_remoteoql.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_remoteoql2.xml">
-      <Link>cacheserver_remoteoql2.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_remoteoqlN.xml">
-      <Link>cacheserver_remoteoqlN.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_remoteoql2N.xml">
-      <Link>cacheserver_remoteoql2N.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_with_delta.xml">
-      <Link>cacheserver_with_delta.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_with_deltaAD.xml">
-      <Link>cacheserver_with_deltaAD.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_with_delta_test_impl.xml">
-      <Link>cacheserver_with_delta_test_impl.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\CacheServPoolRedun1.xml">
-      <Link>CacheServPoolRedun1.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\CacheServPoolRedun2.xml">
-      <Link>CacheServPoolRedun2.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\CacheServPoolRedun3.xml">
-      <Link>CacheServPoolRedun3.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cache_redundancy.xml">
-      <Link>cache_redundancy.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\client_pool.xml">
-      <Link>client_pool.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\invalid_cache1.xml">
-      <Link>invalid_cache1.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\invalid_cache2.xml">
-      <Link>invalid_cache2.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\invalid_cache3.xml">
-      <Link>invalid_cache3.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\invalid_cache_pool.xml">
-      <Link>invalid_cache_pool.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\invalid_cache_pool2.xml">
-      <Link>invalid_cache_pool2.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\invalid_cache_pool3.xml">
-      <Link>invalid_cache_pool3.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\invalid_cache_pool4.xml">
-      <Link>invalid_cache_pool4.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\invalid_overflowAttr1.xml">
-      <Link>invalid_overflowAttr1.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\invalid_overflowAttr2.xml">
-      <Link>invalid_overflowAttr2.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\invalid_overflowAttr3.xml">
-      <Link>invalid_overflowAttr3.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\regionquery_diffconfig.xml">
-      <Link>regionquery_diffconfig.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\regionquery_diffconfig2.xml">
-      <Link>regionquery_diffconfig2.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\regionquery_diffconfigN.xml">
-      <Link>regionquery_diffconfigN.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\regionquery_diffconfig2N.xml">
-      <Link>regionquery_diffconfig2N.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\remotequery.xml">
-      <Link>remotequery.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\remotequeryN.xml">
-      <Link>remotequeryN.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cqqueryfailover.xml">
-      <Link>cqqueryfailover.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\serverDurableClient.xml">
-      <Link>serverDurableClient.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\valid_cache.xml">
-      <Link>valid_cache.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\valid_cache_pool.xml">
-      <Link>valid_cache_pool.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\multi_get_function_server.xml">
-      <Link>multi_get_function_server.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\func_cacheserver1_pool.xml">
-      <Link>func_cacheserver1_pool.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\func_cacheserver2_pool.xml">
-      <Link>func_cacheserver2_pool.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\func_cacheserver3_pool.xml">
-      <Link>func_cacheserver3_pool.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\client_server_persistent_transactions.xml">
-      <Link>client_server_persistent_transactions.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\client_server_transactions.xml">
-      <Link>client_server_transactions.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\CMakeLists.txt"/>
-    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\UnitTests.csproj.in"/>
-    <Content Include="authz-dummy.xml" />
-    <Content Include="authz-ldap.xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CMAKE_BINARY_DIR)\plugins\SQLiteCLI\Apache.Geode.Plugins.SQLite.csproj">
-      <Project>{FF9597E3-A4DD-4FDE-871D-B0C66088762F}</Project>
-      <Name>SQLiteCLI</Name>
-    </ProjectReference>
-    <ProjectReference Include="$(CMAKE_BINARY_DIR)\clicache\src\Apache.Geode.vcxproj">
-      <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
-    </ProjectReference>
-    <ProjectReference Include="$(CMAKE_BINARY_DIR)\tests\cli\DUnitFramework\DUnitFramework.csproj">
-      <Project>{796727E8-3A6A-46BE-A2DB-584A4774CD51}</Project>
-      <Name>DUnitFramework</Name>
-    </ProjectReference>
-    <ProjectReference Include="$(CMAKE_BINARY_DIR)\tests\cli\FwkClient\FwkClient.csproj">
-      <Project>{9EFAA401-B5D1-4592-A2FF-0972C776FF6A}</Project>
-      <Name>FwkClient</Name>
-    </ProjectReference>
-    <ProjectReference Include="$(CMAKE_BINARY_DIR)\tests\cli\PdxClassLibrary\PdxClassLibrary.csproj">
-      <Project>{10613802-A371-4C27-8F66-CE79BFCAC3F2}</Project>
-      <Name>PdxClassLibrary</Name>
-    </ProjectReference>
-    <ProjectReference Include="$(CMAKE_BINARY_DIR)\tests\cli\PdxVersion1Lib\PdxVersion1Lib.csproj">
-      <Project>{97F9965D-6B3D-44F6-92B3-5880A3C7178E}</Project>
-      <Name>PdxVersion1Lib</Name>
-    </ProjectReference>
-    <ProjectReference Include="$(CMAKE_BINARY_DIR)\tests\cli\PdxVersion2Lib\PdxVersion2Lib.csproj">
-      <Project>{5055633B-6D1C-488D-B934-1AC482C915F7}</Project>
-      <Name>PdxVersion2Lib</Name>
-    </ProjectReference>
-    <ProjectReference Include="$(CMAKE_BINARY_DIR)\tests\cli\QueryHelper\QueryWrapper.vcxproj">
-      <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
-      <Name>QueryWrapper</Name>
-    </ProjectReference>
-    <ProjectReference Include="$(CMAKE_BINARY_DIR)\tests\cli\SecurityUtil\SecurityUtil.csproj">
-      <Project>{29CFC13C-1D6C-4FE8-B56E-A5E7BA7F849F}</Project>
-      <Name>SecurityUtil</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-  <PropertyGroup>
-    <PostBuildEvent>
-    </PostBuildEvent>
-  </PropertyGroup>
-</Project>
diff --git a/clicache/integration-test/cache.xml b/clicache/integration-test/cache.xml
index d5f17bf..133e380 100644
--- a/clicache/integration-test/cache.xml
+++ b/clicache/integration-test/cache.xml
@@ -21,7 +21,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0">
 </client-cache>
 
diff --git a/clicache/integration-test/cache_redundancy.xml b/clicache/integration-test/cache_redundancy.xml
index 5eafda4..d8a1efe 100644
--- a/clicache/integration-test/cache_redundancy.xml
+++ b/clicache/integration-test/cache_redundancy.xml
@@ -23,7 +23,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0"
     redundancy-level="1"
     endpoints="localhost:HOST_PORT1,localhost:HOST_PORT2" >
diff --git a/clicache/integration-test/client_Loader.xml b/clicache/integration-test/client_Loader.xml
index 53a17cf..04e157e 100644
--- a/clicache/integration-test/client_Loader.xml
+++ b/clicache/integration-test/client_Loader.xml
@@ -23,7 +23,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0">
 
 <region name = "root" >
diff --git a/clicache/integration-test/client_generics_plugins.xml b/clicache/integration-test/client_generics_plugins.xml
index 89a7439..6f1fb8c 100644
--- a/clicache/integration-test/client_generics_plugins.xml
+++ b/clicache/integration-test/client_generics_plugins.xml
@@ -21,7 +21,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0"
     redundancy-level="1" >
 
diff --git a/clicache/integration-test/client_pdx.xml b/clicache/integration-test/client_pdx.xml
index a72a8e6..ba12647 100644
--- a/clicache/integration-test/client_pdx.xml
+++ b/clicache/integration-test/client_pdx.xml
@@ -22,7 +22,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0"
      >
 
diff --git a/clicache/integration-test/client_pool.xml b/clicache/integration-test/client_pool.xml
index 7fc5ea4..655b471 100644
--- a/clicache/integration-test/client_pool.xml
+++ b/clicache/integration-test/client_pool.xml
@@ -22,7 +22,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0"
     redundancy-level="1" >
 
diff --git a/clicache/integration-test/invalid_cache1.xml b/clicache/integration-test/invalid_cache1.xml
index 91c1e23..dacf0b1 100644
--- a/clicache/integration-test/invalid_cache1.xml
+++ b/clicache/integration-test/invalid_cache1.xml
@@ -24,7 +24,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0">
 
   <region>
diff --git a/clicache/integration-test/invalid_cache2.xml b/clicache/integration-test/invalid_cache2.xml
index 619dea7..ee2e05b 100644
--- a/clicache/integration-test/invalid_cache2.xml
+++ b/clicache/integration-test/invalid_cache2.xml
@@ -24,7 +24,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0">
   <root-region name = "root1" >
      <region-attributes scope="local" caching-enabled="true" lru-entries-limit = "35">
diff --git a/clicache/integration-test/invalid_cache3.xml b/clicache/integration-test/invalid_cache3.xml
index 75b0b84..ec86565 100644
--- a/clicache/integration-test/invalid_cache3.xml
+++ b/clicache/integration-test/invalid_cache3.xml
@@ -23,7 +23,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0">
 
   <root-region name = "root1" >
diff --git a/clicache/integration-test/invalid_cache_pool.xml b/clicache/integration-test/invalid_cache_pool.xml
index 0a58942..3f38628 100644
--- a/clicache/integration-test/invalid_cache_pool.xml
+++ b/clicache/integration-test/invalid_cache_pool.xml
@@ -23,7 +23,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0">
 
  <root-region name = "Root1" >
diff --git a/clicache/integration-test/invalid_cache_pool2.xml b/clicache/integration-test/invalid_cache_pool2.xml
index 32c92de..6aaf484 100644
--- a/clicache/integration-test/invalid_cache_pool2.xml
+++ b/clicache/integration-test/invalid_cache_pool2.xml
@@ -23,7 +23,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0">
 
 
diff --git a/clicache/integration-test/invalid_cache_pool3.xml b/clicache/integration-test/invalid_cache_pool3.xml
index 73fcc6f..dbe1d3b 100644
--- a/clicache/integration-test/invalid_cache_pool3.xml
+++ b/clicache/integration-test/invalid_cache_pool3.xml
@@ -23,7 +23,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0"
    endpoints="must_fail_with_pool:12345">
 
diff --git a/clicache/integration-test/invalid_cache_pool4.xml b/clicache/integration-test/invalid_cache_pool4.xml
index 0d7c81a..c2a4496 100644
--- a/clicache/integration-test/invalid_cache_pool4.xml
+++ b/clicache/integration-test/invalid_cache_pool4.xml
@@ -23,7 +23,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0">
 
  <root-region name = "Root1" >
diff --git a/clicache/integration-test/invalid_overflowAttr1.xml b/clicache/integration-test/invalid_overflowAttr1.xml
index 1f0f2b6..9651420 100644
--- a/clicache/integration-test/invalid_overflowAttr1.xml
+++ b/clicache/integration-test/invalid_overflowAttr1.xml
@@ -24,7 +24,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0">
   <root-region name = "Root1" >
      <region-attributes scope="local" caching-enabled="true" initial-capacity="25" load-factor="0.32" concurrency-level="10" lru-entries-limit = "35" disk-policy="overflows">
diff --git a/clicache/integration-test/invalid_overflowAttr2.xml b/clicache/integration-test/invalid_overflowAttr2.xml
index 93343ae..1e78f91 100644
--- a/clicache/integration-test/invalid_overflowAttr2.xml
+++ b/clicache/integration-test/invalid_overflowAttr2.xml
@@ -24,7 +24,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0">
  <root-region name = "root1" >
      <region-attributes scope="local" caching-enabled="true" lru-entries-limit = "35" disk-policy="overflows">
diff --git a/clicache/integration-test/invalid_overflowAttr3.xml b/clicache/integration-test/invalid_overflowAttr3.xml
index 5b024f4..894e605 100644
--- a/clicache/integration-test/invalid_overflowAttr3.xml
+++ b/clicache/integration-test/invalid_overflowAttr3.xml
@@ -24,7 +24,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0">
   <root-region name = "root1" >
     <region-attributes scope="local" caching-enabled="true" initial-capacity="25" load-factor="0.32" concurrency-level="10" lru-entries-limit = "35" disk-policy="overflows">
diff --git a/clicache/integration-test/packages.config b/clicache/integration-test/packages.config
new file mode 100644
index 0000000..88fa04b
--- /dev/null
+++ b/clicache/integration-test/packages.config
@@ -0,0 +1,22 @@
+<?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.
+-->
+<packages>
+  <package id="NUnit" version="2.6.4" targetFramework="net35" />
+  <package id="NUnit.Runners" version="2.6.4" targetFramework="net35" />
+  <package id="NUnitTestAdapter" version="2.3.0" targetFramework="net35" />
+</packages>
diff --git a/clicache/integration-test/test.bat.in b/clicache/integration-test/test.bat.in
deleted file mode 100644
index 1d7949d..0000000
--- a/clicache/integration-test/test.bat.in
+++ /dev/null
@@ -1,56 +0,0 @@
-@echo off
-
-rem Licensed to the Apache Software Foundation (ASF) under one or more
-rem contributor license agreements.  See the NOTICE file distributed with
-rem this work for additional information regarding copyright ownership.
-rem The ASF licenses this file to You under the Apache License, Version 2.0
-rem (the "License"); you may not use this file except in compliance with
-rem the License.  You may obtain a copy of the License at
-rem 
-rem      http://www.apache.org/licenses/LICENSE-2.0
-rem 
-rem Unless required by applicable law or agreed to in writing, software
-rem distributed under the License is distributed on an "AS IS" BASIS,
-rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-rem See the License for the specific language governing permissions and
-rem limitations under the License.
-
-setlocal
-
-set PATH=$<SHELL_PATH:$<TARGET_LINKER_FILE_DIR:Apache.Geode>>;%PATH%
-set PATH=$<SHELL_PATH:$<TARGET_LINKER_FILE_DIR:framework>>;%PATH%
-set PATH=$<SHELL_PATH:$<TARGET_LINKER_FILE_DIR:testobject>>;%PATH%
-set PATH=$<SHELL_PATH:$<TARGET_LINKER_FILE_DIR:SqLiteImpl>>;%PATH%
-set PATH=$<SHELL_PATH:$<TARGET_LINKER_FILE_DIR:securityImpl>>;%PATH%
-set PATH=$<JOIN:$<SHELL_PATH:${PATH}>,;>;%PATH%
-
-set PATH=c:\Program Files (x86)\Nunit 2.6.4\bin;%PATH%
-
-set TEST_DIR="$<SHELL_PATH:${TEST_DIR}>"
-set GEODE_NATIVE_HOME="%TEST_DIR%"
-
-set TESTSRC=$<SHELL_PATH:${CMAKE_CURRENT_SOURCE_DIR}>
-set GF_JAVA=$<SHELL_PATH:${Java_JAVA_EXECUTABLE}>
-set GFJAVA=$<SHELL_PATH:${Geode_PATH}>
-set GFE_LOGLEVEL=config
-set GFE_SECLOGLEVEL=config
-set GFE_DIR=$<SHELL_PATH:${Geode_PATH}>
-set MCAST_ADDR=224.10.13.63
-set MCAST_PORT=${PORT}
-set TIMEBOMB=3600
-set GF_CLASSPATH=%GF_CLASSPATH%;$<SHELL_PATH:${CMAKE_BINARY_DIR}>\tests\javaobject\javaobject.jar
-set PROFILERCMD=
-set BUG481=
-set TESTNAME=${TEST}
-
-rmdir /q /s "%TEST_DIR%" 2>nul
-mkdir "%TEST_DIR%"
-if %errorlevel% neq 0 exit /b %errorlevel%
-pushd "%TEST_DIR%"
-if %errorlevel% neq 0 exit /b %errorlevel%
-
-${NUNIT_CONSOLE} /labels /run:${NAMESPACE}.${TESTCLASS} ..\..\$<CONFIG>\UnitTests.dll 
-if %errorlevel% neq 0 exit /b %errorlevel%
-
-popd
-exit /b
diff --git a/clicache/integration-test/test.runsettings.in b/clicache/integration-test/test.runsettings.in
new file mode 100644
index 0000000..57e2004
--- /dev/null
+++ b/clicache/integration-test/test.runsettings.in
@@ -0,0 +1,30 @@
+<?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.
+-->
+<RunSettings>
+  <RunConfiguration>
+    <EnvironmentVariables>
+      <TESTSRC>$<SHELL_PATH:${CMAKE_CURRENT_SOURCE_DIR}></TESTSRC>
+      <GFE_LOGLEVEL>config</GFE_LOGLEVEL>
+      <GFE_SECLOGLEVEL>config</GFE_SECLOGLEVEL>
+      <GF_JAVA>$<SHELL_PATH:${Java_JAVA_EXECUTABLE}></GF_JAVA>
+      <GFE_DIR>$<SHELL_PATH:${Geode_PATH}></GFE_DIR>
+      <GF_CLASSPATH>$<SHELL_PATH:${CMAKE_BINARY_DIR}/tests/javaobject/javaobject.jar></GF_CLASSPATH>
+      <PATH>$<SHELL_PATH:${CMAKE_BINARY_DIR}/packages/NUnit.Runners.2.6.4/tools></PATH>
+    </EnvironmentVariables>
+  </RunConfiguration>
+</RunSettings>
diff --git a/clicache/integration-test/valid_cache.xml b/clicache/integration-test/valid_cache.xml
index 881072f..84c2ba9 100644
--- a/clicache/integration-test/valid_cache.xml
+++ b/clicache/integration-test/valid_cache.xml
@@ -23,7 +23,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0">
 
  <root-region name = "Root1" >
diff --git a/clicache/integration-test/valid_cache_refid.xml b/clicache/integration-test/valid_cache_refid.xml
index 088234a..d632025 100644
--- a/clicache/integration-test/valid_cache_refid.xml
+++ b/clicache/integration-test/valid_cache_refid.xml
@@ -23,7 +23,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0">
 
  <root-region name = "Root1" >
diff --git a/clicache/integration-test/valid_cache_region_refid.xml b/clicache/integration-test/valid_cache_region_refid.xml
index c312b22..45ce6b4 100644
--- a/clicache/integration-test/valid_cache_region_refid.xml
+++ b/clicache/integration-test/valid_cache_region_refid.xml
@@ -23,7 +23,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0">
 
  <root-region name = "Root1" >
diff --git a/clicache/integration-test/valid_declarative_cache_creation.xml b/clicache/integration-test/valid_declarative_cache_creation.xml
index d90ba22..8a0c028 100644
--- a/clicache/integration-test/valid_declarative_cache_creation.xml
+++ b/clicache/integration-test/valid_declarative_cache_creation.xml
@@ -23,7 +23,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0">
 <!-- xml with region-attribute having only child elements no attributes. refer to Ticket #775  -->
   <root-region name= "Root1">
diff --git a/clicache/integration-test/valid_lruExpiration.xml b/clicache/integration-test/valid_lruExpiration.xml
index 81aec12..6df0672 100644
--- a/clicache/integration-test/valid_lruExpiration.xml
+++ b/clicache/integration-test/valid_lruExpiration.xml
@@ -23,7 +23,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0">
 
 <root-region name = "R1" >
diff --git a/clicache/integration-test/valid_overflowAttr.xml b/clicache/integration-test/valid_overflowAttr.xml
index 446d243..b0466ec 100644
--- a/clicache/integration-test/valid_overflowAttr.xml
+++ b/clicache/integration-test/valid_overflowAttr.xml
@@ -23,7 +23,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0">
 
  <root-region name = "Root1" >
diff --git a/clicache/integration-test2/CMakeLists.txt b/clicache/integration-test2/CMakeLists.txt
index 725ebde..4af499e 100644
--- a/clicache/integration-test2/CMakeLists.txt
+++ b/clicache/integration-test2/CMakeLists.txt
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 cmake_minimum_required( VERSION 3.9 )
-project( Apache.Geode.IntegrationTests2 CSharp )
+project(Apache.Geode.IntegrationTests2 CSharp)
 
 set(CMAKE_CSharp_FLAGS "/langversion:5")
 
@@ -23,7 +23,7 @@
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/packages.config ${CMAKE_CURRENT_BINARY_DIR}/packages.config COPYONLY)
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cs.in ${CMAKE_CURRENT_BINARY_DIR}/Config.cs)
 
-add_library( ${PROJECT_NAME} SHARED
+add_library( Apache.Geode.IntegrationTests2 SHARED
   Framework.cs
   Cluster.cs
   ClusterTest.cs
@@ -38,6 +38,7 @@
   CacheXmlTests.cs
   CqOperationTest.cs
   FunctionExecutionTest.cs
+  GarbageCollectCache.cs
   QueryTest.cs
   RegionTest.cs
   RegionSSLTest.cs
@@ -47,6 +48,7 @@
   cache.xml
   geode.properties
   xunit.runner.json
+  xUnitTestAddTests.ps1
   packages.config
   AutoSerializationTests.cs
   SerializationTests.cs
@@ -58,38 +60,58 @@
   xunit.runner.json
   geode.properties
   PROPERTIES
-    VS_COPY_TO_OUT_DIR Always
+    VS_COPY_TO_OUT_DIR PreserveNewest
     VS_TOOL_OVERRIDE None
 )
 
-target_link_libraries(${PROJECT_NAME}
+target_link_libraries(Apache.Geode.IntegrationTests2
   PUBLIC
     Apache.Geode
     PdxClassLibrary
 )
 
-set_target_properties( ${PROJECT_NAME} PROPERTIES
-  COMMON_LANGUAGE_RUNTIME ""
-  VS_GLOBAL_ROOTNAMESPACE ${PROJECT_NAME}
+set_target_properties(Apache.Geode.IntegrationTests2 PROPERTIES
+  VS_GLOBAL_ROOTNAMESPACE Apache.Geode.IntegrationTests2
   VS_GLOBAL_TreatWarningsAsErrors True
+  VS_GLOBAL_IsTestProject True
   VS_GLOBAL_TestProjectType UnitTest
   VS_GLOBAL_PROJECT_TYPES "{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
   VS_DOTNET_REFERENCES "System;System.Xml;System.Web;System.Configuration"
-  VS_DOTNET_REFERENCE_Microsoft.VisualStudio.TestPlatform.TestFramework "${CMAKE_BINARY_DIR}/clicache/packages/Microsoft.VisualStudio.TestPlatform.14.0.0.1/lib/net20/Microsoft.VisualStudio.TestPlatform.TestFramework.dll"
-  VS_DOTNET_REFERENCE_Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions "${CMAKE_BINARY_DIR}/clicache/packages/Microsoft.VisualStudio.TestPlatform.14.0.0.1/lib/net20/Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll"
-  VS_DOTNET_REFERENCE_xunit.core "${CMAKE_BINARY_DIR}/clicache/packages/xunit.extensibility.core.2.4.0/lib/netstandard1.1/xunit.core.dll"
-  VS_DOTNET_REFERENCE_xunit.assert "${CMAKE_BINARY_DIR}/clicache/packages/xunit.assert.2.4.0/lib/netstandard1.1/xunit.assert.dll"
-  VS_DOTNET_REFERENCE_xunit.abstractions "${CMAKE_BINARY_DIR}/clicache/packages/xunit.abstractions.2.0.2/lib/net35/xunit.abstractions.dll"
-  VS_DOTNET_REFERENCE_xunit.execution.desktop "${CMAKE_BINARY_DIR}/clicache/packages/xunit.extensibility.execution.2.4.0/lib/net452/xunit.execution.desktop.dll"
-  VS_DOTNET_REFERENCE_xunit.runner.visualstudio.testadapter "${CMAKE_BINARY_DIR}/clicache/packages/xunit.runner.visualstudio.2.4.0/build/_common/xunit.runner.visualstudio.testadapter.dll"
+  VS_DOTNET_REFERENCE_xunit.core "${CMAKE_BINARY_DIR}/packages/xunit.extensibility.core.2.4.0/lib/netstandard1.1/xunit.core.dll"
+  VS_DOTNET_REFERENCE_xunit.assert "${CMAKE_BINARY_DIR}/packages/xunit.assert.2.4.0/lib/netstandard1.1/xunit.assert.dll"
+  VS_DOTNET_REFERENCE_xunit.abstractions "${CMAKE_BINARY_DIR}/packages/xunit.abstractions.2.0.2/lib/net35/xunit.abstractions.dll"
+  VS_DOTNET_REFERENCE_xunit.execution.desktop "${CMAKE_BINARY_DIR}/packages/xunit.extensibility.execution.2.4.0/lib/net452/xunit.execution.desktop.dll"
+  VS_DOTNET_REFERENCE_xunit.runner.visualstudio.testadapter "${CMAKE_BINARY_DIR}/packages/xunit.runner.visualstudio.2.4.0/build/_common/xunit.runner.visualstudio.testadapter.dll"
   FOLDER cli/test/integration
 )
 
-if(NOT "${STRONG_NAME_KEY}" STREQUAL "")
-  set_target_properties( ${PROJECT_NAME} PROPERTIES
-    VS_GLOBAL_SignAssembly "true"
-    VS_GLOBAL_AssemblyOriginatorKeyFile ${STRONG_NAME_KEY}
-  )
-endif()
+add_dependencies(Apache.Geode.IntegrationTests2 nuget-restore)
 
-add_dependencies(${PROJECT_NAME} nuget-restore)
+enable_testing()
+
+set(ctest_file_base "${CMAKE_CURRENT_BINARY_DIR}/xUnit")
+set(ctest_include_file "${ctest_file_base}_include.cmake")
+set(ctest_tests_file "${ctest_file_base}_tests.cmake")
+
+add_custom_command(
+  TARGET Apache.Geode.IntegrationTests2 POST_BUILD
+  BYPRODUCTS "${ctest_tests_file}"
+  COMMAND pwsh -File 
+          "$<SHELL_PATH:${CMAKE_CURRENT_SOURCE_DIR}/xUnitTestAddTests.ps1>"
+          -AssemblyPath "$<SHELL_PATH:$<TARGET_FILE:Apache.Geode.IntegrationTests2>>"
+          -XUnitConsolePath "$<SHELL_PATH:${CMAKE_BINARY_DIR}/packages/xunit.runner.console.2.4.0/tools/net452/xunit.console.exe>"
+          -CTestFile "$<SHELL_PATH:${ctest_tests_file}>"
+  WORKING_DIRECTORY "$<TARGET_FILE_DIR:Apache.Geode.IntegrationTests2>"
+)
+
+file(WRITE "${ctest_include_file}"
+  "if(EXISTS \"${ctest_tests_file}\")\n"
+  "  include(\"${ctest_tests_file}\")\n"
+  "else()\n"
+  "  add_test(${TARGET}_NOT_BUILT ${TARGET}_NOT_BUILT)\n"
+  "endif()\n"
+)
+
+set_property(DIRECTORY
+  APPEND PROPERTY TEST_INCLUDE_FILES "${ctest_include_file}"
+)
diff --git a/clicache/integration-test2/Cluster.cs b/clicache/integration-test2/Cluster.cs
index f4deaa2..7d2639c 100644
--- a/clicache/integration-test2/Cluster.cs
+++ b/clicache/integration-test2/Cluster.cs
@@ -71,9 +71,12 @@
             for (var i = 0; i < locatorCount_; i++)
             {
                 var locator = new Locator(this, new List<Locator>(),
-                    name_ + "/locator/" + i.ToString());
+                    name_ + "/locator/" + i.ToString(), i == 0);
                 locators_.Add(locator);
-                success = (locator.Start() == 0);
+                if (locator.Start() != 0 ) {
+                    success = false;
+                    break;
+                }
             }
             return success;
         }
@@ -90,6 +93,7 @@
                 if (localResult != 0)
                 {
                     success = false;
+                    break;
                 }
             }
             return success;
@@ -165,12 +169,14 @@
         private string name_;
         private List<Locator> locators_;
         private bool started_;
+        private bool startJmxManager_;
 
-        public Locator(Cluster cluster, List<Locator> locators, string name)
+        public Locator(Cluster cluster, List<Locator> locators, string name, bool startJmxManager)
         {
             cluster_ = cluster;
             locators_ = locators;
             name_ = name;
+            startJmxManager_ = startJmxManager;
             var address = new Address();
             address.address = "localhost";
             address.port = Framework.FreeTcpPort();
@@ -193,7 +199,7 @@
                     .withPort(Address.port)
                     .withMaxHeap("256m")
                     .withJmxManagerPort(cluster_.jmxManagerPort)
-                    .withJmxManagerStart(true)
+                    .withJmxManagerStart(startJmxManager_)
                     .withHttpServicePort(0);
                 if (cluster_.UseSSL)
                 {
diff --git a/clicache/integration-test2/GarbageCollectCache.cs b/clicache/integration-test2/GarbageCollectCache.cs
new file mode 100644
index 0000000..2155318
--- /dev/null
+++ b/clicache/integration-test2/GarbageCollectCache.cs
@@ -0,0 +1,94 @@
+/*
+ * 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.
+ */
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using Xunit;
+using Xunit.Abstractions;
+
+namespace Apache.Geode.Client.IntegrationTests
+{
+    [Trait("Category", "Integration")]
+    public class GarbageCollectCache : TestBase
+    {
+        public GarbageCollectCache(ITestOutputHelper testOutputHelper) : base(testOutputHelper)
+        {
+        }
+
+        [Fact]
+        public void VerifyNoLeakedThreads()
+        {
+            using (var cluster = new Cluster(output, CreateTestCaseDirectoryName(), 1, 1))
+            {
+                Assert.True(cluster.Start());
+                Assert.Equal(0, cluster.Gfsh
+                    .create()
+                    .region()
+                    .withName("testRegion")
+                    .withType("PARTITION")
+                    .execute());
+
+                for (int i=0; i<25; i++)
+                {
+                    var ncThreadsBefore = Process.GetCurrentProcess().Threads.Count;
+
+                    using (var cache = new CacheFactory()
+                        .Set("log-level", "none")
+                        .Create())
+                    {
+
+                        cluster.ApplyLocators(cache.GetPoolFactory()).Create("default");
+
+                        var regionFactory = cache.CreateRegionFactory(RegionShortcut.PROXY)
+                            .SetPoolName("default");
+
+                        var region = regionFactory.Create<string, string>("testRegion");
+
+                        const string key = "hello";
+                        const string expectedResult = "dave";
+
+                        region.Put(key, expectedResult);
+                        var actualResult = region.Get(key);
+                        Assert.Equal(expectedResult, actualResult);
+
+                        cache.Close();
+                    }
+
+                    var ncThreadsAfter = Process.GetCurrentProcess().Threads.Count;
+                    var ratio = ncThreadsBefore / (double)ncThreadsAfter;
+
+                    // Because the number of threads in the process depends on
+                    // the number of cores, debug vs release, whether the GC thread
+                    // is running, etc., a robust test is to check whether the ratio
+                    // of before and after threads is close to one. Also skipping the
+                    // first couple of iterations avoids threads related to test 
+                    // environment startup.
+                    if (i > 5)
+                    {
+                        string error = "ncThreadsBefore = " + ncThreadsBefore.ToString() +
+                            ", ncThreadsAfter = " + ncThreadsAfter.ToString();
+                        Assert.True((.5 < ratio && ratio < 2.0), error);
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/clicache/integration-test2/PositionKey.cs b/clicache/integration-test2/PositionKey.cs
index 02c6163..3c1c21b 100644
--- a/clicache/integration-test2/PositionKey.cs
+++ b/clicache/integration-test2/PositionKey.cs
@@ -92,9 +92,7 @@
 
 	public override int GetHashCode()
 	{
-	  int hash = 11;
-	  hash = 31 * hash + (int)m_positionId;
-	  return hash;
+	  return Objects.Hash(m_positionId);
 	}
   }
 }
diff --git a/clicache/integration-test2/SerializationTests.cs b/clicache/integration-test2/SerializationTests.cs
index bce822d..cf066f8 100644
--- a/clicache/integration-test2/SerializationTests.cs
+++ b/clicache/integration-test2/SerializationTests.cs
@@ -835,7 +835,7 @@
 
                 var cache = cluster.CreateCache();
 
-                cache.TypeRegistry.RegisterType(PositionKey.CreateDeserializable, 77);
+                cache.TypeRegistry.RegisterType(PositionKey.CreateDeserializable, 21);
                 cache.TypeRegistry.RegisterType(Position.CreateDeserializable, 22);
 
                 var region = cache.CreateRegionFactory(RegionShortcut.PROXY)
@@ -896,7 +896,7 @@
 
 				var cache = cluster.CreateCache();
 
-				cache.TypeRegistry.RegisterType(PositionKey.CreateDeserializable, 77);
+				cache.TypeRegistry.RegisterType(PositionKey.CreateDeserializable, 21);
 				cache.TypeRegistry.RegisterType(TestClassA.CreateDeserializable, 100);
 				cache.TypeRegistry.RegisterType(TestClassB.CreateDeserializable, 101);
 				cache.TypeRegistry.RegisterType(TestClassC.CreateDeserializable, 102);
diff --git a/clicache/integration-test2/cache.xml b/clicache/integration-test2/cache.xml
index 9840108..c205f3d 100644
--- a/clicache/integration-test2/cache.xml
+++ b/clicache/integration-test2/cache.xml
@@ -19,7 +19,7 @@
     xmlns="http://geode.apache.org/schema/cache"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://geode.apache.org/schema/cache
-                        http://geode.apache.org/schema/cache/cpp-cache-1.0.xsd"
+                        http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
     version="9.0">
 
   <pool name="default">
diff --git a/clicache/integration-test2/packages.config b/clicache/integration-test2/packages.config
index e7d725b..fb25d57 100644
--- a/clicache/integration-test2/packages.config
+++ b/clicache/integration-test2/packages.config
@@ -16,7 +16,6 @@
   limitations under the License.
 -->
 <packages>
-  <package id="Microsoft.VisualStudio.TestPlatform" version="14.0.0.1" targetFramework="net452" />
   <package id="xunit" version="2.4.0" targetFramework="net452" />
   <package id="xunit.abstractions" version="2.0.2" targetFramework="net35" />
   <package id="xunit.analyzers" version="0.10.0" targetFramework="net452" />
diff --git a/clicache/integration-test2/xUnitTestAddTests.ps1 b/clicache/integration-test2/xUnitTestAddTests.ps1
new file mode 100644
index 0000000..f948110
--- /dev/null
+++ b/clicache/integration-test2/xUnitTestAddTests.ps1
@@ -0,0 +1,54 @@
+# 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.
+
+Param
+(
+    [Parameter(Mandatory)]
+    [string]$AssemblyPath,
+    [Parameter(Mandatory)]
+    [string]$XUnitConsolePath,
+    [Parameter(Mandatory)]
+    [string]$CTestFile
+)
+
+#$ErrorActionPreference = "Stop
+
+Remove-Item -Path $CTestFile -Force -ErrorAction Ignore 
+
+$xunit = [reflection.assembly]::LoadFrom("xunit.core.dll")
+
+$assembly = [reflection.assembly]::LoadFrom($AssemblyPath)
+
+foreach ($type in $assembly.GetTypes())
+{
+    foreach ($method in $type.GetMethods())
+    {
+        foreach ($customAttribute in $method.CustomAttributes)
+        {
+            if ($customAttribute.AttributeType.Equals([Xunit.FactAttribute]))
+            {
+                $testName = "$($method.ReflectedType.NameSpace).$($method.ReflectedType.Name).$($method.Name)"
+                Add-Content -Path $CTestFile -Value "add_test( $testName [==[$XUnitConsolePath]==] [==[$AssemblyPath]==] -nologo -method $testName )"
+                foreach ($namedArgument in $customAttribute.NamedArguments)
+                {
+                    if ($namedArgument.MemberName -eq "Skip")
+                    {
+                        Add-Content -Path $CTestFile -Value "set_tests_properties( $testName PROPERTIES DISABLED True )"
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/clicache/src/CMakeLists.txt b/clicache/src/CMakeLists.txt
index 8ad3b32..20db4d1 100644
--- a/clicache/src/CMakeLists.txt
+++ b/clicache/src/CMakeLists.txt
@@ -13,18 +13,14 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.10)
+cmake_minimum_required(VERSION 3.12)
 project(Apache.Geode CXX)
 
-if(NOT "${STRONG_NAME_PUBLIC_KEY}" STREQUAL "")
-  set(STRONG_NAME_PUBLIC_KEY_ATTRIBUTE ", PublicKey=${STRONG_NAME_PUBLIC_KEY}")
-endif()
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/impl/AssemblyInfo.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/impl/AssemblyInfo.cpp)
 list(APPEND CONFIGURE_IN_FILES ${CMAKE_CURRENT_SOURCE_DIR}/impl/AssemblyInfo.cpp.in)
 list(APPEND CONFIGURE_OUT_FILES ${CMAKE_CURRENT_BINARY_DIR}/impl/AssemblyInfo.cpp)
 
-add_library(Apache.Geode SHARED
-  Apache.Geode.rc
+add_library(Apache.Geode-object OBJECT
   AttributesMutator.cpp
   AttributesMutator.hpp
   begin_native.hpp
@@ -152,6 +148,8 @@
   native_conditional_unique_ptr.hpp
   native_shared_ptr.hpp
   native_unique_ptr.hpp
+  Objects.cpp
+  Objects.hpp
   PdxIdentityFieldAttribute.hpp
   Pool.cpp
   Pool.hpp
@@ -192,6 +190,7 @@
   Struct.hpp
   StructSet.cpp
   StructSet.hpp
+  String.hpp
   SystemProperties.cpp
   SystemProperties.hpp
   TimeUtils.hpp
@@ -208,7 +207,6 @@
   Utils.hpp
   impl/AppDomainContext.cpp
   impl/AppDomainContext.hpp
-  impl/AssemblyInfo.cpp.in
   impl/AuthenticatedView.cpp
   impl/AuthenticatedView.hpp
   impl/CacheListener.hpp
@@ -259,8 +257,6 @@
   impl/ManagedTransactionWriter.hpp
   impl/ManagedVisitor.cpp
   impl/ManagedVisitor.hpp
-  impl/MemoryPressureHandler.cpp
-  impl/MemoryPressureHandler.hpp
   impl/PartitionResolver.hpp
   impl/PdxFieldType.cpp
   impl/PdxFieldType.hpp
@@ -298,23 +294,20 @@
   impl/TransactionListener.hpp
   impl/TransactionWriter.hpp
   impl/WeakhashMap.hpp
-
-  ${CONFIGURE_OUT_FILES}
 )
 
-set_target_properties(Apache.Geode PROPERTIES
-  COMMON_LANGUAGE_RUNTIME "" 
-  OUTPUT_NAME ${PRODUCT_DLL_NAME}
+set_target_properties(Apache.Geode-object PROPERTIES
+  COMMON_LANGUAGE_RUNTIME ""
   VS_GLOBAL_CLRSupport "true"
   VS_GLOBAL_KEYWORD "ManagedCProj"
   VS_GLOBAL_PROJECT_TYPES "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}"
-  VS_GLOBAL_ROOTNAMESPACE ${PROJECT_NAME}
+  VS_GLOBAL_ROOTNAMESPACE Apache.Geode
   VS_DOTNET_REFERENCES "System;System.Xml;System.Core"
   FOLDER cli
 )
 
-target_compile_options(Apache.Geode
-  PRIVATE
+target_compile_options(Apache.Geode-object
+  PUBLIC
 	/bigobj # C1128 - large number of templates causes too many section.
 	/Zm32   # C3859 - internal heap limit reached
 	#/doc # Documents to xml
@@ -324,19 +317,41 @@
 	/wd4947 /wd4251 /wd4635
 )
 
-target_include_directories(Apache.Geode
+target_include_directories(Apache.Geode-object
   PRIVATE
   	$<TARGET_PROPERTY:apache-geode,SOURCE_DIR>/../src
 )
 
+target_link_libraries(Apache.Geode-object
+  PUBLIC
+    c++cli
+    c++11
+    apache-geode-static
+	_WarningsAsError
+)
+
+add_library(Apache.Geode SHARED
+  Apache.Geode.rc
+  ${CONFIGURE_IN_FILES}
+  ${CONFIGURE_OUT_FILES}
+)
+
+set_target_properties(Apache.Geode PROPERTIES
+  COMMON_LANGUAGE_RUNTIME "" 
+  OUTPUT_NAME ${PRODUCT_DLL_NAME}
+  VS_GLOBAL_CLRSupport "true"
+  VS_GLOBAL_KEYWORD "ManagedCProj"
+  VS_GLOBAL_PROJECT_TYPES "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}"
+  VS_GLOBAL_ROOTNAMESPACE Apache.Geode
+  VS_DOTNET_REFERENCES "System;System.Xml;System.Core"
+  FOLDER cli
+)
+
 target_link_libraries(Apache.Geode
   PUBLIC
     psapi
   PRIVATE
-    c++cli
-    c++11
-    apache-geode-static
-	_WarningsAsError
+	Apache.Geode-object
 )
 
 target_link_options(Apache.Geode
@@ -347,11 +362,8 @@
 
 string(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
 
-set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${SHARED_LINKER_FLAGS_STRONG_KEY}")
-
-
 include(PrecompiledHeader)
-add_precompiled_header(Apache.Geode geode_includes.hpp FORCEINCLUDE)
+add_precompiled_header(Apache.Geode-object geode_includes.hpp FORCEINCLUDE)
 
 install(TARGETS Apache.Geode
   RUNTIME DESTINATION bin
@@ -359,15 +371,13 @@
 )
 
 install ( 
-  FILES $<TARGET_PDB_FILE:${PROJECT_NAME}> 
+  FILES $<TARGET_PDB_FILE:Apache.Geode> 
   DESTINATION bin 
   CONFIGURATIONS Debug RelWithDebInfo 
 )
 
 add_dependencies(client-libraries Apache.Geode)
 
-add_subdirectory(templates)
-
 
 # For Visual Studio organization
 source_group("Configure In Files" FILES ${CONFIGURE_IN_FILES})
diff --git a/clicache/src/Cache.cpp b/clicache/src/Cache.cpp
index 622ff85..8cfbe52 100644
--- a/clicache/src/Cache.cpp
+++ b/clicache/src/Cache.cpp
@@ -18,7 +18,6 @@
 
 #include "begin_native.hpp"
 #include <CacheRegionHelper.hpp>
-#include <CacheImpl.hpp>
 #include "end_native.hpp"
 
 #include "Cache.hpp"
@@ -27,6 +26,7 @@
 #include "PoolFactory.hpp"
 #include "Region.hpp"
 #include "RegionAttributes.hpp"
+#include "String.hpp"
 #include "QueryService.hpp"
 #include "CacheFactory.hpp"
 #include "impl/AuthenticatedView.hpp"
@@ -57,6 +57,22 @@
         m_typeRegistry = gcnew Apache::Geode::Client::TypeRegistry(this);
       }
 
+      Cache::~Cache() {
+        if (m_nativeptr) {
+          try {
+            if (!IsClosed) {
+              Close();
+            }
+          }
+          catch (...) {
+          }
+          finally{
+              delete m_nativeptr;
+              m_nativeptr = nullptr;
+          }
+        }
+      }
+
       String^ Cache::Name::get( )
       {
         try
@@ -153,7 +169,7 @@
 
           try
           {
-            return Client::Region<TKey, TValue>::Create(m_nativeptr->get()->getRegion(marshal_as<std::string>(path)));
+            return Client::Region<TKey, TValue>::Create(m_nativeptr->get()->getRegion(to_utf8(path)));
           }
           finally
           {
@@ -307,7 +323,7 @@
       {
         try
         {
-          m_nativeptr->get()->initializeDeclarativeCache( marshal_as<std::string>(cacheXml));
+          m_nativeptr->get()->initializeDeclarativeCache(to_utf8(cacheXml));
         }
         finally
         {
diff --git a/clicache/src/Cache.hpp b/clicache/src/Cache.hpp
index ab7bce4..7d979dd 100644
--- a/clicache/src/Cache.hpp
+++ b/clicache/src/Cache.hpp
@@ -81,6 +81,8 @@
         : public IGeodeCache
       {
       public:
+        
+        ~Cache();
 
         /// <summary>
         /// Initializes the cache from an XML file.
@@ -266,7 +268,7 @@
         virtual DataInput^ CreateDataInput(array<Byte>^ buffer, System::Int32 len);
         virtual DataInput^ CreateDataInput(array<Byte>^ buffer);
         
-        virtual DataOutput^ Cache::CreateDataOutput();
+        virtual DataOutput^ CreateDataOutput();
 
         /// <summary>
         /// Returns a PoolFactory that can be used to create a Pool and that provides
diff --git a/clicache/src/CacheFactory.cpp b/clicache/src/CacheFactory.cpp
index 5e720e0..781cd57 100644
--- a/clicache/src/CacheFactory.cpp
+++ b/clicache/src/CacheFactory.cpp
@@ -23,6 +23,7 @@
 #include "CacheFactory.hpp"
 #include "Cache.hpp"
 #include "DistributedSystem.hpp"
+#include "String.hpp"
 #include "SystemProperties.hpp"
 #include "impl/SafeConvert.hpp"
 #include "impl/PdxTypeRegistry.hpp"
@@ -136,7 +137,7 @@
         _GF_MG_EXCEPTION_TRY2
           try
           {
-            m_nativeptr->get()->set(marshal_as<std::string>(name), marshal_as<std::string>(value));
+            m_nativeptr->get()->set(marshal_as<std::string>(name), to_utf8(value));
           }
           finally
           {
diff --git a/clicache/src/CacheStatistics.cpp b/clicache/src/CacheStatistics.cpp
index 818007a..800c6a2 100644
--- a/clicache/src/CacheStatistics.cpp
+++ b/clicache/src/CacheStatistics.cpp
@@ -32,7 +32,9 @@
       {
         try
         {
-          return TimeUtils::TimePointToDateTime(m_nativeptr->get()->getLastModifiedTime());
+          auto epoch = m_nativeptr->get()->getLastModifiedTime().time_since_epoch();
+          auto duration = std::chrono::duration_cast<std::chrono::system_clock::duration>(epoch);
+          return TimeUtils::TimePointToDateTime(std::chrono::system_clock::time_point(duration));
         }
         finally
         {
@@ -44,7 +46,9 @@
       {
         try
         {
-          return TimeUtils::TimePointToDateTime(m_nativeptr->get()->getLastAccessedTime());
+          auto epoch = m_nativeptr->get()->getLastAccessedTime().time_since_epoch();
+          auto duration = std::chrono::duration_cast<std::chrono::system_clock::duration>(epoch);
+          return TimeUtils::TimePointToDateTime(std::chrono::system_clock::time_point(duration));
         }
         finally
         {
diff --git a/clicache/src/CacheableDate.cpp b/clicache/src/CacheableDate.cpp
index c2f2064..9421489 100644
--- a/clicache/src/CacheableDate.cpp
+++ b/clicache/src/CacheableDate.cpp
@@ -20,6 +20,7 @@
 #include "DataInput.hpp"
 #include "DataOutput.hpp"
 #include "Log.hpp"
+#include "Objects.hpp"
 
 using namespace System;
 
@@ -82,10 +83,7 @@
       System::Int32 CacheableDate::GetHashCode()
       {
         if (m_hashcode == 0) {
-          TimeSpan epochSpan = m_dateTime - EpochTime;
-          System::Int64 millitime =
-            epochSpan.Ticks / TimeSpan::TicksPerMillisecond;
-          m_hashcode = (int)millitime ^ (int)((System::Int64)millitime >> 32);
+          m_hashcode = Objects::GetHashCode(m_dateTime);
         }
         return m_hashcode;
       }
diff --git a/clicache/src/CqQuery.cpp b/clicache/src/CqQuery.cpp
index f3aba04..543ee67 100644
--- a/clicache/src/CqQuery.cpp
+++ b/clicache/src/CqQuery.cpp
@@ -24,6 +24,7 @@
 #include "CqStatistics.hpp"
 #include "ISelectResults.hpp"
 #include "ResultSet.hpp"
+#include "String.hpp"
 #include "StructSet.hpp"
 #include "ExceptionTypes.hpp"
 #include "TimeUtils.hpp"
@@ -89,7 +90,7 @@
       {
         try
         {
-          return marshal_as<String^>(m_nativeptr->get()->getQueryString());
+          return to_String(m_nativeptr->get()->getQueryString());
         }
         finally
         {
@@ -102,7 +103,7 @@
       {
         try
         {
-          return marshal_as<String^>(m_nativeptr->get()->getName());
+          return to_String(m_nativeptr->get()->getName());
         }
         finally
         {
diff --git a/clicache/src/DataInput.hpp b/clicache/src/DataInput.hpp
index fa10265..0b6f4ce 100644
--- a/clicache/src/DataInput.hpp
+++ b/clicache/src/DataInput.hpp
@@ -453,9 +453,9 @@
           obj = ReadSBytes();
         }        
 
-        void DataInput::ReadObject(array<UInt16>^% obj);
-        void DataInput::ReadObject(array<UInt32>^% obj);
-        void DataInput::ReadObject(array<UInt64>^% obj);
+        void ReadObject(array<UInt16>^% obj);
+        void ReadObject(array<UInt32>^% obj);
+        void ReadObject(array<UInt64>^% obj);
 
         template <typename mType>
         void ReadObject(array<mType>^ %objArray)
diff --git a/clicache/src/DistributedSystem.cpp b/clicache/src/DistributedSystem.cpp
index 8c297d9..57bfb2d 100644
--- a/clicache/src/DistributedSystem.cpp
+++ b/clicache/src/DistributedSystem.cpp
@@ -51,8 +51,8 @@
 #include "CacheableObjectXml.hpp"
 #include "CacheableBuiltins.hpp"
 #include "Log.hpp"
+#include "String.hpp"
 #include "Struct.hpp"
-#include "impl/MemoryPressureHandler.hpp"
 #include "impl/SafeConvert.hpp"
 #include "impl/PdxType.hpp"
 #include "impl/EnumInfo.hpp"
@@ -135,7 +135,7 @@
         // TODO AppDomain should we be able to create a DS directly?
         _GF_MG_EXCEPTION_TRY2
 
-        auto nativeDistributedSystem = native::DistributedSystem::create(marshal_as<std::string>(name),
+        auto nativeDistributedSystem = native::DistributedSystem::create(to_utf8(name),
                                                            config->GetNative());
         nativeDistributedSystem.connect();
 
@@ -401,14 +401,6 @@
         }
       }
 
-      void DistributedSystem::HandleMemoryPressure(System::Object^ state)
-      {
-        // TODO global - Need single memory pressue event running?
-        ACE_Time_Value dummy(1);
-        MemoryPressureHandler handler;
-        handler.handle_timeout(dummy, nullptr);
-      }
-
       DistributedSystem^ DistributedSystem::Create(native::DistributedSystem* nativeptr)
       {
         auto instance = gcnew DistributedSystem(nativeptr);
@@ -427,7 +419,6 @@
 
       DistributedSystem::~DistributedSystem()
       {
-        m_memoryPressureHandler->Dispose(nullptr);
       }
 
       void DistributedSystem::registerCliCallback()
diff --git a/clicache/src/DistributedSystem.hpp b/clicache/src/DistributedSystem.hpp
index 8bd0d37..bb856d5 100644
--- a/clicache/src/DistributedSystem.hpp
+++ b/clicache/src/DistributedSystem.hpp
@@ -159,12 +159,6 @@
 
       private:
 
-        ///// <summary>
-        ///// Stores the task ID of the task that adjusts unmanaged memory
-        ///// pressure in managed GC.
-        ///// </summary>
-        //static long s_memoryPressureTaskID = -1;
-
         /// <summary>
         /// Private constructor to wrap a native object pointer
         /// </summary>
@@ -178,17 +172,6 @@
 
         native_conditional_unique_ptr<native::DistributedSystem>^ m_nativeDistributedSystem;
 
-
-        /// <summary>
-        /// Periodically adjust memory pressure of unmanaged heap for GC.
-        /// </summary>
-        static void HandleMemoryPressure(System::Object^ state);
-
-        /// <summary>
-        /// Timer task to periodically invoke <c>HandleMemoryPressure</c>.
-        /// </summary>
-        System::Threading::Timer^ m_memoryPressureHandler;
-
         static CliCallbackDelegate^ m_cliCallBackObj;
       };
     }  // namespace Client
diff --git a/clicache/src/Execution.cpp b/clicache/src/Execution.cpp
index f607384..b56a24e 100644
--- a/clicache/src/Execution.cpp
+++ b/clicache/src/Execution.cpp
@@ -24,6 +24,7 @@
 #include "impl/ManagedResultCollector.hpp"
 #include "ExceptionTypes.hpp"
 #include "impl/SafeConvert.hpp"
+#include "String.hpp"
 #include "TimeUtils.hpp"
 
 using namespace System;
@@ -108,7 +109,7 @@
         _GF_MG_EXCEPTION_TRY2/* due to auto replace */
         try
         {
-          auto rc = m_nativeptr->get()->execute(marshal_as<std::string>(func), TimeUtils::TimeSpanToDurationCeil<std::chrono::milliseconds>(timeout));
+          auto rc = m_nativeptr->get()->execute(to_utf8(func), TimeUtils::TimeSpanToDurationCeil<std::chrono::milliseconds>(timeout));
           if (m_rc == nullptr)
             return gcnew ResultCollector<TResult>(rc);
           else
diff --git a/clicache/src/LocalRegion.cpp b/clicache/src/LocalRegion.cpp
index 4d961b9..6a81cb4 100644
--- a/clicache/src/LocalRegion.cpp
+++ b/clicache/src/LocalRegion.cpp
@@ -26,6 +26,7 @@
 #include "CacheStatistics.hpp"
 #include "AttributesMutator.hpp"
 #include "RegionEntry.hpp"
+#include "String.hpp"
 #include "impl/AuthenticatedView.hpp"
 #include "impl/SafeConvert.hpp"
 #include "impl/CacheResolver.hpp"
@@ -588,7 +589,7 @@
       {
         try
         {
-          return marshal_as<String^>( m_nativeptr->get()->getName( ) );
+          return to_String( m_nativeptr->get()->getName( ) );
         }
         finally
         {
@@ -601,7 +602,7 @@
       {
         try
         {
-          return marshal_as<String^>( m_nativeptr->get()->getFullPath( ) );
+          return to_String( m_nativeptr->get()->getFullPath( ) );
         }
         finally
         {
@@ -688,7 +689,7 @@
 
           try
           {
-            auto nativeptr = m_nativeptr->get()->getSubregion(marshal_as<std::string>(path));
+            auto nativeptr = m_nativeptr->get()->getSubregion(Apache::Geode::Client::to_utf8(path));
             auto region = Region<TKey, TValue>::Create(nativeptr);
             if (region == nullptr) {
               return nullptr;
@@ -713,7 +714,7 @@
           {
             native::RegionAttributes regionAttributes;
             return Region<TKey, TValue>::Create(m_nativeptr->get()->createSubregion(
-              marshal_as<std::string>(subRegionName), regionAttributes))->GetLocalView();
+              Apache::Geode::Client::to_utf8(subRegionName), regionAttributes))->GetLocalView();
           }
           finally
           {
diff --git a/clicache/src/Objects.cpp b/clicache/src/Objects.cpp
new file mode 100644
index 0000000..ee587df
--- /dev/null
+++ b/clicache/src/Objects.cpp
@@ -0,0 +1,162 @@
+/*
+ * 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.
+ */
+
+#include "Objects.hpp"
+
+#include "CacheableDate.hpp"
+#include "ICacheableKey.hpp"
+
+using namespace System;
+using namespace System::Collections;
+using namespace Apache::Geode::Client;
+
+namespace Apache {
+namespace Geode {
+
+Int32 Objects::Hash(... array<Object^>^ values) {
+ return Objects::GetHashCode(values);
+}
+
+Int32 Objects::GetHashCode(Object^ value) {
+  if (nullptr == value) {
+    return 0;
+  } else if (auto s = dynamic_cast<String^>(value)) {
+    return GetHashCode(s);
+  } else if (auto i = dynamic_cast<Int32^>(value)) {
+    return GetHashCode(*i);
+  } else if (auto l = dynamic_cast<Int64^>(value)) {
+    return GetHashCode(*l);
+  } else if (auto s = dynamic_cast<Int16^>(value)) {
+    return GetHashCode(*s);
+  } else if (auto s = dynamic_cast<Char^>(value)) {
+    return GetHashCode(*s);
+  } else if (auto d = dynamic_cast<DateTime^>(value)) {
+    return GetHashCode(*d);
+  } else if (auto b = dynamic_cast<SByte^>(value)) {
+    return GetHashCode(*b);
+  } else if (auto s = dynamic_cast<Single^>(value)) {
+    return GetHashCode(*s);
+  } else if (auto d = dynamic_cast<Double^>(value)) {
+    return GetHashCode(*d);
+  } else if (auto b = dynamic_cast<Boolean^>(value)) {
+    return GetHashCode(*b);
+  } else if (auto k = dynamic_cast<ICacheableKey^>(value)) {
+    return k->GetHashCode();
+  } else if (auto c = dynamic_cast<IDictionary^>(value)) {
+    return GetHashCode(c);
+  } else if (auto c = dynamic_cast<ICollection^>(value)) {
+    return GetHashCode(c);
+  }
+
+  return value->GetHashCode();
+}
+
+Int32 Objects::GetHashCode(String^ value) {
+  Int32 hash = 0;
+  for each(auto c in value) {
+    hash = 31 * hash + c;
+  }
+  return hash;
+}
+
+Int32 Objects::GetHashCode(Char value) { return value; }
+
+Int32 Objects::GetHashCode(Boolean value) { return value ? 1231 : 1237; }
+
+Int32 Objects::GetHashCode(SByte value) { return value; }
+
+Int32 Objects::GetHashCode(Int16 value) { return value; }
+
+Int32 Objects::GetHashCode(Int32 value) { return value; }
+
+Int32 Objects::GetHashCode(Int64 value) {
+  return static_cast<Int32>(value ^ (value >> 32));
+}
+
+union float_int64_t {
+  float f;
+  int32_t u;
+};
+
+constexpr auto kJavaFloatNaN = 0x7fc00000;
+
+Int32 Objects::GetHashCode(Single value) { 
+  float_int64_t v;
+  if (Single::IsNaN(value)) {
+    // .NET and Java don't aggree on NaN encoding
+    v.u = kJavaFloatNaN;
+  } else {
+    v.f = value;
+  }
+  return GetHashCode(v.u); 
+}
+
+union double_int64_t {
+  double d;
+  int64_t u;
+};
+
+constexpr auto kJavaDoubleNaN = 0x7ff8000000000000L;
+
+Int32 Objects::GetHashCode(Double value) {
+  double_int64_t v;
+  if (Double::IsNaN(value)) {
+    // .NET and Java don't aggree on NaN encoding
+    v.u = kJavaDoubleNaN;
+  } else {
+    v.d = value;
+  }
+  return GetHashCode(v.u); 
+}
+
+Int32 Objects::GetHashCode(DateTime^ value) {
+  if (value == nullptr) {
+    return 0;
+  }
+
+  return GetHashCode(*value);
+}
+
+Int32 Objects::GetHashCode(DateTime value) {
+  auto timeSpanSinceEpoch = value - CacheableDate::EpochTime;
+  auto milliseconds = timeSpanSinceEpoch.Ticks / TimeSpan::TicksPerMillisecond;
+  return GetHashCode(milliseconds);
+}
+
+Int32 Objects::GetHashCode(ICollection^ value) {
+  if (value == nullptr) {
+    return 0;
+  }
+
+  int result = 1;
+  for each (auto element in value) {
+    result = 31 * result + Objects::GetHashCode(element);
+  }
+  return result;
+}
+
+Int32 Objects::GetHashCode(System::Collections::IDictionary^ dictionary) {
+  int h = 0;
+  for each(System::Collections::DictionaryEntry^ entry in dictionary)
+  {
+    h = h + (GetHashCode(entry->Key) ^ GetHashCode(entry->Value));
+  }
+  return h;
+}
+
+}  // namespace Geode
+}  // namespace Apache
diff --git a/clicache/src/Objects.hpp b/clicache/src/Objects.hpp
new file mode 100644
index 0000000..01d9ad8
--- /dev/null
+++ b/clicache/src/Objects.hpp
@@ -0,0 +1,178 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+using namespace System;
+
+namespace Apache {
+namespace Geode {
+
+/// <summary>
+/// Provides hash code functions similar to those used by Geode server in 
+/// Java's java.util.Objects and java.util.Arrays classes.
+///
+/// Example:
+/// <pre>
+/// class CustomKey
+/// {
+///   private int a;
+///   private double b;
+///   private String c;
+///
+///   public CustomKey(int a, double b, String c)
+///   {
+///     this.a = a;
+///     this.b = b;
+///     this.c = c;
+///   }
+///
+///   override public int GetHashCode()
+///   {
+///     return Objects.Hash(a, b, c);
+///   }
+/// };
+/// </pre>
+/// </summary>
+ public ref class Objects {
+ public:
+  /// <summary>
+  /// Hashes consistent with java.util.Objects.hash(Object ...).
+  /// </summary>
+  /// <param name="values">
+  /// Variable arguments to combine into hash.
+  /// </param>
+  static Int32 Hash(... array<Object^>^ values);
+
+  
+  /// <summary>
+  /// Hashes consistent with java.util.Objects.hashCode(Object).
+  /// </summary>
+  /// <param name="value">
+  /// Object to hash.
+  /// </param>
+  static Int32 GetHashCode(Object^ value);
+
+
+  /// <summary>
+  /// Hashes consistent with java.lang.String.hashCode().
+  /// </summary>
+  /// <param name="value">
+  /// String to hash.
+  /// </param>
+  static Int32 GetHashCode(String^ value);
+
+  /// <summary>
+  /// Hashes consistent with java.lang.Character.hashCode().
+  /// </summary>
+  /// <param name="value">
+  /// Character to hash.
+  /// </param>
+  static Int32 GetHashCode(Char value);
+
+  /// <summary>
+  /// Hashes consistent with java.lang.Boolean.hashCode().
+  /// </summary>
+  /// <param name="value">
+  /// Boolean to hash.
+  /// </param>
+  static Int32 GetHashCode(Boolean value);
+
+  /// <summary>
+  /// Hashes consistent with java.lang.Byte.hashCode().
+  /// </summary>
+  /// <param name="value">
+  /// Byte to hash.
+  /// </param>
+  static Int32 GetHashCode(SByte value);
+
+  /// <summary>
+  /// Hashes consistent with java.lang.Short.hashCode().
+  /// </summary>
+  /// <param name="value">
+  /// Short to hash.
+  /// </param>
+  static Int32 GetHashCode(Int16 value);
+
+  /// <summary>
+  /// Hashes consistent with java.lang.Integer.hashCode().
+  /// </summary>
+  /// <param name="value">
+  /// Integer to hash.
+  /// </param>
+  static Int32 GetHashCode(Int32 value);
+
+  /// <summary>
+  /// Hashes consistent with java.lang.Long.hashCode().
+  /// </summary>
+  /// <param name="value">
+  /// Long to hash.
+  /// </param>
+  static Int32 GetHashCode(Int64 value);
+
+  /// <summary>
+  /// Hashes consistent with java.lang.Float.hashCode().
+  /// </summary>
+  /// <param name="value">
+  /// FLoat to hash.
+  /// </param>
+  static Int32 GetHashCode(Single value);
+
+  /// <summary>
+  /// Hashes consistent with java.lang.Double.hashCode().
+  /// </summary>
+  /// <param name="value">
+  /// Double to hash.
+  /// </param>
+  static Int32 GetHashCode(Double value);
+
+  /// <summary>
+  /// Hashes consistent with java.util.Date.hashCode().
+  /// </summary>
+  /// <param name="value">
+  /// Date to hash.
+  /// </param>
+  static Int32 GetHashCode(DateTime^ value);
+
+  /// <summary>
+  /// Hashes consistent with java.lang.Date.hashCode().
+  /// </summary>
+  /// <param name="value">
+  /// Date to hash.
+  /// </param>
+  static Int32 GetHashCode(DateTime value);
+
+  /// <summary>
+  /// Hashes consistent with java.util.Arrays.hashCode(Object[]) or
+  /// java.util.List.hashCode().
+  /// </summary>
+  /// <param name="value">
+  /// Array or List like collection to hash.
+  /// </param>
+  static Int32 GetHashCode(System::Collections::ICollection^ collection);
+
+  /// <summary>
+  /// Hashes consistent with java.util.Map.hashCode().
+  /// </summary>
+  /// <param name="dictionary">
+  /// Map to hash.
+  /// </param>
+  static Int32 GetHashCode(System::Collections::IDictionary^ dictionary);
+};
+
+}  // namespace Geode
+}  // namespace Apache
diff --git a/clicache/src/Properties.cpp b/clicache/src/Properties.cpp
index 89b87e5..dc37432 100644
--- a/clicache/src/Properties.cpp
+++ b/clicache/src/Properties.cpp
@@ -22,6 +22,7 @@
 #include "end_native.hpp"
 
 #include "Properties.hpp"
+#include "String.hpp"
 #include "impl/ManagedVisitor.hpp"
 #include "impl/SafeConvert.hpp"
 #include "ExceptionTypes.hpp"
@@ -187,7 +188,7 @@
 
           try
           {
-            m_nativeptr->get()->load( marshal_as<std::string>(fileName) );
+            m_nativeptr->get()->load( Apache::Geode::Client::to_utf8(fileName) );
           }
           finally
           {
diff --git a/clicache/src/Query.cpp b/clicache/src/Query.cpp
index 3f3cce6..18393c4 100644
--- a/clicache/src/Query.cpp
+++ b/clicache/src/Query.cpp
@@ -19,6 +19,7 @@
 #include "Query.hpp"
 #include "ISelectResults.hpp"
 #include "ResultSet.hpp"
+#include "String.hpp"
 #include "StructSet.hpp"
 #include "ExceptionTypes.hpp"
 #include "impl/SafeConvert.hpp"
@@ -112,7 +113,7 @@
       {
         try
         {
-          return marshal_as<String^>(m_nativeptr->get()->getQueryString());
+          return to_String(m_nativeptr->get()->getQueryString());
         }
         finally
         {
diff --git a/clicache/src/QueryService.cpp b/clicache/src/QueryService.cpp
index 49fd97c..38cbb58 100644
--- a/clicache/src/QueryService.cpp
+++ b/clicache/src/QueryService.cpp
@@ -23,8 +23,9 @@
 #include "CqAttributes.hpp"
 #include "CqQuery.hpp"
 #include "CqServiceStatistics.hpp"
-#include "impl/ManagedString.hpp"
 #include "ExceptionTypes.hpp"
+#include "String.hpp"
+#include "impl/ManagedString.hpp"
 #include "impl/SafeConvert.hpp"
 
 using namespace System;
@@ -42,7 +43,7 @@
         try
         {
           return Query<TResult>::Create(m_nativeptr->get()->newQuery(
-            marshal_as<std::string>(query)));
+            Apache::Geode::Client::to_utf8(query)));
         }
         catch (const apache::geode::client::Exception& ex)
         {
@@ -60,7 +61,7 @@
           try
           {
             return CqQuery<TKey, TResult>::Create(m_nativeptr->get()->newCq(
-              marshal_as<std::string>(query), cqAttr->GetNative(), isDurable));
+              Apache::Geode::Client::to_utf8(query), cqAttr->GetNative(), isDurable));
           }
           catch (const apache::geode::client::Exception& ex)
           {
@@ -79,7 +80,7 @@
         try
         {
           return CqQuery<TKey, TResult>::Create(m_nativeptr->get()->newCq(
-            marshal_as<std::string>(name), marshal_as<std::string>(query), cqAttr->GetNative(), isDurable));
+            Apache::Geode::Client::to_utf8(name), Apache::Geode::Client::to_utf8(query), cqAttr->GetNative(), isDurable));
         }
         catch (const apache::geode::client::Exception& ex)
         {
@@ -138,7 +139,7 @@
         try
         {
           return CqQuery<TKey, TResult>::Create(m_nativeptr->get()->getCq(
-            marshal_as<std::string>(name)));
+            Apache::Geode::Client::to_utf8(name)));
         }
         catch (const apache::geode::client::Exception& ex)
         {
@@ -206,7 +207,7 @@
           auto durableCqsList = gcnew System::Collections::Generic::List<String^>();
           for (const auto& d : *durableCqsArrayListPtr)
           {
-            durableCqsList->Add(marshal_as<String^>(std::dynamic_pointer_cast<apache::geode::client::CacheableString>(d)->value()));
+            durableCqsList->Add(to_String(std::dynamic_pointer_cast<apache::geode::client::CacheableString>(d)->value()));
           }
           return durableCqsList;
         }
diff --git a/clicache/src/Region.cpp b/clicache/src/Region.cpp
index 2f4ddef..c98bf82 100644
--- a/clicache/src/Region.cpp
+++ b/clicache/src/Region.cpp
@@ -37,6 +37,7 @@
 #include "LocalRegion.hpp"
 #include "Pool.hpp"
 #include "PoolManager.hpp"
+#include "String.hpp"
 #include "SystemProperties.hpp"
 #include "impl/CacheResolver.hpp"
 #include "TimeUtils.hpp"
@@ -774,7 +775,7 @@
       {
         try
         {
-          return marshal_as<String^>(m_nativeptr->get()->getName());
+          return to_String(m_nativeptr->get()->getName());
         }
         finally
         {
@@ -787,7 +788,7 @@
       {
         try
         {
-          return marshal_as<String^>(m_nativeptr->get()->getFullPath());
+          return to_String(m_nativeptr->get()->getFullPath());
         }
         finally
         {
@@ -874,7 +875,7 @@
 
           try
           {
-            auto subRegion = m_nativeptr->get()->getSubregion(marshal_as<std::string>(path));
+            auto subRegion = m_nativeptr->get()->getSubregion(Apache::Geode::Client::to_utf8(path));
             return Region::Create(subRegion);
           }
           finally
@@ -894,7 +895,7 @@
           try
           {
             auto p_attrs = attributes->GetNative();
-            return Region::Create(m_nativeptr->get()->createSubregion(marshal_as<std::string>(subRegionName), *p_attrs));
+            return Region::Create(m_nativeptr->get()->createSubregion(Apache::Geode::Client::to_utf8(subRegionName), *p_attrs));
           }
           finally
           {
@@ -1249,7 +1250,7 @@
         auto strarr = gcnew array<String^>(static_cast<int>(vc.size()));
         for (System::Int32 index = 0; index < strarr->Length; index++)
         {
-          strarr[index] = marshal_as<String^>(vc[index]->value());
+          strarr[index] = to_String(vc[index]->value());
           //collectionlist[ index ] = Serializable::GetManagedValue<TValue>(nativeptr);
         }
         auto collectionlist = (System::Collections::Generic::ICollection<String^>^)strarr;
@@ -1302,7 +1303,7 @@
 
         try
         {
-          m_nativeptr->get()->registerRegex(marshal_as<std::string>(regex), isDurable,
+          m_nativeptr->get()->registerRegex(Apache::Geode::Client::to_utf8(regex), isDurable,
             getInitialValues, receiveValues);
         }
         finally
@@ -1320,7 +1321,7 @@
 
         try
         {
-          m_nativeptr->get()->unregisterRegex(marshal_as<std::string>(regex));
+          m_nativeptr->get()->unregisterRegex(Apache::Geode::Client::to_utf8(regex));
         }
         finally
         {
@@ -1346,7 +1347,7 @@
 
           try
           {
-            auto selectResults = m_nativeptr->get()->query(marshal_as<std::string>(predicate), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(timeout));
+            auto selectResults = m_nativeptr->get()->query(Apache::Geode::Client::to_utf8(predicate), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(timeout));
             if (auto resultptr = std::dynamic_pointer_cast<native::ResultSet>(selectResults))
             {
               return ResultSet<TResult>::Create(resultptr);
@@ -1378,7 +1379,7 @@
 
           try
           {
-            return m_nativeptr->get()->existsValue(marshal_as<std::string>(predicate), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(timeout));
+            return m_nativeptr->get()->existsValue(Apache::Geode::Client::to_utf8(predicate), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(timeout));
           }
           finally
           {
@@ -1401,7 +1402,7 @@
 
         try
         {
-          auto nativeptr = m_nativeptr->get()->selectValue(marshal_as<std::string>(predicate), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(timeout));
+          auto nativeptr = m_nativeptr->get()->selectValue(Apache::Geode::Client::to_utf8(predicate), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(timeout));
           return TypeRegistry::GetManagedValueGeneric<Object^>(nativeptr);
         }
         finally
diff --git a/clicache/src/Serializable.cpp b/clicache/src/Serializable.cpp
index 34a222f..16ecd54 100644
--- a/clicache/src/Serializable.cpp
+++ b/clicache/src/Serializable.cpp
@@ -47,6 +47,7 @@
 #include "impl/DotNetTypes.hpp"
 #include "CacheRegionHelper.hpp"
 #include "Cache.hpp"
+#include "String.hpp"
 
 #pragma warning(disable:4091)
 
@@ -83,7 +84,7 @@
       {
         try
         {
-          return marshal_as<String^>(m_nativeptr->get()->toString());
+          return to_String(m_nativeptr->get()->toString());
         }
         finally
         {
@@ -387,17 +388,17 @@
       {
         if (auto cacheableString = std::dynamic_pointer_cast<native::CacheableString>(nativeptr))
         {
-          return marshal_as<String^>(cacheableString->value());
+          return to_String(cacheableString->value());
         }
 
-        return marshal_as<String^>(nativeptr->toString());
+        return to_String(nativeptr->toString());
       }
 
       std::shared_ptr<native::CacheableString> Serializable::GetCacheableString(String^ value)
       {
         std::shared_ptr<native::CacheableString> cStr;
         if (value) {
-          cStr = native::CacheableString::create(marshal_as<std::string>(value));
+          cStr = native::CacheableString::create(to_utf8(value));
         }
         else {
           cStr = std::dynamic_pointer_cast<native::CacheableString>(native::CacheableString::createDeserializable());
diff --git a/clicache/src/String.hpp b/clicache/src/String.hpp
new file mode 100644
index 0000000..a18024a
--- /dev/null
+++ b/clicache/src/String.hpp
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+#include <string>
+#include <codecvt>
+
+#include <msclr/marshal.h>
+#include <msclr/marshal_cppstd.h>
+
+using namespace System;
+
+namespace Apache
+{
+  namespace Geode
+  {
+    namespace Client
+    {
+
+      inline std::string to_utf8(const std::wstring& utf16) {
+        return std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>, wchar_t>{}.to_bytes(utf16);
+      }
+
+      inline std::string to_utf8(String^ utf16) {
+        return to_utf8(msclr::interop::marshal_as<std::wstring>(utf16));
+      }
+
+      inline std::wstring to_wstring(const std::string& utf8) {
+        return std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>, wchar_t>{}.from_bytes(utf8);
+      }
+
+      inline String^ to_String(const std::string& utf8) {
+        return msclr::interop::marshal_as<String^>(to_wstring(utf8));
+      }
+
+    }  // namespace Client
+  }  // namespace Geode
+}  // namespace Apache
+
diff --git a/clicache/src/TypeRegistry.cpp b/clicache/src/TypeRegistry.cpp
index 0845eb5..ea257b2 100644
--- a/clicache/src/TypeRegistry.cpp
+++ b/clicache/src/TypeRegistry.cpp
@@ -310,7 +310,7 @@
       }
 
       generic<class TValue>
-      TValue wrap(std::shared_ptr<native::DataSerializablePrimitive> dataSerializablePrimitive)
+      TValue wrap(std::shared_ptr<native::internal::DataSerializablePrimitive> dataSerializablePrimitive)
       {
         switch (dataSerializablePrimitive->getDsCode())
         {
@@ -463,7 +463,7 @@
           return TValue();
         }
 
-        if (auto dataSerializablePrimitive = std::dynamic_pointer_cast<native::DataSerializablePrimitive>(val))
+        if (auto dataSerializablePrimitive = std::dynamic_pointer_cast<native::internal::DataSerializablePrimitive>(val))
         {
           switch (dataSerializablePrimitive->getDsCode())
           {
diff --git a/clicache/src/impl/AppDomainContext.hpp b/clicache/src/impl/AppDomainContext.hpp
index 0fd6581..d1fc1aa 100644
--- a/clicache/src/impl/AppDomainContext.hpp
+++ b/clicache/src/impl/AppDomainContext.hpp
@@ -20,8 +20,11 @@
 
 #include <functional>
 #include <vcclr.h>
+#include <msclr/marshal_cppstd.h>
+#include <debugapi.h>
 #include "../begin_native.hpp"
 #include <AppDomainContext.hpp>
+#include <geode/ExceptionTypes.hpp>
 #include "../end_native.hpp"
 
 namespace Apache
@@ -61,7 +64,11 @@
   }
   
   void run(runnable func) {
-    functionPointer(func);
+    try {
+      functionPointer(func);
+    } catch (AppDomainUnloadedException^) {
+      // if AppDomain has unloaded then we are shutting down so we can ignore.
+    }
   }
 
 private:
diff --git a/clicache/src/impl/AssemblyInfo.cpp.in b/clicache/src/impl/AssemblyInfo.cpp.in
index 4d80e02..4431eae 100644
--- a/clicache/src/impl/AssemblyInfo.cpp.in
+++ b/clicache/src/impl/AssemblyInfo.cpp.in
@@ -42,5 +42,6 @@
 
 [assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)];
 
-[assembly:InternalsVisibleToAttribute("UnitTests@STRONG_NAME_PUBLIC_KEY_ATTRIBUTE@")];
-[assembly:InternalsVisibleToAttribute("cli-unit-tests@STRONG_NAME_PUBLIC_KEY_ATTRIBUTE@")];
+[assembly:InternalsVisibleToAttribute("Apache.Geode.Client.UnitTests")];
+[assembly:InternalsVisibleToAttribute("cli-unit-tests")];
+
diff --git a/clicache/src/impl/AuthenticatedView.cpp b/clicache/src/impl/AuthenticatedView.cpp
index 70ccd7b..3c91d54 100644
--- a/clicache/src/impl/AuthenticatedView.cpp
+++ b/clicache/src/impl/AuthenticatedView.cpp
@@ -29,6 +29,7 @@
 #include "../QueryService.hpp"
 #include "../FunctionService.hpp"
 #include "../Execution.hpp"
+#include "../String.hpp"
 #include "AuthenticatedView.hpp"
 #include "PdxInstanceFactoryImpl.hpp"
 
@@ -77,7 +78,7 @@
 
           try
           {
-            auto nativeptr = m_nativeptr->get()->getRegion( marshal_as<std::string>(path) );
+            auto nativeptr = m_nativeptr->get()->getRegion(to_utf8(path) );
             return Client::Region<TKey, TValue>::Create( nativeptr );
           }
           finally
diff --git a/clicache/src/impl/ManagedCacheableKey.cpp b/clicache/src/impl/ManagedCacheableKey.cpp
index 4165769..e3390d3 100644
--- a/clicache/src/impl/ManagedCacheableKey.cpp
+++ b/clicache/src/impl/ManagedCacheableKey.cpp
@@ -26,6 +26,7 @@
 #include "../CacheableString.hpp"
 #include "../ExceptionTypes.hpp"
 #include "../Log.hpp"
+#include "../String.hpp"
 #include "CacheResolver.hpp"
 
 using namespace System;
@@ -100,7 +101,7 @@
       std::string ManagedCacheableKeyGeneric::toString() const
       {
         try {
-          return marshal_as<std::string>(m_managedptr->ToString());
+          return Apache::Geode::Client::to_utf8(m_managedptr->ToString());
         }
         catch (Apache::Geode::Client::GeodeException^ ex) {
           ex->ThrowNative();
@@ -158,7 +159,7 @@
       }
 
       std::string ManagedDataSerializablePrimitive::toString() const {
-        return marshal_as<std::string>(m_managedptr->ToString());
+        return Apache::Geode::Client::to_utf8(m_managedptr->ToString());
       }
 
       void ManagedDataSerializablePrimitive::toData(apache::geode::client::DataOutput& output) const {
@@ -216,7 +217,7 @@
       }
 
       std::string ManagedDataSerializableInternal::toString() const {
-        return marshal_as<std::string>(m_managedptr->ToString());
+        return Apache::Geode::Client::to_utf8(m_managedptr->ToString());
       }
 
       void ManagedDataSerializableInternal::toData(apache::geode::client::DataOutput& output) const {
@@ -250,7 +251,7 @@
       }
 
       std::string ManagedDataSerializableFixedId::toString() const {
-        return marshal_as<std::string>(m_managedptr->ToString());
+        return Apache::Geode::Client::to_utf8(m_managedptr->ToString());
       }
 
       void ManagedDataSerializableFixedId::toData(apache::geode::client::DataOutput& output) const {
diff --git a/clicache/src/impl/ManagedString.hpp b/clicache/src/impl/ManagedString.hpp
index 8945ba9..ec702de 100644
--- a/clicache/src/impl/ManagedString.hpp
+++ b/clicache/src/impl/ManagedString.hpp
@@ -22,12 +22,6 @@
 
 #include "../geode_defs.hpp"
 
-#ifdef _WIN32
-// FIXME: Why is this needed?
-//#define snprintf _snprintf
-#endif
-
-
 using namespace System;
 
 namespace Apache
diff --git a/clicache/src/impl/MemoryPressureHandler.cpp b/clicache/src/impl/MemoryPressureHandler.cpp
deleted file mode 100644
index 2b01c74..0000000
--- a/clicache/src/impl/MemoryPressureHandler.cpp
+++ /dev/null
@@ -1,76 +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.
- */
-
-
-
-#include "MemoryPressureHandler.hpp"
-#include "windows.h"
-#include "psapi.h"
-#include "../Log.hpp"
-
-namespace Apache
-{
-  namespace Geode
-  {
-    namespace Client
-    {
-
-      System::Int64 g_prevUnmanagedSize = 0;
-
-      int MemoryPressureHandler::handle_timeout( const ACE_Time_Value&
-          current_time, const void* arg )
-      {
-        HANDLE hProcess = GetCurrentProcess( );
-
-        PROCESS_MEMORY_COUNTERS pmc;
-
-        if ( GetProcessMemoryInfo( hProcess, &pmc, sizeof(pmc)) ) {
-          System::Int64 totalmem  = (System::Int64)pmc.WorkingSetSize;
-          System::Int64 curr_managed_size = GC::GetTotalMemory( false );
-          System::Int64 curr_unmanagedMemory = totalmem - curr_managed_size;
-          Log::Finest( "Current total memory usage: {0}, managed memory: {1}, "
-              "unmanaged memory: {2}", totalmem, curr_managed_size,
-              curr_unmanagedMemory );
-          if ( curr_unmanagedMemory > 0 ) {
-            System::Int64 increase = curr_unmanagedMemory - g_prevUnmanagedSize;
-            if ( Math::Abs( increase ) > 20*1024*1024 ) {
-              if ( increase > 0 ) {
-                Log::Fine( "Adding memory pressure information to assist .NET GC: {0} bytes", increase );
-                GC::AddMemoryPressure( increase );
-              }
-              else {
-                Log::Fine( "Removing memory pressure information to assist .NET GC: {0} bytes", -increase );
-                GC::RemoveMemoryPressure( -increase );
-              }
-              g_prevUnmanagedSize = curr_unmanagedMemory;
-            }
-          }
-        }
-        else {
-          return -1;
-        }
-        return 0;
-      }
-
-      int MemoryPressureHandler::handle_close(ACE_HANDLE handle,
-        ACE_Reactor_Mask close_mask)
-      {
-        return 0;
-      }
-    }  // namespace Client
-  }  // namespace Geode
-}  // namespace Apache
diff --git a/clicache/src/impl/MemoryPressureHandler.hpp b/clicache/src/impl/MemoryPressureHandler.hpp
deleted file mode 100644
index 9ac0a6d..0000000
--- a/clicache/src/impl/MemoryPressureHandler.hpp
+++ /dev/null
@@ -1,45 +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.
- */
-
-#pragma once
-
-
-#include "../begin_native.hpp"
-#include <geode/internal/geode_globals.hpp>
-#include <ExpiryTaskManager.hpp>
-#include "../end_native.hpp"
-
-namespace Apache
-{
-  namespace Geode
-  {
-    namespace Client
-    {
-
-      class MemoryPressureHandler
-        : public ACE_Event_Handler
-      {
-        public:
-          int handle_timeout( const ACE_Time_Value& current_time,
-              const void* arg );
-
-          int handle_close( ACE_HANDLE handle, ACE_Reactor_Mask close_mask );
-      };
-    }  // namespace Client
-  }  // namespace Geode
-}  // namespace Apache
-
diff --git a/clicache/src/impl/PdxFieldType.cpp b/clicache/src/impl/PdxFieldType.cpp
index 543fcd4..87ad5b7 100644
--- a/clicache/src/impl/PdxFieldType.cpp
+++ b/clicache/src/impl/PdxFieldType.cpp
@@ -166,23 +166,23 @@
           switch (m_typeId)
           {
           case PdxFieldTypes::BYTE:
-            return PdxTypes::BYTE_SIZE;
+            return PdxTypes::kPdxByteSize;
           case PdxFieldTypes::BOOLEAN:
-            return PdxTypes::BOOLEAN_SIZE;
+            return PdxTypes::kPdxBooleanSize;
           case PdxFieldTypes::SHORT:
-            return PdxTypes::SHORT_SIZE;
+            return PdxTypes::kPdxShortSize;
           case PdxFieldTypes::CHAR:
-            return PdxTypes::CHAR_SIZE;
+            return PdxTypes::kPdxCharSize;
           case PdxFieldTypes::INT:
-            return PdxTypes::INTEGER_SIZE;
+            return PdxTypes::kPdxIntegerSize;
           case PdxFieldTypes::FLOAT:
-            return PdxTypes::FLOAT_SIZE;
+            return PdxTypes::kPdxFloatSize;
           case PdxFieldTypes::LONG:
-            return PdxTypes::LONG_SIZE;
+            return PdxTypes::kPdxLongSize;
           case PdxFieldTypes::DOUBLE:
-            return PdxTypes::DOUBLE_SIZE;
+            return PdxTypes::kPdxDoubleSize;
           case PdxFieldTypes::DATE:
-            return PdxTypes::DATE_SIZE;
+            return PdxTypes::kPdxDateSize;
 
           default:
             return -1;
diff --git a/clicache/src/impl/PdxHelper.hpp b/clicache/src/impl/PdxHelper.hpp
index 4a47305..cf35599 100644
--- a/clicache/src/impl/PdxHelper.hpp
+++ b/clicache/src/impl/PdxHelper.hpp
@@ -46,7 +46,7 @@
 
           static IPdxSerializable^ DeserializePdx(DataInput^ dataOutput, bool forceDeserialize, const native::SerializationRegistry* serializationRegistry);
 
-          static IPdxSerializable^ PdxHelper::DeserializePdx(DataInput^ dataInput, bool forceDeserialize, int typeId, int length, const native::SerializationRegistry* serializationRegistry);
+          static IPdxSerializable^ DeserializePdx(DataInput^ dataInput, bool forceDeserialize, int typeId, int length, const native::SerializationRegistry* serializationRegistry);
 
           literal Byte PdxHeader = 8;
 
@@ -54,7 +54,7 @@
 
           static Int32 ReadInt16(System::Byte* offsetPosition);
 
-					static Int32 PdxHelper::ReadUInt16(System::Byte* offsetPosition);
+          static Int32 ReadUInt16(System::Byte* offsetPosition);
 
           static Int32 ReadByte(System::Byte* offsetPosition);
 
diff --git a/clicache/src/impl/PdxInstanceFactoryImpl.cpp b/clicache/src/impl/PdxInstanceFactoryImpl.cpp
index 5b09927..fb9af97 100644
--- a/clicache/src/impl/PdxInstanceFactoryImpl.cpp
+++ b/clicache/src/impl/PdxInstanceFactoryImpl.cpp
@@ -64,7 +64,7 @@
         IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteChar(String^ fieldName, Char value)
         {
           isFieldAdded(fieldName);
-          m_pdxType->AddFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR, native::PdxTypes::CHAR_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR, native::PdxTypes::kPdxCharSize);
           m_FieldVsValues->Add(fieldName, value);
           return this;
         }
@@ -72,7 +72,7 @@
         IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteBoolean(String^ fieldName, Boolean value)
         {
           isFieldAdded(fieldName);
-          m_pdxType->AddFixedLengthTypeField(fieldName, "boolean", PdxFieldTypes::BOOLEAN, native::PdxTypes::BOOLEAN_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "boolean", PdxFieldTypes::BOOLEAN, native::PdxTypes::kPdxBooleanSize);
           m_FieldVsValues->Add(fieldName, value);
           return this;
         }
@@ -80,7 +80,7 @@
         IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteByte(String^ fieldName, SByte value)
         {
           isFieldAdded(fieldName);
-          m_pdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE, native::PdxTypes::BYTE_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE, native::PdxTypes::kPdxByteSize);
           m_FieldVsValues->Add(fieldName, value);
           return this;
         }
@@ -88,7 +88,7 @@
         IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteShort(String^ fieldName, Int16 value)
         {
           isFieldAdded(fieldName);
-          m_pdxType->AddFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT, native::PdxTypes::SHORT_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT, native::PdxTypes::kPdxShortSize);
           m_FieldVsValues->Add(fieldName, value);
           return this;
         }
@@ -96,7 +96,7 @@
         IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteInt(String^ fieldName, Int32 value)
         {
           isFieldAdded(fieldName);
-          m_pdxType->AddFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT, native::PdxTypes::INTEGER_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT, native::PdxTypes::kPdxIntegerSize);
           m_FieldVsValues->Add(fieldName, value);
           return this;
         }
@@ -104,7 +104,7 @@
         IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteLong(String^ fieldName, Int64 value)
         {
           isFieldAdded(fieldName);
-          m_pdxType->AddFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG, native::PdxTypes::LONG_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG, native::PdxTypes::kPdxLongSize);
           m_FieldVsValues->Add(fieldName, value);
           return this;
         }
@@ -112,7 +112,7 @@
         IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteFloat(String^ fieldName, float value)
         {
           isFieldAdded(fieldName);
-          m_pdxType->AddFixedLengthTypeField(fieldName, "float", PdxFieldTypes::FLOAT, native::PdxTypes::FLOAT_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "float", PdxFieldTypes::FLOAT, native::PdxTypes::kPdxFloatSize);
           m_FieldVsValues->Add(fieldName, value);
           return this;
         }
@@ -120,7 +120,7 @@
         IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteDouble(String^ fieldName, double value)
         {
           isFieldAdded(fieldName);
-          m_pdxType->AddFixedLengthTypeField(fieldName, "double", PdxFieldTypes::DOUBLE, native::PdxTypes::DOUBLE_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "double", PdxFieldTypes::DOUBLE, native::PdxTypes::kPdxDoubleSize);
           m_FieldVsValues->Add(fieldName, value);
           return this;
         }
@@ -128,7 +128,7 @@
         IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteDate(String^ fieldName, System::DateTime value)
         {
           isFieldAdded(fieldName);
-          m_pdxType->AddFixedLengthTypeField(fieldName, "Date", PdxFieldTypes::DATE, native::PdxTypes::DATE_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "Date", PdxFieldTypes::DATE, native::PdxTypes::kPdxDateSize);
           m_FieldVsValues->Add(fieldName, value);
           return this;
         }
diff --git a/clicache/src/impl/PdxInstanceImpl.cpp b/clicache/src/impl/PdxInstanceImpl.cpp
index 736e780..14cae16 100755
--- a/clicache/src/impl/PdxInstanceImpl.cpp
+++ b/clicache/src/impl/PdxInstanceImpl.cpp
@@ -20,6 +20,7 @@
 #include <CacheRegionHelper.hpp>
 #include <CacheImpl.hpp>
 #include <CachePerfStats.hpp>
+#include <Utils.hpp>
 #include "../end_native.hpp"
 
 #include "PdxInstanceImpl.hpp"
diff --git a/clicache/src/impl/PdxManagedCacheableKey.cpp b/clicache/src/impl/PdxManagedCacheableKey.cpp
index 272db16..6a89ce5 100644
--- a/clicache/src/impl/PdxManagedCacheableKey.cpp
+++ b/clicache/src/impl/PdxManagedCacheableKey.cpp
@@ -26,6 +26,7 @@
 #include "../DataOutput.hpp"
 #include "../CacheableString.hpp"
 #include "../ExceptionTypes.hpp"
+#include "../String.hpp"
 #include "CacheRegionHelper.hpp"
 #include "PdxHelper.hpp"
 #include "SafeConvert.hpp"
@@ -73,7 +74,7 @@
       {
         try
         {
-          return marshal_as<std::string>(m_managedptr->ToString());
+          return Apache::Geode::Client::to_utf8(m_managedptr->ToString());
         }
         catch (Apache::Geode::Client::GeodeException^ ex)
         {
diff --git a/clicache/src/impl/PdxReaderWithTypeCollector.cpp b/clicache/src/impl/PdxReaderWithTypeCollector.cpp
index 4380e4a..4dbe6c3 100644
--- a/clicache/src/impl/PdxReaderWithTypeCollector.cpp
+++ b/clicache/src/impl/PdxReaderWithTypeCollector.cpp
@@ -49,7 +49,7 @@
         SByte PdxReaderWithTypeCollector::ReadByte(String^ fieldName)
         {
           checkType(fieldName, PdxFieldTypes::BYTE, "byte");
-          m_newPdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE, native::PdxTypes::BYTE_SIZE);
+          m_newPdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE, native::PdxTypes::kPdxByteSize);
           int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
           if (position != -1)
           {
@@ -65,7 +65,7 @@
         SByte PdxReaderWithTypeCollector::ReadSByte(String^ fieldName)
         {
           checkType(fieldName, PdxFieldTypes::BYTE, "byte");
-          m_newPdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE, native::PdxTypes::BYTE_SIZE);
+          m_newPdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE, native::PdxTypes::kPdxByteSize);
           int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
           if (position != -1)
           {
@@ -80,7 +80,7 @@
         Boolean PdxReaderWithTypeCollector::ReadBoolean(String^ fieldName)
         {
           checkType(fieldName, PdxFieldTypes::BOOLEAN, "boolean");
-          m_newPdxType->AddFixedLengthTypeField(fieldName, "boolean", PdxFieldTypes::BOOLEAN, native::PdxTypes::BOOLEAN_SIZE);
+          m_newPdxType->AddFixedLengthTypeField(fieldName, "boolean", PdxFieldTypes::BOOLEAN, native::PdxTypes::kPdxBooleanSize);
           int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
           m_dataInput->AdvanceCursorPdx(position);
           bool retVal = PdxLocalReader::ReadBoolean(fieldName);
@@ -91,7 +91,7 @@
         Char PdxReaderWithTypeCollector::ReadChar(String^ fieldName)
         {
           checkType(fieldName, PdxFieldTypes::CHAR, "char");
-          m_newPdxType->AddFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR, native::PdxTypes::CHAR_SIZE);
+          m_newPdxType->AddFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR, native::PdxTypes::kPdxCharSize);
           int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
           m_dataInput->AdvanceCursorPdx(position);
           Char retVal = PdxLocalReader::ReadChar(fieldName);
@@ -102,7 +102,7 @@
         System::UInt16 PdxReaderWithTypeCollector::ReadUInt16(String^ fieldName)
         {
           checkType(fieldName, PdxFieldTypes::SHORT, "short");
-          m_newPdxType->AddFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT, native::PdxTypes::SHORT_SIZE);
+          m_newPdxType->AddFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT, native::PdxTypes::kPdxShortSize);
           int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
           if (position != -1)
           {
@@ -117,7 +117,7 @@
         System::UInt32 PdxReaderWithTypeCollector::ReadUInt32(String^ fieldName)
         {
           checkType(fieldName, PdxFieldTypes::INT, "int");
-          m_newPdxType->AddFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT, native::PdxTypes::INTEGER_SIZE);
+          m_newPdxType->AddFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT, native::PdxTypes::kPdxIntegerSize);
           int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
           if (position != -1)
           {
@@ -132,7 +132,7 @@
         System::UInt64 PdxReaderWithTypeCollector::ReadUInt64(String^ fieldName)
         {
           checkType(fieldName, PdxFieldTypes::LONG, "long");
-          m_newPdxType->AddFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG, native::PdxTypes::LONG_SIZE);
+          m_newPdxType->AddFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG, native::PdxTypes::kPdxLongSize);
           int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
           if (position != -1)
           {
@@ -147,7 +147,7 @@
         short PdxReaderWithTypeCollector::ReadShort(String^ fieldName)
         {
           checkType(fieldName, PdxFieldTypes::SHORT, "short");
-          m_newPdxType->AddFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT, native::PdxTypes::SHORT_SIZE);
+          m_newPdxType->AddFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT, native::PdxTypes::kPdxShortSize);
           int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
           if (position != -1)
           {
@@ -162,7 +162,7 @@
         Int32 PdxReaderWithTypeCollector::ReadInt(String^ fieldName)
         {
           checkType(fieldName, PdxFieldTypes::INT, "int");
-          m_newPdxType->AddFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT, native::PdxTypes::INTEGER_SIZE);
+          m_newPdxType->AddFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT, native::PdxTypes::kPdxIntegerSize);
           int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
           if (position != -1)
           {
@@ -177,7 +177,7 @@
         Int64 PdxReaderWithTypeCollector::ReadLong(String^ fieldName)
         {
           checkType(fieldName, PdxFieldTypes::LONG, "long");
-          m_newPdxType->AddFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG, native::PdxTypes::LONG_SIZE);
+          m_newPdxType->AddFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG, native::PdxTypes::kPdxLongSize);
           int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
           if (position != -1)
           {
@@ -192,7 +192,7 @@
         float PdxReaderWithTypeCollector::ReadFloat(String^ fieldName)
         {
           checkType(fieldName, PdxFieldTypes::FLOAT, "float");
-          m_newPdxType->AddFixedLengthTypeField(fieldName, "float", PdxFieldTypes::FLOAT, native::PdxTypes::FLOAT_SIZE);
+          m_newPdxType->AddFixedLengthTypeField(fieldName, "float", PdxFieldTypes::FLOAT, native::PdxTypes::kPdxFloatSize);
           int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
           if (position != -1)
           {
@@ -207,7 +207,7 @@
         double PdxReaderWithTypeCollector::ReadDouble(String^ fieldName)
         {
           checkType(fieldName, PdxFieldTypes::DOUBLE, "double");
-          m_newPdxType->AddFixedLengthTypeField(fieldName, "double", PdxFieldTypes::DOUBLE, native::PdxTypes::DOUBLE_SIZE);
+          m_newPdxType->AddFixedLengthTypeField(fieldName, "double", PdxFieldTypes::DOUBLE, native::PdxTypes::kPdxDoubleSize);
           int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
           if (position != -1)
           {
@@ -284,7 +284,7 @@
         System::DateTime PdxReaderWithTypeCollector::ReadDate(String^ fieldName)
         {
           checkType(fieldName, PdxFieldTypes::DATE, "Date");
-          m_newPdxType->AddFixedLengthTypeField(fieldName, "Date", PdxFieldTypes::DATE, native::PdxTypes::DATE_SIZE);
+          m_newPdxType->AddFixedLengthTypeField(fieldName, "Date", PdxFieldTypes::DATE, native::PdxTypes::kPdxDateSize);
           int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
           if (position != -1)
           {
diff --git a/clicache/src/impl/PdxWriterWithTypeCollector.cpp b/clicache/src/impl/PdxWriterWithTypeCollector.cpp
index 850f1f4..5530b97 100644
--- a/clicache/src/impl/PdxWriterWithTypeCollector.cpp
+++ b/clicache/src/impl/PdxWriterWithTypeCollector.cpp
@@ -103,84 +103,84 @@
 
         IPdxWriter^ PdxWriterWithTypeCollector::WriteByte(String^ fieldName, SByte value)
         {
-          m_pdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE,  native::PdxTypes::BYTE_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE,  native::PdxTypes::kPdxByteSize);
           PdxLocalWriter::WriteByte(fieldName, value);
           return this;
         }
 
         IPdxWriter^ PdxWriterWithTypeCollector::WriteSByte(String^ fieldName, SByte value)
         {
-          m_pdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE,  native::PdxTypes::BYTE_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE,  native::PdxTypes::kPdxByteSize);
           PdxLocalWriter::WriteSByte(fieldName, value);
           return this;
         }
 
         IPdxWriter^ PdxWriterWithTypeCollector::WriteBoolean(String^ fieldName, bool value)
         {
-          m_pdxType->AddFixedLengthTypeField(fieldName, "boolean", PdxFieldTypes::BOOLEAN,  native::PdxTypes::BOOLEAN_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "boolean", PdxFieldTypes::BOOLEAN,  native::PdxTypes::kPdxBooleanSize);
           PdxLocalWriter::WriteBoolean(fieldName, value);
           return this;
         }
 
         IPdxWriter^ PdxWriterWithTypeCollector::WriteChar(String^ fieldName, Char value)
         {
-          m_pdxType->AddFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR,  native::PdxTypes::CHAR_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR,  native::PdxTypes::kPdxCharSize);
           PdxLocalWriter::WriteChar(fieldName, value);
           return this;
         }
 
         IPdxWriter^ PdxWriterWithTypeCollector::WriteUInt16(String^ fieldName, System::UInt16 value)
         {
-          m_pdxType->AddFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT,  native::PdxTypes::SHORT_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT,  native::PdxTypes::kPdxShortSize);
           PdxLocalWriter::WriteUInt16(fieldName, value);
           return this;
         }
 
         IPdxWriter^ PdxWriterWithTypeCollector::WriteUInt32(String^ fieldName, System::UInt32 value)
         {
-          m_pdxType->AddFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT,  native::PdxTypes::INTEGER_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT,  native::PdxTypes::kPdxIntegerSize);
           PdxLocalWriter::WriteUInt32(fieldName, value);
           return this;
         }
 
         IPdxWriter^ PdxWriterWithTypeCollector::WriteUInt64(String^ fieldName, System::UInt64 value)
         {
-          m_pdxType->AddFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG,  native::PdxTypes::LONG_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG,  native::PdxTypes::kPdxLongSize);
           PdxLocalWriter::WriteUInt64(fieldName, value);
           return this;
         }
 
         IPdxWriter^ PdxWriterWithTypeCollector::WriteShort(String^ fieldName, System::Int16 value)
         {
-          m_pdxType->AddFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT,  native::PdxTypes::SHORT_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT,  native::PdxTypes::kPdxShortSize);
           PdxLocalWriter::WriteShort(fieldName, value);
           return this;
         }
 
         IPdxWriter^ PdxWriterWithTypeCollector::WriteInt(String^ fieldName, System::Int32 value)
         {
-          m_pdxType->AddFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT,  native::PdxTypes::INTEGER_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT,  native::PdxTypes::kPdxIntegerSize);
           PdxLocalWriter::WriteInt(fieldName, value);
           return this;
         }
 
         IPdxWriter^ PdxWriterWithTypeCollector::WriteLong(String^ fieldName, Int64 value)
         {
-          m_pdxType->AddFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG,  native::PdxTypes::LONG_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG,  native::PdxTypes::kPdxLongSize);
           PdxLocalWriter::WriteLong(fieldName, value);
           return this;
         }
 
         IPdxWriter^ PdxWriterWithTypeCollector::WriteFloat(String^ fieldName, float value)
         {
-          m_pdxType->AddFixedLengthTypeField(fieldName, "float", PdxFieldTypes::FLOAT,  native::PdxTypes::FLOAT_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "float", PdxFieldTypes::FLOAT,  native::PdxTypes::kPdxFloatSize);
           PdxLocalWriter::WriteFloat(fieldName, value);
           return this;
         }
 
         IPdxWriter^ PdxWriterWithTypeCollector::WriteDouble(String^ fieldName, double value)
         {
-          m_pdxType->AddFixedLengthTypeField(fieldName, "double", PdxFieldTypes::DOUBLE,  native::PdxTypes::DOUBLE_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "double", PdxFieldTypes::DOUBLE,  native::PdxTypes::kPdxDoubleSize);
           PdxLocalWriter::WriteDouble(fieldName, value);
           return this;
         }
@@ -215,7 +215,7 @@
 
         IPdxWriter^ PdxWriterWithTypeCollector::WriteDate(String^ fieldName, System::DateTime date)
         {
-          m_pdxType->AddFixedLengthTypeField(fieldName, "Date", PdxFieldTypes::DATE,  native::PdxTypes::DATE_SIZE);
+          m_pdxType->AddFixedLengthTypeField(fieldName, "Date", PdxFieldTypes::DATE,  native::PdxTypes::kPdxDateSize);
           PdxLocalWriter::WriteDate(fieldName, date);
           return this;
         }
diff --git a/clicache/src/impl/SafeConvert.hpp b/clicache/src/impl/SafeConvert.hpp
index a52d221..45e2090 100644
--- a/clicache/src/impl/SafeConvert.hpp
+++ b/clicache/src/impl/SafeConvert.hpp
@@ -74,7 +74,7 @@
         {           
           return managedPrimitive->ptr();
         } 
-        else if (auto primitive = std::dynamic_pointer_cast<native::DataSerializablePrimitive>(serializableObject))
+        else if (auto primitive = std::dynamic_pointer_cast<native::internal::DataSerializablePrimitive>(serializableObject))
         {           
           if (auto wrapperMethod = TypeRegistry::GetDataSerializablePrimitiveWrapperDelegateForDsCode(static_cast<int8_t>(primitive->getDsCode())))
           {
@@ -174,7 +174,7 @@
             return (Client::ICacheableKey^)mg_obj->ptr( );
         }
 
-        if (auto primitive = std::dynamic_pointer_cast<native::DataSerializablePrimitive>(obj)) {
+        if (auto primitive = std::dynamic_pointer_cast<native::internal::DataSerializablePrimitive>(obj)) {
           auto wrapperMethod = TypeRegistry::GetDataSerializablePrimitiveWrapperDelegateForDsCode(static_cast<int8_t>(primitive->getDsCode()));
           if (wrapperMethod != nullptr)
           {
diff --git a/clicache/src/native_shared_ptr.hpp b/clicache/src/native_shared_ptr.hpp
index e01cbe3..572c80a 100644
--- a/clicache/src/native_shared_ptr.hpp
+++ b/clicache/src/native_shared_ptr.hpp
@@ -42,7 +42,10 @@
         }
 
         !native_shared_ptr() {
-          delete ptr;
+          if (ptr) {
+            delete ptr;
+            ptr = nullptr;
+          }
         }
 
         inline _T* get() {
diff --git a/clicache/src/templates/CMakeLists.txt b/clicache/src/templates/CMakeLists.txt
deleted file mode 100644
index 6c5f4e7..0000000
--- a/clicache/src/templates/CMakeLists.txt
+++ /dev/null
@@ -1,26 +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.
-cmake_minimum_required(VERSION 3.4)
-project(nativeclient.clicache.templates)
-
-foreach(var CMAKE_CURRENT_SOURCE_DIR CMAKE_SOURCE_DIR CMAKE_BINARY_DIR CMAKE_CURRENT_BINARY_DIR)
-  file(TO_NATIVE_PATH ${${var}} ${var}_NATIVE)
-endforeach()
-
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Templates.csproj.in ${CMAKE_BINARY_DIR}/clicache/templates/Templates.csproj)  
-
-include_external_msproject(
-      Templates   ${CMAKE_BINARY_DIR}/clicache/templates/Templates.csproj
-      TYPE FAE04EC0-301F-11D3-BF4B-00C04F79EFBC)
diff --git a/clicache/src/templates/Templates.csproj.in b/clicache/src/templates/Templates.csproj.in
deleted file mode 100644
index 65b5f8a..0000000
--- a/clicache/src/templates/Templates.csproj.in
+++ /dev/null
@@ -1,137 +0,0 @@
-<?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.
--->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
-  <PropertyGroup>
-    <CMAKE_SOURCE_DIR>${CMAKE_SOURCE_DIR_NATIVE}</CMAKE_SOURCE_DIR>
-    <CMAKE_CURRENT_SOURCE_DIR>${CMAKE_CURRENT_SOURCE_DIR_NATIVE}</CMAKE_CURRENT_SOURCE_DIR>
-    <CMAKE_BINARY_DIR>${CMAKE_BINARY_DIR_NATIVE}</CMAKE_BINARY_DIR>
-    <CMAKE_CURRENT_BINARY_DIR>${CMAKE_CURRENT_BINARY_DIR_NATIVE}</CMAKE_CURRENT_BINARY_DIR>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">x64</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{1B99F0C4-B241-45C7-BFAF-2009D0664901}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Apache.Geode.Templates.Cache.Security</RootNamespace>
-    <AssemblyName>Apache.Geode.Templates.Cache.Security</AssemblyName>
-    <SignAssembly>${STRONG_NAME_KEY_ENABLED}</SignAssembly>
-    <AssemblyOriginatorKeyFile>${STRONG_NAME_KEY}</AssemblyOriginatorKeyFile>
-    <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
-    <FileUpgradeFlags>
-    </FileUpgradeFlags>
-    <OldToolsVersion>2.0</OldToolsVersion>
-    <UpgradeBackupLocation />
-    <PublishUrl>publish\</PublishUrl>
-    <Install>true</Install>
-    <InstallFrom>Disk</InstallFrom>
-    <UpdateEnabled>false</UpdateEnabled>
-    <UpdateMode>Foreground</UpdateMode>
-    <UpdateInterval>7</UpdateInterval>
-    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
-    <UpdatePeriodically>false</UpdatePeriodically>
-    <UpdateRequired>false</UpdateRequired>
-    <MapFileExtensions>true</MapFileExtensions>
-    <ApplicationRevision>0</ApplicationRevision>
-    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
-    <IsWebBootstrapper>false</IsWebBootstrapper>
-    <UseApplicationTrust>false</UseApplicationTrust>
-    <BootstrapperEnabled>true</BootstrapperEnabled>
-    <TargetFrameworkProfile />
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <IntermediateOutputPath>Debug</IntermediateOutputPath>
-    <OutputPath>Debug</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <PlatformTarget>x86</PlatformTarget>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <IntermediateOutputPath>Release</IntermediateOutputPath>
-    <OutputPath>Release</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <PlatformTarget>x86</PlatformTarget>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
-    <DebugSymbols>true</DebugSymbols>
-    <IntermediateOutputPath>Debug</IntermediateOutputPath>
-    <OutputPath>Debug</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
-    <IntermediateOutputPath>Release</IntermediateOutputPath>
-    <OutputPath>Release</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' ">
-    <IntermediateOutputPath>RelWithDebInfo</IntermediateOutputPath>
-    <OutputPath>RelWithDebInfo</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-  </PropertyGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CMAKE_BINARY_DIR)\clicache\src\Apache.Geode.vcxproj">
-      <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
-    </ProjectReference>
-    <Reference Include="System" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="$(CMAKE_SOURCE_DIR)\templates\security\csharp\AssemblyInfo.cs">
-      <Link>AssemblyInfo.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_SOURCE_DIR)\templates\security\csharp\UserPasswordAuthInit.cs">
-      <Link>UserPasswordAuthInit.cs</Link>
-    </Compile>
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="$(CMAKE_SOURCE_DIR)\clicache\keys\gemfire.snk" />
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-</Project>
diff --git a/clicache/test/CMakeLists.txt b/clicache/test/CMakeLists.txt
index acb0229..898a117 100644
--- a/clicache/test/CMakeLists.txt
+++ b/clicache/test/CMakeLists.txt
@@ -13,22 +13,27 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.10)
+cmake_minimum_required(VERSION 3.12)
 project(Apache.Geode.Test CXX)
 
-if(NOT "${STRONG_NAME_PUBLIC_KEY}" STREQUAL "")
-  set(STRONG_NAME_PUBLIC_KEY_ATTRIBUTE ", PublicKey=${STRONG_NAME_PUBLIC_KEY}")
-endif()
+set(vstest_dir ${CMAKE_BINARY_DIR}/packages/Microsoft.TestPlatform.16.8.3/tools/net451/Common7/IDE/Extensions/TestPlatform)
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/packages.config ${CMAKE_CURRENT_BINARY_DIR}/packages.config COPYONLY)
+list(APPEND CONFIGURE_IN_FILES ${CMAKE_CURRENT_SOURCE_DIR}/packages.config)
+list(APPEND CONFIGURE_OUT_FILES ${CMAKE_CURRENT_BINARY_DIR}/packages.config)
+
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/AssemblyInfo.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/AssemblyInfo.cpp)
 list(APPEND CONFIGURE_IN_FILES ${CMAKE_CURRENT_SOURCE_DIR}/AssemblyInfo.cpp.in)
 list(APPEND CONFIGURE_OUT_FILES ${CMAKE_CURRENT_BINARY_DIR}/AssemblyInfo.cpp)
 
 add_library(Apache.Geode.Test MODULE
-  AssemblyInfo.cpp.in
   native_conditional_unqiue_ptrTests.cpp
   native_shared_ptrTests.cpp
   native_unique_ptrTests.cpp
   TimeUtilsTests.cpp
+  SerializableTests.cpp
+  StringTests.cpp
+  ${CONFIGURE_IN_FILES}
   ${CONFIGURE_OUT_FILES}
 )
 
@@ -36,35 +41,42 @@
   COMMON_LANGUAGE_RUNTIME "" 
   VS_GLOBAL_CLRSupport "true"
   VS_GLOBAL_KEYWORD "ManagedCProj"
+  VS_GLOBAL_IsTestProject True
   VS_GLOBAL_TestProjectType UnitTest
   VS_GLOBAL_PROJECT_TYPES "{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}"
   VS_GLOBAL_ROOTNAMESPACE Apache.Geode.Test
-  VS_DOTNET_REFERENCES "System;System.Xml;Microsoft.VisualStudio.QualityTools.UnitTestFramework"
+  VS_DOTNET_REFERENCES "System;System.Xml"
+  VS_DOTNET_REFERENCE_Microsoft.VisualStudio.QualityTools.UnitTestFramework "${vstest_dir}/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll"
   FOLDER cli/test/unit
 )
 
 target_include_directories(Apache.Geode.Test
   PRIVATE
-  	$<TARGET_PROPERTY:apache-geode,SOURCE_DIR>
+  	$<TARGET_PROPERTY:apache-geode,SOURCE_DIR>/../src
   	$<TARGET_PROPERTY:apache-geode,INCLUDE_DIRECTORIES>
-  	$<TARGET_PROPERTY:Apache.Geode,SOURCE_DIR>
+  	$<TARGET_PROPERTY:Apache.Geode-object,SOURCE_DIR>
 )
 
 target_link_libraries(Apache.Geode.Test
   PUBLIC
-    # Apache.Geode #- Causes include of .lib
+    Apache.Geode-object
   PRIVATE
     c++cli
 	c++11
 	_WarningsAsError
 )
 
-# Makes project only reference, no .lib.
-add_dependencies(Apache.Geode.Test Apache.Geode)
-
-string(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
-set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${SHARED_LINKER_FLAGS_STRONG_KEY}")
+add_dependencies(Apache.Geode.Test nuget-restore)
 
 # For Visual Studio organization
 source_group("Configure In Files" FILES ${CONFIGURE_IN_FILES})
 source_group("Configure Out Files" FILES ${CONFIGURE_OUT_FILES})
+
+enable_testing()
+
+add_test(NAME Apache.Geode.Test
+  COMMAND ${vstest_dir}/vstest.console.exe
+          $<SHELL_PATH:$<TARGET_FILE:Apache.Geode.Test>>
+          --nologo --parallel
+  WORKING_DIRECTORY "$<TARGET_FILE_DIR:Apache.Geode.Test>"
+)
diff --git a/clicache/test/SerializableTests.cpp b/clicache/test/SerializableTests.cpp
new file mode 100644
index 0000000..c4eddd1
--- /dev/null
+++ b/clicache/test/SerializableTests.cpp
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+
+#include "Serializable.hpp"
+#include <geode/CacheableString.hpp>
+
+using namespace System;
+using namespace System::Text;
+using namespace System::Collections::Generic;
+using namespace Microsoft::VisualStudio::TestTools::UnitTesting;
+
+using Apache::Geode::Client::Serializable;
+
+[TestClass]
+public ref class SerializableTests
+{
+public: 
+
+  [TestMethod]
+  void GetCacheableStringHandlesNonAsciiCharacters()
+  {
+    auto cacheableString = Serializable::GetCacheableString(gcnew String(L"foo\u2019s\U00010003"));
+    Assert::IsFalse(cacheableString.get() == nullptr);
+    Assert::IsTrue(std::string("foo\xE2\x80\x99s\xf0\x90\x80\x83") == cacheableString->value());
+  }
+
+    [TestMethod]
+  void GetStringHandlesNonAsciiCharacters()
+  {
+    auto cacheableString = apache::geode::client::CacheableString::create("foo\xE2\x80\x99s\xf0\x90\x80\x83");
+    auto str = Serializable::getString(cacheableString);
+    Assert::AreEqual(gcnew String(L"foo\u2019s\U00010003"), str);
+  }
+
+};
diff --git a/clicache/test/StringTests.cpp b/clicache/test/StringTests.cpp
new file mode 100644
index 0000000..bef1349
--- /dev/null
+++ b/clicache/test/StringTests.cpp
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ */
+
+#include "String.hpp"
+
+using namespace System;
+using namespace Microsoft::VisualStudio::TestTools::UnitTesting;
+using namespace Apache::Geode::Client;
+
+[TestClass]
+public ref class StringTests
+{
+public: 
+
+  [TestMethod]
+  void to_uft8FromStringHandlesNonAscii()
+  {
+    String^ str = L"foo\u2019s\U00010003";
+    auto utf8 = to_utf8(str);
+    Assert::IsTrue(std::string("foo\xE2\x80\x99s\xf0\x90\x80\x83") == utf8);
+  }
+
+  
+  [TestMethod]
+  void to_StringFromUtf8HandlesNonAscii()
+  {
+    std::string utf8("foo\xE2\x80\x99s\xf0\x90\x80\x83");
+    auto str = to_String(utf8);
+    Assert::AreEqual(gcnew String(L"foo\u2019s\U00010003"), str);
+  }
+};
diff --git a/clicache/test/packages.config b/clicache/test/packages.config
new file mode 100644
index 0000000..96f4dcc
--- /dev/null
+++ b/clicache/test/packages.config
@@ -0,0 +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.
+-->
+<packages>
+  <package id="Microsoft.TestPlatform" version="16.8.3" targetFramework="net452" />
+</packages>
diff --git a/clicache/test2/CMakeLists.txt b/clicache/test2/CMakeLists.txt
index cd022c6..f4c9f5d 100644
--- a/clicache/test2/CMakeLists.txt
+++ b/clicache/test2/CMakeLists.txt
@@ -17,11 +17,13 @@
 project( Apache.Geode.Tests2 CSharp )
 
 set(CMAKE_CSharp_FLAGS "/langversion:5")
+set(vstest_dir ${CMAKE_BINARY_DIR}/packages/Microsoft.TestPlatform.16.8.3/tools/net451/Common7/IDE/Extensions/TestPlatform)
 
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/packages.config ${CMAKE_CURRENT_BINARY_DIR}/packages.config COPYONLY)
 
-add_library( ${PROJECT_NAME} SHARED
+add_library(Apache.Geode.Tests2 SHARED
     Tests2.cs
+	ObjectsTests.cs
     xunit.runner.json
     packages.config
 )
@@ -31,33 +33,33 @@
   VS_TOOL_OVERRIDE "None"
 )
 
-target_link_libraries(${PROJECT_NAME}
+target_link_libraries(Apache.Geode.Tests2
   PUBLIC
     Apache.Geode
 )
 
-set_target_properties( ${PROJECT_NAME} PROPERTIES
-  COMMON_LANGUAGE_RUNTIME "" 
+set_target_properties(Apache.Geode.Tests2 PROPERTIES
   VS_GLOBAL_ROOTNAMESPACE ${PROJECT_NAME}
   VS_GLOBAL_TreatWarningsAsErrors True
+  VS_GLOBAL_IsTestProject True
   VS_GLOBAL_TestProjectType UnitTest
   VS_GLOBAL_PROJECT_TYPES "{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
   VS_DOTNET_REFERENCES "System;System.Xml;System.Web;System.Configuration"
-  VS_DOTNET_REFERENCE_Microsoft.VisualStudio.TestPlatform.TestFramework "${CMAKE_BINARY_DIR}/clicache/packages/Microsoft.VisualStudio.TestPlatform.14.0.0.1/lib/net20/Microsoft.VisualStudio.TestPlatform.TestFramework.dll"
-  VS_DOTNET_REFERENCE_Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions "${CMAKE_BINARY_DIR}/clicache/packages/Microsoft.VisualStudio.TestPlatform.14.0.0.1/lib/net20/Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll"
-  VS_DOTNET_REFERENCE_xunit.core "${CMAKE_BINARY_DIR}/clicache/packages/xunit.extensibility.core.2.4.0/lib/netstandard1.1/xunit.core.dll"
-  VS_DOTNET_REFERENCE_xunit.assert "${CMAKE_BINARY_DIR}/clicache/packages/xunit.assert.2.4.0/lib/netstandard1.1/xunit.assert.dll"
-  VS_DOTNET_REFERENCE_xunit.abstractions "${CMAKE_BINARY_DIR}/clicache/packages/xunit.abstractions.2.0.2/lib/net35/xunit.abstractions.dll"
-  VS_DOTNET_REFERENCE_xunit.execution.desktop "${CMAKE_BINARY_DIR}/clicache/packages/xunit.extensibility.execution.2.4.0/lib/net452/xunit.execution.desktop.dll"
-  VS_DOTNET_REFERENCE_xunit.runner.visualstudio.testadapter "${CMAKE_BINARY_DIR}/clicache/packages/xunit.runner.visualstudio.2.4.0/build/_common/xunit.runner.visualstudio.testadapter.dll"
+  VS_DOTNET_REFERENCE_xunit.core "${CMAKE_BINARY_DIR}/packages/xunit.extensibility.core.2.4.0/lib/netstandard1.1/xunit.core.dll"
+  VS_DOTNET_REFERENCE_xunit.assert "${CMAKE_BINARY_DIR}/packages/xunit.assert.2.4.0/lib/netstandard1.1/xunit.assert.dll"
+  VS_DOTNET_REFERENCE_xunit.abstractions "${CMAKE_BINARY_DIR}/packages/xunit.abstractions.2.0.2/lib/net35/xunit.abstractions.dll"
+  VS_DOTNET_REFERENCE_xunit.execution.desktop "${CMAKE_BINARY_DIR}/packages/xunit.extensibility.execution.2.4.0/lib/net452/xunit.execution.desktop.dll"
+  VS_DOTNET_REFERENCE_xunit.runner.visualstudio.testadapter "${CMAKE_BINARY_DIR}/packages/xunit.runner.visualstudio.2.4.0/build/_common/xunit.runner.visualstudio.testadapter.dll"
   FOLDER cli/test/unit
 )
 
-if(NOT "${STRONG_NAME_KEY}" STREQUAL "")
-  set_target_properties( ${PROJECT_NAME} PROPERTIES
-    VS_GLOBAL_SignAssembly "true"
-    VS_GLOBAL_AssemblyOriginatorKeyFile ${STRONG_NAME_KEY}
-  )
-endif()
+add_dependencies(Apache.Geode.Tests2 nuget-restore)
 
-add_dependencies(${PROJECT_NAME} nuget-restore)
+enable_testing()
+
+add_test(NAME Apache.Geode.Tests2
+  COMMAND ${vstest_dir}/vstest.console.exe
+          $<SHELL_PATH:$<TARGET_FILE:Apache.Geode.Tests2>>
+          --nologo --platform:x64 --parallel
+  WORKING_DIRECTORY "$<TARGET_FILE_DIR:Apache.Geode.Tests2>"
+)
diff --git a/clicache/test2/ObjectsTests.cs b/clicache/test2/ObjectsTests.cs
new file mode 100644
index 0000000..714444b
--- /dev/null
+++ b/clicache/test2/ObjectsTests.cs
@@ -0,0 +1,316 @@
+/*
+ * 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.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Collections;
+using Xunit;
+
+namespace Apache.Geode
+{
+
+
+  /// <summary>
+  /// Asserts consistent hash results with Java server.
+  /// 
+  /// See Java class org.apache.geode.cache.util.ObjectsTest for test parity.
+  /// </summary>
+  public class ObjectsTests
+  {
+
+    [Fact]
+    public void GetHashCodeNullObjectIsZero()
+    {
+      Assert.Equal(0, Objects.GetHashCode((Object)null));
+    }
+
+    [Fact]
+    public void GetHashCodeOfEmptyArrayIs1()
+    {
+      Assert.Equal(1, Objects.GetHashCode(new Object[0]));
+    }
+
+    [Fact]
+    public void HashCodeEmptyArgsIs1()
+    {
+      Assert.Equal(1, Objects.Hash());
+    }
+
+    [Fact]
+    public void HashOfString()
+    {
+      Assert.Equal(0, Objects.GetHashCode(""));
+      Assert.Equal(48, Objects.GetHashCode("0"));
+      Assert.Equal(57, Objects.GetHashCode("9"));
+      Assert.Equal(97, Objects.GetHashCode("a"));
+      Assert.Equal(122, Objects.GetHashCode("z"));
+      Assert.Equal(65, Objects.GetHashCode("A"));
+      Assert.Equal(90, Objects.GetHashCode("Z"));
+
+      Assert.Equal(1077910243, Objects.GetHashCode("supercalifragilisticexpialidocious"));
+
+      Assert.Equal(1544552287, Objects.GetHashCode("You had me at meat tornad\u00F6!\U000F0000"));
+
+      Assert.Equal(701776767, Objects.GetHashCode("You had me at\0meat tornad\u00F6!\U000F0000"));
+
+      Assert.Equal(
+          512895612,
+          Objects.GetHashCode("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do "
+               + "eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut "
+               + "enim ad minim veniam, quis nostrud exercitation ullamco laboris "
+               + "nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in "
+               + "reprehenderit in voluptate velit esse cillum dolore eu fugiat "
+               + "nulla pariatur. Excepteur sint occaecat cupidatat non proident, "
+               + "sunt in culpa qui officia deserunt mollit anim id est laborum."));
+
+      Assert.Equal(
+          -1425027716,
+          Objects.GetHashCode("\u16bb\u16d6\u0020\u16b3\u16b9\u16ab\u16a6\u0020\u16a6\u16ab"
+               + "\u16cf\u0020\u16bb\u16d6\u0020\u16d2\u16a2\u16de\u16d6\u0020"
+               + "\u16a9\u16be\u0020\u16a6\u16ab\u16d7\u0020\u16da\u16aa\u16be"
+               + "\u16de\u16d6\u0020\u16be\u16a9\u16b1\u16a6\u16b9\u16d6\u16aa"
+               + "\u16b1\u16de\u16a2\u16d7\u0020\u16b9\u16c1\u16a6\u0020\u16a6"
+               + "\u16aa\u0020\u16b9\u16d6\u16e5\u16ab"));
+    }
+
+    [Fact]
+    public void HashOf1String()
+    {
+      Assert.Equal(121, Objects.Hash("Z"));
+    }
+
+    [Fact]
+    public void GetHashCodeOfChar()
+    {
+      Assert.Equal(48, Objects.GetHashCode('0'));
+      Assert.Equal(57, Objects.GetHashCode('9'));
+      Assert.Equal(97, Objects.GetHashCode('a'));
+      Assert.Equal(122, Objects.GetHashCode('z'));
+      Assert.Equal(65, Objects.GetHashCode('A'));
+      Assert.Equal(90, Objects.GetHashCode('Z'));
+    }
+
+    [Fact]
+    public void HashOf1Char()
+    {
+      Assert.Equal(121, Objects.Hash('Z'));
+    }
+
+    [Fact]
+    public void GetHashCodeOfBoolean()
+    {
+      Assert.Equal(1237, Objects.GetHashCode(false));
+      Assert.Equal(1231, Objects.GetHashCode(true));
+    }
+
+    [Fact]
+    public void HashOf1Boolean()
+    {
+      Assert.Equal(1262, Objects.Hash(true));
+    }
+
+    [Fact]
+    public void GetHashCodeOfByte()
+    {
+      Assert.Equal(0, Objects.GetHashCode((SByte)0));
+      Assert.Equal(1, Objects.GetHashCode((SByte)1));
+      Assert.Equal(-1, Objects.GetHashCode((SByte)(-1)));
+      Assert.Equal(SByte.MaxValue, Objects.GetHashCode(SByte.MaxValue));
+      Assert.Equal(SByte.MinValue, Objects.GetHashCode(SByte.MinValue));
+    }
+
+    [Fact]
+    public void HashOf1Byte()
+    {
+      Assert.Equal(158, Objects.Hash(SByte.MaxValue));
+    }
+
+    [Fact]
+    public void GetHashCodeOfInt16()
+    {
+      Assert.Equal(0, Objects.GetHashCode((Int16)0));
+      Assert.Equal(1, Objects.GetHashCode((Int16)1));
+      Assert.Equal(-1, Objects.GetHashCode((Int16)(-1)));
+      Assert.Equal(Int16.MaxValue, Objects.GetHashCode(Int16.MaxValue));
+      Assert.Equal(Int16.MinValue, Objects.GetHashCode(Int16.MinValue));
+    }
+
+    [Fact]
+    public void HashOf1Int16()
+    {
+      Assert.Equal(32798, Objects.Hash(Int16.MaxValue));
+    }
+
+    [Fact]
+    public void GetHashCodeOfInt32()
+    {
+      Assert.Equal(0, Objects.GetHashCode(0));
+      Assert.Equal(1, Objects.GetHashCode(1));
+      Assert.Equal(-1, Objects.GetHashCode(-1));
+      Assert.Equal(Int32.MaxValue, Objects.GetHashCode(Int32.MaxValue));
+      Assert.Equal(Int32.MinValue, Objects.GetHashCode(Int32.MinValue));
+    }
+
+    [Fact]
+    public void HashOf1Int32()
+    {
+      Assert.Equal(-2147483618, Objects.Hash(Int32.MaxValue));
+    }
+
+    [Fact]
+    public void GetHashCodeOfInt64()
+    {
+      Assert.Equal(0, Objects.GetHashCode(0L));
+      Assert.Equal(1, Objects.GetHashCode(1L));
+      Assert.Equal(0, Objects.GetHashCode(-1L));
+      Assert.Equal(-2147483648, Objects.GetHashCode(((Int64)Int32.MaxValue) + 1));
+      Assert.Equal(-2147483648, Objects.GetHashCode(((Int64)Int32.MinValue) - 1));
+      Assert.Equal(-2147483648, Objects.GetHashCode(Int64.MaxValue));
+      Assert.Equal(-2147483648, Objects.GetHashCode(Int64.MinValue));
+      Assert.Equal(-1073741824, Objects.GetHashCode(Int64.MaxValue >> 1));
+      Assert.Equal(-1073741824, Objects.GetHashCode(Int64.MinValue >> 1));
+      Assert.Equal(-536870912, Objects.GetHashCode(Int64.MaxValue >> 2));
+      Assert.Equal(-536870912, Objects.GetHashCode(Int64.MinValue >> 2));
+      Assert.Equal(0, Objects.GetHashCode(-9223372034707292160L));
+    }
+
+    [Fact]
+    public void HashOf1Int64()
+    {
+      Assert.Equal(-2147483617, Objects.Hash(Int64.MaxValue));
+    }
+
+    [Fact]
+    public void GetHashCodeOfFloat()
+    {
+      Assert.Equal(0, Objects.GetHashCode(0.0f));
+      Assert.Equal(-2147483648, Objects.GetHashCode(-0.0f));
+      Assert.Equal(1065353216, Objects.GetHashCode(1.0f));
+      Assert.Equal(-1082130432, Objects.GetHashCode(-1.0f));
+      Assert.Equal(2139095039, Objects.GetHashCode(Single.MaxValue));
+      Assert.Equal(1, Objects.GetHashCode(Single.Epsilon));
+      Assert.Equal(-8388609, Objects.GetHashCode(Single.MinValue));
+      Assert.Equal(2139095040, Objects.GetHashCode(Single.PositiveInfinity));
+      Assert.Equal(-8388608, Objects.GetHashCode(Single.NegativeInfinity));
+      Assert.Equal(8388608, Objects.GetHashCode(1.17549435E-38f));
+      Assert.Equal(2143289344, Objects.GetHashCode(Single.NaN));
+    }
+
+    [Fact]
+    public void HashOf1Float()
+    {
+      Assert.Equal(2139095070, Objects.Hash(Single.MaxValue));
+    }
+
+    [Fact]
+    public void GetHashCodeOfDouble()
+    {
+      Assert.Equal(0, Objects.GetHashCode(0.0d));
+      Assert.Equal(-2147483648, Objects.GetHashCode(-0.0d));
+      Assert.Equal(1072693248, Objects.GetHashCode(1.0d));
+      Assert.Equal(-1074790400, Objects.GetHashCode(-1.0d));
+      Assert.Equal(-2146435072, Objects.GetHashCode(Double.MaxValue));
+      Assert.Equal(1, Objects.GetHashCode(Double.Epsilon));
+      Assert.Equal(1048576, Objects.GetHashCode(Double.MinValue));
+      Assert.Equal(2146435072, Objects.GetHashCode(Double.PositiveInfinity));
+      Assert.Equal(-1048576, Objects.GetHashCode(Double.NegativeInfinity));
+      Assert.Equal(1048576, Objects.GetHashCode(2.2250738585072014E-308d));
+      Assert.Equal(2146959360, Objects.GetHashCode(Double.NaN));
+    }
+
+    [Fact]
+    public void HashOf1Double()
+    {
+      Assert.Equal(-2146435041, Objects.Hash(Double.MaxValue));
+    }
+
+
+    [Fact]
+    public void GetHashCodeOfDate()
+    {
+      Assert.Equal(0, Objects.GetHashCode(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)));
+      Assert.Equal(1583802735, Objects.GetHashCode(new DateTime(2020, 1, 1, 0, 0, 0, DateTimeKind.Utc)));
+      Assert.Equal(-927080926, Objects.GetHashCode(new DateTime(3020, 1, 1, 0, 0, 0, DateTimeKind.Utc)));
+      Assert.Equal(1670202000, Objects.GetHashCode(new DateTime(1920, 1, 1, 0, 0, 0, DateTimeKind.Utc)));
+      Assert.Equal(542840753, Objects.GetHashCode(new DateTime(1820, 1, 1, 0, 0, 0, DateTimeKind.Utc)));
+    }
+
+    [Fact]
+    public void HashOf1DateTime()
+    {
+      Assert.Equal(31, Objects.Hash(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)));
+    }
+
+    [Fact]
+    public void GetHashCodeOfArrays()
+    {
+      Assert.Equal(955331, Objects.GetHashCode(new SByte[] { 1, 2, 3, 4 }));
+      Assert.Equal(955331, Objects.GetHashCode(new Int16[] { 1, 2, 3, 4 }));
+      Assert.Equal(955331, Objects.GetHashCode(new Int32[] { 1, 2, 3, 4 }));
+      Assert.Equal(955331, Objects.GetHashCode(new Int64[] { 1L, 2L, 3L, 4L }));
+      Assert.Equal(265164673, Objects.GetHashCode(new Single[] { 0.0f, 1.0f, -1.0f, Single.NaN }));
+      Assert.Equal(-1039788159, Objects.GetHashCode(new Double[] { 0.0d, 1.0d, -1.0d, Double.NaN }));
+      Assert.Equal(3910595, Objects.GetHashCode(new String[] { "a", "b", "c", "d"}));
+      Assert.Equal(3910595, Objects.GetHashCode(new Char[] { 'a', 'b', 'c', 'd' }));
+    }
+
+
+    [Fact]
+    public void GetHashCodeOfList()
+    {
+      Assert.Equal(955331, Objects.GetHashCode(new List<int> { 1, 2, 3, 4 }));
+      Assert.Equal(955331, Objects.GetHashCode(new ArrayList { 1, 2, 3, 4 }));
+      Assert.Equal(955331, Objects.GetHashCode(new LinkedList<int>(new int[] { 1, 2, 3, 4 })));
+      Assert.Equal(955331, Objects.GetHashCode(new Stack<int>(new int[] { 4, 3, 2, 1 })));
+      Assert.Equal(955331, Objects.GetHashCode(new Stack(new int[] { 4, 3, 2, 1 })));
+    }
+
+    [Fact]
+    public void GetHashCodeOfMap()
+    {
+      Assert.Equal(10, Objects.GetHashCode(new Hashtable { { 1, 2 }, { 3, 4 } }));
+      Assert.Equal(10, Objects.GetHashCode(new Dictionary<int, int> { { 1, 2 }, { 3, 4 } }));
+    }
+
+    class CustomKey
+    {
+      private int a;
+      private double b;
+      private String c;
+
+      public CustomKey(int a, double b, String c)
+      {
+        this.a = a;
+        this.b = b;
+        this.c = c;
+      }
+
+      override public int GetHashCode()
+      {
+        return Objects.Hash(a, b, c);
+      }
+    };
+
+    [Fact]
+    public void hashOfCustomKey()
+    {
+      Assert.Equal(-1073604993, Objects.GetHashCode(new CustomKey(1, 2.0, "key")));
+    }
+
+  }
+
+};
diff --git a/clicache/test2/packages.config b/clicache/test2/packages.config
index 02bf7df..ab73661 100644
--- a/clicache/test2/packages.config
+++ b/clicache/test2/packages.config
@@ -16,7 +16,7 @@
 limitations under the License.
 -->
 <packages>
-  <package id="Microsoft.VisualStudio.TestPlatform" version="14.0.0.1" targetFramework="net452" />
+  <package id="Microsoft.TestPlatform" version="16.8.3" targetFramework="net452" />
   <package id="xunit" version="2.4.0" targetFramework="net452" />
   <package id="xunit.abstractions" version="2.0.2" targetFramework="net35" />
   <package id="xunit.analyzers" version="0.10.0" targetFramework="net452" />
diff --git a/cmake/ApacheGeodeExportHeader.cmake b/cmake/ApacheGeodeExportHeader.cmake
index 4dda11a..2f887f3 100644
--- a/cmake/ApacheGeodeExportHeader.cmake
+++ b/cmake/ApacheGeodeExportHeader.cmake
@@ -40,3 +40,4 @@
   install(FILES ${CMAKE_CURRENT_BINARY_DIR}/apache-geode_export.h DESTINATION include/geode/internal)
   
 endfunction()
+
diff --git a/cmake/CXXFlags.cmake b/cmake/CXXFlags.cmake
new file mode 100644
index 0000000..b4441ca
--- /dev/null
+++ b/cmake/CXXFlags.cmake
@@ -0,0 +1,159 @@
+# 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.
+
+include(CheckLinkerFlag)
+
+set(CHECK_FEATURE "Undefined Behavior Sanitizer")
+message(CHECK_START ${CHECK_FEATURE})
+
+list(APPEND CMAKE_MESSAGE_INDENT "  ")
+check_cxx_compiler_flag(-fsanitize=undefined CXX_HAS_SANITIZE_UNDEFINED_FLAG)
+unset(CXX_SANITIZE_UNDEFINED_FLAG)
+if (CXX_HAS_SANITIZE_UNDEFINED_FLAG)
+  set(CXX_SANITIZE_UNDEFINED_FLAG -fsanitize=undefined)
+endif()
+
+check_linker_flag(CXX -fsanitize=undefined CXX_LINKER_HAS_SANITIZE_UNDEFINED_FLAG)
+unset(CXX_LINKER_SANITIZE_UNDEFINED_FLAG)
+if (CXX_LINKER_HAS_SANITIZE_UNDEFINED_FLAG)
+  set(CXX_LINKER_SANITIZE_UNDEFINED_FLAG -fsanitize=undefined)
+endif()
+list(POP_BACK CMAKE_MESSAGE_INDENT)
+
+if (CXX_HAS_SANITIZE_UNDEFINED_FLAG)
+  option(USE_SANITIZE_UNDEFINED "Use ${CHECK_FEATURE}" FALSE)
+  if (USE_SANITIZE_UNDEFINED)
+    message(CHECK_PASS "Enabled")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_SANITIZE_UNDEFINED_FLAG}")
+    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CXX_LINKER_SANITIZE_UNDEFINED_FLAG}")
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CXX_LINKER_SANITIZE_UNDEFINED_FLAG}")
+  else()
+    message(CHECK_FAIL "Disabled")
+  endif()
+else()
+  if (USE_SANITIZE_UNDEFINED)
+    message(FATAL_ERROR "${CHECK_FEATURE} enabled but not supported.")
+  else()
+    message(CHECK_FAIL "Unsupported")
+  endif()
+endif()
+
+
+set(CHECK_FEATURE "Address Sanitizer")
+message(CHECK_START ${CHECK_FEATURE})
+
+list(APPEND CMAKE_MESSAGE_INDENT "  ")
+check_linker_flag(CXX -fsanitize=address CXX_LINKER_HAS_SANITIZE_ADDRESS_FLAG)
+unset(CXX_LINKER_SANITIZE_ADDRESS_FLAG)
+if (CXX_LINKER_HAS_SANITIZE_ADDRESS_FLAG)
+  set(CXX_LINKER_SANITIZE_ADDRESS_FLAG -fsanitize=address)
+endif()
+
+if (CXX_LINKER_HAS_SANITIZE_ADDRESS_FLAG)
+  list(APPEND CMAKE_REQUIRED_LINK_OPTIONS -fsanitize=address)
+endif()
+check_cxx_compiler_flag(-fsanitize=address CXX_HAS_SANITIZE_ADDRESS_FLAG)
+if (CXX_LINKER_HAS_SANITIZE_ADDRESS_FLAG)
+  list(POP_BACK CMAKE_REQUIRED_LINK_OPTIONS)
+endif()
+unset(CXX_SANITIZE_ADDRESS_FLAG)
+if (CXX_HAS_SANITIZE_ADDRESS_FLAG)
+  set(CXX_SANITIZE_ADDRESS_FLAG -fsanitize=address)
+endif()
+
+check_linker_flag(CXX -fno-omit-frame-pointer CXX_HAS_NO_OMIT_FRAME_POINTER_FLAG)
+unset(CXX_NO_OMIT_FRAME_POINTER_FLAG)
+if (CXX_HAS_NO_OMIT_FRAME_POINTER_FLAG)
+  set(CXX_NO_OMIT_FRAME_POINTER_FLAG -fno-omit-frame-pointer)
+endif()
+
+list(POP_BACK CMAKE_MESSAGE_INDENT)
+
+if (CXX_HAS_SANITIZE_ADDRESS_FLAG)
+  option(USE_SANITIZE_ADDRESS "Use ${CHECK_FEATURE}" FALSE)
+  if (USE_SANITIZE_ADDRESS)
+    message(CHECK_PASS "Enabled")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_SANITIZE_ADDRESS_FLAG} ${CXX_NO_OMIT_FRAME_POINTER_FLAG}")
+    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CXX_LINKER_SANITIZE_ADDRESS_FLAG}")
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CXX_LINKER_SANITIZE_ADDRESS_FLAG}")
+  else()
+    message(CHECK_FAIL "Disabled")
+  endif()
+else()
+  if (USE_SANITIZE_ADDRESS)
+    message(FATAL_ERROR "${CHECK_FEATURE} enabled but not supported.")
+  else()
+    message(CHECK_FAIL "Unsupported")
+  endif()
+endif()
+
+
+set(CHECK_FEATURE "Sanitizer errors fatal.")
+message(CHECK_START ${CHECK_FEATURE})
+
+list(APPEND CMAKE_MESSAGE_INDENT "  ")
+check_cxx_compiler_flag(-fno-sanitize-recover CXX_HAS_NO_SANITIZE_RECOVER_FLAG)
+unset(CXX_NO_SANITIZE_RECOVER_FLAG)
+if (CXX_HAS_NO_SANITIZE_RECOVER_FLAG)
+  set(CXX_NO_SANITIZE_RECOVER_FLAG -fno-sanitize-recover)
+endif()
+list(POP_BACK CMAKE_MESSAGE_INDENT)
+
+if (CXX_NO_SANITIZE_RECOVER_FLAG)
+  option(USE_SANITIZE_FATAL "Use ${CHECK_FEATURE}" ${CXX_HAS_NO_SANITIZE_RECOVER_FLAG})
+  if (USE_SANITIZE_FATAL)
+    message(CHECK_PASS "Enabled")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_NO_SANITIZE_RECOVER_FLAG}")
+  else()
+    message(CHECK_FAIL "Disabled")
+  endif()
+else()
+  if (USE_SANITIZE_FATAL)
+    message(FATAL_ERROR "${CHECK_FEATURE} enabled but not supported.")
+  else()
+    message(CHECK_FAIL "Unsupported")
+  endif()
+endif()
+
+
+set(CHECK_FEATURE "Interprocedural or link time optimizations (IPO/LTO)")
+message(CHECK_START ${CHECK_FEATURE})
+
+list(APPEND CMAKE_MESSAGE_INDENT "  ")
+include(CheckIPOSupported)
+if (NOT DEFINED CXX_HAS_IPO_SUPPORT)
+  check_ipo_supported(RESULT CXX_HAS_IPO_SUPPORT LANGUAGES CXX)
+  set(CXX_HAS_IPO_SUPPORT ${CXX_HAS_IPO_SUPPORT} CACHE INTERNAL "Test check_ipo_supported" FORCE)
+endif()
+list(POP_BACK CMAKE_MESSAGE_INDENT)
+
+if(CXX_HAS_IPO_SUPPORT)
+  option(USE_IPO "Use ${CHECK_FEATURE}" ${CXX_HAS_IPO_SUPPORT})
+  if (USE_IPO)
+    message(CHECK_PASS "Enabled")
+  else()
+    message(CHECK_FAIL "Disabled")
+  endif()
+  set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ${USE_IPO})
+  set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO ${USE_IPO})
+else()
+  set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE FALSE)
+  set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO FALSE)
+  if (USE_IPO)
+    message(FATAL_ERROR "${CHECK_FEATURE} enabled but not supported.")
+  else()
+    message(CHECK_FAIL "Unsupported")
+  endif()
+endif()
diff --git a/cmake/CheckJavaClassExists.cmake b/cmake/CheckJavaClassExists.cmake
new file mode 100644
index 0000000..74a3d79
--- /dev/null
+++ b/cmake/CheckJavaClassExists.cmake
@@ -0,0 +1,47 @@
+# 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.
+
+function(check_java_class_exists CLASS CLASSPATH VAR)
+  if(NOT DEFINED "${VAR}" OR "x${${VAR}}" STREQUAL "x${VAR}")
+    message(CHECK_START "Looking for Java class ${CLASS} in ${CLASSPATH}")
+
+    set(OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/check_java_class_exists.dir")
+    file(MAKE_DIRECTORY "${OUTPUT_PATH}")
+
+    set(GENERATED_SOURCE "${OUTPUT_PATH}/Check.java")
+    file(WRITE "${GENERATED_SOURCE}" "import ${CLASS};")
+
+    execute_process(
+      COMMAND ${Java_JAVAC_EXECUTABLE}
+      ${CMAKE_JAVA_COMPILE_FLAGS}
+      -classpath "${CLASSPATH}"
+      -d ${OUTPUT_PATH}
+      ${GENERATED_SOURCE}
+      RESULT_VARIABLE exit_code
+      OUTPUT_QUIET
+      ERROR_QUIET
+      OUTPUT_FILE "${OUTPUT_PATH}/check.stdout"
+      ERROR_FILE "${OUTPUT_PATH}/check.stderr"
+    )
+
+    if (${exit_code} EQUAL 0)
+      message(CHECK_PASS "found")
+      set(${VAR} 1 CACHE INTERNAL "Have Java class ${CLASS}")
+    else()
+      message(CHECK_FAIL "not found")
+      set(${VAR} 0 CACHE INTERNAL "Have Java class ${CLASS}")
+    endif()
+  endif()
+endfunction()
\ No newline at end of file
diff --git a/packer/ubuntu/install-packages.sh b/cmake/ExecutableExportHeader.cmake
similarity index 64%
copy from packer/ubuntu/install-packages.sh
copy to cmake/ExecutableExportHeader.cmake
index f3e803f..9428d5f 100644
--- a/packer/ubuntu/install-packages.sh
+++ b/cmake/ExecutableExportHeader.cmake
@@ -1,5 +1,3 @@
-#!/usr/bin/env bash
-
 # 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.
@@ -15,19 +13,17 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-set -x -e -o pipefail
+function(GENERATE_EXEC_EXPORT_HEADER TARGET)
+  get_property(type TARGET ${TARGET} PROPERTY TYPE)
+  if(NOT ${type} STREQUAL "EXECUTABLE")
+    message(WARNING "This macro can only be used with executables")
+    return()
+  endif()
 
-apt-get -y install \
-    build-essential \
-    libc++-dev \
-    libc++abi-dev \
-    zlib1g-dev \
-    libssl-dev \
-    wget \
-    doxygen \
-    graphviz \
-    openjdk-8-jdk \
-    python \
-    python-pip
+  include(GenerateExportHeader)
 
-pip install --upgrade pip
+  _test_compiler_hidden_visibility()
+  _test_compiler_has_deprecated()
+  _do_set_macro_values(${TARGET})
+  _do_generate_export_header(${TARGET} ${ARGN})
+endfunction()
\ No newline at end of file
diff --git a/cppcache/CMakeLists.txt b/cppcache/CMakeLists.txt
index 0e4126e..c996620 100644
--- a/cppcache/CMakeLists.txt
+++ b/cppcache/CMakeLists.txt
@@ -24,6 +24,13 @@
   check_function_exists("pthread_setname_np" HAVE_pthread_setname_np)
 endif()
 
+check_function_exists(uname HAVE_uname)
+
+# Search OpenSSL
+find_package(OpenSSL COMPONENTS Crypto)
+
+include_directories(${OPENSSL_INCLUDE_DIRS})
+
 set(COMMON_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
 set(COMMON_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
 
@@ -82,13 +89,15 @@
 endif()
 
 target_link_libraries(_apache-geode INTERFACE
-  ACE::ACE
-  ACE::ACE_SSL
   Boost::boost
   Boost::filesystem
   Boost::thread
   Boost::stacktrace
+  Boost::regex
   XercesC::XercesC
+  OpenSSL::SSL
+  OpenSSL::Crypto
+  ${CMAKE_DL_LIBS}
 )
 
 if (USE_PCH)
diff --git a/cppcache/acceptance-test/CMakeLists.txt b/cppcache/acceptance-test/CMakeLists.txt
index 8889d10..81fe3a3 100644
--- a/cppcache/acceptance-test/CMakeLists.txt
+++ b/cppcache/acceptance-test/CMakeLists.txt
@@ -32,7 +32,6 @@
     apache-geode
     integration-framework
     testobject
-    ACE::ACE
     GTest::gtest
     GTest::gtest_main
     Boost::boost
diff --git a/cppcache/acceptance-test/SNITest.cpp b/cppcache/acceptance-test/SNITest.cpp
index 5656f03..268e0c2 100644
--- a/cppcache/acceptance-test/SNITest.cpp
+++ b/cppcache/acceptance-test/SNITest.cpp
@@ -124,7 +124,7 @@
   cache.getPoolManager()
       .createFactory()
       .setSniProxy("localhost", portNumber)
-      .addLocator("locator-maeve", 10334)
+      .addLocator("locator-maeve", 20220)
       .create("pool");
 
   auto region = cache.createRegionFactory(RegionShortcut::PROXY)
@@ -151,7 +151,7 @@
   cache.getPoolManager()
       .createFactory()
       .setSniProxy("badProxyName", 40000)
-      .addLocator("locator-maeve", 10334)
+      .addLocator("locator-maeve", 20220)
       .create("pool");
 
   auto region = cache.createRegionFactory(RegionShortcut::PROXY)
@@ -180,7 +180,7 @@
   cache.getPoolManager()
       .createFactory()
       .setSniProxy("localhost", proxyPort)
-      .addLocator("locator-maeve", 10334)
+      .addLocator("locator-maeve", 20220)
       .create("pool");
 
   auto region = cache.createRegionFactory(RegionShortcut::PROXY)
diff --git a/cppcache/benchmark/ConnectionQueueBM.cpp b/cppcache/benchmark/ConnectionQueueBM.cpp
index 74feb66..e0fbcf9 100644
--- a/cppcache/benchmark/ConnectionQueueBM.cpp
+++ b/cppcache/benchmark/ConnectionQueueBM.cpp
@@ -20,9 +20,6 @@
 #include <mutex>
 #include <thread>
 
-#include <ace/Condition_Recursive_Thread_Mutex.h>
-#include <ace/Recursive_Thread_Mutex.h>
-
 #include "ConnectionQueue.hpp"
 
 class TestObject {
diff --git a/cppcache/benchmark/GeodeLoggingBM.cpp b/cppcache/benchmark/GeodeLoggingBM.cpp
index 3dd3ff7..19347b0 100644
--- a/cppcache/benchmark/GeodeLoggingBM.cpp
+++ b/cppcache/benchmark/GeodeLoggingBM.cpp
@@ -59,14 +59,14 @@
   int index = g_iteration++ % STRING_ARRAY_LENGTH;
 
   for (auto _ : state) {
-    Log::debug(logStrings[index]);
+    LOGDEBUG(logStrings[index]);
   }
 }
 
 void GeodeLogInts(benchmark::State& state) {
   std::string intString(std::to_string(g_iteration++));
   for (auto _ : state) {
-    Log::debug(intString.c_str());
+    LOGDEBUG(intString.c_str());
   }
 }
 
@@ -75,7 +75,7 @@
   std::string comboString = std::string(logStrings[g_iteration % 3]) + " " +
                             std::to_string(g_iteration);
   for (auto _ : state) {
-    Log::debug(comboString.c_str());
+    LOGDEBUG(comboString.c_str());
   }
 }
 
diff --git a/cppcache/benchmark/SerializationRegistryBM.cpp b/cppcache/benchmark/SerializationRegistryBM.cpp
index 89be4cc..bf14d85 100644
--- a/cppcache/benchmark/SerializationRegistryBM.cpp
+++ b/cppcache/benchmark/SerializationRegistryBM.cpp
@@ -36,12 +36,13 @@
 
 class TestPdxClass : public PdxSerializable {
  public:
-  TestPdxClass() {}
-  void fromData(PdxReader&) {}
+  TestPdxClass() = default;
 
-  void toData(PdxWriter&) const {}
+  void fromData(PdxReader&) override {}
 
-  const std::string& getClassName() const { return className; }
+  void toData(PdxWriter&) const override {}
+
+  const std::string& getClassName() const override { return className; }
 
   static std::shared_ptr<PdxSerializable> createDeserializable() {
     return std::make_shared<TestPdxClass>();
@@ -53,19 +54,15 @@
 
 class TestDataSerializableClass : public DataSerializable {
  public:
-  TestDataSerializableClass() {}
-  void fromData(DataInput&) {}
+  TestDataSerializableClass() = default;
 
-  void toData(DataOutput&) const {}
+  void fromData(DataInput&) override {}
 
-  const std::string& getClassName() const { return className; }
+  void toData(DataOutput&) const override {}
 
   static std::shared_ptr<DataSerializable> createInstance() {
     return std::make_shared<TestDataSerializableClass>();
   }
-
- private:
-  std::string className = "myserializableclass";
 };
 
 static void SerializationRegistryBM_findDataSerializablePrimitive(
diff --git a/cppcache/include/geode/AuthenticatedView.hpp b/cppcache/include/geode/AuthenticatedView.hpp
index 89ef1fa..2830c49 100644
--- a/cppcache/include/geode/AuthenticatedView.hpp
+++ b/cppcache/include/geode/AuthenticatedView.hpp
@@ -87,14 +87,8 @@
    */
   std::vector<std::shared_ptr<Region>> rootRegions() const override;
 
-  /**
-   * @brief destructor
-   */
-  virtual ~AuthenticatedView();
+  ~AuthenticatedView() override;
 
-  /**
-   * @brief constructors
-   */
   AuthenticatedView(std::shared_ptr<Properties> credentials,
                     std::shared_ptr<Pool> pool, CacheImpl* cacheImpl);
   AuthenticatedView(AuthenticatedView&& other) = default;
diff --git a/cppcache/include/geode/Cache.hpp b/cppcache/include/geode/Cache.hpp
index 028a6d5..bee6b68 100644
--- a/cppcache/include/geode/Cache.hpp
+++ b/cppcache/include/geode/Cache.hpp
@@ -27,10 +27,6 @@
 #include "GeodeCache.hpp"
 #include "internal/geode_globals.hpp"
 
-/**
- * @file
- */
-
 namespace apache {
 namespace geode {
 namespace client {
@@ -67,9 +63,6 @@
  *
  */
 class APACHE_GEODE_EXPORT Cache : public GeodeCache {
-  /**
-   * @brief public methods
-   */
  public:
   /**
    * Returns the {@link RegionFactory} to create the region.
@@ -183,8 +176,8 @@
    *
    * @see RegionService
    * @see PoolFactory#setMultiuserAuthentication(boolean)
-   * @return the {@link RegionService} instance associated with a user and given
-   *         properties.
+   * @return the {@link RegionService} instance associated with a user and
+   * given properties.
    * @throws UnsupportedOperationException
    *           when invoked with multiuser-authentication as false.
    *
@@ -261,16 +254,14 @@
   LogLevel getLogLevel();
 
   Cache() = delete;
-  virtual ~Cache();
+  ~Cache() override;
+
   Cache(const Cache& other) = delete;
   Cache& operator=(const Cache& other) = delete;
   Cache(Cache&& other) noexcept;
   Cache& operator=(Cache&& other) noexcept;
 
  private:
-  /**
-   * @brief constructors
-   */
   Cache(const std::shared_ptr<Properties>& dsProp, bool ignorePdxUnreadFields,
         bool readPdxSerialized,
         const std::shared_ptr<AuthInitialize>& authInitialize);
@@ -284,6 +275,7 @@
   friend class CacheXmlCreation;
   friend class RegionXmlCreation;
 };
+
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/include/geode/CacheStatistics.hpp b/cppcache/include/geode/CacheStatistics.hpp
index 5bf3337..626b835 100644
--- a/cppcache/include/geode/CacheStatistics.hpp
+++ b/cppcache/include/geode/CacheStatistics.hpp
@@ -46,12 +46,13 @@
  *@see RegionEntry::getStatistics
  */
 class APACHE_GEODE_EXPORT CacheStatistics {
- public:
-  typedef std::chrono::system_clock::time_point time_point;
+ private:
+  using time_point = std::chrono::steady_clock::time_point;
 
-  CacheStatistics() : m_lastAccessTime(0), m_lastModifiedTime(0) {}
+ public:
+  CacheStatistics();
   CacheStatistics(const CacheStatistics&) = delete;
-  virtual ~CacheStatistics() = default;
+  virtual ~CacheStatistics();
 
   /**
    * For an entry, returns the time that the entry's value was last modified.
@@ -75,7 +76,7 @@
    * @see Region::create
    * @see Region::createSubregion
    */
-  virtual time_point getLastModifiedTime() const;
+  virtual std::chrono::system_clock::time_point getLastModifiedTime() const;
 
   /**
    * For an entry, returns the last time it was accessed via
@@ -94,14 +95,17 @@
    * @see Region::get
    * @see getLastModifiedTime
    */
-  virtual time_point getLastAccessedTime() const;
+  virtual std::chrono::system_clock::time_point getLastAccessedTime() const;
+
+  time_point getLastModifiedSteadyTime() const;
+  time_point getLastAccessedSteadyTime() const;
 
  private:
-  virtual void setLastAccessedTime(time_point lat);
-  virtual void setLastModifiedTime(time_point lmt);
+  virtual void setLastAccessedTime(time_point tp);
+  virtual void setLastModifiedTime(time_point tp);
 
-  std::atomic<time_point::duration::rep> m_lastAccessTime;
-  std::atomic<time_point::duration::rep> m_lastModifiedTime;
+  std::atomic<time_point::duration::rep> last_accessed_;
+  std::atomic<time_point::duration::rep> last_modified_;
 
   friend class LocalRegion;
 };
diff --git a/cppcache/include/geode/CacheableBuiltins.hpp b/cppcache/include/geode/CacheableBuiltins.hpp
index ec81932..206fdd4 100644
--- a/cppcache/include/geode/CacheableBuiltins.hpp
+++ b/cppcache/include/geode/CacheableBuiltins.hpp
@@ -55,6 +55,11 @@
   return CacheableBoolean::create(value);
 }
 
+template <>
+inline std::shared_ptr<Cacheable> Serializable::create(std::nullptr_t) {
+  return static_cast<std::shared_ptr<Cacheable>>(nullptr);
+}
+
 /**
  * An immutable wrapper for byte that can serve as
  * a distributable key object for caching.
diff --git a/cppcache/include/geode/CacheableEnum.hpp b/cppcache/include/geode/CacheableEnum.hpp
index 964b20a..32a7e87 100644
--- a/cppcache/include/geode/CacheableEnum.hpp
+++ b/cppcache/include/geode/CacheableEnum.hpp
@@ -93,7 +93,7 @@
     return size;
   }
 
-  virtual DSCode getDsCode() const override { return DSCode::CacheableEnum; }
+  virtual DSCode getDsCode() const override { return DSCode::PDX_ENUM; }
 
   /**
    * Display this object as c string.
diff --git a/cppcache/include/geode/CacheableString.hpp b/cppcache/include/geode/CacheableString.hpp
index e5973af..bc01884 100644
--- a/cppcache/include/geode/CacheableString.hpp
+++ b/cppcache/include/geode/CacheableString.hpp
@@ -54,11 +54,11 @@
       : m_str(std::move(value)), m_hashcode(0) {
     bool ascii = isAscii(m_str);
 
-    m_type =
-        m_str.length() > std::numeric_limits<uint16_t>::max()
-            ? ascii ? DSCode::CacheableASCIIStringHuge
-                    : DSCode::CacheableStringHuge
-            : ascii ? DSCode::CacheableASCIIString : DSCode::CacheableString;
+    m_type = m_str.length() > (std::numeric_limits<uint16_t>::max)()
+                 ? ascii ? DSCode::CacheableASCIIStringHuge
+                         : DSCode::CacheableStringHuge
+             : ascii ? DSCode::CacheableASCIIString
+                     : DSCode::CacheableString;
   }
 
   ~CacheableString() noexcept override = default;
diff --git a/cppcache/include/geode/CqQuery.hpp b/cppcache/include/geode/CqQuery.hpp
index 13807c3..0708a80 100644
--- a/cppcache/include/geode/CqQuery.hpp
+++ b/cppcache/include/geode/CqQuery.hpp
@@ -61,7 +61,7 @@
   virtual const std::string& getQueryString() const = 0;
 
   /**
-   * Get teh query object generated for this CQs query.
+   * Get the query object generated for this CQs query.
    * @return Query object for the query string
    */
   virtual std::shared_ptr<Query> getQuery() const = 0;
diff --git a/cppcache/include/geode/CqServiceStatistics.hpp b/cppcache/include/geode/CqServiceStatistics.hpp
index 5582dc2..7236f23 100644
--- a/cppcache/include/geode/CqServiceStatistics.hpp
+++ b/cppcache/include/geode/CqServiceStatistics.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_CQSERVICESTATISTICS_H_
-#define GEODE_CQSERVICESTATISTICS_H_
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -20,11 +15,12 @@
  * limitations under the License.
  */
 
-#include "internal/geode_globals.hpp"
+#pragma once
 
-/**
- * @file
- */
+#ifndef GEODE_CQSERVICESTATISTICS_H_
+#define GEODE_CQSERVICESTATISTICS_H_
+
+#include "internal/geode_globals.hpp"
 
 namespace apache {
 namespace geode {
@@ -38,6 +34,8 @@
  */
 class APACHE_GEODE_EXPORT CqServiceStatistics {
  public:
+  virtual ~CqServiceStatistics() noexcept = default;
+
   /**
    * Get the number of CQs currently active.
    * Active CQs are those which are executing (in running state).
diff --git a/cppcache/include/geode/DataInput.hpp b/cppcache/include/geode/DataInput.hpp
index 262bf58..23a771a 100644
--- a/cppcache/include/geode/DataInput.hpp
+++ b/cppcache/include/geode/DataInput.hpp
@@ -381,7 +381,7 @@
     } else {
       int8_t** tmpArray;
       int32_t* tmpLengtharr;
-      _GEODE_NEW(tmpArray, int8_t * [arrLen]);
+      _GEODE_NEW(tmpArray, int8_t* [arrLen]);
       _GEODE_NEW(tmpLengtharr, int32_t[arrLen]);
       for (int i = 0; i < arrLen; i++) {
         readBytes(&tmpArray[i], &tmpLengtharr[i]);
diff --git a/cppcache/include/geode/DataOutput.hpp b/cppcache/include/geode/DataOutput.hpp
index eeb9abd..73e6873 100644
--- a/cppcache/include/geode/DataOutput.hpp
+++ b/cppcache/include/geode/DataOutput.hpp
@@ -274,7 +274,7 @@
   inline void writeString(const std::basic_string<_CharT, _Tail...>& value) {
     // without scanning string, making worst case choices.
     // TODO constexp for each string type to jmutf8 length conversion
-    if (value.length() * 3 <= std::numeric_limits<uint16_t>::max()) {
+    if (value.length() * 3 <= (std::numeric_limits<uint16_t>::max)()) {
       write(static_cast<uint8_t>(DSCode::CacheableString));
       writeJavaModifiedUtf8(value);
     } else {
@@ -516,8 +516,8 @@
   Pool* m_pool;
 
   inline void writeAscii(const std::string& value) {
-    uint16_t len = static_cast<uint16_t>(
-        std::min<size_t>(value.length(), std::numeric_limits<uint16_t>::max()));
+    uint16_t len = static_cast<uint16_t>(std::min<size_t>(
+        value.length(), (std::numeric_limits<uint16_t>::max)()));
     writeInt(len);
     for (size_t i = 0; i < len; i++) {
       // blindly assumes ascii so mask off only 7 bits
@@ -526,8 +526,8 @@
   }
 
   inline void writeAsciiHuge(const std::string& value) {
-    uint32_t len = static_cast<uint32_t>(
-        std::min<size_t>(value.length(), std::numeric_limits<uint32_t>::max()));
+    uint32_t len = static_cast<uint32_t>(std::min<size_t>(
+        value.length(), (std::numeric_limits<uint32_t>::max)()));
     writeInt(static_cast<uint32_t>(len));
     for (size_t i = 0; i < len; i++) {
       // blindly assumes ascii so mask off only 7 bits
@@ -566,7 +566,7 @@
     } else {
       auto encodedLen = static_cast<uint16_t>(
           std::min<size_t>(getJavaModifiedUtf8EncodedLength(data, len),
-                           std::numeric_limits<uint16_t>::max()));
+                           (std::numeric_limits<uint16_t>::max)()));
       writeInt(encodedLen);
       ensureCapacity(encodedLen);
       const auto end = m_buf + encodedLen;
@@ -606,7 +606,7 @@
 
   inline void writeUtf16Huge(const char16_t* data, size_t length) {
     uint32_t len = static_cast<uint32_t>(
-        std::min<size_t>(length, std::numeric_limits<uint32_t>::max()));
+        std::min<size_t>(length, (std::numeric_limits<uint32_t>::max)()));
     writeInt(len);
     writeUtf16(data, length);
   }
diff --git a/cppcache/include/geode/FunctionService.hpp b/cppcache/include/geode/FunctionService.hpp
index 43a9519..8dbb10a 100644
--- a/cppcache/include/geode/FunctionService.hpp
+++ b/cppcache/include/geode/FunctionService.hpp
@@ -134,7 +134,7 @@
     return onServersWithCache(regionService);
   }
 
-  virtual ~FunctionService() {}
+  virtual ~FunctionService() noexcept = default;
 
  private:
   static Execution onServerWithPool(const std::shared_ptr<Pool>& pool);
diff --git a/cppcache/include/geode/GeodeCache.hpp b/cppcache/include/geode/GeodeCache.hpp
index 85da732..bb25d42 100644
--- a/cppcache/include/geode/GeodeCache.hpp
+++ b/cppcache/include/geode/GeodeCache.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_GEMFIRECACHE_H_
-#define GEODE_GEMFIRECACHE_H_
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -20,13 +15,14 @@
  * limitations under the License.
  */
 
+#pragma once
+
+#ifndef GEODE_GEMFIRECACHE_H_
+#define GEODE_GEMFIRECACHE_H_
+
 #include "RegionService.hpp"
 #include "internal/geode_globals.hpp"
 
-/**
- * @file
- */
-
 namespace apache {
 namespace geode {
 namespace client {
@@ -46,10 +42,9 @@
  */
 
 class APACHE_GEODE_EXPORT GeodeCache : public RegionService {
-  /**
-   * @brief public methods
-   */
  public:
+  ~GeodeCache() override = 0;
+
   /** Returns the name of this cache.
    * @return the string name of this cache
    */
diff --git a/cppcache/include/geode/PdxInstance.hpp b/cppcache/include/geode/PdxInstance.hpp
index a2758d4..2ac3a90 100644
--- a/cppcache/include/geode/PdxInstance.hpp
+++ b/cppcache/include/geode/PdxInstance.hpp
@@ -53,7 +53,7 @@
   /**
    * @brief destructor
    */
-  ~PdxInstance() override = default;
+  ~PdxInstance() noexcept override = default;
 
   /**
    * Deserializes and returns the domain object that this instance represents.
diff --git a/cppcache/include/geode/PdxInstanceFactory.hpp b/cppcache/include/geode/PdxInstanceFactory.hpp
index 7f93117..76b0038 100644
--- a/cppcache/include/geode/PdxInstanceFactory.hpp
+++ b/cppcache/include/geode/PdxInstanceFactory.hpp
@@ -53,10 +53,6 @@
  public:
   PdxInstanceFactory() = delete;
   ~PdxInstanceFactory() noexcept = default;
-  PdxInstanceFactory(const PdxInstanceFactory& other) = default;
-  PdxInstanceFactory& operator=(const PdxInstanceFactory& other) = default;
-  PdxInstanceFactory(PdxInstanceFactory&& other) = default;
-  PdxInstanceFactory& operator=(PdxInstanceFactory&& other) = default;
 
  public:
   /**
diff --git a/cppcache/include/geode/PdxUnreadFields.hpp b/cppcache/include/geode/PdxUnreadFields.hpp
index 38541eb..8d5f827 100644
--- a/cppcache/include/geode/PdxUnreadFields.hpp
+++ b/cppcache/include/geode/PdxUnreadFields.hpp
@@ -42,8 +42,8 @@
  **/
 class APACHE_GEODE_EXPORT PdxUnreadFields {
  public:
-  PdxUnreadFields() {}
-  virtual ~PdxUnreadFields() {}
+  PdxUnreadFields() = default;
+  virtual ~PdxUnreadFields() = default;
 };
 }  // namespace client
 }  // namespace geode
diff --git a/cppcache/include/geode/PoolFactory.hpp b/cppcache/include/geode/PoolFactory.hpp
index 7dc52b2..15ab278 100644
--- a/cppcache/include/geode/PoolFactory.hpp
+++ b/cppcache/include/geode/PoolFactory.hpp
@@ -542,7 +542,6 @@
 
  private:
   explicit PoolFactory(const Cache& cache);
-  PoolFactory& addCheck(const std::string& host, int port);
   std::shared_ptr<PoolAttributes> m_attrs;
   bool m_isSubscriptionRedundancy;
   bool m_addedServerOrLocator;
diff --git a/cppcache/include/geode/Properties.hpp b/cppcache/include/geode/Properties.hpp
index 375670c..40077d7 100644
--- a/cppcache/include/geode/Properties.hpp
+++ b/cppcache/include/geode/Properties.hpp
@@ -55,7 +55,7 @@
    public:
     virtual void visit(const std::shared_ptr<CacheableKey>& key,
                        const std::shared_ptr<Cacheable>& value) = 0;
-    virtual ~Visitor() {}
+    virtual ~Visitor() noexcept = default;
   };
 
   Properties() = default;
diff --git a/cppcache/include/geode/RegionService.hpp b/cppcache/include/geode/RegionService.hpp
index c6df996..3788bdd 100644
--- a/cppcache/include/geode/RegionService.hpp
+++ b/cppcache/include/geode/RegionService.hpp
@@ -26,10 +26,6 @@
 #include "PdxInstanceFactory.hpp"
 #include "internal/geode_globals.hpp"
 
-/**
- * @file
- */
-
 namespace apache {
 namespace geode {
 namespace client {
@@ -60,10 +56,9 @@
  */
 
 class APACHE_GEODE_EXPORT RegionService {
-  /**
-   * @brief public methods
-   */
  public:
+  virtual ~RegionService() = 0;
+
   /**
    * Indicates if this cache has been closed.
    * After a new cache object is created, this method returns false;
@@ -127,6 +122,7 @@
   virtual PdxInstanceFactory createPdxInstanceFactory(
       const std::string& className, bool expectDomainClass) const = 0;
 };
+
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/include/geode/StringPrefixPartitionResolver.hpp b/cppcache/include/geode/StringPrefixPartitionResolver.hpp
new file mode 100644
index 0000000..d1fb0de
--- /dev/null
+++ b/cppcache/include/geode/StringPrefixPartitionResolver.hpp
@@ -0,0 +1,68 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+#ifndef GEODE_STRINGPREFIXPARTITIONRESOLVER_H_
+#define GEODE_STRINGPREFIXPARTITIONRESOLVER_H_
+
+#include "PartitionResolver.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
+class CacheableKey;
+class EntryEvent;
+
+/**
+ * This class implements a partition resolver which routing object is
+ * the prefix of a given key.
+ * Delimiter is set by default to '|', still can be changed.
+ * @note If prefix is not found in the key an IllegalArgumentException is thrown
+ *
+ * Examples:
+ *  - Given key "key-1|timestamp", with delimiter '|', the routing object would
+ *    be "key-1"
+ *  - Given "key-1#DELIM#timestamp", with delimiter '|', then an exception is
+ *    thrown.
+ */
+class APACHE_GEODE_EXPORT StringPrefixPartitionResolver
+    : public PartitionResolver {
+ public:
+  StringPrefixPartitionResolver();
+  explicit StringPrefixPartitionResolver(std::string delimiter);
+
+  StringPrefixPartitionResolver(const StringPrefixPartitionResolver&) = delete;
+
+  ~StringPrefixPartitionResolver() override = default;
+
+  void operator=(const StringPrefixPartitionResolver&) = delete;
+
+  const std::string& getName() override;
+
+  std::shared_ptr<CacheableKey> getRoutingObject(
+      const EntryEvent& opDetails) override;
+
+ protected:
+  std::string delimiter_;
+};
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+#endif  // GEODE_STRINGPREFIXPARTITIONRESOLVER_H_
diff --git a/cppcache/include/geode/WritablePdxInstance.hpp b/cppcache/include/geode/WritablePdxInstance.hpp
index 71d232e..6341c97 100644
--- a/cppcache/include/geode/WritablePdxInstance.hpp
+++ b/cppcache/include/geode/WritablePdxInstance.hpp
@@ -39,10 +39,7 @@
  */
 class APACHE_GEODE_EXPORT WritablePdxInstance : public PdxInstance {
  public:
-  /**
-   * @brief destructor
-   */
-  virtual ~WritablePdxInstance() = default;
+  ~WritablePdxInstance() noexcept override = default;
 
   /**
    * Set the existing named field to the given value.
diff --git a/cppcache/include/geode/internal/DSCode.hpp b/cppcache/include/geode/internal/DSCode.hpp
index 3c9abdf..a4b0b3f 100644
--- a/cppcache/include/geode/internal/DSCode.hpp
+++ b/cppcache/include/geode/internal/DSCode.hpp
@@ -35,6 +35,9 @@
                  // TcrMessage and  C# DistributedM.cpp
   BooleanArray = 26,
   CharArray = 27,
+  CacheableUserData = 39,
+  CacheableUserData2 = 38,
+  CacheableUserData4 = 37,
   NullObj = 41,
   CacheableString = 42,
   Class = 43,
@@ -71,15 +74,8 @@
   CacheableASCIIString = 87,
   CacheableASCIIStringHuge = 88,
   CacheableStringHuge = 89,
-  InternalDistributedMember = 92,
-  CacheableEnum = 94,
-  ClientProxyMembershipId = 38,
-  CacheableUserData = 39,
-  CacheableUserData2 = 38,
-  CacheableUserData4 = 37,
   PDX = 93,
-  PDX_ENUM = 94,
-  InterestResultPolicy = 37,
+  PDX_ENUM = 94
 };
 
 }  // namespace internal
diff --git a/cppcache/include/geode/internal/DSFixedId.hpp b/cppcache/include/geode/internal/DSFixedId.hpp
index 95f0168..1f69830 100644
--- a/cppcache/include/geode/internal/DSFixedId.hpp
+++ b/cppcache/include/geode/internal/DSFixedId.hpp
@@ -43,6 +43,8 @@
   CacheableUndefined = 31,
   Struct = 32,
   EventId = 36,
+  InterestResultPolicy = 37,
+  ClientProxyMembershipId = 38,
   InternalDistributedMember = 92,
   TXCommitMessage = 110,
   DiskVersionTag = 2131,
diff --git a/cppcache/include/geode/internal/DataSerializableFixedId.hpp b/cppcache/include/geode/internal/DataSerializableFixedId.hpp
index 9482e64..60fb5a1 100644
--- a/cppcache/include/geode/internal/DataSerializableFixedId.hpp
+++ b/cppcache/include/geode/internal/DataSerializableFixedId.hpp
@@ -48,7 +48,7 @@
 class APACHE_GEODE_EXPORT DataSerializableFixedId_t
     : public DataSerializableFixedId {
  public:
-  ~DataSerializableFixedId_t() override = default;
+  ~DataSerializableFixedId_t() noexcept override = default;
 
   DSFid getDSFID() const final { return _DSFID; }
 };
diff --git a/cppcache/include/geode/internal/functional.hpp b/cppcache/include/geode/internal/functional.hpp
index 6fde1d6..b0f6376 100644
--- a/cppcache/include/geode/internal/functional.hpp
+++ b/cppcache/include/geode/internal/functional.hpp
@@ -36,17 +36,21 @@
 struct dereference_hash;
 
 template <class _T>
-struct dereference_hash<std::shared_ptr<_T>>
-    : public std::unary_function<std::shared_ptr<_T>, size_t> {
-  size_t operator()(const std::shared_ptr<_T>& val) const {
+struct dereference_hash<std::shared_ptr<_T>> {
+  using argument_type = std::shared_ptr<_T>;
+  using result_type = std::size_t;
+
+  result_type operator()(const argument_type& val) const {
     return std::hash<_T>{}(*val);
   }
 };
 
 template <class _T>
-struct dereference_hash<_T*> : public std::unary_function<_T*, size_t> {
-  typedef _T* argument_type;
-  size_t operator()(const argument_type& val) const {
+struct dereference_hash<_T*> {
+  using argument_type = _T*;
+  using result_type = std::size_t;
+
+  result_type operator()(const argument_type& val) const {
     return std::hash<_T>{}(*val);
   }
 };
@@ -55,11 +59,13 @@
 struct dereference_equal_to;
 
 template <class _T>
-struct dereference_equal_to<std::shared_ptr<_T>>
-    : public std::binary_function<std::shared_ptr<_T>, std::shared_ptr<_T>,
-                                  bool> {
-  constexpr bool operator()(const std::shared_ptr<_T>& lhs,
-                            const std::shared_ptr<_T>& rhs) const {
+struct dereference_equal_to<std::shared_ptr<_T>> {
+  using first_argument_type = std::shared_ptr<_T>;
+  using second_argument_type = std::shared_ptr<_T>;
+  using result_type = bool;
+
+  constexpr result_type operator()(const first_argument_type& lhs,
+                                   const second_argument_type& rhs) const {
     return std::equal_to<_T>{}(*lhs, *rhs);
   }
 };
diff --git a/cppcache/include/geode/internal/geode_base.hpp b/cppcache/include/geode/internal/geode_base.hpp
index 26bf265..2f5f4e8 100644
--- a/cppcache/include/geode/internal/geode_base.hpp
+++ b/cppcache/include/geode/internal/geode_base.hpp
@@ -62,10 +62,10 @@
 
 /** Deletes array x only if it exists */
 #define _GEODE_SAFE_DELETE_ARRAY(x) \
-  {                                 \
+  do {                              \
     delete[] x;                     \
     x = nullptr;                    \
-  }
+  } while (0)
 
 #include <chrono>
 #include <string>
@@ -77,8 +77,6 @@
 constexpr static std::chrono::milliseconds DEFAULT_QUERY_RESPONSE_TIMEOUT =
     std::chrono::seconds{15};
 
-static const std::string EMPTY_STRING{};
-
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/integration-test/.clang-format b/cppcache/integration-test/.clang-format
index cbbb6d5..5a5ffea 100644
--- a/cppcache/integration-test/.clang-format
+++ b/cppcache/integration-test/.clang-format
@@ -61,7 +61,7 @@
 - BOOST_FOREACH
 IncludeBlocks:   Regroup
 IncludeCategories:
-- Regex:           '^<(ace|boost)/'
+- Regex:           '^<(boost)/'
   Priority:        3
 - Regex:           '^<(gtest)/'
   Priority:        4
diff --git a/cppcache/integration-test/.clang-tidy b/cppcache/integration-test/.clang-tidy
index a3b1d36..910b726 100644
--- a/cppcache/integration-test/.clang-tidy
+++ b/cppcache/integration-test/.clang-tidy
@@ -1,19 +1,7 @@
 ---
-Checks:          '-*,clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-alpha*,google-*,-google-readability-todo,-google-runtime-references,-google-default-arguments,-clang-analyzer-core.uninitialized.UndefReturn,-clang-analyzer-core.UndefinedBinaryOperatorResult,-clang-analyzer-optin.cplusplus.VirtualCall,-clang-analyzer-cplusplus.NewDeleteLeaks,-google-readability-function-size'
-WarningsAsErrors: '*'
-HeaderFilterRegex: '.*'
-FormatStyle:     file
+InheritParentConfig: true
+Checks: '-google-readability-function-size'
 ...
 
-# Disable Checks
-# google-runtime-references - We have diverged from this rule due to both legacy and disagreement with the rule.
-# google-readability-todo - Adds current user name when fix applied.
-# clang-analyzer-cplusplus.NewDeleteLeaks - Fundamental design flaw in dunit::Task
-
-# TODO - Fix these checks
-# google-default-arguments
-# clang-analyzer-core.uninitialized.UndefReturn - Generates errors in ACE, how do we ignore?
-# clang-analyzer-core.UndefinedBinaryOperatorResult - Generates errors in ACE, how do we ignore?
-
-# TEMP
-# clang-analyzer-optin.cplusplus.VirtualCall
+# google-readability-function-size
+# Some tests have large bodies that cause this rule to fail.
diff --git a/cppcache/integration-test/BBNamingContext.cpp b/cppcache/integration-test/BBNamingContext.cpp
deleted file mode 100644
index 0de09f7..0000000
--- a/cppcache/integration-test/BBNamingContext.cpp
+++ /dev/null
@@ -1,297 +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.
- */
-#ifndef _WIN32
-
-#include "BBNamingContext.hpp"
-
-#include <ace/ACE.h>
-#include "fwklib/FwkBBServer.hpp"
-#include "fwklib/FwkBBClient.hpp"
-#include "fwklib/FwkStrCvt.hpp"
-#include <fwklib/FwkException.hpp>
-
-#define ERR_MAX 10
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace testframework {
-
-static int hashcode(char *str) {
-  if (str == nullptr) {
-    return 0;
-  }
-  int localHash = 0;
-
-  int prime = 31;
-  char *data = str;
-  for (int i = 0; i < 50 && (data[i] != '\0'); i++) {
-    localHash = prime * localHash + data[i];
-  }
-  if (localHash > 0) return localHash;
-  return -1 * localHash;
-}
-
-static int getRandomNum() {
-  char *testName = ACE_OS::getenv("TESTNAME");
-
-  int seed = hashcode(testName) + 11;
-
-  printf("seed for BBPort process %d\n", seed);
-  // The integration tests rely on the pseudo-random
-  // number generator being seeded with a very particular
-  // value specific to the test by way of the test name.
-  // Whilst this approach is pessimal, it can not be
-  // remedied as the test depend upon it.
-  ACE_OS::srand(seed);
-  // NOLINTNEXTLINE(clang-analyzer-security.insecureAPI.rand)
-  return (ACE_OS::rand() % 49999) + 14000;
-}
-
-int G_BBPORT = getRandomNum();
-
-class BBNamingContextClientImpl {
-  FwkBBClient *m_bbc;
-  uint32_t m_errCount;
-  bool checkValue(const std::string &k, const std::string &k1,
-                  const std::string &value);
-
- public:
-  BBNamingContextClientImpl();
-  ~BBNamingContextClientImpl();
-  void open();
-  void close();
-  void dump();
-  int rebind(const char *key, const char *value, char *type);
-  int resolve(const char *key, char *value, char *type);
-};
-
-class BBNamingContextServerImpl {
-  FwkBBServer *m_bbServer;
-  UDPMessageQueues *m_shared;
-  STReceiver *m_recv;
-  BBProcessor *m_serv;
-  Responder *m_resp;
-  Service *m_farm;
-
- public:
-  BBNamingContextServerImpl();
-  ~BBNamingContextServerImpl();
-};
-//
-// Impls:
-//
-BBNamingContextClientImpl::BBNamingContextClientImpl()
-    : m_bbc(nullptr), m_errCount(0) {}
-BBNamingContextClientImpl::~BBNamingContextClientImpl() { close(); }
-void BBNamingContextClientImpl::open() {
-  try {
-    // char * bbPort = ACE_OS::getenv( "BB_PORT" );
-
-    char temp[8];
-    char *bbPort = ACE_OS::itoa(G_BBPORT, temp, 10);
-
-    char buf[1024];
-    ACE_OS::sprintf(buf, "localhost:%s", bbPort);
-    fprintf(stdout, "Blackboard client is talking on %s\n", buf);
-    fflush(stdout);
-    m_bbc = new FwkBBClient(buf);
-  } catch (FwkException &e) {
-    FWKEXCEPTION("create bb client encounted Exception: " << e.what());
-  } catch (...) {
-    FWKEXCEPTION("create bb client unknow exception\n");
-  }
-}
-void BBNamingContextClientImpl::close() {
-  if (m_bbc != nullptr) {
-    delete m_bbc;
-    m_bbc = nullptr;
-  }
-}
-int BBNamingContextClientImpl::rebind(const char *key, const char *value,
-                                      char *) {
-  // fprintf(stdout, "bind: key=%s, value=%s\n", key, value);
-  if (m_bbc == nullptr) {
-    return -1;
-  }
-  if (m_errCount > ERR_MAX) {
-    close();
-    return -1;
-  }
-
-  try {
-    std::string k(key);
-    std::string k1("1");
-    std::string v(value);
-    m_bbc->set(k, k1, v);
-    if (false == checkValue(k, k1, value)) {
-      m_errCount++;
-    } else {
-      if (m_errCount > 0) {
-        m_errCount = 0;
-      }
-      return 0;
-    }
-  } catch (FwkException &e) {
-    m_errCount++;
-    FWKEXCEPTION(" rebind encounted Exception: " << e.what());
-  } catch (...) {
-    m_errCount++;
-    FWKEXCEPTION("rebind unknown exception\n");
-  }
-  return -1;
-}
-void BBNamingContextClientImpl::dump() {
-  if (m_bbc == nullptr) {
-    return;
-  }
-  if (m_errCount > ERR_MAX) {
-    close();
-    return;
-  }
-  try {
-    std::string bb = m_bbc->dump();
-    FWKINFO("Dump Blackboard " << bb);
-    if (m_errCount > 0) {
-      m_errCount = 0;
-    }
-  } catch (FwkException &e) {
-    m_errCount++;
-    FWKEXCEPTION("create dump encounted Exception: " << e.what());
-  } catch (...) {
-    m_errCount++;
-    FWKEXCEPTION("dump unknown exception\n");
-  }
-}
-int BBNamingContextClientImpl::resolve(const char *key, char *value, char *) {
-  // fprintf(stdout, "resolve: key=%s\n", key);fflush(stdout);
-  if (m_bbc == nullptr) {
-    return -1;
-  }
-  if (m_errCount > ERR_MAX) {
-    close();
-    return -1;
-  }
-  try {
-    std::string k(key);
-    std::string k1("1");
-    std::string v = m_bbc->getString(k, k1);
-    // fprintf(stdout, "resolve: got value %s for key=%s\n", v.c_str(),
-    // key);fflush(stdout);
-    ACE_OS::strncpy(value, v.c_str(), sizeof(value));
-    if (m_errCount > 0) {
-      m_errCount = 0;
-    }
-    return v.length() == 0 ? -1 : 0;
-  } catch (FwkException &e) {
-    m_errCount++;
-    FWKEXCEPTION("create resolve encounted Exception: " << e.what());
-  } catch (...) {
-    m_errCount++;
-    FWKEXCEPTION("resolve unknown exception\n");
-  }
-}
-
-bool BBNamingContextClientImpl::checkValue(const std::string &k,
-                                           const std::string &k1,
-                                           const std::string &value) {
-  bool valid = false;
-  try {
-    std::string v = m_bbc->getString(k, k1);
-    if (value == v) valid = true;
-  } catch (FwkException &e) {
-    FWKEXCEPTION("create resolve encounted Exception: " << e.what());
-  } catch (...) {
-    FWKEXCEPTION("resolve unknown exception\n");
-  }
-  return valid;
-}
-
-BBNamingContextServerImpl::BBNamingContextServerImpl() {
-  try {
-    // char * bbPort = ACE_OS::getenv( "BB_PORT" );
-    char temp[8];
-    char *bbPort = ACE_OS::itoa(G_BBPORT, temp, 10);
-    FwkStrCvt bPort(bbPort);
-    uint32_t prt = bPort.toUInt32();
-    fprintf(stdout, "Blackboard server is on port:%u\n", prt);
-    fflush(stdout);
-    m_bbServer = new FwkBBServer();
-    m_shared = new UDPMessageQueues("BBQueues");
-    m_recv = new STReceiver(m_shared, prt);
-    m_serv = new BBProcessor(m_shared, m_bbServer);
-    m_resp = new Responder(m_shared, prt);
-    m_farm = new Service(3);
-    m_farm->runThreaded(m_recv, 1);
-    m_farm->runThreaded(m_serv, 1);
-    m_farm->runThreaded(m_resp, 1);
-  } catch (FwkException &e) {
-    FWKEXCEPTION("create bb server encounted Exception: " << e.what());
-  } catch (...) {
-    FWKSEVERE("create bb server unknown exception\n");
-  }
-}
-
-BBNamingContextServerImpl::~BBNamingContextServerImpl() {
-  delete m_farm;
-  delete m_bbServer;
-  delete m_shared;
-  delete m_recv;
-  delete m_serv;
-  delete m_resp;
-}
-//
-// client
-//
-BBNamingContextClient::BBNamingContextClient() {
-  m_impl = new BBNamingContextClientImpl();
-}
-BBNamingContextClient::~BBNamingContextClient() {
-  if (m_impl) {
-    delete m_impl;
-    m_impl = nullptr;
-  }
-}
-void BBNamingContextClient::open() { m_impl->open(); }
-void BBNamingContextClient::close() { m_impl->close(); }
-void BBNamingContextClient::dump() { m_impl->dump(); }
-int BBNamingContextClient::rebind(const char *key, const char *value,
-                                  char *type) {
-  return m_impl->rebind(key, value, type);
-}
-int BBNamingContextClient::resolve(const char *key, char *value, char *type) {
-  return m_impl->resolve(key, value, type);
-}
-//
-// server
-//
-BBNamingContextServer::BBNamingContextServer() {
-  m_impl = new BBNamingContextServerImpl();
-}
-BBNamingContextServer::~BBNamingContextServer() {
-  if (m_impl != nullptr) {
-    delete m_impl;
-    m_impl = nullptr;
-  }
-}
-
-}  // namespace testframework
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif
diff --git a/cppcache/integration-test/BBNamingContext.hpp b/cppcache/integration-test/BBNamingContext.hpp
deleted file mode 100644
index b1791ea..0000000
--- a/cppcache/integration-test/BBNamingContext.hpp
+++ /dev/null
@@ -1,62 +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.
- */
-
-#pragma once
-
-#ifndef GEODE_INTEGRATION_TEST_BBNAMINGCONTEXT_H_
-#define GEODE_INTEGRATION_TEST_BBNAMINGCONTEXT_H_
-
-// This these classes should have been in the framework libary. If we ever use
-// these, instead of the ACE context, onto windows and Linux then we should
-// move them there.
-// This will avoid pulling in a lot of framework headers to cause compilation
-// grieve, especially with the stl stuff.
-#include <cstdlib>
-#include <string>
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace testframework {
-
-class BBNamingContextClientImpl;
-class BBNamingContextClient {
-  BBNamingContextClientImpl* m_impl;
-
- public:
-  BBNamingContextClient();
-  ~BBNamingContextClient();
-  void open();
-  void close();
-  int rebind(const char* key, const char* value, char* type = nullptr);
-  void dump();
-  int resolve(const char* key, char* value, char* type = nullptr);
-};
-class BBNamingContextServerImpl;
-class BBNamingContextServer {
- public:
-  BBNamingContextServerImpl* m_impl;
-  BBNamingContextServer();
-  ~BBNamingContextServer();
-};
-
-}  // namespace testframework
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_INTEGRATION_TEST_BBNAMINGCONTEXT_H_
diff --git a/cppcache/integration-test/BuiltinCacheableWrappers.hpp b/cppcache/integration-test/BuiltinCacheableWrappers.hpp
index a68f674..210fe4c 100644
--- a/cppcache/integration-test/BuiltinCacheableWrappers.hpp
+++ b/cppcache/integration-test/BuiltinCacheableWrappers.hpp
@@ -24,13 +24,14 @@
 #include <cstdlib>
 #include <wchar.h>
 #include <random>
-
-#include <ace/Date_Time.h>
+#include <sstream>
+#include <iomanip>
 
 #include "CacheHelper.hpp"
 #include "CacheRegionHelper.hpp"
 #include "CacheableWrapper.hpp"
 #include "CacheImpl.hpp"
+#include "testUtils.hpp"
 
 #include <geode/CacheableFileName.hpp>
 #include <geode/CacheableUndefined.hpp>
@@ -77,6 +78,8 @@
 using apache::geode::client::testing::CacheableWrapper;
 using apache::geode::client::testing::CacheableWrapperFactory;
 
+using unitTests::TestUtils;
+
 const uint32_t m_crc32Table[] = {
     0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
     0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
@@ -334,13 +337,14 @@
   }
 
   void initRandomValue(int32_t) override {
-    int32_t rnd = CacheableHelper::random<int32_t>(INT_MAX);
-    time_t timeofday = 0;
+    auto rnd = CacheableHelper::random<int32_t>(INT_MAX);
 
-    const ACE_Time_Value currentTime = ACE_OS::gettimeofday();
-    timeofday = currentTime.sec();
+    auto timeofday = std::chrono::time_point_cast<std::chrono::seconds>(
+                         std::chrono::system_clock::now())
+                         .time_since_epoch()
+                         .count();
     time_t epoctime =
-        static_cast<time_t>(timeofday + (rnd * (rnd % 2 == 0 ? 1 : -1)));
+        static_cast<time_t>(timeofday + (rnd * (rnd & 1 ? -1 : 1)));
 
     m_cacheableObject = CacheableDate::create(epoctime);
   }
@@ -362,17 +366,16 @@
 
   // CacheableWrapper members
 
-  virtual int32_t maxKeys() const { return INT_MAX; }
+  int32_t maxKeys() const override { return INT_MAX; }
 
-  virtual void initKey(int32_t keyIndex, int32_t maxSize) {
+  void initKey(int32_t keyIndex, int32_t maxSize) override {
     maxSize %= (0xFFFF + 1);
     if (maxSize < 11) {
       maxSize = 11;
     }
     std::string baseStr(maxSize - 10, 'A');
-    char indexStr[15];
-    sprintf(indexStr, "%10d", keyIndex);
-    baseStr.append(indexStr);
+    baseStr.append(TestUtils::zeroPaddedStringFromInt(keyIndex, 10));
+
 // make first caharacter as a '/' so java does not change the path
 // taking it to be a relative path
 #ifdef WIN32
@@ -385,7 +388,7 @@
     m_cacheableObject = CacheableFileName::create(baseStr);
   }
 
-  virtual void initRandomValue(int32_t maxSize) {
+  void initRandomValue(int32_t maxSize) override {
     maxSize %= (0xFFFF + 1);
     std::string randStr;
     CacheableHelper::randomString(maxSize, randStr);
@@ -395,7 +398,7 @@
     m_cacheableObject = CacheableFileName::create(randStr);
   }
 
-  virtual uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const {
+  uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const override {
     auto&& obj = std::dynamic_pointer_cast<CacheableFileName>(object);
     return (obj ? CacheableHelper::crc32(
                       reinterpret_cast<const uint8_t*>(obj->value().c_str()),
@@ -531,28 +534,26 @@
 
   // CacheableWrapper members
 
-  virtual int32_t maxKeys() const { return INT_MAX; }
+  int32_t maxKeys() const override { return INT_MAX; }
 
-  virtual void initKey(int32_t keyIndex, int32_t maxSize) {
+  void initKey(int32_t keyIndex, int32_t maxSize) override {
     maxSize %= (0xFFFF + 1);
     if (maxSize < 11) {
       maxSize = 11;
     }
     std::string baseStr(maxSize - 10, 'A');
-    char indexStr[15];
-    sprintf(indexStr, "%10d", keyIndex);
-    baseStr.append(indexStr);
+    baseStr.append(TestUtils::zeroPaddedStringFromInt(keyIndex, 10));
     m_cacheableObject = CacheableString::create(baseStr);
   }
 
-  virtual void initRandomValue(int32_t maxSize) {
+  void initRandomValue(int32_t maxSize) override {
     maxSize %= (0xFFFF + 1);
     std::string randStr;
     CacheableHelper::randomString(maxSize, randStr);
     m_cacheableObject = CacheableString::create(randStr);
   }
 
-  virtual uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const {
+  uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const override {
     const CacheableString* obj =
         dynamic_cast<const CacheableString*>(object.get());
     return (obj != nullptr
@@ -573,21 +574,19 @@
 
   // CacheableWrapper members
 
-  virtual int32_t maxKeys() const { return INT_MAX; }
+  int32_t maxKeys() const override { return INT_MAX; }
 
-  virtual void initKey(int32_t keyIndex, int32_t maxSize) {
+  void initKey(int32_t keyIndex, int32_t maxSize) override {
     if (maxSize <= 0xFFFF)  // ensure its larger than 64k
     {
       maxSize += (0xFFFF + 1);
     }
     std::string baseStr(maxSize - 10, 'A');
-    char indexStr[15];
-    sprintf(indexStr, "%10d", keyIndex);
-    baseStr.append(indexStr);
+    baseStr.append(TestUtils::zeroPaddedStringFromInt(keyIndex, 10));
     m_cacheableObject = CacheableString::create(baseStr);
   }
 
-  virtual void initRandomValue(int32_t maxSize) {
+  void initRandomValue(int32_t maxSize) override {
     if (maxSize <= 0xFFFF)  // ensure its larger than 64k
     {
       maxSize += (0xFFFF + 1);
@@ -597,7 +596,7 @@
     m_cacheableObject = CacheableString::create(randStr);
   }
 
-  virtual uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const {
+  uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const override {
     const CacheableString* obj =
         dynamic_cast<const CacheableString*>(object.get());
     ASSERT(obj != nullptr, "getCheckSum: null object.");
@@ -608,31 +607,27 @@
 
 class CacheableHugeUnicodeStringWrapper : public CacheableWrapper {
  public:
-  // Constructor and factory function
-
   CacheableHugeUnicodeStringWrapper() : CacheableWrapper(nullptr) {}
 
   static CacheableWrapper* create() {
     return new CacheableHugeUnicodeStringWrapper();
   }
 
-  // CacheableWrapper members
+  int32_t maxKeys() const override { return INT_MAX; }
 
-  virtual int32_t maxKeys() const { return INT_MAX; }
+  void initKey(int32_t keyIndex, int32_t maxSize) override {
+    std::wostringstream strm;
 
-  virtual void initKey(int32_t keyIndex, int32_t maxSize) {
     if (maxSize <= 0xFFFF)  // ensure its larger than 64k
     {
       maxSize += (0xFFFF + 1);
     }
     std::wstring baseStr(maxSize - 10, L'\x0905');
-    wchar_t indexStr[15];
-    swprintf(indexStr, 14, L"%10d", keyIndex);
-    baseStr.append(indexStr);
-    m_cacheableObject = CacheableString::create(baseStr);
+    strm << baseStr << std::setw(10) << std::setfill(L'0') << keyIndex;
+    m_cacheableObject = CacheableString::create(strm.str());
   }
 
-  virtual void initRandomValue(int32_t maxSize) {
+  void initRandomValue(int32_t maxSize) override {
     if (maxSize <= 0xFFFF)  // ensure its larger than 64k
     {
       maxSize += (0xFFFF + 1);
@@ -642,7 +637,7 @@
     m_cacheableObject = CacheableString::create(randStr);
   }
 
-  virtual uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const {
+  uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const override {
     auto&& obj = std::dynamic_pointer_cast<CacheableString>(object);
     ASSERT(obj != nullptr, "getCheckSum: null object.");
     return CacheableHelper::crc32(
@@ -663,28 +658,29 @@
 
   // CacheableWrapper members
 
-  virtual int32_t maxKeys() const { return INT_MAX; }
+  int32_t maxKeys() const override { return INT_MAX; }
 
-  virtual void initKey(int32_t keyIndex, int32_t maxSize) {
+  void initKey(int32_t keyIndex, int32_t maxSize) override {
+    std::wostringstream strm;
+
     maxSize %= 21800;  // so that encoded length is within 64k
     if (maxSize < 11) {
       maxSize = 11;
     }
     std::wstring baseStr(maxSize - 10, L'\x0905');
     wchar_t indexStr[15];
-    swprintf(indexStr, 14, L"%10d", keyIndex);
-    baseStr.append(indexStr);
-    m_cacheableObject = CacheableString::create(baseStr);
+    strm << baseStr << std::setw(10) << std::setfill(L'0') << keyIndex;
+    m_cacheableObject = CacheableString::create(strm.str());
   }
 
-  virtual void initRandomValue(int32_t maxSize) {
+  void initRandomValue(int32_t maxSize) override {
     maxSize %= 21800;  // so that encoded length is within 64k
     std::wstring randStr;
     CacheableHelper::randomString(maxSize, randStr);
     m_cacheableObject = CacheableString::create(randStr);
   }
 
-  virtual uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const {
+  uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const override {
     auto&& obj = std::dynamic_pointer_cast<CacheableString>(object);
     ASSERT(obj != nullptr, "getCheckSum: null object.");
     return CacheableHelper::crc32(
@@ -886,15 +882,13 @@
 
   static CacheableWrapper* create() { return new CacheableBytesWrapper(); }
 
-  // CacheableWrapper members
-
-  virtual void initRandomValue(int32_t maxSize) {
+  void initRandomValue(int32_t maxSize) override {
     auto randArr = CacheableHelper::randomArray<uint8_t>(maxSize, UCHAR_MAX);
     m_cacheableObject = CacheableBytes::create(
         std::vector<int8_t>(std::begin(randArr), std::end(randArr)));
   }
 
-  virtual uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const {
+  uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const override {
     const CacheableBytes* obj =
         dynamic_cast<const CacheableBytes*>(object.get());
     ASSERT(obj != nullptr, "getCheckSum: null object.");
@@ -904,24 +898,20 @@
 
 class CacheableDoubleArrayWrapper : public CacheableWrapper {
  public:
-  // Constructor and factory function
-
   CacheableDoubleArrayWrapper() : CacheableWrapper(nullptr) {}
 
   static CacheableWrapper* create() {
     return new CacheableDoubleArrayWrapper();
   }
 
-  // CacheableWrapper members
-
-  virtual void initRandomValue(int32_t maxSize) {
+  void initRandomValue(int32_t maxSize) override {
     maxSize = maxSize / sizeof(double) + 1;
     auto randArr =
         CacheableHelper::randomArray(maxSize, static_cast<double>(INT_MAX));
     m_cacheableObject = CacheableDoubleArray::create(randArr);
   }
 
-  virtual uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const {
+  uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const override {
     const auto obj =
         std::dynamic_pointer_cast<const CacheableDoubleArray>(object);
     ASSERT(obj != nullptr, "getCheckSum: null object.");
@@ -931,22 +921,18 @@
 
 class CacheableFloatArrayWrapper : public CacheableWrapper {
  public:
-  // Constructor and factory function
-
   CacheableFloatArrayWrapper() : CacheableWrapper(nullptr) {}
 
   static CacheableWrapper* create() { return new CacheableFloatArrayWrapper(); }
 
-  // CacheableWrapper members
-
-  virtual void initRandomValue(int32_t maxSize) {
+  void initRandomValue(int32_t maxSize) override {
     maxSize = maxSize / sizeof(float) + 1;
     auto randArr =
         CacheableHelper::randomArray(maxSize, static_cast<float>(INT_MAX));
     m_cacheableObject = CacheableFloatArray::create(randArr);
   }
 
-  virtual uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const {
+  uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const override {
     const auto obj =
         std::dynamic_pointer_cast<const CacheableFloatArray>(object);
     ASSERT(obj != nullptr, "getCheckSum: null object.");
@@ -956,21 +942,17 @@
 
 class CacheableInt16ArrayWrapper : public CacheableWrapper {
  public:
-  // Constructor and factory function
-
   CacheableInt16ArrayWrapper() : CacheableWrapper(nullptr) {}
 
   static CacheableWrapper* create() { return new CacheableInt16ArrayWrapper(); }
 
-  // CacheableWrapper members
-
-  virtual void initRandomValue(int32_t maxSize) {
+  void initRandomValue(int32_t maxSize) override {
     maxSize = maxSize / sizeof(int16_t) + 1;
     auto randArr = CacheableHelper::randomArray<int16_t>(maxSize, SHRT_MAX);
     m_cacheableObject = CacheableInt16Array::create(randArr);
   }
 
-  virtual uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const {
+  uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const override {
     const auto obj =
         std::dynamic_pointer_cast<const CacheableInt16Array>(object);
     ASSERT(obj != nullptr, "getCheckSum: null object.");
@@ -980,21 +962,17 @@
 
 class CacheableInt32ArrayWrapper : public CacheableWrapper {
  public:
-  // Constructor and factory function
-
   CacheableInt32ArrayWrapper() : CacheableWrapper(nullptr) {}
 
   static CacheableWrapper* create() { return new CacheableInt32ArrayWrapper(); }
 
-  // CacheableWrapper members
-
-  virtual void initRandomValue(int32_t maxSize) {
+  void initRandomValue(int32_t maxSize) override {
     maxSize = maxSize / sizeof(int32_t) + 1;
     auto randArr = CacheableHelper::randomArray<int32_t>(maxSize, INT_MAX);
     m_cacheableObject = CacheableInt32Array::create(randArr);
   }
 
-  virtual uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const {
+  uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const override {
     const auto obj =
         std::dynamic_pointer_cast<const CacheableInt32Array>(object);
     ASSERT(obj != nullptr, "getCheckSum: null object.");
@@ -1004,21 +982,17 @@
 
 class CacheableInt64ArrayWrapper : public CacheableWrapper {
  public:
-  // Constructor and factory function
-
   CacheableInt64ArrayWrapper() : CacheableWrapper(nullptr) {}
 
   static CacheableWrapper* create() { return new CacheableInt64ArrayWrapper(); }
 
-  // CacheableWrapper members
-
-  virtual void initRandomValue(int32_t maxSize) {
+  void initRandomValue(int32_t maxSize) override {
     maxSize = maxSize / sizeof(int64_t) + 1;
     auto randArr = CacheableHelper::randomArray<int64_t>(maxSize, INT_MAX);
     m_cacheableObject = CacheableInt64Array::create(randArr);
   }
 
-  virtual uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const {
+  uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const override {
     const auto obj =
         std::dynamic_pointer_cast<const CacheableInt64Array>(object);
     ASSERT(obj != nullptr, "getCheckSum: null object.");
@@ -1028,14 +1002,10 @@
 
 class CacheableNullStringWrapper : public CacheableWrapper {
  public:
-  // Constructor and factory function
-
   CacheableNullStringWrapper() : CacheableWrapper(nullptr) {}
 
   static CacheableWrapper* create() { return new CacheableNullStringWrapper(); }
 
-  // CacheableWrapper members
-
   void initRandomValue(int32_t) override {
     m_cacheableObject = CacheableString::create(static_cast<char*>(nullptr));
   }
@@ -1048,17 +1018,13 @@
 
 class CacheableStringArrayWrapper : public CacheableWrapper {
  public:
-  // Constructor and factory function
-
   CacheableStringArrayWrapper() : CacheableWrapper(nullptr) {}
 
   static CacheableWrapper* create() {
     return new CacheableStringArrayWrapper();
   }
 
-  // CacheableWrapper members
-
-  virtual void initRandomValue(int32_t maxSize) {
+  void initRandomValue(int32_t maxSize) override {
     int32_t arraySize = 16;
     maxSize = maxSize / arraySize;
     if (maxSize < 2) {
@@ -1083,7 +1049,7 @@
                                                       randArr + arraySize));
   }
 
-  virtual uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const {
+  uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const override {
     auto&& obj = std::dynamic_pointer_cast<CacheableStringArray>(object);
     ASSERT(obj != nullptr, "getCheckSum: null object.");
     uint32_t checkSum = 0;
@@ -1098,40 +1064,16 @@
   }
 };
 
-class CacheableUndefinedWrapper : public CacheableWrapper {
- public:
-  // Constructor and factory function
-
-  CacheableUndefinedWrapper() : CacheableWrapper(nullptr) {}
-
-  static CacheableWrapper* create() { return new CacheableUndefinedWrapper(); }
-
-  // CacheableWrapper members
-
-  void initRandomValue(int32_t) override {
-    m_cacheableObject = std::shared_ptr<Serializable>(
-        CacheableUndefined::createDeserializable());
-  }
-
-  uint32_t getCheckSum(const std::shared_ptr<Cacheable>) const override {
-    return 0;
-  }
-};
-
 template <typename VECTTYPE>
 class CacheableVectorTypeWrapper : public CacheableWrapper {
  public:
-  // Constructor and factory function
-
   CacheableVectorTypeWrapper<VECTTYPE>() : CacheableWrapper(nullptr) {}
 
   static CacheableWrapper* create() {
     return new CacheableVectorTypeWrapper<VECTTYPE>();
   }
 
-  // CacheableWrapper members
-
-  virtual void initRandomValue(int32_t maxSize) {
+  void initRandomValue(int32_t maxSize) override {
     auto vec =
         std::dynamic_pointer_cast<VECTTYPE>(VECTTYPE::createDeserializable());
     auto valueTypeIds = CacheableWrapperFactory::getRegisteredValueTypes();
@@ -1150,7 +1092,7 @@
     m_cacheableObject = vec;
   }
 
-  virtual uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const {
+  uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const override {
     auto vec = std::dynamic_pointer_cast<VECTTYPE>(object);
     ASSERT(vec != nullptr, "getCheckSum: null object.");
     uint32_t checkSum = 0;
@@ -1189,7 +1131,7 @@
 
   // CacheableWrapper members
 
-  virtual void initRandomValue(int32_t maxSize) {
+  void initRandomValue(int32_t maxSize) override {
     auto arr = std::dynamic_pointer_cast<CacheableObjectArray>(
         CacheableObjectArray::createDeserializable());
     auto valueTypeIds = CacheableWrapperFactory::getRegisteredValueTypes();
@@ -1208,7 +1150,7 @@
     m_cacheableObject = arr;
   }
 
-  virtual uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const {
+  uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const override {
     auto&& arr = std::dynamic_pointer_cast<CacheableObjectArray>(object);
     ASSERT(arr != nullptr, "getCheckSum: null object.");
     uint32_t checkSum = 0;
diff --git a/cppcache/integration-test/CMakeLists.txt b/cppcache/integration-test/CMakeLists.txt
index 7a40f75..f56a4e0 100644
--- a/cppcache/integration-test/CMakeLists.txt
+++ b/cppcache/integration-test/CMakeLists.txt
@@ -18,13 +18,15 @@
 
 add_library(test-cppcache-utils STATIC
   fw_dunit.cpp
-  BBNamingContext.cpp
+  ClientCleanup.cpp
   CacheHelper.cpp
   CacheableWrapper.cpp
+  TimeBomb.cpp
 )
+
 target_link_libraries(test-cppcache-utils
   PRIVATE
-    ACE::ACE
+    integration-framework
     _WarningsAsError
   PUBLIC
     apache-geode
@@ -49,7 +51,6 @@
 add_library(unit_test_callbacks SHARED LibraryCallbacks.cpp)
 target_link_libraries(unit_test_callbacks
   PRIVATE
-    ACE::ACE
     _WarningsAsError
   PUBLIC
     apache-geode
@@ -66,24 +67,24 @@
 
 enable_testing()
 
-# Function to resolve both config and generate stage variables.
-macro(generate_config INPUT TEMP OUTPUT)
-    configure_file(${INPUT} ${TEMP})
-    file(GENERATE OUTPUT ${OUTPUT}
-      INPUT ${TEMP}
-      CONDITION 1
-    )
-endmacro()
+if(UNIX AND NOT APPLE)
+  set(PLATFORM_SPECIFIC_LIBS "rt")
+endif()
 
-# Add lazy loaded shared library paths to test environment
-foreach( lib SQLite::sqlite3 )
-  get_target_property(library_path ${lib} INTERFACE_LIBRARY_DIR)
-  set(LD_LIBRARY_PATH ${LD_LIBRARY_PATH} ${library_path})
-  get_target_property(runtime_path ${lib} INTERFACE_RUNTIME_DIR)
-  set(PATH ${PATH} ${runtime_path})
-endforeach()
-
-set (PORT 20000)
+set(LIBRARY_PATH_ENVIRONMENT_VARIABLE LD_LIBRARY_PATH)
+if (APPLE)
+  set(LIBRARY_PATH_ENVIRONMENT_VARIABLE DYLD_LIBRARY_PATH)
+elseif(WIN32)
+  set(LIBRARY_PATH_ENVIRONMENT_VARIABLE PATH)
+endif()
+set(LIBRARY_PATH
+  $<TARGET_LINKER_FILE_DIR:apache-geode>
+  $<TARGET_LINKER_FILE_DIR:SqLiteImpl>
+  $<TARGET_PROPERTY:SQLite::sqlite3,INTERFACE_LIBRARY_DIR>
+  $<TARGET_PROPERTY:SQLite::sqlite3,INTERFACE_RUNTIME_DIR>
+  $<TARGET_LINKER_FILE_DIR:unit_test_callbacks>
+  $<TARGET_LINKER_FILE_DIR:testobject>
+)
 
 add_custom_target(cppcache-integration-tests)
 set_target_properties(cppcache-integration-tests PROPERTIES
@@ -97,24 +98,24 @@
 foreach(FILE ${SOURCES})
   string(REGEX REPLACE "\\.cpp" "" TEST ${FILE})
   set(TESTS ${TESTS} ${TEST})
-  add_dependencies(integration-tests ${TEST})
+
   add_executable(${TEST} ${FILE})
+
+  add_dependencies(integration-tests ${TEST})
+
   set_target_properties(${TEST} PROPERTIES
     CXX_VISIBILITY_PRESET hidden
     VISIBILITY_INLINES_HIDDEN ON
     FOLDER cpp/test/integration/legacy
   )
 
-if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-  target_compile_options(_WarningsAsError INTERFACE
-          -Wno-missing-variable-declarations
-          )
-endif()
-
   target_link_libraries(${TEST}
     PRIVATE
-      ACE::ACE
+      Boost::boost
+      Boost::iostreams
+      Boost::program_options
       test-cppcache-utils
+      ${PLATFORM_SPECIFIC_LIBS}
       _WarningsAsError
       _CppCodeCoverage
       internal
@@ -122,18 +123,24 @@
       apache-geode
       testobject
       framework
+      security
   )
-  target_include_directories(${TEST} PRIVATE
-    $<TARGET_PROPERTY:apache-geode,SOURCE_DIR>/../src
+
+  target_include_directories(${TEST}
+    PRIVATE
+      $<TARGET_PROPERTY:apache-geode,SOURCE_DIR>/../src
   )
 
   if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
-    target_compile_options(${TEST} PRIVATE
+    target_compile_options(${TEST}
+      PRIVATE
         -Wno-unused-function
     )
   elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-    target_compile_options(${TEST} PRIVATE
+    target_compile_options(${TEST}
+      PRIVATE
         -Wno-unused-member-function
+        -Wno-missing-variable-declarations
     )
   endif()
 
@@ -143,29 +150,31 @@
   add_clangformat(${TEST})
 
   set(TEST_DIR ${CMAKE_CURRENT_BINARY_DIR}/.tests/${TEST})
-
-  math(EXPR PORT "${PORT} + 1")
-
-  if (WIN32)
-    set (TEST_SCRIPT_SUFFIX .bat)
-    generate_config(${CMAKE_CURRENT_SOURCE_DIR}/test.bat.in ${CMAKE_CURRENT_BINARY_DIR}/.${TEST}.bat.in $<TARGET_FILE:${TEST}>${TEST_SCRIPT_SUFFIX})
-
-    set(TEST_COMMAND $<TARGET_FILE:${TEST}>${TEST_SCRIPT_SUFFIX})
-
-  else()
-    set (TEST_SCRIPT_SUFFIX .sh)
-    generate_config(${CMAKE_CURRENT_SOURCE_DIR}/test.sh.in ${CMAKE_CURRENT_BINARY_DIR}/.${TEST}.sh.in $<TARGET_FILE:${TEST}>${TEST_SCRIPT_SUFFIX})
-
-    # TODO fix file permissions on .sh
-    set(TEST_COMMAND bash $<TARGET_FILE:${TEST}>${TEST_SCRIPT_SUFFIX})
-
-  endif()
+  file(MAKE_DIRECTORY ${TEST_DIR})
 
   add_test(NAME ${TEST}
-      COMMAND ${TEST_COMMAND}
+      COMMAND ${TEST}
+      WORKING_DIRECTORY ${TEST_DIR}
   )
 
-  set_tests_properties(${TEST} PROPERTIES LABELS STABLE)
+  set(ENVIRONMENT
+    TESTNAME=${TEST}
+    "TESTSRC=$<SHELL_PATH:${CMAKE_CURRENT_SOURCE_DIR}>"
+    TIMEBOMB=1000
+    MCAST_ADDR=0.0.0.0 # unused but framework expects
+    MCAST_PORT=0       # unused but framework expects
+    GFE_LOGLEVEL=config
+    GFE_SECLOGLEVEL=config
+    "GF_JAVA=$<SHELL_PATH:${Java_JAVA_EXECUTABLE}>"
+    "GFJAVA=$<SHELL_PATH:${Geode_PATH}>"
+    "GF_CLASSPATH=$<SHELL_PATH:${CMAKE_BINARY_DIR}/tests/javaobject/javaobject.jar>"
+    "${LIBRARY_PATH_ENVIRONMENT_VARIABLE}=$<JOIN:$<SHELL_PATH:${LIBRARY_PATH}>,\\$<SEMICOLON>>"
+  )
+
+  set_tests_properties(${TEST} PROPERTIES
+    ENVIRONMENT "${ENVIRONMENT}"
+  )
+
   add_dependencies(cppcache-integration-tests ${TEST})
 endforeach()
 
@@ -174,94 +183,35 @@
 #TODO this is really bad that we include the root of tests
 include_directories(${CMAKE_SOURCE_DIR}/tests/cpp)
 
-set_tests_properties(testDataOutput
-    testFWHelper
-    testSystemProperties
-    testLogger
-    testLinkage
-    testRegionTemplateArgs
-    testRegionMap
-    testXmlCacheCreationWithRefid
-    testRegionAttributesFactory
-    testXmlCacheCreationWithOverFlow
-    testThinClientRemoveAllLocal
-    testDunit
-    testSpinLock
-    testSubRegions
-  PROPERTIES
-    LABELS "STABLE;QUICK"
-)
-
-set_tests_properties(testOverflowPutGetSqLite 
+set_tests_properties(
+    # flaky
+    testOverflowPutGetSqLite
     testThinClientAfterRegionLive
     testThinClientCacheables
     testThinClientCq
-    testThinClientCqFailover
-    testThinClientCqHAFailover
-    testThinClientDurableConnect
     testThinClientDurableDisconnectNormal
     testThinClientDurableDisconnectTimeout
-    testThinClientDurableFailoverClientClosedNoRedundancy
-    testThinClientDurableFailoverClientNotClosedRedundancy
-    testThinClientDurableKeepAliveFalseTimeout
-    testThinClientDurableKeepAliveTrueNormal
     testThinClientDurableReconnect
-    testThinClientFailover
-    testThinClientFailover2
-    testThinClientFailoverInterest
-    testThinClientFailoverInterest2
-    testThinClientFailoverRegex
-    testThinClientFixedPartitionResolver
-    testThinClientHADistOps
-    testThinClientHAEventIDMap
     testThinClientHAFailover
     testThinClientHAMixedRedundancy
     testThinClientHAQueryFailover
     testThinClientLRUExpiration
-    testThinClientLargePutAllWithCallBackArg
     testThinClientLocatorFailover
-    testThinClientMultiDS
-    testThinClientPRPutAllFailover
     testThinClientPartitionResolver
     testThinClientPdxDeltaWithNotification
     testThinClientPdxTests
-    testThinClientPoolRedundancy
-    testThinClientPoolServer
     testThinClientPutAll
-    testThinClientPutAllPRSingleHop
     testThinClientPutAllWithCallBackArgWithoutConcurrency
-    testThinClientSecurityCQAuthorizationMU
     testThinClientTXFailover
-    testThinClientTransactionsXA
-    testTimedSemaphore
-  PROPERTIES
-    DISABLED TRUE
-    LABELS FLAKY
-)
-
-set_tests_properties(testFwPerf
+    # broken
     testThinClientCqDurable
     testThinClientGatewayTest
-    testThinClientHAFailoverRegex
-    testThinClientPRSingleHop
     testThinClientPoolAttrTest
     testThinClientPoolLocator
-    testThinClientPutWithDelta
-    testThinClientRemoteQueryTimeout
-    testThinClientRemoveOps
-    testThinClientSecurityAuthentication
-    testThinClientSecurityAuthenticationMU
-    testThinClientSecurityAuthorization
-    testThinClientSecurityAuthorizationMU
-    testThinClientSecurityDurableCQAuthorizationMU
+    testThinClientPoolRedundancy
     testThinClientSecurityPostAuthorization
-    testThinClientTicket303
-    testThinClientTicket304
-    testThinClientTracking
-    testThinClientWriterException
   PROPERTIES
     DISABLED TRUE
-   LABELS OMITTED
 )
 
 add_custom_target(run-cppcache-integration-tests
@@ -272,7 +222,7 @@
 add_dependencies(run-cppcache-integration-tests cppcache-integration-tests)
 add_dependencies(run-integration-tests run-cppcache-integration-tests)
 set_target_properties(run-cppcache-integration-tests PROPERTIES
-    EXCLUDE_FROM_ALL TRUE
-    EXCLUDE_FROM_DEFAULT_BUILD TRUE
+  EXCLUDE_FROM_ALL TRUE
+  EXCLUDE_FROM_DEFAULT_BUILD TRUE
 	FOLDER cpp/test/integration
 )
diff --git a/cppcache/integration-test/CacheHelper.cpp b/cppcache/integration-test/CacheHelper.cpp
index 9556337..e694586 100644
--- a/cppcache/integration-test/CacheHelper.cpp
+++ b/cppcache/integration-test/CacheHelper.cpp
@@ -15,14 +15,12 @@
  * limitations under the License.
  */
 
-#include <cstdlib>
 #include <fstream>
-#include <regex>
+#include <iostream>
 #include <list>
 
-#include <ace/OS.h>
-#include <ace/INET_Addr.h>
-#include <ace/SOCK_Acceptor.h>
+#include <boost/process.hpp>
+#include <boost/regex.hpp>
 
 #include <geode/SystemProperties.hpp>
 #include <geode/PoolManager.hpp>
@@ -30,12 +28,13 @@
 #include <geode/RegionShortcut.hpp>
 #include <geode/RegionFactory.hpp>
 
+#include "framework/GfshExecute.h"
+
 #include "CacheRegionHelper.hpp"
 #include "DistributedSystemImpl.hpp"
 #include "TimeBomb.hpp"
 #include "Utils.hpp"
 #include "CacheImpl.hpp"
-#include "config.h"
 
 #include "CacheHelper.hpp"
 #define __DUNIT_NO_MAIN__
@@ -44,6 +43,8 @@
 #include <chrono>
 #include <thread>
 
+#include <boost/asio.hpp>
+
 #ifndef ROOT_NAME
 #define ROOT_NAME "Root"
 #endif
@@ -53,13 +54,9 @@
 #endif
 
 #if defined(WIN32)
-#define GFSH "gfsh.bat"
 #define COPY_COMMAND "copy /y"
-#define DELETE_COMMAND "del /f"
 #define PATH_SEP "\\"
 #else
-#define GFSH "gfsh"
-#define DELETE_COMMAND "rm -f"
 #define PATH_SEP "/"
 #endif
 
@@ -112,16 +109,14 @@
 }
 
 /** rootRegionPtr will still be null... */
-CacheHelper::CacheHelper(const char *, const char *cachexml,
+CacheHelper::CacheHelper(const char *, const std::string &cachexml,
                          const std::shared_ptr<Properties> &configPtr) {
   auto pp = configPtr;
   if (pp == nullptr) {
     pp = Properties::create();
   }
-  if (cachexml != nullptr) {
-    std::string tmpXmlFile(cachexml);
-    std::string newFile;
-    CacheHelper::createDuplicateXMLFile(newFile, tmpXmlFile);
+  if (!cachexml.empty()) {
+    auto newFile = CacheHelper::createDuplicateXMLFile(cachexml);
     pp->insert("cache-xml-file", newFile.c_str());
   }
   auto cacheFactory = CacheFactory(pp);
@@ -209,8 +204,8 @@
   }
 }
 
-CacheHelper::CacheHelper(const bool, const char *poolName, const char *locators,
-                         const char *serverGroup,
+CacheHelper::CacheHelper(const bool, const char *poolName,
+                         const std::string &locators, const char *serverGroup,
                          const std::shared_ptr<Properties> &configPtr,
                          int redundancy, bool clientNotification,
                          int subscriptionAckInterval, int connections,
@@ -229,9 +224,10 @@
 
     poolFactory.setPRSingleHopEnabled(prSingleHop);
     poolFactory.setThreadLocalConnections(threadLocal);
-    printf(" Setting pr-single-hop to prSingleHop = %d ", prSingleHop);
-    printf("Setting threadLocal to %d ", threadLocal);
-    if (locators) {
+    std::cout << " Setting pr-single-hop to prSingleHop = " << prSingleHop
+              << "\n";
+    std::cout << "Setting threadLocal to " << threadLocal << "\n";
+    if (!locators.empty()) {
       addServerLocatorEPs(locators, poolFactory);
       if (serverGroup) {
         poolFactory.setServerGroup(serverGroup);
@@ -244,7 +240,7 @@
       poolFactory.setLoadConditioningInterval(
           std::chrono::milliseconds(loadConditioningInterval));
     }
-    printf("Setting connections to %d ", connections);
+    std::cout << "Setting connections to " << connections << "\n";
     if (connections >= 0) {
       poolFactory.setMinConnections(connections);
       poolFactory.setMaxConnections(connections);
@@ -280,11 +276,6 @@
   disconnect();
 }
 
-void CacheHelper::closePool(const char *poolName, bool keepAlive) {
-  auto pool = getCache()->getPoolManager().find(poolName);
-  pool->destroy(keepAlive);
-}
-
 void CacheHelper::disconnect(bool keepalive) {
   if (cachePtr == nullptr) {
     return;
@@ -354,11 +345,6 @@
 }
 
 void CacheHelper::createDistRegion(const char *regionName,
-                                   std::shared_ptr<Region> &regionPtr) {
-  createDistRegion(regionName, regionPtr, 10);
-}
-
-void CacheHelper::createDistRegion(const char *regionName,
                                    std::shared_ptr<Region> &regionPtr,
                                    uint32_t size) {
   RegionAttributesFactory regionAttributesFactory;
@@ -376,7 +362,7 @@
   return cachePtr->getRegion(name);
 }
 std::shared_ptr<Region> CacheHelper::createRegion(
-    const char *name, bool, bool caching,
+    const std::string &name, bool, bool caching,
     const std::shared_ptr<CacheListener> &listener, bool, bool,
     bool concurrencyCheckEnabled, int32_t) {
   RegionAttributesFactory regionAttributeFactory;
@@ -396,10 +382,10 @@
   return regionPtr;
 }
 std::shared_ptr<Region> CacheHelper::createRegion(
-    const char *name, bool, bool caching, const std::chrono::seconds &ettl,
-    const std::chrono::seconds &eit, const std::chrono::seconds &rttl,
-    const std::chrono::seconds &rit, int lel, ExpirationAction action,
-    const char *, bool) {
+    const std::string &name, bool, bool caching,
+    const std::chrono::seconds &ettl, const std::chrono::seconds &eit,
+    const std::chrono::seconds &rttl, const std::chrono::seconds &rit, int lel,
+    ExpirationAction action, const std::string &, bool) {
   RegionAttributesFactory regionAttributeFactory;
   regionAttributeFactory.setCachingEnabled(caching);
   regionAttributeFactory.setLruEntriesLimit(lel);
@@ -416,15 +402,14 @@
   return regionPtr;
 }
 std::shared_ptr<Pool> CacheHelper::createPool(
-    const std::string &poolName, const char *locators, const char *serverGroup,
-    int redundancy, bool clientNotification,
+    const std::string &poolName, const std::string &locators,
+    const std::string &serverGroup, int redundancy, bool clientNotification,
     std::chrono::milliseconds subscriptionAckInterval, int connections,
     int loadConditioningInterval, bool isMultiuserMode) {
-  // printf(" in createPool isMultiuserMode = %d \n", isMultiuserMode);
   auto poolFac = getCache()->getPoolManager().createFactory();
 
   addServerLocatorEPs(locators, poolFac);
-  if (serverGroup) {
+  if (!serverGroup.empty()) {
     poolFac.setServerGroup(serverGroup);
   }
 
@@ -450,17 +435,17 @@
 
 // this will create pool even endpoints and locatorhost has been not defined
 std::shared_ptr<Pool> CacheHelper::createPool2(
-    const char *poolName, const char *locators, const char *serverGroup,
-    const char *servers, int redundancy, bool clientNotification,
-    int subscriptionAckInterval, int connections) {
+    const std::string &poolName, const std::string &locators,
+    const std::string &serverGroup, const std::string &servers, int redundancy,
+    bool clientNotification, int subscriptionAckInterval, int connections) {
   auto poolFac = getCache()->getPoolManager().createFactory();
 
-  if (servers) {
+  if (!servers.empty()) {
     addServerLocatorEPs(servers, poolFac, false);
     // do region creation with end
-  } else if (locators) {
+  } else if (!locators.empty()) {
     addServerLocatorEPs(locators, poolFac);
-    if (serverGroup) {
+    if (!serverGroup.empty()) {
       poolFac.setServerGroup(serverGroup);
     }
   }
@@ -512,12 +497,13 @@
 }
 
 void CacheHelper::createPoolWithLocators(
-    const std::string &name, const char *locators,
+    const std::string &name, const std::string &locators,
     bool clientNotificationEnabled, int subscriptionRedundancy,
     std::chrono::milliseconds subscriptionAckInterval, int connections,
-    bool isMultiuserMode, const char *serverGroup) {
+    bool isMultiuserMode, const std::string &serverGroup) {
   LOG("createPool() entered.");
-  printf(" in createPoolWithLocators isMultiuserMode = %d\n", isMultiuserMode);
+  std::cout << " in createPoolWithLocators isMultiuserMode = "
+            << isMultiuserMode << "\n";
   auto poolPtr = createPool(name, locators, serverGroup, subscriptionRedundancy,
                             clientNotificationEnabled, subscriptionAckInterval,
                             connections, -1, isMultiuserMode);
@@ -572,8 +558,8 @@
   return regionFactory.create(name);
 }
 
-void CacheHelper::addServerLocatorEPs(const char *epList, PoolFactory &pf,
-                                      bool poolLocators) {
+void CacheHelper::addServerLocatorEPs(const std::string &epList,
+                                      PoolFactory &pf, bool poolLocators) {
   std::unordered_set<std::string> endpointNames;
   Utils::parseEndpointNamesString(epList, endpointNames);
   for (const auto &endpointName : endpointNames) {
@@ -591,8 +577,8 @@
 }
 
 std::shared_ptr<Region> CacheHelper::createPooledRegion(
-    const char *name, bool, const char *locators, const char *poolName,
-    bool caching, bool clientNotificationEnabled,
+    const std::string &name, bool, const std::string &locators,
+    const std::string &poolName, bool caching, bool clientNotificationEnabled,
     const std::chrono::seconds &ettl, const std::chrono::seconds &eit,
     const std::chrono::seconds &rttl, const std::chrono::seconds &rit, int lel,
     const std::shared_ptr<CacheListener> &cacheListener,
@@ -600,7 +586,7 @@
   auto poolFac = getCache()->getPoolManager().createFactory();
   poolFac.setSubscriptionEnabled(clientNotificationEnabled);
 
-  if (locators) {
+  if (!locators.empty()) {
     LOG("adding pool locators");
     addServerLocatorEPs(locators, poolFac);
   }
@@ -630,10 +616,11 @@
   return regionFactory.create(name);
 }
 std::shared_ptr<Region> CacheHelper::createPooledRegionConcurrencyCheckDisabled(
-    const char *name, bool, const char *locators, const char *poolName,
-    bool caching, bool clientNotificationEnabled, bool concurrencyCheckEnabled,
-    const std::chrono::seconds &ettl, const std::chrono::seconds &eit,
-    const std::chrono::seconds &rttl, const std::chrono::seconds &rit, int lel,
+    const std::string &name, bool, const std::string &locators,
+    const std::string &poolName, bool caching, bool clientNotificationEnabled,
+    bool concurrencyCheckEnabled, const std::chrono::seconds &ettl,
+    const std::chrono::seconds &eit, const std::chrono::seconds &rttl,
+    const std::chrono::seconds &rit, int lel,
     const std::shared_ptr<CacheListener> &cacheListener,
     ExpirationAction action) {
   auto poolFac = getCache()->getPoolManager().createFactory();
@@ -668,9 +655,10 @@
   return regionFactory.create(name);
 }
 std::shared_ptr<Region> CacheHelper::createRegionDiscOverFlow(
-    const char *name, bool caching, bool, const std::chrono::seconds &ettl,
-    const std::chrono::seconds &eit, const std::chrono::seconds &rttl,
-    const std::chrono::seconds &rit, int lel, ExpirationAction action) {
+    const std::string &name, bool caching, bool,
+    const std::chrono::seconds &ettl, const std::chrono::seconds &eit,
+    const std::chrono::seconds &rttl, const std::chrono::seconds &rit, int lel,
+    ExpirationAction action) {
   RegionAttributesFactory regionAttributeFactory;
   regionAttributeFactory.setCachingEnabled(caching);
   regionAttributeFactory.setLruEntriesLimit(lel);
@@ -685,7 +673,7 @@
     sqLiteProps->insert("PageSize", "65536");
     sqLiteProps->insert("MaxPageCount", "1073741823");
     std::string sqlite_dir =
-        "SqLiteRegionData" + std::to_string(ACE_OS::getpid());
+        "SqLiteRegionData" + std::to_string(boost::this_process::get_id());
     sqLiteProps->insert("PersistenceDirectory", sqlite_dir.c_str());
     regionAttributeFactory.setPersistenceManager(
         "SqLiteImpl", "createSqLiteInstance", sqLiteProps);
@@ -698,8 +686,8 @@
   return regionPtr;
 }
 std::shared_ptr<Region> CacheHelper::createPooledRegionDiscOverFlow(
-    const char *name, bool, const char *locators, const char *poolName,
-    bool caching, bool clientNotificationEnabled,
+    const std::string &name, bool, const std::string &locators,
+    const std::string &poolName, bool caching, bool clientNotificationEnabled,
     const std::chrono::seconds &ettl, const std::chrono::seconds &eit,
     const std::chrono::seconds &rttl, const std::chrono::seconds &rit, int lel,
     const std::shared_ptr<CacheListener> &cacheListener,
@@ -707,7 +695,7 @@
   auto poolFac = getCache()->getPoolManager().createFactory();
   poolFac.setSubscriptionEnabled(clientNotificationEnabled);
 
-  if (locators)  // with locator
+  if (!locators.empty())  // with locator
   {
     LOG("adding pool locators");
     addServerLocatorEPs(locators, poolFac);
@@ -742,7 +730,7 @@
     sqLiteProps->insert("PageSize", "65536");
     sqLiteProps->insert("MaxPageCount", "1073741823");
     std::string sqlite_dir =
-        "SqLiteRegionData" + std::to_string(ACE_OS::getpid());
+        "SqLiteRegionData" + std::to_string(boost::this_process::get_id());
     sqLiteProps->insert("PersistenceDirectory", sqlite_dir.c_str());
     regionFactory.setPersistenceManager("SqLiteImpl", "createSqLiteInstance",
                                         sqLiteProps);
@@ -752,9 +740,10 @@
   }
   return regionFactory.create(name);
 }
+
 std::shared_ptr<Region> CacheHelper::createPooledRegionSticky(
-    const char *name, bool, const char *locators, const char *poolName,
-    bool caching, bool clientNotificationEnabled,
+    const std::string &name, bool, const std::string &locators,
+    const std::string &poolName, bool caching, bool clientNotificationEnabled,
     const std::chrono::seconds &ettl, const std::chrono::seconds &eit,
     const std::chrono::seconds &rttl, const std::chrono::seconds &rit, int lel,
     const std::shared_ptr<CacheListener> &cacheListener,
@@ -794,8 +783,8 @@
   return regionFactory.create(name);
 }
 std::shared_ptr<Region> CacheHelper::createPooledRegionStickySingleHop(
-    const char *name, bool, const char *locators, const char *poolName,
-    bool caching, bool clientNotificationEnabled,
+    const std::string &name, bool, const std::string &locators,
+    const std::string &poolName, bool caching, bool clientNotificationEnabled,
     const std::chrono::seconds &ettl, const std::chrono::seconds &eit,
     const std::chrono::seconds &rttl, const std::chrono::seconds &rit, int lel,
     const std::shared_ptr<CacheListener> &cacheListener,
@@ -853,276 +842,161 @@
 
 void CacheHelper::showKeys(
     std::vector<std::shared_ptr<CacheableKey>> &vecKeys) {
-  fprintf(stdout, "vecKeys.size() = %zd\n", vecKeys.size());
+  std::cout << "vecKeys.size() = " << vecKeys.size() << "\n";
   for (size_t i = 0; i < vecKeys.size(); i++) {
-    fprintf(stdout, "key[%zd] - %s\n", i, vecKeys.at(i)->toString().c_str());
+    std::cout << "key[" << i << "] -" << vecKeys.at(i)->toString() << "\n";
   }
-  fflush(stdout);
+  std::cout << std::flush;
 }
 
 void CacheHelper::showRegionAttributes(RegionAttributes attributes) {
-  printf("caching=%s\n", attributes.getCachingEnabled() ? "true" : "false");
-  printf("Entry Time To Live = %s\n",
-         to_string(attributes.getEntryTimeToLive()).c_str());
-  printf("Entry Idle Timeout = %s\n",
-         to_string(attributes.getEntryIdleTimeout()).c_str());
-  printf("Region Time To Live = %s\n",
-         to_string(attributes.getRegionTimeToLive()).c_str());
-  printf("Region Idle Timeout = %s\n",
-         to_string(attributes.getRegionIdleTimeout()).c_str());
-  printf("Initial Capacity = %d\n", attributes.getInitialCapacity());
-  printf("Load Factor = %f\n", attributes.getLoadFactor());
-  printf("End Points = %s\n", attributes.getEndpoints().c_str());
+  std::cout << "caching=" << (attributes.getCachingEnabled() ? "true" : "false")
+            << "\n";
+  std::cout << "Entry Time To Live = "
+            << to_string(attributes.getEntryTimeToLive()) << "\n";
+  std::cout << "Entry Idle Timeout = "
+            << to_string(attributes.getEntryIdleTimeout()) << "\n";
+  std::cout << "Region Time To Live = "
+            << to_string(attributes.getRegionTimeToLive()) << "\n";
+  std::cout << "Region Idle Timeout = "
+            << to_string(attributes.getRegionIdleTimeout()) << "\n";
+  std::cout << "Initial Capacity = " << attributes.getInitialCapacity() << "\n";
+  std::cout << "Load Factor = " << attributes.getLoadFactor() << "\n";
+  std::cout << "End Points = " << attributes.getEndpoints() << "\n";
 }
+
 std::shared_ptr<QueryService> CacheHelper::getQueryService() {
   return cachePtr->getQueryService();
 }
 
 const std::string CacheHelper::getTcrEndpoints(bool &isLocalServer,
                                                int numberOfServers) {
-  static char *gfjavaenv = ACE_OS::getenv("GFJAVA");
-  std::string gfendpoints;
   static bool gflocalserver = false;
-  char tmp[100];
+  static const auto gfjavaenv = Utils::getEnv("GFJAVA");
 
-  if (gfendpoints.empty()) {
-    ASSERT(gfjavaenv != nullptr,
-           "Environment variable GFJAVA for java build directory is not set.");
-    if ((ACE_OS::strchr(gfjavaenv, '\\') != nullptr) ||
-        (ACE_OS::strchr(gfjavaenv, '/') != nullptr)) {
-      gflocalserver = true;
-      /* Support for multiple servers Max = 10*/
-      switch (numberOfServers) {
-        case 1:
-          // gfendpoints = "localhost:24680";
-          {
-            gfendpoints = "localhost:";
-            sprintf(tmp, "%d", CacheHelper::staticHostPort1);
-            gfendpoints += tmp;
-          }
-          break;
-        case 2:
-          // gfendpoints = "localhost:24680,localhost:24681";
-          {
-            gfendpoints = "localhost:";
-            sprintf(tmp, "%d", CacheHelper::staticHostPort1);
-            gfendpoints += tmp;
-            gfendpoints += ",localhost:";
-            sprintf(tmp, "%d", CacheHelper::staticHostPort2);
-            gfendpoints += tmp;
-          }
-          break;
-        case 3:
-          // gfendpoints = "localhost:24680,localhost:24681,localhost:24682";
-          {
-            gfendpoints = "localhost:";
-            sprintf(tmp, "%d", CacheHelper::staticHostPort1);
-            gfendpoints += tmp;
-            gfendpoints += ",localhost:";
-            sprintf(tmp, "%d", CacheHelper::staticHostPort2);
-            gfendpoints += tmp;
-            gfendpoints += ",localhost:";
-            sprintf(tmp, "%d", CacheHelper::staticHostPort3);
-            gfendpoints += tmp;
-          }
-          break;
-        default:
-          // ASSERT( ( numberOfServers <= 10 )," More than 10 servers not
-          // supported");
-          // TODO: need to support more servers, need to generate random ports
-          // here
-          ASSERT((numberOfServers <= 4), " More than 4 servers not supported");
+  ASSERT(!gfjavaenv.empty(),
+         "Environment variable GFJAVA for java build directory is not set.");
+
+  std::string gfendpoints;
+  if (gfjavaenv.find(PATH_SEP) != std::string::npos) {
+    gflocalserver = true;
+    /* Support for multiple servers Max = 10*/
+    switch (numberOfServers) {
+      case 1:
+        // gfendpoints = "localhost:24680";
+        {
           gfendpoints = "localhost:";
-          sprintf(tmp, "%d", CacheHelper::staticHostPort1);
-          gfendpoints += tmp;
+          gfendpoints += std::to_string(CacheHelper::staticHostPort1);
+        }
+        break;
+      case 2:
+        // gfendpoints = "localhost:24680,localhost:24681";
+        {
+          gfendpoints = "localhost:";
+          gfendpoints += std::to_string(CacheHelper::staticHostPort1);
           gfendpoints += ",localhost:";
-          sprintf(tmp, "%d", CacheHelper::staticHostPort2);
-          gfendpoints += tmp;
+          gfendpoints += std::to_string(CacheHelper::staticHostPort2);
+        }
+        break;
+      case 3:
+        // gfendpoints = "localhost:24680,localhost:24681,localhost:24682";
+        {
+          gfendpoints = "localhost:";
+          gfendpoints += std::to_string(CacheHelper::staticHostPort1);
           gfendpoints += ",localhost:";
-          sprintf(tmp, "%d", CacheHelper::staticHostPort3);
-          gfendpoints += tmp;
+          gfendpoints += std::to_string(CacheHelper::staticHostPort2);
           gfendpoints += ",localhost:";
-          sprintf(tmp, "%d", CacheHelper::staticHostPort4);
-          gfendpoints += tmp;
-          /*gfendpoints = "localhost:24680";
-          char temp[8];
-          for(int i =1; i <= numberOfServers - 1; i++) {
-           gfendpoints += ",localhost:2468";
-           gfendpoints += ACE_OS::itoa(i,temp,10);
-          }*/
-          break;
-      }
-    } else {
-      gfendpoints = gfjavaenv;
+          gfendpoints += std::to_string(CacheHelper::staticHostPort3);
+        }
+        break;
+      default:
+        // ASSERT( ( numberOfServers <= 10 )," More than 10 servers not
+        // supported");
+        // TODO: need to support more servers, need to generate random ports
+        // here
+        ASSERT((numberOfServers <= 4), " More than 4 servers not supported");
+        gfendpoints = "localhost:";
+        gfendpoints += std::to_string(CacheHelper::staticHostPort1);
+        gfendpoints += ",localhost:";
+        gfendpoints += std::to_string(CacheHelper::staticHostPort2);
+        gfendpoints += ",localhost:";
+        gfendpoints += std::to_string(CacheHelper::staticHostPort3);
+        gfendpoints += ",localhost:";
+        gfendpoints += std::to_string(CacheHelper::staticHostPort4);
+        break;
     }
+  } else {
+    gfendpoints = gfjavaenv;
   }
+
   isLocalServer = gflocalserver;
-  printf("getHostPort :: %s \n", gfendpoints.c_str());
-  return (gfendpoints);
+  std::cout << "getHostPort :: " << gfendpoints << "\n";
+
+  return gfendpoints;
 }
 
-const char *CacheHelper::getstaticLocatorHostPort1() {
+std::string CacheHelper::getstaticLocatorHostPort1() {
   return getLocatorHostPort(staticLocatorHostPort1);
 }
 
-const char *CacheHelper::getstaticLocatorHostPort2() {
+std::string CacheHelper::getstaticLocatorHostPort2() {
   return getLocatorHostPort(staticLocatorHostPort2);
 }
 
-const char *CacheHelper::getLocatorHostPort(int locPort) {
-  char tmp[128];
-  std::string gfendpoints;
-  gfendpoints = "localhost:";
-  sprintf(tmp, "%d", locPort);
-  gfendpoints += tmp;
-  return (new std::string(gfendpoints.c_str()))->c_str();
-  ;
+std::string CacheHelper::getLocatorHostPort(int locPort) {
+  return "localhost:" + std::to_string(locPort);
 }
 
-const std::string CacheHelper::getTcrEndpoints2(bool &isLocalServer,
-                                                int numberOfServers) {
-  static char *gfjavaenv = ACE_OS::getenv("GFJAVA");
-  std::string gfendpoints;
-  static bool gflocalserver = false;
-  char tmp[128];
-
-  if (gfendpoints.empty()) {
-    if ((ACE_OS::strchr(gfjavaenv, '\\') != nullptr) ||
-        (ACE_OS::strchr(gfjavaenv, '/') != nullptr)) {
-      gflocalserver = true;
-      /* Support for multiple servers Max = 10*/
-      switch (numberOfServers) {
-        case 1:
-          // gfendpoints = "localhost:24680";
-          {
-            gfendpoints = "localhost:";
-            sprintf(tmp, "%d", CacheHelper::staticHostPort1);
-            gfendpoints += tmp;
-          }
-          break;
-        case 2:
-          // gfendpoints = "localhost:24680,localhost:24681";
-          {
-            gfendpoints = "localhost:";
-            sprintf(tmp, "%d", CacheHelper::staticHostPort1);
-            gfendpoints += tmp;
-            gfendpoints += ",localhost:";
-            sprintf(tmp, "%d", CacheHelper::staticHostPort2);
-            gfendpoints += tmp;
-          }
-          break;
-        case 3:
-          // gfendpoints = "localhost:24680,localhost:24681,localhost:24682";
-          {
-            gfendpoints = "localhost:";
-            sprintf(tmp, "%d", CacheHelper::staticHostPort1);
-            gfendpoints += tmp;
-            gfendpoints += ",localhost:";
-            sprintf(tmp, "%d", CacheHelper::staticHostPort2);
-            gfendpoints += tmp;
-            gfendpoints += ",localhost:";
-            sprintf(tmp, "%d", CacheHelper::staticHostPort3);
-            gfendpoints += tmp;
-          }
-          break;
-        case 4:
-          // gfendpoints =
-          // "localhost:24680,localhost:24681,localhost:24682,localhost:24683";
-          {
-            gfendpoints = "localhost:";
-            sprintf(tmp, "%d", CacheHelper::staticHostPort1);
-            gfendpoints += tmp;
-            gfendpoints += ",localhost:";
-            sprintf(tmp, "%d", CacheHelper::staticHostPort2);
-            gfendpoints += tmp;
-            gfendpoints += ",localhost:";
-            sprintf(tmp, "%d", CacheHelper::staticHostPort3);
-            gfendpoints += tmp;
-            gfendpoints += ",localhost:";
-            sprintf(tmp, "%d", CacheHelper::staticHostPort4);
-            gfendpoints += tmp;
-          }
-          break;
-        default:
-          ASSERT((numberOfServers <= 10),
-                 " More than 10 servers not supported");
-          gfendpoints = "localhost:24680";
-          char temp[8];
-          for (int i = 1; i <= numberOfServers - 1; i++) {
-            gfendpoints += ",localhost:2468";
-            gfendpoints += ACE_OS::itoa(i, temp, 10);
-          }
-          break;
-      }
-    } else {
-      gfendpoints = gfjavaenv;
-    }
-  }
-  ASSERT(gfjavaenv != nullptr,
-         "Environment variable GFJAVA for java build directory is not set.");
-  isLocalServer = gflocalserver;
-  return (gfendpoints);
-}
-
-const char *CacheHelper::getLocatorHostPort(bool &isLocator,
+std::string CacheHelper::getLocatorHostPort(bool &isLocator,
                                             bool &isLocalServer,
                                             int numberOfLocators) {
-  static char *gfjavaenv = ACE_OS::getenv("GFJAVA");
-  static std::string gflchostport;
+  static const auto gfjavaenv = Utils::getEnv("GFJAVA");
   static bool gflocator = false;
   static bool gflocalserver = false;
-  char tmp[100];
 
-  if (gflchostport.empty()) {
-    if ((ACE_OS::strchr(gfjavaenv, '\\') != nullptr) ||
-        (ACE_OS::strchr(gfjavaenv, '/') != nullptr)) {
-      gflocator = true;
-      gflocalserver = true;
-      switch (numberOfLocators) {
-        case 1:
-          // gflchostport = "localhost:34756";
-          {
-            gflchostport = "localhost:";
-            sprintf(tmp, "%d", CacheHelper::staticLocatorHostPort1);
-            gflchostport += tmp;
-          }
-          break;
-        case 2:
-          // gflchostport = "localhost:34756,localhost:34757";
-          {
-            gflchostport = "localhost:";
-            sprintf(tmp, "%d", CacheHelper::staticLocatorHostPort1);
-            gflchostport += tmp;
-            sprintf(tmp, "%d", CacheHelper::staticLocatorHostPort2);
-            gflchostport += ",localhost:";
-            gflchostport += tmp;
-          }
-          break;
-        default:
-          // gflchostport = "localhost:34756,localhost:34757,localhost:34758";
-          {
-            gflchostport = "localhost:";
-            sprintf(tmp, "%d", CacheHelper::staticLocatorHostPort1);
-            gflchostport += tmp;
-            sprintf(tmp, "%d", CacheHelper::staticLocatorHostPort2);
-            gflchostport += ",localhost:";
-            gflchostport += tmp;
-            sprintf(tmp, "%d", CacheHelper::staticLocatorHostPort3);
-            gflchostport += ",localhost:";
-            gflchostport += tmp;
-          }
-          break;
-      }
-    } else {
-      gflchostport = "";
+  ASSERT(!gfjavaenv.empty(),
+         "Environment variable GFJAVA for java build directory is not set.");
+
+  std::string gflchostport;
+  if (gfjavaenv.find(PATH_SEP) != std::string::npos) {
+    gflocator = true;
+    gflocalserver = true;
+    switch (numberOfLocators) {
+      case 1:
+        // gflchostport = "localhost:34756";
+        {
+          gflchostport = "localhost:";
+          gflchostport += std::to_string(CacheHelper::staticLocatorHostPort1);
+        }
+        break;
+      case 2:
+        // gflchostport = "localhost:34756,localhost:34757";
+        {
+          gflchostport = "localhost:";
+          gflchostport += std::to_string(CacheHelper::staticLocatorHostPort1);
+          gflchostport += ",localhost:";
+          gflchostport += std::to_string(CacheHelper::staticLocatorHostPort2);
+        }
+        break;
+      default:
+        // gflchostport = "localhost:34756,localhost:34757,localhost:34758";
+        {
+          gflchostport = "localhost:";
+          gflchostport += std::to_string(CacheHelper::staticLocatorHostPort1);
+          gflchostport += ",localhost:";
+          gflchostport += std::to_string(CacheHelper::staticLocatorHostPort2);
+          gflchostport += ",localhost:";
+          gflchostport += std::to_string(CacheHelper::staticLocatorHostPort3);
+        }
+        break;
     }
   }
-  ASSERT(gfjavaenv != nullptr,
-         "Environment variable GFJAVA for java build directory is not set.");
+
   isLocator = gflocator;
   isLocalServer = gflocalserver;
-  printf("getLocatorHostPort  :: %s  \n", gflchostport.c_str());
-  return gflchostport.c_str();
+  std::cout << "getLocatorHostPort  :: " << gflchostport << "\n";
+
+  return gflchostport;
 }
 
 void CacheHelper::cleanupServerInstances() {
@@ -1136,56 +1010,44 @@
     }
   }
 }
-void CacheHelper::initServer(int instance, const char *xml,
-                             const char *locHostport, const char *authParam,
-                             bool ssl, bool enableDelta, bool multiDS,
-                             bool testServerGC, bool untrustedCert,
-                             bool useSecurityManager) {
-  if (!isServerCleanupCallbackRegistered &&
-      gClientCleanup.registerCallback(&CacheHelper::cleanupServerInstances)) {
+void CacheHelper::initServer(int instance, const std::string &xml,
+                             const std::string &locHostport,
+                             const char * /*unused*/, bool ssl,
+                             bool enableDelta, bool, bool testServerGC,
+                             bool untrustedCert, bool useSecurityManager) {
+  if (!isServerCleanupCallbackRegistered) {
     isServerCleanupCallbackRegistered = true;
-    printf("TimeBomb registered server cleanupcallback \n");
-  }
-  printf("Inside initServer added\n");
-  if (authParam != nullptr) {
-    printf("Inside initServer with authParam = %s\n", authParam);
-  } else {
-    printf("Inside initServer with authParam as nullptr\n");
-    authParam = "";
-  }
-  static const char *gfjavaenv = ACE_OS::getenv("GFJAVA");
-  static const char *gfLogLevel = ACE_OS::getenv("GFE_LOGLEVEL");
-  static const char *gfSecLogLevel = ACE_OS::getenv("GFE_SECLOGLEVEL");
-  static const char *path = ACE_OS::getenv("TESTSRC");
-  static const char *mcastPort = ACE_OS::getenv("MCAST_PORT");
-  static const char *mcastAddr = ACE_OS::getenv("MCAST_ADDR");
-  static char *classpath = ACE_OS::getenv("GF_CLASSPATH");
+    gClientCleanup.registerCallback(
+        []() { CacheHelper::cleanupServerInstances(); });
 
-  char cmd[2048];
-  char tmp[128];
-  char currWDPath[2048];
+    std::cout << "TimeBomb registered server cleanupcallback \n";
+  }
+
+  std::cout << "Inside initServer added\n";
+
+  static const auto gfjavaenv = Utils::getEnv("GFJAVA");
+  static auto gfLogLevel = Utils::getEnv("GFE_LOGLEVEL");
+  static auto gfSecLogLevel = Utils::getEnv("GFE_SECLOGLEVEL");
+  static const auto path = Utils::getEnv("TESTSRC");
+  static const auto classpath = Utils::getEnv("GF_CLASSPATH");
+
   int portNum = 0;
-  std::string currDir = ACE_OS::getcwd(currWDPath, 2048);
+  std::string currDir = boost::filesystem::current_path().string();
 
-  ASSERT(gfjavaenv != nullptr,
+  ASSERT(!gfjavaenv.empty(),
          "Environment variable GFJAVA for java build directory is not set.");
-  ASSERT(path != nullptr,
+  ASSERT(!path.empty(),
          "Environment variable TESTSRC for test source directory is not set.");
-  ASSERT(mcastPort != nullptr,
-         "Environment variable MCAST_PORT for multicast port is not set.");
-  ASSERT(mcastAddr != nullptr,
-         "Environment variable MCAST_ADDR for multicast address is not set.");
-  ASSERT(!currDir.empty(),
-         "Current working directory could not be determined.");
-  if (gfLogLevel == nullptr || gfLogLevel[0] == '\0') {
+
+  if (gfLogLevel.empty()) {
     gfLogLevel = "config";
   }
-  if (gfSecLogLevel == nullptr || gfSecLogLevel[0] == '\0') {
+
+  if (gfSecLogLevel.empty()) {
     gfSecLogLevel = "config";
   }
 
-  if ((ACE_OS::strchr(gfjavaenv, '\\') == nullptr) &&
-      (ACE_OS::strchr(gfjavaenv, '/') == nullptr)) {
+  if (gfjavaenv.find(PATH_SEP) == std::string::npos) {
     return;
   }
 
@@ -1197,177 +1059,121 @@
     case 0:
       // note: this need to take for multiple tests run
       xmlFile += "cacheserver.xml";
-      sname += "0";
-      if (multiDS) {
-        mcastPort = "5431";
-        mcastAddr = "224.10.11.";
-      }
       break;
     case 1:
       xmlFile += "cacheserver.xml";
-      sprintf(tmp, "%d", CacheHelper::staticHostPort1);
-      sname += tmp;  // sname += "1";
       portNum = CacheHelper::staticHostPort1;
-
-      if (multiDS) {
-        mcastPort = "5431";
-        mcastAddr = "224.10.11.";
-      }
       break;
     case 2:
       xmlFile += "cacheserver2.xml";
-      sprintf(tmp, "%d", CacheHelper::staticHostPort2);
-      sname += tmp;  // sname += "3";
       portNum = CacheHelper::staticHostPort2;
-      // sname += "2";
-      if (multiDS) {
-        mcastPort = "5431";
-        mcastAddr = "224.10.11.";
-      }
       break;
     case 3:
       xmlFile += "cacheserver3.xml";
-      sprintf(tmp, "%d", CacheHelper::staticHostPort3);
-      sname += tmp;  // sname += "3";
       portNum = CacheHelper::staticHostPort3;
-      // sname += "3";
-      if (multiDS) {
-        mcastPort = "5433";
-        mcastAddr = "224.10.11.";
-      }
       break;
     case 4:
       xmlFile += "cacheserver4.xml";
-      // sname += "4";
-      sprintf(tmp, "%d", CacheHelper::staticHostPort4);
-      sname += tmp;  // sname += "3";
       portNum = CacheHelper::staticHostPort4;
-      if (multiDS) {
-        mcastPort = "5433";
-        mcastAddr = "224.10.11.";
-      }
       break;
     default: /* Support for any number of servers Max 10*/
       ASSERT((instance <= 10), " More than 10 servers not supported");
-      ASSERT(xml != nullptr,
+      ASSERT(!xml.empty(),
              "xml == nullptr : For server instance > 3 xml file is must");
-      char temp[8];
       portNum = CacheHelper::staticHostPort4;
-      sname += ACE_OS::itoa(CacheHelper::staticHostPort4, temp, 10);
       break;
   }
 
+  sname += std::to_string(portNum);
   currDir += sname;
 
-  if (xml != nullptr) {
+  if (!xml.empty()) {
     xmlFile = xml;
   }
 
   std::string xmlFile_new;
-  printf(" xml file name = %s \n", xmlFile.c_str());
-  CacheHelper::createDuplicateXMLFile(xmlFile_new, xmlFile);
+  std::cout << " xml file name = " << xmlFile << "\n";
+  xmlFile = CacheHelper::createDuplicateXMLFile(xmlFile);
 
-  xmlFile = xmlFile_new;
+  std::cout << "  creating dir = " << sname << "\n";
+  boost::filesystem::create_directory(sname);
 
-  printf("  creating dir = %s \n", sname.c_str());
-  ACE_OS::mkdir(sname.c_str());
-
-  sprintf(cmd, "%s/bin/%s stop server --dir=%s 2>&1", gfjavaenv, GFSH,
-          currDir.c_str());
-
-  LOG(cmd);
-  ACE_OS::system(cmd);
-  std::string deltaProperty = "";
-  if (!enableDelta) {
-    deltaProperty = "delta-propagation=false";
-  }
   int64_t defaultTombstone_timeout = 600000;
   int64_t defaultTombstone_gc_threshold = 100000;
   int64_t userTombstone_timeout = 1000;
   int64_t userTombstone_gc_threshold = 10;
   if (testServerGC) {
-    ACE_OS::mkdir("backupDirectory1");
-    ACE_OS::mkdir("backupDirectory2");
-    ACE_OS::mkdir("backupDirectory3");
-    ACE_OS::mkdir("backupDirectory4");
+    boost::filesystem::create_directory("backupDirectory1");
+    boost::filesystem::create_directory("backupDirectory2");
+    boost::filesystem::create_directory("backupDirectory3");
+    boost::filesystem::create_directory("backupDirectory4");
   }
 
-  if (locHostport != nullptr) {  // check number of locator host port.
-    std::string geodeProperties = generateGeodeProperties(
-        currDir, ssl, -1, 0, untrustedCert, useSecurityManager);
+  GfshExecute gfsh;
+  auto server =
+      gfsh.start()
+          .server()
+          .withClasspath(classpath)
+          .withName(sname)
+          .withCacheXMLFile(xmlFile)
+          .withDir(currDir)
+          .withPort(portNum)
+          .withLogLevel(gfLogLevel)
+          .withMaxHeap("1g")
+          .withSystemProperty(
+              "gemfire.tombstone-timeout",
+              std::to_string(testServerGC ? userTombstone_timeout
+                                          : defaultTombstone_timeout))
+          .withSystemProperty(
+              "gemfire.tombstone-gc-threshold",
+              std::to_string(testServerGC ? userTombstone_gc_threshold
+                                          : defaultTombstone_gc_threshold))
+          .withSystemProperty("gemfire.security-log-level", gfSecLogLevel);
 
-    sprintf(
-        cmd,
-        "%s/bin/%s start server --classpath=%s --name=%s "
-        "--cache-xml-file=%s %s --dir=%s --server-port=%d --log-level=%s "
-        "--properties-file=%s %s %s "
-        "--J=-Dgemfire.tombstone-timeout=%" PRId64
-        " "
-        "--J=-Dgemfire.tombstone-gc-hreshold=%" PRId64
-        " "
-        "--J=-Dgemfire.security-log-level=%s --J=-Xmx1024m --J=-Xms128m 2>&1",
-        gfjavaenv, GFSH, classpath, sname.c_str(), xmlFile.c_str(),
-        useSecurityManager ? "--user=root --password=root-password" : "",
-        currDir.c_str(), portNum, gfLogLevel, geodeProperties.c_str(),
-        authParam, deltaProperty.c_str(),
-        testServerGC ? userTombstone_timeout : defaultTombstone_timeout,
-        testServerGC ? userTombstone_gc_threshold
-                     : defaultTombstone_gc_threshold,
-        gfSecLogLevel);
-  } else {
-    sprintf(
-        cmd,
-        "%s/bin/%s start server --classpath=%s --name=%s "
-        "--cache-xml-file=%s %s --dir=%s --server-port=%d --log-level=%s %s %s "
-        "--J=-Dgemfire.tombstone-timeout=%" PRId64
-        " "
-        "--J=-Dgemfire.tombstone-gc-hreshold=%" PRId64
-        " "
-        "--J=-Dgemfire.security-log-level=%s --J=-Xmx1024m --J=-Xms128m 2>&1",
-        gfjavaenv, GFSH, classpath, sname.c_str(), xmlFile.c_str(),
-        useSecurityManager ? "--user=root --password=root-password" : "",
-        currDir.c_str(), portNum, gfLogLevel, authParam, deltaProperty.c_str(),
-        testServerGC ? userTombstone_timeout : defaultTombstone_timeout,
-        testServerGC ? userTombstone_gc_threshold
-                     : defaultTombstone_gc_threshold,
-        gfSecLogLevel);
+  if (useSecurityManager) {
+    server.withUser("root").withPassword("root-password");
   }
 
-  LOG(cmd);
-  int e = ACE_OS::system(cmd);
-  ASSERT(0 == e, "cmd failed");
+  if (!locHostport.empty()) {
+    server.withPropertiesFile(generateGeodeProperties(
+        currDir, ssl, -1, 0, untrustedCert, useSecurityManager));
+  }
+
+  if (!enableDelta) {
+    server.withSystemProperty("gemfire.delta-propagation", "false");
+  }
+
+  server.execute();
 
   staticServerInstanceList.push_back(instance);
-  printf("added server instance %d\n", instance);
+  std::cout << "added server instance " << instance << "\n";
 }
 
-void CacheHelper::createDuplicateXMLFile(std::string &originalFile,
-                                         int hostport1, int hostport2,
-                                         int locport1, int locport2) {
-  char cmd[1024];
-  char currWDPath[2048];
-  std::string currDir = ACE_OS::getcwd(currWDPath, 2048);
-  currDir += PATH_SEP;
-  std::string testSrc = ACE_OS::getenv("TESTSRC");
-  testSrc += PATH_SEP;
-  testSrc += "resources";
-  testSrc += PATH_SEP;
+std::string CacheHelper::createDuplicateXMLFile(const std::string &source,
+                                                int hostport1, int hostport2,
+                                                int locport1, int locport2) {
+  std::string dest = boost::filesystem::current_path().string();
+  dest += PATH_SEP;
+  dest += boost::filesystem::path{source}.filename().stem().string();
+  dest += '.';
+  dest += std::to_string(hostport1);
+  dest += ".xml";
 
-  // file name will have hostport1.xml(i.e. CacheHelper::staticHostPort1) as
-  // suffix
+  std::string src = Utils::getEnv("TESTSRC");
+  src += PATH_SEP;
+  src += "resources";
+  src += PATH_SEP;
+  src += source;
 
-  replacePortsInFile(
-      hostport1, hostport2, CacheHelper::staticHostPort3,
-      CacheHelper::staticHostPort4, locport1, locport2, testSrc + originalFile,
-      currDir + originalFile + std::to_string(hostport1) + ".xml");
+  replacePortsInFile(hostport1, hostport2, CacheHelper::staticHostPort3,
+                     CacheHelper::staticHostPort4, locport1, locport2, src,
+                     dest);
 
-  // this file need to delete
-  sprintf(cmd, "%s%s%d.xml", currDir.c_str(), originalFile.c_str(), hostport1);
-  std::string s(cmd);
-  CacheHelper::staticConfigFileList.push_back(s);
+  CacheHelper::staticConfigFileList.push_back(dest);
+  std::cout << "createDuplicateXMLFile added file " << dest.c_str() << " "
+            << CacheHelper::staticConfigFileList.size() << "\n";
 
-  printf("createDuplicateXMLFile added file %s %zd", cmd,
-         CacheHelper::staticConfigFileList.size());
+  return dest;
 }
 
 // Need to avoid regex usage in Solaris Studio 12.4.
@@ -1411,25 +1217,25 @@
                                      int hostPort3, int hostPort4, int locPort1,
                                      int locPort2, const std::string &inFile,
                                      const std::string &outFile) {
-  std::ifstream in(inFile, std::ios::in | std::ios::binary);
+  std::ifstream in(inFile, std::ios::in);
   if (in) {
     std::string contents;
     contents.assign(std::istreambuf_iterator<char>(in),
                     std::istreambuf_iterator<char>());
     in.close();
 
-    contents = std::regex_replace(contents, std::regex("HOST_PORT1"),
-                                  std::to_string(hostPort1));
-    contents = std::regex_replace(contents, std::regex("HOST_PORT2"),
-                                  std::to_string(hostPort2));
-    contents = std::regex_replace(contents, std::regex("HOST_PORT3"),
-                                  std::to_string(hostPort3));
-    contents = std::regex_replace(contents, std::regex("HOST_PORT4"),
-                                  std::to_string(hostPort4));
-    contents = std::regex_replace(contents, std::regex("LOC_PORT1"),
-                                  std::to_string(locPort1));
-    contents = std::regex_replace(contents, std::regex("LOC_PORT2"),
-                                  std::to_string(locPort2));
+    contents = boost::regex_replace(contents, boost::regex("HOST_PORT1"),
+                                    std::to_string(hostPort1));
+    contents = boost::regex_replace(contents, boost::regex("HOST_PORT2"),
+                                    std::to_string(hostPort2));
+    contents = boost::regex_replace(contents, boost::regex("HOST_PORT3"),
+                                    std::to_string(hostPort3));
+    contents = boost::regex_replace(contents, boost::regex("HOST_PORT4"),
+                                    std::to_string(hostPort4));
+    contents = boost::regex_replace(contents, boost::regex("LOC_PORT1"),
+                                    std::to_string(locPort1));
+    contents = boost::regex_replace(contents, boost::regex("LOC_PORT2"),
+                                    std::to_string(locPort2));
 
     std::ofstream out(outFile, std::ios::out);
     out << contents;
@@ -1438,38 +1244,22 @@
 }
 #endif
 
-void CacheHelper::createDuplicateXMLFile(std::string &duplicateFile,
-                                         std::string &originalFile) {
-  CacheHelper::createDuplicateXMLFile(
-      originalFile, CacheHelper::staticHostPort1, CacheHelper::staticHostPort2,
+std::string CacheHelper::createDuplicateXMLFile(const std::string &source) {
+  return CacheHelper::createDuplicateXMLFile(
+      source, CacheHelper::staticHostPort1, CacheHelper::staticHostPort2,
       CacheHelper::staticLocatorHostPort1, CacheHelper::staticLocatorHostPort2);
-
-  char tmp[32];
-
-  sprintf(tmp, "%d.xml", CacheHelper::staticHostPort1);
-
-  char currWDPath[2048];
-  duplicateFile = ACE_OS::getcwd(currWDPath, 2048);
-  duplicateFile += PATH_SEP;
-  duplicateFile += originalFile + tmp;
 }
 
 void CacheHelper::closeServer(int instance) {
-  static char *gfjavaenv = ACE_OS::getenv("GFJAVA");
+  static const auto gfjavaenv = Utils::getEnv("GFJAVA");
+  std::string currDir = boost::filesystem::current_path().string();
 
-  char cmd[2048];
-  char tmp[128];
-  char currWDPath[2048];
-
-  std::string currDir = ACE_OS::getcwd(currWDPath, 2048);
-
-  ASSERT(gfjavaenv != nullptr,
+  ASSERT(!gfjavaenv.empty(),
          "Environment variable GFJAVA for java build directory is not set.");
   ASSERT(!currDir.empty(),
          "Current working directory could not be determined.");
 
-  if ((ACE_OS::strchr(gfjavaenv, '\\') == nullptr) &&
-      (ACE_OS::strchr(gfjavaenv, '/') == nullptr)) {
+  if (gfjavaenv.find(PATH_SEP) == std::string::npos) {
     return;
   }
 
@@ -1479,31 +1269,27 @@
       currDir += "0";
       break;
     case 1:
-      sprintf(tmp, "%d", CacheHelper::staticHostPort1);
-      currDir += tmp;  // currDir += "1";
+      currDir += std::to_string(CacheHelper::staticHostPort1);
       break;
     case 2:
-      sprintf(tmp, "%d", CacheHelper::staticHostPort2);
-      currDir += tmp;  // currDir += "2";
+      currDir += std::to_string(CacheHelper::staticHostPort2);
       break;
     case 3:
-      sprintf(tmp, "%d", CacheHelper::staticHostPort3);
-      currDir += tmp;  // currDir += "3";
+      currDir += std::to_string(CacheHelper::staticHostPort3);
       break;
     default: /* Support for any number of servers Max 10*/
       // ASSERT( ( instance <= 10 )," More than 10 servers not supported");
       // TODO: need to support more then three servers
       ASSERT((instance <= 4), " More than 4 servers not supported");
-      char temp[8];
-      currDir += ACE_OS::itoa(CacheHelper::staticHostPort4, temp, 10);
+      currDir += std::to_string(CacheHelper::staticHostPort4);
       break;
   }
 
-  sprintf(cmd, "%s/bin/%s stop server --dir=%s 2>&1", gfjavaenv, GFSH,
-          currDir.c_str());
-
-  LOG(cmd);
-  ACE_OS::system(cmd);
+  try {
+    GfshExecute gfsh;
+    gfsh.stop().server().withDir(currDir).execute();
+  } catch (const GfshExecuteException &) {
+  }
 
   terminate_process_file(currDir + "/vf.gf.server.pid",
                          std::chrono::seconds(10));
@@ -1512,61 +1298,51 @@
 }
 // closing locator
 void CacheHelper::closeLocator(int instance, bool) {
-  static char *gfjavaenv = ACE_OS::getenv("GFJAVA");
+  static const auto gfjavaenv = Utils::getEnv("GFJAVA");
+  static const auto testsrcenv = Utils::getEnv("TESTSRC");
 
-  char cmd[2048];
-  char currWDPath[2048];
-  std::string currDir = ACE_OS::getcwd(currWDPath, 2048);
-  std::string keystore = std::string(ACE_OS::getenv("TESTSRC")) + "/keystore";
+  auto currDir = boost::filesystem::current_path().string();
 
-  ASSERT(gfjavaenv != nullptr,
+  ASSERT(!gfjavaenv.empty(),
          "Environment variable GFJAVA for java build directory is not set.");
-  ASSERT(!currDir.empty(),
-         "Current working directory could not be determined.");
-  if ((ACE_OS::strchr(gfjavaenv, '\\') == nullptr) &&
-      (ACE_OS::strchr(gfjavaenv, '/') == nullptr)) {
+  ASSERT(!testsrcenv.empty(),
+         "Environment variable TESTSRC for test source directory is not set.");
+
+  std::string keystore = testsrcenv + "/keystore";
+  if (gfjavaenv.find(PATH_SEP) == std::string::npos) {
     return;
   }
 
   currDir += PATH_SEP;
   currDir += "GFELOC";
-  char tmp[100];
 
   switch (instance) {
     case 1:
-      sprintf(tmp, "%d", CacheHelper::staticLocatorHostPort1);
-      currDir += tmp;  // currDir += "1";
+      currDir += std::to_string(CacheHelper::staticLocatorHostPort1);
       break;
     case 2:
-      sprintf(tmp, "%d", CacheHelper::staticLocatorHostPort2);
-      currDir += tmp;
-      // currDir += "2";
+      currDir += std::to_string(CacheHelper::staticLocatorHostPort2);
       break;
     case 3:
-      sprintf(tmp, "%d", CacheHelper::staticLocatorHostPort3);
-      currDir += tmp;
-      // currDir += "3";
+      currDir += std::to_string(CacheHelper::staticLocatorHostPort3);
       break;
     default: /* Support for any number of Locator Max 10*/
       // TODO://
       ASSERT((instance <= 3), " More than 3 servers not supported");
-      char temp[8];
-      currDir += ACE_OS::itoa(instance, temp, 10);
+      currDir += std::to_string(instance);
       break;
   }
 
-  sprintf(cmd, "%s/bin/%s stop locator --dir=%s", gfjavaenv, GFSH,
-          currDir.c_str());
-  LOG(cmd);
-  ACE_OS::system(cmd);
+  try {
+    GfshExecute gfsh;
+    gfsh.stop().locator().withDir(currDir).execute();
+  } catch (const GfshExecuteException &) {
+  }
 
   terminate_process_file(currDir + "/vf.gf.locator.pid",
                          std::chrono::seconds(10));
 
-  sprintf(cmd, "%s .%stest.geode.properties", DELETE_COMMAND, PATH_SEP);
-  LOG(cmd);
-  ACE_OS::system(cmd);
-
+  std::remove("test.geode.properties");
   staticLocatorInstanceList.remove(instance);
 }
 
@@ -1578,32 +1354,37 @@
 
   std::string pid;
   read_single_line(pidFileName, pid);
-
-  if (!pid.empty()) {
-    LOG("CacheHelper::terminate_process_file: process running. pidFileName=" +
-        pidFileName + ", pid=" + pid);
-
-    // Wait for process to terminate or timeout
-    auto start = std::chrono::system_clock::now();
-    while (std::chrono::system_clock::now() < timeout) {
-      if (!file_exists(pidFileName)) {
-        auto elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(
-            std::chrono::system_clock::now() - start);
-        LOG("CacheHelper::terminate_process_file: process exited. "
-            "pidFileName=" +
-            pidFileName + ", pid=" + pid +
-            ", elapsed=" + std::to_string(elapsed.count()) + "ms");
-        return;
-      }
-      std::this_thread::yield();
-    }
-    LOG("CacheHelper::terminate_process_file: timeout. pidFileName=" +
-        pidFileName + ", pid=" + pid);
-
-    // Didn't exit on its own, kill it.
-    LOG("ACE::terminate_process: pid=" + pid);
-    ACE::terminate_process(std::stoi(pid));
+  if (pid.empty()) {
+    return;
   }
+
+  LOG("CacheHelper::terminate_process_file: process running. pidFileName=" +
+      pidFileName + ", pid=" + pid);
+
+  // Wait for process to terminate or timeout
+  auto start = std::chrono::system_clock::now();
+  while (std::chrono::system_clock::now() < timeout) {
+    if (!file_exists(pidFileName)) {
+      auto elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(
+          std::chrono::system_clock::now() - start);
+      LOG("CacheHelper::terminate_process_file: process exited. "
+          "pidFileName=" +
+          pidFileName + ", pid=" + pid +
+          ", elapsed=" + std::to_string(elapsed.count()) + "ms");
+      return;
+    }
+    std::this_thread::yield();
+  }
+  LOG("CacheHelper::terminate_process_file: timeout. pidFileName=" +
+      pidFileName + ", pid=" + pid);
+
+  // Didn't exit on its own, kill it.
+  LOG("terminate_process: pid=" + pid);
+
+  boost::process::pid_t id =
+      static_cast<boost::process::pid_t>(std::stoul(pid));
+  boost::process::child process{id};
+  process.terminate();
 }
 
 bool CacheHelper::file_exists(const std::string &fileName) {
@@ -1618,15 +1399,10 @@
 }
 
 void CacheHelper::cleanupTmpConfigFiles() {
-  std::list<std::string>::const_iterator its;
-
-  char cmd[1024];
-  for (its = CacheHelper::staticConfigFileList.begin();
+  for (auto its = CacheHelper::staticConfigFileList.begin();
        its != CacheHelper::staticConfigFileList.end(); ++its) {
     try {
-      sprintf(cmd, "rm %s", its->c_str());
-      LOG(cmd);
-      ACE_OS::system(cmd);
+      std::remove(its->c_str());
     } catch (...) {
     }
   }
@@ -1648,96 +1424,73 @@
 void CacheHelper::initLocator(int instance, bool ssl, bool, int dsId,
                               int remoteLocator, bool untrustedCert,
                               bool useSecurityManager) {
-  if (!isLocatorCleanupCallbackRegistered &&
-      gClientCleanup.registerCallback(&CacheHelper::cleanupLocatorInstances)) {
+  static const auto gfjavaenv = Utils::getEnv("GFJAVA");
+
+  if (!isLocatorCleanupCallbackRegistered) {
     isLocatorCleanupCallbackRegistered = true;
+
+    gClientCleanup.registerCallback(
+        []() { CacheHelper::cleanupLocatorInstances(); });
   }
-  static char *gfjavaenv = ACE_OS::getenv("GFJAVA");
 
-  char cmd[2048];
-  char currWDPath[2048];
-  std::string currDir = ACE_OS::getcwd(currWDPath, 2048);
-  //    std::string keystore = std::string(ACE_OS::getenv("TESTSRC")) +
-  //    "/keystore";
+  std::string currDir = boost::filesystem::current_path().string();
 
-  ASSERT(gfjavaenv != nullptr,
+  ASSERT(!gfjavaenv.empty(),
          "Environment variable GFJAVA for java build directory is not set.");
-  ASSERT(!currDir.empty(),
-         "Current working directory could not be determined.");
 
-  if ((ACE_OS::strchr(gfjavaenv, '\\') == nullptr) &&
-      (ACE_OS::strchr(gfjavaenv, '/') == nullptr)) {
+  if (gfjavaenv.find(PATH_SEP) == std::string::npos) {
     return;
   }
-  std::string locDirname = "GFELOC";
+
   int portnum = 0;
+  std::string locDirname = "GFELOC";
+
   currDir += PATH_SEP;
-  char tmp[100];
+
   switch (instance) {
     case 1:
-      // portnum = 34756;
       portnum = CacheHelper::staticLocatorHostPort1;
-      sprintf(tmp, "%d", CacheHelper::staticLocatorHostPort1);
-      locDirname += tmp;
-      // locDirname += "1";
       break;
     case 2:
-      // portnum = 34757;
       portnum = CacheHelper::staticLocatorHostPort2;
-      sprintf(tmp, "%d", CacheHelper::staticLocatorHostPort2);
-      locDirname += tmp;
-      // locDirname += "2";
       break;
     default:
-      // portnum = 34758;
       portnum = CacheHelper::staticLocatorHostPort3;
-      sprintf(tmp, "%d", CacheHelper::staticLocatorHostPort3);
-      locDirname += tmp;
-      // locDirname += "3";
       break;
   }
 
+  locDirname += std::to_string(portnum);
+
   int jmxManagerPort = CacheHelper::staticJmxManagerPort;
 
   currDir += locDirname;
-
-  ACE_OS::mkdir(locDirname.c_str());
+  boost::filesystem::create_directory(locDirname);
 
   std::string geodeFile = generateGeodeProperties(
       currDir, ssl, dsId, remoteLocator, untrustedCert, useSecurityManager);
 
-  sprintf(cmd, "%s/bin/%s stop locator --dir=%s --properties-file=%s ",
-          gfjavaenv, GFSH, currDir.c_str(), geodeFile.c_str());
+  auto classpath = Utils::getEnv("GF_CLASSPATH");
 
-  LOG(cmd);
-  ACE_OS::system(cmd);
+  GfshExecute gfsh;
+  auto locator = gfsh.start()
+                     .locator()
+                     .withName(locDirname)
+                     .withPort(portnum)
+                     .withDir(currDir)
+                     .withClasspath(classpath)
+                     .withHttpServicePort(0)
+                     .withJmxManagerPort(jmxManagerPort)
+                     .withMaxHeap("256m");
+  if (useSecurityManager) {
+    locator.withSecurityPropertiesFile(geodeFile);
+  } else {
+    locator.withPropertiesFile(geodeFile);
+  }
+  locator.execute();
 
-  static char *classpath = ACE_OS::getenv("GF_CLASSPATH");
-  std::string propertiesFile =
-      useSecurityManager
-          ? std::string("--security-properties-file=") + geodeFile
-          : std::string("--properties-file=") + geodeFile;
-  sprintf(cmd,
-          "%s/bin/%s start locator --name=%s --port=%d --dir=%s "
-          "%s --http-service-port=0 --classpath=%s "
-          "--J=-Dgemfire.jmx-manager-port=%d",
-          gfjavaenv, GFSH, locDirname.c_str(), portnum, currDir.c_str(),
-          propertiesFile.c_str(), classpath, jmxManagerPort);
-
-  LOG(cmd);
-  ACE_OS::system(cmd);
   staticLocatorInstanceList.push_back(instance);
 }
 
-void CacheHelper::clearSecProp() {
-  auto tmpSecProp = CacheHelper::getHelper()
-                        .getCache()
-                        ->getSystemProperties()
-                        .getSecurityProperties();
-  tmpSecProp->remove("security-username");
-  tmpSecProp->remove("security-password");
-}
-
 void CacheHelper::setJavaConnectionPoolSize(uint32_t size) {
   CacheHelper::getHelper()
       .getCache()
@@ -1746,17 +1499,18 @@
 }
 
 bool CacheHelper::setSeed() {
-  char *testName = ACE_OS::getenv("TESTNAME");
+  static const auto testnameenv = Utils::getEnv("TESTNAME");
+  ASSERT(!testnameenv.empty(),
+         "Environment variable TESTNAME for test name is not set.");
 
-  int seed = hashcode(testName);
-
-  printf("seed for process %d\n", seed);
+  int seed = std::hash<std::string>{}(testnameenv);
+  std::cout << "seed for process " << seed << "\n";
   // The integration tests rely on the pseudo-random
   // number generator being seeded with a very particular
   // value specific to the test by way of the test name.
   // Whilst this approach is pessimal, it can not be
   // remedied as the test depend upon it.
-  ACE_OS::srand(seed);
+  std::srand(seed);
   return true;
 }
 
@@ -1776,55 +1530,62 @@
 }
 
 int CacheHelper::getRandomNumber() {
-  // NOLINTNEXTLINE(clang-analyzer-security.insecureAPI.rand)
-  return (ACE_OS::rand() % RANDOM_NUMBER_DIVIDER) + RANDOM_NUMBER_OFFSET;
+  return (std::rand() % RANDOM_NUMBER_DIVIDER) + RANDOM_NUMBER_OFFSET;
 }
 
 int CacheHelper::getRandomAvailablePort() {
-  while (true) {
-    int port = CacheHelper::getRandomNumber();
-    ACE_INET_Addr addr(port, "localhost");
-    ACE_SOCK_Acceptor acceptor;
-    int result = acceptor.open(addr, 0, AF_INET);
-    if (result == -1) {
-      continue;
-    } else {
-      result = acceptor.close();
-      if (result == -1) {
-        continue;
-      } else {
-        return port;
-      }
+  using boost::asio::io_service;
+  using boost::asio::ip::tcp;
+  namespace bip = boost::asio::ip;
+
+  io_service service;
+  bip::tcp::acceptor acceptor(service, bip::tcp::v4());
+
+  int result = 0;
+  while (result == 0) {
+    uint16_t port = getRandomNumber();
+    bip::tcp::endpoint ep{bip::address_v4::loopback(), port};
+
+    try {
+      acceptor.bind(ep);
+      acceptor.listen();
+      result = port;
+    } catch (boost::system::system_error &e) {
+      std::clog << "Error: " << e.what() << std::endl;
     }
   }
+
+  return result;
 }
 
 std::string CacheHelper::unitTestOutputFile() {
-  char cwd[1024];
-  if (!ACE_OS::getcwd(cwd, sizeof(cwd))) {
-    throw Exception("Failed to get current working directory.");
-  }
+  static const auto testnameenv = Utils::getEnv("TESTNAME");
 
-  std::string outputFile(cwd);
-  outputFile += "/";
-  outputFile += ACE_OS::getenv("TESTNAME");
+  ASSERT(!testnameenv.empty(),
+         "Environment variable TESTNAME for test name is not set.");
+
+  std::string outputFile = boost::filesystem::current_path().string();
+  outputFile += PATH_SEP;
+  outputFile += testnameenv;
   outputFile += ".log";
 
   return outputFile;
 }
 
-int CacheHelper::getNumLocatorListUpdates(const char *s) {
-  std::string searchStr(s);
+int CacheHelper::getNumLocatorListUpdates(const std::string &search) {
   std::string testFile = CacheHelper::unitTestOutputFile();
-  FILE *fp = fopen(testFile.c_str(), "r");
-  ASSERT(nullptr != fp, "Failed to open log file.");
 
-  char buf[512];
+  std::ifstream file{testFile};
+  ASSERT(!file.fail(), "Failed to open log file.");
+
+  std::string line;
   int numMatched = 0;
-  while (fgets(buf, sizeof(buf), fp)) {
-    std::string line(buf);
-    if (line.find(searchStr) != std::string::npos) numMatched++;
+  while (std::getline(file, line)) {
+    if (line.find(search) != std::string::npos) {
+      ++numMatched;
+    }
   }
+
   return numMatched;
 }
 
@@ -1832,29 +1593,29 @@
     const std::string &path, const bool ssl, const int dsId,
     const int remoteLocator, const bool untrustedCert,
     const bool useSecurityManager) {
-  char cmd[2048];
-  std::string keystore = std::string(ACE_OS::getenv("TESTSRC")) + "/keystore";
+  static const auto testnameenv = Utils::getEnv("TESTNAME");
+
+  ASSERT(!testnameenv.empty(),
+         "Environment variable TESTNAME for test name is not set.");
+
+  std::string keystore = testnameenv + "/keystore";
 
   std::string geodeFile = path;
   geodeFile += "/test.geode.properties";
-  sprintf(cmd, "%s %s%stest.geode.properties", DELETE_COMMAND, path.c_str(),
-          PATH_SEP);
-  LOG(cmd);
-  ACE_OS::system(cmd);
-  FILE *urandom = /*ACE_OS::*/
-      fopen(geodeFile.c_str(), "w");
-  char gemStr[258];
-  sprintf(gemStr, "locators=localhost[%d],localhost[%d],localhost[%d]\n",
-          CacheHelper::staticLocatorHostPort1,
-          CacheHelper::staticLocatorHostPort2,
-          CacheHelper::staticLocatorHostPort3);
-  std::string msg = gemStr;
 
-  msg += "log-level=config\n";
-  msg += "mcast-port=0\n";
-  msg += "enable-network-partition-detection=false\n";
+  std::ofstream file{geodeFile};
+
+  file << "locators=localhost[" << CacheHelper::staticLocatorHostPort1
+       << "],localhost[" << CacheHelper::staticLocatorHostPort2
+       << "],localhost[" << CacheHelper::staticLocatorHostPort3 << "]"
+       << std::endl;
+
+  file << "log-level=config" << std::endl;
+  file << "mcast-port=0" << std::endl;
+  file << "enable-network-partition-detection=false" << std::endl;
+
   if (useSecurityManager) {
-    msg += "security-manager=javaobject.SimpleSecurityManager\n";
+    file << "security-manager=javaobject.SimpleSecurityManager" << std::endl;
   }
 
   std::string serverKeystore;
@@ -1871,35 +1632,31 @@
       serverTruststore += "server_truststore_chained_root.jks";
       password += "apachegeode";
     }
-    msg += "jmx-manager-ssl-enabled=false\n";
-    msg += "cluster-ssl-enabled=true\n";
-    msg += "cluster-ssl-require-authentication=false\n";
-    msg += "cluster-ssl-ciphers=TLS_RSA_WITH_AES_128_CBC_SHA\n";
-    msg += "cluster-ssl-keystore-type=jks\n";
-    msg += "cluster-ssl-keystore=" + keystore + "/" + serverKeystore.c_str() +
-           "\n";
-    msg += "cluster-ssl-keystore-password=" + password + "\n";
-    msg += "cluster-ssl-truststore=" + keystore + "/" +
-           serverTruststore.c_str() + "\n";
-    msg += "cluster-ssl-truststore-password=" + password + "\n";
-    msg += "security-username=xxxx\n";
-    msg += "security-userPassword=yyyy \n";
+    file << "jmx-manager-ssl-enabled=false" << std::endl;
+    file << "cluster-ssl-enabled=true" << std::endl;
+    file << "cluster-ssl-require-authentication=false" << std::endl;
+    file << "cluster-ssl-ciphers=TLS_RSA_WITH_AES_128_CBC_SHA" << std::endl;
+    file << "cluster-ssl-keystore-type=jks" << std::endl;
+    file << "cluster-ssl-keystore=" + keystore + PATH_SEP + serverKeystore
+         << std::endl;
+    file << "cluster-ssl-keystore-password=" + password + "" << std::endl;
+    file << "cluster-ssl-truststore=" + keystore + PATH_SEP +
+                serverTruststore.c_str() + ""
+         << std::endl;
+    file << "cluster-ssl-truststore-password=" + password + "" << std::endl;
+    file << "security-username=xxxx" << std::endl;
+    file << "security-userPassword=yyyy " << std::endl;
   }
-  if (remoteLocator != 0) {
-    sprintf(gemStr, "distributed-system-id=%d\n remote-locators=localhost[%d]",
-            dsId, remoteLocator);
-  } else {
-    sprintf(gemStr, "distributed-system-id=%d\n ", dsId);
-  }
-  msg += gemStr;
 
-  /*ACE_OS::*/
-  fwrite(msg.c_str(), msg.size(), 1, urandom);
-  /*ACE_OS::*/
-  fflush(urandom);
-  /*ACE_OS::*/
-  fclose(urandom);
-  LOG(geodeFile.c_str());
+  file << "distributed-system-id=" << dsId << std::endl;
+
+  if (remoteLocator != 0) {
+    file << "remote-locators=localhost[" << remoteLocator << "]";
+  }
+
+  file.close();
+
+  LOG(geodeFile);
   return geodeFile;
 }
 
diff --git a/cppcache/integration-test/CacheHelper.hpp b/cppcache/integration-test/CacheHelper.hpp
index 06b0da8..fcaaf4d 100644
--- a/cppcache/integration-test/CacheHelper.hpp
+++ b/cppcache/integration-test/CacheHelper.hpp
@@ -24,14 +24,11 @@
 #include <chrono>
 #include <cstdlib>
 
-#include <ace/OS.h>
-#include <ace/INET_Addr.h>
-#include <ace/SOCK_Acceptor.h>
-
 #include <geode/SystemProperties.hpp>
 #include <geode/PoolManager.hpp>
 
 #include "TimeBomb.hpp"
+#include "SerializationRegistry.hpp"
 #include "DistributedSystemImpl.hpp"
 #include "Utils.hpp"
 #include "config.h"
@@ -62,14 +59,14 @@
   static void resetHelper();
 
   static std::string unitTestOutputFile();
-  static int getNumLocatorListUpdates(const char* s);
+  static int getNumLocatorListUpdates(const std::string& search);
 
   explicit CacheHelper(const char* member_id,
                        const std::shared_ptr<Properties>& configPtr = nullptr,
                        const bool noRootRegion = false);
 
   /** rootRegionPtr will still be null... */
-  CacheHelper(const char* member_id, const char* cachexml,
+  CacheHelper(const char* member_id, const std::string& cachexml,
               const std::shared_ptr<Properties>& configPtr = nullptr);
 
   explicit CacheHelper(const std::shared_ptr<Properties>& configPtr = nullptr,
@@ -89,7 +86,7 @@
               const bool noRootRegion = false);
 
   CacheHelper(const bool isthinClient, const char* poolName,
-              const char* locators, const char* serverGroup,
+              const std::string& locators, const char* serverGroup,
               const std::shared_ptr<Properties>& configPtr = nullptr,
               int redundancy = 0, bool clientNotification = false,
               int subscriptionAckInterval = -1, int connections = -1,
@@ -101,8 +98,6 @@
 
   virtual ~CacheHelper();
 
-  void closePool(const char* poolName, bool keepAlive = false);
-
   void disconnect(bool keepalive = false);
 
   void createPlainRegion(const char* regionName,
@@ -126,23 +121,24 @@
   std::shared_ptr<Region> getRegion(const std::string& name);
 
   std::shared_ptr<Region> createRegion(
-      const char* name, bool ack, bool caching,
+      const std::string& name, bool ack, bool caching,
       const std::shared_ptr<CacheListener>& listener,
       bool clientNotificationEnabled = false, bool scopeLocal = false,
       bool concurrencyCheckEnabled = false, int32_t tombstonetimeout = -1);
 
   std::shared_ptr<Region> createRegion(
-      const char* name, bool ack, bool caching = true,
+      const std::string& name, bool ack, bool caching = true,
       const std::chrono::seconds& ettl = std::chrono::seconds::zero(),
       const std::chrono::seconds& eit = std::chrono::seconds::zero(),
       const std::chrono::seconds& rttl = std::chrono::seconds::zero(),
       const std::chrono::seconds& rit = std::chrono::seconds::zero(),
       int lel = 0, ExpirationAction action = ExpirationAction::DESTROY,
-      const char* endpoints = nullptr, bool clientNotificationEnabled = false);
+      const std::string& endpoints = {},
+      bool clientNotificationEnabled = false);
 
   std::shared_ptr<Pool> createPool(
-      const std::string& poolName, const char* locators,
-      const char* serverGroup, int redundancy = 0,
+      const std::string& poolName, const std::string& locators,
+      const std::string& serverGroup, int redundancy = 0,
       bool clientNotification = false,
       std::chrono::milliseconds subscriptionAckInterval =
           std::chrono::milliseconds::zero(),
@@ -150,23 +146,21 @@
       bool isMultiuserMode = false);
 
   // this will create pool even endpoints and locatorhost has been not defined
-  std::shared_ptr<Pool> createPool2(const char* poolName, const char* locators,
-                                    const char* serverGroup,
-                                    const char* servers = nullptr,
-                                    int redundancy = 0,
-                                    bool clientNotification = false,
-                                    int subscriptionAckInterval = -1,
-                                    int connections = -1);
+  std::shared_ptr<Pool> createPool2(
+      const std::string& poolName, const std::string& locators,
+      const std::string& serverGroup, const std::string& servers = {},
+      int redundancy = 0, bool clientNotification = false,
+      int subscriptionAckInterval = -1, int connections = -1);
 
   void logPoolAttributes(std::shared_ptr<Pool>& pool);
 
   void createPoolWithLocators(
-      const std::string& name, const char* locators = nullptr,
+      const std::string& name, const std::string& locators = {},
       bool clientNotificationEnabled = false, int subscriptionRedundancy = -1,
       std::chrono::milliseconds subscriptionAckInterval =
           std::chrono::milliseconds::zero(),
       int connections = -1, bool isMultiuserMode = false,
-      const char* serverGroup = nullptr);
+      const std::string& serverGroup = {});
 
   std::shared_ptr<Region> createRegionAndAttachPool(
       const std::string& name, bool ack, const std::string& poolName,
@@ -187,12 +181,12 @@
       const std::chrono::seconds& rit = std::chrono::seconds::zero(),
       int lel = 0, ExpirationAction action = ExpirationAction::DESTROY);
 
-  static void addServerLocatorEPs(const char* epList, PoolFactory& pfPtr,
+  static void addServerLocatorEPs(const std::string& epList, PoolFactory& pfPtr,
                                   bool poolLocators = true);
 
   std::shared_ptr<Region> createPooledRegion(
-      const char* name, bool ack, const char* locators = nullptr,
-      const char* poolName = "__TEST_POOL1__", bool caching = true,
+      const std::string& name, bool ack, const std::string& locators = {},
+      const std::string& poolName = "__TEST_POOL1__", bool caching = true,
       bool clientNotificationEnabled = false,
       const std::chrono::seconds& ettl = std::chrono::seconds::zero(),
       const std::chrono::seconds& eit = std::chrono::seconds::zero(),
@@ -203,8 +197,8 @@
       ExpirationAction action = ExpirationAction::DESTROY);
 
   std::shared_ptr<Region> createPooledRegionConcurrencyCheckDisabled(
-      const char* name, bool ack, const char* locators = nullptr,
-      const char* poolName = "__TEST_POOL1__", bool caching = true,
+      const std::string& name, bool ack, const std::string& locators = {},
+      const std::string& poolName = "__TEST_POOL1__", bool caching = true,
       bool clientNotificationEnabled = false,
       bool concurrencyCheckEnabled = true,
       const std::chrono::seconds& ettl = std::chrono::seconds::zero(),
@@ -216,7 +210,7 @@
       ExpirationAction action = ExpirationAction::DESTROY);
 
   std::shared_ptr<Region> createRegionDiscOverFlow(
-      const char* name, bool caching = true,
+      const std::string& name, bool caching = true,
       bool clientNotificationEnabled = false,
       const std::chrono::seconds& ettl = std::chrono::seconds::zero(),
       const std::chrono::seconds& eit = std::chrono::seconds::zero(),
@@ -225,8 +219,8 @@
       int lel = 0, ExpirationAction action = ExpirationAction::DESTROY);
 
   std::shared_ptr<Region> createPooledRegionDiscOverFlow(
-      const char* name, bool ack, const char* locators = nullptr,
-      const char* poolName = "__TEST_POOL1__", bool caching = true,
+      const std::string& name, bool ack, const std::string& locators = {},
+      const std::string& poolName = "__TEST_POOL1__", bool caching = true,
       bool clientNotificationEnabled = false,
       const std::chrono::seconds& ettl = std::chrono::seconds::zero(),
       const std::chrono::seconds& eit = std::chrono::seconds::zero(),
@@ -237,8 +231,8 @@
       ExpirationAction action = ExpirationAction::DESTROY);
 
   std::shared_ptr<Region> createPooledRegionSticky(
-      const char* name, bool ack, const char* locators = nullptr,
-      const char* poolName = "__TEST_POOL1__", bool caching = true,
+      const std::string& name, bool ack, const std::string& locators = {},
+      const std::string& poolName = "__TEST_POOL1__", bool caching = true,
       bool clientNotificationEnabled = false,
       const std::chrono::seconds& ettl = std::chrono::seconds::zero(),
       const std::chrono::seconds& eit = std::chrono::seconds::zero(),
@@ -249,8 +243,8 @@
       ExpirationAction action = ExpirationAction::DESTROY);
 
   std::shared_ptr<Region> createPooledRegionStickySingleHop(
-      const char* name, bool ack, const char* locators = nullptr,
-      const char* poolName = "__TEST_POOL1__", bool caching = true,
+      const std::string& name, bool ack, const std::string& locators = {},
+      const std::string& poolName = "__TEST_POOL1__", bool caching = true,
       bool clientNotificationEnabled = false,
       const std::chrono::seconds& ettl = std::chrono::seconds::zero(),
       const std::chrono::seconds& eit = std::chrono::seconds::zero(),
@@ -284,7 +278,7 @@
   static int staticHostPort4;
 
   static const std::string getTcrEndpoints(bool& isLocalServer,
-                                     int numberOfServers = 1);
+                                           int numberOfServers = 1);
 
   static int staticLocatorHostPort1;
   static int staticLocatorHostPort2;
@@ -292,34 +286,34 @@
 
   static int staticJmxManagerPort;
 
-  static const char* getstaticLocatorHostPort1();
+  static std::string getstaticLocatorHostPort1();
 
-  static const char* getstaticLocatorHostPort2();
+  static std::string getstaticLocatorHostPort2();
 
-  static const char* getLocatorHostPort(int locPort);
+  static std::string getLocatorHostPort(int locPort);
 
-  static const char* getLocatorHostPort(bool& isLocator, bool& isLocalServer,
+  static std::string getLocatorHostPort(bool& isLocator, bool& isLocalServer,
                                         int numberOfLocators = 0);
 
   static const std::string getTcrEndpoints2(bool& isLocalServer,
-                                      int numberOfServers = 1);
+                                            int numberOfServers = 1);
 
   static std::list<int> staticServerInstanceList;
   static bool isServerCleanupCallbackRegistered;
   static void cleanupServerInstances();
 
-  static void initServer(int instance, const char* xml = nullptr,
-                         const char* locHostport = nullptr,
+  static void initServer(int instance, const std::string& xml = {},
+                         const std::string& locHostport = {},
                          const char* authParam = nullptr, bool ssl = false,
                          bool enableDelta = true, bool multiDS = false,
                          bool testServerGC = false, bool untrustedCert = false,
                          bool useSecurityManager = false);
 
-  static void createDuplicateXMLFile(std::string& originalFile, int hostport1,
-                                     int hostport2, int locport1, int locport2);
+  static std::string createDuplicateXMLFile(const std::string& source,
+                                            int hostport1, int hostport2,
+                                            int locport1, int locport2);
 
-  static void createDuplicateXMLFile(std::string& duplicateFile,
-                                     std::string& originalFile);
+  static std::string createDuplicateXMLFile(const std::string& source);
 
   static void closeServer(int instance);
 
@@ -355,8 +349,6 @@
                           bool untrustedCert = false,
                           bool useSecurityManager = false);
 
-  static void clearSecProp();
-
   static void setJavaConnectionPoolSize(uint32_t size);
 
   static bool isSeedSet;
diff --git a/cppcache/integration-test/CacheImplHelper.hpp b/cppcache/integration-test/CacheImplHelper.hpp
index e2328cd..54b604e 100644
--- a/cppcache/integration-test/CacheImplHelper.hpp
+++ b/cppcache/integration-test/CacheImplHelper.hpp
@@ -22,7 +22,6 @@
 
 #include <cstdlib>
 #include <geode/SystemProperties.hpp>
-#include <ace/OS.h>
 #include "testUtils.hpp"
 
 #ifndef ROOT_NAME
@@ -33,7 +32,7 @@
 #define ROOT_SCOPE LOCAL
 #endif
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheHelper;
 using apache::geode::client::Properties;
diff --git a/cppcache/src/InterestResultPolicy.cpp b/cppcache/integration-test/ClientCleanup.cpp
similarity index 64%
copy from cppcache/src/InterestResultPolicy.cpp
copy to cppcache/integration-test/ClientCleanup.cpp
index b043896..e6a2577 100644
--- a/cppcache/src/InterestResultPolicy.cpp
+++ b/cppcache/integration-test/ClientCleanup.cpp
@@ -15,17 +15,22 @@
  * limitations under the License.
  */
 
-#include "InterestResultPolicy.hpp"
+#include "ClientCleanup.hpp"
 
-namespace apache {
-namespace geode {
-namespace client {
+#include <iostream>
 
-char InterestResultPolicy::nextOrdinal = 0;
-InterestResultPolicy InterestResultPolicy::NONE;
-InterestResultPolicy InterestResultPolicy::KEYS;
-InterestResultPolicy InterestResultPolicy::KEYS_VALUES;
+void ClientCleanup::trigger() {
+  for (auto& callback : callbacks_) {
+    try {
+      callback();
+    } catch (std::exception& e) {
+      std::clog << "Exception while executing cleanup: " << e.what()
+                << std::endl
+                << std::flush;
+    }
+  }
+}
 
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
+void ClientCleanup::registerCallback(std::function<void()> callback) {
+  callbacks_.emplace_front(callback);
+}
diff --git a/cppcache/src/InterestResultPolicy.cpp b/cppcache/integration-test/ClientCleanup.hpp
similarity index 67%
copy from cppcache/src/InterestResultPolicy.cpp
copy to cppcache/integration-test/ClientCleanup.hpp
index b043896..f9c3536 100644
--- a/cppcache/src/InterestResultPolicy.cpp
+++ b/cppcache/integration-test/ClientCleanup.hpp
@@ -15,17 +15,21 @@
  * limitations under the License.
  */
 
-#include "InterestResultPolicy.hpp"
+#pragma once
 
-namespace apache {
-namespace geode {
-namespace client {
+#ifndef GEODE_INTEGRATION_TEST_CLIENT_CLEANUP_H_
+#define GEODE_INTEGRATION_TEST_CLIENT_CLEANUP_H_
 
-char InterestResultPolicy::nextOrdinal = 0;
-InterestResultPolicy InterestResultPolicy::NONE;
-InterestResultPolicy InterestResultPolicy::KEYS;
-InterestResultPolicy InterestResultPolicy::KEYS_VALUES;
+#include <functional>
+#include <list>
 
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
+class ClientCleanup {
+ public:
+  void trigger();
+  void registerCallback(std::function<void()> callback);
+
+ protected:
+  std::list<std::function<void()>> callbacks_;
+};
+
+#endif  // GEODE_INTEGRATION_TEST_CLIENT_CLEANUP_H_
diff --git a/cppcache/integration-test/DeltaEx.hpp b/cppcache/integration-test/DeltaEx.hpp
index f1f4de2..75fbb79 100644
--- a/cppcache/integration-test/DeltaEx.hpp
+++ b/cppcache/integration-test/DeltaEx.hpp
@@ -21,7 +21,6 @@
 #define GEODE_INTEGRATION_TEST_DELTAEX_H_
 
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
 #include <memory>
 #include <geode/PdxSerializable.hpp>
 #include <geode/PdxWriter.hpp>
@@ -68,7 +67,7 @@
     int32_t val = in.readInt32();
     if (fromDeltaCount == 1) {
       fromDeltaCount++;
-      LOG("Invalid Delta expetion thrown");
+      LOG("Invalid Delta exception thrown");
       throw InvalidDeltaException("aaannn");
     }
     counter += val;
@@ -120,7 +119,7 @@
     int32_t val = in.readInt32();
     if (m_fromDeltaCount == 1) {
       m_fromDeltaCount++;
-      LOG("Invalid Delta expetion thrown");
+      LOG("Invalid Delta exception thrown");
       throw InvalidDeltaException("aaannn");
     }
     m_counter += val;
@@ -160,10 +159,8 @@
   void setDelta(bool delta) { this->m_isDelta = delta; }
 
   std::string toString() const override {
-    char idbuf[1024];
-    sprintf(idbuf, "PdxDeltaEx :: [counter=%d]  [isDelta=%d]", m_counter,
-            m_isDelta);
-    return idbuf;
+    return std::string("PdxDeltaEx :: [counter=") + std::to_string(m_counter) +
+           "] [isDelta=" + std::to_string(m_isDelta) + "]";
   }
 };
 
diff --git a/cppcache/integration-test/InitSmartHeap.cpp b/cppcache/integration-test/InitSmartHeap.cpp
index 326d2d1..aed8315 100644
--- a/cppcache/integration-test/InitSmartHeap.cpp
+++ b/cppcache/integration-test/InitSmartHeap.cpp
@@ -24,4 +24,4 @@
   InitSmartHeap() {}
 
 } doInit;
-}
+}  // namespace geode_smartheap
diff --git a/cppcache/integration-test/LibraryCallbacks.cpp b/cppcache/integration-test/LibraryCallbacks.cpp
index 67479bd..b030537 100644
--- a/cppcache/integration-test/LibraryCallbacks.cpp
+++ b/cppcache/integration-test/LibraryCallbacks.cpp
@@ -19,9 +19,6 @@
 
 #include <geode/internal/geode_globals.hpp>
 
-#include <ace/Time_Value.h>
-#include <ace/OS.h>
-
 namespace test {
 
 void dummyFunc() {}
diff --git a/cppcache/integration-test/LocatorHelper.hpp b/cppcache/integration-test/LocatorHelper.hpp
index 441af29..b70dfe6 100644
--- a/cppcache/integration-test/LocatorHelper.hpp
+++ b/cppcache/integration-test/LocatorHelper.hpp
@@ -24,7 +24,7 @@
 #define SERVER2 s2p2
 #endif
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheHelper;
 
@@ -47,7 +47,7 @@
 DUNIT_TASK_DEFINITION(SERVER1, CreateServer1_With_Locator)
   {
     // starting servers
-    if (isLocalServer) CacheHelper::initServer(1, nullptr, locatorsG);
+    if (isLocalServer) CacheHelper::initServer(1, {}, locatorsG);
   }
 END_TASK_DEFINITION
 
@@ -55,7 +55,7 @@
   {
     // starting servers
     if (isLocalServer) {
-      CacheHelper::initServer(1, nullptr, locatorsG, nullptr, true);
+      CacheHelper::initServer(1, {}, locatorsG, nullptr, true);
     }
   }
 END_TASK_DEFINITION
@@ -64,7 +64,7 @@
   {
     // starting servers
     if (isLocalServer) {
-      CacheHelper::initServer(2, nullptr, locatorsG);
+      CacheHelper::initServer(2, {}, locatorsG);
     }
   }
 END_TASK_DEFINITION
diff --git a/cppcache/integration-test/QueryHelper.hpp b/cppcache/integration-test/QueryHelper.hpp
index efe3fd9..6a394bc 100644
--- a/cppcache/integration-test/QueryHelper.hpp
+++ b/cppcache/integration-test/QueryHelper.hpp
@@ -22,8 +22,6 @@
 
 #include <cstdlib>
 
-#include <ace/OS.h>
-
 #include <geode/Region.hpp>
 #include <geode/ResultSet.hpp>
 #include <geode/StructSet.hpp>
@@ -32,6 +30,7 @@
 #include "CacheImpl.hpp"
 #include "CacheRegionHelper.hpp"
 #include "DistributedSystemImpl.hpp"
+#include "SerializationRegistry.hpp"
 #include "testobject/Portfolio.hpp"
 #include "testobject/Position.hpp"
 #include "testobject/PdxType.hpp"
@@ -51,7 +50,7 @@
 #define ROOT_SCOPE LOCAL
 #endif
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableStringArray;
@@ -88,7 +87,7 @@
     positionNumSets = 1;
   }
 
-  virtual ~QueryHelper() { ; }
+  virtual ~QueryHelper() {}
 
   virtual void populatePortfolioData(
       std::shared_ptr<Region>& pregion, size_t setSize, size_t numSets,
@@ -119,8 +118,7 @@
     for (int i = (sizeof(constantExpectedRowsRS) / sizeof(int)) - 1; i > -1;
          i--) {
       if (constantExpectedRowsRS[i] == queryindex) {
-        printf("index %d is having constant rows \n",
-               constantExpectedRowsRS[i]);
+        std::cout << "index " << constantExpectedRowsRS[i] << " is having constant rows \n";
         return true;
       }
     }
@@ -132,8 +130,7 @@
     for (int i = (sizeof(constantExpectedRowsPQRS) / sizeof(int)) - 1; i > -1;
          i--) {
       if (constantExpectedRowsPQRS[i] == queryindex) {
-        printf("index %d is having constant rows \n",
-               constantExpectedRowsPQRS[i]);
+        std::cout << "index " << constantExpectedRowsPQRS[i] << " is having constant rows \n";
         return true;
       }
     }
@@ -145,8 +142,7 @@
     for (int i = (sizeof(constantExpectedRowsSS) / sizeof(int)) - 1; i > -1;
          i--) {
       if (constantExpectedRowsSS[i] == queryindex) {
-        printf("index %d is having constant rows \n",
-               constantExpectedRowsSS[i]);
+        std::cout << "index " << constantExpectedRowsSS[i] << " is having constant rows \n";
         return true;
       }
     }
@@ -158,8 +154,7 @@
     for (int i = (sizeof(constantExpectedRowsSSPQ) / sizeof(int)) - 1; i > -1;
          i--) {
       if (constantExpectedRowsSSPQ[i] == queryindex) {
-        printf("index %d is having constant rows \n",
-               constantExpectedRowsSSPQ[i]);
+        std::cout << "index " << constantExpectedRowsSSPQ[i] << " is having constant rows \n";
         return true;
       }
     }
@@ -188,19 +183,14 @@
       auto port = std::make_shared<Portfolio>(static_cast<int32_t>(current),
                                               objSize, nm);
 
-      char portname[100] = {0};
-      ACE_OS::sprintf(portname, "port%zd-%zd", set, current);
-
-      auto keyport = CacheableKey::create(portname);
-      // printf(" QueryHelper::populatePortfolioData creating key = %s and
-      // puting data \n",portname);
+      std::string key =
+          "port" + std::to_string(set) + '-' + std::to_string(current);
+      auto keyport = CacheableKey::create(key);
       rptr->put(keyport, port);
     }
   }
-  // portfolioSetSize = setSize; portfolioNumSets = numSets; objectSize =
-  // objSize;
 
-  printf("all puts done \n");
+  std::cout << "all puts done \n";
 }
 
 const char* secIds[] = {"SUN", "IBM",  "YHOO", "GOOG", "MSFT",
@@ -215,10 +205,9 @@
       auto pos = std::make_shared<Position>(
           secIds[current % numSecIds], static_cast<int32_t>(current * 100));
 
-      char posname[100] = {0};
-      ACE_OS::sprintf(posname, "pos%zd-%zd", set, current);
-
-      auto keypos = CacheableKey::create(posname);
+      std::string key =
+          "pos" + std::to_string(set) + '-' + std::to_string(current);
+      auto keypos = CacheableKey::create(key);
       rptr->put(keypos, pos);
     }
   }
@@ -235,21 +224,18 @@
     for (size_t current = 1; current <= setSize; current++) {
       auto port = std::make_shared<PortfolioPdx>(static_cast<int32_t>(current),
                                                  objSize);
+      std::string key =
+          "port" + std::to_string(set) + '-' + std::to_string(current);
 
-      char portname[100] = {0};
-      ACE_OS::sprintf(portname, "port%zd-%zd", set, current);
-
-      auto keyport = CacheableKey::create(portname);
-
+      auto keyport = CacheableKey::create(key);
       rptr->put(keyport, port);
+
       LOGDEBUG("populatePortfolioPdxData:: Put for iteration current = %d done",
                current);
     }
   }
-  // portfolioSetSize = setSize; portfolioNumSets = numSets; objectSize =
-  // objSize;
 
-  printf("all puts done \n");
+  std::cout << "all puts done \n";
 }
 
 void QueryHelper::populatePositionPdxData(std::shared_ptr<Region>& rptr,
@@ -261,10 +247,10 @@
       auto pos = std::make_shared<PositionPdx>(
           secIds[current % numSecIds], static_cast<int32_t>(current * 100));
 
-      char posname[100] = {0};
-      ACE_OS::sprintf(posname, "pos%zd-%zd", set, current);
+      std::string key =
+          "pos" + std::to_string(set) + '-' + std::to_string(current);
 
-      auto keypos = CacheableKey::create(posname);
+      auto keypos = CacheableKey::create(key);
       rptr->put(keypos, pos);
     }
   }
@@ -339,8 +325,10 @@
       foundRows++;
     }
 
-    printf("found rows %zd, expected %zd \n", foundRows, expectedRows);
-    if (foundRows == expectedRows) return true;
+    std::cout << "found rows " << foundRows << ", expected " << expectedRows << "\n";
+    if (foundRows == expectedRows) {
+      return true;
+    }
   }
   return false;
 }
@@ -355,7 +343,7 @@
       auto siptr = std::dynamic_pointer_cast<Struct>(ser);
 
       if (siptr == nullptr) {
-        printf("siptr is nullptr \n\n");
+        std::cout << "siptr is nullptr \n\n";
         return false;
       }
 
@@ -365,10 +353,8 @@
       }
 
       if (foundFields != expectedFields) {
-        char buffer[1024] = {'\0'};
-        sprintf(buffer, "found fields %d, expected fields %d \n", foundFields,
-                expectedFields);
-        LOG(buffer);
+        LOG(std::string("found fields ") + std::to_string(foundFields) +
+            ", expected fields " + std::to_string(expectedFields) + " \n");
         return false;
       }
     }
@@ -376,10 +362,8 @@
     if (foundRows == expectedRows) return true;
 
     // lets log and return in case of error only situation
-    char buffer[1024] = {'\0'};
-    sprintf(buffer, "found rows %zd, expected rows %zd\n", foundRows,
-            expectedRows);
-    LOG(buffer);
+    LOG(std::string("found rows ") + std::to_string(foundRows) +
+        ", expected rows" + std::to_string(expectedRows) + " \n");
   } else {
     if (expectedRows == 0 && expectedFields == 0) {
       return true;  // quite possible we got a null set back.
diff --git a/cppcache/integration-test/TallyListener.hpp b/cppcache/integration-test/TallyListener.hpp
index f0285ae..0c5e4c8 100644
--- a/cppcache/integration-test/TallyListener.hpp
+++ b/cppcache/integration-test/TallyListener.hpp
@@ -22,6 +22,7 @@
 
 #include <geode/EntryEvent.hpp>
 #include <string>
+#include <sstream>
 #include <util/Log.hpp>
 
 namespace apache {
@@ -69,12 +70,10 @@
     LOG("TallyListener contructor called");
   }
 
-  virtual ~TallyListener() {}
+  ~TallyListener() noexcept override = default;
 
   void beQuiet(bool v) { m_quiet = v; }
 
-  void ignoreTimeouts(bool ignore) { m_ignoreTimeout = ignore; }
-
   int expectCreates(int expected) {
     int tries = 0;
     while ((m_creates < expected) && (tries < 200)) {
@@ -99,24 +98,6 @@
     isCallbackCalled = false;
   }
   int getUpdates() { return m_updates; }
-  int expectInvalidates(int expected) {
-    LOG("calling expectInvalidates ");
-    int tries = 0;
-    while ((m_invalidates < expected) && (tries < 200)) {
-      SLEEP(100);
-      tries++;
-    }
-    return m_invalidates;
-  }
-  int expectDestroys(int expected) {
-    LOG("calling expectDestroys ");
-    int tries = 0;
-    while ((m_destroys < expected) && (tries < 200)) {
-      SLEEP(100);
-      tries++;
-    }
-    return m_destroys;
-  }
 
   int getInvalidates() { return m_invalidates; }
   int getDestroys() { return m_destroys; }
@@ -142,32 +123,30 @@
 
   int getClears() { return m_clears; }
 
-  virtual void afterCreate(const EntryEvent& event);
+  void afterCreate(const EntryEvent& event) override;
 
-  virtual void afterUpdate(const EntryEvent& event);
+  void afterUpdate(const EntryEvent& event) override;
 
-  virtual void afterInvalidate(const EntryEvent& event);
+  void afterInvalidate(const EntryEvent& event) override;
 
-  virtual void afterDestroy(const EntryEvent& event);
+  void afterDestroy(const EntryEvent& event) override;
 
-  virtual void afterRegionClear(const RegionEvent& event) {
+  void afterRegionClear(const RegionEvent& event) override {
     CacheListener::afterRegionClear(event);
   }
 
-  virtual void afterRegionClear(const EntryEvent& event);
+  void afterRegionInvalidate(const RegionEvent&) override {}
 
-  virtual void afterRegionInvalidate(const RegionEvent&) {}
-
-  virtual void afterRegionDestroy(const RegionEvent&) {}
+  void afterRegionDestroy(const RegionEvent&) override {}
 
   void showTallies() {
-    char buf[1024];
-    sprintf(buf,
-            "TallyListener state: (updates = %d, creates = %d , invalidates = "
-            "%d destroys = %d Regionclears = %d)",
-            getUpdates(), getCreates(), getInvalidates(), getDestroys(),
-            getClears());
-    LOG(buf);
+    std::stringstream strm;
+    strm << "TallyListener state: (updates = " << getUpdates()
+         << ", creates = " << getCreates()
+         << ", invalidates = " << getInvalidates()
+         << ", destroys = " << getDestroys()
+         << ", regionclears = " << getClears() << ")";
+    LOG(strm.str());
   }
 };
 
@@ -180,10 +159,10 @@
 
   auto strPtr = std::dynamic_pointer_cast<CacheableString>(event.getNewValue());
   if (!m_quiet) {
-    char buf[1024];
-    sprintf(buf, "TallyListener create - key = \"%s\", value = \"%s\"",
-            m_lastKey->toString().c_str(), strPtr->value().c_str());
-    LOGDEBUG(buf);
+    std::stringstream strm;
+    strm << "TallyListener create - key = " << m_lastKey->toString()
+         << ", value = \"" << strPtr->value() << "\"";
+    LOGDEBUG(strm.str());
   }
   std::string keyString(m_lastKey->toString().c_str());
   if ((!m_ignoreTimeout) && (keyString.find("timeout") != std::string::npos)) {
@@ -200,10 +179,10 @@
   checkcallbackArg(event);
   auto strPtr = std::dynamic_pointer_cast<CacheableString>(event.getNewValue());
   if (!m_quiet) {
-    char buf[1024];
-    sprintf(buf, "TallyListener update - key = \"%s\", value = \"%s\"",
-            m_lastKey->toString().c_str(), strPtr->value().c_str());
-    LOG(buf);
+    std::stringstream strm;
+    strm << "TallyListener update - key = " << m_lastKey->toString()
+         << ", value = \"" << strPtr->value() << "\"";
+    LOGDEBUG(strm.str());
   }
   std::string keyString(m_lastKey->toString().c_str());
   if ((!m_ignoreTimeout) && (keyString.find("timeout") != std::string::npos)) {
@@ -220,11 +199,6 @@
   m_destroys++;
   checkcallbackArg(event);
 }
-void TallyListener::afterRegionClear(const EntryEvent& event) {
-  m_clears++;
-  LOGINFO("TallyListener::afterRegionClear m_clears = %d", m_clears);
-  checkcallbackArg(event);
-}
 
 }  // namespace testing
 }  // namespace client
diff --git a/cppcache/integration-test/TallyLoader.hpp b/cppcache/integration-test/TallyLoader.hpp
index 9581849..35fde6b 100644
--- a/cppcache/integration-test/TallyLoader.hpp
+++ b/cppcache/integration-test/TallyLoader.hpp
@@ -38,37 +38,22 @@
 
  public:
   TallyLoader() : CacheLoader(), m_loads(0) {}
-  virtual ~TallyLoader() = default;
+  ~TallyLoader() noexcept override = default;
 
-  std::shared_ptr<Cacheable> load(Region&, const std::shared_ptr<CacheableKey>&,
-                                  const std::shared_ptr<Serializable>&) {
+  std::shared_ptr<Cacheable> load(
+      Region&, const std::shared_ptr<CacheableKey>&,
+      const std::shared_ptr<Serializable>&) override {
     LOGDEBUG("TallyLoader::load invoked for %d.", m_loads);
-    char buf[1024];
-    sprintf(buf, "TallyLoader state: (loads = %d)", m_loads);
-    LOG(buf);
+    LOG(std::string("TallyLoader state: (loads = ") + std::to_string(m_loads) +
+        ")");
     return CacheableInt32::create(m_loads++);
   }
 
-  virtual void close(Region&) { LOG("TallyLoader::close"); }
-
-  int expectLoads(int expected) {
-    int tries = 0;
-    while ((m_loads < expected) && (tries < 200)) {
-      SLEEP(100);
-      tries++;
-    }
-    return m_loads;
-  }
+  virtual void close(Region&) override { LOG("TallyLoader::close"); }
 
   int getLoads() { return m_loads; }
 
   void reset() { m_loads = 0; }
-
-  void showTallies() {
-    char buf[1024];
-    sprintf(buf, "TallyLoader state: (loads = %d)", getLoads());
-    LOG(buf);
-  }
 };
 
 }  // namespace testing
diff --git a/cppcache/integration-test/TallyWriter.hpp b/cppcache/integration-test/TallyWriter.hpp
index 3eb860a..9a530b9 100644
--- a/cppcache/integration-test/TallyWriter.hpp
+++ b/cppcache/integration-test/TallyWriter.hpp
@@ -139,12 +139,12 @@
   std::shared_ptr<Cacheable> getLastValue() { return m_lastValue; }
 
   void showTallies() {
-    char buf[1024];
-    sprintf(buf,
-            "TallyWriter state: (updates = %d, creates = %d, invalidates = %d, "
-            "destroy = %d)",
-            getUpdates(), getCreates(), getInvalidates(), getDestroys());
-    LOG(buf);
+    std::stringstream strm;
+    strm << "TallyWriter state: (updates = " << getUpdates()
+         << ", creates = " << getCreates()
+         << ", invalidates = " << getInvalidates()
+         << ", destroys = " << getDestroys() << ")";
+    LOG(strm.str());
   }
   void checkcallbackArg(const EntryEvent& event) {
     if (!isWriterInvoke) isWriterInvoke = true;
diff --git a/cppcache/integration-test/ThinClientCQ.hpp b/cppcache/integration-test/ThinClientCQ.hpp
index cf450a8..d9cb123 100644
--- a/cppcache/integration-test/ThinClientCQ.hpp
+++ b/cppcache/integration-test/ThinClientCQ.hpp
@@ -28,13 +28,12 @@
 static bool isLocator = false;
 static bool isLocalServer = false;
 static int numberOfLocators = 1;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 
-void createRegionForCQ(const char* name, bool ackMode,
+void createRegionForCQ(const std::string& name, bool ackMode,
                        bool clientNotificationEnabled = false,
-                       int redundancyLevel = 0,
-                       bool caching = true) {
+                       int redundancyLevel = 0, bool caching = true) {
   // Use region name as pool name to avoid recreating pools with the same name.
   getHelper()->createPoolWithLocators(name, locatorsG,
                                       clientNotificationEnabled,
diff --git a/cppcache/integration-test/ThinClientCallbackArg.hpp b/cppcache/integration-test/ThinClientCallbackArg.hpp
index b298bcd..42caf87 100644
--- a/cppcache/integration-test/ThinClientCallbackArg.hpp
+++ b/cppcache/integration-test/ThinClientCallbackArg.hpp
@@ -37,7 +37,7 @@
  * + callback Argument
  */
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::testing::TallyListener;
 using apache::geode::client::testing::TallyWriter;
@@ -45,7 +45,7 @@
 static bool isLocalServer = false;
 static bool isLocator = false;
 static int numberOfLocators = 0;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 const char* poolName = "__TESTPOOL1_";
 std::shared_ptr<TallyListener> regListener;
diff --git a/cppcache/integration-test/ThinClientDistOps.hpp b/cppcache/integration-test/ThinClientDistOps.hpp
index 9b1218e..710d0e9 100644
--- a/cppcache/integration-test/ThinClientDistOps.hpp
+++ b/cppcache/integration-test/ThinClientDistOps.hpp
@@ -21,8 +21,6 @@
 #define GEODE_INTEGRATION_TEST_THINCLIENTDISTOPS_H_
 
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include "testobject/PdxType.hpp"
 #include <string>
 #include <limits>
@@ -39,7 +37,7 @@
 #define CREATE_TWICE_KEY "__create_twice_key"
 #define CREATE_TWICE_VALUE "__create_twice_value"
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableInt32;
 using apache::geode::client::CacheableInt64;
@@ -56,7 +54,7 @@
 static bool isLocator = false;
 static int numberOfLocators = 0;
 
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 
 void initClient(const bool isthinClient, const bool redirectLog) {
@@ -91,20 +89,18 @@
                   bool noKey) {
   // Verify key and value exist in this region, in this process.
   const char* value = val ? val : "";
-  char* buf =
-      reinterpret_cast<char*>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
+  std::string msg;
   if (noKey) {
-    sprintf(buf, "Verify key %s does not exist in region %s", key, name);
+    msg =
+        std::string("Verify key ") + key + " does not exist in region " + name;
   } else if (!val) {
-    sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-            name);
+    msg = std::string("Verify value for key ") + key +
+          " does not exist in region " + name;
   } else {
-    sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-            name);
+    msg = std::string("Verify value for key ") + key + " is: " + value +
+          " in region " + name;
   }
-  LOG(buf);
-  free(buf);
+  LOG(msg);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -149,7 +145,8 @@
           std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
       ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
-      LOG("In verify loop, get returned " + checkPtr->value() + " for key " + key);
+      LOG("In verify loop, get returned " + checkPtr->value() + " for key " +
+          key);
       if (strcmp(checkPtr->value().c_str(), value) != 0) {
         testValueCnt++;
       } else {
@@ -165,9 +162,8 @@
 
 void _verifyEntry(const char* name, const char* key, const char* val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyInvalid() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -176,20 +172,23 @@
                   bool clientNotificationEnabled = false,
                   bool cachingEnable = true) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr = getHelper()->createRegion(name, ackMode, cachingEnable, nullptr,
                                           endpoints, clientNotificationEnabled);
   ASSERT(regPtr != nullptr, "Failed to create region.");
   LOG("Region created.");
 }
-void createPooledRegion(const char* name, bool ackMode, const char* locators,
-                        const char* poolname,
+void createPooledRegion(const std::string& name, bool ackMode,
+                        const std::string& locators,
+                        const std::string& poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -197,13 +196,15 @@
   LOG("Pooled Region created.");
 }
 
-void createPooledRegionSticky(const char* name, bool ackMode,
-                              const char* locators, const char* poolname,
+void createPooledRegionSticky(const std::string& name, bool ackMode,
+                              const std::string& locators,
+                              const std::string& poolname,
                               bool clientNotificationEnabled = false,
                               bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr = getHelper()->createPooledRegionSticky(
       name, ackMode, locators, poolname, cachingEnable,
       clientNotificationEnabled);
@@ -213,9 +214,9 @@
 
 void createEntry(const char* name, const char* key, const char* value) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -291,6 +292,7 @@
    * null value*/
   // serializationRegistry->addPdxType(PdxTests::PdxType::createDeserializable);
   auto keyObject1 = std::make_shared<PdxTests::PdxType>();
+
   regPtr->create(keyObject1, x);
   auto retVal = regPtr->get(keyObject1);
   ASSERT(retVal == x, "retVal and x should match.");
@@ -299,6 +301,7 @@
    * cacheableInt,CacheableDouble, CacheableString,CacheableHashMap etc) key and
    * int value*/
   auto keyObject2 = std::make_shared<PdxTests::PdxType>();
+
   regPtr->create(keyObject2, 1);
   auto intVal =
       std::dynamic_pointer_cast<CacheableInt32>(regPtr->get(keyObject2));
@@ -320,6 +323,7 @@
    * cacheableInt,CacheableDouble, CacheableString,CacheableHashMap etc) key and
    * string value*/
   auto keyObject3 = std::make_shared<PdxTests::PdxType>();
+
   regPtr->create(keyObject3, "testString");
   auto strVal = regPtr->get(keyObject3);
   ASSERT(strcmp(strVal->toString().c_str(), "testString") == 0,
@@ -332,46 +336,17 @@
    * CacheableString,CacheableHashMap etc)  value*/
   auto keyObject4 = std::make_shared<PdxTests::PdxType>();
   auto valObject = std::make_shared<PdxTests::PdxType>();
+
   regPtr->create(keyObject4, valObject);
   auto objVal =
       std::dynamic_pointer_cast<PdxTests::PdxType>(regPtr->get(keyObject4));
   ASSERT(valObject == objVal, "valObject and objVal should match.");
-
-  /*9.create new entry witn non serialize object. IllegalArgumentException
-   * thrown*/
-  // This gives compile time error
-  //  class Person
-  //  {
-  //    int age;
-  //    char *name;
-  //    public:
-  //      Person()
-  //      {
-  //        age= 1;
-  //        name="testuser";
-  //      }
-  //  };
-  //  try{
-  //    regPtr->create(new Person(), 1);
-  //    FAIL("Expected IllegalArgumentException here");
-  //  }catch(IllegalArgumentException ex){
-  //    LOG("Expected IllegalArgumentException : %s");
-  //  }
-  //
-  //  try{
-  //    regPtr->create(100,new Person());
-  //    FAIL("Expected IllegalArgumentException here");
-  //  }catch(IllegalArgumentException ex){
-  //    LOG("Expected IllegalArgumentException : %s");
-  //  }
 }
 
 void createEntryTwice(const char* name, const char* key, const char* value) {
   LOG("createEntryTwice() entered.");
-  char message[500];
-  sprintf(message, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  LOG(message);
+  LOG(std::string("Creating entry -- key: ") + key + " value : " + value +
+      " in region \n" + name);
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
   auto regPtr = getHelper()->getRegion(name);
@@ -391,9 +366,9 @@
 
 void updateEntry(const char* name, const char* key, const char* value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -414,16 +389,14 @@
 
 void doGetAgain(const char* name, const char* key, const char* value) {
   LOG("doGetAgain() entered.");
-  fprintf(stdout,
-          "get for entry -- key: %s  expecting value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "get for entry -- key: " << key << " expecting value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "get  region name%s\n", regPtr->getName().c_str());
-  fflush(stdout);
+  std::cout << "get  region name " << regPtr->getName() << "\n" << std::flush;
   ASSERT(regPtr != nullptr, "Region not found.");
 
   auto checkPtr = std::dynamic_pointer_cast<CacheableString>(
@@ -431,10 +404,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In doGetAgain, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In doGetAgain, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -444,18 +415,15 @@
 
 void doNetsearch(const char* name, const char* key, const char* value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key
+            << " expecting value: " << value << " in region " << name << "\n"
+            << std::flush;
   static int count = 0;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
-  fflush(stdout);
+  std::cout << "netsearch region " << regPtr->getName() << "\n" << std::flush;
   ASSERT(regPtr != nullptr, "Region not found.");
 
   if (count == 0) {
@@ -470,10 +438,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -502,10 +468,7 @@
       FAIL(
           "Expected exception when doing operations on a non-existent region.");
     } catch (const CacheServerException& ex) {
-      printf(
-          "Got expected CacheServerException when performing operation "
-          "on a non-existent region: %s\n",
-          ex.what());
+      std::cout << "Got expected CacheServerException when performing operation on a non-existent region: " << ex.what() << "\n";
     }
   }
 END_TASK_DEFINITION
@@ -520,10 +483,7 @@
       FAIL(
           "Expected exception when doing operations on a non-existent region.");
     } catch (const CacheServerException& ex) {
-      printf(
-          "Got expected CacheServerException when performing operation "
-          "on a non-existent region: %s\n",
-          ex.what());
+      std::cout << "Got expected CacheServerException when performing operation on a non-existent region: " << ex.what() << "\n";
     }
   }
 END_TASK_DEFINITION
@@ -538,7 +498,7 @@
     isMultiuserMode = false, int updateLocatorListInterval = 5000 )
     */
     initClient(true, true);
-    getHelper()->createPool("__TESTPOOL1_", locatorsG, nullptr, 0, false,
+    getHelper()->createPool("__TESTPOOL1_", locatorsG, {}, 0, false,
                             std::chrono::milliseconds::zero(), -1, -1, false);
     LOG("CreatePoolForUpdateLocatorList complete.");
   }
@@ -554,7 +514,7 @@
     isMultiuserMode = false, int updateLocatorListInterval = 5000 )
     */
     initClient(true, true);
-    getHelper()->createPool("__TESTPOOL1_", locatorsG, nullptr, 0, false,
+    getHelper()->createPool("__TESTPOOL1_", locatorsG, {}, 0, false,
                             std::chrono::milliseconds::zero(), -1, -1, false);
     LOG("CreatePoolForDontUpdateLocatorList complete.");
   }
@@ -727,14 +687,11 @@
     try {
       reg->create(keyPtr, valPtr);
       char message[200];
-      sprintf(message, "First create on Key %s ", CREATE_TWICE_KEY);
-      LOG(message);
+      LOG(std::string("First create on Key ") + CREATE_TWICE_KEY);
       reg->create(keyPtr, valPtr);
-      sprintf(message, "Second create on Key %s ", CREATE_TWICE_KEY);
-      LOG(message);
+      LOG(std::string("Second create on Key ") + CREATE_TWICE_KEY);
       reg->create(keyPtr, valPtr);
-      sprintf(message, "Third create on Key %s ", CREATE_TWICE_KEY);
-      LOG(message);
+      LOG(std::string("Third create on Key ") + CREATE_TWICE_KEY);
     } catch (const EntryExistsException& geodeExcp) {
       LOG(geodeExcp.what());
       ASSERT(false,
@@ -767,15 +724,11 @@
     pool->releaseThreadLocalConnection();
     try {
       reg->create(keyPtr, valPtr);
-      char message[200];
-      sprintf(message, "First create on Key %s ", CREATE_TWICE_KEY);
-      LOG(message);
+      LOG(std::string("First create on Key ") + CREATE_TWICE_KEY);
       reg->create(keyPtr, valPtr);
-      sprintf(message, "Second create on Key %s ", CREATE_TWICE_KEY);
-      LOG(message);
+      LOG(std::string("Second create on Key ") + CREATE_TWICE_KEY);
       reg->create(keyPtr, valPtr);
-      sprintf(message, "Third create on Key %s ", CREATE_TWICE_KEY);
-      LOG(message);
+      LOG(std::string("Third create on Key ") + CREATE_TWICE_KEY);
     } catch (const EntryExistsException& geodeExcp) {
       LOG(geodeExcp.what());
       ASSERT(false,
diff --git a/cppcache/integration-test/ThinClientDistOps2.hpp b/cppcache/integration-test/ThinClientDistOps2.hpp
index e6da087..416af77 100644
--- a/cppcache/integration-test/ThinClientDistOps2.hpp
+++ b/cppcache/integration-test/ThinClientDistOps2.hpp
@@ -21,7 +21,6 @@
 #define GEODE_INTEGRATION_TEST_THINCLIENTDISTOPS2_H_
 
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
 
 #include <string>
 #include <vector>
@@ -36,7 +35,7 @@
 #define SERVER1 s2p1
 #define SERVER2 s2p2
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableInt32;
 using apache::geode::client::CacheableInt64;
@@ -53,7 +52,7 @@
 static int numberOfLocators = 0;
 const char* poolName = "__TEST_POOL1__";
 
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 
 #include "LocatorHelper.hpp"
@@ -62,9 +61,7 @@
 
 void _verifyEntry(const std::string& name, const char* key, const char* val,
                   bool checkLocal, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + ".");
   _verifyEntry(name, key, val, false, checkLocal);
   LOG("Entry verified.");
 }
@@ -93,16 +90,19 @@
 
 DUNIT_TASK_DEFINITION(SERVER2, CreateServer2And3_Locator)
   {
-    if (isLocalServer) CacheHelper::initServer(2, nullptr, locatorsG);
-    if (isLocalServer) CacheHelper::initServer(3, nullptr, locatorsG);
+    if (isLocalServer) {
+      CacheHelper::initServer(2, {}, locatorsG);
+    }
+    if (isLocalServer) {
+      CacheHelper::initServer(3, {}, locatorsG);
+    }
     LOG("SERVER23 started");
   }
 END_TASK_DEFINITION
 
 DUNIT_TASK_DEFINITION(CLIENT1, CreateClient1Regions_Pooled_Locator)
   {
-    initClientWithPool(true, "__TEST_POOL1__", locatorsG, nullptr, nullptr, 0,
-                       true);
+    initClientWithPool(true, "__TEST_POOL1__", locatorsG, {}, nullptr, 0, true);
     createPooledRegion(_regionNames[0], USE_ACK, locatorsG, poolName);
     createPooledRegion(_regionNames[1], NO_ACK, locatorsG, poolName);
     LOG("CreateClient1Regions complete.");
@@ -111,8 +111,7 @@
 
 DUNIT_TASK_DEFINITION(CLIENT2, CreateClient2Regions_Pooled_Locator)
   {
-    initClientWithPool(true, "__TEST_POOL1__", locatorsG, nullptr, nullptr, 0,
-                       true);
+    initClientWithPool(true, "__TEST_POOL1__", locatorsG, {}, nullptr, 0, true);
     createPooledRegion(_regionNames[0], USE_ACK, locatorsG, poolName);
     createPooledRegion(_regionNames[1], NO_ACK, locatorsG, poolName);
     LOG("CreateClient1Regions complete.");
@@ -169,7 +168,7 @@
     // re-create region with caching enabled
     reg0->localDestroyRegion();
     reg0 = nullptr;
-    getHelper()->createPooledRegion(regionNames[0], USE_ACK, nullptr,
+    getHelper()->createPooledRegion(regionNames[0], USE_ACK, {},
                                     "__TEST_POOL1__", true, true);
     reg0 = getHelper()->getRegion(_regionNames[0]);
     // check for IllegalArgumentException for empty key list
diff --git a/cppcache/integration-test/ThinClientDurable.hpp b/cppcache/integration-test/ThinClientDurable.hpp
index 1929d83..1786462 100644
--- a/cppcache/integration-test/ThinClientDurable.hpp
+++ b/cppcache/integration-test/ThinClientDurable.hpp
@@ -25,6 +25,7 @@
 
 #include <thread>
 #include <chrono>
+#include <sstream>
 
 /* Testing Parameters              Param's Value
 Termination :                   Keepalive = true/ false, Client crash / Netdown
@@ -46,7 +47,7 @@
 #define SERVER1 s2p1
 #define FEEDER s2p2
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::EntryEvent;
 using apache::geode::client::Exception;
@@ -70,17 +71,17 @@
     }
 
     char buff[128] = {'\0'};
+    std::stringstream strm;
     auto keyPtr = std::dynamic_pointer_cast<CacheableString>(key);
     if (value != nullptr) {
-      sprintf(buff, "Event [%s, %d] called for %s:%s",
-              keyPtr->toString().c_str(), value->value(), m_clientName.c_str(),
-              m_regionName.c_str());
+      strm << "Event[" << keyPtr->toString() << ", " << value->value()
+           << "] called for " << m_clientName << ":" << m_regionName;
       m_map[key] = value;
     } else {
-      sprintf(buff, "Event Key=%s called for %s:%s", keyPtr->toString().c_str(),
-              m_clientName.c_str(), m_regionName.c_str());
+      strm << "Event Key=" << keyPtr->toString() << "called for "
+           << m_clientName << ":" << m_regionName;
     }
-    LOG(buff);
+    LOG(strm.str());
   }
 
  public:
@@ -92,15 +93,16 @@
   void validate(size_t keyCount, int eventcount, int durableValue,
                 int nonDurableValue) {
     LOG("validate called");
-    char buf[256] = {'\0'};
+    std::stringstream strm;
 
-    sprintf(buf, "Expected %zd keys for the region, Actual = %zd", keyCount,
-            m_map.size());
-    ASSERT(m_map.size() == keyCount, buf);
+    strm << "Expected " << keyCount
+         << " keys for the region, Actual = " << m_map.size();
+    ASSERT(m_map.size() == keyCount, strm.str());
 
-    sprintf(buf, "Expected %d events for the region, Actual = %d", eventcount,
-            m_ops);
-    ASSERT(m_ops == eventcount, buf);
+    strm.str("");
+    strm << "Expected " << eventcount
+         << " events for the region, Actual = " << m_ops;
+    ASSERT(m_ops == eventcount, strm.str());
 
     for (const auto& item : m_map) {
       const auto keyPtr =
@@ -110,14 +112,15 @@
 
       if (keyPtr->toString().find('D') ==
           std::string::npos) { /*Non Durable Key */
-        sprintf(buf,
-                "Expected final value for nonDurable Keys = %d, Actual = %d",
-                nonDurableValue, valuePtr->value());
-        ASSERT(valuePtr->value() == nonDurableValue, buf);
+        strm.str("");
+        strm << "Expected final value for nonDurable Keys = " << nonDurableValue
+             << ", Actual = " << valuePtr->value();
+        ASSERT(valuePtr->value() == nonDurableValue, strm.str());
       } else { /*Durable Key */
-        sprintf(buf, "Expected final value for Durable Keys = %d, Actual = %d",
-                durableValue, valuePtr->value());
-        ASSERT(valuePtr->value() == durableValue, buf);
+        strm.str("");
+        strm << "Expected final value for Durable Keys = " << durableValue
+             << ", Actual = " << valuePtr->value();
+        ASSERT(valuePtr->value() == durableValue, strm.str());
       }
     }
   }
@@ -137,9 +140,9 @@
     check(event);
   }
 
-  void afterRegionInvalidate(const RegionEvent&) override{}
+  void afterRegionInvalidate(const RegionEvent&) override {}
 
-  void afterRegionDestroy(const RegionEvent&) override{}
+  void afterRegionDestroy(const RegionEvent&) override {}
 };
 
 void setCacheListener(const char* regName,
@@ -149,9 +152,7 @@
   attrMutator->setCacheListener(monitor);
 }
 std::shared_ptr<OperMonitor> mon1C1 = nullptr;
-std::shared_ptr<OperMonitor> mon2C1 = nullptr;
 std::shared_ptr<OperMonitor> mon1C2 = nullptr;
-std::shared_ptr<OperMonitor> mon2C2 = nullptr;
 
 /* Total 10 Keys , alternate durable and non-durable */
 const char* mixKeys[] = {"Key-1", "D-Key-1", "L-Key", "LD-Key"};
@@ -163,7 +164,6 @@
 void initClientCache(int durableIdx, int redundancy,
                      std::chrono::seconds durableTimeout,
                      std::shared_ptr<OperMonitor>& mon1,
-                     std::shared_ptr<OperMonitor>& mon2,
                      int sleepDuration = 0) {
   // Sleep before starting , Used for Timeout testing.
   if (sleepDuration) SLEEP(sleepDuration);
@@ -171,39 +171,30 @@
   initClientAndTwoRegions(durableIdx, redundancy, durableTimeout);
 
   setCacheListener(regionNames[0], mon1);
-  setCacheListener(regionNames[1], mon2);
 
   getHelper()->cachePtr->readyForEvents();
 
   auto regPtr0 = getHelper()->getRegion(regionNames[0]);
-  auto regPtr1 = getHelper()->getRegion(regionNames[1]);
 
   // Register Regex in both region.
   regPtr0->registerRegex(testRegex[0], true);
   regPtr0->registerRegex(testRegex[1], false);
-  regPtr1->registerRegex(testRegex[0], true);
-  regPtr1->registerRegex(testRegex[1], false);
 
   // Register List in both regions
   std::vector<std::shared_ptr<CacheableKey>> v;
   auto ldkey = CacheableKey::create(mixKeys[3]);
   v.push_back(ldkey);
   regPtr0->registerKeys(v, true);
-  regPtr1->registerKeys(v, true);
   v.clear();
   auto lkey = CacheableKey::create(mixKeys[2]);
   v.push_back(lkey);
   regPtr0->registerKeys(v);
-  regPtr1->registerKeys(v);
 
   LOG("Clnt1Init complete.");
 }
 
-void feederUpdate(int value, int ignoreR2 = false) {
-  for (int regIdx = 0; regIdx < 2; regIdx++) {
-    if (ignoreR2 && regIdx == 1) {
-      continue;
-    }
+void feederUpdate(int value) {
+  for (int regIdx = 0; regIdx < 1; regIdx++) {
     createIntEntry(regionNames[regIdx], mixKeys[0], value);
     std::this_thread::sleep_for(std::chrono::milliseconds(10));
     createIntEntry(regionNames[regIdx], mixKeys[1], value);
@@ -226,12 +217,9 @@
 
 DUNIT_TASK_DEFINITION(FEEDER, FeederInit)
   {
-    initClientWithPool(true, "__TEST_POOL1__", locatorsG, nullptr, nullptr, 0,
-                       true);
+    initClientWithPool(true, "__TEST_POOL1__", locatorsG, {}, nullptr, 0, true);
     getHelper()->createPooledRegion(regionNames[0], USE_ACK, locatorsG,
                                     "__TEST_POOL1__", true, true);
-    getHelper()->createPooledRegion(regionNames[1], USE_ACK, locatorsG,
-                                    "__TEST_POOL1__", true, true);
     LOG("FeederInit complete.");
   }
 END_TASK_DEFINITION
@@ -241,11 +229,8 @@
     if (mon1C1 == nullptr) {
       mon1C1 = std::make_shared<OperMonitor>(durableIds[0], regionNames[0]);
     }
-    if (mon2C1 == nullptr) {
-      mon2C1 = std::make_shared<OperMonitor>(durableIds[0], regionNames[1]);
-    }
     initClientCache(0, 0 /* Redundancy */,
-                    std::chrono::seconds(300) /* D Timeout */, mon1C1, mon2C1);
+                    std::chrono::seconds(300) /* D Timeout */, mon1C1);
   }
 END_TASK_DEFINITION
 
@@ -254,11 +239,8 @@
     if (mon1C1 == nullptr) {
       mon1C1 = std::make_shared<OperMonitor>(durableIds[0], regionNames[0]);
     }
-    if (mon2C1 == nullptr) {
-      mon2C1 = std::make_shared<OperMonitor>(durableIds[0], regionNames[1]);
-    }
     initClientCache(0, 0 /* Redundancy */,
-                    std::chrono::seconds(30) /* D Timeout */, mon1C1, mon2C1);
+                    std::chrono::seconds(30) /* D Timeout */, mon1C1);
   }
 END_TASK_DEFINITION
 
@@ -267,11 +249,8 @@
     if (mon1C1 == nullptr) {
       mon1C1 = std::make_shared<OperMonitor>(durableIds[0], regionNames[0]);
     }
-    if (mon2C1 == nullptr) {
-      mon2C1 = std::make_shared<OperMonitor>(durableIds[0], regionNames[1]);
-    }
     initClientCache(0, 0 /* Redundancy */,
-                    std::chrono::seconds(30) /* D Timeout */, mon1C1, mon2C1,
+                    std::chrono::seconds(30) /* D Timeout */, mon1C1,
                     35000 /* Sleep before starting */);
   }
 END_TASK_DEFINITION
@@ -281,11 +260,8 @@
     if (mon1C2 == nullptr) {
       mon1C2 = std::make_shared<OperMonitor>(durableIds[1], regionNames[0]);
     }
-    if (mon2C2 == nullptr) {
-      mon2C2 = std::make_shared<OperMonitor>(durableIds[1], regionNames[1]);
-    }
     initClientCache(1, 1 /* Redundancy */,
-                    std::chrono::seconds(300) /* D Timeout */, mon1C2, mon2C2);
+                    std::chrono::seconds(300) /* D Timeout */, mon1C2);
   }
 END_TASK_DEFINITION
 
@@ -295,11 +271,8 @@
     if (mon1C2 == nullptr) {
       mon1C2 = std::make_shared<OperMonitor>(durableIds[1], regionNames[0]);
     }
-    if (mon2C2 == nullptr) {
-      mon2C2 = std::make_shared<OperMonitor>(durableIds[1], regionNames[1]);
-    }
     initClientCache(1, 1 /* Redundancy */,
-                    std::chrono::seconds(30) /* D Timeout */, mon1C2, mon2C2);
+                    std::chrono::seconds(30) /* D Timeout */, mon1C2);
   }
 END_TASK_DEFINITION
 
@@ -409,7 +382,7 @@
 
 DUNIT_TASK_DEFINITION(FEEDER, FeederUpdate2)
   {
-    feederUpdate(2, true);
+    feederUpdate(2);
     LOG("FeederUpdate2 complete.");
   }
 END_TASK_DEFINITION
@@ -419,7 +392,6 @@
   {
     LOG("Client 1 Verify first feeder update.");
     mon1C1->validate(4, 8, 1, 1);
-    mon2C1->validate(4, 8, 1, 1);
   }
 END_TASK_DEFINITION
 
@@ -427,7 +399,6 @@
   {
     LOG("Client 2 Verify first feeder udpate.");
     mon1C2->validate(4, 8, 1, 1);
-    mon2C2->validate(4, 8, 1, 1);
   }
 END_TASK_DEFINITION
 
@@ -436,7 +407,6 @@
   {
     LOG("Client 1 Verify.");
     mon1C1->validate(4, 12, 2, 1);
-    mon2C1->validate(4, 8, 1, 1);
   }
 END_TASK_DEFINITION
 
@@ -445,7 +415,6 @@
   {
     LOG("Client 1 Verify.");
     mon1C1->validate(4, 8, 1, 1);
-    mon2C1->validate(4, 8, 1, 1);
   }
 END_TASK_DEFINITION
 
@@ -454,7 +423,6 @@
   {
     LOG("Client 2 Verify.");
     mon1C2->validate(4, 12, 2, 1);
-    mon2C2->validate(4, 8, 1, 1);
   }
 END_TASK_DEFINITION
 
@@ -463,7 +431,6 @@
   {
     LOG("Client 2 Verify.");
     mon1C2->validate(4, 8, 1, 1);
-    mon2C2->validate(4, 8, 1, 1);
   }
 END_TASK_DEFINITION
 
@@ -477,7 +444,6 @@
 DUNIT_TASK_DEFINITION(CLIENT1, CloseClient1)
   {
     mon1C1 = nullptr;
-    mon2C1 = nullptr;
     cleanProc();
     LOG("CLIENT1 closed");
   }
@@ -486,7 +452,6 @@
 DUNIT_TASK_DEFINITION(CLIENT2, CloseClient2)
   {
     mon1C2 = nullptr;
-    mon2C2 = nullptr;
     cleanProc();
     LOG("CLIENT2 closed");
   }
diff --git a/cppcache/integration-test/ThinClientDurableConnect.hpp b/cppcache/integration-test/ThinClientDurableConnect.hpp
index 5c1c94b..ef89645 100644
--- a/cppcache/integration-test/ThinClientDurableConnect.hpp
+++ b/cppcache/integration-test/ThinClientDurableConnect.hpp
@@ -46,16 +46,14 @@
 #define SERVER1 s1p2
 
 bool isLocalServerList = false;
-const std::string endPointsList = CacheHelper::getTcrEndpoints(isLocalServerList, 4);
+const std::string endPointsList =
+    CacheHelper::getTcrEndpoints(isLocalServerList, 4);
 const char* durableId = "DurableId";
 
 #include "ThinClientDurableInit.hpp"
 #include "ThinClientTasks_C2S2.hpp"
 
-const char* g_Locators = locatorsG;
-
 std::string getServerEndPoint(int instance) {
-  char instanceStr[16];
   int port;
   if (instance == 1) {
     port = CacheHelper::staticHostPort1;
@@ -67,30 +65,14 @@
     port = CacheHelper::staticHostPort4;
   }
 
-  std::string retVal(ACE_OS::itoa(port, instanceStr, 10));
-  return retVal;
-
-  std::string allEndPts(endPointsList);
-  std::string::size_type start_idx = 0;
-  std::string::size_type end_idx = 0;
-
-  for (int i = 0; i < instance - 1; i++) {
-    start_idx = allEndPts.find(',', start_idx) + 1;
-  }
-
-  end_idx = allEndPts.find(',', start_idx);
-  if (end_idx == std::string::npos) { /* asking for last endpoint */
-    end_idx = allEndPts.size();
-  }
-
-  return (std::string(allEndPts, start_idx, end_idx - start_idx));
+  return std::to_string(port);
 }
 
 DUNIT_TASK_DEFINITION(SERVER_SET1, S1Up)
   {
     if (isLocalServer) {
       CacheHelper::initServer(1, "cacheserver_notify_subscription.xml",
-                              g_Locators);
+                              locatorsG);
     }
     LOG("SERVER 1 started");
   }
@@ -100,7 +82,7 @@
   {
     if (isLocalServer) {
       CacheHelper::initServer(2, "cacheserver_notify_subscription2.xml",
-                              g_Locators);
+                              locatorsG);
     }
     LOG("SERVER 2 started");
   }
@@ -110,7 +92,7 @@
   {
     if (isLocalServer) {
       CacheHelper::initServer(3, "cacheserver_notify_subscription3.xml",
-                              g_Locators);
+                              locatorsG);
     }
     LOG("SERVER 3 started");
   }
@@ -120,7 +102,7 @@
   {
     if (isLocalServer) {
       CacheHelper::initServer(4, "cacheserver_notify_subscription4.xml",
-                              g_Locators);
+                              locatorsG);
     }
     LOG("SERVER 4 started");
   }
diff --git a/cppcache/integration-test/ThinClientDurableFailover.hpp b/cppcache/integration-test/ThinClientDurableFailover.hpp
index 4f3000a..44371f7 100644
--- a/cppcache/integration-test/ThinClientDurableFailover.hpp
+++ b/cppcache/integration-test/ThinClientDurableFailover.hpp
@@ -45,7 +45,7 @@
 #define SERVER1 s2p1
 #define FEEDER s2p2
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::EntryEvent;
 using apache::geode::client::Exception;
@@ -69,10 +69,8 @@
 
     auto keyPtr = std::dynamic_pointer_cast<CacheableString>(key);
     if (keyPtr != nullptr && value != nullptr) {
-      char buf[256] = {'\0'};
-      sprintf(buf, " Got Key: %s, Value: %d", keyPtr->toString().c_str(),
-              value->value());
-      LOG(buf);
+      LOG(std::string("Got Key: ") + keyPtr->toString() +
+          ", Value: " + std::to_string(value->value()));
     }
 
     if (value) {
@@ -88,30 +86,34 @@
   void validate(size_t keyCount, int eventcount, int durableValue,
                 int nonDurableValue) {
     LOG("validate called");
-    char buf[256] = {'\0'};
+    std::stringstream strm;
 
-    sprintf(buf, "Expected %zd keys for the region, Actual = %zd", keyCount,
-            m_map.size());
-    ASSERT(m_map.size() == keyCount, buf);
+    strm << "Expected " << keyCount
+         << " keys for the region, Actual = " << m_map.size();
+    ASSERT(m_map.size() == keyCount, strm.str());
 
-    sprintf(buf, "Expected %d events for the region, Actual = %d", eventcount,
-            m_ops);
-    ASSERT(m_ops == eventcount, buf);
+    strm.str("");
+    strm << "Expected " << eventcount
+         << " events for the region, Actual = " << m_ops;
+    ASSERT(m_ops == eventcount, strm.str());
 
     for (const auto& item : m_map) {
-      auto keyPtr = std::dynamic_pointer_cast<CacheableString>(item.first);
-      auto valuePtr = std::dynamic_pointer_cast<CacheableInt32>(item.second);
+      const auto keyPtr =
+          std::dynamic_pointer_cast<CacheableString>(item.first);
+      const auto valuePtr =
+          std::dynamic_pointer_cast<CacheableInt32>(item.second);
 
       if (keyPtr->toString().find('D') ==
           std::string::npos) { /*Non Durable Key */
-        sprintf(buf,
-                "Expected final value for nonDurable Keys = %d, Actual = %d",
-                nonDurableValue, valuePtr->value());
-        ASSERT(valuePtr->value() == nonDurableValue, buf);
+        strm.str("");
+        strm << "Expected final value for nonDurable Keys = " << nonDurableValue
+             << ", Actual = " << valuePtr->value();
+        ASSERT(valuePtr->value() == nonDurableValue, strm.str());
       } else { /*Durable Key */
-        sprintf(buf, "Expected final value for Durable Keys = %d, Actual = %d",
-                durableValue, valuePtr->value());
-        ASSERT(valuePtr->value() == durableValue, buf);
+        strm.str("");
+        strm << "Expected final value for Durable Keys = " << durableValue
+             << ", Actual = " << valuePtr->value();
+        ASSERT(valuePtr->value() == durableValue, strm.str());
       }
     }
   }
@@ -131,9 +133,9 @@
     check(event);
   }
 
-  void afterRegionInvalidate(const RegionEvent&) override{}
+  void afterRegionInvalidate(const RegionEvent&) override {}
 
-  void afterRegionDestroy(const RegionEvent&) override{}
+  void afterRegionDestroy(const RegionEvent&) override {}
 };
 
 void setCacheListener(const char* regName,
@@ -234,8 +236,7 @@
 
 DUNIT_TASK_DEFINITION(FEEDER, FeederInit)
   {
-    initClientWithPool(true, "__TEST_POOL1__", locatorsG, nullptr, nullptr, 0,
-                       true);
+    initClientWithPool(true, "__TEST_POOL1__", locatorsG, {}, nullptr, 0, true);
     getHelper()->createPooledRegion(regionNames[0], USE_ACK, locatorsG,
                                     "__TEST_POOL1__", true, true);
     LOG("FeederInit complete.");
diff --git a/cppcache/integration-test/ThinClientDurableInit.hpp b/cppcache/integration-test/ThinClientDurableInit.hpp
index d5375dc..6b85adf 100644
--- a/cppcache/integration-test/ThinClientDurableInit.hpp
+++ b/cppcache/integration-test/ThinClientDurableInit.hpp
@@ -26,7 +26,7 @@
 
 static bool isLocator = false;
 static int numberOfLocators = 1;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 
 void initClientAndRegion(
diff --git a/cppcache/integration-test/ThinClientDurableInterest.hpp b/cppcache/integration-test/ThinClientDurableInterest.hpp
index 8cb610b..547ae2e 100644
--- a/cppcache/integration-test/ThinClientDurableInterest.hpp
+++ b/cppcache/integration-test/ThinClientDurableInterest.hpp
@@ -44,7 +44,7 @@
 #define SERVER1 s2p1
 #define FEEDER s2p2
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::EntryEvent;
 using apache::geode::client::HashMapOfCacheable;
@@ -61,12 +61,9 @@
     auto key = event.getKey();
     auto value = std::dynamic_pointer_cast<CacheableInt32>(event.getNewValue());
 
-    char buf[256];
-    sprintf(buf,
-            "Received event for Cachelistener id =%d with key %s and value %d.",
-            m_id, key->toString().c_str(), value->value());
-    LOG(buf);
-
+    LOG(std::string("Received event for Cachelistener id =") +
+        std::to_string(m_id) + " with key " + key->toString() + " and value " +
+        std::to_string(value->value()) + ".");
     m_map[key] = value;
   }
 
@@ -82,15 +79,16 @@
   void validate(size_t keyCount, int eventcount, int durableValue,
                 int nonDurableValue) {
     LOG("validate called");
-    char buf[256] = {'\0'};
+    std::stringstream strm;
 
-    sprintf(buf, "Expected %zd keys for the region, Actual = %zd", keyCount,
-            m_map.size());
-    ASSERT(m_map.size() == keyCount, buf);
+    strm << "Expected " << keyCount
+         << " keys for the region, Actual = " << m_map.size();
+    ASSERT(m_map.size() == keyCount, strm.str());
 
-    sprintf(buf, "Expected %d events for the region, Actual = %d", eventcount,
-            m_ops);
-    ASSERT(m_ops == eventcount, buf);
+    strm.str("");
+    strm << "Expected " << eventcount
+         << " events for the region, Actual = " << m_ops;
+    ASSERT(m_ops == eventcount, strm.str());
 
     for (const auto& item : m_map) {
       const auto keyPtr =
@@ -100,14 +98,15 @@
 
       if (keyPtr->toString().find('D') ==
           std::string::npos) { /*Non Durable Key */
-        sprintf(buf,
-                "Expected final value for nonDurable Keys = %d, Actual = %d",
-                nonDurableValue, valuePtr->value());
-        ASSERT(valuePtr->value() == nonDurableValue, buf);
+        strm.str("");
+        strm << "Expected final value for nonDurable Keys = " << nonDurableValue
+             << ", Actual = " << valuePtr->value();
+        ASSERT(valuePtr->value() == nonDurableValue, strm.str());
       } else { /*Durable Key */
-        sprintf(buf, "Expected final value for Durable Keys = %d, Actual = %d",
-                durableValue, valuePtr->value());
-        ASSERT(valuePtr->value() == durableValue, buf);
+        strm.str("");
+        strm << "Expected final value for Durable Keys = " << durableValue
+             << ", Actual = " << valuePtr->value();
+        ASSERT(valuePtr->value() == durableValue, strm.str());
       }
     }
   }
@@ -116,9 +115,9 @@
 
   void afterUpdate(const EntryEvent& event) override { check(event); }
 
-  void afterRegionInvalidate(const RegionEvent&) override{}
+  void afterRegionInvalidate(const RegionEvent&) override {}
 
-  void afterRegionDestroy(const RegionEvent&) override{}
+  void afterRegionDestroy(const RegionEvent&) override {}
 
   void afterRegionLive(const RegionEvent&) override {
     LOG("afterRegionLive called.");
@@ -214,8 +213,7 @@
 
 DUNIT_TASK_DEFINITION(FEEDER, FeederInit)
   {
-    initClientWithPool(true, "__TEST_POOL1__", locatorsG, nullptr, nullptr, 0,
-                       true);
+    initClientWithPool(true, "__TEST_POOL1__", locatorsG, {}, nullptr, 0, true);
     getHelper()->createPooledRegion(regionNames[0], USE_ACK, locatorsG,
                                     "__TEST_POOL1__", true, true);
     getHelper()->createPooledRegion(regionNames[1], NO_ACK, locatorsG,
diff --git a/cppcache/integration-test/ThinClientDurableReconnect.hpp b/cppcache/integration-test/ThinClientDurableReconnect.hpp
index cba82f6..c09161c 100644
--- a/cppcache/integration-test/ThinClientDurableReconnect.hpp
+++ b/cppcache/integration-test/ThinClientDurableReconnect.hpp
@@ -38,7 +38,7 @@
 #define SERVER1 s2p1
 #define FEEDER s2p2
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::EntryEvent;
 
diff --git a/cppcache/integration-test/ThinClientFailover.hpp b/cppcache/integration-test/ThinClientFailover.hpp
index 21d2770..1977e16 100644
--- a/cppcache/integration-test/ThinClientFailover.hpp
+++ b/cppcache/integration-test/ThinClientFailover.hpp
@@ -21,9 +21,7 @@
  */
 
 #include "fw_dunit.hpp"
-#include <ace/High_Res_Timer.h>
 
-#include <ace/OS.h>
 #include <string>
 
 #define ROOT_NAME "ThinClientFailover"
@@ -31,7 +29,7 @@
 
 #include "CacheHelper.hpp"
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
@@ -47,7 +45,7 @@
 #define SERVER2 s2p2
 static bool isLocator = false;
 // static int numberOfLocators = 0;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #include "LocatorHelper.hpp"
 void initClient(const bool isthinClient) {
@@ -72,20 +70,18 @@
                   bool noKey) {
   // Verify key and value exist in this region, in this process.
   const char* value = val ? val : "";
-  char* buf =
-      reinterpret_cast<char*>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
+  std::string msg;
   if (noKey) {
-    sprintf(buf, "Verify key %s does not exist in region %s", key, name);
+    msg =
+        std::string("Verify key ") + key + " does not exist in region " + name;
   } else if (!val) {
-    sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-            name);
+    msg = std::string("Verify value for key ") + key +
+          " does not exist in region " + name;
   } else {
-    sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-            name);
+    msg = std::string("Verify value for key ") + key + " is: " + value +
+          " in region " + name;
   }
-  LOG(buf);
-  free(buf);
+  LOG(msg);
 
   auto regPtr = getHelper()->getRegion(name);
   LOG("_verifyEntry =================");
@@ -127,7 +123,8 @@
           std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
       ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
-      LOG("In verify loop, get returned " + checkPtr->value() + " for key " + key);
+      LOG("In verify loop, get returned " + checkPtr->value() + " for key " +
+          key);
       if (strcmp(checkPtr->value().c_str(), value) != 0) {
         testValueCnt++;
       } else {
@@ -143,9 +140,7 @@
 
 void _verifyEntry(const char* name, const char* key, const char* val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -153,21 +148,24 @@
 void createRegion(const char* name, bool ackMode, const char* endpoints,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   // ack, caching
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
                                           endpoints, clientNotificationEnabled);
   ASSERT(regPtr != nullptr, "Failed to create region.");
   LOG("Region created.");
 }
-void createPooledRegion(const char* name, bool ackMode, const char* locators,
-                        const char* poolname,
+void createPooledRegion(const std::string& name, bool ackMode,
+                        const std::string& locators,
+                        const std::string& poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -175,13 +173,15 @@
   LOG("Pooled Region created.");
 }
 
-void createPooledRegionSticky(const char* name, bool ackMode,
-                              const char* locators, const char* poolname,
+void createPooledRegionSticky(const std::string& name, bool ackMode,
+                              const std::string& locators,
+                              const std::string& poolname,
                               bool clientNotificationEnabled = false,
                               bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr = getHelper()->createPooledRegionSticky(
       name, ackMode, locators, poolname, cachingEnable,
       clientNotificationEnabled);
@@ -191,9 +191,9 @@
 
 void createEntry(const char* name, const char* key, const char* value) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -216,9 +216,9 @@
 
 void updateEntry(const char* name, const char* key, const char* value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -239,17 +239,14 @@
 
 void doNetsearch(const char* name, const char* key, const char* value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key
+            << " expecting value: " << value << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
-  fflush(stdout);
+  std::cout << "netsearch region " << regPtr->getName() << "\n" << std::flush;
   ASSERT(regPtr != nullptr, "Region not found.");
 
   // ASSERT( !regPtr->containsKey( keyPtr ), "Key should not have been found in
@@ -262,10 +259,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -278,7 +273,7 @@
 const char* nvals[] = {"New Value-1", "New Value-2", "New Value-3",
                        "New Value-4"};
 
-const char* regionNames[] = {"DistRegionAck", "DistRegionNoAck"};
+const char* regionName = "DistRegionAck";
 
 const bool USE_ACK = true;
 const bool NO_ACK = false;
@@ -293,8 +288,7 @@
 DUNIT_TASK_DEFINITION(CLIENT1, StepOne_Pooled_Locator)
   {
     initClient(true);
-    createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TEST_POOL1__");
-    createPooledRegion(regionNames[1], NO_ACK, locatorsG, "__TEST_POOL2__");
+    createPooledRegion(regionName, USE_ACK, locatorsG, "__TEST_POOL1__");
     LOG("StepOne_Pooled_Locator complete.");
   }
 END_TASK_DEFINITION
@@ -302,10 +296,7 @@
 DUNIT_TASK_DEFINITION(CLIENT1, StepOne_Pooled_Locator_Sticky)
   {
     initClient(true);
-    createPooledRegionSticky(regionNames[0], USE_ACK, locatorsG,
-                             "__TEST_POOL1__");
-    createPooledRegionSticky(regionNames[1], NO_ACK, locatorsG,
-                             "__TEST_POOL2__");
+    createPooledRegionSticky(regionName, USE_ACK, locatorsG, "__TEST_POOL1__");
     LOG("StepOne_Pooled_Locator complete.");
   }
 END_TASK_DEFINITION
@@ -313,8 +304,7 @@
 DUNIT_TASK_DEFINITION(CLIENT2, StepTwo_Pooled_Locator)
   {
     initClient(true);
-    createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TEST_POOL1__");
-    createPooledRegion(regionNames[1], NO_ACK, locatorsG, "__TEST_POOL2__");
+    createPooledRegion(regionName, USE_ACK, locatorsG, "__TEST_POOL1__");
     LOG("StepTwo complete.");
   }
 END_TASK_DEFINITION
@@ -322,28 +312,22 @@
 DUNIT_TASK_DEFINITION(CLIENT2, StepTwo_Pooled_Locator_Sticky)
   {
     initClient(true);
-    createPooledRegionSticky(regionNames[0], USE_ACK, locatorsG,
-                             "__TEST_POOL1__");
-    createPooledRegionSticky(regionNames[1], NO_ACK, locatorsG,
-                             "__TEST_POOL2__");
+    createPooledRegionSticky(regionName, USE_ACK, locatorsG, "__TEST_POOL1__");
     LOG("StepTwo complete.");
   }
 END_TASK_DEFINITION
 
 DUNIT_TASK_DEFINITION(CLIENT1, StepThree)
   {
-    createEntry(regionNames[0], keys[0], vals[0]);
-    createEntry(regionNames[1], keys[2], vals[2]);
+    createEntry(regionName, keys[0], vals[0]);
     LOG("StepThree complete.");
   }
 END_TASK_DEFINITION
 
 DUNIT_TASK_DEFINITION(CLIENT2, StepFour)
   {
-    doNetsearch(regionNames[0], keys[0], vals[0]);
-    doNetsearch(regionNames[1], keys[2], vals[2]);
-    createEntry(regionNames[0], keys[1], vals[1]);
-    createEntry(regionNames[1], keys[3], vals[3]);
+    doNetsearch(regionName, keys[0], vals[0]);
+    createEntry(regionName, keys[1], vals[1]);
     LOG("StepFour complete.");
   }
 END_TASK_DEFINITION
@@ -367,17 +351,14 @@
   {
     // doNetsearch( regionNames[0], keys[1], vals[1] );
     // doNetsearch( regionNames[1], keys[3], vals[3] );
-    updateEntry(regionNames[0], keys[0], nvals[0]);
-    updateEntry(regionNames[1], keys[2], nvals[2]);
+    updateEntry(regionName, keys[0], nvals[0]);
     LOG("StepFive complete.");
   }
 END_TASK_DEFINITION
 DUNIT_TASK_DEFINITION(CLIENT2, StepSix)
   {
-    doNetsearch(regionNames[0], keys[0], vals[0]);
-    doNetsearch(regionNames[1], keys[2], vals[2]);
-    updateEntry(regionNames[0], keys[1], nvals[1]);
-    updateEntry(regionNames[1], keys[3], nvals[3]);
+    doNetsearch(regionName, keys[0], vals[0]);
+    updateEntry(regionName, keys[1], nvals[1]);
     LOG("StepSix complete.");
   }
 END_TASK_DEFINITION
diff --git a/cppcache/integration-test/ThinClientFailover2.hpp b/cppcache/integration-test/ThinClientFailover2.hpp
index 094f6bf..36e49b9 100644
--- a/cppcache/integration-test/ThinClientFailover2.hpp
+++ b/cppcache/integration-test/ThinClientFailover2.hpp
@@ -21,9 +21,7 @@
  */
 
 #include "fw_dunit.hpp"
-#include <ace/High_Res_Timer.h>
 
-#include <ace/OS.h>
 #include <string>
 
 #define ThinClientFailover2 "DistOps"
@@ -31,7 +29,7 @@
 
 #include "CacheHelper.hpp"
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
@@ -50,7 +48,7 @@
 #define SERVER2 s2p2
 static bool isLocator = false;
 static int numberOfLocators = 0;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 #include "LocatorHelper.hpp"
 void initClient(const bool isthinClient) {
@@ -75,20 +73,18 @@
                   bool noKey) {
   // Verify key and value exist in this region, in this process.
   const char* value = val ? val : "";
-  char* buf =
-      reinterpret_cast<char*>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
+  std::string msg;
   if (noKey) {
-    sprintf(buf, "Verify key %s does not exist in region %s", key, name);
+    msg =
+        std::string("Verify key ") + key + " does not exist in region " + name;
   } else if (!val) {
-    sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-            name);
+    msg = std::string("Verify value for key ") + key +
+          " does not exist in region " + name;
   } else {
-    sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-            name);
+    msg = std::string("Verify value for key ") + key + " is: " + value +
+          " in region " + name;
   }
-  LOG(buf);
-  free(buf);
+  LOG(msg);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -129,7 +125,8 @@
           std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
       ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
-      LOG("In verify loop, get returned " + checkPtr->value() + " for key " + key);
+      LOG("In verify loop, get returned " + checkPtr->value() + " for key " +
+          key);
       if (strcmp(checkPtr->value().c_str(), value) != 0) {
         testValueCnt++;
       } else {
@@ -144,9 +141,8 @@
 #define verifyInvalid(x, y) _verifyInvalid(x, y, __LINE__)
 
 void _verifyInvalid(const char* name, const char* key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyInvalid() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyInvalid() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, false);
   LOG("Entry invalidated.");
 }
@@ -154,9 +150,8 @@
 #define verifyDestroyed(x, y) _verifyDestroyed(x, y, __LINE__)
 
 void _verifyDestroyed(const char* name, const char* key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyDestroyed() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyDestroyed() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, true);
   LOG("Entry destroyed.");
 }
@@ -165,9 +160,7 @@
 
 void _verifyEntry(const char* name, const char* key, const char* val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -175,21 +168,24 @@
 void createRegion(const char* name, bool ackMode, const char* endpoints,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   // ack, caching
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
                                           endpoints, clientNotificationEnabled);
   ASSERT(regPtr != nullptr, "Failed to create region.");
   LOG("Region created.");
 }
-void createPooledRegion(const char* name, bool ackMode, const char* locators,
-                        const char* poolname,
+void createPooledRegion(const std::string& name, bool ackMode,
+                        const std::string& locators,
+                        const std::string& poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -198,9 +194,9 @@
 }
 void createEntry(const char* name, const char* key, const char* value) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -223,9 +219,9 @@
 
 void updateEntry(const char* name, const char* key, const char* value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -246,16 +242,14 @@
 
 void doNetsearch(const char* name, const char* key, const char* value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key
+            << " expecting value: " << value << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
+  std::cout << "netsearch region " << regPtr->getName() << "\n" << std::flush;
   fflush(stdout);
   ASSERT(regPtr != nullptr, "Region not found.");
 
@@ -272,10 +266,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -285,8 +277,7 @@
 
 void invalidateEntry(const char* name, const char* key) {
   LOG("invalidateEntry() entered.");
-  fprintf(stdout, "Invalidating entry -- key: %s  in region %s\n", key, name);
-  fflush(stdout);
+  std::cout << "Invalidating entry -- key: " << key << " in region " << name << "\n" << std::flush;
   // Invalidate entry, verify entry is invalidated
   auto keyPtr = CacheableKey::create(key);
 
@@ -306,8 +297,7 @@
 
 void destroyEntry(const char* name, const char* key) {
   LOG("destroyEntry() entered.");
-  fprintf(stdout, "Destroying entry -- key: %s  in region %s\n", key, name);
-  fflush(stdout);
+  std::cout << "Destroying entry -- key: " << key << " in region " << name << "\n" << std::flush;
   // Destroy entry, verify entry is destroyed
   auto keyPtr = CacheableKey::create(key);
 
@@ -335,7 +325,7 @@
 const char* nvals[] = {"New Value-1", "New Value-2", "New Value-3",
                        "New Value-4", "New Value-5"};
 
-const char* regionNames[] = {"DistRegionAck", "DistRegionNoAck"};
+const char* regionName = "DistRegionAck";
 
 const bool USE_ACK = true;
 const bool NO_ACK = false;
@@ -349,17 +339,9 @@
 
 DUNIT_TASK_DEFINITION(CLIENT1, StepOne_Pool_Locator)
   {
-    char buff[2048];
-    char* buf = getcwd(buff, 2048);
-    LOG(buf);
     initClient(true);
-    createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TEST_POOL1__",
-                       true);
-    createPooledRegion(regionNames[1], NO_ACK, locatorsG, "__TEST_POOL1__",
-                       true);
-    auto regPtr = getHelper()->getRegion(regionNames[0]);
-    regPtr->registerAllKeys(false, false, false);
-    regPtr = getHelper()->getRegion(regionNames[1]);
+    createPooledRegion(regionName, USE_ACK, locatorsG, "__TEST_POOL1__", true);
+    auto regPtr = getHelper()->getRegion(regionName);
     regPtr->registerAllKeys(false, false, false);
     LOG("StepOne complete.");
   }
@@ -367,17 +349,9 @@
 
 DUNIT_TASK_DEFINITION(CLIENT2, StepTwo_Pool_Locator)
   {
-    char buff[2048];
-    char* buf = getcwd(buff, 2048);
-    LOG(buf);
     initClient(true);
-    createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TEST_POOL1__",
-                       true);
-    createPooledRegion(regionNames[1], NO_ACK, locatorsG, "__TEST_POOL1__",
-                       true);
-    auto regPtr = getHelper()->getRegion(regionNames[0]);
-    regPtr->registerAllKeys(false, false, false);
-    regPtr = getHelper()->getRegion(regionNames[1]);
+    createPooledRegion(regionName, USE_ACK, locatorsG, "__TEST_POOL1__", true);
+    auto regPtr = getHelper()->getRegion(regionName);
     regPtr->registerAllKeys(false, false, false);
     LOG("StepTwo complete.");
   }
@@ -385,19 +359,16 @@
 
 DUNIT_TASK_DEFINITION(CLIENT1, StepThree)
   {
-    createEntry(regionNames[0], keys[0], vals[0]);
-    createEntry(regionNames[1], keys[2], vals[2]);
-    createEntry(regionNames[0], keys[4], vals[4]);
+    createEntry(regionName, keys[0], vals[0]);
+    createEntry(regionName, keys[4], vals[4]);
     LOG("StepThree complete.");
   }
 END_TASK_DEFINITION
 
 DUNIT_TASK_DEFINITION(CLIENT2, StepFour)
   {
-    doNetsearch(regionNames[0], keys[0], vals[0]);
-    doNetsearch(regionNames[1], keys[2], vals[2]);
-    createEntry(regionNames[0], keys[1], vals[1]);
-    createEntry(regionNames[1], keys[3], vals[3]);
+    doNetsearch(regionName, keys[0], vals[0]);
+    createEntry(regionName, keys[1], vals[1]);
     LOG("StepFour complete.");
   }
 END_TASK_DEFINITION
@@ -420,12 +391,9 @@
 
 DUNIT_TASK_DEFINITION(CLIENT1, StepFive)
   {
-    auto reg0 = getHelper()->getRegion(regionNames[0]);
-    auto reg1 = getHelper()->getRegion(regionNames[1]);
+    auto reg0 = getHelper()->getRegion(regionName);
     auto vec0 = reg0->serverKeys();
-    auto vec1 = reg1->serverKeys();
     ASSERT(vec0.size() == 3, "Should have 3 keys in first region.");
-    ASSERT(vec1.size() == 2, "Should have 2 keys in second region.");
 
     std::string key0, key1, key2;
     key0 = vec0[0]->toString().c_str();
@@ -441,20 +409,9 @@
     ASSERT(key2 == keys[0] || key2 == keys[1] || key2 == keys[4],
            "Unexpected key in first region.");
 
-    key0 = vec1[0]->toString().c_str();
-    key1 = vec1[1]->toString().c_str();
-    ASSERT(key0 != key1, "The two keys should be different in second region.");
-    ASSERT(key0 == keys[2] || key0 == keys[3],
-           "Unexpected key in second region.");
-    ASSERT(key1 == keys[2] || key1 == keys[3],
-           "Unexpected key in second region.");
-
-    doNetsearch(regionNames[0], keys[1], vals[1]);
-    doNetsearch(regionNames[1], keys[3], vals[3]);
-    updateEntry(regionNames[0], keys[0], nvals[0]);
-    updateEntry(regionNames[1], keys[2], nvals[2]);
-    verifyEntry(regionNames[0], keys[0], nvals[0]);
-    verifyEntry(regionNames[1], keys[2], nvals[2]);
+    doNetsearch(regionName, keys[1], vals[1]);
+    updateEntry(regionName, keys[0], nvals[0]);
+    verifyEntry(regionName, keys[0], nvals[0]);
     LOG("StepFive complete.");
   }
 END_TASK_DEFINITION
@@ -465,43 +422,35 @@
     // This step get the value from region, if key is inavalidate in region,
     // value
     // will get from server.
-    // doNetsearch( regionNames[0], keys[4], vals[4] );
-    verifyEntry(regionNames[0], keys[0], nvals[0]);
-    verifyEntry(regionNames[1], keys[2], nvals[2]);
-    updateEntry(regionNames[0], keys[1], nvals[1]);
-    updateEntry(regionNames[1], keys[3], nvals[3]);
+    doNetsearch(regionName, keys[0], nvals[0]);
+    updateEntry(regionName, keys[1], nvals[1]);
     LOG("StepSix complete.");
   }
 END_TASK_DEFINITION
 
 DUNIT_TASK_DEFINITION(CLIENT1, StepSeven)
   {
-    verifyEntry(regionNames[0], keys[1], nvals[1]);
-    verifyEntry(regionNames[1], keys[3], nvals[3]);
+    verifyEntry(regionName, keys[1], nvals[1]);
     LOG("StepSeven complete.");
   }
 END_TASK_DEFINITION
 DUNIT_TASK_DEFINITION(CLIENT1, StepEight)
   {
-    destroyEntry(regionNames[0], keys[0]);
-    destroyEntry(regionNames[1], keys[2]);
+    destroyEntry(regionName, keys[0]);
     LOG("StepEight complete.");
   }
 END_TASK_DEFINITION
 
 DUNIT_TASK_DEFINITION(CLIENT2, StepNine)
   {
-    verifyDestroyed(regionNames[0], keys[0]);
-    verifyDestroyed(regionNames[1], keys[2]);
-    destroyEntry(regionNames[0], keys[1]);
-    destroyEntry(regionNames[1], keys[3]);
+    verifyDestroyed(regionName, keys[0]);
+    destroyEntry(regionName, keys[1]);
     LOG("StepNine complete.");
   }
 END_TASK_DEFINITION
 DUNIT_TASK_DEFINITION(CLIENT1, StepTen)
   {
-    verifyDestroyed(regionNames[0], keys[1]);
-    verifyDestroyed(regionNames[1], keys[3]);
+    verifyDestroyed(regionName, keys[1]);
     LOG("StepTen complete.");
   }
 END_TASK_DEFINITION
diff --git a/cppcache/integration-test/ThinClientFailover3.hpp b/cppcache/integration-test/ThinClientFailover3.hpp
index 7de886f..4ee7fd9 100644
--- a/cppcache/integration-test/ThinClientFailover3.hpp
+++ b/cppcache/integration-test/ThinClientFailover3.hpp
@@ -21,8 +21,6 @@
  */
 
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include <string>
 #include <vector>
 
@@ -31,7 +29,7 @@
 
 #include "CacheHelper.hpp"
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
@@ -47,7 +45,7 @@
 #define SERVER2 s2p2
 static bool isLocator = false;
 // static int numberOfLocators = 0;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #include "LocatorHelper.hpp"
 void initClient(const bool isthinClient) {
@@ -72,20 +70,18 @@
                   bool noKey) {
   // Verify key and value exist in this region, in this process.
   const char* value = val ? val : "";
-  char* buf =
-      reinterpret_cast<char*>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
+  std::string msg;
   if (noKey) {
-    sprintf(buf, "Verify key %s does not exist in region %s", key, name);
+    msg =
+        std::string("Verify key ") + key + " does not exist in region " + name;
   } else if (!val) {
-    sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-            name);
+    msg = std::string("Verify value for key ") + key +
+          " does not exist in region " + name;
   } else {
-    sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-            name);
+    msg = std::string("Verify value for key ") + key + " is: " + value +
+          " in region " + name;
   }
-  LOG(buf);
-  free(buf);
+  LOG(msg);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -126,7 +122,8 @@
           std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
       ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
-      LOG("In verify loop, get returned " + checkPtr->value() + " for key " + key);
+      LOG("In verify loop, get returned " + checkPtr->value() + " for key " +
+          key);
       if (strcmp(checkPtr->value().c_str(), value) != 0) {
         testValueCnt++;
       } else {
@@ -142,20 +139,20 @@
 
 void _verifyEntry(const char* name, const char* key, const char* val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
 
-void createPooledRegion(const char* name, bool ackMode, const char* locators,
-                        const char* poolname,
+void createPooledRegion(const std::string& name, bool ackMode,
+                        const std::string& locators,
+                        const std::string& poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -164,9 +161,9 @@
 }
 void createEntry(const char* name, const char* key, const char* value) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -189,9 +186,9 @@
 
 void updateEntry(const char* name, const char* key, const char* value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -210,16 +207,14 @@
 
 void doNetsearch(const char* name, const char* key, const char* value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key
+            << " expecting value: " << value << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
+  std::cout << "netsearch region " << regPtr->getName() << "\n" << std::flush;
   fflush(stdout);
   ASSERT(regPtr != nullptr, "Region not found.");
 
@@ -228,10 +223,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -244,7 +237,7 @@
   size_t end = 0;
   size_t start;
   std::string delim = ",";
-  while ((start = points.find_first_not_of(delim, end)) != std::string::npos)  {
+  while ((start = points.find_first_not_of(delim, end)) != std::string::npos) {
     end = points.find(delim, start);
     if (end == std::string::npos) {
       end = points.length();
diff --git a/cppcache/integration-test/ThinClientFailoverInterest.hpp b/cppcache/integration-test/ThinClientFailoverInterest.hpp
index e4c93b0..da0a9b8 100644
--- a/cppcache/integration-test/ThinClientFailoverInterest.hpp
+++ b/cppcache/integration-test/ThinClientFailoverInterest.hpp
@@ -21,8 +21,6 @@
  */
 
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include <string>
 
 #define ROOT_NAME "ThinClientFailoverInterest"
@@ -30,7 +28,7 @@
 
 #include "CacheHelper.hpp"
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
@@ -46,7 +44,7 @@
 #define SERVER2 s2p2
 static bool isLocator = false;
 // static int numberOfLocators = 0;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #include "LocatorHelper.hpp"
 void initClient(const bool isthinClient) {
@@ -71,22 +69,18 @@
                   bool noKey, bool isCreated = false) {
   // Verify key and value exist in this region, in this process.
   const char* value = val ? val : "";
-  char* buf =
-      reinterpret_cast<char*>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
-  if (!isCreated) {
-    if (noKey) {
-      sprintf(buf, "Verify key %s does not exist in region %s", key, name);
-    } else if (!val) {
-      sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-              name);
-    } else {
-      sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-              name);
-    }
-    LOG(buf);
+  std::string msg;
+  if (noKey) {
+    msg =
+        std::string("Verify key ") + key + " does not exist in region " + name;
+  } else if (!val) {
+    msg = std::string("Verify value for key ") + key +
+          " does not exist in region " + name;
+  } else {
+    msg = std::string("Verify value for key ") + key + " is: " + value +
+          " in region " + name;
   }
-  free(buf);
+  LOG(msg);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -143,7 +137,8 @@
             std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
         ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
-        LOG("In verify loop, get returned " + checkPtr->value() + " for key " + key);
+        LOG("In verify loop, get returned " + checkPtr->value() + " for key " +
+            key);
         if (strcmp(checkPtr->value().c_str(), value) != 0) {
           testValueCnt++;
         } else {
@@ -160,9 +155,7 @@
 
 void _verifyEntry(const char* name, const char* key, const char* val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -170,9 +163,8 @@
 #define verifyCreated(x, y) _verifyCreated(x, y, __LINE__)
 
 void _verifyCreated(const char* name, const char* key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyCreated() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyCreated() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, false, true);
   LOG("Entry created.");
 }
@@ -180,21 +172,22 @@
 void createRegion(const char* name, bool ackMode, const char* endpoints,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << "  ackMode is " << ackMode << "\n";
   // ack, not a mirror, caching
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
                                           endpoints, clientNotificationEnabled);
   ASSERT(regPtr != nullptr, "Failed to create region.");
   LOG("Region created.");
 }
-void createPooledRegion(const char* name, bool ackMode, const char* locators,
-                        const char* poolname,
+void createPooledRegion(const std::string& name, bool ackMode,
+                        const std::string& locators,
+                        const std::string& poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -203,9 +196,9 @@
 }
 void createEntry(const char* name, const char* key, const char* value) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -228,9 +221,9 @@
 
 void updateEntry(const char* name, const char* key, const char* value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -251,16 +244,14 @@
 
 void doNetsearch(const char* name, const char* key, const char* value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key
+            << " expecting value: " << value << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
+  std::cout << "netsearch region " << regPtr->getName() << "\n" << std::flush;
   fflush(stdout);
   ASSERT(regPtr != nullptr, "Region not found.");
 
@@ -274,10 +265,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -290,7 +279,7 @@
 const char* nvals[] = {"New Value-1", "New Value-2", "New Value-3",
                        "New Value-4"};
 
-const char* regionNames[] = {"DistRegionAck", "DistRegionNoAck"};
+const char* regionNames[] = {"DistRegionAck"};
 
 const bool USE_ACK = true;
 const bool NO_ACK = false;
@@ -309,8 +298,6 @@
     initClient(true);
     createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TEST_POOL1__",
                        true);
-    createPooledRegion(regionNames[1], NO_ACK, locatorsG, "__TEST_POOL1__",
-                       true);
     LOG("StepOne complete.");
   }
 END_TASK_DEFINITION
@@ -320,11 +307,8 @@
     initClient(true);
     createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TEST_POOL1__",
                        true);
-    createPooledRegion(regionNames[1], NO_ACK, locatorsG, "__TEST_POOL1__",
-                       true);
 
     auto regPtr0 = getHelper()->getRegion(regionNames[0]);
-    auto regPtr1 = getHelper()->getRegion(regionNames[1]);
 
     auto keyPtr0 = CacheableKey::create(keys[0]);
     auto keyPtr2 = CacheableKey::create(keys[2]);
@@ -333,7 +317,6 @@
     keys0.push_back(keyPtr0);
     keys1.push_back(keyPtr2);
     regPtr0->registerKeys(keys0);
-    regPtr1->registerKeys(keys1);
 
     LOG("StepTwo complete.");
   }
@@ -342,7 +325,6 @@
 DUNIT_TASK_DEFINITION(CLIENT1, StepThree)
   {
     createEntry(regionNames[0], keys[0], vals[0]);
-    createEntry(regionNames[1], keys[2], vals[2]);
     LOG("StepThree complete.");
   }
 END_TASK_DEFINITION
@@ -350,9 +332,7 @@
 DUNIT_TASK_DEFINITION(CLIENT2, StepFour)
   {
     verifyCreated(regionNames[0], keys[0]);
-    verifyCreated(regionNames[1], keys[2]);
     verifyEntry(regionNames[0], keys[0], vals[0]);
-    verifyEntry(regionNames[1], keys[2], vals[2]);
     LOG("StepFour complete.");
   }
 END_TASK_DEFINITION
@@ -377,7 +357,6 @@
 DUNIT_TASK_DEFINITION(CLIENT1, StepFive)
   {
     updateEntry(regionNames[0], keys[0], nvals[0]);
-    updateEntry(regionNames[1], keys[2], nvals[2]);
     SLEEP(1000);
     LOG("StepFive complete.");
   }
@@ -385,7 +364,6 @@
 DUNIT_TASK_DEFINITION(CLIENT2, StepSix)
   {
     verifyEntry(regionNames[0], keys[0], nvals[0]);
-    verifyEntry(regionNames[1], keys[2], nvals[2]);
     LOG("StepSix complete.");
   }
 END_TASK_DEFINITION
diff --git a/cppcache/integration-test/ThinClientFailoverInterest2.hpp b/cppcache/integration-test/ThinClientFailoverInterest2.hpp
index f8e5593..504a648 100644
--- a/cppcache/integration-test/ThinClientFailoverInterest2.hpp
+++ b/cppcache/integration-test/ThinClientFailoverInterest2.hpp
@@ -21,8 +21,6 @@
  */
 
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include <string>
 
 #define ROOT_NAME "ThinClientFailoverInterest2"
@@ -30,7 +28,7 @@
 
 #include "CacheHelper.hpp"
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
@@ -45,7 +43,7 @@
 #define SERVER2 s2p2
 static bool isLocator = false;
 // static int numberOfLocators = 0;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #include "LocatorHelper.hpp"
 void initClient(const bool isthinClient) {
@@ -70,22 +68,18 @@
                   bool noKey, bool isCreated = false) {
   // Verify key and value exist in this region, in this process.
   const char* value = val ? val : "";
-  char* buf =
-      reinterpret_cast<char*>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
-  if (!isCreated) {
-    if (noKey) {
-      sprintf(buf, "Verify key %s does not exist in region %s", key, name);
-    } else if (!val) {
-      sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-              name);
-    } else {
-      sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-              name);
-    }
-    LOG(buf);
+  std::string msg;
+  if (noKey) {
+    msg =
+        std::string("Verify key ") + key + " does not exist in region " + name;
+  } else if (!val) {
+    msg = std::string("Verify value for key ") + key +
+          " does not exist in region " + name;
+  } else {
+    msg = std::string("Verify value for key ") + key + " is: " + value +
+          " in region " + name;
   }
-  free(buf);
+  LOG(msg);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -142,7 +136,8 @@
             std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
         ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
-        LOG("In verify loop, get returned " + checkPtr->value() + " for key " + key);
+        LOG("In verify loop, get returned " + checkPtr->value() + " for key " +
+            key);
         if (strcmp(checkPtr->value().c_str(), value) != 0) {
           testValueCnt++;
         } else {
@@ -159,9 +154,7 @@
 
 void _verifyEntry(const char* name, const char* key, const char* val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -169,9 +162,8 @@
 #define verifyCreated(x, y) _verifyCreated(x, y, __LINE__)
 
 void _verifyCreated(const char* name, const char* key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyCreated() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyCreated() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, false, true);
   LOG("Entry created.");
 }
@@ -179,21 +171,24 @@
 void createRegion(const char* name, bool ackMode, const char* endpoints,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   // ack, caching
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
                                           endpoints, clientNotificationEnabled);
   ASSERT(regPtr != nullptr, "Failed to create region.");
   LOG("Region created.");
 }
-void createPooledRegion(const char* name, bool ackMode, const char* locators,
-                        const char* poolname,
+void createPooledRegion(const std::string& name, bool ackMode,
+                        const std::string& locators,
+                        const std::string& poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -202,9 +197,9 @@
 }
 void createEntry(const char* name, const char* key, const char* value) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -227,9 +222,9 @@
 
 void updateEntry(const char* name, const char* key, const char* value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -250,16 +245,14 @@
 
 void doNetsearch(const char* name, const char* key, const char* value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key
+            << " expecting value: " << value << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
+  std::cout << "netsearch region " << regPtr->getName() << "\n" << std::flush;
   fflush(stdout);
   ASSERT(regPtr != nullptr, "Region not found.");
 
@@ -273,10 +266,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -289,7 +280,7 @@
 const char* nvals[] = {"New Value-1", "New Value-2", "New Value-3",
                        "New Value-4"};
 
-const char* regionNames[] = {"DistRegionAck", "DistRegionNoAck"};
+const char* regionNames[] = {"DistRegionAck"};
 
 const bool USE_ACK = true;
 const bool NO_ACK = false;
@@ -308,8 +299,6 @@
     initClient(true);
     createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TEST_POOL1__",
                        true);
-    createPooledRegion(regionNames[1], NO_ACK, locatorsG, "__TEST_POOL1__",
-                       true);
     LOG("StepOne complete.");
   }
 END_TASK_DEFINITION
@@ -320,13 +309,9 @@
     initClient(true);
     createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TEST_POOL1__",
                        true);
-    createPooledRegion(regionNames[1], NO_ACK, locatorsG, "__TEST_POOL1__",
-                       true);
 
     auto regPtr0 = getHelper()->getRegion(regionNames[0]);
-    auto regPtr1 = getHelper()->getRegion(regionNames[1]);
     regPtr0->registerAllKeys();
-    regPtr1->registerAllKeys();
 
     LOG("StepTwo complete.");
   }
@@ -335,7 +320,6 @@
 DUNIT_TASK_DEFINITION(CLIENT1, StepThree)
   {
     createEntry(regionNames[0], keys[0], vals[0]);
-    createEntry(regionNames[1], keys[2], vals[2]);
     LOG("StepThree complete.");
   }
 END_TASK_DEFINITION
@@ -343,9 +327,7 @@
   {
     // Client two should recieve all entries
     verifyCreated(regionNames[0], keys[0]);
-    verifyCreated(regionNames[1], keys[2]);
     verifyEntry(regionNames[0], keys[0], vals[0]);
-    verifyEntry(regionNames[1], keys[2], vals[2]);
     LOG("StepFour complete.");
   }
 END_TASK_DEFINITION
@@ -372,7 +354,6 @@
   {
     // Client one update entries
     updateEntry(regionNames[0], keys[0], nvals[0]);
-    updateEntry(regionNames[1], keys[2], nvals[2]);
     SLEEP(1000);
     LOG("StepFive complete.");
   }
@@ -381,7 +362,6 @@
   {
     // Client two should see updates after failover.
     verifyEntry(regionNames[0], keys[0], nvals[0]);
-    verifyEntry(regionNames[1], keys[2], nvals[2]);
     LOG("StepSix complete.");
   }
 END_TASK_DEFINITION
@@ -390,9 +370,7 @@
   {
     // Client two unregister all keys
     auto regPtr0 = getHelper()->getRegion(regionNames[0]);
-    auto regPtr1 = getHelper()->getRegion(regionNames[1]);
     regPtr0->unregisterAllKeys();
-    regPtr1->unregisterAllKeys();
 
     LOG("StepSeven complete.");
   }
@@ -402,7 +380,6 @@
   {
     // Client one update two entries
     updateEntry(regionNames[0], keys[0], vals[0]);
-    updateEntry(regionNames[1], keys[2], vals[2]);
     LOG("StepEight complete.");
   }
 END_TASK_DEFINITION
@@ -410,7 +387,6 @@
   {
     // Client two should still have the original values
     verifyEntry(regionNames[0], keys[0], nvals[0]);
-    verifyEntry(regionNames[1], keys[2], nvals[2]);
     LOG("StepNine complete.");
   }
 END_TASK_DEFINITION
diff --git a/cppcache/integration-test/ThinClientFailoverInterestAllWithCache.hpp b/cppcache/integration-test/ThinClientFailoverInterestAllWithCache.hpp
index a0b6bbc..018aa47 100644
--- a/cppcache/integration-test/ThinClientFailoverInterestAllWithCache.hpp
+++ b/cppcache/integration-test/ThinClientFailoverInterestAllWithCache.hpp
@@ -20,8 +20,6 @@
  * limitations under the License.
  */
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include <string>
 
 #define ROOT_NAME "ThinClientFailoverInterestAllWithCache"
@@ -29,7 +27,7 @@
 
 #include "CacheHelper.hpp"
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
@@ -47,7 +45,7 @@
 #define SERVER2 s2p2
 static bool isLocator = false;
 // static int numberOfLocators = 0;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #include "LocatorHelper.hpp"
 #include "ThinClientTasks_C2S2.hpp"
@@ -75,22 +73,18 @@
                   bool noKey, bool isCreated = false) {
   // Verify key and value exist in this region, in this process.
   const char* value = val ? val : "";
-  char* buf =
-      reinterpret_cast<char*>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
-  if (!isCreated) {
-    if (noKey) {
-      sprintf(buf, "Verify key %s does not exist in region %s", key, name);
-    } else if (!val) {
-      sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-              name);
-    } else {
-      sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-              name);
-    }
-    LOG(buf);
+  std::string msg;
+  if (noKey) {
+    msg =
+        std::string("Verify key ") + key + " does not exist in region " + name;
+  } else if (!val) {
+    msg = std::string("Verify value for key ") + key +
+          " does not exist in region " + name;
+  } else {
+    msg = std::string("Verify value for key ") + key + " is: " + value +
+          " in region " + name;
   }
-  free(buf);
+  LOG(msg);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -147,7 +141,8 @@
             std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
         ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
-        LOG("In verify loop, get returned " + checkPtr->value() + " for key " + key);
+        LOG("In verify loop, get returned " + checkPtr->value() + " for key " +
+            key);
         if (strcmp(checkPtr->value().c_str(), value) != 0) {
           testValueCnt++;
         } else {
@@ -164,9 +159,7 @@
 
 void _verifyEntry(const char* name, const char* key, const char* val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -174,20 +167,19 @@
 #define verifyCreated(x, y) _verifyCreated(x, y, __LINE__)
 
 void _verifyCreated(const char* name, const char* key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyCreated() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyCreated() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, false, true);
   LOG("Entry created.");
 }
 
-void createRegion(const char* name, bool ackMode, const char* endpoints,
+void createRegion(const std::string& name, bool ackMode, const std::string&,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  LOGINFO("Creating region --  %s  ackMode is %d", name, ackMode);
+  LOGINFO("Creating region --  %s  ackMode is %d", name.c_str(), ackMode);
   // ack, caching
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
-                                          endpoints, clientNotificationEnabled);
+                                          clientNotificationEnabled);
   ASSERT(regPtr != nullptr, "Failed to create region.");
   LOG("Region created.");
 }
@@ -259,10 +251,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
diff --git a/cppcache/integration-test/ThinClientFailoverRegex.hpp b/cppcache/integration-test/ThinClientFailoverRegex.hpp
index b1ed8c7..69baa07 100644
--- a/cppcache/integration-test/ThinClientFailoverRegex.hpp
+++ b/cppcache/integration-test/ThinClientFailoverRegex.hpp
@@ -21,8 +21,6 @@
 #define GEODE_INTEGRATION_TEST_THINCLIENTFAILOVERREGEX_H_
 
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include <string>
 
 #define ROOT_NAME "ThinClientFailoverRegex"
@@ -30,7 +28,7 @@
 
 #include "CacheHelper.hpp"
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
@@ -46,7 +44,7 @@
 #define SERVER2 s2p2
 static bool isLocator = false;
 // static int numberOfLocators = 0;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #include "LocatorHelper.hpp"
 void initClient(const bool isthinClient) {
@@ -71,22 +69,18 @@
                   bool noKey, bool isCreated = false) {
   // Verify key and value exist in this region, in this process.
   const char* value = val ? val : "";
-  char* buf =
-      reinterpret_cast<char*>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
-  if (!isCreated) {
-    if (noKey) {
-      sprintf(buf, "Verify key %s does not exist in region %s", key, name);
-    } else if (!val) {
-      sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-              name);
-    } else {
-      sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-              name);
-    }
-    LOG(buf);
+  std::string msg;
+  if (noKey) {
+    msg =
+        std::string("Verify key ") + key + " does not exist in region " + name;
+  } else if (!val) {
+    msg = std::string("Verify value for key ") + key +
+          " does not exist in region " + name;
+  } else {
+    msg = std::string("Verify value for key ") + key + " is: " + value +
+          " in region " + name;
   }
-  free(buf);
+  LOG(msg);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -143,7 +137,8 @@
             std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
         ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
-        LOG("In verify loop, get returned " + checkPtr->value() + " for key " + key);
+        LOG("In verify loop, get returned " + checkPtr->value() + " for key " +
+            key);
         if (strcmp(checkPtr->value().c_str(), value) != 0) {
           testValueCnt++;
         } else {
@@ -160,9 +155,7 @@
 
 void _verifyEntry(const char* name, const char* key, const char* val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -170,9 +163,8 @@
 #define verifyCreated(x, y) _verifyCreated(x, y, __LINE__)
 
 void _verifyCreated(const char* name, const char* key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyCreated() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyCreated() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, false, true);
   LOG("Entry created.");
 }
@@ -180,21 +172,24 @@
 void createRegion(const char* name, bool ackMode, const char* endpoints,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   // ack, caching
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
                                           endpoints, clientNotificationEnabled);
   ASSERT(regPtr != nullptr, "Failed to create region.");
   LOG("Region created.");
 }
-void createPooledRegion(const char* name, bool ackMode, const char* locators,
-                        const char* poolname,
+void createPooledRegion(const std::string& name, bool ackMode,
+                        const std::string& locators,
+                        const std::string& poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -203,9 +198,9 @@
 }
 void createEntry(const char* name, const char* key, const char* value) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -228,9 +223,9 @@
 
 void updateEntry(const char* name, const char* key, const char* value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -251,16 +246,14 @@
 
 void doNetsearch(const char* name, const char* key, const char* value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key
+            << " expecting value: " << value << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
+  std::cout << "netsearch region " << regPtr->getName() << "\n" << std::flush;
   fflush(stdout);
   ASSERT(regPtr != nullptr, "Region not found.");
 
@@ -274,10 +267,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -291,7 +282,7 @@
 const char* nvals[] = {"New Value-1", "New Value-2", "New Value-3",
                        "New Value-4"};
 
-const char* regionNames[] = {"DistRegionAck", "DistRegionNoAck"};
+const char* regionNames[] = {"DistRegionAck"};
 
 const bool USE_ACK = true;
 const bool NO_ACK = false;
@@ -310,10 +301,6 @@
     initClient(true);
     createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TEST_POOL1__",
                        true);
-    createPooledRegion(regionNames[1], NO_ACK, locatorsG, "__TEST_POOL1__",
-                       true);
-
-    createEntry(regionNames[1], keys[1], vals[1]);
 
     LOG("StepOne complete.");
   }
@@ -324,13 +311,8 @@
     initClient(true);
     createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TEST_POOL1__",
                        true);
-    createPooledRegion(regionNames[1], NO_ACK, locatorsG, "__TEST_POOL1__",
-                       true);
-
-    createEntry(regionNames[1], keys[1], nvals[1]);
 
     auto regPtr0 = getHelper()->getRegion(regionNames[0]);
-    auto regPtr1 = getHelper()->getRegion(regionNames[1]);
 
     /*
      auto keyPtr0 = CacheableKey::create(keys[0]);
@@ -344,7 +326,6 @@
     */
 
     regPtr0->registerRegex(regkeys[0]);
-    regPtr1->registerRegex(regkeys[2]);
 
     LOG("StepTwo complete.");
   }
@@ -353,14 +334,6 @@
 DUNIT_TASK_DEFINITION(CLIENT1, StepThree)
   {
     createEntry(regionNames[0], keys[0], vals[0]);
-    createEntry(regionNames[1], keys[2], vals[2]);
-
-    auto regPtr1 = getHelper()->getRegion(regionNames[1]);
-    regPtr1->registerRegex(regkeys[1], false);
-
-    doNetsearch(
-        regionNames[1], keys[1],
-        nvals[1]);  // this should verify due to registerRegex() call before
 
     LOG("StepThree complete.");
   }
@@ -371,22 +344,7 @@
     LOG("StepFour start.");
 
     verifyCreated(regionNames[0], keys[0]);
-    verifyCreated(regionNames[1], keys[2]);
     verifyEntry(regionNames[0], keys[0], vals[0]);
-    verifyEntry(regionNames[1], keys[2], vals[2]);
-
-    updateEntry(regionNames[1], keys[1], vals[1]);
-
-    auto regPtr1 = getHelper()->getRegion(regionNames[1]);
-    regPtr1->unregisterRegex(regkeys[2]);
-
-    /*
-     auto regPtr1 = getHelper()->getRegion( regionNames[1] );
-     auto keyPtr2 = CacheableKey::create(keys[2]);
-      std::vector<std::shared_ptr<CacheableKey>>  keys2;
-      keys2.push_back(keyPtr2);
-      regPtr1->unregisterKeys(keys2, nullptr);
-      */
 
     LOG("StepFour complete.");
   }
@@ -412,11 +370,7 @@
 DUNIT_TASK_DEFINITION(CLIENT1, StepFive)
   {
     updateEntry(regionNames[0], keys[0], nvals[0]);
-    updateEntry(regionNames[1], keys[2], nvals[2]);
 
-    verifyEntry(
-        regionNames[1], keys[1],
-        vals[1]);  // this should verify due to registerRegex() call before
     SLEEP(1000);
 
     LOG("StepFive complete.");
@@ -426,10 +380,6 @@
   {
     LOG("StepSix start.");
     verifyEntry(regionNames[0], keys[0], nvals[0]);
-    verifyEntry(regionNames[1], keys[2],
-                vals[2]);  // this key-regex was unregistered before failover
-
-    updateEntry(regionNames[1], keys[1], nvals[1]);  // for client1 to verify
 
     LOG("StepSix complete.");
   }
@@ -440,9 +390,6 @@
     LOG("StepSeven start.");
 
     updateEntry(regionNames[0], keys[0], vals[0]);
-    updateEntry(regionNames[1], keys[2], vals[2]);
-
-    verifyEntry(regionNames[1], keys[1], nvals[1]);
 
     LOG("StepSeven complete.");
   }
@@ -453,9 +400,6 @@
     LOG("StepEight start.");
     verifyEntry(regionNames[0], keys[0],
                 vals[0]);  // this should verify now (registered after failover)
-    verifyEntry(
-        regionNames[1], keys[2],
-        vals[2]);  // this should verify now (not registered after failover)
     LOG("StepEight complete.");
   }
 END_TASK_DEFINITION
diff --git a/cppcache/integration-test/ThinClientGatewayTest.hpp b/cppcache/integration-test/ThinClientGatewayTest.hpp
index 9be06a0..2acc7ed 100644
--- a/cppcache/integration-test/ThinClientGatewayTest.hpp
+++ b/cppcache/integration-test/ThinClientGatewayTest.hpp
@@ -33,7 +33,7 @@
 
 #include <string>
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::EntryEvent;
 using apache::geode::client::RegionEvent;
@@ -73,8 +73,8 @@
   attrMutator->setCacheListener(regListener);
 }
 
-const char* locHostPort1 = nullptr;
-const char* locHostPort2 = nullptr;
+std::string locHostPort1;
+std::string locHostPort2;
 DUNIT_TASK_DEFINITION(SERVER1, StartLocator1)
   {
     CacheHelper::initLocator(1, false, true, 1,
diff --git a/cppcache/integration-test/ThinClientHeapLRU.hpp b/cppcache/integration-test/ThinClientHeapLRU.hpp
index 37532a0..d9f7df2 100644
--- a/cppcache/integration-test/ThinClientHeapLRU.hpp
+++ b/cppcache/integration-test/ThinClientHeapLRU.hpp
@@ -21,8 +21,6 @@
 #define GEODE_INTEGRATION_TEST_THINCLIENTHEAPLRU_H_
 
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include "BuiltinCacheableWrappers.hpp"
 
 #include <string>
@@ -32,7 +30,6 @@
 
 #include "CacheHelper.hpp"
 
-
 #define CLIENT1 s1p1
 #define CLIENT2 s1p2
 #define SERVER1 s2p1
@@ -42,7 +39,7 @@
 static bool isLocalServer = false;
 static int numberOfLocators = 0;
 const char* poolName = "__TESTPOOL1_";
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 
 const char* keys[] = {"Key-1", "Key-2", "Key-3", "Key-4"};
@@ -90,8 +87,9 @@
 void createRegion(const char* name, bool ackMode, const char* endpoints,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
                                           endpoints, clientNotificationEnabled);
   ASSERT(regPtr != nullptr, "Failed to create region.");
@@ -103,8 +101,9 @@
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -136,9 +135,7 @@
   std::vector<std::shared_ptr<RegionEntry>> me;
   dataReg->entries(me, false);
   LOG("Verifying size outside loop");
-  char buf[1024];
-  sprintf(buf, "region size is %d", me.size());
-  LOG(buf);
+  LOG(std::string("region size is ") + std::to_string(me.size()));
 
   ASSERT(me.size() <= 1024, "Should have evicted anything over 1024 entries");
 }
diff --git a/cppcache/integration-test/ThinClientHelper.hpp b/cppcache/integration-test/ThinClientHelper.hpp
index 409e5d5..8ecef88 100644
--- a/cppcache/integration-test/ThinClientHelper.hpp
+++ b/cppcache/integration-test/ThinClientHelper.hpp
@@ -22,8 +22,9 @@
 
 #include <chrono>
 
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
+
+#include <boost/process.hpp>
+
 #include "testUtils.hpp"
 #include "security/typedefs.hpp"
 #include "security/CredentialGenerator.hpp"
@@ -42,7 +43,7 @@
 
 #include "CacheHelper.hpp"
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableInt32;
 using apache::geode::client::CacheHelper;
@@ -66,7 +67,7 @@
 }
 
 void initClientWithPool(const bool isthinClient, const char* poolName,
-                        const char* locators, const char* serverGroup,
+                        const std::string& locators, const char* serverGroup,
                         const std::shared_ptr<Properties>& configPtr = nullptr,
                         int redundancy = 0, bool clientNotification = false,
                         int subscriptionAckInterval = -1, int connections = -1,
@@ -141,21 +142,18 @@
                   bool noKey, bool checkVal = true) {
   // Verify key and value exist in this region, in this process.
   const char* value = val ? val : "";
-  char* buf =
-      reinterpret_cast<char*>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
+  std::string msg;
   if (noKey) {
-    sprintf(buf, "Verify key %s does not exist in region %s", key,
-            name.c_str());
+    msg =
+        std::string("Verify key ") + key + " does not exist in region " + name;
   } else if (!val) {
-    sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-            name.c_str());
+    msg = std::string("Verify value for key ") + key +
+          " does not exist in region " + name;
   } else {
-    sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-            name.c_str());
+    msg = std::string("Verify value for key ") + key + " is: " + value +
+          " in region " + name;
   }
-  LOG(buf);
-  free(buf);
+  LOG(msg);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -199,7 +197,8 @@
           std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
       ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
-      LOG("In verify loop, get returned " + checkPtr->value() + " for key " + key);
+      LOG("In verify loop, get returned " + checkPtr->value() + " for key " +
+          key);
 
       if (strcmp(checkPtr->value().c_str(), value) != 0) {
         testValueCnt++;
@@ -215,9 +214,8 @@
 #define verifyInvalid(x, y) _verifyInvalid(x, y, __LINE__)
 
 void _verifyInvalid(const char* name, const char* key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyInvalid() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyInvalid() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, false);
   LOG("Entry invalidated.");
 }
@@ -225,18 +223,16 @@
 #define verifyDestroyed(x, y) _verifyDestroyed(x, y, __LINE__)
 
 void _verifyDestroyed(const char* name, const char* key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyDestroyed() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyDestroyed() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, true);
   LOG("Entry destroyed.");
 }
 
 void verifyEntry(const std::string& name, const char* key, const char* val,
                  bool checkVal = true) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", __LINE__);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(__LINE__) +
+      "\n");
   _verifyEntry(name, key, val, false, checkVal);
   LOG("Entry verified.");
 }
@@ -245,21 +241,19 @@
                      bool noKey, bool isCreated = false) {
   // Verify key and value exist in this region, in this process.
   int value = val;
-  char* buf = reinterpret_cast<char*>(malloc(1024 + strlen(key) + 20));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
+  std::string msg;
   if (!isCreated) {
     if (noKey) {
-      sprintf(buf, "Verify key %s does not exist in region %s", key, name);
+      msg = std::string("Verify key ") + key + " does not exist in region " +
+            name;
     } else if (val == 0) {
-      sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-              name);
+      msg = std::string("Verify value for key ") + key +
+            " does not exist in region " + name;
     } else {
-      sprintf(buf, "Verify value for key %s is: %d in region %s", key, value,
-              name);
+      msg = std::string("Verify value for key ") + key +
+            " is: " + std::to_string(value) + " in region " + name;
     }
-    LOG(buf);
-
-    free(buf);
+    LOG(msg);
   }
 
   auto regPtr = getHelper()->getRegion(name);
@@ -317,7 +311,8 @@
             std::dynamic_pointer_cast<CacheableInt32>(regPtr->get(keyPtr));
 
         ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
-        LOG("In verify loop, get returned " + std::to_string(checkPtr->value()) + " for key " + key);
+        LOG("In verify loop, get returned " +
+            std::to_string(checkPtr->value()) + " for key " + key);
 
         if (checkPtr->value() != value) {
           testValueCnt++;
@@ -334,9 +329,8 @@
 #define verifyIntEntry(x, y, z) _verifyIntEntry(x, y, z, __LINE__)
 void _verifyIntEntry(const char* name, const char* key, const int val,
                      int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyIntEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyIntEntry() called from ") + std::to_string(line) +
+      "\n");
   _verifyIntEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -346,8 +340,9 @@
                   const std::shared_ptr<CacheListener>& listener = nullptr,
                   bool caching = true) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   // ack, caching
   auto regPtr = getHelper()->createRegion(name, ackMode, caching, listener,
                                           clientNotificationEnabled);
@@ -367,7 +362,7 @@
   sqLiteProps->insert("PageSize", "65536");
   sqLiteProps->insert("MaxPageCount", "1073741823");
   std::string sqlite_dir =
-      "SqLiteRegionData" + std::to_string(ACE_OS::getpid());
+      "SqLiteRegionData" + std::to_string(boost::this_process::get_id());
   sqLiteProps->insert("PersistenceDirectory", sqlite_dir.c_str());
   regionAttributesFactory.setPersistenceManager(
       "SqLiteImpl", "createSqLiteInstance", sqLiteProps);
@@ -380,13 +375,14 @@
   return regionPtr;
 }
 std::shared_ptr<Region> createPooledRegion(
-    const char* name, bool ackMode, const char* locators, const char* poolname,
-    bool clientNotificationEnabled = false,
+    const char* name, bool ackMode, const std::string& locators,
+    const char* poolname, bool clientNotificationEnabled = false,
     const std::shared_ptr<CacheListener>& listener = nullptr,
     bool caching = true) {
   LOG("createPooledRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
 
   if (cacheHelper == nullptr) {
     cacheHelper = new CacheHelper(true, poolname, locators, nullptr);
@@ -409,8 +405,9 @@
   return poolPtr;
 }
 std::shared_ptr<Pool> createPool(
-    const char* poolName, const char* locators, const char* serverGroup,
-    int redundancy = 0, bool clientNotification = false,
+    const std::string& poolName, const std::string& locators,
+    const std::string& serverGroup, int redundancy = 0,
+    bool clientNotification = false,
     std::chrono::milliseconds subscriptionAckInterval =
         std::chrono::milliseconds::zero(),
     int connections = -1, int loadConditioningInterval = -1) {
@@ -424,8 +421,9 @@
   return poolPtr;
 }
 std::shared_ptr<Pool> createPoolAndDestroy(
-    const char* poolName, const char* locators, const char* serverGroup,
-    int redundancy = 0, bool clientNotification = false,
+    const std::string& poolName, const std::string& locators,
+    const std::string& serverGroup, int redundancy = 0,
+    bool clientNotification = false,
     std::chrono::milliseconds subscriptionAckInterval =
         std::chrono::milliseconds::zero(),
     int connections = -1) {
@@ -440,9 +438,10 @@
   return poolPtr;
 }
 // this will create pool even endpoints and locatorhost has been not defined
-std::shared_ptr<Pool> createPool2(const char* poolName, const char* locators,
-                                  const char* serverGroup,
-                                  const char* servers = nullptr,
+std::shared_ptr<Pool> createPool2(const std::string& poolName,
+                                  const std::string& locators,
+                                  const std::string& serverGroup,
+                                  const std::string& servers = nullptr,
                                   int redundancy = 0,
                                   bool clientNotification = false) {
   LOG("createPool2() entered.");
@@ -471,9 +470,9 @@
 
 void createEntry(const std::string& name, const char* key, const char* value) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name.c_str());
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -497,9 +496,9 @@
 void updateEntry(const char* name, const char* key, const char* value,
                  bool checkVal = true, bool checkKey = true) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -526,16 +525,14 @@
 void doNetsearch(const char* name, const char* key, const char* value,
                  bool checkVal = true) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key
+            << " expecting value: " << value << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
+  std::cout << "netsearch region " << regPtr->getName() << "\n" << std::flush;
   fflush(stdout);
   ASSERT(regPtr != nullptr, "Region not found.");
 
@@ -551,10 +548,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -565,9 +560,9 @@
 void createIntEntry(const char* name, const char* key, const int value,
                     bool onlyCreate = false) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %d in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
 
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
@@ -592,8 +587,7 @@
 
 void invalidateEntry(const char* name, const char* key) {
   LOG("invalidateEntry() entered.");
-  fprintf(stdout, "Invalidating entry -- key: %s  in region %s\n", key, name);
-  fflush(stdout);
+  std::cout << "Invalidating entry -- key: " << key << " in region " << name << "\n" << std::flush;
   // Invalidate entry, verify entry is invalidated
   auto keyPtr = CacheableKey::create(key);
 
@@ -613,8 +607,7 @@
 
 void destroyEntry(const char* name, const char* key) {
   LOG("destroyEntry() entered.");
-  fprintf(stdout, "Destroying entry -- key: %s  in region %s\n", key, name);
-  fflush(stdout);
+  std::cout << "Destroying entry -- key: " << key << " in region " << name << "\n" << std::flush;
   // Destroy entry, verify entry is destroyed
   auto keyPtr = CacheableKey::create(key);
 
@@ -644,47 +637,41 @@
 
   void putOp(int keysMax = 1,
              const std::shared_ptr<Serializable>& aCallbackArgument = nullptr) {
-    char keybuf[100];
-    char valbuf[100];
     for (int i = 1; i <= keysMax; i++) {
-      sprintf(keybuf, "key%d", i);
-      sprintf(valbuf, "value%d", i);
-      auto valPtr = CacheableString::create(valbuf);
-      m_regionPtr->put(keybuf, valPtr, aCallbackArgument);
+      auto key = std::string("key") + std::to_string(i);
+      auto value = std::string("value") + std::to_string(i);
+      auto valPtr = CacheableString::create(value);
+      m_regionPtr->put(key, valPtr, aCallbackArgument);
     }
   }
   void invalidateOp(
       int keysMax = 1,
       const std::shared_ptr<Serializable>& aCallbackArgument = nullptr) {
-    char keybuf[100];
-    char valbuf[100] = {0};
     for (int i = 1; i <= keysMax; i++) {
-      sprintf(keybuf, "key%d", i);
-      auto valPtr = CacheableString::create(valbuf);
-      m_regionPtr->localInvalidate(keybuf, aCallbackArgument);
+      auto key = std::string("key") + std::to_string(i);
+      std::string value;
+      auto valPtr = CacheableString::create(value);
+      m_regionPtr->localInvalidate(key, aCallbackArgument);
     }
   }
   void destroyOp(
       int keysMax = 1,
       const std::shared_ptr<Serializable>& aCallbackArgument = nullptr) {
-    char keybuf[100];
-    char valbuf[100] = {0};
     for (int i = 1; i <= keysMax; i++) {
-      sprintf(keybuf, "key%d", i);
-      auto valPtr = CacheableString::create(valbuf);
-      m_regionPtr->destroy(keybuf, aCallbackArgument);
+      auto key = std::string("key") + std::to_string(i);
+      std::string value;
+      auto valPtr = CacheableString::create(value);
+      m_regionPtr->destroy(key, aCallbackArgument);
     }
   }
   void removeOp(
       int keysMax = 1,
       const std::shared_ptr<Serializable>& aCallbackArgument = nullptr) {
-    char keybuf[100];
-    char valbuf[100] = {0};
     for (int i = 1; i <= keysMax; i++) {
-      sprintf(keybuf, "key%d", i);
-      sprintf(valbuf, "value%d", i);
-      auto valPtr = CacheableString::create(valbuf);
-      m_regionPtr->remove(keybuf, valPtr, aCallbackArgument);
+      auto key = std::string("key") + std::to_string(i);
+      auto value = std::string("value") + std::to_string(i);
+      auto valPtr = CacheableString::create(value);
+      m_regionPtr->remove(key, valPtr, aCallbackArgument);
     }
   }
   std::shared_ptr<Region> m_regionPtr;
diff --git a/cppcache/integration-test/ThinClientInterest1.hpp b/cppcache/integration-test/ThinClientInterest1.hpp
index 6015ea0..5bebb2a 100644
--- a/cppcache/integration-test/ThinClientInterest1.hpp
+++ b/cppcache/integration-test/ThinClientInterest1.hpp
@@ -27,10 +27,9 @@
 #define CLIENT2 s1p2
 #define SERVER1 s2p1
 
-
 bool isLocalServer = true;
 static bool isLocator = false;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #include "LocatorHelper.hpp"
 DUNIT_TASK_DEFINITION(SERVER1, StartServer)
@@ -77,9 +76,8 @@
     auto regPtr = getHelper()->getRegion(regionNames[0]);
     for (int i = 0; i < 5; i++) {
       auto keyPtr1 = CacheableKey::create(keys[i]);
-      char buf[1024];
-      sprintf(buf, "key[%s] should have been found", keys[i]);
-      ASSERT(regPtr->containsKey(keyPtr1), buf);
+      auto msg = std::string("key[") + keys[i] + "] should have been found";
+      ASSERT(regPtr->containsKey(keyPtr1), msg);
     }
   }
 END_TASK_DEFINITION
diff --git a/cppcache/integration-test/ThinClientInterest2.hpp b/cppcache/integration-test/ThinClientInterest2.hpp
index b121446..6fdb94e 100644
--- a/cppcache/integration-test/ThinClientInterest2.hpp
+++ b/cppcache/integration-test/ThinClientInterest2.hpp
@@ -27,10 +27,9 @@
 #define CLIENT2 s1p2
 #define SERVER1 s2p1
 
-
 bool isLocalServer = true;
 static bool isLocator = false;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #include "LocatorHelper.hpp"
 
@@ -66,9 +65,8 @@
     auto regPtr = getHelper()->getRegion(regionNames[0]);
     for (int i = 0; i < 5; i++) {
       auto keyPtr1 = CacheableKey::create(keys[i]);
-      char buf[1024];
-      sprintf(buf, "key[%s] should not have been found", keys[i]);
-      ASSERT(!regPtr->containsKey(keyPtr1), buf);
+      auto msg = std::string("key[") + keys[i] + "] should have been found";
+      ASSERT(!regPtr->containsKey(keyPtr1), msg);
       auto checkPtr = regPtr->get(keyPtr1);
       verifyEntry(regionNames[0], keys[i], vals[i]);
     }
diff --git a/cppcache/integration-test/ThinClientInterest3.hpp b/cppcache/integration-test/ThinClientInterest3.hpp
index 2be8310..8a01888 100644
--- a/cppcache/integration-test/ThinClientInterest3.hpp
+++ b/cppcache/integration-test/ThinClientInterest3.hpp
@@ -29,14 +29,14 @@
 #define CLIENT2 s1p2
 #define SERVER1 s2p1
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::testing::TallyListener;
 using apache::geode::client::testing::TallyWriter;
 
 bool isLocalServer = true;
 static bool isLocator = false;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #include "LocatorHelper.hpp"
 std::shared_ptr<TallyListener> reg1Listener1;
@@ -63,26 +63,26 @@
 void validateEventCount(int line) {
   LOGINFO("ValidateEvents called from line (%d).", line);
   int num = reg1Listener1->getCreates();
-  char buf[1024];
-  sprintf(buf, "Got wrong number of creation events. expected[%d], real[%d]",
-          numCreates, num);
-  ASSERT(num == numCreates, buf);
+  auto msg = std::string("Got wrong number of creation events. expected[") +
+             std::to_string(numCreates) + "], real[" + std::to_string(num) +
+             "]";
+  ASSERT(num == numCreates, msg);
   num = reg1Listener1->getUpdates();
-  sprintf(buf, "Got wrong number of update events. expected[%d], real[%d]",
-          numUpdates, num);
-  ASSERT(num == numUpdates, buf);
+  msg = std::string("Got wrong number of update events. expected[") +
+        std::to_string(numUpdates) + "], real[" + std::to_string(num) + "]";
+  ASSERT(num == numUpdates, msg);
   num = reg1Writer1->getCreates();
-  sprintf(buf, "Got wrong number of writer events. expected[%d], real[%d]",
-          numCreates, num);
-  ASSERT(num == numCreates, buf);
+  msg = std::string("Got wrong number of writer events. expected[") +
+        std::to_string(numCreates) + "], real[" + std::to_string(num) + "]";
+  ASSERT(num == numCreates, msg);
   num = reg1Listener1->getInvalidates();
-  sprintf(buf, "Got wrong number of invalidate events. expected[%d], real[%d]",
-          numInvalidates, num);
-  ASSERT(num == numInvalidates, buf);
+  msg = std::string("Got wrong number of invalidate events. expected[") +
+        std::to_string(numInvalidates) + "], real[" + std::to_string(num) + "]";
+  ASSERT(num == numInvalidates, msg);
   num = reg1Listener1->getDestroys();
-  sprintf(buf, "Got wrong number of destroys events. expected[%d], real[%d]",
-          numDestroys, num);
-  ASSERT(num == numDestroys, buf);
+  msg = std::string("Got wrong number of destroys events. expected[") +
+        std::to_string(numDestroys) + "], real[" + std::to_string(num) + "]";
+  ASSERT(num == numDestroys, msg);
 }
 
 DUNIT_TASK_DEFINITION(SERVER1, StartServer)
diff --git a/cppcache/integration-test/ThinClientInterest3Cacheless.hpp b/cppcache/integration-test/ThinClientInterest3Cacheless.hpp
index 7c773cd..b9c5eee 100644
--- a/cppcache/integration-test/ThinClientInterest3Cacheless.hpp
+++ b/cppcache/integration-test/ThinClientInterest3Cacheless.hpp
@@ -29,14 +29,14 @@
 #define CLIENT2 s1p2
 #define SERVER1 s2p1
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::testing::TallyListener;
 using apache::geode::client::testing::TallyWriter;
 
 bool isLocalServer = true;
 static bool isLocator = false;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #include "LocatorHelper.hpp"
 std::shared_ptr<TallyListener> reg1Listener1;
@@ -63,26 +63,26 @@
 void validateEventCount(int line) {
   LOGINFO("ValidateEvents called from line (%d).", line);
   int num = reg1Listener1->getCreates();
-  char buf[1024];
-  sprintf(buf, "Got wrong number of creation events. expected[%d], real[%d]",
-          numCreates, num);
-  ASSERT(num == numCreates, buf);
+  auto msg = std::string("Got wrong number of creation events. expected[") +
+             std::to_string(numCreates) + "], real[" + std::to_string(num) +
+             "]";
+  ASSERT(num == numCreates, msg);
   num = reg1Listener1->getUpdates();
-  sprintf(buf, "Got wrong number of update events. expected[%d], real[%d]",
-          numUpdates, num);
-  ASSERT(num == numUpdates, buf);
+  msg = std::string("Got wrong number of update events. expected[") +
+        std::to_string(numUpdates) + "], real[" + std::to_string(num) + "]";
+  ASSERT(num == numUpdates, msg);
   num = reg1Writer1->getCreates();
-  sprintf(buf, "Got wrong number of writer events. expected[%d], real[%d]",
-          numCreates, num);
-  ASSERT(num == numCreates, buf);
+  msg = std::string("Got wrong number of writer events. expected[") +
+        std::to_string(numCreates) + "], real[" + std::to_string(num) + "]";
+  ASSERT(num == numCreates, msg);
   num = reg1Listener1->getInvalidates();
-  sprintf(buf, "Got wrong number of invalidate events. expected[%d], real[%d]",
-          numInvalidates, num);
-  ASSERT(num == numInvalidates, buf);
+  msg = std::string("Got wrong number of invalidate events. expected[") +
+        std::to_string(numInvalidates) + "], real[" + std::to_string(num) + "]";
+  ASSERT(num == numInvalidates, msg);
   num = reg1Listener1->getDestroys();
-  sprintf(buf, "Got wrong number of destroys events. expected[%d], real[%d]",
-          numDestroys, num);
-  ASSERT(num == numDestroys, buf);
+  msg = std::string("Got wrong number of destroys events. expected[") +
+        std::to_string(numDestroys) + "], real[" + std::to_string(num) + "]";
+  ASSERT(num == numDestroys, msg);
 }
 
 DUNIT_TASK_DEFINITION(SERVER1, StartServer)
diff --git a/cppcache/integration-test/ThinClientInterestList.hpp b/cppcache/integration-test/ThinClientInterestList.hpp
index b29f77c..528a2cc 100644
--- a/cppcache/integration-test/ThinClientInterestList.hpp
+++ b/cppcache/integration-test/ThinClientInterestList.hpp
@@ -20,8 +20,6 @@
  * limitations under the License.
  */
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include <string>
 
 #define ROOT_NAME "ThinClientInterestList.hpp"
@@ -33,7 +31,7 @@
 #define CLIENT2 s1p2
 #define SERVER1 s2p1
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
@@ -44,7 +42,7 @@
 
 static bool isLocator = false;
 static int numberOfLocators = 1;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 #include "LocatorHelper.hpp"
 void initClient(const bool isthinClient) {
@@ -69,22 +67,18 @@
                   bool noKey, bool isCreated = false) {
   // Verify key and value exist in this region, in this process.
   const char* value = val ? val : "";
-  char* buf =
-      reinterpret_cast<char*>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
-  if (!isCreated) {
-    if (noKey) {
-      sprintf(buf, "Verify key %s does not exist in region %s", key, name);
-    } else if (!val) {
-      sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-              name);
-    } else {
-      sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-              name);
-    }
-    LOG(buf);
+  std::string msg;
+  if (noKey) {
+    msg =
+        std::string("Verify key ") + key + " does not exist in region " + name;
+  } else if (!val) {
+    msg = std::string("Verify value for key ") + key +
+          " does not exist in region " + name;
+  } else {
+    msg = std::string("Verify value for key ") + key + " is: " + value +
+          " in region " + name;
   }
-  free(buf);
+  LOG(msg);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -140,7 +134,8 @@
             std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
         ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
-        LOG("In verify loop, get returned " + checkPtr->value() + " for key " + key);
+        LOG("In verify loop, get returned " + checkPtr->value() + " for key " +
+            key);
         if (strcmp(checkPtr->value().c_str(), value) != 0) {
           testValueCnt++;
         } else {
@@ -156,9 +151,8 @@
 #define verifyDestroyed(x, y) _verifyDestroyed(x, y, __LINE__)
 
 void _verifyDestroyed(const char* name, const char* key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyDestroyed() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyDestroyed() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, true);
   LOG("Entry destroyed.");
 }
@@ -167,9 +161,7 @@
 
 void _verifyEntry(const char* name, const char* key, const char* val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -177,20 +169,21 @@
 #define verifyCreated(x, y) _verifyCreated(x, y, __LINE__)
 
 void _verifyCreated(const char* name, const char* key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyCreated() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyCreated() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, false, true);
   LOG("Entry created.");
 }
 
-void createPooledRegion(const char* name, bool ackMode, const char* locators,
-                        const char* poolname,
+void createPooledRegion(const std::string& name, bool ackMode,
+                        const std::string& locators,
+                        const std::string& poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -200,9 +193,9 @@
 void createEntry(const char* name, const char* key,
                  const char* value = nullptr) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   if (value == nullptr) {
@@ -228,9 +221,9 @@
 
 void updateEntry(const char* name, const char* key, const char* value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -251,16 +244,14 @@
 
 void doNetsearch(const char* name, const char* key, const char* value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key
+            << " expecting value: " << value << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
+  std::cout << "netsearch region " << regPtr->getName() << "\n" << std::flush;
   fflush(stdout);
   ASSERT(regPtr != nullptr, "Region not found.");
 
@@ -274,10 +265,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
diff --git a/cppcache/integration-test/ThinClientInterestList2.hpp b/cppcache/integration-test/ThinClientInterestList2.hpp
index 4cfeb4d..b6b8d8c 100644
--- a/cppcache/integration-test/ThinClientInterestList2.hpp
+++ b/cppcache/integration-test/ThinClientInterestList2.hpp
@@ -21,8 +21,6 @@
 #define GEODE_INTEGRATION_TEST_THINCLIENTINTERESTLIST2_H_
 
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include <string>
 
 #define ROOT_NAME "ThinClientInterestList2"
@@ -34,7 +32,7 @@
 #define CLIENT2 s1p2
 #define SERVER1 s2p1
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
@@ -45,7 +43,7 @@
 
 static bool isLocator = false;
 static int numberOfLocators = 0;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 #include "LocatorHelper.hpp"
 void initClient(const bool isthinClient) {
@@ -70,22 +68,18 @@
                   bool noKey, bool isCreated = false) {
   // Verify key and value exist in this region, in this process.
   const char* value = val ? val : "";
-  char* buf =
-      reinterpret_cast<char*>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
-  if (!isCreated) {
-    if (noKey) {
-      sprintf(buf, "Verify key %s does not exist in region %s", key, name);
-    } else if (!val) {
-      sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-              name);
-    } else {
-      sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-              name);
-    }
-    LOG(buf);
+  std::string msg;
+  if (noKey) {
+    msg =
+        std::string("Verify key ") + key + " does not exist in region " + name;
+  } else if (!val) {
+    msg = std::string("Verify value for key ") + key +
+          " does not exist in region " + name;
+  } else {
+    msg = std::string("Verify value for key ") + key + " is: " + value +
+          " in region " + name;
   }
-  free(buf);
+  LOG(msg);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -141,7 +135,8 @@
             std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
         ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
-        LOG("In verify loop, get returned " + checkPtr->value() + " for key " + key);
+        LOG("In verify loop, get returned " + checkPtr->value() + " for key " +
+            key);
         if (strcmp(checkPtr->value().c_str(), value) != 0) {
           testValueCnt++;
         } else {
@@ -157,9 +152,8 @@
 #define verifyDestroyed(x, y) _verifyDestroyed(x, y, __LINE__)
 
 void _verifyDestroyed(const char* name, const char* key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyDestroyed() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyDestroyed() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, true);
   LOG("Entry destroyed.");
 }
@@ -168,9 +162,7 @@
 
 void _verifyEntry(const char* name, const char* key, const char* val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -178,19 +170,20 @@
 #define verifyCreated(x, y) _verifyCreated(x, y, __LINE__)
 
 void _verifyCreated(const char* name, const char* key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyCreated() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyCreated() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, false, true);
   LOG("Entry created.");
 }
 
-void createPooledRegion(const char* name, bool ackMode, const char* poolname,
+void createPooledRegion(const std::string& name, bool ackMode,
+                        const std::string& poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locatorsG, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -200,9 +193,9 @@
 void createEntry(const char* name, const char* key,
                  const char* value = nullptr) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   if (value == nullptr) {
@@ -228,9 +221,9 @@
 
 void updateEntry(const char* name, const char* key, const char* value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -251,16 +244,14 @@
 
 void doNetsearch(const char* name, const char* key, const char* value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key
+            << " expecting value: " << value << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
+  std::cout << "netsearch region " << regPtr->getName() << "\n" << std::flush;
   fflush(stdout);
   ASSERT(regPtr != nullptr, "Region not found.");
 
@@ -274,10 +265,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
diff --git a/cppcache/integration-test/ThinClientListenerInit.hpp b/cppcache/integration-test/ThinClientListenerInit.hpp
index 9c27983..7e9a1bc 100644
--- a/cppcache/integration-test/ThinClientListenerInit.hpp
+++ b/cppcache/integration-test/ThinClientListenerInit.hpp
@@ -30,7 +30,7 @@
 #define CLIENT2 s1p2
 #define SERVER1 s2p1
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::Cacheable;
 
@@ -41,7 +41,7 @@
 static bool isLocator = false;
 static bool isLocalServer = true;
 static int numberOfLocators = 1;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 const char* poolName = "__TESTPOOL1_";
 std::shared_ptr<TallyListener> reg1Listener1, reg1Listener2;
@@ -57,21 +57,20 @@
  public:
   ThinClientTallyLoader() : TallyLoader() {}
 
-  virtual ~ThinClientTallyLoader() = default;
+  ~ThinClientTallyLoader() noexcept override = default;
 
   std::shared_ptr<Cacheable> load(
       Region& rp, const std::shared_ptr<CacheableKey>& key,
-      const std::shared_ptr<Serializable>& aCallbackArgument) {
+      const std::shared_ptr<Serializable>& aCallbackArgument) override {
     int32_t loadValue = std::dynamic_pointer_cast<CacheableInt32>(
                             TallyLoader::load(rp, key, aCallbackArgument))
                             ->value();
-    char lstrvalue[32];
-    sprintf(lstrvalue, "%i", loadValue);
-    auto lreturnValue = CacheableString::create(lstrvalue);
+    auto lreturnValue = CacheableString::create(std::to_string(loadValue));
     if (key && (!rp.getAttributes().getEndpoints().empty() ||
                 !rp.getAttributes().getPoolName().empty())) {
       LOGDEBUG("Putting the value (%s) for local region clients only ",
-               lstrvalue);
+               lreturnValue->value().c_str());
+
       rp.put(key, lreturnValue);
     }
     return std::move(lreturnValue);
diff --git a/cppcache/integration-test/ThinClientListenerWriter.hpp b/cppcache/integration-test/ThinClientListenerWriter.hpp
index f96e43d..6038c79 100644
--- a/cppcache/integration-test/ThinClientListenerWriter.hpp
+++ b/cppcache/integration-test/ThinClientListenerWriter.hpp
@@ -30,7 +30,7 @@
 #define SERVER1 s2p1
 #define CLIENT3 s2p2
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 using apache::geode::client::EntryEvent;
 using apache::geode::client::RegionEvent;
 
@@ -122,7 +122,7 @@
 static bool isLocalServer = false;
 static bool isLocator = false;
 static int numberOfLocators = 0;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 const char* poolName = "__TESTPOOL1_";
 std::shared_ptr<TallyListener> regListener;
@@ -377,10 +377,9 @@
     auto subregPtr2 = exmpRegPtr->getSubregion(myRegNames[4]);
 
     for (int index = 0; index < 5; index++) {
-      char key[100] = {0};
-      char value[100] = {0};
-      ACE_OS::sprintf(key, "Key-%d", index);
-      ACE_OS::sprintf(value, "Value-%d", index);
+      std::string key = "Key-" + std::to_string(index);
+      std::string value = "Value-" + std::to_string(index);
+
       auto keyptr = CacheableKey::create(key);
       auto valuePtr = CacheableString::create(value);
       regPtr0->put(keyptr, valuePtr);
diff --git a/cppcache/integration-test/ThinClientLocalCacheLoader.hpp b/cppcache/integration-test/ThinClientLocalCacheLoader.hpp
index 9969ca5..ce4c4d7 100644
--- a/cppcache/integration-test/ThinClientLocalCacheLoader.hpp
+++ b/cppcache/integration-test/ThinClientLocalCacheLoader.hpp
@@ -28,7 +28,7 @@
 #define CLIENT1 s1p1
 #define SERVER1 s2p1
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::Cacheable;
 using apache::geode::client::CacheFactory;
@@ -44,27 +44,25 @@
  public:
   ThinClientTallyLoader() : TallyLoader() {}
 
-  virtual ~ThinClientTallyLoader() = default;
+  ~ThinClientTallyLoader() noexcept override = default;
 
   std::shared_ptr<Cacheable> load(
       Region& rp, const std::shared_ptr<CacheableKey>& key,
-      const std::shared_ptr<Serializable>& aCallbackArgument) {
+      const std::shared_ptr<Serializable>& aCallbackArgument) override {
     int32_t loadValue = std::dynamic_pointer_cast<CacheableInt32>(
                             TallyLoader::load(rp, key, aCallbackArgument))
                             ->value();
-    char lstrvalue[32];
-    sprintf(lstrvalue, "%i", loadValue);
-    auto lreturnValue = CacheableString::create(lstrvalue);
+    auto lreturnValue = CacheableString::create(std::to_string(loadValue));
     if (key != nullptr && (!rp.getAttributes().getEndpoints().empty() ||
                            !rp.getAttributes().getPoolName().empty())) {
       LOGDEBUG("Putting the value (%s) for local region clients only ",
-               lstrvalue);
+               lreturnValue->value().c_str());
       rp.put(key, lreturnValue);
     }
     return std::move(lreturnValue);
   }
 
-  void close(Region& region) {
+  void close(Region& region) override {
     LOG(" ThinClientTallyLoader::close() called");
     LOGINFO(" Region %s is Destroyed = %d ", region.getName().c_str(),
             region.isDestroyed());
@@ -98,7 +96,7 @@
   {
     // Create a Geode Cache with the "client_Loader.xml" Cache XML file.
     const char* clientXmlFile = "client_Loader.xml";
-    static char* path = ACE_OS::getenv("TESTSRC");
+    static char* path = std::getenv("TESTSRC");
     std::string clientXml = path;
     clientXml += "/resources/";
     clientXml += clientXmlFile;
diff --git a/cppcache/integration-test/ThinClientMultipleCaches.hpp b/cppcache/integration-test/ThinClientMultipleCaches.hpp
index 6214eed..247448a 100644
--- a/cppcache/integration-test/ThinClientMultipleCaches.hpp
+++ b/cppcache/integration-test/ThinClientMultipleCaches.hpp
@@ -32,7 +32,7 @@
 #define CLIENT1 s1p1
 #define SERVER1 s2p1
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::Cache;
 using apache::geode::client::CacheFactory;
@@ -43,7 +43,7 @@
 static bool isLocalServer = false;
 static bool isLocator = false;
 
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer);
 
 #include "LocatorHelper.hpp"
diff --git a/cppcache/integration-test/ThinClientNotification.hpp b/cppcache/integration-test/ThinClientNotification.hpp
index 84a7b5e..39e7235 100644
--- a/cppcache/integration-test/ThinClientNotification.hpp
+++ b/cppcache/integration-test/ThinClientNotification.hpp
@@ -21,8 +21,6 @@
  */
 
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include <string>
 
 #define ROOT_NAME "ThinClientNotification"
@@ -30,7 +28,7 @@
 
 #include "CacheHelper.hpp"
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
@@ -67,20 +65,18 @@
                   bool noKey) {
   // Verify key and value exist in this region, in this process.
   const char* value = val ? val : "";
-  char* buf =
-      reinterpret_cast<char*>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
+  std::string msg;
   if (noKey) {
-    sprintf(buf, "Verify key %s does not exist in region %s", key, name);
+    msg =
+        std::string("Verify key ") + key + " does not exist in region " + name;
   } else if (!val) {
-    sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-            name);
+    msg = std::string("Verify value for key ") + key +
+          " does not exist in region " + name;
   } else {
-    sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-            name);
+    msg = std::string("Verify value for key ") + key + " is: " + value +
+          " in region " + name;
   }
-  LOG(buf);
-  free(buf);
+  LOG(msg);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -124,7 +120,8 @@
           std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
       ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
-      LOG("In verify loop, get returned " + checkPtr->value() + " for key " + key);
+      LOG("In verify loop, get returned " + checkPtr->value() + " for key " +
+          key);
       if (strcmp(checkPtr->value().c_str(), value) != 0) {
         testValueCnt++;
       } else {
@@ -140,9 +137,8 @@
 #define verifyInvalid(x, y) _verifyInvalid(x, y, __LINE__)
 
 void _verifyInvalid(const char* name, const char* key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyInvalid() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyInvalid() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, false);
   LOG("Entry invalidated.");
 }
@@ -150,9 +146,8 @@
 #define verifyDestroyed(x, y) _verifyDestroyed(x, y, __LINE__)
 
 void _verifyDestroyed(const char* name, const char* key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyDestroyed() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyDestroyed() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, true);
   LOG("Entry destroyed.");
 }
@@ -161,20 +156,20 @@
 
 void _verifyEntry(const char* name, const char* key, const char* val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
 
-void createPooledRegion(const char* name, bool ackMode, const char* locators,
-                        const char* poolname,
+void createPooledRegion(const std::string& name, bool ackMode,
+                        const std::string& locators,
+                        const std::string& poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -184,9 +179,9 @@
 
 void createEntry(const char* name, const char* key, const char* value) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -209,9 +204,9 @@
 
 void updateEntry(const char* name, const char* key, const char* value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -232,16 +227,14 @@
 
 void doNetsearch(const char* name, const char* key, const char* value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key
+            << " expecting value: " << value << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
+  std::cout << "netsearch region " << regPtr->getName() << "\n" << std::flush;
   fflush(stdout);
   ASSERT(regPtr != nullptr, "Region not found.");
   /*NIL: Changed the asserion due to the change in invalidate.
@@ -258,10 +251,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -271,8 +262,7 @@
 
 void invalidateEntry(const char* name, const char* key) {
   LOG("invalidateEntry() entered.");
-  fprintf(stdout, "Invalidating entry -- key: %s  in region %s\n", key, name);
-  fflush(stdout);
+  std::cout << "Invalidating entry -- key: " << key << " in region " << name << "\n" << std::flush;
   // Invalidate entry, verify entry is invalidated
   auto keyPtr = CacheableKey::create(key);
 
@@ -292,8 +282,7 @@
 
 void destroyEntry(const char* name, const char* key) {
   LOG("destroyEntry() entered.");
-  fprintf(stdout, "Destroying entry -- key: %s  in region %s\n", key, name);
-  fflush(stdout);
+  std::cout << "Destroying entry -- key: " << key << " in region " << name << "\n" << std::flush;
   // Destroy entry, verify entry is destroyed
   auto keyPtr = CacheableKey::create(key);
 
diff --git a/cppcache/integration-test/ThinClientPdxSerializer.hpp b/cppcache/integration-test/ThinClientPdxSerializer.hpp
index 5a01829..12cfd1d 100644
--- a/cppcache/integration-test/ThinClientPdxSerializer.hpp
+++ b/cppcache/integration-test/ThinClientPdxSerializer.hpp
@@ -22,8 +22,6 @@
 
 #include <string>
 
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 
 #include "fw_dunit.hpp"
 #include "ThinClientHelper.hpp"
@@ -39,7 +37,7 @@
 #define LOCATOR s2p2
 #define SERVER1 s2p1
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableBoolean;
 using apache::geode::client::UserObjectSizer;
@@ -51,7 +49,7 @@
 bool isLocalServer = false;
 
 const char* poolNames[] = {"Pool1", "Pool2", "Pool3"};
-const char* locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 bool isPoolConfig = false;  // To track if pool case is running
 
@@ -68,7 +66,7 @@
   // Create just one pool and attach all regions to that.
   initClient(true, isPdxIgnoreUnreadFields);
   isPoolConfig = true;
-  createPool(poolNames[0], locHostPort, nullptr, 0, true);
+  createPool(poolNames[0], locHostPort, {}, 0, true);
   createRegionAndAttachPool("DistRegionAck", USE_ACK, poolNames[0],
                             false /*Caching disabled*/);
   LOG("StepOne complete.");
@@ -328,7 +326,8 @@
     auto key = CacheableKey::create(1);
 
     // New object
-    auto testDiffTpePdxSV2 = std::unique_ptr<PdxTests::TestDiffTypePdxSV2>(new PdxTests::TestDiffTypePdxSV2(true));
+    auto testDiffTpePdxSV2 = std::unique_ptr<PdxTests::TestDiffTypePdxSV2>(
+        new PdxTests::TestDiffTypePdxSV2(true));
 
     // GET
     auto pdxWrapper2 = std::dynamic_pointer_cast<PdxWrapper>(region0->get(key));
diff --git a/cppcache/integration-test/ThinClientPdxSerializers.hpp b/cppcache/integration-test/ThinClientPdxSerializers.hpp
index f31f191..ec984d5 100644
--- a/cppcache/integration-test/ThinClientPdxSerializers.hpp
+++ b/cppcache/integration-test/ThinClientPdxSerializers.hpp
@@ -20,7 +20,7 @@
 #ifndef GEODE_INTEGRATION_TEST_THINCLIENTPDXSERIALIZERS_H_
 #define GEODE_INTEGRATION_TEST_THINCLIENTPDXSERIALIZERS_H_
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableArrayList;
 using apache::geode::client::CacheableHashMap;
@@ -95,7 +95,7 @@
     auto nonPdxType = std::make_shared<PdxTests::NonPdxType>();
 
     try {
-      int32_t *Lengtharr;
+      int32_t* Lengtharr;
       int32_t arrLen = 0;
       nonPdxType->deleteByteByteArray();
       nonPdxType->m_byteByteArray = pdxReader.readArrayOfByteArrays(
diff --git a/cppcache/integration-test/ThinClientPutAll.hpp b/cppcache/integration-test/ThinClientPutAll.hpp
index 0724fd9..37aaa54 100644
--- a/cppcache/integration-test/ThinClientPutAll.hpp
+++ b/cppcache/integration-test/ThinClientPutAll.hpp
@@ -20,12 +20,14 @@
  * limitations under the License.
  */
 
+#include <string>
+#include <sstream>
+#include <iomanip>
+
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include "testobject/PdxType.hpp"
 #include "testobject/VariousPdxTypes.hpp"
-#include <string>
+
 #include "SerializationRegistry.hpp"
 #include "CacheRegionHelper.hpp"
 #include "CacheImpl.hpp"
@@ -33,7 +35,7 @@
 #define ROOT_SCOPE DISTRIBUTED_ACK
 #include "CacheHelper.hpp"
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::Cache;
 using apache::geode::client::CacheableInt32;
@@ -57,7 +59,7 @@
 static bool isLocator = false;
 static int numberOfLocators = 0;
 
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 const char* poolName = "__TESTPOOL1_";
 
@@ -85,22 +87,18 @@
                   bool noKey, bool isCreated = false) {
   // Verify key and value exist in this region, in this process.
   const char* value = val ? val : "";
-  char* buf =
-      reinterpret_cast<char*>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
-  if (!isCreated) {
-    if (noKey) {
-      sprintf(buf, "Verify key %s does not exist in region %s", key, name);
-    } else if (!val) {
-      sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-              name);
-    } else {
-      sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-              name);
-    }
-    LOG(buf);
+  std::string msg;
+  if (noKey) {
+    msg =
+        std::string("Verify key ") + key + " does not exist in region " + name;
+  } else if (!val) {
+    msg = std::string("Verify value for key ") + key +
+          " does not exist in region " + name;
+  } else {
+    msg = std::string("Verify value for key ") + key + " is: " + value +
+          " in region " + name;
   }
-  free(buf);
+  LOG(msg);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -156,7 +154,8 @@
             std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
         ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
-        LOG("In verify loop, get returned " + checkPtr->value() + " for key " + key);
+        LOG("In verify loop, get returned " + checkPtr->value() + " for key " +
+            key);
         if (strcmp(checkPtr->value().c_str(), value) != 0) {
           testValueCnt++;
         } else {
@@ -173,9 +172,7 @@
 
 void _verifyEntry(const char* name, const char* key, const char* val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -183,29 +180,31 @@
 #define verifyCreated(x, y) _verifyCreated(x, y, __LINE__)
 
 void _verifyCreated(const char* name, const char* key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyCreated() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyCreated() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, false, true);
   LOG("Entry created.");
 }
 void createRegion(const char* name, bool ackMode, bool isCacheEnabled,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr = getHelper()->createRegion(name, ackMode, isCacheEnabled,
                                           nullptr, clientNotificationEnabled);
   ASSERT(regPtr != nullptr, "Failed to create region.");
   LOG("Region created.");
 }
-void createPooledRegion(const char* name, bool ackMode, const char* locators,
-                        const char* poolname,
+void createPooledRegion(const std::string& name, bool ackMode,
+                        const std::string& locators,
+                        const std::string& poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -214,12 +213,13 @@
 }
 
 void createPooledRegionConcurrencyCheckDisabled(
-    const char* name, bool ackMode, const char*, const char* locators,
-    const char* poolname, bool clientNotificationEnabled = false,
+    const std::string& name, bool ackMode, const std::string& locators,
+    const std::string& poolname, bool clientNotificationEnabled = false,
     bool cachingEnable = true, bool concurrencyCheckEnabled = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr = getHelper()->createPooledRegionConcurrencyCheckDisabled(
       name, ackMode, locators, poolname, cachingEnable,
       clientNotificationEnabled, concurrencyCheckEnabled);
@@ -230,9 +230,9 @@
 void createEntry(const char* name, const char* key,
                  const char* value = nullptr) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   if (value == nullptr) {
@@ -258,9 +258,9 @@
 
 void updateEntry(const char* name, const char* key, const char* value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -281,16 +281,14 @@
 
 void doNetsearch(const char* name, const char* key, const char* value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key
+            << " expecting value: " << value << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
+  std::cout << "netsearch region " << regPtr->getName() << "\n" << std::flush;
   fflush(stdout);
   ASSERT(regPtr != nullptr, "Region not found.");
 
@@ -304,10 +302,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -365,9 +361,8 @@
 DUNIT_TASK_DEFINITION(CLIENT1, StepOne_Pooled_Locator_ConcurrencyCheckDisabled)
   {
     initClient(true);
-    createPooledRegionConcurrencyCheckDisabled(regionNames[0], USE_ACK, nullptr,
-                                               locatorsG, poolName, true, true,
-                                               false);
+    createPooledRegionConcurrencyCheckDisabled(
+        regionNames[0], USE_ACK, locatorsG, poolName, true, true, false);
     LOG("StepOne_Pooled_Locator_ConcurrencyCheckDisabled complete.");
   }
 END_TASK_DEFINITION
@@ -470,13 +465,10 @@
   {
     HashMapOfCacheable entryMap;
     entryMap.clear();
-    char key[2048];
-    char value[2048];
     for (int32_t item = 0; item < 500; item++) {
-      sprintf(key, "key-%d", item);
-      sprintf(value, "%d", item);
-      entryMap.emplace(CacheableKey::create(key),
-                       CacheableString::create(value));
+      entryMap.emplace(
+          CacheableKey::create(std::string("key-") + std::to_string(item)),
+          CacheableString::create(std::to_string(item)));
     }
 
     auto regPtr0 = getHelper()->getRegion(regionNames[0]);
@@ -485,8 +477,8 @@
 
     std::vector<std::shared_ptr<CacheableKey>> getAllkeys;
     for (int32_t item = 0; item < 500; item++) {
-      sprintf(key, "key-%d", item);
-      getAllkeys.push_back(CacheableKey::create(key));
+      getAllkeys.push_back(
+          CacheableKey::create(std::string("key-") + std::to_string(item)));
     }
 
     const auto values = regPtr0->getAll(getAllkeys);
@@ -561,14 +553,14 @@
     HashMapOfCacheable map0;
     map0.clear();
     for (int i = 0; i < 100000; i++) {
-      char key0[50] = {0};
-      char val0[2500] = {0};
-      sprintf(key0, "key-%d", i);
-      sprintf(val0, "%1000d", i);
-      map0.emplace(CacheableKey::create(key0), CacheableString::create(val0));
+      auto key0 = std::string("key-") + std::to_string(i);
+      std::ostringstream val0;
+      val0 << std::left << std::setfill('0') << std::setw(1000) << i;
+      map0.emplace(CacheableKey::create(key0),
+                   CacheableString::create(val0.str()));
     }
-    auto regPtr0 = getHelper()->getRegion(regionNames[0]);
 
+    auto regPtr0 = getHelper()->getRegion(regionNames[0]);
     regPtr0->putAll(map0, std::chrono::seconds(40000));
 
     LOG("StepEight complete.");
@@ -580,9 +572,8 @@
   {
     LOG("Verify large PutAll");
     for (int i = 0; i < 100000; i++) {
-      char key0[50] = {0};
-      sprintf(key0, "key-%d", i);
-      verifyCreated(regionNames[0], key0);
+      auto key0 = std::string("key-") + std::to_string(i);
+      verifyCreated(regionNames[0], key0.c_str());
     }
     LOG("StepNine complete.");
   }
@@ -747,9 +738,8 @@
         const auto& mVal = iter.second;
         if (mVal != nullptr) {
           auto val1 = std::dynamic_pointer_cast<PdxTests::PdxTypes1>(mVal);
-          sprintf(buf, "value from map %d , expected value %d ",
-                  val1->getm_i1(), 34324);
-          LOG(buf);
+          LOG(std::string("value from map ") + std::to_string(val1->getm_i1()) +
+              ", expected value 34324");
           ASSERT(val1->getm_i1() == 34324, "value not matched");
         }
       }
diff --git a/cppcache/integration-test/ThinClientPutAllTimeout.hpp b/cppcache/integration-test/ThinClientPutAllTimeout.hpp
index fa179ec..10a221a 100644
--- a/cppcache/integration-test/ThinClientPutAllTimeout.hpp
+++ b/cppcache/integration-test/ThinClientPutAllTimeout.hpp
@@ -29,7 +29,7 @@
 #define CLIENT2 s1p2
 #define SERVER1 s2p1
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::Exception;
 using apache::geode::client::HashMapOfCacheable;
@@ -40,7 +40,7 @@
 
 bool isLocalServer = true;
 static bool isLocator = false;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #include "LocatorHelper.hpp"
 
@@ -69,26 +69,26 @@
 void validateEventCount(int line) {
   LOGINFO("ValidateEvents called from line (%d).", line);
   int num = reg1Listener1->getCreates();
-  char buf[1024];
-  sprintf(buf, "Got wrong number of creation events. expected[%d], real[%d]",
-          numCreates, num);
-  ASSERT(num == numCreates, buf);
+  auto msg = std::string("Got wrong number of creation events. expected[") +
+             std::to_string(numCreates) + "], real[" + std::to_string(num) +
+             "]";
+  ASSERT(num == numCreates, msg);
   num = reg1Listener1->getUpdates();
-  sprintf(buf, "Got wrong number of update events. expected[%d], real[%d]",
-          numUpdates, num);
-  ASSERT(num == numUpdates, buf);
+  msg = std::string("Got wrong number of update events. expected[") +
+        std::to_string(numUpdates) + "], real[" + std::to_string(num) + "]";
+  ASSERT(num == numUpdates, msg);
   num = reg1Writer1->getCreates();
-  sprintf(buf, "Got wrong number of writer events. expected[%d], real[%d]",
-          numCreates, num);
-  ASSERT(num == numCreates, buf);
+  msg = std::string("Got wrong number of writer events. expected[") +
+        std::to_string(numCreates) + "], real[" + std::to_string(num) + "]";
+  ASSERT(num == numCreates, msg);
   num = reg1Listener1->getInvalidates();
-  sprintf(buf, "Got wrong number of invalidate events. expected[%d], real[%d]",
-          numInvalidates, num);
-  ASSERT(num == numInvalidates, buf);
+  msg = std::string("Got wrong number of invalidate events. expected[") +
+        std::to_string(numInvalidates) + "], real[" + std::to_string(num) + "]";
+  ASSERT(num == numInvalidates, msg);
   num = reg1Listener1->getDestroys();
-  sprintf(buf, "Got wrong number of destroys events. expected[%d], real[%d]",
-          numDestroys, num);
-  ASSERT(num == numDestroys, buf);
+  msg = std::string("Got wrong number of destroys events. expected[") +
+        std::to_string(numDestroys) + "], real[" + std::to_string(num) + "]";
+  ASSERT(num == numDestroys, msg);
 }
 
 DUNIT_TASK_DEFINITION(SERVER1, StartServer)
@@ -116,11 +116,11 @@
   map0.clear();
 
   for (int i = 0; i < 100000; i++) {
-    char key0[50] = {0};
-    char val0[2500] = {0};
-    sprintf(key0, "key-%d", i);
-    sprintf(val0, "%1000d", i);
-    map0.emplace(CacheableKey::create(key0), CacheableString::create(val0));
+    auto key0 = std::string("key-") + std::to_string(i);
+    std::ostringstream val0;
+    val0 << std::left << std::setfill('0') << std::setw(1000) << i;
+    map0.emplace(CacheableKey::create(key0),
+                 CacheableString::create(val0.str()));
   }
 
   map0.emplace(CacheableKey::create("timeout-this-entry"),
@@ -140,11 +140,11 @@
   map0.clear();
 
   for (int i = 0; i < 100000; i++) {
-    char key0[50] = {0};
-    char val0[2500] = {0};
-    sprintf(key0, "key-%d", i);
-    sprintf(val0, "%1000d", i);
-    map0.emplace(CacheableKey::create(key0), CacheableString::create(val0));
+    auto key0 = std::string("key-") + std::to_string(i);
+    std::ostringstream val0;
+    val0 << std::left << std::setfill('0') << std::setw(1000) << i;
+    map0.emplace(CacheableKey::create(key0),
+                 CacheableString::create(val0.str()));
   }
 
   map0.emplace(CacheableKey::create("timeout-this-entry"),
@@ -159,7 +159,7 @@
 
 DUNIT_TASK_DEFINITION(CLIENT1, testTimeoutException)
   {
-    printf("start task testTimeoutException\n");
+    std::cout << "start task testTimeoutException\n";
     auto regPtr = getHelper()->getRegion(regionNames[0]);
 
     regPtr->registerAllKeys();
@@ -198,7 +198,7 @@
 
 DUNIT_TASK_DEFINITION(CLIENT1, testWithoutTimeoutException)
   {
-    printf("start task testWithoutTimeoutException\n");
+    std::cout << "start task testWithoutTimeoutException\n";
     auto regPtr = getHelper()->getRegion(regionNames[0]);
 
     // regPtr->registerAllKeys();
@@ -216,8 +216,7 @@
       logmsg += excp.what();
       LOG(logmsg.c_str());
     } catch (const Exception& ex) {
-      printf("Exception while putALL :: %s : %s\n", ex.getName().c_str(),
-             ex.what());
+      std::cout << "Exception while putAll :: " << ex.getName() << " : " << ex.what() << "\n";
     }
     FAIL("Something is wrong while putAll");
   }
@@ -238,10 +237,7 @@
       logmsg += excp.what();
       LOG(logmsg.c_str());
     } catch (const Exception& ex) {
-      printf(
-          "Exception while putAllWithOneEntryTimeoutWithCallBackArg :: %s : "
-          "%s\n",
-          ex.getName().c_str(), ex.what());
+      std::cout << "Exception while putAllWithOneEntryTimeoutWithCallBackArg :: " << ex.getName() << " : " << ex.what() << "\n";
     }
     FAIL("Something is wrong while putAllWithOneEntryTimeoutWithCallBackArg");
   }
diff --git a/cppcache/integration-test/ThinClientPutAllWithCallBack.hpp b/cppcache/integration-test/ThinClientPutAllWithCallBack.hpp
index 005dd1d..7ed18a1 100644
--- a/cppcache/integration-test/ThinClientPutAllWithCallBack.hpp
+++ b/cppcache/integration-test/ThinClientPutAllWithCallBack.hpp
@@ -20,12 +20,13 @@
  * limitations under the License.
  */
 
+#include <string>
+#include <sstream>
+#include <iomanip>
+
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include "testobject/PdxType.hpp"
 #include "testobject/VariousPdxTypes.hpp"
-#include <string>
 
 #define ROOT_NAME "ThinClientPutAllWithCallBack"
 #define ROOT_SCOPE DISTRIBUTED_ACK
@@ -39,7 +40,7 @@
 #define SERVER1 s2p1
 #define SERVER2 s2p2
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableInt32;
 using apache::geode::client::CacheableInt64;
@@ -56,7 +57,7 @@
 static bool isLocator = false;
 static int numberOfLocators = 0;
 
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 const char* poolName = "__TESTPOOL1_";
 
@@ -84,21 +85,18 @@
                   bool noKey, bool isCreated = false) {
   // Verify key and value exist in this region, in this process.
   const char* value = val ? val : "";
-  char* buf =
-      reinterpret_cast<char*>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
-  if (!isCreated) {
-    if (noKey) {
-      sprintf(buf, "Verify key %s does not exist in region %s", key, name);
-    } else if (!val) {
-      sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-              name);
-    } else {
-      sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-              name);
-    }
-    LOG(buf);
+  std::string msg;
+  if (noKey) {
+    msg =
+        std::string("Verify key ") + key + " does not exist in region " + name;
+  } else if (!val) {
+    msg = std::string("Verify value for key ") + key +
+          " does not exist in region " + name;
+  } else {
+    msg = std::string("Verify value for key ") + key + " is: " + value +
+          " in region " + name;
   }
+  LOG(msg);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -154,7 +152,8 @@
             std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
         ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
-        LOG("In verify loop, get returned " + checkPtr->value() + " for key " + key);
+        LOG("In verify loop, get returned " + checkPtr->value() + " for key " +
+            key);
         if (strcmp(checkPtr->value().c_str(), value) != 0) {
           testValueCnt++;
         } else {
@@ -171,9 +170,7 @@
 
 void _verifyEntry(const char* name, const char* key, const char* val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -181,29 +178,31 @@
 #define verifyCreated(x, y) _verifyCreated(x, y, __LINE__)
 
 void _verifyCreated(const char* name, const char* key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyCreated() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyCreated() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, false, true);
   LOG("Entry created.");
 }
 void createRegion(const char* name, bool ackMode, bool isCacheEnabled,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr = getHelper()->createRegion(name, ackMode, isCacheEnabled,
                                           nullptr, clientNotificationEnabled);
   ASSERT(regPtr != nullptr, "Failed to create region.");
   LOG("Region created.");
 }
-void createPooledRegion(const char* name, bool ackMode, const char* locators,
-                        const char* poolname,
+void createPooledRegion(const std::string& name, bool ackMode,
+                        const std::string& locators,
+                        const std::string& poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -212,12 +211,13 @@
 }
 
 void createPooledRegionConcurrencyCheckDisabled(
-    const char* name, bool ackMode, const char* locators, const char* poolname,
-    bool clientNotificationEnabled = false, bool cachingEnable = true,
-    bool concurrencyCheckEnabled = true) {
+    const std::string& name, bool ackMode, const std::string& locators,
+    const std::string& poolname, bool clientNotificationEnabled = false,
+    bool cachingEnable = true, bool concurrencyCheckEnabled = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr = getHelper()->createPooledRegionConcurrencyCheckDisabled(
       name, ackMode, locators, poolname, cachingEnable,
       clientNotificationEnabled, concurrencyCheckEnabled);
@@ -228,9 +228,9 @@
 void createEntry(const char* name, const char* key,
                  const char* value = nullptr) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   if (value == nullptr) {
@@ -256,9 +256,9 @@
 
 void updateEntry(const char* name, const char* key, const char* value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -279,16 +279,14 @@
 
 void doNetsearch(const char* name, const char* key, const char* value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key
+            << " expecting value: " << value << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
+  std::cout << "netsearch region " << regPtr->getName() << "\n" << std::flush;
   fflush(stdout);
   ASSERT(regPtr != nullptr, "Region not found.");
 
@@ -302,10 +300,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -473,11 +469,9 @@
   {
     HashMapOfCacheable entryMap;
     entryMap.clear();
-    char key[2048];
-    char value[2048];
     for (int32_t item = 0; item < 500; item++) {
-      sprintf(key, "key-%d", item);
-      sprintf(value, "%d", item);
+      auto key = std::string("key-") + std::to_string(item);
+      auto value = std::to_string(item);
       entryMap.emplace(CacheableKey::create(key),
                        CacheableString::create(value));
     }
@@ -490,8 +484,8 @@
 
     std::vector<std::shared_ptr<CacheableKey>> getAllkeys;
     for (int32_t item = 0; item < 500; item++) {
-      sprintf(key, "key-%d", item);
-      getAllkeys.push_back(CacheableKey::create(key));
+      getAllkeys.push_back(
+          CacheableKey::create(std::string("key-") + std::to_string(item)));
     }
 
     const auto values = regPtr0->getAll(getAllkeys);
@@ -567,12 +561,12 @@
     LOG("Do large PutAll");
     HashMapOfCacheable map0;
     map0.clear();
-    for (int i = 0; i < 100000; i++) {
-      char key0[50] = {0};
-      char val0[2500] = {0};
-      sprintf(key0, "key-%d", i);
-      sprintf(val0, "%1000d", i);
-      map0.emplace(CacheableKey::create(key0), CacheableString::create(val0));
+    for (int i = 0; i < 1000; i++) {
+      std::ostringstream val0;
+      val0 << std::left << std::setfill('0') << std::setw(1000) << i;
+      auto key0 = std::string("key-") + std::to_string(i);
+      map0.emplace(CacheableKey::create(key0),
+                   CacheableString::create(val0.str()));
     }
     auto regPtr0 = getHelper()->getRegion(regionNames[0]);
 
@@ -587,10 +581,9 @@
 DUNIT_TASK_DEFINITION(CLIENT2, VerifyLargePutAll)
   {
     LOG("Verify large PutAll");
-    for (int i = 0; i < 100000; i++) {
-      char key0[50] = {0};
-      sprintf(key0, "key-%d", i);
-      verifyCreated(regionNames[0], key0);
+    for (int i = 0; i < 1000; i++) {
+      auto key0 = std::string("key-") + std::to_string(i);
+      verifyCreated(regionNames[0], key0.c_str());
     }
     LOG("VerifyLargePutAll complete.");
   }
@@ -776,9 +769,8 @@
         auto mVal = iter.second;
         if (mVal != nullptr) {
           auto val1 = std::dynamic_pointer_cast<PdxTests::PdxTypes1>(mVal);
-          sprintf(buf, "value from map %d , expected value %d ",
-                  val1->getm_i1(), 34324);
-          LOG(buf);
+          LOG(std::string("value from map ") + std::to_string(val1->getm_i1()) +
+              ", expected value 34324");
           ASSERT(val1->getm_i1() == 34324, "value not matched");
         }
       }
diff --git a/cppcache/integration-test/ThinClientPutGetAll.hpp b/cppcache/integration-test/ThinClientPutGetAll.hpp
index e69839d..2101f94 100644
--- a/cppcache/integration-test/ThinClientPutGetAll.hpp
+++ b/cppcache/integration-test/ThinClientPutGetAll.hpp
@@ -21,8 +21,6 @@
 #define GEODE_INTEGRATION_TEST_THINCLIENTPUTGETALL_H_
 
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include <string>
 #include <unordered_map>
 
@@ -38,7 +36,7 @@
 #define CLIENT2 s1p2
 #define SERVER1 s2p1
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using PdxTests::PdxTypes1;
 using PdxTests::PdxTypes10;
@@ -59,7 +57,7 @@
 static bool isLocator = false;
 static int numberOfLocators = 0;
 
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 const char* poolName = "__TEST_POOL1__";
 
@@ -93,8 +91,10 @@
       const auto key = std::dynamic_pointer_cast<CacheableKey>(iter.first);
       const auto& mVal = iter.second;
       if (mVal != nullptr) {
-        LOG(std::string("Value from map ") + mVal->toString() + ", expected value " + expected[key->toString()]);
-        ASSERT(mVal->toString() == expected[key->toString()], "value not matched");
+        LOG(std::string("Value from map ") + mVal->toString() +
+            ", expected value " + expected[key->toString()]);
+        ASSERT(mVal->toString() == expected[key->toString()],
+               "value not matched");
       } else {
         ASSERT(key->toString() == "keyNotThere",
                "keyNotThere value is not null");
@@ -109,13 +109,15 @@
   verifyGetAll(region, values, startIndex, callBack);
 }
 
-void createPooledRegion(const char* name, bool ackMode, const char* locators,
-                        const char* poolname,
+void createPooledRegion(const std::string& name, bool ackMode,
+                        const std::string& locators,
+                        const std::string& poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
diff --git a/cppcache/integration-test/ThinClientRIwithlocalRegionDestroy.hpp b/cppcache/integration-test/ThinClientRIwithlocalRegionDestroy.hpp
index f3e8c0d..b323051 100644
--- a/cppcache/integration-test/ThinClientRIwithlocalRegionDestroy.hpp
+++ b/cppcache/integration-test/ThinClientRIwithlocalRegionDestroy.hpp
@@ -21,8 +21,6 @@
  */
 #include "fw_dunit.hpp"
 #include <geode/RegionEvent.hpp>
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include <string>
 
 #define ROOT_NAME "ThinClientRIwithlocalRegionDestroy"
@@ -30,7 +28,7 @@
 
 #include "CacheHelper.hpp"
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
@@ -49,7 +47,7 @@
 bool isLocalServer = false;
 
 static bool isLocator = false;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #include "LocatorHelper.hpp"
 
@@ -120,13 +118,15 @@
   return cacheHelper;
 }
 
-void createPooledRegion(const char* name, bool ackMode, const char* locators,
-                        const char* poolname,
+void createPooledRegion(const std::string& name, bool ackMode,
+                        const std::string& locators,
+                        const std::string& poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -223,12 +223,12 @@
     auto regPtr0 = getHelper()->getRegion(regionNames[0]);
 
     for (int index = 0; index < 5; index++) {
-      char key[100] = {0};
-      char value[100] = {0};
-      ACE_OS::sprintf(key, "Key-%d", index);
-      ACE_OS::sprintf(value, "Value-%d", index);
+      auto key = "Key-" + std::to_string(index);
+      auto value = "Value-" + std::to_string(index);
+
       auto keyptr = CacheableKey::create(key);
       auto valuePtr = CacheableString::create(value);
+
       regPtr0->put(keyptr, valuePtr);
     }
     LOG("StepFour complete.");
@@ -253,12 +253,12 @@
     auto regPtr0 = getHelper()->getRegion(regionNames[0]);
 
     for (int index = 0; index < 5; index++) {
-      char key[100] = {0};
-      char value[100] = {0};
-      ACE_OS::sprintf(key, "Key-%d", index);
-      ACE_OS::sprintf(value, "Value-%d", index);
+      auto key = "Key-" + std::to_string(index);
+      auto value = "Value-" + std::to_string(index);
+
       auto keyptr = CacheableKey::create(key);
       auto valuePtr = CacheableString::create(value);
+
       regPtr0->put(keyptr, valuePtr);
     }
     LOG("StepFour complete.");
@@ -303,12 +303,12 @@
     auto regPtr1 = getHelper()->getRegion(regionNames[1]);
 
     for (int index = 0; index < 5; index++) {
-      char key[100] = {0};
-      char value[100] = {0};
-      ACE_OS::sprintf(key, "Key-%d", index);
-      ACE_OS::sprintf(value, "Value-%d", index);
+      auto key = "Key-" + std::to_string(index);
+      auto value = "Value-" + std::to_string(index);
+
       auto keyptr = CacheableKey::create(key);
       auto valuePtr = CacheableString::create(value);
+
       regPtr0->put(keyptr, valuePtr);
       regPtr1->put(keyptr, valuePtr);
     }
@@ -372,12 +372,12 @@
     auto subregPtr1 = regPtr2->getSubregion(regionNames[4]);
 
     for (int index = 0; index < 5; index++) {
-      char key[100] = {0};
-      char value[100] = {0};
-      ACE_OS::sprintf(key, "Key-%d", index);
-      ACE_OS::sprintf(value, "Value-%d", index);
+      auto key = "Key-" + std::to_string(index);
+      auto value = "Value-" + std::to_string(index);
+
       auto keyptr = CacheableKey::create(key);
       auto valuePtr = CacheableString::create(value);
+
       regPtr2->put(keyptr, valuePtr);
       subregPtr0->put(keyptr, valuePtr);
       subregPtr1->put(keyptr, valuePtr);
@@ -395,10 +395,9 @@
     auto subregPtr1 = regPtr2->getSubregion(regionNames[4]);
 
     for (int index = 0; index < 5; index++) {
-      char key[100] = {0};
-      char value[100] = {0};
-      ACE_OS::sprintf(key, "Key-%d", index);
-      ACE_OS::sprintf(value, "Value-%d", index);
+      auto key = "Key-" + std::to_string(index);
+      auto value = "Value-" + std::to_string(index);
+
       auto keyptr = CacheableKey::create(key);
       auto valuePtr = CacheableString::create(value);
 
diff --git a/cppcache/integration-test/ThinClientRegex.hpp b/cppcache/integration-test/ThinClientRegex.hpp
index 88aa0af..738c1df 100644
--- a/cppcache/integration-test/ThinClientRegex.hpp
+++ b/cppcache/integration-test/ThinClientRegex.hpp
@@ -21,8 +21,6 @@
 #define GEODE_INTEGRATION_TEST_THINCLIENTREGEX_H_
 
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include <string>
 
 #define ROOT_NAME "ThinClientRegex"
@@ -34,7 +32,7 @@
 #define CLIENT2 s1p2
 #define SERVER1 s2p1
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
@@ -44,7 +42,7 @@
 bool isLocalServer = false;
 
 static bool isLocator = false;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #include "LocatorHelper.hpp"
 void initClient(const bool isthinClient) {
@@ -69,22 +67,18 @@
                   bool noKey, bool isCreated = false) {
   // Verify key and value exist in this region, in this process.
   const char* value = val ? val : "";
-  char* buf =
-      reinterpret_cast<char*>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
-  if (!isCreated) {
-    if (noKey) {
-      sprintf(buf, "Verify key %s does not exist in region %s", key, name);
-    } else if (!val) {
-      sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-              name);
-    } else {
-      sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-              name);
-    }
-    LOG(buf);
+  std::string msg;
+  if (noKey) {
+    msg =
+        std::string("Verify key ") + key + " does not exist in region " + name;
+  } else if (!val) {
+    msg = std::string("Verify value for key ") + key +
+          " does not exist in region " + name;
+  } else {
+    msg = std::string("Verify value for key ") + key + " is: " + value +
+          " in region " + name;
   }
-  free(buf);
+  LOG(msg);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -140,7 +134,8 @@
             std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
         ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
-        LOG("In verify loop, get returned " + checkPtr->value() + " for key " + key);
+        LOG("In verify loop, get returned " + checkPtr->value() + " for key " +
+            key);
         if (strcmp(checkPtr->value().c_str(), value) != 0) {
           testValueCnt++;
         } else {
@@ -157,20 +152,20 @@
 
 void _verifyEntry(const char* name, const char* key, const char* val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
 
-void createPooledRegion(const char* name, bool ackMode, const char* locators,
-                        const char* poolname,
+void createPooledRegion(const std::string& name, bool ackMode,
+                        const std::string& locators,
+                        const std::string& poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -180,9 +175,9 @@
 void createEntry(const char* name, const char* key,
                  const char* value = nullptr) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   if (value == nullptr) {
@@ -208,9 +203,9 @@
 
 void updateEntry(const char* name, const char* key, const char* value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -231,16 +226,14 @@
 
 void doNetsearch(const char* name, const char* key, const char* value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key
+            << " expecting value: " << value << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
+  std::cout << "netsearch region " << regPtr->getName() << "\n" << std::flush;
   fflush(stdout);
   ASSERT(regPtr != nullptr, "Region not found.");
 
@@ -254,10 +247,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
diff --git a/cppcache/integration-test/ThinClientRegex2.hpp b/cppcache/integration-test/ThinClientRegex2.hpp
index 14b6a6f..fff923c 100644
--- a/cppcache/integration-test/ThinClientRegex2.hpp
+++ b/cppcache/integration-test/ThinClientRegex2.hpp
@@ -21,8 +21,6 @@
 #define GEODE_INTEGRATION_TEST_THINCLIENTREGEX2_H_
 
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include <string>
 
 #define ROOT_NAME "ThinClientRegex2"
@@ -34,7 +32,7 @@
 #define CLIENT2 s1p2
 #define SERVER1 s2p1
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
@@ -45,7 +43,7 @@
 
 static bool isLocator = false;
 static int numberOfLocators = 0;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 #include "LocatorHelper.hpp"
 void initClient(const bool isthinClient) {
@@ -70,22 +68,18 @@
                   bool noKey, bool isCreated = false) {
   // Verify key and value exist in this region, in this process.
   const char* value = val ? val : "";
-  char* buf =
-      reinterpret_cast<char*>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
-  if (!isCreated) {
-    if (noKey) {
-      sprintf(buf, "Verify key %s does not exist in region %s", key, name);
-    } else if (!val) {
-      sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-              name);
-    } else {
-      sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-              name);
-    }
-    LOG(buf);
+  std::string msg;
+  if (noKey) {
+    msg =
+        std::string("Verify key ") + key + " does not exist in region " + name;
+  } else if (!val) {
+    msg = std::string("Verify value for key ") + key +
+          " does not exist in region " + name;
+  } else {
+    msg = std::string("Verify value for key ") + key + " is: " + value +
+          " in region " + name;
   }
-  free(buf);
+  LOG(msg);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -141,7 +135,8 @@
             std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
         ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
-        LOG("In verify loop, get returned " + checkPtr->value() + " for key " + key);
+        LOG("In verify loop, get returned " + checkPtr->value() + " for key " +
+            key);
         if (strcmp(checkPtr->value().c_str(), value) != 0) {
           testValueCnt++;
         } else {
@@ -158,9 +153,7 @@
 
 void _verifyEntry(const char* name, const char* key, const char* val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -168,20 +161,23 @@
 void createRegion(const char* name, bool ackMode,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
                                           clientNotificationEnabled);
   ASSERT(regPtr != nullptr, "Failed to create region.");
   LOG("Region created.");
 }
-void createPooledRegion(const char* name, bool ackMode, const char* locators,
-                        const char* poolname,
+void createPooledRegion(const std::string& name, bool ackMode,
+                        const std::string& locators,
+                        const std::string& poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -191,9 +187,9 @@
 void createEntry(const char* name, const char* key,
                  const char* value = nullptr) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   if (value == nullptr) {
@@ -219,9 +215,9 @@
 
 void updateEntry(const char* name, const char* key, const char* value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -242,17 +238,15 @@
 
 void doNetsearch(const char* name, const char* key, const char* value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key
+            << " expecting value: " << value << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
-  fflush(stdout);
+  std::cout << "netsearch region " << regPtr->getName() << "\n" << std::flush;
+
   ASSERT(regPtr != nullptr, "Region not found.");
 
   ASSERT(!regPtr->containsKey(keyPtr),
@@ -265,10 +259,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
diff --git a/cppcache/integration-test/ThinClientRegex3.hpp b/cppcache/integration-test/ThinClientRegex3.hpp
index 865c30d..614f7ed 100644
--- a/cppcache/integration-test/ThinClientRegex3.hpp
+++ b/cppcache/integration-test/ThinClientRegex3.hpp
@@ -20,8 +20,6 @@
  * limitations under the License.
  */
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include <string>
 
 #define ROOT_NAME "ThinClientRegex3"
@@ -33,7 +31,7 @@
 #define CLIENT2 s1p2
 #define SERVER1 s2p1
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::Cacheable;
 using apache::geode::client::CacheableInt32;
@@ -53,7 +51,7 @@
 
 static bool isLocator = false;
 static int numberOfLocators = 0;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 #include "LocatorHelper.hpp"
 void initClient(const bool isthinClient) {
@@ -78,22 +76,18 @@
                   bool noKey, bool isCreated = false) {
   // Verify key and value exist in this region, in this process.
   const char* value = val ? val : "";
-  char* buf =
-      reinterpret_cast<char*>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
-  if (!isCreated) {
-    if (noKey) {
-      sprintf(buf, "Verify key %s does not exist in region %s", key, name);
-    } else if (!val) {
-      sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-              name);
-    } else {
-      sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-              name);
-    }
-    LOG(buf);
+  std::string msg;
+  if (noKey) {
+    msg =
+        std::string("Verify key ") + key + " does not exist in region " + name;
+  } else if (!val) {
+    msg = std::string("Verify value for key ") + key +
+          " does not exist in region " + name;
+  } else {
+    msg = std::string("Verify value for key ") + key + " is: " + value +
+          " in region " + name;
   }
-  free(buf);
+  LOG(msg);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -149,7 +143,8 @@
             std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
         ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
-        LOG("In verify loop, get returned " + checkPtr->value() + " for key " + key);
+        LOG("In verify loop, get returned " + checkPtr->value() + " for key " +
+            key);
         if (strcmp(checkPtr->value().c_str(), value) != 0) {
           testValueCnt++;
         } else {
@@ -166,9 +161,7 @@
 
 void _verifyEntry(const char* name, const char* key, const char* val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -176,20 +169,23 @@
 void createRegion(const char* name, bool ackMode, const char* endpoints,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
                                           endpoints, clientNotificationEnabled);
   ASSERT(regPtr != nullptr, "Failed to create region.");
   LOG("Region created.");
 }
-void createPooledRegion(const char* name, bool ackMode, const char* locators,
-                        const char* poolname,
+void createPooledRegion(const std::string& name, bool ackMode,
+                        const std::string& locators,
+                        const std::string& poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -199,9 +195,9 @@
 void createEntry(const char* name, const char* key,
                  const char* value = nullptr) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   if (value == nullptr) {
@@ -227,9 +223,9 @@
 
 void updateEntry(const char* name, const char* key, const char* value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -250,16 +246,14 @@
 
 void doNetsearch(const char* name, const char* key, const char* value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key
+            << " expecting value: " << value << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
+  std::cout << "netsearch region " << regPtr->getName() << "\n" << std::flush;
   fflush(stdout);
   ASSERT(regPtr != nullptr, "Region not found.");
 
@@ -273,10 +267,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
diff --git a/cppcache/integration-test/ThinClientRemoveAll.hpp b/cppcache/integration-test/ThinClientRemoveAll.hpp
index c8a44dc..60327ef 100644
--- a/cppcache/integration-test/ThinClientRemoveAll.hpp
+++ b/cppcache/integration-test/ThinClientRemoveAll.hpp
@@ -24,8 +24,6 @@
 #define ROOT_SCOPE DISTRIBUTED_ACK
 
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include "testobject/PdxType.hpp"
 #include "testobject/VariousPdxTypes.hpp"
 #include <string>
@@ -41,7 +39,7 @@
 #define SERVER1 s2p1
 #define SERVER2 s2p2
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableInt32;
 using apache::geode::client::CacheableKey;
@@ -56,7 +54,7 @@
 static bool isLocator = false;
 static int numberOfLocators = 0;
 
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 const char* poolName = "__TESTPOOL1_";
 
@@ -93,8 +91,9 @@
 void createRegion(const char* name, bool ackMode, const char*,
                   bool isCacheEnabled, bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr = getHelper()->createRegion(name, ackMode, isCacheEnabled,
                                           nullptr, clientNotificationEnabled);
   ASSERT(regPtr != nullptr, "Failed to create region.");
@@ -105,21 +104,24 @@
                        bool isCacheEnabled,
                        bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr = getHelper()->createRegion(
       name, ackMode, isCacheEnabled, nullptr, clientNotificationEnabled, true);
   ASSERT(regPtr != nullptr, "Failed to create region.");
   LOG("Region created.");
 }
 
-void createPooledRegion(const char* name, bool ackMode, const char* locators,
-                        const char* poolname,
+void createPooledRegion(const std::string& name, bool ackMode,
+                        const std::string& locators,
+                        const std::string& poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -132,8 +134,9 @@
     const char* poolname, bool clientNotificationEnabled = false,
     bool cachingEnable = true, bool concurrencyCheckEnabled = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr = getHelper()->createPooledRegionConcurrencyCheckDisabled(
       name, ackMode, locators, poolname, cachingEnable,
       clientNotificationEnabled, concurrencyCheckEnabled);
@@ -223,8 +226,8 @@
     }
 
     for (int32_t item = 0; item < 1; item++) {
-      sprintf(key, "key-%d", item);
-      removeallkeys.push_back(CacheableKey::create(key));
+      removeallkeys.push_back(
+          CacheableKey::create(std::string("key-") + std::to_string(item)));
     }
 
     try {
@@ -275,7 +278,8 @@
     }
 
     for (int32_t item = 0; item < 1; item++) {
-      sprintf(key, "key-%d", item);
+      removeallkeys.push_back(
+          CacheableKey::create(std::string("key-") + std::to_string(item)));
       removeallkeys.push_back(CacheableKey::create(key));
     }
 
@@ -305,11 +309,9 @@
   {
     HashMapOfCacheable entryMap;
     entryMap.clear();
-    char key[2048];
-    char value[2048];
     for (int32_t item = 0; item < 1; item++) {
-      sprintf(key, "key-%d", item);
-      sprintf(value, "%d", item);
+      auto key = std::string("key-") + std::to_string(item);
+      auto value = std::to_string(item);
       entryMap.emplace(CacheableKey::create(key),
                        CacheableString::create(value));
     }
@@ -320,8 +322,8 @@
 
     std::vector<std::shared_ptr<CacheableKey>> removeallkeys;
     for (int32_t item = 0; item < 1; item++) {
-      sprintf(key, "key-%d", item);
-      removeallkeys.push_back(CacheableKey::create(key));
+      removeallkeys.push_back(
+          CacheableKey::create(std::string("key-") + std::to_string(item)));
     }
 
     regPtr0->removeAll(removeallkeys);
@@ -379,11 +381,9 @@
   {
     HashMapOfCacheable entryMap;
     entryMap.clear();
-    char key[2048];
-    char value[2048];
     for (int32_t item = 0; item < 1; item++) {
-      sprintf(key, "key-%d", item);
-      sprintf(value, "%d", item);
+      auto key = std::string("key-") + std::to_string(item);
+      auto value = std::to_string(item);
       entryMap.emplace(CacheableKey::create(key),
                        CacheableString::create(value));
     }
@@ -394,8 +394,8 @@
 
     std::vector<std::shared_ptr<CacheableKey>> removeallkeys;
     for (int32_t item = 0; item < 1; item++) {
-      sprintf(key, "key-%d", item);
-      removeallkeys.push_back(CacheableKey::create(key));
+      removeallkeys.push_back(
+          CacheableKey::create(std::string("key-") + std::to_string(item)));
     }
 
     regPtr0->removeAll(removeallkeys);
diff --git a/cppcache/integration-test/ThinClientSecurity.hpp b/cppcache/integration-test/ThinClientSecurity.hpp
index 9e77d62..d68d64d 100644
--- a/cppcache/integration-test/ThinClientSecurity.hpp
+++ b/cppcache/integration-test/ThinClientSecurity.hpp
@@ -26,14 +26,14 @@
 #include "CacheImplHelper.hpp"
 #include "testUtils.hpp"
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::AuthenticatedView;
 
 static bool isLocalServer = false;
 static bool isLocator = false;
 static int numberOfLocators = 1;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 
 void setCacheListener(const std::string& regName,
@@ -62,7 +62,7 @@
     poolName += "_" + std::to_string(index++);
   }
 
-  printf("createRegionForSecurity poolname = %s \n", poolName.c_str());
+  std::cout << "createRegionForSecurity poolname = " << poolName << "\n";
 
   getHelper()->createPoolWithLocators(
       poolName, locatorsG, clientNotificationEnabled, subscriptionRedundancy,
diff --git a/cppcache/integration-test/ThinClientSecurityHelper.hpp b/cppcache/integration-test/ThinClientSecurityHelper.hpp
index 973ee8c..35f32bc 100644
--- a/cppcache/integration-test/ThinClientSecurityHelper.hpp
+++ b/cppcache/integration-test/ThinClientSecurityHelper.hpp
@@ -20,13 +20,14 @@
 #ifndef GEODE_INTEGRATION_TEST_THINCLIENTSECURITYHELPER_H_
 #define GEODE_INTEGRATION_TEST_THINCLIENTSECURITYHELPER_H_
 
-#include <ace/Process.h>
+#include <boost/process.hpp>
+#include <boost/lexical_cast.hpp>
 
 #include "fw_dunit.hpp"
 #include "ThinClientHelper.hpp"
 #include "hacks/AceThreadId.h"
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableBoolean;
 using apache::geode::client::Exception;
@@ -51,22 +52,12 @@
 bool isLocator = false;
 bool isLocalServer = false;
 
-const char* locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 
 const char* regionNamesAuth[] = {"DistRegionAck"};
 std::shared_ptr<CredentialGenerator> credentialGeneratorHandler;
 
-std::string getXmlPath() {
-  char xmlPath[1000] = {'\0'};
-  const char* path = ACE_OS::getenv("TESTSRC");
-  ASSERT(path != nullptr,
-         "Environment variable TESTSRC for test source directory is not set.");
-  strncpy(xmlPath, path, strlen(path) - strlen("cppcache"));
-  strncat(xmlPath, "xml/Security/", sizeof(xmlPath) - strlen(xmlPath) - 1);
-  return std::string(xmlPath);
-}
-
 void initCredentialGenerator() {
   static int loopNum = 1;
 
@@ -141,29 +132,32 @@
     case 'W':
       credentialGeneratorHandler->getAllowedCredentialsForOps(wr, config,
                                                               nullptr);
-      printf("User is %s Pass is %s ",
-             config->find("security-username")->value().c_str(),
-             (config->find("security-password") != nullptr
-                  ? config->find("security-password")->value().c_str()
-                  : " not set"));
+      std::cout << "User is " << config->find("security-username")->value()
+                << " Pass is "
+                << (config->find("security-password") != nullptr
+                        ? config->find("security-password")->value()
+                        : " not set")
+                << "\n";
       break;
     case 'R':
       credentialGeneratorHandler->getAllowedCredentialsForOps(rt, config,
                                                               nullptr);
-      printf("User is %s Pass is %s ",
-             config->find("security-username")->value().c_str(),
-             (config->find("security-password") != nullptr
-                  ? config->find("security-password")->value().c_str()
-                  : " not set"));
+      std::cout << "User is " << config->find("security-username")->value()
+                << " Pass is "
+                << (config->find("security-password") != nullptr
+                        ? config->find("security-password")->value()
+                        : " not set")
+                << "\n";
       break;
     case 'A':
       credentialGeneratorHandler->getAllowedCredentialsForOps(ad, config,
                                                               nullptr);
-      printf("User is %s Pass is %s ",
-             config->find("security-username")->value().c_str(),
-             (config->find("security-password") != nullptr
-                  ? config->find("security-password")->value().c_str()
-                  : " not set"));
+      std::cout << "User is " << config->find("security-username")->value()
+                << " Pass is "
+                << (config->find("security-password") != nullptr
+                        ? config->find("security-password")->value()
+                        : " not set")
+                << "\n";
       break;
     default:
       break;
@@ -176,112 +170,126 @@
   }
 }
 
-// This putThread class is used in
+// This PutThread class is used in
 // testThinClientTracking,testThinClientTicket304, testThinClientTicket317
 
-class putThread : public ACE_Task_Base {
+class PutThread {
  public:
-  explicit putThread(std::shared_ptr<Region> r, bool regInt = false,
-                     int waitTime = 0) {
-    m_reg = r;
-    m_regInt = regInt;
-    m_numthreads = 1;
-    m_numops = 0;
-    m_isCallBack = false;
-    m_sameKey = false;
-    m_waitTime = waitTime;
+  explicit PutThread(std::shared_ptr<Region> r, bool regInt = false,
+                     int waitTime = 0)
+      : region_{r},
+        numOps_{0},
+        numThreads_{1},
+        isCallback_{false},
+        sameKey_{false},
+        regInt_{regInt},
+        waitTime_{waitTime} {
   }
 
   void setParams(int opcode, int numofops, int numthreads,
                  bool isCallBack = false, bool sameKey = false,
                  int waitTime = 0) {  //
-    m_opcode = opcode;
-    m_numops = numofops;
-    m_numthreads = numthreads;
-    m_isCallBack = isCallBack;
-    m_sameKey = sameKey;
-    m_waitTime = waitTime;
+    opcode_ = opcode;
+    numOps_ = numofops;
+    numThreads_ = numthreads;
+    isCallback_ = isCallBack;
+    sameKey_ = sameKey;
+    waitTime_ = waitTime;
   }
 
   void start() {
-    m_run = true;
-    activate(THR_NEW_LWP | THR_JOINABLE, m_numthreads);
+    for(auto i = 0; i < numThreads_; ++i) {
+      threads_.emplace_back([this](){
+        run();
+      });
+    }
+  }
+
+  void wait() {
+    for(auto& thread : threads_) {
+      if(thread.joinable()) {
+        thread.join();
+      }
+    }
   }
 
   void stop() {
-    if (m_run) {
-      m_run = false;
       wait();
-    }
   }
 
-  int svc(void) {
+  void run() {
     int ops = 0;
-    auto pid = ACE_OS::getpid();
+    std::string key_str;
     std::shared_ptr<CacheableKey> key;
     std::shared_ptr<CacheableString> value;
     std::vector<std::shared_ptr<CacheableKey>> keys0;
-    char buf[20];
-    char valbuf[20];
-    if (m_regInt) {
-      m_reg->registerAllKeys(false, true);
+
+    auto pid = boost::this_process::get_id();
+    if (regInt_) {
+      region_->registerAllKeys(false, true);
     }
-    if (m_waitTime != 0) {
-      ACE_OS::sleep(m_waitTime);
+    if (waitTime_ != 0) {
+      std::this_thread::sleep_for(std::chrono::seconds{waitTime_});
     }
-    while (ops++ < m_numops) {
-      if (m_sameKey) {
-        sprintf(buf, "key-%d", 1);
+    while (ops++ < numOps_) {
+      if (sameKey_) {
+        key_str = "key-1";
       } else {
-        sprintf(buf, "key-%d", ops);
+        key_str = "key-" + std::to_string(ops);
       }
-      key = CacheableKey::create(buf);
-      if (m_opcode == 0) {
-        if (m_isCallBack) {
+
+      key = CacheableKey::create(key_str);
+      if (opcode_ == 0) {
+        std::string value_str;
+
+        if (isCallback_) {
           auto boolptr = CacheableBoolean::create("true");
-          sprintf(valbuf, "client1-value%d", ops);
-          value = CacheableString::create(valbuf);
-          m_reg->put(key, value, boolptr);
+          value_str = "client1-value" + std::to_string(ops);
+          value = CacheableString::create(value_str);
+          region_->put(key, value, boolptr);
         } else {
-          sprintf(valbuf, "client2-value%d", ops);
-          value = CacheableString::create(valbuf);
-          m_reg->put(key, value);
+          value_str = "client2-value" + std::to_string(ops);
+          value = CacheableString::create(value_str);
+          region_->put(key, value);
         }
-      } else if (m_opcode == 1) {
-        m_reg->get(key);
-      } else if (m_opcode == 5) {
+      } else if (opcode_ == 1) {
+        region_->get(key);
+      } else if (opcode_ == 5) {
         keys0.push_back(key);
-        if (ops == m_numops) {
-          m_reg->registerKeys(keys0, false, true);
+        if (ops == numOps_) {
+          region_->registerKeys(keys0, false, true);
         }
-      } else if (m_opcode == 6) {
-        m_reg->registerRegex("key-[1-3]", false, true);
+      } else if (opcode_ == 6) {
+        region_->registerRegex("key-[1-3]", false, true);
       } else {
         try {
-          if (m_isCallBack) {
+          if (isCallback_) {
             auto boolptr = CacheableBoolean::create("true");
-            m_reg->destroy(key, boolptr);
+            region_->destroy(key, boolptr);
           } else {
-            m_reg->destroy(key);
+            region_->destroy(key);
           }
         } catch (Exception& ex) {
-          printf("%d: %" PRIu64 " exception got and exception message = %s\n",
-                 pid, hacks::aceThreadId(ACE_OS::thr_self()), ex.what());
+          auto tid =
+              boost::lexical_cast<std::string>(std::this_thread::get_id());
+          std::cout << pid << ": " << tid << " exception got and exception message = " << ex.what() << "\n";
         }
       }
     }
-    return 0;
   }
 
-  std::shared_ptr<Region> m_reg;
-  bool m_run;
-  int m_opcode;
-  int m_numops;
-  int m_numthreads;
-  bool m_isCallBack;
-  bool m_sameKey;
-  bool m_regInt;
-  int m_waitTime;
+ protected:
+  std::shared_ptr<Region> region_;
+
+  int opcode_;
+  int numOps_;
+  int numThreads_;
+  bool isCallback_;
+  bool sameKey_;
+  bool regInt_;
+  int waitTime_;
+
+  std::vector<std::thread> threads_;
 };
 
 }  // namespace
diff --git a/cppcache/integration-test/ThinClientTXFailover.hpp b/cppcache/integration-test/ThinClientTXFailover.hpp
index 4233c72..6a59042 100644
--- a/cppcache/integration-test/ThinClientTXFailover.hpp
+++ b/cppcache/integration-test/ThinClientTXFailover.hpp
@@ -21,9 +21,7 @@
  */
 
 #include "fw_dunit.hpp"
-#include <ace/High_Res_Timer.h>
 
-#include <ace/OS.h>
 #include <string>
 #include <geode/CacheTransactionManager.hpp>
 
@@ -32,7 +30,7 @@
 
 #include "CacheHelper.hpp"
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
@@ -49,7 +47,7 @@
 #define SERVER2 s2p2
 static bool isLocator = false;
 // static int numberOfLocators = 0;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #include "LocatorHelper.hpp"
 void initClient(const bool isthinClient) {
@@ -74,20 +72,18 @@
                   bool noKey) {
   // Verify key and value exist in this region, in this process.
   const char* value = val ? val : "";
-  char* buf =
-      reinterpret_cast<char*>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
+  std::string msg;
   if (noKey) {
-    sprintf(buf, "Verify key %s does not exist in region %s", key, name);
+    msg =
+        std::string("Verify key ") + key + " does not exist in region " + name;
   } else if (!val) {
-    sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-            name);
+    msg = std::string("Verify value for key ") + key +
+          " does not exist in region " + name;
   } else {
-    sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-            name);
+    msg = std::string("Verify value for key ") + key + " is: " + value +
+          " in region " + name;
   }
-  LOG(buf);
-  free(buf);
+  LOG(msg);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -128,7 +124,8 @@
           std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
       ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
-      LOG("In verify loop, get returned " + checkPtr->value() + " for key " + key);
+      LOG("In verify loop, get returned " + checkPtr->value() + " for key " +
+          key);
 
       if (strcmp(checkPtr->value().c_str(), value) != 0) {
         testValueCnt++;
@@ -145,9 +142,7 @@
 
 void _verifyEntry(const char* name, const char* key, const char* val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -155,21 +150,24 @@
 void createRegion(const char* name, bool ackMode, const char* endpoints,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   // ack, caching
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
                                           endpoints, clientNotificationEnabled);
   ASSERT(regPtr != nullptr, "Failed to create region.");
   LOG("Region created.");
 }
-void createPooledRegion(const char* name, bool ackMode, const char* locators,
-                        const char* poolname,
+void createPooledRegion(const std::string& name, bool ackMode,
+                        const std::string& locators,
+                        const std::string& poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -177,13 +175,15 @@
   LOG("Pooled Region created.");
 }
 
-void createPooledRegionSticky(const char* name, bool ackMode,
-                              const char* locators, const char* poolname,
+void createPooledRegionSticky(const std::string& name, bool ackMode,
+                              const std::string& locators,
+                              const std::string& poolname,
                               bool clientNotificationEnabled = false,
                               bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr = getHelper()->createPooledRegionSticky(
       name, ackMode, locators, poolname, cachingEnable,
       clientNotificationEnabled);
@@ -193,9 +193,9 @@
 
 void createEntry(const char* name, const char* key, const char* value) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -218,9 +218,10 @@
 
 void updateEntry(const char* name, const char* key, const char* value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
+
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -242,17 +243,16 @@
 
 void doNetsearch(const char* name, const char* key, const char* value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
+
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
-  fflush(stdout);
+  std::cout << "netsearch  region " << regPtr->getName() << "\n" << std::flush;
+
   ASSERT(regPtr != nullptr, "Region not found.");
 
   // ASSERT( !regPtr->containsKey( keyPtr ), "Key should not have been found in
@@ -265,10 +265,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -380,11 +378,9 @@
       FAIL("Expected exception when transaction delegate has gone away.");
     } catch (const TransactionDataNodeHasDepartedException& ex) {
       getHelper()->getCache()->getCacheTransactionManager()->rollback();
-      printf(
-          "Got expected TransactionDataNodeHasDepartedException when "
-          "transaction "
-          "delegate has gone away: %s\n",
-          ex.what());
+      std::cout << "Got expected TransactionDataNodeHasDepartedException when "
+                   "transaction delegate has gone away: "
+                << ex.what() << "\n";
     }
 
     LOG("StepSix complete.");
diff --git a/cppcache/integration-test/ThinClientTasks_C2S2.hpp b/cppcache/integration-test/ThinClientTasks_C2S2.hpp
index a94880d..5caefeb 100644
--- a/cppcache/integration-test/ThinClientTasks_C2S2.hpp
+++ b/cppcache/integration-test/ThinClientTasks_C2S2.hpp
@@ -32,7 +32,7 @@
 #define PROCESS3 s2p1
 #define PROCESS4 s2p2
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheHelper;
 
diff --git a/cppcache/integration-test/ThinClientTransactions.hpp b/cppcache/integration-test/ThinClientTransactions.hpp
index 2e4bec6..5ff3d01 100644
--- a/cppcache/integration-test/ThinClientTransactions.hpp
+++ b/cppcache/integration-test/ThinClientTransactions.hpp
@@ -21,11 +21,9 @@
 #define GEODE_INTEGRATION_TEST_THINCLIENTTRANSACTIONS_H_
 
 #include "fw_dunit.hpp"
-#include <ace/Auto_Event.h>
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 
 #include <string>
+
 #include <geode/TransactionId.hpp>
 #include <geode/CacheTransactionManager.hpp>
 
@@ -33,9 +31,11 @@
 #define ROOT_SCOPE DISTRIBUTED_ACK
 
 #include "CacheHelper.hpp"
+#include "util/concurrent/binary_semaphore.hpp"
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
+using apache::geode::client::binary_semaphore;
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
 using apache::geode::client::CacheHelper;
@@ -58,7 +58,7 @@
 static bool isLocator = false;
 static int numberOfLocators = 0;
 
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 
 void initClient(const bool isthinClient) {
@@ -86,20 +86,18 @@
                   bool noKey) {
   // Verify key and value exist in this region, in this process.
   const char* value = val ? val : "";
-  char* buf =
-      reinterpret_cast<char*>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
+  std::string msg;
   if (noKey) {
-    sprintf(buf, "Verify key %s does not exist in region %s", key, name);
+    msg =
+        std::string("Verify key ") + key + " does not exist in region " + name;
   } else if (!val) {
-    sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-            name);
+    msg = std::string("Verify value for key ") + key +
+          " does not exist in region " + name;
   } else {
-    sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-            name);
+    msg = std::string("Verify value for key ") + key + " is: " + value +
+          " in region " + name;
   }
-  LOG(buf);
-  free(buf);
+  LOG(msg);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -144,7 +142,8 @@
           std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
       ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
-      LOG("In verify loop, get returned " + checkPtr->value() + " for key " + key);
+      LOG("In verify loop, get returned " + checkPtr->value() + " for key " +
+          key);
 
       if (strcmp(checkPtr->value().c_str(), value) != 0) {
         testValueCnt++;
@@ -161,9 +160,7 @@
 
 void _verifyEntry(const char* name, const char* key, const char* val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -172,20 +169,23 @@
                   bool clientNotificationEnabled = false,
                   bool cachingEnable = true) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr = getHelper()->createRegion(name, ackMode, cachingEnable, nullptr,
                                           endpoints, clientNotificationEnabled);
   ASSERT(regPtr != nullptr, "Failed to create region.");
   LOG("Region created.");
 }
-void createPooledRegion(const char* name, bool ackMode, const char* locators,
-                        const char* poolname,
+void createPooledRegion(const std::string& name, bool ackMode,
+                        const std::string& locators,
+                        const std::string& poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -193,13 +193,15 @@
   LOG("Pooled Region created.");
 }
 
-void createPooledRegionSticky(const char* name, bool ackMode,
-                              const char* locators, const char* poolname,
+void createPooledRegionSticky(const std::string& name, bool ackMode,
+                              const std::string& locators,
+                              const std::string& poolname,
                               bool clientNotificationEnabled = false,
                               bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr = getHelper()->createPooledRegionSticky(
       name, ackMode, locators, poolname, cachingEnable,
       clientNotificationEnabled);
@@ -209,9 +211,9 @@
 
 void createEntry(const char* name, const char* key, const char* value) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -233,10 +235,8 @@
 }
 void createEntryTwice(const char* name, const char* key, const char* value) {
   LOG("createEntryTwice() entered.");
-  char message[500];
-  sprintf(message, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  LOG(message);
+  LOG(std::string("Creating entry -- key: ") + key + " value : " + value +
+      " in region " + name);
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
   auto regPtr = getHelper()->getRegion(name);
@@ -256,9 +256,10 @@
 
 void updateEntry(const char* name, const char* key, const char* value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
+
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -279,16 +280,16 @@
 
 void doGetAgain(const char* name, const char* key, const char* value) {
   LOG("doGetAgain() entered.");
-  fprintf(stdout,
-          "get for entry -- key: %s  expecting value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
+
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "get  region name%s\n", regPtr->getName().c_str());
-  fflush(stdout);
+  std::cout << "netsearch  region " << regPtr->getName() << "\n" << std::flush;
+
   ASSERT(regPtr != nullptr, "Region not found.");
 
   auto checkPtr = std::dynamic_pointer_cast<CacheableString>(
@@ -296,10 +297,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In doGetAgain, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In doGetAgain, get returned ") + checkPtr->value() +
+        " for key  " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -309,18 +308,17 @@
 
 void doNetsearch(const char* name, const char* key, const char* value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key
+            << " expecting value: " << value << " in region " << name << "\n"
+            << std::flush;
+
   static int count = 0;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
-  fflush(stdout);
+  std::cout << "netsearch region " << regPtr->getName() << "\n" << std::flush;
+
   ASSERT(regPtr != nullptr, "Region not found.");
 
   if (count == 0) {
@@ -335,10 +333,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -360,79 +356,73 @@
 const bool NO_ACK = false;
 #include "LocatorHelper.hpp"
 #define THREADERRORCHECK(x, y) \
-  if (!(x)) {                  \
-    m_isFailed = true;         \
-    sprintf(m_error, y);       \
-    return -1;                 \
-  }
+  do {                         \
+    if (!(x)) {                \
+      failed_ = true;          \
+      error_ = y;              \
+      return;                  \
+    }                          \
+  } while (0)
 
-class SuspendTransactionThread : public ACE_Task_Base {
- private:
-  TransactionId* m_suspendedTransaction;
-  bool m_sleep;
-  ACE_Auto_Event* m_txEvent;
-
+class SuspendTransactionThread {
  public:
-  SuspendTransactionThread(bool sleep, ACE_Auto_Event* txEvent)
-      : m_suspendedTransaction(nullptr), m_sleep(sleep), m_txEvent(txEvent) {}
+  SuspendTransactionThread(bool sleep, binary_semaphore& event)
+      : sleep_{sleep}, sem_{event} {}
 
-  int svc(void) {
-    char buf[1024];
-    sprintf(buf, " In SuspendTransactionThread");
-    LOG(buf);
-
+  void run() {
+    LOG(" In SuspendTransactionThread");
     auto txManager = getHelper()->getCache()->getCacheTransactionManager();
 
     txManager->begin();
-
     createEntry(regionNames[0], keys[4], vals[4]);
     createEntry(regionNames[1], keys[5], vals[5]);
 
-    m_suspendedTransaction = &txManager->getTransactionId();
+    tx_ = &txManager->getTransactionId();
 
-    if (m_sleep) {
-      m_txEvent->wait();
-      ACE_OS::sleep(5);
+    if (sleep_) {
+      sem_.acquire();
+
+      std::this_thread::sleep_for(std::chrono::seconds{5});
     }
 
-    m_suspendedTransaction = &txManager->suspend();
-    sprintf(buf, " Out SuspendTransactionThread");
-    LOG(buf);
+    tx_ = &txManager->suspend();
+    LOG(" Out SuspendTransactionThread");
 
     getHelper()
         ->getCache()
         ->getPoolManager()
         .find("__TESTPOOL1_")
         ->releaseThreadLocalConnection();
-
-    return 0;
   }
-  void start() { activate(); }
-  void stop() { wait(); }
-  TransactionId& getSuspendedTx() { return *m_suspendedTransaction; }
+
+  void start() {
+    thread_ = std::thread{[this]() { run(); }};
+  }
+
+  void stop() {
+    if (thread_.joinable()) {
+      thread_.join();
+    }
+  }
+
+  TransactionId& getSuspendedTx() { return *tx_; }
+
+ protected:
+  bool sleep_;
+  std::thread thread_;
+  binary_semaphore& sem_;
+  TransactionId* tx_{nullptr};
 };
-class ResumeTransactionThread : public ACE_Task_Base {
- private:
-  TransactionId& m_suspendedTransaction;
-  bool m_commit;
-  bool m_tryResumeWithSleep;
-  bool m_isFailed;
-  char m_error[256];
-  ACE_Auto_Event* m_txEvent;
 
+class ResumeTransactionThread {
  public:
-  ResumeTransactionThread(TransactionId& suspendedTransaction, bool commit,
-                          bool tryResumeWithSleep, ACE_Auto_Event* txEvent)
-      : m_suspendedTransaction(suspendedTransaction),
-        m_commit(commit),
-        m_tryResumeWithSleep(tryResumeWithSleep),
-        m_isFailed(false),
-        m_txEvent(txEvent) {}
 
-  int svc(void) {
-    char buf[1024];
-    sprintf(buf, "In ResumeTransactionThread");
-    LOG(buf);
+  ResumeTransactionThread(TransactionId& tx, bool commit, bool sleep,
+                          binary_semaphore& event)
+      : tx_(tx), commit_{commit}, sleep_(sleep), failed_{false}, sem_{event} {}
+
+  void run() {
+    LOG("In ResumeTransactionThread");
 
     auto regPtr0 = getHelper()->getRegion(regionNames[0]);
     THREADERRORCHECK(regPtr0 != nullptr,
@@ -455,25 +445,25 @@
                      "found in region.");
 
     auto txManager = getHelper()->getCache()->getCacheTransactionManager();
-    if (m_tryResumeWithSleep) {
-      THREADERRORCHECK(!txManager->isSuspended(m_suspendedTransaction),
+    if (sleep_) {
+      THREADERRORCHECK(!txManager->isSuspended(tx_),
                        "In ResumeTransactionThread - the transaction should "
                        "NOT be in suspended state");
     } else {
-      THREADERRORCHECK(txManager->isSuspended(m_suspendedTransaction),
+      THREADERRORCHECK(txManager->isSuspended(tx_),
                        "In ResumeTransactionThread - the transaction should be "
                        "in suspended state");
     }
 
     THREADERRORCHECK(
-        txManager->exists(m_suspendedTransaction),
+        txManager->exists(tx_),
         "In ResumeTransactionThread - the transaction should exist");
 
-    if (m_tryResumeWithSleep) {
-      m_txEvent->signal();
-      txManager->tryResume(m_suspendedTransaction, std::chrono::seconds(30));
+    if (sleep_) {
+      sem_.release();
+      txManager->tryResume(tx_, std::chrono::seconds(30));
     } else {
-      txManager->resume(m_suspendedTransaction);
+      txManager->resume(tx_);
     }
 
     THREADERRORCHECK(
@@ -485,7 +475,7 @@
 
     createEntry(regionNames[1], keys[6], vals[6]);
 
-    if (m_commit) {
+    if (commit_) {
       txManager->commit();
       THREADERRORCHECK(
           regPtr0->containsKeyOnServer(keyPtr4),
@@ -510,7 +500,7 @@
                        "found in region.");
     }
 
-    if (m_commit) {
+    if (commit_) {
       regPtr1->destroy(keyPtr6);
       regPtr1->destroy(keyPtr5);
       regPtr0->destroy(keyPtr4);
@@ -544,19 +534,38 @@
         LOG("Got expected EntryNotFoundException for keyPtr4");
       }
     }
+
     getHelper()
         ->getCache()
         ->getPoolManager()
         .find("__TESTPOOL1_")
         ->releaseThreadLocalConnection();
-    sprintf(buf, " Out ResumeTransactionThread");
-    LOG(buf);
-    return 0;
+    LOG(" Out ResumeTransactionThread");
   }
-  void start() { activate(); }
-  void stop() { wait(); }
-  bool isFailed() { return m_isFailed; }
-  char* getError() { return m_error; }
+
+  void start() {
+    thread_ = std::thread{[this]() { run(); }};
+  }
+
+  void stop() {
+    if (thread_.joinable()) {
+      thread_.join();
+    }
+  }
+
+  bool isFailed() { return failed_; }
+
+  std::string getError() { return error_; }
+
+ protected:
+  TransactionId& tx_;
+  bool commit_;
+  bool sleep_;
+  bool failed_;
+  std::string error_;
+
+  std::thread thread_;
+  binary_semaphore& sem_;
 };
 
 DUNIT_TASK_DEFINITION(SERVER1, CreateServer1)
@@ -674,7 +683,7 @@
     ASSERT(txManager->exists(tid2),
            "In SuspendTimeOut - the transaction should exist");
 
-    ACE_OS::sleep(65);
+    std::this_thread::sleep_for(std::chrono::seconds(65));
     ASSERT(!txManager->tryResume(tid2),
            "In SuspendTimeOut - the transaction should NOT have been resumed");
     ASSERT(!txManager->isSuspended(tid2),
@@ -777,86 +786,78 @@
 END_TASK_DEFINITION
 DUNIT_TASK_DEFINITION(CLIENT1, SuspendResumeInThread)
   {
-    // start suspend thread  and resume thread and rollback immedidately
-    char buf[1024];
-    sprintf(
-        buf,
-        "start suspend thread  and resume thread and rollback immedidately");
-    LOG(buf);
-    ACE_Auto_Event txEvent;
+    LOG("Start suspend thread and resume thread and rollback immedidately");
 
-    SuspendTransactionThread* suspendTh =
-        new SuspendTransactionThread(false, &txEvent);
-    suspendTh->activate();
-    ACE_OS::sleep(2);
-    ResumeTransactionThread* resumeTh = new ResumeTransactionThread(
-        suspendTh->getSuspendedTx(), false, false, &txEvent);
-    resumeTh->activate();
+    {
+      binary_semaphore event{0};
+      SuspendTransactionThread suspend{false, event};
+      suspend.start();
 
-    suspendTh->wait();
-    delete suspendTh;
-    resumeTh->wait();
-    ASSERT(!resumeTh->isFailed(), resumeTh->getError());
-    delete resumeTh;
+      std::this_thread::sleep_for(std::chrono::seconds{2});
+      ResumeTransactionThread resume{suspend.getSuspendedTx(), false, false,
+                                     event};
+      resume.start();
 
-    // start suspend thread  and resume thread and commit immedidately
-    sprintf(buf,
-            "start suspend thread  and resume thread and commit immedidately");
-    LOG(buf);
-    suspendTh = new SuspendTransactionThread(false, &txEvent);
-    suspendTh->activate();
-    ACE_OS::sleep(2);
-    resumeTh = new ResumeTransactionThread(suspendTh->getSuspendedTx(), true,
-                                           false, &txEvent);
-    resumeTh->activate();
+      suspend.stop();
+      resume.stop();
 
-    suspendTh->wait();
-    delete suspendTh;
-    resumeTh->wait();
-    ASSERT(!resumeTh->isFailed(), resumeTh->getError());
-    delete resumeTh;
+      ASSERT(!resume.isFailed(), resume.getError());
+    }
 
-    // start suspend thread  and tryresume thread with rollback. make tryResume
-    // to
-    // sleep
-    sprintf(buf,
-            "start suspend thread  and tryresume thread with rollback. make "
-            "tryResume to sleep");
-    LOG(buf);
-    suspendTh = new SuspendTransactionThread(true, &txEvent);
-    suspendTh->activate();
-    ACE_OS::sleep(2);
-    resumeTh = new ResumeTransactionThread(suspendTh->getSuspendedTx(), false,
-                                           true, &txEvent);
-    resumeTh->activate();
+    LOG("Start suspend thread  and resume thread and commit immedidately");
+    {
+      binary_semaphore event{0};
+      SuspendTransactionThread suspend{false, event};
 
-    suspendTh->wait();
-    delete suspendTh;
-    resumeTh->wait();
-    ASSERT(!resumeTh->isFailed(), resumeTh->getError());
-    delete resumeTh;
+      suspend.start();
+      std::this_thread::sleep_for(std::chrono::seconds{2});
+      ResumeTransactionThread resume{suspend.getSuspendedTx(), true, false,
+                                     event};
+      resume.start();
 
-    // start suspend thread  and tryresume thread with commit. make tryResume to
-    // sleep
-    sprintf(buf,
-            "start suspend thread  and tryresume thread with commit. make "
-            "tryResume to sleep");
-    LOG(buf);
-    suspendTh = new SuspendTransactionThread(true, &txEvent);
-    suspendTh->activate();
-    ACE_OS::sleep(2);
-    sprintf(buf, "suspendTh->activate();");
-    LOG(buf);
+      suspend.stop();
+      resume.stop();
+      ASSERT(!resume.isFailed(), resume.getError());
+    }
 
-    resumeTh = new ResumeTransactionThread(suspendTh->getSuspendedTx(), true,
-                                           true, &txEvent);
-    resumeTh->activate();
+    LOG("Start suspend thread  and tryresume thread with rollback. make "
+        "tryResume to sleep");
+    {
+      binary_semaphore event{0};
+      SuspendTransactionThread suspend{true, event};
+      suspend.start();
 
-    suspendTh->wait();
-    delete suspendTh;
-    resumeTh->wait();
-    ASSERT(!resumeTh->isFailed(), resumeTh->getError());
-    delete resumeTh;
+      std::this_thread::sleep_for(std::chrono::seconds{2});
+      ResumeTransactionThread resume{suspend.getSuspendedTx(), false, true,
+                                     event};
+      resume.start();
+
+      suspend.stop();
+      resume.stop();
+
+      ASSERT(!resume.isFailed(), resume.getError());
+    }
+
+    LOG("Start suspend thread  and tryresume thread with commit. make "
+        "tryResume to sleep");
+
+    {
+      binary_semaphore event{0};
+      SuspendTransactionThread suspend{true, event};
+      suspend.start();
+
+      std::this_thread::sleep_for(std::chrono::seconds{2});
+      LOG("suspendTh->activate();");
+
+      ResumeTransactionThread resume{suspend.getSuspendedTx(), true, true,
+                                     event};
+      resume.start();
+
+      suspend.stop();
+      resume.stop();
+
+      ASSERT(!resume.isFailed(), resume.getError());
+    }
   }
 END_TASK_DEFINITION
 
@@ -869,10 +870,7 @@
       FAIL(
           "Expected exception when doing operations on a non-existent region.");
     } catch (const CacheServerException& ex) {
-      printf(
-          "Got expected CacheServerException when performing operation "
-          "on a non-existent region: %s\n",
-          ex.what());
+      std::cout << "Got expected CacheServerException when performing operation on a non-existent region: " << ex.what() << "\n";
     }
   }
 END_TASK_DEFINITION
@@ -887,10 +885,7 @@
       FAIL(
           "Expected exception when doing operations on a non-existent region.");
     } catch (const CacheServerException& ex) {
-      printf(
-          "Got expected CacheServerException when performing operation "
-          "on a non-existent region: %s\n",
-          ex.what());
+      std::cout << "Got expected CacheServerException when performing operation on a non-existent region: " << ex.what() << "\n";
     }
   }
 END_TASK_DEFINITION
@@ -1016,13 +1011,13 @@
     try {
       reg->create(keyPtr, valPtr);
       char message[200];
-      sprintf(message, "First create on Key %s ", CREATE_TWICE_KEY);
+      LOG(std::string("First create on Key ") + CREATE_TWICE_KEY);
       LOG(message);
       reg->create(keyPtr, valPtr);
-      sprintf(message, "Second create on Key %s ", CREATE_TWICE_KEY);
+      LOG(std::string("Second create on Key ") + CREATE_TWICE_KEY);
       LOG(message);
       reg->create(keyPtr, valPtr);
-      sprintf(message, "Third create on Key %s ", CREATE_TWICE_KEY);
+      LOG(std::string("Third create on Key ") + CREATE_TWICE_KEY);
       LOG(message);
     } catch (const EntryExistsException& geodeExcp) {
       LOG(geodeExcp.what());
@@ -1057,13 +1052,13 @@
     try {
       reg->create(keyPtr, valPtr);
       char message[200];
-      sprintf(message, "First create on Key %s ", CREATE_TWICE_KEY);
+      LOG(std::string("First create on Key ") + CREATE_TWICE_KEY);
       LOG(message);
       reg->create(keyPtr, valPtr);
-      sprintf(message, "Second create on Key %s ", CREATE_TWICE_KEY);
+      LOG(std::string("Second create on Key ") + CREATE_TWICE_KEY);
       LOG(message);
       reg->create(keyPtr, valPtr);
-      sprintf(message, "Third create on Key %s ", CREATE_TWICE_KEY);
+      LOG(std::string("Third create on Key ") + CREATE_TWICE_KEY);
       LOG(message);
     } catch (const EntryExistsException& geodeExcp) {
       LOG(geodeExcp.what());
diff --git a/cppcache/integration-test/ThinClientTransactionsXA.hpp b/cppcache/integration-test/ThinClientTransactionsXA.hpp
index 84fa784..e3563f7 100644
--- a/cppcache/integration-test/ThinClientTransactionsXA.hpp
+++ b/cppcache/integration-test/ThinClientTransactionsXA.hpp
@@ -21,9 +21,6 @@
 #define GEODE_INTEGRATION_TEST_THINCLIENTTRANSACTIONSXA_H_
 
 #include "fw_dunit.hpp"
-#include <ace/Auto_Event.h>
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 
 #include <string>
 #include <geode/TransactionId.hpp>
@@ -34,16 +31,19 @@
 
 #include "CacheHelper.hpp"
 
-namespace { // NOLINT(google-build-namespaces)
+#include "util/concurrent/binary_semaphore.hpp"
 
+namespace {  // NOLINT(google-build-namespaces)
+
+using apache::geode::client::binary_semaphore;
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
 using apache::geode::client::CacheHelper;
 using apache::geode::client::CacheServerException;
+using apache::geode::client::CacheTransactionManager;
 using apache::geode::client::EntryExistsException;
 using apache::geode::client::EntryNotFoundException;
 using apache::geode::client::IllegalStateException;
-using apache::geode::client::CacheTransactionManager;
 using apache::geode::client::Properties;
 using apache::geode::client::TransactionException;
 using apache::geode::client::TransactionId;
@@ -59,7 +59,7 @@
 static bool isLocator = false;
 static int numberOfLocators = 0;
 
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 
 void initClient(const bool isthinClient) {
@@ -87,20 +87,18 @@
                   bool noKey) {
   // Verify key and value exist in this region, in this process.
   const char* value = val ? val : "";
-  char* buf =
-      reinterpret_cast<char*>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
+  std::string msg;
   if (noKey) {
-    sprintf(buf, "Verify key %s does not exist in region %s", key, name);
+    msg =
+        std::string("Verify key ") + key + " does not exist in region " + name;
   } else if (!val) {
-    sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-            name);
+    msg = std::string("Verify value for key ") + key +
+          " does not exist in region " + name;
   } else {
-    sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-            name);
+    msg = std::string("Verify value for key ") + key + " is: " + value +
+          " in region " + name;
   }
-  LOG(buf);
-  free(buf);
+  LOG(msg);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -145,7 +143,8 @@
           std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
       ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
-      LOG("In verify loop, get returned " + checkPtr->value() + " for key " + key);
+      LOG("In verify loop, get returned " + checkPtr->value() + " for key " +
+          key);
 
       if (strcmp(checkPtr->value().c_str(), value) != 0) {
         testValueCnt++;
@@ -162,9 +161,7 @@
 
 void _verifyEntry(const char* name, const char* key, const char* val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -173,20 +170,23 @@
                   bool clientNotificationEnabled = false,
                   bool cachingEnable = true) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr = getHelper()->createRegion(name, ackMode, cachingEnable, nullptr,
                                           endpoints, clientNotificationEnabled);
   ASSERT(regPtr != nullptr, "Failed to create region.");
   LOG("Region created.");
 }
-void createPooledRegion(const char* name, bool ackMode, const char* locators,
-                        const char* poolname,
+void createPooledRegion(const std::string& name, bool ackMode,
+                        const std::string& locators,
+                        const std::string& poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n" << std::flush;
+
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -194,13 +194,16 @@
   LOG("Pooled Region created.");
 }
 
-void createPooledRegionSticky(const char* name, bool ackMode,
-                              const char* locators, const char* poolname,
+void createPooledRegionSticky(const std::string& name, bool ackMode,
+                              const std::string& locators,
+                              const std::string& poolname,
                               bool clientNotificationEnabled = false,
                               bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n" << std::flush;
+
   auto regPtr = getHelper()->createPooledRegionSticky(
       name, ackMode, locators, poolname, cachingEnable,
       clientNotificationEnabled);
@@ -210,9 +213,9 @@
 
 void createEntry(const char* name, const char* key, const char* value) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -234,10 +237,8 @@
 }
 void createEntryTwice(const char* name, const char* key, const char* value) {
   LOG("createEntryTwice() entered.");
-  char message[500];
-  sprintf(message, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  LOG(message);
+  LOG(std::string("Creating entry -- key: ") + key + " value : " + value +
+      " in region " + name);
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
   auto regPtr = getHelper()->getRegion(name);
@@ -257,9 +258,9 @@
 
 void updateEntry(const char* name, const char* key, const char* value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -280,16 +281,14 @@
 
 void doGetAgain(const char* name, const char* key, const char* value) {
   LOG("doGetAgain() entered.");
-  fprintf(stdout,
-          "get for entry -- key: %s  expecting value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "get for entry -- key: " << key << " expecting value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "get  region name%s\n", regPtr->getName().c_str());
-  fflush(stdout);
+  std::cout << "get  region name " << regPtr->getName() << "\n" << std::flush;
   ASSERT(regPtr != nullptr, "Region not found.");
 
   auto checkPtr = std::dynamic_pointer_cast<CacheableString>(
@@ -297,10 +296,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In doGetAgain, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In doGetAgain, get returned ") + checkPtr->value() +
+        " for key  " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -310,18 +307,16 @@
 
 void doNetsearch(const char* name, const char* key, const char* value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key
+            << " expecting value: " << value << " in region " << name << "\n"
+            << std::flush;
   static int count = 0;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
-  fflush(stdout);
+  std::cout << "netsearch region " << regPtr->getName() << "\n" << std::flush;
+
   ASSERT(regPtr != nullptr, "Region not found.");
 
   if (count == 0) {
@@ -336,10 +331,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -355,88 +348,82 @@
                        "New Value-4", "New Value-5", "New Value-6",
                        "New Value-7"};
 
-const char* regionNames[] = {"DistRegionAck", "DistRegionNoAck", "testregion"};
+const char* regionNames[] = {"DistRegionAck", "not-used", "not-used"};
 
 const bool USE_ACK = true;
 const bool NO_ACK = false;
 #include "LocatorHelper.hpp"
 #define THREADERRORCHECK(x, y) \
-  if (!(x)) {                  \
-    m_isFailed = true;         \
-    sprintf(m_error, y);       \
-    return -1;                 \
-  }
+  do {                         \
+    if (!(x)) {                \
+      failed_ = true;          \
+      error_ = y;              \
+      return;                  \
+    }                          \
+  } while (0)
 
-class SuspendTransactionThread : public ACE_Task_Base {
- private:
-  TransactionId* m_suspendedTransaction;
-  bool m_sleep;
-  ACE_Auto_Event* m_txEvent;
-
+class SuspendTransactionThread {
  public:
-  SuspendTransactionThread(bool sleep, ACE_Auto_Event* txEvent)
-      : m_suspendedTransaction(nullptr), m_sleep(sleep), m_txEvent(txEvent) {}
+  SuspendTransactionThread(bool sleep, binary_semaphore& event)
+      : sleep_{sleep}, tx_{nullptr}, sem_(event) {}
 
-  int svc(void) {
-    char buf[1024];
-    sprintf(buf, " In SuspendTransactionThread");
-    LOG(buf);
+  void run() {
+    LOG(" In SuspendTransactionThread");
 
     auto txManager = getHelper()->getCache()->getCacheTransactionManager();
 
     txManager->begin();
 
     createEntry(regionNames[0], keys[4], vals[4]);
-    createEntry(regionNames[1], keys[5], vals[5]);
 
-    m_suspendedTransaction = &txManager->getTransactionId();
+    tx_ = &txManager->getTransactionId();
 
-    if (m_sleep) {
-      m_txEvent->wait();
-      ACE_OS::sleep(5);
+    if (sleep_) {
+      sem_.acquire();
+      std::this_thread::sleep_for(std::chrono::seconds{5});
     }
 
-    m_suspendedTransaction = &txManager->suspend();
-    sprintf(buf, " Out SuspendTransactionThread");
-    LOG(buf);
+    tx_ = &txManager->suspend();
+    LOG(" Out SuspendTransactionThread");
 
     getHelper()
         ->getCache()
         ->getPoolManager()
         .find("__TESTPOOL1_")
         ->releaseThreadLocalConnection();
+  }
 
-    return 0;
+  void start() {
+    thread_ = std::thread{[this]() { run(); }};
   }
-  void start() { activate(); }
-  void stop() { wait(); }
-  TransactionId& getSuspendedTx() {
-    return *m_suspendedTransaction;
+
+  void stop() {
+    if (thread_.joinable()) {
+      thread_.join();
+    }
   }
+
+  TransactionId& getSuspendedTx() { return *tx_; }
+
+ protected:
+  bool sleep_;
+  TransactionId* tx_;
+  std::thread thread_;
+  binary_semaphore& sem_;
 };
-class ResumeTransactionThread : public ACE_Task_Base {
- private:
-  TransactionId& m_suspendedTransaction;
-  bool m_commit;
-  bool m_tryResumeWithSleep;
-  bool m_isFailed;
-  char m_error[256];
-  ACE_Auto_Event* m_txEvent;
 
+class ResumeTransactionThread {
  public:
-  ResumeTransactionThread(TransactionId& suspendedTransaction,
-                          bool commit, bool tryResumeWithSleep,
-                          ACE_Auto_Event* txEvent)
-      : m_suspendedTransaction(suspendedTransaction),
-        m_commit(commit),
-        m_tryResumeWithSleep(tryResumeWithSleep),
-        m_isFailed(false),
-        m_txEvent(txEvent) {}
+  ResumeTransactionThread(TransactionId& suspendedTransaction, bool commit,
+                          bool tryResumeWithSleep, binary_semaphore& event)
+      : commit_{commit},
+        sleep_{tryResumeWithSleep},
+        failed_{false},
+        tx_{suspendedTransaction},
+        sem_{event} {}
 
-  int svc(void) {
-    char buf[1024];
-    sprintf(buf, "In ResumeTransactionThread");
-    LOG(buf);
+  void run() {
+    LOG("In ResumeTransactionThread");
 
     auto regPtr0 = getHelper()->getRegion(regionNames[0]);
     THREADERRORCHECK(regPtr0 != nullptr,
@@ -446,123 +433,94 @@
     auto keyPtr5 = CacheableKey::create(keys[5]);
     auto keyPtr6 = CacheableKey::create(keys[6]);
 
-    auto regPtr1 = getHelper()->getRegion(regionNames[1]);
-    THREADERRORCHECK(regPtr1 != nullptr,
-                     "In ResumeTransactionThread - Region not found.");
-
     THREADERRORCHECK(!regPtr0->containsKeyOnServer(keyPtr4),
                      "In ResumeTransactionThread - Key should not have been "
                      "found in region.");
 
-    THREADERRORCHECK(!regPtr1->containsKeyOnServer(keyPtr5),
-                     "In ResumeTransactionThread - Key should not have been "
-                     "found in region.");
-
     auto txManager = getHelper()->getCache()->getCacheTransactionManager();
-    if (m_tryResumeWithSleep) {
-      THREADERRORCHECK(!txManager->isSuspended(m_suspendedTransaction),
+    if (sleep_) {
+      THREADERRORCHECK(!txManager->isSuspended(tx_),
                        "In ResumeTransactionThread - the transaction should "
                        "NOT be in suspended state");
     } else {
-      THREADERRORCHECK(txManager->isSuspended(m_suspendedTransaction),
+      THREADERRORCHECK(txManager->isSuspended(tx_),
                        "In ResumeTransactionThread - the transaction should be "
                        "in suspended state");
     }
 
     THREADERRORCHECK(
-        txManager->exists(m_suspendedTransaction),
+        txManager->exists(tx_),
         "In ResumeTransactionThread - the transaction should exist");
 
-    if (m_tryResumeWithSleep) {
-      m_txEvent->signal();
-      txManager->tryResume(m_suspendedTransaction, std::chrono::seconds(30));
+    if (sleep_) {
+      sem_.release();
+      txManager->tryResume(tx_, std::chrono::seconds{30});
     } else {
-      txManager->resume(m_suspendedTransaction);
+      txManager->resume(tx_);
     }
 
     THREADERRORCHECK(
         regPtr0->containsKeyOnServer(keyPtr4),
         "In ResumeTransactionThread - Key should have been found in region.");
-    THREADERRORCHECK(
-        regPtr1->containsKeyOnServer(keyPtr5),
-        "In ResumeTransactionThread - Key should have been found in region.");
 
-    createEntry(regionNames[1], keys[6], vals[6]);
-
-    if (m_commit) {
+    if (commit_) {
       txManager->prepare();
       txManager->commit();
       THREADERRORCHECK(
           regPtr0->containsKeyOnServer(keyPtr4),
           "In ResumeTransactionThread - Key should have been found in region.");
-      THREADERRORCHECK(
-          regPtr1->containsKeyOnServer(keyPtr5),
-          "In ResumeTransactionThread - Key should have been found in region.");
-      THREADERRORCHECK(
-          regPtr1->containsKeyOnServer(keyPtr6),
-          "In ResumeTransactionThread - Key should have been found in region.");
-
     } else {
       txManager->prepare();
       txManager->rollback();
       THREADERRORCHECK(!regPtr0->containsKeyOnServer(keyPtr4),
                        "In ResumeTransactionThread - Key should not have been "
                        "found in region.");
-      THREADERRORCHECK(!regPtr1->containsKeyOnServer(keyPtr5),
-                       "In ResumeTransactionThread - Key should not have been "
-                       "found in region.");
-      THREADERRORCHECK(!regPtr1->containsKeyOnServer(keyPtr6),
-                       "In ResumeTransactionThread - Key should not have been "
-                       "found in region.");
     }
 
-    if (m_commit) {
-      regPtr1->destroy(keyPtr6);
-      regPtr1->destroy(keyPtr5);
+    if (commit_) {
       regPtr0->destroy(keyPtr4);
 
-      THREADERRORCHECK(!regPtr1->containsKeyOnServer(keyPtr6),
-                       "In ResumeTransactionThread - Key should not have been "
-                       "found in region.");
-      THREADERRORCHECK(!regPtr1->containsKeyOnServer(keyPtr5),
-                       "In ResumeTransactionThread - Key should not have been "
-                       "found in region.");
       THREADERRORCHECK(!regPtr0->containsKeyOnServer(keyPtr4),
                        "In ResumeTransactionThread - Key should not have been "
                        "found in region.");
     } else {
       try {
-        regPtr1->destroy(keyPtr6);
-        FAIL("Should have got EntryNotFoundException for keyPtr6");
-      } catch (EntryNotFoundException& /*ex*/) {
-        LOG("Got expected EntryNotFoundException for keyPtr6");
-      }
-      try {
-        regPtr1->destroy(keyPtr5);
-        FAIL("Should have got EntryNotFoundException for keyPtr5");
-      } catch (EntryNotFoundException& /*ex*/) {
-        LOG("Got expected EntryNotFoundException for keyPtr5");
-      }
-      try {
         regPtr0->destroy(keyPtr4);
         FAIL("Should have got EntryNotFoundException for keyPtr4");
       } catch (EntryNotFoundException& /*ex*/) {
         LOG("Got expected EntryNotFoundException for keyPtr4");
       }
     }
+
     getHelper()
         ->getCache()
         ->getPoolManager()
         .find("__TESTPOOL1_")
         ->releaseThreadLocalConnection();
-    sprintf(buf, " Out ResumeTransactionThread");
-    LOG(buf);
-    return 0;
+    LOG("Out ResumeTransactionThread");
   }
-  void start() { activate(); }
-  void stop() { wait(); }
-  bool isFailed() { return m_isFailed; }
-  char* getError() { return m_error; }
+
+  void start() {
+    thread_ = std::thread{[this]() { run(); }};
+  }
+
+  void stop() {
+    if (thread_.joinable()) {
+      thread_.join();
+    }
+  }
+
+  bool isFailed() { return failed_; }
+  const std::string& getError() { return error_; }
+
+ protected:
+  bool commit_;
+  bool sleep_;
+  bool failed_;
+  std::string error_;
+  TransactionId& tx_;
+  std::thread thread_;
+  binary_semaphore& sem_;
 };
 
 DUNIT_TASK_DEFINITION(SERVER1, CreateServer1)
@@ -577,23 +535,18 @@
     auto txManager = getHelper()->getCache()->getCacheTransactionManager();
     auto regPtr0 = getHelper()->getRegion(regionNames[0]);
     ASSERT(regPtr0 != nullptr, "In SuspendResumeCommit - Region not found.");
-    auto regPtr1 = getHelper()->getRegion(regionNames[1]);
-    ASSERT(regPtr1 != nullptr, "In SuspendResumeCommit - Region not found.");
+
     auto keyPtr4 = CacheableKey::create(keys[4]);
     auto keyPtr5 = CacheableKey::create(keys[5]);
     auto keyPtr6 = CacheableKey::create(keys[6]);
 
     txManager->begin();
     createEntry(regionNames[0], keys[4], vals[4]);
-    createEntry(regionNames[1], keys[5], vals[5]);
     auto& m_suspendedTransaction = txManager->suspend();
 
     ASSERT(
         !regPtr0->containsKeyOnServer(keyPtr4),
         "In SuspendResumeCommit - Key should not have been found in region.");
-    ASSERT(
-        !regPtr1->containsKeyOnServer(keyPtr5),
-        "In SuspendResumeCommit - Key should not have been found in region.");
 
     ASSERT(txManager->isSuspended(m_suspendedTransaction),
            "In SuspendResumeCommit - the transaction should be in suspended "
@@ -608,22 +561,12 @@
         "SuspendResumeRollback: Transaction shouldnt have been resumed again");
     ASSERT(regPtr0->containsKeyOnServer(keyPtr4),
            "In SuspendResumeCommit - Key should have been found in region.");
-    ASSERT(regPtr1->containsKeyOnServer(keyPtr5),
-           "In SuspendResumeCommit - Key should have been found in region.");
-
-    createEntry(regionNames[1], keys[6], vals[6]);
 
     txManager->prepare();
     txManager->commit();
     ASSERT(regPtr0->containsKeyOnServer(keyPtr4),
            "In SuspendResumeCommit - Key should have been found in region.");
-    ASSERT(regPtr1->containsKeyOnServer(keyPtr5),
-           "In SuspendResumeCommit - Key should have been found in region.");
-    ASSERT(regPtr1->containsKeyOnServer(keyPtr6),
-           "In SuspendResumeCommit - Key should have been found in region.");
 
-    regPtr1->destroy(keyPtr6);
-    regPtr1->destroy(keyPtr5);
     regPtr0->destroy(keyPtr4);
 
     ASSERT(!txManager->isSuspended(m_suspendedTransaction),
@@ -687,7 +630,7 @@
     ASSERT(!regPtr0->containsKeyOnServer(keyPtr5),
            "In SuspendTimeOut - Key should not have been found in region.");
 
-    ACE_OS::sleep(65);
+    std::this_thread::sleep_for(std::chrono::seconds(65));
     ASSERT(!txManager->tryResume(tid2),
            "In SuspendTimeOut - the transaction should NOT have been resumed");
     ASSERT(!txManager->isSuspended(tid2),
@@ -706,20 +649,14 @@
 
     auto regPtr0 = getHelper()->getRegion(regionNames[0]);
     ASSERT(regPtr0 != nullptr, "In SuspendResumeRollback - Region not found.");
-    auto regPtr1 = getHelper()->getRegion(regionNames[1]);
-    ASSERT(regPtr1 != nullptr, "In SuspendResumeRollback - Region not found.");
 
     txManager->begin();
     createEntry(regionNames[0], keys[4], vals[4]);
-    createEntry(regionNames[1], keys[5], vals[5]);
     auto& m_suspendedTransaction = txManager->suspend();
 
     ASSERT(
         !regPtr0->containsKeyOnServer(keyPtr4),
         "In SuspendResumeRollback - Key should not have been found in region.");
-    ASSERT(
-        !regPtr1->containsKeyOnServer(keyPtr5),
-        "In SuspendResumeRollback - Key should not have been found in region.");
 
     ASSERT(txManager->isSuspended(m_suspendedTransaction),
            "In SuspendResumeRollback the transaction should be in suspended "
@@ -731,36 +668,14 @@
 
     ASSERT(regPtr0->containsKeyOnServer(keyPtr4),
            "In SuspendResumeRollback - Key should have been found in region.");
-    ASSERT(regPtr1->containsKeyOnServer(keyPtr5),
-           "In SuspendResumeRollback - Key should have been found in region.");
-
-    createEntry(regionNames[1], keys[6], vals[6]);
 
     txManager->prepare();
     txManager->rollback();
     ASSERT(
         !regPtr0->containsKeyOnServer(keyPtr4),
         "In SuspendResumeRollback - Key should not have been found in region.");
-    ASSERT(
-        !regPtr1->containsKeyOnServer(keyPtr5),
-        "In SuspendResumeRollback - Key should not have been found in region.");
-    ASSERT(
-        !regPtr1->containsKeyOnServer(keyPtr6),
-        "In SuspendResumeRollback - Key should not have been found in region.");
 
     try {
-      regPtr1->destroy(keyPtr6);
-      FAIL("Should have got EntryNotFoundException for keyPtr6");
-    } catch (EntryNotFoundException& /*ex*/) {
-      LOG("Got expected EntryNotFoundException for keyPtr6");
-    }
-    try {
-      regPtr1->destroy(keyPtr5);
-      FAIL("Should have got EntryNotFoundException for keyPtr5");
-    } catch (EntryNotFoundException& /*ex*/) {
-      LOG("Got expected EntryNotFoundException for keyPtr5");
-    }
-    try {
       regPtr0->destroy(keyPtr4);
       FAIL("Should have got EntryNotFoundException for keyPtr4");
     } catch (EntryNotFoundException& /*ex*/) {
@@ -787,82 +702,71 @@
 END_TASK_DEFINITION
 DUNIT_TASK_DEFINITION(CLIENT1, SuspendResumeInThread)
   {
-    // start suspend thread  and resume thread and rollback immedidately
-    char buf[1024];
-    sprintf(
-        buf,
-        "start suspend thread  and resume thread and rollback immedidately");
-    LOG(buf);
-    ACE_Auto_Event txEvent;
+    LOG("Start suspend thread  and resume thread and rollback immediately");
+    {
+      binary_semaphore event{0};
+      SuspendTransactionThread suspend{false, event};
 
-    SuspendTransactionThread* suspendTh =
-        new SuspendTransactionThread(false, &txEvent);
-    suspendTh->activate();
-    ACE_OS::sleep(2);
-    ResumeTransactionThread* resumeTh = new ResumeTransactionThread(
-        suspendTh->getSuspendedTx(), false, false, &txEvent);
-    resumeTh->activate();
+      suspend.start();
+      std::this_thread::sleep_for(std::chrono::seconds{2});
 
-    suspendTh->wait();
-    delete suspendTh;
-    resumeTh->wait();
-    delete resumeTh;
+      ResumeTransactionThread resume{suspend.getSuspendedTx(), false, false,
+                                     event};
+      resume.start();
 
-    // start suspend thread  and resume thread and commit immedidately
-    sprintf(buf,
-            "start suspend thread  and resume thread and commit immedidately");
-    LOG(buf);
-    suspendTh = new SuspendTransactionThread(false, &txEvent);
-    suspendTh->activate();
-    ACE_OS::sleep(2);
-    resumeTh = new ResumeTransactionThread(suspendTh->getSuspendedTx(), true,
-                                           false, &txEvent);
-    resumeTh->activate();
+      suspend.stop();
+      resume.stop();
+    }
 
-    suspendTh->wait();
-    delete suspendTh;
-    resumeTh->wait();
-    delete resumeTh;
+    LOG("Start suspend thread  and resume thread and commit immediately");
+    {
+      binary_semaphore event{0};
+      SuspendTransactionThread suspend{false, event};
 
-    // start suspend thread  and tryresume thread with rollback. make tryResume
-    // to
-    // sleep
-    sprintf(buf,
-            "start suspend thread  and tryresume thread with rollback. make "
-            "tryResume to sleep");
-    LOG(buf);
-    suspendTh = new SuspendTransactionThread(true, &txEvent);
-    suspendTh->activate();
-    ACE_OS::sleep(2);
-    resumeTh = new ResumeTransactionThread(suspendTh->getSuspendedTx(), false,
-                                           true, &txEvent);
-    resumeTh->activate();
+      suspend.start();
+      std::this_thread::sleep_for(std::chrono::seconds{2});
 
-    suspendTh->wait();
-    delete suspendTh;
-    resumeTh->wait();
-    delete resumeTh;
+      ResumeTransactionThread resume{suspend.getSuspendedTx(), true, false,
+                                     event};
+      resume.start();
 
-    // start suspend thread  and tryresume thread with commit. make tryResume to
-    // sleep
-    sprintf(buf,
-            "start suspend thread  and tryresume thread with commit. make "
-            "tryResume to sleep");
-    LOG(buf);
-    suspendTh = new SuspendTransactionThread(true, &txEvent);
-    suspendTh->activate();
-    ACE_OS::sleep(2);
-    sprintf(buf, "suspendTh->activate();");
-    LOG(buf);
+      suspend.stop();
+      resume.stop();
+    }
 
-    resumeTh = new ResumeTransactionThread(suspendTh->getSuspendedTx(), true,
-                                           true, &txEvent);
-    resumeTh->activate();
+    LOG("Start suspend thread  and tryresume thread with rollback. make "
+        "tryResume to sleep");
+    {
+      binary_semaphore event{0};
+      SuspendTransactionThread suspend{true, event};
 
-    suspendTh->wait();
-    delete suspendTh;
-    resumeTh->wait();
-    delete resumeTh;
+      suspend.start();
+      std::this_thread::sleep_for(std::chrono::seconds{2});
+
+      ResumeTransactionThread resume{suspend.getSuspendedTx(), false, true,
+                                     event};
+      resume.start();
+
+      suspend.stop();
+      resume.stop();
+    }
+
+    LOG("Start suspend thread  and tryresume thread with commit. make "
+        "tryResume to sleep");
+    {
+      binary_semaphore event{0};
+      SuspendTransactionThread suspend{true, event};
+
+      suspend.start();
+      std::this_thread::sleep_for(std::chrono::seconds{2});
+
+      ResumeTransactionThread resume{suspend.getSuspendedTx(), true, true,
+                                     event};
+      resume.start();
+
+      suspend.stop();
+      resume.stop();
+    }
   }
 END_TASK_DEFINITION
 
@@ -875,10 +779,9 @@
       FAIL(
           "Expected exception when doing operations on a non-existent region.");
     } catch (const CacheServerException& ex) {
-      printf(
-          "Got expected CacheServerException when performing operation "
-          "on a non-existent region: %s\n",
-          ex.what());
+      std::cout << "Got expected CacheServerException when performing "
+                   "operation on a non-existent region: "
+                << ex.what() << "\n";
     }
   }
 END_TASK_DEFINITION
@@ -893,10 +796,9 @@
       FAIL(
           "Expected exception when doing operations on a non-existent region.");
     } catch (const CacheServerException& ex) {
-      printf(
-          "Got expected CacheServerException when performing operation "
-          "on a non-existent region: %s\n",
-          ex.what());
+      std::cout << "Got expected CacheServerException when performing "
+                   "operation on a non-existent region: "
+                << ex.what() << "\n";
     }
   }
 END_TASK_DEFINITION
@@ -904,7 +806,6 @@
 DUNIT_TASK_DEFINITION(CLIENT1, StepOne_Pooled_Locator)
   {
     createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TESTPOOL1_");
-    createPooledRegion(regionNames[1], NO_ACK, locatorsG, "__TESTPOOL1_");
     LOG("StepOne_Pooled complete.");
   }
 END_TASK_DEFINITION
@@ -913,7 +814,6 @@
   {
     createPooledRegionSticky(regionNames[0], USE_ACK, locatorsG,
                              "__TESTPOOL1_");
-    createPooledRegionSticky(regionNames[1], NO_ACK, locatorsG, "__TESTPOOL1_");
     LOG("StepOne_Pooled_Locator_Sticky complete.");
   }
 END_TASK_DEFINITION
@@ -922,7 +822,6 @@
   {
     initClient(true);
     createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TESTPOOL1_");
-    createPooledRegion(regionNames[1], NO_ACK, locatorsG, "__TESTPOOL1_");
     LOG("StepTwo complete.");
   }
 END_TASK_DEFINITION
@@ -932,7 +831,6 @@
     initClient(true);
     createPooledRegionSticky(regionNames[0], USE_ACK, locatorsG,
                              "__TESTPOOL1_");
-    createPooledRegionSticky(regionNames[1], NO_ACK, locatorsG, "__TESTPOOL1_");
     LOG("StepTwo complete.");
   }
 END_TASK_DEFINITION
@@ -942,7 +840,6 @@
     auto txManager = getHelper()->getCache()->getCacheTransactionManager();
     txManager->begin();
     createEntry(regionNames[0], keys[0], vals[0]);
-    createEntry(regionNames[1], keys[2], vals[2]);
     txManager->prepare();
     txManager->commit();
     LOG("StepThree complete.");
@@ -952,26 +849,20 @@
 DUNIT_TASK_DEFINITION(CLIENT2, StepFour)
   {
     doNetsearch(regionNames[0], keys[0], vals[0]);
-    doNetsearch(regionNames[1], keys[2], vals[2]);
     auto txManager = getHelper()->getCache()->getCacheTransactionManager();
     txManager->begin();
     createEntry(regionNames[0], keys[1], vals[1]);
-    createEntry(regionNames[1], keys[3], vals[3]);
     txManager->prepare();
     txManager->commit();
     verifyEntry(regionNames[0], keys[1], vals[1]);
-    verifyEntry(regionNames[1], keys[3], vals[3]);
     LOG("StepFour complete.");
   }
 END_TASK_DEFINITION
 DUNIT_TASK_DEFINITION(CLIENT1, StepFive)
   {
     auto reg0 = getHelper()->getRegion(regionNames[0]);
-    auto reg1 = getHelper()->getRegion(regionNames[1]);
     auto vec0 = reg0->serverKeys();
-    auto vec1 = reg1->serverKeys();
     ASSERT(vec0.size() == 2, "Should have 2 keys in first region.");
-    ASSERT(vec1.size() == 2, "Should have 2 keys in second region.");
     std::string key0, key1;
     key0 = vec0[0]->toString().c_str();
     key1 = vec0[1]->toString().c_str();
@@ -981,29 +872,17 @@
     ASSERT(key1 == keys[0] || key1 == keys[1],
            "Unexpected key in first region.");
 
-    key0 = vec1[0]->toString().c_str();
-    key1 = vec1[1]->toString().c_str();
-    ASSERT(key0 != key1, "The two keys should be different in second region.");
-    ASSERT(key0 == keys[2] || key0 == keys[3],
-           "Unexpected key in second region.");
-    ASSERT(key1 == keys[2] || key1 == keys[3],
-           "Unexpected key in second region.");
-
     doNetsearch(regionNames[0], keys[1], vals[1]);
-    doNetsearch(regionNames[1], keys[3], vals[3]);
     updateEntry(regionNames[0], keys[0], nvals[0]);
-    updateEntry(regionNames[1], keys[2], nvals[2]);
     LOG("StepFive complete.");
   }
 END_TASK_DEFINITION
 DUNIT_TASK_DEFINITION(CLIENT2, StepSix)
   {
     doNetsearch(regionNames[0], keys[0], vals[0]);
-    doNetsearch(regionNames[1], keys[2], vals[2]);
     auto txManager = getHelper()->getCache()->getCacheTransactionManager();
     txManager->begin();
     updateEntry(regionNames[0], keys[1], nvals[1]);
-    updateEntry(regionNames[1], keys[3], nvals[3]);
     txManager->prepare();
     txManager->commit();
     LOG("StepSix complete.");
@@ -1013,75 +892,6 @@
   { createEntryTwice(regionNames[0], CREATE_TWICE_KEY, CREATE_TWICE_VALUE); }
 END_TASK_DEFINITION
 
-DUNIT_TASK_DEFINITION(CLIENT1, StepEight_Pool)
-  {
-    createPooledRegion(regionNames[2], NO_ACK, locatorsG, "__TESTPOOL1_", false,
-                       false);
-    auto reg = getHelper()->getRegion(regionNames[2]);
-    LOG("REGION Created with Caching Enabled false");
-    auto keyPtr = CacheableKey::create(CREATE_TWICE_KEY);
-    auto valPtr = CacheableString::create(CREATE_TWICE_VALUE);
-    try {
-      reg->create(keyPtr, valPtr);
-      char message[200];
-      sprintf(message, "First create on Key %s ", CREATE_TWICE_KEY);
-      LOG(message);
-      reg->create(keyPtr, valPtr);
-      sprintf(message, "Second create on Key %s ", CREATE_TWICE_KEY);
-      LOG(message);
-      reg->create(keyPtr, valPtr);
-      sprintf(message, "Third create on Key %s ", CREATE_TWICE_KEY);
-      LOG(message);
-    } catch (const EntryExistsException& geodeExcp) {
-      LOG(geodeExcp.what());
-      ASSERT(false,
-             "Creating KEY Twice on a caching-enabled false region should be "
-             "allowed.");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepEight_Pool_Sticky)
-  {
-    createPooledRegionSticky(regionNames[2], NO_ACK, locatorsG, "__TESTPOOL1_",
-                             false, false);
-    auto reg = getHelper()->getRegion(regionNames[2]);
-    LOG("REGION Created with Caching Enabled false");
-    auto keyPtr = CacheableKey::create(CREATE_TWICE_KEY);
-    auto valPtr = CacheableString::create(CREATE_TWICE_VALUE);
-
-    auto reg0 = getHelper()->getRegion(regionNames[0]);
-    auto reg1 = getHelper()->getRegion(regionNames[1]);
-    reg0->localInvalidate(CacheableKey::create(keys[1]));
-    reg1->localInvalidate(CacheableKey::create(keys[3]));
-    auto pool = getHelper()->getCache()->getPoolManager().find("__TESTPOOL1_");
-    ASSERT(pool != nullptr, "Pool Should have been found");
-    doNetsearch(regionNames[0], keys[1], nvals[1]);
-    doNetsearch(regionNames[1], keys[3], nvals[3]);
-    pool->releaseThreadLocalConnection();
-    updateEntry(regionNames[0], keys[0], nvals[0]);
-    updateEntry(regionNames[1], keys[2], nvals[2]);
-    pool->releaseThreadLocalConnection();
-    try {
-      reg->create(keyPtr, valPtr);
-      char message[200];
-      sprintf(message, "First create on Key %s ", CREATE_TWICE_KEY);
-      LOG(message);
-      reg->create(keyPtr, valPtr);
-      sprintf(message, "Second create on Key %s ", CREATE_TWICE_KEY);
-      LOG(message);
-      reg->create(keyPtr, valPtr);
-      sprintf(message, "Third create on Key %s ", CREATE_TWICE_KEY);
-      LOG(message);
-    } catch (const EntryExistsException& geodeExcp) {
-      LOG(geodeExcp.what());
-      ASSERT(false,
-             "Creating KEY Twice on a caching-enabled false region should be "
-             "allowed.");
-    }
-  }
-END_TASK_DEFINITION
-
 DUNIT_TASK_DEFINITION(CLIENT1, CloseCache1)
   { cleanProc(); }
 END_TASK_DEFINITION
@@ -1099,30 +909,19 @@
   }
 END_TASK_DEFINITION
 
-void runTransactionOps(bool isSticky = false) {
+void runTransactionOps() {
   CALL_TASK(CreateLocator1);
   CALL_TASK(CreateServer1_With_Locator);
 
-  if (isSticky) {
-    CALL_TASK(CreateNonexistentServerRegion_Pooled_Locator_Sticky);
-    CALL_TASK(StepOne_Pooled_Locator_Sticky);
-    CALL_TASK(StepTwo_Pooled_Locator_Sticky);
-  } else {
-    CALL_TASK(CreateNonexistentServerRegion_Pooled_Locator);
-    CALL_TASK(StepOne_Pooled_Locator);
-    CALL_TASK(StepTwo_Pooled_Locator);
-  }
+  CALL_TASK(CreateNonexistentServerRegion_Pooled_Locator);
+  CALL_TASK(StepOne_Pooled_Locator);
+  CALL_TASK(StepTwo_Pooled_Locator);
 
   CALL_TASK(StepThree);
   CALL_TASK(StepFour);
   CALL_TASK(StepFive);
   CALL_TASK(StepSix);
   CALL_TASK(StepSeven);
-  if (isSticky) {
-    CALL_TASK(StepEight_Pool_Sticky);
-  } else {
-    CALL_TASK(StepEight_Pool);
-  }
 
   CALL_TASK(SuspendResumeInThread);
   CALL_TASK(SuspendResumeCommit);
diff --git a/cppcache/integration-test/ThinClientVersionedOps.hpp b/cppcache/integration-test/ThinClientVersionedOps.hpp
index c812b07..cc37642 100644
--- a/cppcache/integration-test/ThinClientVersionedOps.hpp
+++ b/cppcache/integration-test/ThinClientVersionedOps.hpp
@@ -32,10 +32,10 @@
 
 // This is the test for tracking work. bug#304
 
-putThread *thread1 = nullptr;
-putThread *thread2 = nullptr;
-putThread *thread3 = nullptr;
-putThread *thread4 = nullptr;
+PutThread* thread1 = nullptr;
+PutThread* thread2 = nullptr;
+PutThread* thread3 = nullptr;
+PutThread* thread4 = nullptr;
 
 const char *regNames[] = {"DistRegionAck", "DistRegionNoAck"};
 const char *group1 = "A";
@@ -47,7 +47,7 @@
 bool isLocalServer1 = false;
 
 static bool isLocator1 = false;
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator1, isLocalServer1, 1);
 std::shared_ptr<CacheableString> c1v11;
 std::shared_ptr<CacheableString> c1v12;
@@ -125,9 +125,7 @@
     // TOOD::check for poolwithendpoints or locators
 
     // By default poolwithendpoints
-    // char tmp1[100];
-    // sprintf( tmp1, "%d", CacheHelper::staticHostPort1 );
-    // gfendpoints1 += tmp1;
+    // gfendpoints1 += std::to_string(CacheHelper::staticHostPort1);
 
     // initClientWithPool(true/*isthinClient*/, nullptr/*poolName*/,
     // nullptr/*locators*/,serverGroup1, nullptr/*servers*/,
@@ -158,11 +156,9 @@
     // TOOD::check for poolwithendpoints or locators
     /*	LOG( "Client-2 Init -1" );
     //By default poolwithendpoints
-          char tmp2[100];
           LOG( "Client-2 Init -2" );
-          sprintf( tmp2, "%d", CacheHelper::staticHostPort2 );
           LOG( "Client-2 Init -3" );
-          gfendpoints2 += tmp2;
+          gfendpoints2 += std::to_string(CacheHelper::staticHostPort2);
           LOG( "Client-2 Init -4" );
     initClientWithPool(true, nullptr, nullptr, serverGroup2,
     gfendpoints2.c_str(), nullptr, 0, true, -1, 5, 60000); LOG( "Client-2 Init
@@ -189,7 +185,7 @@
 DUNIT_TASK_DEFINITION(CLIENT1, threadPutonClient1)
   {
     auto rptr = getHelper()->getRegion(regNames[0]);
-    thread4 = new putThread(rptr, false);
+    thread4 = new PutThread(rptr, false);
     thread4->setParams(0, 10, 1, true, false, 0);
     thread4->start();
     LOG("Task: threadPutonClient1 Done");
@@ -313,7 +309,7 @@
 DUNIT_TASK_DEFINITION(CLIENT1, PutOnClient1)
   {
     auto rptr = getHelper()->getRegion(regNames[0]);
-    thread1 = new putThread(rptr, false);
+    thread1 = new PutThread(rptr, false);
     thread1->setParams(0, 5, 1, true, false, 1);
     thread1->start();
     LOG("PUT ops done on client 1");
@@ -323,7 +319,7 @@
 DUNIT_TASK_DEFINITION(CLIENT2, PutOnClient2)
   {
     auto rptr = getHelper()->getRegion(regNames[0]);
-    thread2 = new putThread(rptr, false);
+    thread2 = new PutThread(rptr, false);
     thread2->setParams(0, 5, 1, false, false, 0);  // 0, 5, 1, false, false, 0
     thread2->start();
     LOG("PUT ops done on client 2");
@@ -333,7 +329,7 @@
 DUNIT_TASK_DEFINITION(CLIENT1, testServerGC)
   {
     auto rptr = getHelper()->getRegion(regNames[0]);
-    thread3 = new putThread(rptr, false);
+    thread3 = new PutThread(rptr, false);
     thread3->setParams(0, 5000, 1, true, false, 0);  // 0, 5, 1, false, false, 0
     thread3->start();
     LOG("5000 PUT ops done on client 1");
diff --git a/cppcache/integration-test/TimeBomb.cpp b/cppcache/integration-test/TimeBomb.cpp
new file mode 100644
index 0000000..9bb987a
--- /dev/null
+++ b/cppcache/integration-test/TimeBomb.cpp
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+
+#include "TimeBomb.hpp"
+
+#include <iostream>
+
+TimeBomb::TimeBomb(const std::chrono::milliseconds& sleep,
+                   std::function<void()> cleanup)
+    : enabled_{false}, callback_{cleanup}, sleep_{sleep} {}
+
+TimeBomb::~TimeBomb() noexcept {
+  if (enabled_) {
+    disarm();
+  }
+}
+
+void TimeBomb::arm() {
+  enabled_ = true;
+  thread_ = std::thread{[this] { run(); }};
+}
+
+void TimeBomb::disarm() {
+  enabled_ = false;
+  cv_.notify_all();
+  thread_.join();
+}
+
+void TimeBomb::run() {
+  std::clog << "TimeBomb armed to trigger in " << sleep_.count() << " ms"
+            << std::endl;
+  {
+    std::unique_lock<decltype(mutex_)> lock{mutex_};
+    cv_.wait_for(lock, sleep_);
+  }
+
+  if (enabled_) {
+    std::clog << "####### ERROR: TIMEBOMB WENT OFF, TEST TIMED OUT ########"
+              << std::endl
+              << std::flush;
+    callback_();
+    exit(-1);
+  } else {
+    std::clog << "###### TIMEBOMB Disabled ######" << std::endl << std::flush;
+  }
+}
diff --git a/cppcache/integration-test/TimeBomb.hpp b/cppcache/integration-test/TimeBomb.hpp
index 97d58f5..c54dedd 100644
--- a/cppcache/integration-test/TimeBomb.hpp
+++ b/cppcache/integration-test/TimeBomb.hpp
@@ -20,95 +20,31 @@
 #ifndef GEODE_INTEGRATION_TEST_TIMEBOMB_H_
 #define GEODE_INTEGRATION_TEST_TIMEBOMB_H_
 
-#include <ace/Task.h>
-#include <ace/OS.h>
-#include <ace/Time_Value.h>
-#include <assert.h>
+#include <condition_variable>
+#include <functional>
+#include <mutex>
+#include <thread>
 
-#define MAX_CLIENT 10
-
-class ClientCleanup {
- private:
-  void (*m_cleanupCallback[MAX_CLIENT])();
-  int m_numberOfClient;
-
+class TimeBomb {
  public:
-  ClientCleanup() : m_numberOfClient(0) {}
+  explicit TimeBomb(const std::chrono::milliseconds& sleep,
+                    std::function<void()> cleanup);
 
-  void callClientCleanup() {
-    printf("callClientCleanup ... %d \n", m_numberOfClient);
-    for (int i = 0; i < m_numberOfClient; i++) {
-      try {
-        m_cleanupCallback[i]();
-      } catch (...) {
-      }
-    }
-  }
+  ~TimeBomb() noexcept;
 
-  bool registerCallback(void (*cleanupFunc)()) {
-    if (m_numberOfClient < MAX_CLIENT) {
-      m_cleanupCallback[m_numberOfClient++] = cleanupFunc;
-      return true;
-    }
-    return false;
-  }
-};
+  void arm();
+  void disarm();
 
-// Automatic stack variable that exits the process after
-// a time specified in the environment.
+  void run();
 
-class TimeBomb : public ACE_Task_Base {
- private:
-  // UNUSED int m_numberOfClient;
-  void (*m_cleanupCallback)();
-  void callClientCleanup() {
-    if (m_cleanupCallback != nullptr) m_cleanupCallback();
-  }
+ protected:
+  bool enabled_;
+  std::mutex mutex_;
+  std::condition_variable cv_;
 
- public:
-  ACE_Time_Value m_sleep;
-
-  explicit TimeBomb(void (*cleanupFunc)() = nullptr)
-      : m_sleep(0) /* UNUSED , m_numberOfClient( -1 )*/
-  {
-    char* sleepEnv = ACE_OS::getenv("TIMEBOMB");
-    if (sleepEnv != nullptr) {
-      m_sleep.sec(atol(sleepEnv));
-    }
-    m_cleanupCallback = cleanupFunc;
-    arm();  // starting
-  }
-
-  int arm() {
-    int thrAttrs = THR_NEW_LWP | THR_DETACHED;
-#ifndef WIN32
-    thrAttrs |= THR_INHERIT_SCHED;
-#endif
-    return activate(thrAttrs, 1);
-  }
-
-  int svc() {
-    if (m_sleep == ACE_Time_Value(0)) {
-      printf("###### TIMEBOMB Disabled. ######\n");
-      fflush(stdout);
-      return 0;
-    }
-    ACE_Time_Value start = ACE_OS::gettimeofday();
-    ACE_Time_Value now = ACE_OS::gettimeofday();
-    do {
-      ACE_OS::sleep(1);
-      now = ACE_OS::gettimeofday();
-    } while (now - start < m_sleep);
-    printf("####### ERROR: TIMEBOMB WENT OFF, TEST TIMED OUT ########\n");
-    fflush(stdout);
-
-    callClientCleanup();
-
-    exit(-1);
-    return 0;
-  }
-
-  ~TimeBomb() {}
+  std::thread thread_;
+  std::function<void()> callback_;
+  std::chrono::milliseconds sleep_;
 };
 
 #endif  // GEODE_INTEGRATION_TEST_TIMEBOMB_H_
diff --git a/cppcache/integration-test/comparePerf.pl b/cppcache/integration-test/comparePerf.pl
deleted file mode 100755
index 405c88b..0000000
--- a/cppcache/integration-test/comparePerf.pl
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/bin/perl
-# 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.
-
-# Compare PerfSuite lines in one file against those in another...
-
-$argOne = shift( @ARGV );
-$argTwo = shift( @ARGV );
-
-$argOne =~ s/\\/\//g;
-$argTwo =~ s/\\/\//g;
-
-# Read baseline
-
-if ( ! -f "$argOne" ) {
-  print "Error: No baseline file to for host, checkin appropriate testPutGetPerf.out as file $argOne\n";
-  exit( 1 );
-}
-
-open( FILONE, "grep PerfSuite $argOne|" ) || die( "Error: No baseline file to for host, checkin appropriate testPutGetPerf.out as file $argOne" );
-
-while( $line = <FILONE> ) {
-  $line =~ m/PerfSuite\] (\w+) -- (\d+) ops/;
-  $key = $1;
-  $value = $2;
-  $dataone{"${key}"} = $value;
-}
-
-close( FILONE );
-
-@tmp = keys( %dataone );
-if ( $#tmp == -1 ) {
-  print "Error: No data found in $argOne\n";
-  exit( 1 );
-}
-
-# Read new results
-
-if ( ! -f "$argTwo" ) {
-  print "Error: No result file from test to compare, expected $argTwo\n";
-  exit( 1 );
-}
-
-open( FILTWO, "grep PerfSuite $argTwo|" ) || die( "No file $argTwo" );
-
-while( $line = <FILTWO> ) {
-  $line =~ m/PerfSuite\] (\w+) -- (\d+) ops/;
-  $key = $1;
-  $value = $2;
-  $datatwo{"${key}"} = $value;
-}
-
-close( FILTWO );
-
-$code = 0;
-
-@tmp = keys( %datatwo );
-if ( $#tmp == -1 ) {
-  print "Error: No data found in $argTwo\n";
-  exit( 1 );
-}
-
-# display comparisons
-
-format top =
-%CHANGE  TESTCASE                     BASELINE CURRENT
-======== ============================ ======== ================
-.
-format STDOUT =
-( @##% ) @<<<<<<<<<<<<<<<<<<<<<<<<<<< @####### @####### ops/sec
-$percent, $item,                       $baseValue, $newValue
-.
-
-foreach $item (sort( keys( %dataone ) )) {
-  $change = $datatwo{"${item}"} - $dataone{"${item}"};
-  $percent = int( 100 * ( $change / $dataone{"${item}"} ));
-  $baseValue = $dataone{"${item}"};
-  $newValue = $datatwo{"${item}"};
-  write;
-  if ( $percent < ( -5 ) ) {
-    $code++;
-  }
-}
-
-if ( $code > 0 ) {
-  print "Error: $code performance cases failed by more than 5%\n";
-}
-
-exit( $code );
diff --git a/cppcache/integration-test/fw_dunit.cpp b/cppcache/integration-test/fw_dunit.cpp
index 82b7395..177f3ea 100644
--- a/cppcache/integration-test/fw_dunit.cpp
+++ b/cppcache/integration-test/fw_dunit.cpp
@@ -1,3 +1,4 @@
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -15,77 +16,44 @@
  * limitations under the License.
  */
 
-#ifdef WIN32
-// ace.dll was built with FD_SETSIZE of 1024, so ensure it stays that way.
-#undef FD_SETSIZE
-#define FD_SETSIZE 1024
-#if WINVER == 0x0500
-#undef _WINSOCKAPI_
-#define NOMINMAX
-#include <WinSock2.h>
-#endif
-#endif
-
 #ifdef USE_SMARTHEAP
 #include <smrtheap.h>
 #endif
 
-#include "TimeBomb.hpp"
-
-#include <ace/ACE.h>
-
-#include <typeinfo>
-
 #include <string>
+#include <iostream>
+#include <iomanip>
 #include <list>
 #include <map>
 
-// SW: Switching to framework BB on linux also since it is much faster.
-#ifndef _WIN32
-// On solaris, when ACE_Naming_Context maps file to memory using fixed mode, it
-// interfere with malloc/brk system calls later cause failure. For now, we use
-// the Black Board from the regression test framework. When the ACE problem is
-// fixed in a new release we'll go back to original code by undefining
-// SOLARIS_USE_BB
-#define SOLARIS_USE_BB 1
-#endif
+#include <boost/process.hpp>
+#include <boost/program_options.hpp>
+#include <boost/interprocess/mapped_region.hpp>
 
-#define VALUE_MAX 128
-
-#ifdef SOLARIS_USE_BB
-#include "BBNamingContext.hpp"
-using apache::geode::client::testframework::BBNamingContextClient;
-using apache::geode::client::testframework::BBNamingContextServer;
+#ifdef _WIN32
+#include <boost/interprocess/windows_shared_memory.hpp>
 #else
-#include <ace/Naming_Context.h>
+#include <boost/interprocess/shared_memory_object.hpp>
 #endif
 
-#include <ace/Guard_T.h>
-#include <ace/Get_Opt.h>
-#include <ace/Time_Value.h>
-#include <ace/SV_Semaphore_Complex.h>
-
-#include "fw_spawn.hpp"
 #include "fwklib/FwkException.hpp"
 
 #define __DUNIT_NO_MAIN__
 #include "fw_dunit.hpp"
 
-ACE_TCHAR *g_programName = nullptr;
-uint32_t g_coordinatorPid = 0;
+#include "Utils.hpp"
+
+namespace bp = boost::process;
+namespace bip = boost::interprocess;
+namespace bpo = boost::program_options;
+
+static std::string g_programName;
+static uint32_t g_coordinatorPid = 0;
 
 ClientCleanup gClientCleanup;
 
 namespace dunit {
 
-void HostWaitForDebugger() {
-  int done = 0;
-  LOG("host wait for debugger.");
-  while (!done) {
-    sleep(1);
-  }
-}
-
 void setupCRTOutput() {
 #ifdef _WIN32
 #ifdef DEBUG
@@ -100,15 +68,6 @@
 #endif
 #endif
 }
-
-void getTimeStr(char *bufPtr, size_t sizeOfBuf) {
-  ACE_TCHAR timestamp[64] = {0};  // only 35 needed here
-  ACE::timestamp(timestamp, sizeof timestamp);
-  // timestamp is like "Tue May 17 2005 12:54:22.546780"
-  // for our purpose we just want "12:54:22.546780"
-  strncpy(bufPtr, &timestamp[16], sizeOfBuf);
-}
-
 // some common values..
 #define WORKER_STATE_READY 1
 #define WORKER_STATE_DONE 2
@@ -118,181 +77,6 @@
 
 void log(std::string s, int lineno, const char *filename);
 
-/** Naming service for sharing data between processes. */
-class NamingContextImpl : virtual public NamingContext {
- private:
-#ifdef SOLARIS_USE_BB
-  BBNamingContextClient
-#else
-  ACE_Naming_Context
-#endif
-      m_context;
-
-  void millisleep(int msec) {
-    ACE_Time_Value sleepTime;
-    sleepTime.msec(msec);
-    ACE_OS::sleep(sleepTime);
-  }
-
-  int checkResult(int result, const char *func) {
-    if (result == -1) {
-      LOGCOORDINATOR("NamingCtx operation failed for:");
-      LOGCOORDINATOR(func);
-      LOGCOORDINATOR("Dump follows:");
-      dump();
-      throw - 1;
-    }
-    return result;
-  }
-
- public:
-  NamingContextImpl() : m_context() {
-    open();
-    LOGCOORDINATOR("Naming context ready.");
-  }
-
-  ~NamingContextImpl() noexcept override {
-    m_context.close();
-    ACE_OS::unlink(ACE_OS::getenv("TESTNAME"));
-  }
-
-  /**
-   * Share a string value, return -1 if there is a failure to store value,
-   * otherwise returns 0.
-   */
-  int rebind(const char *key, const char *value) override {
-    int res = -1;
-    int attempts = 10;
-    while ((res = m_context.rebind(key, value, const_cast<char *>(""))) == -1 &&
-           attempts--) {
-      millisleep(10);
-    }
-    return checkResult(res, "rebind");
-  }
-
-  /**
-   * Share an int value, return -1 if there is a failure to store value,
-   * otherwise returns 0.
-   */
-  int rebind(const char *key, int value) override {
-    return rebind(key, std::to_string(value).c_str());
-  }
-
-  /**
-   * retreive a value by key, storing the result in the users buf. If the key
-   * is not found, the buf will contain the empty string "".
-   */
-  void getValue(const char *key, char *buf, size_t sizeOfBuf) override {
-#ifdef SOLARIS_USE_BB
-    char value[VALUE_MAX] = {0};
-    char type[VALUE_MAX] = {0};
-#else
-    char *value = nullptr;
-    char *type = nullptr;
-#endif
-
-    int res = -1;
-    // we should not increase attempts to avoid increasing test run times.
-    int attempts = 3;
-    while ((res = m_context.resolve(key, value, type)) != 0 && attempts--) {
-      // we should not increase sleep to avoid increasing test run times.
-      millisleep(5);
-    }
-
-    if (res != 0) {
-      strncpy(buf, "", sizeOfBuf);
-      return;
-    }
-    ACE_OS::strncpy(buf, value, sizeOfBuf);
-  }
-
-  /**
-   * return the value by key, as an int using the string to int conversion
-   * rules of atoi.
-   */
-  int getIntValue(const char *key) override {
-    char value[VALUE_MAX] = {0};
-    getValue(key, value, sizeof(value));
-    if (ACE_OS::strcmp(value, "") == 0) return 0;
-    return ACE_OS::atoi(value);
-  }
-
-  void open() {
-#ifdef SOLARIS_USE_BB
-    m_context.open();
-#else
-    ACE_Name_Options *name_options = m_context.name_options();
-    name_options->process_name(getContextName().c_str());
-    name_options->namespace_dir(".");
-    name_options->context(ACE_Naming_Context::PROC_LOCAL);
-    name_options->database(ACE_OS::getenv("TESTNAME"));
-    checkResult(m_context.open(name_options->context(), 0), "open");
-#endif
-    LOGCOORDINATOR("Naming context opened.");
-  }
-
-  std::string getContextName() {
-    char buf[1024] = {0};
-    ACE_OS::sprintf(buf, "dunit.context.%s%d", ACE::basename(g_programName),
-                    g_coordinatorPid);
-    std::string b_str(buf);
-    return b_str;
-  }
-
-  std::string getMutexName() {
-    char buf[1024] = {0};
-    ACE_OS::sprintf(buf, "dunit.mutex.%s%d", ACE::basename(g_programName),
-                    g_coordinatorPid);
-    std::string b_str(buf);
-    return b_str;
-  }
-
-  /** print out all the entries' keys and values in the naming context. */
-  void dump() override {
-#ifdef SOLARIS_USE_BB
-    m_context.dump();
-#else
-    ACE_BINDING_SET set;
-    if (this->m_context.list_name_entries(set, "") != 0) {
-      char buf[1000] = {0};
-      ACE_OS::sprintf(buf, "There is nothing in the naming context.");
-      LOGCOORDINATOR(buf);
-    } else {
-      ACE_BINDING_ITERATOR set_iterator(set);
-      for (ACE_Name_Binding *entry = 0; set_iterator.next(entry) != 0;
-           set_iterator.advance()) {
-        ACE_Name_Binding binding(*entry);
-        char buf[1000] = {0};
-        ACE_OS::sprintf(buf, "%s => %s", binding.name_.char_rep(),
-                        binding.value_.char_rep());
-        LOGCOORDINATOR(buf);
-      }
-    }
-#endif
-  }
-
-  void resetContext() {
-    char buf[30] = {0};
-    sprintf(buf, "%d", ACE_OS::getpid());
-
-    int res1 = -1;
-    int attempts1 = 10;
-    while ((res1 = m_context.rebind("Driver", buf)) == -1 && attempts1--) {
-      millisleep(10);
-    }
-    checkResult(res1, "rebind1");
-
-    int res2 = -1;
-    int attempts2 = 10;
-    while ((res2 = m_context.rebind("WorkerId", "0")) == -1 && attempts2--) {
-      millisleep(10);
-    }
-    checkResult(res2, "rebind2");
-
-    LOGCOORDINATOR("Naming context reset.");
-  }
-};
-
 /** uniquely represent each different worker. */
 class WorkerId {
  private:
@@ -302,7 +86,7 @@
  public:
   explicit WorkerId(uint32_t id) { m_id = id; }
 
-  int getId() { return m_id; }
+  int getId() const { return m_id; }
 
   const char *getIdName() { return m_idNames[m_id]; }
 
@@ -339,9 +123,7 @@
     }
     Task *task = tasks->front();
     if (task != nullptr) {
-      char logmsg[1024] = {0};
-      sprintf(logmsg, "received task: %s ", task->m_taskName.c_str());
-      LOG(logmsg);
+      LOG(std::string("receieved task: ") + task->m_taskName);
       tasks->pop_front();
     }
     return task;
@@ -352,9 +134,7 @@
       return 0;
     }
     int sId = m_schedule.front();
-    char logmsg[1024] = {0};
-    sprintf(logmsg, "Next worker id is : %d", sId);
-    LOGCOORDINATOR(logmsg);
+    LOGCOORDINATOR(std::string("Next worker id id : ") + std::to_string(sId));
     m_schedule.pop_front();
     return sId;
   }
@@ -392,33 +172,118 @@
   TaskQueues::addTask(WorkerId(sId), this);
 }
 
+class TestState {
+ public:
+  static const auto WORKER_COUNT = 4U;
+
+  void reset();
+
+  void setWorkerTimeout(int id, int seconds);
+
+  int getWorkerTimeout(int id) const;
+
+  void setWorkerState(int id, uint8_t state);
+
+  int getWorkerState(int id) const;
+
+  void setNextWorker(int id);
+
+  int getNextWorker();
+
+  void fail();
+
+  bool failed() const;
+
+  void terminate();
+
+  bool terminated() const;
+
+ private:
+  bool failure_;
+  bool terminate_;
+  int next_worker_;
+  int worker_timeout_[WORKER_COUNT];
+  uint8_t worker_state_[WORKER_COUNT];
+};
+
 /** main framework entry */
 class Dunit {
  private:
-  NamingContextImpl m_globals;
+  static const auto MANAGED_STATE_SIZE = 1UL << 17UL;
   static Dunit *singleton;
-  bool m_close_down;
 
-  Dunit() : m_globals(), m_close_down(false) {}
+  bool coordinator_;
+  bip::mapped_region globals_region_;
+#ifdef _WIN32
+  bip::windows_shared_memory globals_shm_;
+#else
+  bip::shared_memory_object globals_shm_;
+#endif
+  bip::managed_shared_memory managed_state_;
 
-  void resetContext() {
-    m_close_down = true;
-    m_globals.resetContext();
+  explicit Dunit(bool coordinator) : coordinator_(coordinator) {
+    if (coordinator) {
+      removeStates();
+
+#ifdef _WIN32
+      globals_shm_ =
+          bip::windows_shared_memory{bip::create_only, getSharedName(),
+                                     bip::read_write, sizeof(TestState)};
+#else
+      globals_shm_ = bip::shared_memory_object{
+          bip::create_only, getSharedName(), bip::read_write};
+      globals_shm_.truncate(sizeof(TestState));
+#endif
+
+      managed_state_ = bip::managed_shared_memory{
+          bip::create_only, getManagedStateName(), MANAGED_STATE_SIZE};
+    } else {
+      using shared_memory =
+#ifdef _WIN32
+          bip::windows_shared_memory;
+#else
+          bip::shared_memory_object;
+#endif
+
+      globals_shm_ =
+          shared_memory{bip::open_only, getSharedName(), bip::read_write};
+      managed_state_ =
+          bip::managed_shared_memory{bip::open_only, getManagedStateName()};
+    }
+
+    globals_region_ = bip::mapped_region{globals_shm_, bip::read_write};
+
+    if (coordinator) {
+      getState()->reset();
+    }
+  }
+
+  ~Dunit() {
+    if (coordinator_) {
+      removeStates();
+    }
+  }
+
+  static void removeStates() {
+    bip::shared_memory_object::remove(getSharedName());
+    bip::shared_memory_object::remove(getManagedStateName());
+  }
+
+  static const char *getSharedName() {
+    static std::string name = std::string{std::getenv("TESTNAME")} + '.' +
+                              std::to_string(g_coordinatorPid);
+    return name.c_str();
+  }
+
+  static const char *getManagedStateName() {
+    static std::string name = std::string{std::getenv("TESTNAME")} +
+                              ".managed." + std::to_string(g_coordinatorPid);
+    return name.c_str();
   }
 
  public:
   /** call this once just inside main... */
-  static void init(bool initContext = false) {
-    if (initContext) {
-      ACE_OS::unlink("localnames");
-      ACE_OS::unlink("name_space_localnames");
-      ACE_OS::unlink("backing_store_localnames");
-    }
-    singleton = new Dunit();
-    if (initContext) {
-      singleton->resetContext();
-    }
-  }
+  static void init(bool coordinator) { singleton = new Dunit(coordinator); }
 
   /** return the already initialized singleton Dunit instance. */
   static Dunit *getSingleton() {
@@ -433,82 +298,105 @@
     delete tmp;
   }
 
-  /** set the next worker id */
-  void setNextWorker(WorkerId &sId) {
-    m_globals.rebind("WorkerId", sId.getId());
+  TestState *getState() {
+    return reinterpret_cast<TestState *>(globals_region_.get_address());
   }
 
-  /** get the next worker id */
-  int getNextWorker() { return m_globals.getIntValue("WorkerId"); }
-
-  /** return true if all workers are to terminate. */
-  bool mustQuit() {
-    return m_globals.getIntValue("TerminateAllWorkers") ? true : false;
-  }
-
-  /** signal all workers to terminate. */
-  void setMustQuit() { m_globals.rebind("TerminateAllWorkers", 1); }
-
-  /** signal to test driver that an error occurred. */
-  void setFailed() { m_globals.rebind("Failure", 1); }
-
-  bool getFailed() { return m_globals.getIntValue("Failure") ? true : false; }
-
-  void setWorkerState(WorkerId sId, int state) {
-    char key[100] = {0};
-    ACE_OS::sprintf(key, "ReadyWorker%d", sId.getId());
-    m_globals.rebind(key, state);
-  }
-
-  int getWorkerState(WorkerId sId) {
-    char key[100] = {0};
-    ACE_OS::sprintf(key, "ReadyWorker%d", sId.getId());
-    return m_globals.getIntValue(key);
-  }
-
-  void setWorkerTimeout(WorkerId sId, int seconds) {
-    char key[100] = {0};
-    ACE_OS::sprintf(key, "TimeoutWorker%d", sId.getId());
-    m_globals.rebind(key, seconds);
-  }
-
-  int getWorkerTimeout(WorkerId sId) {
-    char key[100] = {0};
-    ACE_OS::sprintf(key, "TimeoutWorker%d", sId.getId());
-    return m_globals.getIntValue(key);
-  }
-
-  /** return the NamingContext for global (amongst all processes) values. */
-  NamingContext *globals() { return &m_globals; }
-
-  ~Dunit() {}
+  bip::managed_shared_memory &getManagedState() { return managed_state_; }
 };
 
 #define DUNIT dunit::Dunit::getSingleton()
 
 Dunit *Dunit::singleton = nullptr;
 
-void Task::setTimeout(int seconds) {
-  if (seconds > 0) {
-    DUNIT->setWorkerTimeout(WorkerId(m_id), seconds);
-  } else {
-    DUNIT->setWorkerTimeout(WorkerId(m_id), TASK_TIMEOUT);
+void TestState::reset() {
+  next_worker_ = 0;
+  failure_ = false;
+  terminate_ = false;
+
+  for (auto i = 0U; i < WORKER_COUNT; ++i) {
+    worker_state_[i] = 0;
+    worker_timeout_[i] = -1;
   }
 }
 
-class TestProcess : virtual public dunit::Manager {
- private:
-  WorkerId m_sId;
+void TestState::setWorkerTimeout(int id, int seconds) {
+  worker_timeout_[id - 1] = seconds;
+}
 
+int TestState::getWorkerTimeout(int id) const {
+  return worker_timeout_[id - 1];
+}
+
+void TestState::setWorkerState(int id, uint8_t state) {
+  worker_state_[id - 1] = state;
+}
+
+int TestState::getWorkerState(int id) const { return worker_state_[id - 1]; }
+
+void TestState::setNextWorker(int id) { next_worker_ = id; }
+
+int TestState::getNextWorker() { return next_worker_; }
+
+void TestState::fail() { failure_ = true; }
+
+bool TestState::failed() const { return failure_; }
+
+void TestState::terminate() { terminate_ = true; }
+
+bool TestState::terminated() const { return terminate_; }
+
+void Task::setTimeout(int seconds) {
+  auto state = DUNIT->getState();
+  if (seconds > 0) {
+    state->setWorkerTimeout(m_id, seconds);
+  } else {
+    state->setWorkerTimeout(m_id, TASK_TIMEOUT);
+  }
+}
+
+class TestProcess {
  public:
-  TestProcess(const ACE_TCHAR *cmdline, uint32_t id)
-      : Manager(cmdline), m_sId(id) {}
+  TestProcess(const std::string &cmdline, uint32_t id)
+      : id_{id}, running_{false}, cmd_{cmdline} {}
 
-  WorkerId &getWorkerId() { return m_sId; }
+  WorkerId &getWorkerId() { return id_; }
+
+  void run() {
+    auto arguments = bpo::split_unix(cmd_);
+
+    std::string exe = arguments[0];
+    arguments.erase(arguments.begin());
+    process_ = bp::child(exe, bp::args = arguments);
+
+    process_.wait();
+    if (process_.exit_code() != 0) {
+      std::clog << "Worker " << id_.getIdName() << " exited with code "
+                << process_.exit_code() << std::endl;
+    }
+
+    running_ = false;
+  }
+
+  void start() {
+    running_ = true;
+    thread_ = std::thread{[this]() { run(); }};
+  }
+
+  void stop() {
+    if (thread_.joinable()) {
+      thread_.join();
+    }
+  }
+
+  bool running() const { return running_; }
 
  protected:
- public:
-  virtual ~TestProcess() {}
+  WorkerId id_;
+  bool running_;
+  std::string cmd_;
+  bp::child process_;
+  std::thread thread_;
 };
 
 /**
@@ -518,109 +406,93 @@
 class TestDriver {
  private:
   TestProcess *m_workers[4];
-#ifdef SOLARIS_USE_BB
-  BBNamingContextServer *m_bbNamingContextServer;
-#endif
 
  public:
   TestDriver() {
-#ifdef SOLARIS_USE_BB
-    m_bbNamingContextServer = new BBNamingContextServer();
-    ACE_OS::sleep(5);
-    fprintf(stdout, "Blackboard started\n");
-    fflush(stdout);
-#endif
-
     dunit::Dunit::init(true);
-    fprintf(stdout, "Coordinator starting workers.\n");
+    std::cout << "Coordinator starting workers.\n";
     for (uint32_t i = 1; i < 5; i++) {
-      ACE_TCHAR cmdline[2048] = {0};
-      char *profilerCmd = ACE_OS::getenv("PROFILERCMD");
-      if (profilerCmd != nullptr && profilerCmd[0] != '$' &&
-          profilerCmd[0] != '\0') {
-        // replace %d's in profilerCmd with PID and worker ID
-        char cmdbuf[2048] = {0};
-        ACE_OS::sprintf(cmdbuf, profilerCmd, ACE_OS::gettimeofday().msec(),
-                        g_coordinatorPid, i);
-        ACE_OS::sprintf(cmdline, "%s %s -s%d -m%d", cmdbuf, g_programName, i,
-                        g_coordinatorPid);
-      } else {
-        ACE_OS::sprintf(cmdline, "%s -s%d -m%d", g_programName, i,
-                        g_coordinatorPid);
-      }
-      fprintf(stdout, "%s\n", cmdline);
+      std::string cmdline;
+      cmdline = g_programName + " -s" + std::to_string(i) + " -m" +
+                std::to_string(g_coordinatorPid);
+      std::cout << cmdline.c_str() << "\n";
       m_workers[i - 1] = new TestProcess(cmdline, i);
     }
-    fflush(stdout);
+    std::cout << std::flush;
     // start each of the workers...
     for (uint32_t j = 1; j < 5; j++) {
-      m_workers[j - 1]->doWork();
-      ACE_OS::sleep(2);  // do not increase this to avoid precheckin runs taking
-                         // much longer.
+      m_workers[j - 1]->start();
+      std::this_thread::sleep_for(
+          std::chrono::seconds(2));  // do not increase this to avoid precheckin
+                                     // runs taking much longer.
     }
   }
 
   ~TestDriver() {
-    // kill off any children that have not yet terminated.
-    for (uint32_t i = 1; i < 5; i++) {
-      if (m_workers[i - 1]->running() == 1) {
-        delete m_workers[i - 1];  // worker destructor should terminate process.
-      }
+    for (uint32_t i = 0; i < TestState::WORKER_COUNT;) {
+      auto worker = m_workers[i++];
+      worker->stop();
+      delete worker;
     }
+
     dunit::Dunit::close();
-#ifdef SOLARIS_USE_BB
-    delete m_bbNamingContextServer;
-    m_bbNamingContextServer = nullptr;
-#endif
   }
 
   int begin() {
-    fprintf(stdout, "Coordinator started with pid %d\n", ACE_OS::getpid());
-    fflush(stdout);
+    std::cout << "Coordinator started with pid "
+              << boost::this_process::get_id() << "\n"
+              << std::flush;
     waitForReady();
     // dispatch task...
 
     int nextWorker;
+    auto state = DUNIT->getState();
     while ((nextWorker = TaskQueues::getWorkerId()) != 0) {
       WorkerId sId(nextWorker);
-      DUNIT->setWorkerState(sId, WORKER_STATE_SCHEDULED);
-      fprintf(stdout, "Set next process to %s\n", sId.getIdName());
-      fflush(stdout);
-      DUNIT->setNextWorker(sId);
+      state->setWorkerState(nextWorker, WORKER_STATE_SCHEDULED);
+      std::cout << "Set next process to " << sId.getIdName() << "\n"
+                << std::flush;
+
+      state->setNextWorker(nextWorker);
       waitForCompletion(sId);
       // check special conditions.
-      if (DUNIT->getFailed()) {
-        DUNIT->setMustQuit();
+      if (state->failed()) {
+        state->terminate();
         waitForDone();
         return 1;
       }
     }
 
     // end all work..
-    DUNIT->setMustQuit();
+    state->terminate();
     waitForDone();
     return 0;
   }
 
   /** wait for an individual worker to finish a task. */
   void waitForCompletion(WorkerId &sId) {
-    int secs = DUNIT->getWorkerTimeout(sId);
-    DUNIT->setWorkerTimeout(sId, TASK_TIMEOUT);
-    if (secs <= 0) secs = TASK_TIMEOUT;
-    fprintf(stdout, "Waiting %d seconds for %s to finish task.\n", secs,
-            sId.getIdName());
-    fflush(stdout);
-    ACE_Time_Value end = ACE_OS::gettimeofday();
-    ACE_Time_Value offset(secs, 0);
-    end += offset;
-    while (DUNIT->getWorkerState(sId) != WORKER_STATE_TASK_COMPLETE) {
+    auto id = sId.getId();
+    auto state = DUNIT->getState();
+
+    int secs = state->getWorkerTimeout(id);
+    state->setWorkerTimeout(id, TASK_TIMEOUT);
+    if (secs <= 0) {
+      secs = TASK_TIMEOUT;
+    }
+
+    std::cout << "Waiting " << secs << " seconds for " << sId.getIdName()
+              << " to finish task.\n"
+              << std::flush;
+    auto end = std::chrono::steady_clock::now() + std::chrono::seconds{secs};
+    while (state->getWorkerState(id) != WORKER_STATE_TASK_COMPLETE) {
       // sleep a bit..
-      if (DUNIT->getFailed()) return;
-      ACE_Time_Value sleepTime;
-      sleepTime.msec(100);
-      ACE_OS::sleep(sleepTime);
+      if (state->failed()) {
+        return;
+      }
+
+      std::this_thread::sleep_for(std::chrono::milliseconds{100});
       checkWorkerDeath();
-      ACE_Time_Value now = ACE_OS::gettimeofday();
+      auto now = std::chrono::steady_clock::now();
       if (now >= end) {
         handleTimeout(sId);
         break;
@@ -629,46 +501,55 @@
   }
 
   void handleTimeout() {
-    fprintf(stdout, "Error: Timed out waiting for all workers to be ready.\n");
-    fflush(stdout);
-    DUNIT->setMustQuit();
-    DUNIT->setFailed();
+    std::cout << "Error: Timed out waiting for all workers to be ready.\n"
+              << std::flush;
+
+    auto state = DUNIT->getState();
+    state->terminate();
+    state->fail();
   }
 
   void handleTimeout(WorkerId &sId) {
-    fprintf(stdout, "Error: Timed out waiting for %s to finish task.\n",
-            sId.getIdName());
-    fflush(stdout);
-    DUNIT->setMustQuit();
-    DUNIT->setFailed();
+    std::cout << "Error: Timed out waiting for " << sId.getIdName()
+              << " to finish task.\n"
+              << std::flush;
+
+    auto state = DUNIT->getState();
+    state->terminate();
+    state->fail();
   }
 
-  /** wait for all workers to be done initializing. */
+  /** wait for all workers
+   * to be done initializing. */
   void waitForReady() {
-    fprintf(stdout, "Waiting %d seconds for all workers to be ready.\n",
-            TASK_TIMEOUT);
-    fflush(stdout);
-    ACE_Time_Value end = ACE_OS::gettimeofday();
-    ACE_Time_Value offset(TASK_TIMEOUT, 0);
-    end += offset;
+    auto state = DUNIT->getState();
+    std::cout << "Waiting " << TASK_TIMEOUT
+              << " seconds for all workers to be ready.\n"
+              << std::flush;
+
+    auto end =
+        std::chrono::steady_clock::now() + std::chrono::seconds{TASK_TIMEOUT};
+
     uint32_t readyCount = 0;
-    while (readyCount < 4) {
-      fprintf(stdout, "Ready Count: %d\n", readyCount);
-      fflush(stdout);
-      if (DUNIT->getFailed()) return;
-      // sleep a bit..
-      ACE_Time_Value sleepTime(1);
-      //      sleepTime.msec( 10 );
-      ACE_OS::sleep(sleepTime);
+    while (readyCount < TestState::WORKER_COUNT) {
+      std::cout << "Ready Count: " << readyCount << "\n" << std::flush;
+
+      if (state->failed()) {
+        return;
+      }
+
+      std::this_thread::sleep_for(std::chrono::seconds{1});
+
       readyCount = 0;
       for (uint32_t i = 1; i < 5; i++) {
-        int state = DUNIT->getWorkerState(WorkerId(i));
-        if (state == WORKER_STATE_READY) {
-          readyCount++;
+        int status = state->getWorkerState(i);
+        if (status == WORKER_STATE_READY) {
+          ++readyCount;
         }
       }
+
       checkWorkerDeath();
-      ACE_Time_Value now = ACE_OS::gettimeofday();
+      auto now = std::chrono::steady_clock::now();
       if (now >= end) {
         handleTimeout();
         break;
@@ -678,27 +559,27 @@
 
   /** wait for all workers to be destroyed. */
   void waitForDone() {
-    fprintf(stdout, "Waiting %d seconds for all workers to complete.\n",
-            TASK_TIMEOUT);
-    fflush(stdout);
-    ACE_Time_Value end = ACE_OS::gettimeofday();
-    ACE_Time_Value offset(TASK_TIMEOUT, 0);
-    end += offset;
+    auto state = DUNIT->getState();
+    std::cout << "Waiting " << TASK_TIMEOUT
+              << " seconds for all workers to complete.\n"
+              << std::flush;
+
     uint32_t doneCount = 0;
-    while (doneCount < 4) {
+    auto end =
+        std::chrono::steady_clock::now() + std::chrono::seconds{TASK_TIMEOUT};
+
+    while (doneCount < TestState::WORKER_COUNT) {
       // if ( DUNIT->getFailed() ) return;
       // sleep a bit..
-      ACE_Time_Value sleepTime;
-      sleepTime.msec(100);
-      ACE_OS::sleep(sleepTime);
+      std::this_thread::sleep_for(std::chrono::milliseconds{100});
       doneCount = 0;
       for (uint32_t i = 1; i < 5; i++) {
-        int state = DUNIT->getWorkerState(WorkerId(i));
-        if (state == WORKER_STATE_DONE) {
-          doneCount++;
+        int status = state->getWorkerState(i);
+        if (status == WORKER_STATE_DONE) {
+          ++doneCount;
         }
       }
-      ACE_Time_Value now = ACE_OS::gettimeofday();
+      auto now = std::chrono::steady_clock::now();
       if (now >= end) {
         handleTimeout();
         break;
@@ -709,14 +590,16 @@
   /** test to see that all the worker processes are still around, or throw
       a TestException so the driver doesn't get hung. */
   void checkWorkerDeath() {
-    for (uint32_t i = 0; i < 4; i++) {
+    auto state = DUNIT->getState();
+    for (uint32_t i = 0; i < TestState::WORKER_COUNT; i++) {
       if (!m_workers[i]->running()) {
-        char msg[1000] = {0};
-        sprintf(msg, "Error: Worker %s terminated prematurely.",
-                m_workers[i]->getWorkerId().getIdName());
+        auto msg = std::string("Error: Worker ") +
+                   m_workers[i]->getWorkerId().getIdName() +
+                   " terminated prematurely";
         LOG(msg);
-        DUNIT->setFailed();
-        DUNIT->setMustQuit();
+
+        state->fail();
+        state->terminate();
         FAIL(msg);
       }
     }
@@ -732,38 +615,39 @@
 
   explicit TestWorker(int id) : m_sId(id) {
     procWorkerId = new WorkerId(id);
-    dunit::Dunit::init();
-    DUNIT->setWorkerState(m_sId, WORKER_STATE_READY);
+    dunit::Dunit::init(false);
+    DUNIT->getState()->setWorkerState(m_sId.getId(), WORKER_STATE_READY);
+    std::clog << "Started worker " << id << std::endl;
   }
 
   ~TestWorker() {
-    DUNIT->setWorkerState(m_sId, WORKER_STATE_DONE);
+    DUNIT->getState()->setWorkerState(m_sId.getId(), WORKER_STATE_DONE);
     dunit::Dunit::close();
   }
 
   void begin() {
-    fprintf(stdout, "Worker %s started with pid %d\n", m_sId.getIdName(),
-            ACE_OS::getpid());
-    fflush(stdout);
-    WorkerId workerZero(0);
+    auto state = DUNIT->getState();
+    std::cout << "Worker " << m_sId.getIdName() << " started with pid "
+              << boost::this_process::get_id() << "\n"
+              << std::flush;
 
     // consume tasks of this workers queue, only when it is his turn..
-    while (!DUNIT->mustQuit()) {
-      if (DUNIT->getNextWorker() == m_sId.getId()) {
+    while (!state->terminated()) {
+      if (state->getNextWorker() == m_sId.getId()) {
         // set next worker to zero so I don't accidently run twice.
-        DUNIT->setNextWorker(workerZero);
+        state->setNextWorker(0);
         // do next task...
         Task *task = TaskQueues::getTask(m_sId);
         // perform task.
         if (task != nullptr) {
-          DUNIT->setWorkerState(m_sId, WORKER_STATE_TASK_ACTIVE);
+          state->setWorkerState(m_sId.getId(), WORKER_STATE_TASK_ACTIVE);
           try {
             task->doTask();
             if (task->m_isHeapAllocated) {
               delete task;
             }
             fflush(stdout);
-            DUNIT->setWorkerState(m_sId, WORKER_STATE_TASK_COMPLETE);
+            state->setWorkerState(m_sId.getId(), WORKER_STATE_TASK_COMPLETE);
           } catch (TestException te) {
             if (task->m_isHeapAllocated) {
               delete task;
@@ -781,16 +665,17 @@
           }
         }
       }
-      ACE_Time_Value sleepTime;
-      sleepTime.msec(100);
-      ACE_OS::sleep(sleepTime);
+
+      std::this_thread::sleep_for(std::chrono::milliseconds{100});
     }
   }
 
   void handleError() {
-    DUNIT->setFailed();
-    DUNIT->setMustQuit();
-    DUNIT->setWorkerState(m_sId, WORKER_STATE_TASK_COMPLETE);
+    auto state = DUNIT->getState();
+
+    state->fail();
+    state->terminate();
+    state->setWorkerState(m_sId.getId(), WORKER_STATE_TASK_COMPLETE);
   }
 };
 
@@ -798,111 +683,111 @@
 
 void sleep(int millis) {
   if (millis == 0) {
-    ACE_OS::thr_yield();
+    std::this_thread::yield();
   } else {
-    ACE_Time_Value sleepTime;
-    sleepTime.msec(millis);
-    ACE_OS::sleep(sleepTime);
+    std::this_thread::sleep_for(std::chrono::milliseconds{millis});
   }
 }
 
 void logCoordinator(std::string s, int lineno, const char * /*filename*/) {
-  char buf[128] = {0};
-  dunit::getTimeStr(buf, sizeof(buf));
+  using std::chrono::duration_cast;
+  using std::chrono::microseconds;
+  using std::chrono::system_clock;
 
-  fprintf(stdout, "[TEST coordinator:pid(%d)] %s at line: %d\n",
-          ACE_OS::getpid(), s.c_str(), lineno);
-  fflush(stdout);
+  auto now = system_clock::now();
+  auto in_time_t = system_clock::to_time_t(now);
+  auto localtime = std::localtime(&in_time_t);
+  auto usec =
+      duration_cast<microseconds>(now.time_since_epoch()).count() % 1000;
+
+  std::cout << "[TEST " << std::put_time(localtime, "%Y/%m/%d %H:%M:%S") << '.'
+            << std::setfill('0') << std::setw(6) << usec << std::setw(0)
+            << " coordinator:pid(" << boost::this_process::get_id() << ")] "
+            << s << " at line: " << lineno << std::endl
+            << std::flush;
 }
 
 // log a message and print the worker id as well.. used by fw_helper with no
 // worker id.
 void log(std::string s, int lineno, const char * /*filename*/, int /*id*/) {
-  char buf[128] = {0};
-  dunit::getTimeStr(buf, sizeof(buf));
+  using std::chrono::duration_cast;
+  using std::chrono::microseconds;
+  using std::chrono::system_clock;
 
-  fprintf(stdout, "[TEST 0:pid(%d)] %s at line: %d\n", ACE_OS::getpid(),
-          s.c_str(), lineno);
-  fflush(stdout);
+  auto now = system_clock::now();
+  auto in_time_t = system_clock::to_time_t(now);
+  auto localtime = std::localtime(&in_time_t);
+  auto usec =
+      duration_cast<microseconds>(now.time_since_epoch()).count() % 1000;
+
+  std::cout << "[TEST " << std::put_time(localtime, "%Y/%m/%d %H:%M:%S") << '.'
+            << std::setfill('0') << std::setw(6) << usec << std::setw(0)
+            << " 0:pid(" << boost::this_process::get_id() << ")] " << s
+            << " at line: " << lineno << std::endl
+            << std::flush;
 }
 
 // log a message and print the worker id as well..
 void log(std::string s, int lineno, const char * /*filename*/) {
-  char buf[128] = {0};
-  dunit::getTimeStr(buf, sizeof(buf));
+  using std::chrono::duration_cast;
+  using std::chrono::microseconds;
+  using std::chrono::system_clock;
 
-  fprintf(stdout, "[TEST %s %s:pid(%d)] %s at line: %d\n", buf,
-          (dunit::TestWorker::procWorkerId
-               ? dunit::TestWorker::procWorkerId->getIdName()
-               : "coordinator"),
-          ACE_OS::getpid(), s.c_str(), lineno);
-  fflush(stdout);
+  auto now = system_clock::now();
+  auto in_time_t = system_clock::to_time_t(now);
+  auto localtime = std::localtime(&in_time_t);
+  auto usec =
+      duration_cast<microseconds>(now.time_since_epoch()).count() % 1000;
+
+  std::cout << "[TEST " << std::put_time(localtime, "%Y/%m/%d %H:%M:%S") << '.'
+            << std::setfill('0') << std::setw(6) << usec << std::setw(0) << ' '
+            << (dunit::TestWorker::procWorkerId
+                    ? dunit::TestWorker::procWorkerId->getIdName()
+                    : "coordinator")
+            << ":pid(" << boost::this_process::get_id() << ")] " << s
+            << " at line: " << lineno << std::endl
+            << std::flush;
 }
 
-void cleanup() { gClientCleanup.callClientCleanup(); }
+int dmain(int argc, char *argv[]) {
+  using apache::geode::client::Utils;
 
-int dmain(int argc, ACE_TCHAR *argv[]) {
 #ifdef USE_SMARTHEAP
   MemRegisterTask();
 #endif
+
   setupCRTOutput();
-  TimeBomb tb(&cleanup);
-  // tb->arm(); // leak this on purpose.
+  auto timebomb = std::chrono::seconds{std::stoi(Utils::getEnv("TIMEBOMB"))};
+  TimeBomb tb(timebomb, []() { gClientCleanup.trigger(); });
+  tb.arm();
+
+  g_programName = argv[0];
+  bpo::options_description generic("Options");
+  auto &&options = generic.add_options();
+  options("worker,s", bpo::value<int>(), "Set worker ID");
+  options("coordinator,m", bpo::value<int>(), "Set coordinator PID");
+  options("help", "Shows this help");
+
+  bpo::variables_map vm;
+  bpo::store(bpo::parse_command_line(argc, argv, generic), vm);
+  bpo::notify(vm);
+
+  int result = 0;
+  int workerId = 0;
+
+  auto iter = vm.find("worker");
+  if (iter != vm.end()) {
+    workerId = iter->second.as<int>();
+  }
+
+  iter = vm.find("coordinator");
+  if (iter != vm.end()) {
+    g_coordinatorPid = iter->second.as<int>();
+  } else {
+    g_coordinatorPid = boost::this_process::get_id();
+  }
+
   try {
-    g_programName = new ACE_TCHAR[2048];
-    ACE_OS::strncpy(g_programName, argv[0], 2048);
-
-    const ACE_TCHAR options[] = ACE_TEXT("s:m:");
-    ACE_Get_Opt cmd_opts(argc, argv, options);
-
-    int result = 0;
-
-    int workerId = 0;
-    int option = 0;
-    while ((option = cmd_opts()) != EOF) {
-      switch (option) {
-        case 's':
-          workerId = ACE_OS::atoi(cmd_opts.opt_arg());
-          fprintf(stdout, "Using process id: %d\n", workerId);
-          fflush(stdout);
-          break;
-        case 'm':
-          g_coordinatorPid = ACE_OS::atoi(cmd_opts.opt_arg());
-          fprintf(stdout, "Using coordinator id: %d\n", g_coordinatorPid);
-          fflush(stdout);
-          break;
-        default:
-          fprintf(stdout, "ignoring option: %s  with value %s\n",
-                  cmd_opts.last_option(), cmd_opts.opt_arg());
-          fflush(stdout);
-      }
-    }
-
-    //  perf::NamingServiceThread nsvc( 12045 );
-    //  nsvc.activate( THR_NEW_LWP | THR_DETACHED | THR_DAEMON, 1 );
-    //  dunit::Dunit::init( true );
-    //
-    //  for ( int i = cmd_opts.opt_ind(); i < argc; i++ ) {
-    //    char buf[1024], * name, * value;
-    //    strcpy( buf, argv[i] );
-    //    name = &buf[0];
-    //    value = strchr( name, '=' );
-    //    if ( value != 0 ) {
-    //      *value = '\0';
-    //      value++;
-    //      // add to context
-    //      dunit::globals()->rebind( name, value );
-    //    }
-    //  }
-
-    // record the coordinator pid if it wasn't passed to us on the command line.
-    // the TestDriver will pass this to the child processes.
-    // currently this is used for giving a unique per run id to shared
-    // resources.
-    if (g_coordinatorPid == 0) {
-      g_coordinatorPid = ACE_OS::getpid();
-    }
-
     if (workerId > 0) {
       dunit::TestWorker worker(workerId);
       worker.begin();
@@ -910,278 +795,39 @@
       dunit::TestDriver tdriver;
       result = tdriver.begin();
       if (result == 0) {
-        printf("#### All Tasks completed successfully. ####\n");
+        std::cout << "#### All Tasks completed successfully. ####\n";
       } else {
-        printf("#### FAILED. ####\n");
+        std::cout << "#### FAILED. ####\n";
       }
 
       fflush(stdout);
     }
-    printf("final worker id %d, result %d\n", workerId, result);
-    printf("before calling cleanup %d \n", workerId);
-    gClientCleanup.callClientCleanup();
-    printf("after calling cleanup\n");
-    return result;
 
+    std::cout << "final worker id " << workerId << ", result " << result
+              << "\n";
+    std::cout << "before calling cleanup " << workerId << "\n";
+
+    gClientCleanup.trigger();
+    std::cout << "after calling cleanup\n";
+    return result;
   } catch (dunit::TestException &te) {
     te.print();
   } catch (apache::geode::client::testframework::FwkException &fe) {
-    printf("Exception: %s\n", fe.what());
-    fflush(stdout);
+    std::cout << "Exception: " << fe.what() << "\n" << std::flush;
+  } catch (std::exception &ex) {
+    std::cout << "Exception: system exception reached main: " << ex.what()
+              << ".\n"
+              << std::flush;
   } catch (...) {
-    printf("Exception: unhandled/unidentified exception reached main.\n");
-    fflush(stdout);
-    // return 1;
+    std::cout << "Exception: unhandled/unidentified exception reached main.\n"
+              << std::flush;
   }
-  gClientCleanup.callClientCleanup();
+
+  gClientCleanup.trigger();
   return 1;
 }
 
 /** entry point for test code modules to access the naming service. */
-NamingContext *globals() { return DUNIT->globals(); }
+bip::managed_shared_memory &globals() { return DUNIT->getManagedState(); }
 
 }  // namespace dunit
-
-namespace perf {
-
-TimeStamp::TimeStamp(int64_t msec) : m_msec(msec) {}
-
-TimeStamp::TimeStamp() {
-  ACE_Time_Value tmp = ACE_OS::gettimeofday();
-  m_msec = tmp.msec();
-}
-
-TimeStamp::TimeStamp(const TimeStamp &other) : m_msec(other.m_msec) {}
-
-TimeStamp &TimeStamp::operator=(const TimeStamp &other) {
-  m_msec = other.m_msec;
-  return *this;
-}
-
-TimeStamp::~TimeStamp() {}
-
-int64_t TimeStamp::msec() const { return m_msec; }
-
-void TimeStamp::msec(int64_t t) { m_msec = t; }
-
-Record::Record(std::string testName, int64_t ops, const TimeStamp &start,
-               const TimeStamp &stop)
-    : m_testName(testName),
-      m_operations(ops),
-      m_startTime(start),
-      m_stopTime(stop) {}
-
-Record::Record()
-    : m_testName(""), m_operations(0), m_startTime(0), m_stopTime(0) {}
-
-Record::Record(const Record &other)
-    : m_testName(other.m_testName),
-      m_operations(other.m_operations),
-      m_startTime(other.m_startTime),
-      m_stopTime(other.m_stopTime) {}
-
-Record &Record::operator=(const Record &other) {
-  m_testName = other.m_testName;
-  m_operations = other.m_operations;
-  m_startTime = other.m_startTime;
-  m_stopTime = other.m_stopTime;
-  return *this;
-}
-
-void Record::write(apache::geode::client::DataOutput &output) {
-  output.writeString(m_testName);
-  output.writeInt(m_operations);
-  output.writeInt(m_startTime.msec());
-  output.writeInt(m_stopTime.msec());
-}
-
-void Record::read(apache::geode::client::DataInput &input) {
-  m_testName = input.readString();
-  m_operations = input.readInt64();
-  m_startTime.msec(input.readInt64());
-  m_stopTime.msec(input.readInt64());
-}
-
-Record::~Record() {}
-
-int Record::elapsed() {
-  return static_cast<int>(m_stopTime.msec() - m_startTime.msec());
-}
-
-int Record::perSec() {
-  return static_cast<int>(((static_cast<double>(1000) * m_operations) /
-                           static_cast<double>(elapsed())) +
-                          0.5);
-}
-
-std::string Record::asString() {
-  std::string tmp = m_testName;
-  char *buf = new char[1000];
-  sprintf(buf, " -- %d ops/sec, ", perSec());
-  tmp += buf;
-  sprintf(buf, "%d ops, ", static_cast<int>(m_operations));
-  tmp += buf;
-  sprintf(buf, "%d millis", elapsed());
-  tmp += buf;
-  return tmp;
-}
-
-PerfSuite::PerfSuite(const char *suiteName) : m_suiteName(suiteName) {}
-
-void PerfSuite::addRecord(std::string testName, int64_t ops,
-                          const TimeStamp &start, const TimeStamp &stop) {
-  Record tmp(testName, ops, start, stop);
-  m_records[testName] = tmp;
-  fprintf(stdout, "[PerfSuite] %s\n", tmp.asString().c_str());
-  fflush(stdout);
-}
-
-/** create a file in cwd, named "<suite>_results.<host>" */
-void PerfSuite::save() {
-  /* Currently having trouble with windows... not useful until the compare
-     function is written anyway...
-
-  apache::geode::client::DataOutput output;
-  output.writeASCII( m_suiteName.c_str(), m_suiteName.length() );
-
-  char hname[100];
-  ACE_OS::hostname( hname, 100 );
-  std::string fname = m_suiteName + "_results." + hname;
-
-  output.writeASCII( hname );
-
-  for( RecordMap::iterator iter = m_records.begin(); iter != m_records.end();
-  iter++ ) {
-    Record record = (*iter).second;
-    record.write( output );
-  }
-  fprintf( stdout, "[PerfSuite] finished serializing results.\n" );
-  fflush( stdout );
-
-  fprintf( stdout, "[PerfSuite] writing results to %s\n", fname.c_str() );
-  FILE* of = ACE_OS::fopen( fname.c_str(), "a+" );
-  if ( of == 0 ) {
-    FAIL( "failed to open result file handle for perfSuite." );
-  }
-  LOG( "opened perf output file for a+" );
-  uint32_t len = 0;
-  char* buf = (char*) output.getBuffer( &len );
-  LOG( "got buffer." );
-  ACE_OS::fwrite( buf, len, 1, of );
-  LOG( "wrote buffer" );
-  ACE_OS::fflush( of );
-  LOG( "flushed of" );
-  ACE_OS::fclose( of );
-  LOG( "closed of" );
-  fprintf( stdout, "[PerfSuite] finished saving results file %s\n",
-  fname.c_str() );
-  fflush( stdout );
-  */
-}
-
-/** load data saved in $ENV{'baselines'} named "<suite>_baseline.<host>" */
-void PerfSuite::compare() {
-  char hname[100] = {0};
-  ACE_OS::hostname(hname, 100);
-  std::string fname = m_suiteName + "_baseline." + hname;
-}
-
-ThreadLauncher::ThreadLauncher(int thrCount, Thread &thr)
-    : m_thrCount(thrCount),
-      m_initSemaphore((-1 * thrCount) + 1),
-      m_startSemaphore(0),
-      m_stopSemaphore((-1 * thrCount) + 1),
-      m_cleanSemaphore(0),
-      m_termSemaphore((-1 * thrCount) + 1),
-      m_startTime(nullptr),
-      m_stopTime(nullptr),
-      m_threadDef(thr) {
-  m_threadDef.init(this);
-}
-
-void ThreadLauncher::go() {
-#ifdef WIN32
-  int thrAttrs = THR_NEW_LWP | THR_JOINABLE;
-#else
-  int thrAttrs = THR_NEW_LWP | THR_JOINABLE | THR_INHERIT_SCHED;
-#endif
-  int res = m_threadDef.activate(thrAttrs, m_thrCount);
-  ASSERT(res == 0, "Failed to start threads properly");
-  m_initSemaphore.acquire();
-  LOG("[ThreadLauncher] all threads ready.");
-  m_startTime = new TimeStamp();
-  m_startSemaphore.release(m_thrCount);
-  m_stopSemaphore.acquire();
-  m_stopTime = new TimeStamp();
-  m_cleanSemaphore.release(m_thrCount);
-  m_termSemaphore.acquire();
-  LOG("[ThreadLauncher] joining threads.");
-  m_threadDef.wait();
-  LOG("[ThreadLauncher] all threads stopped.");
-}
-
-ThreadLauncher::~ThreadLauncher() {
-  if (m_startTime) {
-    delete m_startTime;
-  }
-  if (m_stopTime) {
-    delete m_stopTime;
-  }
-}
-
-Thread::Thread() : ACE_Task_Base(), m_launcher(nullptr), m_used(false) {}
-
-Thread::~Thread() {}
-
-int Thread::svc() {
-  m_used = true;
-  int res = 0;
-  try {
-    setup();  // do per thread setup
-  } catch (...) {
-    LOG("[Thread] unknown exception thrown in setup().");
-    res = 1;
-  }
-  m_launcher->initSemaphore().release();
-  m_launcher->startSemaphore().acquire();
-  try {
-    perftask();  // do measured iterations
-  } catch (...) {
-    LOG("[Thread] unknown exception thrown in perftask().");
-    res = 2;
-  }
-  m_launcher->stopSemaphore().release();
-  m_launcher->cleanSemaphore().acquire();
-  try {
-    cleanup();  // cleanup after thread.
-  } catch (...) {
-    LOG("[Thread] unknown exception thrown in cleanup()");
-    res = 3;
-  }
-  m_launcher->termSemaphore().release();
-  return res;
-}
-
-Semaphore::Semaphore(int count) : m_mutex(), m_cond(m_mutex), m_count(count) {}
-
-Semaphore::~Semaphore() {}
-
-void Semaphore::acquire(int t) {
-  ACE_Guard<ACE_Thread_Mutex> _guard(m_mutex);
-
-  while (m_count < t) {
-    m_cond.wait();
-  }
-  m_count -= t;
-}
-
-void Semaphore::release(int t) {
-  ACE_Guard<ACE_Thread_Mutex> _guard(m_mutex);
-
-  m_count += t;
-  if (m_count > 0) {
-    m_cond.broadcast();
-  }
-}
-
-}  // namespace perf
diff --git a/cppcache/integration-test/fw_dunit.hpp b/cppcache/integration-test/fw_dunit.hpp
index 59904f8..13c9fe2 100644
--- a/cppcache/integration-test/fw_dunit.hpp
+++ b/cppcache/integration-test/fw_dunit.hpp
@@ -115,23 +115,29 @@
 #endif
 #endif
 
+#include <iostream>
 #include <string>
 
-#include <ace/ACE.h>
-#include <signal.h>
+#include <geode/Exception.hpp>
 
-#define ASSERT(x, y)                                   \
-  do {                                                 \
-  if (!(x)) {                                          \
-    throw dunit::TestException(y, __LINE__, __FILE__); \
-  }                                                    \
-  } while(false)
-#define XASSERT(x)                                      \
-  do {                                                  \
-  if (!(x)) {                                           \
-    throw dunit::TestException(#x, __LINE__, __FILE__); \
-  }                                                     \
-  } while(false)
+#include <boost/interprocess/managed_shared_memory.hpp>
+
+#include <signal.h>
+#include "ClientCleanup.hpp"
+#include "TimeBomb.hpp"
+
+#define ASSERT(x, y)                                     \
+  do {                                                   \
+    if (!(x)) {                                          \
+      throw dunit::TestException(y, __LINE__, __FILE__); \
+    }                                                    \
+  } while (false)
+#define XASSERT(x)                                        \
+  do {                                                    \
+    if (!(x)) {                                           \
+      throw dunit::TestException(#x, __LINE__, __FILE__); \
+    }                                                     \
+  } while (false)
 #define FAIL(y) throw dunit::TestException(y, __LINE__, __FILE__)
 #define LOG(y) dunit::log(y, __LINE__, __FILE__)
 #define LOGCOORDINATOR(y) dunit::logCoordinator(y, __LINE__, __FILE__)
@@ -155,7 +161,7 @@
     DCLASSNAME(y)() { init(x); }                               \
                                                                \
    public:                                                     \
-    virtual void doTask() {                                    \
+    void doTask() override {                                   \
       static const char* fwtest_Name = DTASKDESC(y, __LINE__); \
       try {
 // Close the class definition produced by DUNIT_TASK macro.
@@ -200,10 +206,10 @@
 #define DUNIT_TASK_DEFINITION(x, y)                            \
   class DCLASSDEF(y) : virtual public dunit::Task {            \
    public:                                                     \
-    DCLASSDEF(y)() { init(x, true); }                                \
+    DCLASSDEF(y)() { init(x, true); }                          \
                                                                \
    public:                                                     \
-    virtual void doTask() {                                    \
+    void doTask() override {                                   \
       static const char* fwtest_Name = DTASKDESC(y, __LINE__); \
       try {
 #define END_TASK_DEFINITION                       \
@@ -224,7 +230,9 @@
   }                                               \
   }                                               \
   ;
-#define CALL_TASK(y); DCLASSDEF(y) * DVARNAME(y) = new DCLASSDEF(y)()
+#define CALL_TASK(y) \
+  ;                  \
+  DCLASSDEF(y) * DVARNAME(y) = new DCLASSDEF(y)()
 
 #define DUNIT_MAIN         \
   class DCLASSNAME(Main) { \
@@ -255,7 +263,7 @@
 #define s1p2 2
 #define s2p1 3
 #define s2p2 4
-
+extern ClientCleanup gClientCleanup;
 namespace dunit {
 
 void logCoordinator(std::string s, int lineno, const char* filename);
@@ -277,7 +285,7 @@
   bool m_isHeapAllocated;
 
   Task() {}
-  virtual ~Task() { }
+  virtual ~Task() {}
 
   /** register task with worker. */
   void init(int sId);
@@ -292,47 +300,7 @@
   std::string typeName();
 };
 
-/** Shared naming context for storing ints and strings between processes.
- *  To acquire the naming context, use the globals() function which
- *  returns a pointer for the naming context.
- */
-class NamingContext {
- public:
-  /**
-   * Share a string value, return -1 if there is a failure to store value,
-   * otherwise returns 0.
-   */
-  virtual int rebind(const char* key, const char* value) = 0;
-
-  /**
-   * Share an int value, return -1 if there is a failure to store value,
-   * otherwise returns 0.
-   */
-  virtual int rebind(const char* key, int value) = 0;
-
-  /**
-   * retreive a value by key, storing the result in the users buf. If the key
-   * is not found, the buf will contain the empty string "". Make sure the
-   * buffer is big enough to hold whatever has have bound.
-   */
-  virtual void getValue(const char* key, char* buf, size_t sizeOfBuf) = 0;
-
-  /**
-   * return the value by key, as an int using the string to int conversion
-   * rules of atoi.
-   */
-  virtual int getIntValue(const char* key) = 0;
-
-  /** dump the entire context in LOG messages. */
-  virtual void dump() = 0;
-
-  virtual ~NamingContext() noexcept = default;
-};
-
-extern "C" {
-
-NamingContext* globals();
-}
+extern boost::interprocess::managed_shared_memory& globals();
 
 /**
  * Exception type to use when test framework has trouble or if ASSERT and FAIL
@@ -343,19 +311,17 @@
  */
 class TestException {
  public:
-  TestException(const char* msg, int lineno, const char* filename)
-      : m_message(const_cast<char*>(msg)),
-        m_lineno(lineno),
-        m_filename(const_cast<char*>(filename)) {}
+  TestException(const std::string& msg, int lineno, const std::string& filename)
+      : m_message(msg), m_lineno(lineno), m_filename(filename) {}
 
   void print() {
-    fprintf(stdout, "#### TestException: %s in %s at line %d\n",
-            m_message.c_str(), m_filename, m_lineno);
-    fflush(stdout);
+    std::cout << "#### TestException: " << m_message << " in " << m_filename
+              << " at line " << m_lineno << "\n"
+              << std::flush;
   }
   std::string m_message;
   int m_lineno;
-  char* m_filename;
+  std::string m_filename;
 };
 
 int dmain(int argc, char* argv[]);
@@ -364,11 +330,9 @@
 
 #ifndef __DUNIT_NO_MAIN__
 
-int ACE_TMAIN(int argc, ACE_TCHAR* argv[]) { return dunit::dmain(argc, argv); }
+int main(int argc, char* argv[]) { return dunit::dmain(argc, argv); }
 
 #endif  // __DUNIT_NO_MAIN__
 
-#include "fw_perf.hpp"
-
 namespace test {}  // namespace test
 #endif             // GEODE_INTEGRATION_TEST_FW_DUNIT_H_
diff --git a/cppcache/integration-test/fw_helper.hpp b/cppcache/integration-test/fw_helper.hpp
index 11d0ace..9967af2 100644
--- a/cppcache/integration-test/fw_helper.hpp
+++ b/cppcache/integration-test/fw_helper.hpp
@@ -82,14 +82,13 @@
 #endif
 #endif
 
-#include <typeinfo>
-#include <list>
-#include <string>
-#include <sstream>
 #include <cstdio>
+#include <iostream>
+#include <list>
+#include <sstream>
+#include <string>
+#include <typeinfo>
 
-#include <ace/ACE.h>
-#include <ace/OS.h>
 
 #include <geode/Exception.hpp>
 
@@ -106,7 +105,7 @@
 #define ASSERT_EQ(x, y) _ASSERT_EQ(x, y, __LINE__, __FILE__)
 
 #define ASSERT_STREQ(x, y)                                            \
-  ASSERT((strcmp(x, y) == 0),                                         \
+  ASSERT(x == y,                                         \
          (std::string("Assert: " #x " == " #y ", Expected: \"") + x + \
           "\", Actual: \"" + y + "\"")                                \
              .c_str())
@@ -125,21 +124,19 @@
 
 class TestException {
  public:
-  TestException(const char* msg, int lineno, const char* filename)
-      : m_message(const_cast<char*>(msg)),
-        m_lineno(lineno),
-        m_filename(const_cast<char*>(filename)) {}
+  TestException(const std::string& msg, int lineno, const std::string& filename)
+      : m_message(msg), m_lineno(lineno), m_filename(filename) {}
 
   void print() {
-    char buf[256];
-    apache::geode::client::Log::formatLogLine(
-        buf, apache::geode::client::LogLevel::Error);
-    fprintf(stdout, "--->%sTestException: %s in %s at line %d<---\n", buf,
-            m_message.c_str(), m_filename, m_lineno);
+    std::cout << "--->"
+              << apache::geode::client::Log::formatLogLine(
+                     apache::geode::client::LogLevel::Error)
+              << "TestException: " << m_message << " in " << m_filename
+              << " at line " << m_lineno << "<---\n";
   }
   std::string m_message;
   int m_lineno;
-  char* m_filename;
+  std::string m_filename;
 };
 
 // std::list holding names of all tests that failed.
@@ -151,9 +148,9 @@
 
   virtual ~TestOp() {}
   virtual void setup() {
-    fprintf(stdout, "## running test - %s ##\n", m_name.c_str());
+    std::cout << "## running test - " << m_name << " ##\n";
   }
-  virtual void doTest() { fprintf(stdout, "do something useful.\n"); }
+  virtual void doTest() { std::cout << "do something useful.\n"; }
   void run() {
     try {
       this->setup();
@@ -162,7 +159,7 @@
       e.print();
       failed.push_back(m_name);
     } catch (apache::geode::client::Exception& ge) {
-      fprintf(stdout, "%s\n", ge.getStackTrace().c_str());
+      std::cout << ge.getStackTrace() << "\n";
       failed.push_back(m_name);
     }
   }
@@ -183,7 +180,7 @@
 void TestOp::init() {
   m_name = this->typeName();
   tests.push_back(SuiteMember(this));
-  fprintf(stdout, "Queued test[%s].\n", m_name.c_str());
+  std::cout << "Queued test[" << m_name << "].\n";
 }
 
 // main - suite trigger
@@ -203,7 +200,7 @@
   try {
     int testsRun = 0;
     int failures = 0;
-    fprintf(stdout, "Beginning test Suite.\n");
+    std::cout << "Beginning test Suite.\n";
     while (!tests.empty()) {
       SuiteMember aTest = tests.front();
       aTest.m_test->run();
@@ -212,19 +209,19 @@
     }
     while (!failed.empty()) {
       std::string name = failed.front();
-      fprintf(stdout, "test named \"%s\" failed.\n", name.c_str());
+      std::cout << "test named \"" << name << "\" failed.\n";
       failures++;
       failed.pop_front();
     }
     if (failures != 0) {
-      fprintf(stdout, "%d tests failed.\n", failures);
+      std::cout << failures << " tests failed.\n";
     }
-    fprintf(stdout, "%d tests passed.\n", (testsRun - failures));
+    std::cout << (testsRun - failures) << " tests passed.\n";
     apache::geode::client::CppCacheLibrary::closeLib();
     return failures;
   } catch (...) {
-    printf("Exception: unhandled/unidentified exception reached main.\n");
-    fflush(stdout);
+    std::cout << "Exception: unhandled/unidentified exception reached main.\n"
+              << std::flush;
   }
   return 1;
 }
@@ -236,7 +233,7 @@
     Test_##x() { init(); }                 \
                                            \
    public:                                 \
-    virtual void doTest() {                \
+    void doTest() override {               \
       static const char* fwtest_Name = #x;
 #define END_TEST(x) \
   }                 \
diff --git a/cppcache/integration-test/fw_perf.hpp b/cppcache/integration-test/fw_perf.hpp
deleted file mode 100644
index af019e6..0000000
--- a/cppcache/integration-test/fw_perf.hpp
+++ /dev/null
@@ -1,248 +0,0 @@
-#pragma once
-
-#ifndef GEODE_INTEGRATION_TEST_FW_PERF_H_
-#define GEODE_INTEGRATION_TEST_FW_PERF_H_
-
-/*
- * 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.
- */
-
-/**
-
-fw_perf.hpp provides framework macros for measuring performance,
-archiving the results, and comparing against previous archives.
-
-Steps for a performance suite:
-
-perf::PerfSuite suite( "SuiteName" );
-
-const char* name = "my operation type/test description";
-perf::TimeStamp starttime;
-... perform n operations.
-perf::TimeStamp stoptime;
-suite.addRecord( name, opcount, starttime, stoptime );
-
-suite.save( );    // will save current results to <suite>_results.<hostname>
-suite.compare( ); // will compare against the file named
-<suite>_baseline.<hostname>
-
-If no baseline file for the host is available, then an error will occur,
-recommending
-that the results be analyzed for acceptability, and checked in as the hosts
-baseline.
-
-If a baseline is found, a comparison report is generated, if the deviation is
-beyond
-established limits, a TestException will be thrown.
-
-*/
-
-#include <string>
-#include <map>
-
-#include <geode/DataOutput.hpp>
-#include <geode/DataInput.hpp>
-
-#include <ace/Task.h>
-#include <ace/Condition_T.h>
-#include <ace/Thread_Mutex.h>
-//#include "Name_Handler.h"
-
-namespace perf {
-
-class Semaphore {
- private:
-  ACE_Thread_Mutex m_mutex;
-  ACE_Condition<ACE_Thread_Mutex> m_cond;
-  volatile int m_count;
-
- public:
-  explicit Semaphore(int count);
-  ~Semaphore();
-  void acquire(int t = 1);
-  void release(int t = 1);
-
- private:
-  Semaphore();
-  Semaphore(const Semaphore& other);
-  Semaphore& operator=(const Semaphore& other);
-};
-
-class TimeStamp {
- private:
-  int64_t m_msec;
-
- public:
-  TimeStamp();
-  TimeStamp(const TimeStamp& other);
-  explicit TimeStamp(int64_t msec);
-  TimeStamp& operator=(const TimeStamp& other);
-
-  ~TimeStamp();
-
-  int64_t msec() const;
-  void msec(int64_t t);
-};
-
-class Record {
- private:
-  std::string m_testName;
-  int64_t m_operations;
-  TimeStamp m_startTime;
-  TimeStamp m_stopTime;
-
- public:
-  Record(std::string testName, int64_t ops, const TimeStamp& start,
-         const TimeStamp& stop);
-
-  Record();
-
-  Record(const Record& other);
-
-  Record& operator=(const Record& other);
-
-  void write(apache::geode::client::DataOutput& output);
-
-  void read(apache::geode::client::DataInput& input);
-
-  int elapsed();
-  int perSec();
-  std::string asString();
-
-  ~Record();
-};
-
-typedef std::map<std::string, Record> RecordMap;
-
-class PerfSuite {
- private:
-  std::string m_suiteName;
-  RecordMap m_records;
-
- public:
-  explicit PerfSuite(const char* suiteName);
-
-  void addRecord(std::string testName, int64_t ops, const TimeStamp& start,
-                 const TimeStamp& stop);
-
-  /** create a file in cwd, named "<suite>_results.<host>" */
-  void save();
-
-  /** load data saved in $ENV{'baselines'} named "<suite>_baseline.<host>"
-   *  A non-favorable comparison will throw an TestException.
-   */
-  void compare();
-};
-
-class Thread;
-
-class ThreadLauncher {
- private:
-  int m_thrCount;
-  Semaphore m_initSemaphore;
-  Semaphore m_startSemaphore;
-  Semaphore m_stopSemaphore;
-  Semaphore m_cleanSemaphore;
-  Semaphore m_termSemaphore;
-  TimeStamp* m_startTime;
-  TimeStamp* m_stopTime;
-  Thread& m_threadDef;
-
- public:
-  ThreadLauncher(int thrCount, Thread& thr);
-
-  void go();
-
-  ~ThreadLauncher();
-
-  Semaphore& initSemaphore() { return m_initSemaphore; }
-
-  Semaphore& startSemaphore() { return m_startSemaphore; }
-
-  Semaphore& stopSemaphore() { return m_stopSemaphore; }
-
-  Semaphore& cleanSemaphore() { return m_cleanSemaphore; }
-
-  Semaphore& termSemaphore() { return m_termSemaphore; }
-
-  TimeStamp startTime() { return *m_startTime; }
-
-  TimeStamp stopTime() { return *m_stopTime; }
-
- private:
-  ThreadLauncher& operator=(const ThreadLauncher& other);
-  ThreadLauncher(const ThreadLauncher& other);
-};
-
-class Thread : public ACE_Task_Base {
- private:
-  ThreadLauncher* m_launcher;
-  bool m_used;
-
- public:
-  Thread();
-  // Unhide function to prevent SunPro Warnings
-  using ACE_Shared_Object::init;
-  void init(ThreadLauncher* l) {
-    ASSERT(!m_used, "Cannot reliably reuse Thread.");
-    m_launcher = l;
-  }
-
-  ~Thread();
-
-  /** called before measurement begins. override to do per thread setup. */
-  virtual void setup() {}
-
-  /** run during measurement */
-  virtual void perftask() = 0;
-
-  /** called after measurement to clean up what might have been setup in setup..
-   */
-  virtual void cleanup() {}
-
-  virtual int svc();
-};
-
-// class NamingServiceThread
-//: public ACE_Task_Base
-//{
-//  private:
-//  uint32_t m_port;
-//
-//  void namingService()
-//  {
-//    char * argsv[2];
-//    char pbuf[32];
-//    sprintf( pbuf, "-p %d", 12321 );
-//
-//    argsv[0] = strdup( pbuf );
-//    argsv[1] = 0;
-//   auto svcObj = ACE_SVC_INVOKE( ACE_Name_Acceptor );
-//
-//    if ( svcObj->init( 1, argsv ) == -1 ) {
-//      fprintf( stdout, "Failed to construct the Naming Service." );
-//      fflush( stdout );
-//    }
-//      ACE_Reactor::run_event_loop();
-//  }
-//
-//  public:
-//  NamingServiceThread( uint32_t port ) : m_port( port ) {}
-// virtual int svc() { };//namingService(); }
-//};
-}  // namespace perf
-
-#endif  // GEODE_INTEGRATION_TEST_FW_PERF_H_
diff --git a/cppcache/integration-test/fw_spawn.hpp b/cppcache/integration-test/fw_spawn.hpp
deleted file mode 100644
index e49da7d..0000000
--- a/cppcache/integration-test/fw_spawn.hpp
+++ /dev/null
@@ -1,129 +0,0 @@
-#pragma once
-
-#ifndef GEODE_INTEGRATION_TEST_FW_SPAWN_H_
-#define GEODE_INTEGRATION_TEST_FW_SPAWN_H_
-
-/*
- * 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.
- */
-// Spawn.cpp,v 1.4 2004/01/07 22:40:16 shuston Exp
-
-// @TODO, this out this include list..
-#include <ace/OS_NS_stdio.h>
-#include <ace/OS_NS_fcntl.h>
-#include <ace/OS_NS_pwd.h>
-#include <ace/os_include/os_pwd.h>
-#include <ace/OS_NS_stdlib.h>
-#include <ace/OS_NS_string.h>
-#include <ace/OS_NS_unistd.h>
-
-#if defined(_WIN32)
-#if (FD_SETSIZE != 1024)
-++ + bad fdsetsize...
-#endif
-#endif
-
-#include <ace/Process.h>
-#include <ace/Log_Msg.h>
-
-    namespace dunit {
-
-  // Listing 1 code/ch10
-  class Manager : virtual public ACE_Process {
-   public:
-    explicit Manager(const ACE_TCHAR *program_name) : ACE_Process() {
-      ACE_OS::strncpy(programName_, program_name, sizeof(programName_));
-    }
-
-    virtual int doWork(void) {
-      // Spawn the new process; prepare() hook is called first.
-      ACE_Process_Options options;
-      pid_t pid = this->spawn(options);
-      if (pid == -1) {
-        ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT("%p\n"), ACE_TEXT("spawn")), -1);
-      }
-      return pid;
-    }
-
-    virtual int doWait(void) {
-      // Wait forever for my child to exit.
-      if (this->wait() == -1) {
-        ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT("%p\n"), ACE_TEXT("wait")), -1);
-      }
-
-      // Dump whatever happened.
-      this->dumpRun();
-      return 0;
-    }
-    // Listing 1
-
-   protected:
-    // Listing 3 code/ch10
-    virtual int dumpRun(void) {
-      if (ACE_OS::lseek(this->outputfd_, 0, SEEK_SET) == -1) {
-        ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT("%p\n"), ACE_TEXT("lseek")), -1);
-      }
-
-      char buf[1024];
-      int length = 0;
-
-      // Read the contents of the error stream written
-      // by the child and print it out.
-      while ((length = static_cast<int>(
-                  ACE_OS::read(this->outputfd_, buf, sizeof(buf) - 1))) > 0) {
-        buf[length] = 0;
-        ACE_DEBUG((LM_DEBUG, ACE_TEXT("%C\n"), buf));
-      }
-
-      ACE_OS::close(this->outputfd_);
-      return 0;
-    }
-    // Listing 3
-
-    // Listing 2 code/ch10
-    // prepare() is inherited from ACE_Process.
-    virtual int prepare(ACE_Process_Options &options) {
-      options.command_line("%s", this->programName_);
-      if (this->setStdHandles(options) == -1 ||
-          this->setEnvVariable(options) == -1) {
-        return -1;
-      }
-      return 0;
-    }
-
-    virtual int setStdHandles(ACE_Process_Options &options) {
-      ACE_OS::unlink(this->programName_);
-      this->outputfd_ = ACE_OS::open(this->programName_, O_RDWR | O_CREAT);
-      return options.set_handles(ACE_STDIN, ACE_STDOUT, this->outputfd_);
-    }
-
-    virtual int setEnvVariable(ACE_Process_Options &options) {
-      return options.setenv("PRIVATE_VAR=/that/seems/to/be/it");
-    }
-    // Listing 2
-
-   private:
-   protected:
-    virtual ~Manager() {}
-
-   private:
-    ACE_HANDLE outputfd_;
-    ACE_TCHAR programName_[2048];
-  };
-
-}  // namespace dunit.
-
-#endif  // GEODE_INTEGRATION_TEST_FW_SPAWN_H_
diff --git a/cppcache/integration-test/locator_globals.hpp b/cppcache/integration-test/locator_globals.hpp
index 9d16d29..2e8f802 100644
--- a/cppcache/integration-test/locator_globals.hpp
+++ b/cppcache/integration-test/locator_globals.hpp
@@ -20,14 +20,14 @@
 #ifndef GEODE_INTEGRATION_TEST_LOCATOR_GLOBALS_H_
 #define GEODE_INTEGRATION_TEST_LOCATOR_GLOBALS_H_
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::CacheHelper;
 
 static int numberOfLocators = 1;
 bool isLocalServer = false;
 bool isLocator = false;
-const char* locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 
 }  // namespace
diff --git a/cppcache/integration-test/resources/cacheserver.xml b/cppcache/integration-test/resources/cacheserver.xml
index 2eda685..cf3e5e4 100644
--- a/cppcache/integration-test/resources/cacheserver.xml
+++ b/cppcache/integration-test/resources/cacheserver.xml
@@ -28,12 +28,12 @@
     <region-attributes scope="distributed-ack" data-policy="replicate"/>
   </region>
   <region name="DistRegionNoAck">
-    <region-attributes scope="distributed-no-ack" data-policy="replicate"/>
+    <region-attributes scope="distributed-ack" data-policy="replicate"/>
   </region>
   <region name="testregion">
-    <region-attributes scope="distributed-no-ack" data-policy="replicate"/>
+    <region-attributes scope="distributed-ack" data-policy="replicate"/>
   </region>
   <region name="CreateVerifyTestRegion">
-    <region-attributes scope="distributed-no-ack" data-policy="replicate"/>
+    <region-attributes scope="distributed-ack" data-policy="replicate"/>
   </region>
 </cache> 
diff --git a/cppcache/integration-test/resources/cacheserver1_fpr_transaction.xml b/cppcache/integration-test/resources/cacheserver1_fpr_transaction.xml
new file mode 100644
index 0000000..cdbd124
--- /dev/null
+++ b/cppcache/integration-test/resources/cacheserver1_fpr_transaction.xml
@@ -0,0 +1,40 @@
+<?xml version="1.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.
+-->
+
+<cache xmlns="http://geode.apache.org/schema/cache"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd"
+       version="1.0">
+	<cache-server port="40401"/>
+
+  <region name="region">
+    <region-attributes data-policy="partition">
+      <partition-attributes>
+        <partition-resolver>
+          <class-name>javaobject.CustomFixedPartitionResolver1</class-name>
+        </partition-resolver>
+		<fixed-partition-attributes partition-name="P1" is-primary="true" num-buckets="15"/>				
+		<fixed-partition-attributes partition-name="P6" is-primary="true" num-buckets="15"/>
+      </partition-attributes>
+      <cache-writer>
+        <class-name>javaobject.CacheWriterTransactionDelay</class-name>
+      </cache-writer>
+    </region-attributes>
+  </region>
+</cache>
diff --git a/cppcache/integration-test/resources/cacheserver2.xml b/cppcache/integration-test/resources/cacheserver2.xml
index 079136a..cc69dbb 100644
--- a/cppcache/integration-test/resources/cacheserver2.xml
+++ b/cppcache/integration-test/resources/cacheserver2.xml
@@ -29,6 +29,6 @@
 		<region-attributes scope="distributed-ack" data-policy="replicate"/>
 	</region>
 	<region name="DistRegionNoAck">
-		<region-attributes   scope="distributed-no-ack" data-policy="replicate"/>
+		<region-attributes   scope="distributed-ack" data-policy="replicate"/>
 	</region>
 </cache> 
diff --git a/cppcache/integration-test/resources/cacheserver2_fpr_transaction.xml b/cppcache/integration-test/resources/cacheserver2_fpr_transaction.xml
new file mode 100644
index 0000000..ff92015
--- /dev/null
+++ b/cppcache/integration-test/resources/cacheserver2_fpr_transaction.xml
@@ -0,0 +1,40 @@
+<?xml version="1.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.
+-->
+
+<cache xmlns="http://geode.apache.org/schema/cache"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd"
+       version="1.0">
+	<cache-server port="40402"/>
+
+  <region name="region">
+    <region-attributes data-policy="partition">
+      <partition-attributes>
+        <partition-resolver>
+          <class-name>javaobject.CustomFixedPartitionResolver1</class-name>
+        </partition-resolver>	
+		<fixed-partition-attributes partition-name="P2" is-primary="true" num-buckets="15"/>
+		<fixed-partition-attributes partition-name="P4" is-primary="true" num-buckets="15"/>
+      </partition-attributes>
+      <cache-writer>
+        <class-name>javaobject.CacheWriterTransactionDelay</class-name>
+      </cache-writer>
+    </region-attributes>
+  </region>
+</cache>
diff --git a/cppcache/integration-test/resources/cacheserver3.xml b/cppcache/integration-test/resources/cacheserver3.xml
index 0bead7c..37bc0e4 100644
--- a/cppcache/integration-test/resources/cacheserver3.xml
+++ b/cppcache/integration-test/resources/cacheserver3.xml
@@ -29,6 +29,6 @@
 		<region-attributes scope="distributed-ack" data-policy="replicate"/>
 	</region>
 	<region name="DistRegionNoAck">
-		<region-attributes   scope="distributed-no-ack" data-policy="replicate"/>
+		<region-attributes   scope="distributed-ack" data-policy="replicate"/>
 	</region>
 </cache> 
diff --git a/cppcache/integration-test/resources/cacheserver3_fpr_transaction.xml b/cppcache/integration-test/resources/cacheserver3_fpr_transaction.xml
new file mode 100644
index 0000000..13ec87d
--- /dev/null
+++ b/cppcache/integration-test/resources/cacheserver3_fpr_transaction.xml
@@ -0,0 +1,40 @@
+<?xml version="1.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.
+-->
+
+<cache xmlns="http://geode.apache.org/schema/cache"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd"
+       version="1.0">
+	<cache-server port="40403"/>
+
+  <region name="region">
+    <region-attributes data-policy="partition">
+      <partition-attributes>
+        <partition-resolver>
+          <class-name>javaobject.CustomFixedPartitionResolver1</class-name>
+        </partition-resolver>
+		<fixed-partition-attributes partition-name="P3" is-primary="true" num-buckets="15"/>		
+		<fixed-partition-attributes partition-name="P5" is-primary="true" num-buckets="15"/>
+      </partition-attributes>
+      <cache-writer>
+        <class-name>javaobject.CacheWriterTransactionDelay</class-name>
+      </cache-writer>
+    </region-attributes>
+  </region>
+</cache>
diff --git a/cppcache/integration-test/resources/cacheserverForPdx.xml b/cppcache/integration-test/resources/cacheserverForPdx.xml
index 27d137a..b24f22d 100644
--- a/cppcache/integration-test/resources/cacheserverForPdx.xml
+++ b/cppcache/integration-test/resources/cacheserverForPdx.xml
@@ -33,14 +33,14 @@
     </region-attributes>  
 	</region>
 	<region name="DistRegionNoAck">
-		<region-attributes   scope="distributed-no-ack" data-policy="replicate">
+		<region-attributes   scope="distributed-ack" data-policy="replicate">
     <cache-listener>
 				<class-name>javaobject.SimpleCacheListener</class-name>
 			</cache-listener>
     </region-attributes>  
 	</region>
 	<region name="testregion">
-		<region-attributes   scope="distributed-no-ack" data-policy="replicate">
+		<region-attributes   scope="distributed-ack" data-policy="replicate">
     <cache-listener>
 				<class-name>javaobject.SimpleCacheListener</class-name>
 			</cache-listener>
diff --git a/cppcache/integration-test/resources/cacheserverPdx.xml b/cppcache/integration-test/resources/cacheserverPdx.xml
index 1b0b595..60b249f 100644
--- a/cppcache/integration-test/resources/cacheserverPdx.xml
+++ b/cppcache/integration-test/resources/cacheserverPdx.xml
@@ -33,14 +33,14 @@
     </region-attributes>
 	</region>
 	<region name="DistRegionNoAck">
-		<region-attributes   scope="distributed-no-ack" data-policy="replicate">
+		<region-attributes   scope="distributed-ack" data-policy="replicate">
     <cache-listener>
 				<class-name>javaobject.PdxCacheListener</class-name>
 			</cache-listener>
     </region-attributes>
 	</region>
 	<region name="testregion">
-		<region-attributes   scope="distributed-no-ack" data-policy="replicate">
+		<region-attributes   scope="distributed-ack" data-policy="replicate">
     <cache-listener>
 				<class-name>javaobject.PdxCacheListener</class-name>
 			</cache-listener>
diff --git a/cppcache/integration-test/resources/cacheserverPdx2.xml b/cppcache/integration-test/resources/cacheserverPdx2.xml
index 8926b08..34fa445 100755
--- a/cppcache/integration-test/resources/cacheserverPdx2.xml
+++ b/cppcache/integration-test/resources/cacheserverPdx2.xml
@@ -30,11 +30,11 @@
      </region-attributes>
 	</region>
 	<region name="DistRegionNoAck">
-		<region-attributes   scope="distributed-no-ack" data-policy="replicate">
+		<region-attributes   scope="distributed-ack" data-policy="replicate">
     </region-attributes>
 	</region>
 	<region name="testregion">
-		<region-attributes   scope="distributed-no-ack" data-policy="replicate">
+		<region-attributes   scope="distributed-ack" data-policy="replicate">
     </region-attributes>
 	</region>
     <function-service>
diff --git a/cppcache/integration-test/resources/cacheserverPdxSerializer.xml b/cppcache/integration-test/resources/cacheserverPdxSerializer.xml
index a6a6000..200b268 100755
--- a/cppcache/integration-test/resources/cacheserverPdxSerializer.xml
+++ b/cppcache/integration-test/resources/cacheserverPdxSerializer.xml
@@ -29,9 +29,9 @@
 		<region-attributes scope="distributed-ack" data-policy="replicate"/>
 	</region>
 	<region name="DistRegionNoAck">
-		<region-attributes   scope="distributed-no-ack" data-policy="replicate"/>
+		<region-attributes   scope="distributed-ack" data-policy="replicate"/>
 	</region>
 	<region name="testregion">
-		<region-attributes   scope="distributed-no-ack" data-policy="replicate"/>
+		<region-attributes   scope="distributed-ack" data-policy="replicate"/>
 	</region>
 </cache> 
diff --git a/cppcache/integration-test/resources/cacheserver_loader.xml b/cppcache/integration-test/resources/cacheserver_loader.xml
index 688ad8d..6921c63 100644
--- a/cppcache/integration-test/resources/cacheserver_loader.xml
+++ b/cppcache/integration-test/resources/cacheserver_loader.xml
@@ -26,7 +26,7 @@
   <region name="root">
     <region-attributes/>
     <region name="exampleRegion">
-      <region-attributes scope="distributed-no-ack" data-policy="replicate"/>
+      <region-attributes scope="distributed-ack" data-policy="replicate"/>
     </region>
   </region>
 </cache>
diff --git a/cppcache/integration-test/resources/cacheserver_notify_subscription.xml b/cppcache/integration-test/resources/cacheserver_notify_subscription.xml
index f4c3dcd..97a40a2 100644
--- a/cppcache/integration-test/resources/cacheserver_notify_subscription.xml
+++ b/cppcache/integration-test/resources/cacheserver_notify_subscription.xml
@@ -32,9 +32,9 @@
     </region>
   </region>
   <region name="DistRegionNoAck">
-    <region-attributes scope="distributed-no-ack" data-policy="replicate"/>
+    <region-attributes scope="distributed-ack" data-policy="replicate"/>
     <region name="AuthSubregion">
-      <region-attributes scope="distributed-no-ack" data-policy="replicate"/>
+      <region-attributes scope="distributed-ack" data-policy="replicate"/>
     </region>
   </region>
   <function-service>
diff --git a/cppcache/integration-test/resources/cacheserver_notify_subscription2.xml b/cppcache/integration-test/resources/cacheserver_notify_subscription2.xml
index fcfa37f..043436a 100644
--- a/cppcache/integration-test/resources/cacheserver_notify_subscription2.xml
+++ b/cppcache/integration-test/resources/cacheserver_notify_subscription2.xml
@@ -32,9 +32,9 @@
     </region>
   </region>
   <region name="DistRegionNoAck">
-    <region-attributes scope="distributed-no-ack" data-policy="replicate"/>
+    <region-attributes scope="distributed-ack" data-policy="replicate"/>
     <region name="AuthSubregion">
-      <region-attributes scope="distributed-no-ack" data-policy="replicate"/>
+      <region-attributes scope="distributed-ack" data-policy="replicate"/>
     </region>
   </region>
   <function-service>
diff --git a/cppcache/integration-test/resources/cacheserver_notify_subscription3.xml b/cppcache/integration-test/resources/cacheserver_notify_subscription3.xml
index 437dd57..dcb51d2 100644
--- a/cppcache/integration-test/resources/cacheserver_notify_subscription3.xml
+++ b/cppcache/integration-test/resources/cacheserver_notify_subscription3.xml
@@ -32,9 +32,9 @@
     </region>
   </region>
   <region name="DistRegionNoAck">
-    <region-attributes scope="distributed-no-ack" data-policy="replicate"/>
+    <region-attributes scope="distributed-ack" data-policy="replicate"/>
     <region name="AuthSubregion">
-      <region-attributes scope="distributed-no-ack" data-policy="replicate"/>
+      <region-attributes scope="distributed-ack" data-policy="replicate"/>
     </region>
   </region>
 </cache> 
diff --git a/cppcache/integration-test/resources/cacheserver_notify_subscription4.xml b/cppcache/integration-test/resources/cacheserver_notify_subscription4.xml
index 989d999..e395b2b 100644
--- a/cppcache/integration-test/resources/cacheserver_notify_subscription4.xml
+++ b/cppcache/integration-test/resources/cacheserver_notify_subscription4.xml
@@ -32,9 +32,9 @@
     </region>
   </region>
   <region name="DistRegionNoAck">
-    <region-attributes scope="distributed-no-ack" data-policy="replicate"/>
+    <region-attributes scope="distributed-ack" data-policy="replicate"/>
     <region name="AuthSubregion">
-      <region-attributes scope="distributed-no-ack" data-policy="replicate"/>
+      <region-attributes scope="distributed-ack" data-policy="replicate"/>
     </region>
   </region>
 </cache> 
diff --git a/cppcache/integration-test/resources/cacheserver_notify_subscription5.xml b/cppcache/integration-test/resources/cacheserver_notify_subscription5.xml
index 46d9657..a44f8e8 100755
--- a/cppcache/integration-test/resources/cacheserver_notify_subscription5.xml
+++ b/cppcache/integration-test/resources/cacheserver_notify_subscription5.xml
@@ -91,7 +91,7 @@
   <region name="DistRegionNoAck">
    
   
-    <region-attributes scope="distributed-no-ack" data-policy="replicate"/>
+    <region-attributes scope="distributed-ack" data-policy="replicate"/>
      <!-- making entries -->
                     <entry>
                     <key><string>port1-1</string></key>
@@ -148,7 +148,7 @@
                     </value>
                </entry>
     <region name="AuthSubregion">
-      <region-attributes scope="distributed-no-ack" data-policy="replicate"/>
+      <region-attributes scope="distributed-ack" data-policy="replicate"/>
     </region>
   </region>
 </cache> 
diff --git a/cppcache/integration-test/resources/cacheserver_notify_subscriptionBug849.xml b/cppcache/integration-test/resources/cacheserver_notify_subscriptionBug849.xml
index a7337b3..d2e8182 100644
--- a/cppcache/integration-test/resources/cacheserver_notify_subscriptionBug849.xml
+++ b/cppcache/integration-test/resources/cacheserver_notify_subscriptionBug849.xml
@@ -32,9 +32,9 @@
     </region>
   </region>
   <region name="DistRegionNoAck">
-    <region-attributes scope="distributed-no-ack" data-policy="replicate"/>
+    <region-attributes scope="distributed-ack" data-policy="replicate"/>
     <region name="AuthSubregion">
-      <region-attributes scope="distributed-no-ack" data-policy="replicate"/>
+      <region-attributes scope="distributed-ack" data-policy="replicate"/>
     </region>
   </region>
   <region name="ExampleRegion">
diff --git a/cppcache/integration-test/resources/cacheserver_notify_subscription_PutAllTimeout.xml b/cppcache/integration-test/resources/cacheserver_notify_subscription_PutAllTimeout.xml
index f836e46..c15f6ed 100644
--- a/cppcache/integration-test/resources/cacheserver_notify_subscription_PutAllTimeout.xml
+++ b/cppcache/integration-test/resources/cacheserver_notify_subscription_PutAllTimeout.xml
@@ -36,9 +36,9 @@
     </region>    
   </region>
   <region name="DistRegionNoAck">
-    <region-attributes scope="distributed-no-ack" data-policy="replicate"/>
+    <region-attributes scope="distributed-ack" data-policy="replicate"/>
     <region name="AuthSubregion">
-      <region-attributes scope="distributed-no-ack" data-policy="replicate"/>
+      <region-attributes scope="distributed-ack" data-policy="replicate"/>
     </region>
   </region>
 </cache> 
diff --git a/cppcache/integration-test/resources/cacheserver_pdxinstance_hashcode.xml b/cppcache/integration-test/resources/cacheserver_pdxinstance_hashcode.xml
index ade66c7..f0789bd 100755
--- a/cppcache/integration-test/resources/cacheserver_pdxinstance_hashcode.xml
+++ b/cppcache/integration-test/resources/cacheserver_pdxinstance_hashcode.xml
@@ -33,14 +33,14 @@
     </region-attributes>
 	</region>
 	<region name="DistRegionNoAck">
-		<region-attributes   scope="distributed-no-ack" data-policy="replicate">
+		<region-attributes   scope="distributed-ack" data-policy="replicate">
     <cache-listener>
 				<class-name>javaobject.PdxinstanceHashcodeListener</class-name>
 			</cache-listener>
     </region-attributes>
 	</region>
 	<region name="testregion">
-		<region-attributes   scope="distributed-no-ack" data-policy="replicate">
+		<region-attributes   scope="distributed-ack" data-policy="replicate">
     <cache-listener>
 				<class-name>javaobject.PdxinstanceHashcodeListener</class-name>
 			</cache-listener>
diff --git a/cppcache/integration-test/resources/cacheserver_remoteoql.xml b/cppcache/integration-test/resources/cacheserver_remoteoql.xml
index 815c2b4..9765c8c 100644
--- a/cppcache/integration-test/resources/cacheserver_remoteoql.xml
+++ b/cppcache/integration-test/resources/cacheserver_remoteoql.xml
@@ -87,6 +87,6 @@
 		<region-attributes scope="distributed-ack" data-policy="replicate"/>
 	</region>
 	<region name="DistRegionNoAck">
-		<region-attributes   scope="distributed-no-ack" data-policy="replicate"/>
+		<region-attributes   scope="distributed-ack" data-policy="replicate"/>
 	</region>
 </cache> 
diff --git a/cppcache/integration-test/resources/cacheserver_remoteoql2.xml b/cppcache/integration-test/resources/cacheserver_remoteoql2.xml
index 31db84b..039c837 100644
--- a/cppcache/integration-test/resources/cacheserver_remoteoql2.xml
+++ b/cppcache/integration-test/resources/cacheserver_remoteoql2.xml
@@ -87,6 +87,6 @@
 		<region-attributes scope="distributed-ack" data-policy="replicate"/>
 	</region>
 	<region name="DistRegionNoAck">
-		<region-attributes   scope="distributed-no-ack" data-policy="replicate"/>
+		<region-attributes   scope="distributed-ack" data-policy="replicate"/>
 	</region>
 </cache> 
diff --git a/cppcache/integration-test/resources/cqqueryfailover.xml b/cppcache/integration-test/resources/cqqueryfailover.xml
index 8abf60c..e72e92a 100644
--- a/cppcache/integration-test/resources/cqqueryfailover.xml
+++ b/cppcache/integration-test/resources/cqqueryfailover.xml
@@ -103,6 +103,6 @@
 		<region-attributes scope="distributed-ack" data-policy="replicate"/>
 	</region>
 	<region name="DistRegionNoAck">
-		<region-attributes   scope="distributed-no-ack" data-policy="replicate"/>
+		<region-attributes   scope="distributed-ack" data-policy="replicate"/>
 	</region>
 </cache> 
diff --git a/cppcache/integration-test/resources/regionquery_diffconfig_SG.xml b/cppcache/integration-test/resources/regionquery_diffconfig_SG.xml
index 331fd42..88104bd 100644
--- a/cppcache/integration-test/resources/regionquery_diffconfig_SG.xml
+++ b/cppcache/integration-test/resources/regionquery_diffconfig_SG.xml
@@ -90,6 +90,6 @@
                </entry>
 	</region>
 	<region name="DistRegionNoAck">
-		<region-attributes   scope="distributed-no-ack" data-policy="replicate"/>
+		<region-attributes   scope="distributed-ack" data-policy="replicate"/>
 	</region>
 </cache> 
diff --git a/cppcache/integration-test/resources/remotequery.xml b/cppcache/integration-test/resources/remotequery.xml
index 83df32a..2bc8e64 100644
--- a/cppcache/integration-test/resources/remotequery.xml
+++ b/cppcache/integration-test/resources/remotequery.xml
@@ -106,6 +106,6 @@
 		<region-attributes scope="distributed-ack" data-policy="replicate"/>
 	</region>
 	<region name="DistRegionNoAck">
-		<region-attributes   scope="distributed-no-ack" data-policy="replicate"/>
+		<region-attributes   scope="distributed-ack" data-policy="replicate"/>
 	</region>
 </cache> 
diff --git a/cppcache/integration-test/resources/remotequery2.xml b/cppcache/integration-test/resources/remotequery2.xml
index 18ac38c..09cae09 100644
--- a/cppcache/integration-test/resources/remotequery2.xml
+++ b/cppcache/integration-test/resources/remotequery2.xml
@@ -106,6 +106,6 @@
 		<region-attributes scope="distributed-ack" data-policy="replicate"/>
 	</region>
 	<region name="DistRegionNoAck">
-		<region-attributes   scope="distributed-no-ack" data-policy="replicate"/>
+		<region-attributes   scope="distributed-ack" data-policy="replicate"/>
 	</region>
 </cache> 
diff --git a/cppcache/integration-test/test.bat.in b/cppcache/integration-test/test.bat.in
deleted file mode 100644
index 096d783..0000000
--- a/cppcache/integration-test/test.bat.in
+++ /dev/null
@@ -1,53 +0,0 @@
-@echo off
-
-rem Licensed to the Apache Software Foundation (ASF) under one or more
-rem contributor license agreements.  See the NOTICE file distributed with
-rem this work for additional information regarding copyright ownership.
-rem The ASF licenses this file to You under the Apache License, Version 2.0
-rem (the "License"); you may not use this file except in compliance with
-rem the License.  You may obtain a copy of the License at
-rem 
-rem      http://www.apache.org/licenses/LICENSE-2.0
-rem 
-rem Unless required by applicable law or agreed to in writing, software
-rem distributed under the License is distributed on an "AS IS" BASIS,
-rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-rem See the License for the specific language governing permissions and
-rem limitations under the License.
-
-setlocal
-
-set PATH=%PATH%;$<SHELL_PATH:$<TARGET_LINKER_FILE_DIR:apache-geode>>
-set PATH=%PATH%;$<SHELL_PATH:$<TARGET_LINKER_FILE_DIR:framework>>
-set PATH=%PATH%;$<SHELL_PATH:$<TARGET_LINKER_FILE_DIR:testobject>>
-set PATH=%PATH%;$<SHELL_PATH:$<TARGET_LINKER_FILE_DIR:SqLiteImpl>>
-set PATH=%PATH%;$<SHELL_PATH:$<TARGET_LINKER_FILE_DIR:securityImpl>>
-set PATH=%PATH%;$<SHELL_PATH:$<TARGET_LINKER_FILE_DIR:unit_test_callbacks>>
-set PATH=%PATH%;$<JOIN:$<SHELL_PATH:${PATH}>,;>
-
-set TESTSRC=${CMAKE_CURRENT_SOURCE_DIR}
-set GF_JAVA=$<SHELL_PATH:${Java_JAVA_EXECUTABLE}>
-set GFJAVA=$<SHELL_PATH:${Geode_PATH}>
-set GFE_LOGLEVEL=config
-set GFE_SECLOGLEVEL=config
-set MCAST_ADDR=224.10.13.63
-set MCAST_PORT=${PORT}
-set TIMEBOMB=3600
-set GF_CLASSPATH=%GF_CLASSPATH%;${CMAKE_BINARY_DIR}/tests/javaobject/javaobject.jar
-set PROFILERCMD=
-set BUG481=
-set TESTNAME=${TEST}
-
-set
-
-rmdir /q /s "$<SHELL_PATH:${TEST_DIR}>" 2>nul
-mkdir "$<SHELL_PATH:${TEST_DIR}>"
-if %errorlevel% neq 0 exit /b %errorlevel%
-pushd "$<SHELL_PATH:${TEST_DIR}>"
-if %errorlevel% neq 0 exit /b %errorlevel%
-
-"$<SHELL_PATH:$<TARGET_FILE:${TEST}>>"
-if %errorlevel% neq 0 exit /b %errorlevel%
-
-popd
-exit /b
diff --git a/cppcache/integration-test/test.sh.in b/cppcache/integration-test/test.sh.in
deleted file mode 100644
index 8eb6368..0000000
--- a/cppcache/integration-test/test.sh.in
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-set -e
-set -o pipefail
-
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<TARGET_LINKER_FILE_DIR:apache-geode>
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<TARGET_LINKER_FILE_DIR:framework>
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<TARGET_LINKER_FILE_DIR:testobject>
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<TARGET_LINKER_FILE_DIR:SqLiteImpl>
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<TARGET_LINKER_FILE_DIR:securityImpl>
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<TARGET_LINKER_FILE_DIR:unit_test_callbacks>
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$<JOIN:${LD_LIBRARY_PATH},:>
-
-export TESTSRC=${CMAKE_CURRENT_SOURCE_DIR}
-export GF_JAVA=${Java_JAVA_EXECUTABLE}
-export GFJAVA=${Geode_PATH}
-export GFE_LOGLEVEL=config
-export GFE_SECLOGLEVEL=config 
-export MCAST_ADDR=224.10.13.63
-export MCAST_PORT=${PORT}
-export TIMEBOMB=0
-export GF_CLASSPATH=$GF_CLASSPATH:${CMAKE_BINARY_DIR}/tests/javaobject/javaobject.jar
-export PROFILERCMD=
-export BUG481=
-export TESTNAME=${TEST}
-
-rm -rf "${TEST_DIR}"
-mkdir -p "${TEST_DIR}"
-pushd "${TEST_DIR}"
-
-if [ `uname` = "Darwin" ]; then
-  # export DYLD_LIBRARY_PATH to work around OS X SIP
-  export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH
-fi
-
-$DEBUG $<TARGET_FILE:${TEST}>
-
-# hack: This is _not_ ideal. We're potentially also masking real product bugs.
-#       For now, we just want something that produces results. TODO: REMOVE ASAP
-if [ `uname` = "SunOS" ]; then
-  (ps auxww | awk '/java .*${TEST}/ {print $2}' | xargs kill -9) 2>/dev/null || true
-else
-  pkill -9 -f 'java .*${TEST}' || true
-fi
-
-popd
diff --git a/cppcache/integration-test/testCacheless.cpp b/cppcache/integration-test/testCacheless.cpp
index aa52166..b5d5e7b 100644
--- a/cppcache/integration-test/testCacheless.cpp
+++ b/cppcache/integration-test/testCacheless.cpp
@@ -38,12 +38,8 @@
   }
 
   void put(int key, int value) {
-    char keybuf[100];
-    char valbuf[100];
-    sprintf(keybuf, "key%d", key);
-    sprintf(valbuf, "%d", value);
-    auto valPtr = CacheableString::create(valbuf);
-    m_regionPtr->put(keybuf, valPtr);
+    auto valPtr = CacheableString::create(std::to_string(value));
+    m_regionPtr->put(std::string("key") + std::to_string(key), valPtr);
   }
 
   void waitForKey(std::shared_ptr<CacheableKey> &keyPtr) {
@@ -75,14 +71,12 @@
   // by convention, we'll accept value of -1 to mean not exists, 0 to mean
   // invalid, and otherwise we'll compare.
   void test(int key, int value, int line) {
-    char keybuf[100];
-    sprintf(keybuf, "key%d", key);
-    auto keyPtr = CacheableKey::create(keybuf);
+    auto keyPtr =
+        CacheableKey::create(std::string("key") + std::to_string(key));
 
     if (value == -1) {
-      char ebuf[1024];
-      sprintf(ebuf, "unexpected key found at %d", line);
-      ASSERT(!m_regionPtr->containsKey(keyPtr), ebuf);
+      ASSERT(!m_regionPtr->containsKey(keyPtr),
+             std::string("unexpected key found at ") + std::to_string(line));
     } else if (value == 0) {
       waitForKey(keyPtr);
       ASSERT(m_regionPtr->containsKey(keyPtr), "missing key.");
@@ -93,10 +87,10 @@
       ASSERT(m_regionPtr->containsKey(keyPtr), "missing key.");
       std::shared_ptr<CacheableString> valPtr;
       int val = waitForValue(keyPtr, value, valPtr);
-      char ebuf[1024];
-      sprintf(ebuf, "unexpected value: \"%s\", expected \"%d\" from line %d",
-              valPtr->value().c_str(), value, line);
-      ASSERT(val == value, ebuf);
+      ASSERT(val == value, std::string("unexpected value: \"") +
+                               valPtr->value() + "\", expected \"" +
+                               std::to_string(value) + "\" from line " +
+                               std::to_string(line));
     }
   }
 
@@ -107,7 +101,7 @@
 static int numberOfLocators = 1;
 bool isLocalServer = true;
 bool isLocator = true;
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 std::shared_ptr<TallyListener> listener;
 
@@ -123,7 +117,7 @@
 
 DUNIT_TASK_DEFINITION(s1p1, CreateRegionNoCache)
   {
-    initClientWithPool(true, "__TEST_POOL1__", locHostPort, nullptr, nullptr, 0,
+    initClientWithPool(true, "__TEST_POOL1__", locHostPort, {}, nullptr, 0,
                        true);
     LOG("Creating region in s1p1-pusher, no-ack, no-cache, no-listener");
     getHelper()->createPooledRegion(REGIONNAME, false, locHostPort,
@@ -134,7 +128,7 @@
 DUNIT_TASK_DEFINITION(s1p2, CreateNoCacheWListener)
   {
     LOG("Creating region in s1p2-listener, no-ack, no-cache, with-listener");
-    initClientWithPool(true, "__TEST_POOL1__", locHostPort, nullptr, nullptr, 0,
+    initClientWithPool(true, "__TEST_POOL1__", locHostPort, {}, nullptr, 0,
                        true);
     listener = std::make_shared<TallyListener>();
     getHelper()->createPooledRegion(
@@ -148,7 +142,7 @@
   {
     LOG("Creating region in s2p1-storage, no-ack, cache, no-interestlist, "
         "no-listener");
-    initClientWithPool(true, "__TEST_POOL1__", locHostPort, nullptr, nullptr, 0,
+    initClientWithPool(true, "__TEST_POOL1__", locHostPort, {}, nullptr, 0,
                        true);
     getHelper()->createPooledRegion(REGIONNAME, false, locHostPort,
                                     "__TEST_POOL1__", true, true);
@@ -159,7 +153,7 @@
   {
     LOG("Creating region in s2p2-subset, no-ack, no-mirror, cache, "
         "no-interestlist, with-listener");
-    initClientWithPool(true, "__TEST_POOL1__", locHostPort, nullptr, nullptr, 0,
+    initClientWithPool(true, "__TEST_POOL1__", locHostPort, {}, nullptr, 0,
                        true);
     listener = std::make_shared<TallyListener>();
     getHelper()->createPooledRegion(
diff --git a/cppcache/integration-test/testCreateAndDestroyPool.cpp b/cppcache/integration-test/testCreateAndDestroyPool.cpp
index 682ed96..19806c3 100644
--- a/cppcache/integration-test/testCreateAndDestroyPool.cpp
+++ b/cppcache/integration-test/testCreateAndDestroyPool.cpp
@@ -15,9 +15,7 @@
  * limitations under the License.
  */
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-#include <ace/Task.h>
+
 #include <string>
 
 #define ROOT_NAME "testCreateAndDestroyPool"
@@ -36,7 +34,7 @@
 
 void stepOne() {
   initClient(true);
-  createPoolAndDestroy(poolNames[0], locatorsG, nullptr, 0, false,
+  createPoolAndDestroy(poolNames[0], locatorsG, {}, 0, false,
                        std::chrono::seconds::zero(), 1);
   LOG("StepOne complete.");
 }
diff --git a/cppcache/integration-test/testDunit.cpp b/cppcache/integration-test/testDunit.cpp
index ea26cb3..6674af4 100644
--- a/cppcache/integration-test/testDunit.cpp
+++ b/cppcache/integration-test/testDunit.cpp
@@ -20,18 +20,23 @@
 #include "fw_dunit.hpp"
 
 int getWorkerTest() {
-  return dunit::globals()->getIntValue("test_alive_workers");
+  auto expected = dunit::globals().find<int>("test_alive_workers").first;
+  ASSERT(expected != nullptr, "test_alive_workers is nullptr");
+  return *expected;
 }
 
 // while this itself isn't thread/process safe, there shouldn't be concurrency
 // in a dunit test anyway.
 void incrementWorkerTest() {
-  dunit::globals()->rebind("test_alive_workers", getWorkerTest() + 1);
+  auto value = dunit::globals().find<int>("test_alive_workers").first;
+  ASSERT(value != nullptr, "test_alive_workers is nullptr");
+  ++*value;
 }
 
 DUNIT_TASK(s1p1, One)
   {
-    dunit::globals()->rebind("from1", 100);
+    dunit::globals().construct<int>("test_alive_workers")(0);
+    dunit::globals().construct<int>("from1")(100);
     LOG("bound from1 = 100");
     incrementWorkerTest();
   }
@@ -39,7 +44,9 @@
 
 DUNIT_TASK(s1p2, Two)
   {
-    ASSERT(dunit::globals()->getIntValue("from1") == 100, "expected 100");
+    auto expected = dunit::globals().find<int>("from1").first;
+    ASSERT(expected != nullptr, "from1 is nullptr");
+    ASSERT(*expected == 100, "expected 100");
     LOG("looked up from1, found 100");
     incrementWorkerTest();
   }
@@ -77,6 +84,5 @@
     std::cout << "WorkerTest = " << getWorkerTest() << std::endl;
     ASSERT(getWorkerTest() == 8,
            "a previous worker must have failed undetected.");
-    dunit::globals()->dump();
   }
 END_TASK(TestA)
diff --git a/cppcache/integration-test/testExpiration.cpp b/cppcache/integration-test/testExpiration.cpp
index 7292c4c..655b361 100644
--- a/cppcache/integration-test/testExpiration.cpp
+++ b/cppcache/integration-test/testExpiration.cpp
@@ -17,6 +17,7 @@
 
 #include <geode/ExpirationAction.hpp>
 #include <geode/Region.hpp>
+#include <geode/SystemProperties.hpp>
 
 #include "fw_helper.hpp"
 #include "CacheRegionHelper.hpp"
@@ -54,33 +55,26 @@
 
 void doNPuts(std::shared_ptr<Region> &rptr, int n) {
   std::shared_ptr<CacheableString> value;
-  char buf[16];
-  memset(buf, 'A', 15);
-  buf[15] = '\0';
-  memcpy(buf, "Value - ", 8);
-  value = CacheableString::create(buf);
+  value = CacheableString::create("Value - AAAAAAA");
   ASSERT(value != nullptr, "Failed to create value.");
 
   for (int i = 0; i < n; i++) {
-    sprintf(buf, "KeyA - %d", i + 1);
-    auto key = CacheableKey::create(buf);
-    LOGINFO("Putting key %s value %s in region %s", buf,
+    auto keyStr = std::string("KeyA - ") + std::to_string(i + 1);
+    auto key = CacheableKey::create(keyStr);
+    LOGINFO("Putting key %s value %s in region %s", keyStr.c_str(),
             value->toString().c_str(), rptr->getFullPath().c_str());
     rptr->put(key, value);
   }
 }
+
 std::shared_ptr<CacheableKey> do1Put(std::shared_ptr<Region> &rptr) {
   std::shared_ptr<CacheableString> value;
-  char buf[16];
-  memset(buf, 'A', 15);
-  buf[15] = '\0';
-  memcpy(buf, "Value - ", 8);
-  value = CacheableString::create(buf);
+  value = CacheableString::create("Value - AAAAAAA");
   ASSERT(value != nullptr, "Failed to create value.");
 
-  sprintf(buf, "KeyA - %d", 0 + 1);
-  auto key = CacheableKey::create(buf);
-  LOGINFO("Putting key %s value %s in region %s", buf,
+  std::string keyStr("KeyA - 1");
+  auto key = CacheableKey::create(keyStr);
+  LOGINFO("Putting key %s value %s in region %s", keyStr.c_str(),
           value->toString().c_str(), rptr->getFullPath().c_str());
   rptr->put(key, value);
   return key;
@@ -126,7 +120,7 @@
 
     doNPuts(R1, 100);
 
-    ACE_OS::sleep(10);
+    std::this_thread::sleep_for(std::chrono::seconds(10));
 
     n = getNumOfEntries(R1);
     ASSERT(n == 100, "Expected 100 entries");
@@ -145,7 +139,7 @@
     LOG("Region R2 created");
     doNPuts(R2, 1);
 
-    ACE_OS::sleep(5);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
 
     n = getNumOfEntries(R2);
     ASSERT(n == 1, "Expected 1 entry");
@@ -162,7 +156,7 @@
     cacheImpl->createRegion("R3", attrs_3, R3);
     ASSERT(R3 != nullptr, "Expected R3 to be NON-nullptr");
 
-    ACE_OS::sleep(5);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
 
     ASSERT(R3->isDestroyed() == false, "Expected R3 to be alive");
 
@@ -179,7 +173,7 @@
     doNPuts(R4, 1);
     // This will be same as updating the object
 
-    ACE_OS::sleep(10);
+    std::this_thread::sleep_for(std::chrono::seconds(10));
 
     n = getNumOfEntries(R4);
     ASSERT(n == 0, "Expected 0 entry");
@@ -198,18 +192,18 @@
 
     auto key_0 = do1Put(R5);
 
-    ACE_OS::sleep(2);
+    std::this_thread::sleep_for(std::chrono::seconds(2));
 
     R5->get(key_0);
-    ACE_OS::sleep(3);
+    std::this_thread::sleep_for(std::chrono::seconds(3));
 
     n = getNumOfEntries(R5);
 
-    printf("n ==  %zd\n", n);
+    std::cout << "n ==  " << n << "\n";
     ASSERT(n == 1, "Expected 1 entry");
 
-    // ACE_OS::sleep(3);
-    ACE_OS::sleep(6);
+    // std::this_thread::sleep_for(std::chrono::seconds(3));
+    std::this_thread::sleep_for(std::chrono::seconds(6));
     n = getNumOfEntries(R5);
 
     ASSERT(n == 0, "Expected 0 entry");
@@ -227,11 +221,11 @@
 
     doNPuts(R6, 1);
 
-    ACE_OS::sleep(2);
+    std::this_thread::sleep_for(std::chrono::seconds(2));
 
     doNPuts(R6, 1);
 
-    ACE_OS::sleep(7);
+    std::this_thread::sleep_for(std::chrono::seconds(7));
 
     ASSERT(R6->isDestroyed() == true, "Expected R6 to be dead");
 
@@ -247,11 +241,11 @@
 
     doNPuts(R7, 1);
 
-    ACE_OS::sleep(2);
+    std::this_thread::sleep_for(std::chrono::seconds(2));
 
     doNPuts(R7, 1);
 
-    ACE_OS::sleep(10);
+    std::this_thread::sleep_for(std::chrono::seconds(10));
 
     ASSERT(R7->isDestroyed() == true, "Expected R7 to be dead");
 
@@ -267,11 +261,11 @@
 
     auto key = do1Put(R8);
 
-    ACE_OS::sleep(5);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
 
     R8->get(key);
 
-    ACE_OS::sleep(6);
+    std::this_thread::sleep_for(std::chrono::seconds(6));
 
     n = getNumOfEntries(R8);
     ASSERT(n == 0, "Expected 1 entries");
@@ -288,11 +282,11 @@
 
     auto key_1 = do1Put(R9);
 
-    ACE_OS::sleep(5);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
 
     R9->get(key_1);
 
-    ACE_OS::sleep(5);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
 
     n = getNumOfEntries(R9);
     ASSERT(n == 1, "Expected 1 entries");
@@ -311,12 +305,12 @@
 
     doNPuts(R10, 1);
 
-    ACE_OS::sleep(10);
+    std::this_thread::sleep_for(std::chrono::seconds(10));
 
     n = getNumOfEntries(R10);
     ASSERT(n == 0, "Expected 0 entries");
 
-    ACE_OS::sleep(11);
+    std::this_thread::sleep_for(std::chrono::seconds(11));
 
     ASSERT(R10->isDestroyed() == true, "Expected R10 to be dead");
 
@@ -333,19 +327,19 @@
 
     auto k11 = do1Put(R11);
 
-    ACE_OS::sleep(3);
+    std::this_thread::sleep_for(std::chrono::seconds(3));
 
     n = getNumOfEntries(R11);
     ASSERT(n == 1, "Expected 1 entries");
 
     R11->get(k11);
 
-    ACE_OS::sleep(5);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
 
     ASSERT(R11->isDestroyed() == false,
            "Expected R11 to be alive as the get has changed the access time");
 
-    ACE_OS::sleep(5);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
 
     ASSERT(R11->isDestroyed() == true, "Expected R11 to be dead");
 
@@ -361,7 +355,7 @@
 
     auto key_3 = do1Put(R12);
 
-    ACE_OS::sleep(6);
+    std::this_thread::sleep_for(std::chrono::seconds(6));
 
     n = getNumOfEntries(R12);
     ASSERT(n == 0, "Expected 0 entries");
@@ -381,7 +375,7 @@
 
     doNPuts(R14, 1);
 
-    ACE_OS::sleep(12);
+    std::this_thread::sleep_for(std::chrono::seconds(12));
 
     ASSERT(R14->isDestroyed() == true, "Expected R14 to be dead");
 
@@ -397,11 +391,11 @@
 
     auto key_4 = do1Put(R15);
 
-    ACE_OS::sleep(2);
+    std::this_thread::sleep_for(std::chrono::seconds(2));
 
     R15->destroy(key_4);
 
-    ACE_OS::sleep(5);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
 
     ASSERT(R15->isDestroyed() == false, "Expected R15 to be alive");
 
@@ -418,12 +412,12 @@
 
     doNPuts(R18, 1);
 
-    ACE_OS::sleep(4);
+    std::this_thread::sleep_for(std::chrono::seconds(4));
 
     n = getNumOfEntries(R18);
     ASSERT(n == 1, "entry idle should be useless as ttl is > 0");
 
-    ACE_OS::sleep(4);
+    std::this_thread::sleep_for(std::chrono::seconds(4));
     n = getNumOfEntries(R18);
     ASSERT(n == 0, "ttl is over so it should be 0");
 
@@ -437,16 +431,16 @@
     cacheImpl->createRegion("R19x", attrs_19, R19);
     ASSERT(R19 != nullptr, "Expected R19 to be NON-nullptr");
 
-    ACE_OS::sleep(4);
+    std::this_thread::sleep_for(std::chrono::seconds(4));
 
     doNPuts(R19, 1);
 
-    ACE_OS::sleep(4);
+    std::this_thread::sleep_for(std::chrono::seconds(4));
 
     ASSERT(R19->isDestroyed() == false,
            "Expected R19 to be alive as an entry was put");
 
-    ACE_OS::sleep(4);
+    std::this_thread::sleep_for(std::chrono::seconds(4));
 
     ASSERT(R19->isDestroyed() == true, "Expected R19 to be dead");
     cache->close();
diff --git a/cppcache/integration-test/testFwPerf.cpp b/cppcache/integration-test/testFwPerf.cpp
deleted file mode 100644
index 8615b94..0000000
--- a/cppcache/integration-test/testFwPerf.cpp
+++ /dev/null
@@ -1,61 +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.
- */
-
-#include "fw_dunit.hpp"
-
-perf::PerfSuite perfSuite("FwPerf");
-
-class LocalPutTask : public perf::Thread {
- private:
- public:
-  LocalPutTask() : Thread() {}
-
-  virtual void setup() {
-    fprintf(stdout, "performed my setup...\n");
-    fflush(stdout);
-  }
-
-  virtual void perftask() {
-    ACE_OS::sleep(1);
-    fprintf(stdout, "perffunc done.\n");
-    fflush(stdout);
-  }
-
-  virtual void cleanup() {
-    fprintf(stdout, "performed my cleanup...\n");
-    fflush(stdout);
-  }
-};
-
-// all creates, no map growth, no replaces.
-DUNIT_TASK(s1p1, LocalPut)
-  {
-    int iters = 1;
-    int threads = 4;
-
-    LocalPutTask taskDef;
-    perf::ThreadLauncher tl(threads, taskDef);
-    tl.go();
-
-    perfSuite.addRecord(fwtest_Name, iters * threads, tl.startTime(),
-                        tl.stopTime());
-  }
-END_TASK(x)
-
-DUNIT_TASK(s1p1, Finish)
-  { perfSuite.save(); }
-END_TASK(x)
diff --git a/cppcache/integration-test/testLogger.cpp b/cppcache/integration-test/testLogger.cpp
deleted file mode 100644
index 5645db4..0000000
--- a/cppcache/integration-test/testLogger.cpp
+++ /dev/null
@@ -1,371 +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.
- */
-
-#include "fw_helper.hpp"
-#include <geode/ExceptionTypes.hpp>
-
-#ifndef WIN32
-#include <unistd.h>
-#endif
-
-#define LENGTH_OF_BANNER 16
-
-using apache::geode::client::IllegalStateException;
-using apache::geode::client::Log;
-using apache::geode::client::LogFn;
-using apache::geode::client::LogLevel;
-
-int numOfLinesInFile(const char *fname) {
-  char line[2048];
-  char *read;
-  int ln_cnt = 0;
-  FILE *fp = fopen(fname, "r");
-  if (fp == nullptr) {
-    return -1;
-  }
-  while (!!(read = fgets(line, sizeof line, fp))) {
-    printf("%d:%s", ++ln_cnt, line);
-  }
-
-  if (!feof(fp)) {
-    fclose(fp);
-    return -2;
-  }
-  fclose(fp);
-  return ln_cnt;
-}
-
-void testLogFnError() {
-  LogFn logFn("TestLogger::testLogFnError", LogLevel::Error);
-  Log::error("...");
-}
-
-void testLogFnWarning() {
-  LogFn logFn("TestLogger::testLogFnWarning", LogLevel::Warning);
-  Log::warning("...");
-}
-
-void testLogFnInfo() {
-  LogFn logFn("TestLogger::testLogFnInfo", LogLevel::Info);
-  Log::info("...");
-}
-
-void testLogFnConfig() {
-  LogFn logFn("TestLogger::testLogFnConfig", LogLevel::Config);
-  Log::config("...");
-}
-
-void testLogFnFine() {
-  LogFn logFn("TestLogger::testLogFnFine", LogLevel::Fine);
-  Log::fine("...");
-}
-
-void testLogFnFiner() {
-  LogFn logFn("TestLogger::testLogFnFiner", LogLevel::Finer);
-  Log::finer("...");
-}
-
-void testLogFnFinest() {
-  LogFn logFn("TestLogger::testLogFnFinest");
-  Log::finest("...");
-}
-
-void testLogFnDebug() {
-  LogFn logFn("TestLogger::testLogFnDebug", LogLevel::Debug);
-  Log::debug("...");
-}
-
-int expected(LogLevel level) {
-  int expected = static_cast<int>(level);
-  if (level != LogLevel::None) {
-    expected += LENGTH_OF_BANNER;
-  }
-  if (level >= LogLevel::Default) {
-    expected--;
-  }
-  return expected;
-}
-
-BEGIN_TEST(REINIT)
-  {
-    LOGINFO("Started logging");
-    int exceptiongot = 0;
-    Log::init(LogLevel::Debug, "logfile");
-    try {
-      Log::init(LogLevel::Debug, "logfile1");
-    } catch (IllegalStateException &ex) {
-      printf("Got Illegal state exception while calling init again\n");
-      printf("Exception mesage = %s\n", ex.what());
-      exceptiongot = 1;
-    }
-    ASSERT(exceptiongot == 1, "expected exceptiongot to be 1");
-    Log::close();
-    unlink("logfile.log");
-  }
-END_TEST(REINIT)
-
-BEGIN_TEST(ALL_LEVEL)
-  {
-    for (LogLevel level : {
-             LogLevel::Error,
-             LogLevel::Warning,
-             LogLevel::Info,
-             LogLevel::Default,
-             LogLevel::Config,
-             LogLevel::Fine,
-             LogLevel::Finer,
-             LogLevel::Finest,
-             LogLevel::Debug,
-         }) {
-      Log::init(level, "all_logfile");
-
-      Log::error("Error Message");
-      Log::warning("Warning Message");
-      Log::info("Info Message");
-      Log::config("Config Message");
-      Log::fine("Fine Message");
-      Log::finer("Finer Message");
-      Log::finest("Finest Message");
-      Log::debug("Debug Message");
-
-      int lines = numOfLinesInFile("all_logfile.log");
-
-      printf("lines = %d expected = %d \n", lines, expected(level));
-
-      ASSERT(lines == expected(level), "Wrong number of lines");
-
-      Log::close();
-      unlink("all_logfile.log");
-    }
-  }
-END_TEST(ALL_LEVEL)
-
-BEGIN_TEST(ALL_LEVEL_MACRO)
-  {
-    for (LogLevel level : {
-             LogLevel::Error,
-             LogLevel::Warning,
-             LogLevel::Info,
-             LogLevel::Default,
-             LogLevel::Config,
-             LogLevel::Fine,
-             LogLevel::Finer,
-             LogLevel::Finest,
-             LogLevel::Debug,
-         }) {
-      Log::init(level, "all_logfile");
-
-      LOGERROR("Error Message");
-      LOGWARN("Warning Message");
-      LOGINFO("Info Message");
-      LOGCONFIG("Config Message");
-      LOGFINE("Fine Message");
-      LOGFINER("Finer Message");
-      LOGFINEST("Finest Message");
-      LOGDEBUG("Debug Message");
-
-      int lines = numOfLinesInFile("all_logfile.log");
-
-      printf("lines = %d Level = %d, %d\n", lines, static_cast<int>(level),
-             static_cast<int>(Log::logLevel()));
-
-      ASSERT(lines == expected(level), "Wrong number of lines");
-      Log::close();
-
-      unlink("all_logfile.log");
-    }
-  }
-END_TEST(ALL_LEVEL_MACRO)
-
-BEGIN_TEST(FILE_LIMIT)
-  {
-#ifdef _WIN32
-// Fail to roll file over to timestamp file on windows.
-#else
-    for (LogLevel level : {
-             LogLevel::Error,
-             LogLevel::Warning,
-             LogLevel::Info,
-             LogLevel::Default,
-             LogLevel::Config,
-             LogLevel::Fine,
-             LogLevel::Finer,
-             LogLevel::Finest,
-             LogLevel::Debug,
-         }) {
-      if (level == LogLevel::Default) continue;
-      Log::init(level, "logfile", 1);
-
-      Log::error("Error Message");
-      Log::warning("Warning Message");
-      Log::info("Info Message");
-      Log::config("Config Message");
-      Log::fine("Fine Message");
-      Log::finer("Finer Message");
-      Log::finest("Finest Message");
-      Log::debug("Debug Message");
-
-      int lines = numOfLinesInFile("logfile.log");
-      int expectedLines = static_cast<int>(level) + LENGTH_OF_BANNER -
-                          (level >= LogLevel::Default ? 1 : 0);
-      printf("lines = %d expectedLines = %d level = %d\n", lines, expectedLines,
-             static_cast<int>(level));
-
-      ASSERT(lines == expectedLines, "Wrong number of lines");
-
-      Log::close();
-      unlink("logfile.log");
-    }
-#endif
-  }
-END_TEST(FILE_LIMIT)
-
-BEGIN_TEST(CONFIG_ONWARDS)
-  {
-    Log::init(LogLevel::Config, "logfile");
-
-    Log::debug("Debug Message");
-    Log::config("Config Message");
-    Log::info("Info Message");
-    Log::warning("Warning Message");
-    Log::error("Error Message");
-
-    int lines = numOfLinesInFile("logfile.log");
-    printf("lines = %d\n", lines);
-    // debug should not be printed
-    ASSERT(lines == 4 + LENGTH_OF_BANNER,
-           "Expected 4 + LENGTH_OF_BANNER lines.");
-    Log::close();
-    unlink("logfile.log");
-  }
-END_TEST(CONFIG_ONWARDS)
-
-BEGIN_TEST(INFO_ONWARDS)
-  {
-    Log::init(LogLevel::Info, "logfile");
-
-    Log::debug("Debug Message");
-    Log::config("Config Message");
-    Log::info("Info Message");
-    Log::warning("Warning Message");
-    Log::error("Error Message");
-
-    int lines = numOfLinesInFile("logfile.log");
-    printf("lines = %d\n", lines);
-    // debug, config should not be printed
-    ASSERT(lines == 3 + LENGTH_OF_BANNER,
-           "Expected 3 + LENGTH_OF_BANNER lines.");
-    Log::close();
-    unlink("logfile.log");
-  }
-END_TEST(INFO_ONWARDS)
-
-BEGIN_TEST(WARNING_ONWARDS)
-  {
-    Log::init(LogLevel::Warning, "logfile");
-
-    Log::debug("Debug Message");
-    Log::config("Config Message");
-    Log::info("Info Message");
-    Log::warning("Warning Message");
-    Log::error("Error Message");
-
-    int lines = numOfLinesInFile("logfile.log");
-    printf("lines = %d\n", lines);
-    // debug, config, info should not be printed
-    ASSERT(lines == 2 + LENGTH_OF_BANNER,
-           "Expected 2 + LENGTH_OF_BANNER lines.");
-    Log::close();
-    unlink("logfile.log");
-  }
-END_TEST(WARNING_ONWARDS)
-
-BEGIN_TEST(ERROR_LEVEL)
-  {
-    Log::init(LogLevel::Error, "logfile");
-
-    Log::debug("Debug Message");
-    Log::config("Config Message");
-    Log::info("Info Message");
-    Log::warning("Warning Message");
-    Log::error("Error Message");
-
-    int lines = numOfLinesInFile("logfile.log");
-    printf("lines = %d\n", lines);
-    // debug, config, info and warning should not be printed
-    ASSERT(lines == 1 + LENGTH_OF_BANNER, "Expected 1+LENGTH_OF_BANNER lines.");
-    Log::close();
-    unlink("logfile.log");
-  }
-END_TEST(ERROR_LEVEL)
-
-BEGIN_TEST(NO_LOG)
-  {
-    Log::init(LogLevel::None, "logfile");
-
-    Log::debug("Debug Message");
-    Log::config("Config Message");
-    Log::info("Info Message");
-    Log::warning("Warning Message");
-    Log::error("Error Message");
-
-    int lines = numOfLinesInFile("logfile.log");
-    printf("lines = %d\n", lines);
-    // debug, config, info and warning and even error should not be printed
-    // As the logfile is not there so -1 will be returned.
-    ASSERT(lines == -1 || lines == 0, "Expected 0 or -1 lines.");
-    Log::close();
-    unlink("logfile.log");
-  }
-END_TEST(NO_LOG)
-
-BEGIN_TEST(LOGFN)
-  {
-    for (LogLevel level : {
-             LogLevel::Error,
-             LogLevel::Warning,
-             LogLevel::Info,
-             LogLevel::Default,
-             LogLevel::Config,
-             LogLevel::Fine,
-             LogLevel::Finer,
-             LogLevel::Finest,
-             LogLevel::Debug,
-         }) {
-      Log::init(level, "logfile");
-
-      testLogFnError();
-      testLogFnWarning();
-      testLogFnInfo();
-      testLogFnConfig();
-      testLogFnFine();
-      testLogFnFiner();
-      testLogFnFinest();
-      testLogFnDebug();
-
-      int lines = numOfLinesInFile("logfile.log");
-
-      printf("lines = %d, level = %s\n", lines, Log::levelToChars(level));
-
-      ASSERT(lines == 3 * expected(level) - 2 * LENGTH_OF_BANNER,
-             "Wrong number of lines");
-      Log::close();
-
-      unlink("logfile.log");
-    }
-  }
-END_TEST(LOGFN)
diff --git a/cppcache/integration-test/testOverflowPutGetSqLite.cpp b/cppcache/integration-test/testOverflowPutGetSqLite.cpp
index 594d0d9..98ea64f 100644
--- a/cppcache/integration-test/testOverflowPutGetSqLite.cpp
+++ b/cppcache/integration-test/testOverflowPutGetSqLite.cpp
@@ -18,7 +18,8 @@
 #include <string>
 #include <iostream>
 
-#include <ace/OS.h>
+#include <boost/asio.hpp>
+#include <boost/process.hpp>
 
 #include <geode/RegionShortcut.hpp>
 #include <geode/RegionFactory.hpp>
@@ -28,6 +29,8 @@
 #include <CacheRegionHelper.hpp>
 #include <MapEntry.hpp>
 
+#include "CacheImpl.hpp"
+
 #include "fw_helper.hpp"
 
 using apache::geode::client::Cache;
@@ -50,16 +53,16 @@
 uint32_t numOfEnt;
 std::string sqlite_dir = "SqLiteRegionData";
 
-static constexpr char const *MAX_PAGE_COUNT = "MaxPageCount";
-static constexpr char const *PAGE_SIZE = "PageSize";
-static constexpr char const *PERSISTENCE_DIR = "PersistenceDirectory";
+static constexpr char const *kMaxPageCountStr = "MaxPageCount";
+static constexpr char const *kPageSizeStr = "PageSize";
+static constexpr char const *kPersistenceDirStr = "PersistenceDirectory";
 
 // Return the number of keys and values in entries map.
 void getNumOfEntries(std::shared_ptr<Region> &regionPtr, uint32_t num) {
   auto v = regionPtr->keys();
   auto vecValues = regionPtr->values();
-  printf("Values vector size is %zd\n", vecValues.size());
-  printf("Num is %d\n", num);
+  std::cout << "Values vector size is " << vecValues.size() << "\n";
+  std::cout << "Num is " << num << "\n";
   ASSERT(vecValues.size() == num, "size of value vec and num not equal");
 }
 
@@ -135,7 +138,7 @@
   int normalCount = 0;
   int overflowCount = 0;
   int invalidCount = 0;
-  int destoyedCount = 0;
+  int destroyedCount = 0;
   int tombstoneCount = 0;
   for (uint32_t i = 0; i < static_cast<uint32_t>(v.size()); i++) {
     keyPtr = v.at(i);
@@ -148,19 +151,19 @@
     } else if (CacheableToken::isInvalid(valuePtr)) {
       invalidCount++;
     } else if (CacheableToken::isDestroyed(valuePtr)) {
-      destoyedCount++;
+      destroyedCount++;
     } else if (valuePtr != nullptr) {
       normalCount++;
     }
     valuePtr = nullptr;
   }
-  printf("Keys vector size is %zd\n", v.size());
-  printf("Normal entries count is %d\n", normalCount);
-  printf("Overflow entries count is %d\n", overflowCount);
-  printf("Invalid entries count is %d\n", invalidCount);
-  printf("Destoyed entries count is %d\n", destoyedCount);
-  printf("Tombstone entries count is %d\n", tombstoneCount);
-  printf("LRU entries limit is %d\n", lruLimit);
+  std::cout << "Keys vector size is " << v.size() << "\n";
+  std::cout << "Normal entries count is " << normalCount << "\n";
+  std::cout << "Overflow entries count is " << overflowCount << "\n";
+  std::cout << "Invalid entries count is " << invalidCount << "\n";
+  std::cout << "Destoyed entries count is " << destroyedCount << "\n";
+  std::cout << "Tombstone entries count is " << tombstoneCount << "\n";
+  std::cout << "LRU entries limit is " << lruLimit << "\n";
   ASSERT(normalCount <= static_cast<int>(lruLimit),
          "Normal entries count should not exceed LRU entries limit.");
 }
@@ -168,53 +171,20 @@
 // Testing for put operation
 void doNput(std::shared_ptr<Region> &regionPtr, uint32_t num,
             uint32_t start = 0) {
-  char keybuf[100];
   // Put 1 KB of data locally for each entry
-  char *text = new char[1024];
+  char text[1024];
   memset(text, 'A', 1023);
   text[1023] = '\0';
   auto valuePtr = CacheableString::create(text);
 
   for (uint32_t i = start; i < num; i++) {
-    sprintf(keybuf, "key-%d", i);
-    auto key = CacheableKey::create(keybuf);
-    printf("Putting key = %s\n", keybuf);
+    auto keyname = std::string("key-") + std::to_string(i);
+    auto key = CacheableKey::create(keyname);
+    std::cout << "Putting key = " << keyname << "\n";
     regionPtr->put(key, valuePtr);
   }
 }
 
-void doNputLargeData(std::shared_ptr<Region> &regionPtr, int num) {
-  // Put 1 MB of data locally for each entry
-  char *text = new char[1024 * 1024 /* 1 MB */];
-  memset(text, 'A', 1024 * 1024 - 1);
-  text[1024 * 1024 - 1] = '\0';
-  auto valuePtr = CacheableString::create(text);
-  for (int item = 0; item < num; item++) {
-    regionPtr->put(CacheableKey::create(item), valuePtr);
-  }
-
-  LOGINFO("Put data locally");
-}
-
-// Testing for get operation
-uint32_t doNgetLargeData(std::shared_ptr<Region> &regionPtr, int num) {
-  uint32_t countFound = 0;
-  uint32_t countNotFound = 0;
-
-  for (int i = 0; i < num; i++) {
-    printf("Getting key = %d\n", i);
-    auto valuePtr =
-        std::dynamic_pointer_cast<CacheableString>(regionPtr->get(i));
-    if (valuePtr == nullptr) {
-      countNotFound++;
-    } else {
-      countFound++;
-    }
-  }
-  LOGINFO("found:%d and Not found: %d", countFound, countNotFound);
-  return countFound;
-}
-
 // Testing for get operation
 uint32_t doNget(std::shared_ptr<Region> &regionPtr, uint32_t num,
                 uint32_t start = 0) {
@@ -222,20 +192,19 @@
   uint32_t countNotFound = 0;
 
   for (uint32_t i = start; i < num; i++) {
-    char keybuf[100];
-    sprintf(keybuf, "key-%d", i);
+    auto keyname = std::string("key-") + std::to_string(i);
     auto valuePtr =
-        std::dynamic_pointer_cast<CacheableString>(regionPtr->get(keybuf));
-    printf("Getting key = %s\n", keybuf);
+        std::dynamic_pointer_cast<CacheableString>(regionPtr->get(keyname));
+    std::cout << "Getting key = " << keyname << "\n";
     if (valuePtr == nullptr) {
       countNotFound++;
     } else {
       countFound++;
     }
   }
-  printf("completed doNget");
-  printf("count found %d", countFound);
-  printf("num found %d", num);
+  std::cout << "completed doNget";
+  std::cout << "count found " << countFound;
+  std::cout << "num found " << num;
   ASSERT(countFound == (num - start),
          "Number of entries found and put should match");
   LOGINFO("found:%d and Not found: %d", countFound, countNotFound);
@@ -278,28 +247,34 @@
   ASSERT(v.size() == num, "size of key vec not equal");
 }
 
-class PutThread : public ACE_Task_Base {
- private:
-  std::shared_ptr<Region> m_regPtr;
-  int m_min;
-  int m_max;
-
+class PutThread {
  public:
-  PutThread(std::shared_ptr<Region> &regPtr, int min, int max)
-      : m_regPtr(regPtr), m_min(min), m_max(max) {}
+  PutThread(std::shared_ptr<Region> region, int min, int max)
+      : min_{min}, max_{max}, region_{region} {}
 
-  int svc(void) {
+  void run() {
     /** put some values into the cache. */
-    doNput(m_regPtr, m_max, m_min);
+    doNput(region_, max_, min_);
     /** do some gets... printing what we find in the cache. */
-    doNget(m_regPtr, m_max, m_min);
+    doNget(region_, max_, min_);
     LOG("Completed doNget");
-    return 0;
   }
 
-  void start() { activate(); }
+  void start() {
+    thread_ = std::thread{[this]() { run(); }};
+  }
 
-  void stop() { wait(); }
+  void stop() {
+    if (thread_.joinable()) {
+      thread_.join();
+    }
+  }
+
+ protected:
+  int min_;
+  int max_;
+  std::thread thread_;
+  std::shared_ptr<Region> region_;
 };
 
 void verifyGetAll(std::shared_ptr<Region> region, int startIndex) {
@@ -342,26 +317,25 @@
                          int maxPageCount = 1073741823, int pageSize = 65536,
                          std::string pDir = sqlite_dir) {
   sqliteProperties = Properties::create();
-  sqliteProperties->insert(MAX_PAGE_COUNT, maxPageCount);
-  sqliteProperties->insert(PAGE_SIZE, pageSize);
-  sqliteProperties->insert(PERSISTENCE_DIR, pDir.c_str());
+  sqliteProperties->insert(kMaxPageCountStr, maxPageCount);
+  sqliteProperties->insert(kPageSizeStr, pageSize);
+  sqliteProperties->insert(kPersistenceDirStr, pDir.c_str());
   ASSERT(sqliteProperties != nullptr,
          "Expected sqlite properties to be NON-nullptr");
 }
 // creation of subregion.
 
 void createSubRegion(std::shared_ptr<Region> &regionPtr,
-                     std::shared_ptr<Region> &subRegion, const char *regionName,
+                     std::shared_ptr<Region> &subRegion,
+                     const std::string &regionName,
                      std::string pDir = sqlite_dir) {
   RegionAttributes regionAttributesPtr;
   setAttributes(regionAttributesPtr, pDir);
   subRegion = regionPtr->createSubregion(regionName, regionAttributesPtr);
   ASSERT(subRegion != nullptr, "Expected region to be NON-nullptr");
-  char fileName[512];
-  sprintf(fileName, "%s/%s/%s.db", pDir.c_str(), regionName, regionName);
-  ACE_stat fileStat;
-  ASSERT(ACE_OS::stat(fileName, &fileStat) == 0,
-         "persistence file not present");
+
+  std::string fileName = pDir + '/' + regionName + '/' + regionName + ".db";
+  ASSERT(boost::filesystem::exists(fileName), "persistence file not present");
   doNput(subRegion, 50);
   doNget(subRegion, 50);
 }
@@ -409,15 +383,12 @@
       subRegion->destroyRegion();
       ASSERT(subRegion->isDestroyed(), "Expected region is not destroyed ");
       subRegion = nullptr;
-      ACE_TCHAR hname[MAXHOSTNAMELEN];
-      ACE_OS::hostname(hname, sizeof(hname) - 1);
-      char sqliteDirSubRgn[512];
-      sprintf(sqliteDirSubRgn, "%s/%s_%u/_%s_SubRegion/file_0.db",
-              sqlite_dir.c_str(), hname, ACE_OS::getpid(),
-              regionPtr->getName().c_str());
 
-      ACE_stat fileStat;
-      ASSERT(ACE_OS::stat(sqliteDirSubRgn, &fileStat) == -1,
+      std::string sqliteDirSubRgn =
+          sqlite_dir + "/" + boost::asio::ip::host_name() + '_' +
+          std::to_string(boost::this_process::get_id()) + "/_" +
+          regionPtr->getName() + "_SubRegion/file_0.db";
+      ASSERT(!boost::filesystem::exists(sqliteDirSubRgn),
              "persistence file still present");
     }
     // cache close
@@ -428,11 +399,10 @@
 BEGIN_TEST(OverFlowTest_absPath)
   {
     std::shared_ptr<RegionAttributes> attrsPtr;
-    char currWDPath[512];
-    char *wdPath = ACE_OS::getcwd(currWDPath, 512);
-    ASSERT(wdPath != nullptr,
-           "Expected current Working Directory to be NON-nullptr");
-    std::string absPersistenceDir = std::string(wdPath) + "/absSqLite";
+    auto wdPath = boost::filesystem::current_path().string();
+    ASSERT(!wdPath.empty(),
+           "Expected current Working Directory to be not empty");
+    std::string absPersistenceDir = wdPath + "/absSqLite";
 
     /** Creating a cache to manage regions. */
     std::shared_ptr<Properties> sqliteProperties;
@@ -473,11 +443,9 @@
       subRegion->destroyRegion();
       ASSERT(subRegion->isDestroyed(), "Expected region is not destroyed ");
       subRegion = nullptr;
-      char fileName[512];
-      sprintf(fileName, "%s/%s/%s.db", absPersistenceDir.c_str(), "SubRegion",
-              "SubRegion");
-      ACE_stat fileStat;
-      ASSERT(ACE_OS::stat(fileName, &fileStat) == -1,
+
+      std::string fileName = absPersistenceDir + "/SubRegion/SubRegion.db";
+      ASSERT(!boost::filesystem::exists(fileName),
              "persistence file still present");
     }
     // cache close
@@ -512,10 +480,8 @@
                  &ex) {  // expected sqlite full exception
                          // catching generic message as we dont
                          // have any specific sqlitefull exception
-      char buffer[1024];
-      sprintf(buffer, "Got expected exception %s: msg = %s",
-              ex.getName().c_str(), ex.what());
-      LOG(buffer);
+      LOG(std::string("Got expected exception ") + ex.getName() +
+          "; msg = " + ex.what());
     }
 
     // cache close
@@ -569,18 +535,16 @@
       setAttributes(regionAttributes);
       subRegion = regionPtr->createSubregion("SubRegion", regionAttributes);
       ASSERT(subRegion != nullptr, "Expected region to be NON-nullptr");
-      char fileName[512];
-      sprintf(fileName, "%s/%s/%s.db", sqlite_dir.c_str(), "SubRegion",
-              "SubRegion");
-      ACE_stat fileStat;
-      ASSERT(ACE_OS::stat(fileName, &fileStat) == 0,
+
+      std::string fileName = sqlite_dir + "/SubRegion/SubRegion.db";
+      ASSERT(boost::filesystem::exists(fileName),
              "persistence file not present");
       doNput(subRegion, 50);
       doNget(subRegion, 50);
       subRegion->destroyRegion();
       ASSERT(subRegion->isDestroyed(), "Expected region is not destroyed ");
       subRegion = nullptr;
-      ASSERT(ACE_OS::stat(fileName, &fileStat) == -1,
+      ASSERT(!boost::filesystem::exists(fileName),
              "persistence file still present");
     }
     // cache close
diff --git a/cppcache/integration-test/testPdxMetadataCheckTest.cpp b/cppcache/integration-test/testPdxMetadataCheckTest.cpp
index d11d1f2..30f38b9 100644
--- a/cppcache/integration-test/testPdxMetadataCheckTest.cpp
+++ b/cppcache/integration-test/testPdxMetadataCheckTest.cpp
@@ -19,9 +19,6 @@
 
 #include "fw_dunit.hpp"
 
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-
 #include <geode/PdxInstance.hpp>
 #include <geode/UserFunctionExecutionException.hpp>
 #include <geode/FunctionService.hpp>
@@ -69,7 +66,7 @@
 bool isLocalServer = false;
 
 const char *poolNames[] = {"Pool1", "Pool2", "Pool3"};
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 bool isPoolConfig = false;  // To track if pool case is running
 // const char * qRegionNames[] = { "Portfolios", "Positions", "Portfolios2",
@@ -89,7 +86,7 @@
   // Create just one pool and attach all regions to that.
   initClient(true, isPdxIgnoreUnreadFields);
   isPoolConfig = true;
-  createPool(poolNames[0], locHostPort, nullptr, 0, false);
+  createPool(poolNames[0], locHostPort, {}, 0, false);
   createRegionAndAttachPool("DistRegionAck", USE_ACK, poolNames[0],
                             true /*Caching enabled*/);
   LOG("StepOne complete.");
@@ -99,7 +96,7 @@
   // Create just one pool and attach all regions to that.
   initClient(true, isPdxIgnoreUnreadFields);
   isPoolConfig = true;
-  createPool(poolNames[0], locHostPort, nullptr, 0,
+  createPool(poolNames[0], locHostPort, {}, 0,
              true /*ClientNotification enabled*/);
   createRegionAndAttachPool("DistRegionAck", USE_ACK, poolNames[0],
                             true /*Caching enabled*/);
diff --git a/cppcache/integration-test/testRegionAccessThreadSafe.cpp b/cppcache/integration-test/testRegionAccessThreadSafe.cpp
index cc0530e..6943c95 100644
--- a/cppcache/integration-test/testRegionAccessThreadSafe.cpp
+++ b/cppcache/integration-test/testRegionAccessThreadSafe.cpp
@@ -16,34 +16,27 @@
  */
 #include "fw_dunit.hpp"
 #include "ThinClientHelper.hpp"
-#include <ace/Task.h>
-#include <ace/Recursive_Thread_Mutex.h>
+
+#include <atomic>
 
 using apache::geode::client::Exception;
 
-class GetRegionThread : public ACE_Task_Base {
+class GetRegionThread {
  public:
-  bool m_running;
-  std::string m_path;
-  std::string m_subPath;
-  bool m_regionCreateDone;
-  bool m_subRegionCreateDone;
-  ACE_Recursive_Thread_Mutex m_mutex;
   GetRegionThread(const char *path, const char *subPath)
       : m_running(false),
         m_path(path),
         m_subPath(subPath),
         m_regionCreateDone(false),
-        m_subRegionCreateDone(false),
-        m_mutex() {}
-  int svc(void) {
-    while (m_running == true) {
+        m_subRegionCreateDone(false) {}
+
+  void run() {
+    while (m_running) {
       SLEEP(40);
       try {
         auto rptr = getHelper()->getRegion(m_path.c_str());
         if (rptr != nullptr) {
-          ACE_Guard<ACE_Recursive_Thread_Mutex> guard(m_mutex);
-          ASSERT(m_regionCreateDone == true, "regionCreate Not Done");
+          ASSERT(m_regionCreateDone, "regionCreate Not Done");
         }
       } catch (Exception &ex) {
         LOG(ex.what());
@@ -58,9 +51,8 @@
       try {
         auto rptr = getHelper()->getRegion(m_subPath.c_str());
         if (rptr != nullptr) {
-          ACE_Guard<ACE_Recursive_Thread_Mutex> guard(m_mutex);
-          ASSERT(m_subRegionCreateDone == true, "subRegionCreate Not Done");
-          return 0;
+          ASSERT(m_subRegionCreateDone, "subRegionCreate Not Done");
+          return;
         }
       } catch (Exception &ex) {
         LOG(ex.what());
@@ -70,30 +62,37 @@
         LOG("getRegion: unknown exception");
       }
     }
-    return 0;
   }
-  void setRegionFlag() {
-    ACE_Guard<ACE_Recursive_Thread_Mutex> guard(m_mutex);
-    m_regionCreateDone = true;
-  }
-  void setSubRegionFlag() {
-    ACE_Guard<ACE_Recursive_Thread_Mutex> guard(m_mutex);
-    m_subRegionCreateDone = true;
-  }
+
+  void setRegionFlag() { m_regionCreateDone = true; }
+
+  void setSubRegionFlag() { m_subRegionCreateDone = true; }
+
   void start() {
     m_running = true;
-    activate();
+    thread_ = std::thread{[this]() { run(); }};
   }
+
   void stop() {
     m_running = false;
-    wait();
+    if (thread_.joinable()) {
+      thread_.join();
+    }
   }
+
+ protected:
+  bool m_running;
+  std::string m_path;
+  std::thread thread_;
+  std::string m_subPath;
+  std::atomic<bool> m_regionCreateDone;
+  std::atomic<bool> m_subRegionCreateDone;
 };
 
 static int numberOfLocators = 1;
 bool isLocalServer = true;
 bool isLocator = true;
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 GetRegionThread *getThread = nullptr;
 std::shared_ptr<Region> regionPtr;
diff --git a/cppcache/integration-test/testRegionMap.cpp b/cppcache/integration-test/testRegionMap.cpp
index 1ef6adc..eabc194 100644
--- a/cppcache/integration-test/testRegionMap.cpp
+++ b/cppcache/integration-test/testRegionMap.cpp
@@ -40,21 +40,17 @@
   // put more than 10 items... verify limit is held.
   uint32_t i;
   for (i = 0; i < 10; i++) {
-    char buf[100];
-    sprintf(buf, "%d", i);
-    auto key = CacheableKey::create(buf);
-    sprintf(buf, "value of %d", i);
-    auto valuePtr = cacheHelper.createCacheable(buf);
+    auto key = CacheableKey::create(std::to_string(i));
+    auto val = std::string("value of ") + std::to_string(i);
+    auto valuePtr = cacheHelper.createCacheable(val.c_str());
     regionPtr->put(key, valuePtr);
     auto&& vecKeys = regionPtr->keys();
     ASSERT(vecKeys.size() == (i + 1), "expected more entries");
   }
   for (i = 10; i < 20; i++) {
-    char buf[100];
-    sprintf(buf, "%d", i);
-    auto key = CacheableKey::create(buf);
-    sprintf(buf, "value of %d", i);
-    auto valuePtr = cacheHelper.createCacheable(buf);
+    auto key = CacheableKey::create(std::to_string(i));
+    auto val = std::string("value of ") + std::to_string(i);
+    auto valuePtr = cacheHelper.createCacheable(val.c_str());
     regionPtr->put(key, valuePtr);
     auto&& vecKeys = regionPtr->keys();
     cacheHelper.showKeys(vecKeys);
@@ -84,11 +80,9 @@
   // put more than 10 items... verify limit is held.
   uint32_t i;
   for (i = 0; i < 20; i++) {
-    char buf[100];
-    sprintf(buf, "%d", i);
-    auto key = CacheableKey::create(buf);
-    sprintf(buf, "value of %d", i);
-    auto valuePtr = cacheHelper.createCacheable(buf);
+    auto key = CacheableKey::create(std::to_string(i));
+    auto val = std::string("value of ") + std::to_string(i);
+    auto valuePtr = cacheHelper.createCacheable(val.c_str());
     regionPtr->put(key, valuePtr);
     auto&& vecKeys = regionPtr->keys();
     cacheHelper.showKeys(vecKeys);
@@ -109,11 +103,9 @@
   /** @TODO make this local scope and re-increase the iterations... would also
    * like to time it. */
   for (i = 0; i < 1000; i++) {
-    char buf[100];
-    sprintf(buf, "%d", i);
-    auto key = CacheableKey::create(buf);
-    sprintf(buf, "value of %d", i);
-    auto valuePtr = cacheHelper.createCacheable(buf);
+    auto key = CacheableKey::create(std::to_string(i));
+    auto val = std::string("value of ") + std::to_string(i);
+    auto valuePtr = cacheHelper.createCacheable(val.c_str());
     regionPtr->put(key, valuePtr);
     auto&& vecKeys = regionPtr->keys();
     ASSERT(vecKeys.size() == (i < 10 ? i + 1 : 10), "expected more entries");
@@ -129,19 +121,16 @@
   // put more than 10 items... verify limit is held.
   uint32_t i;
   for (i = 0; i < 10; i++) {
-    char buf[100];
-    sprintf(buf, "%d", i);
-    auto key = CacheableKey::create(buf);
-    sprintf(buf, "value of %d", i);
-    auto valuePtr = cacheHelper.createCacheable(buf);
+    auto key = CacheableKey::create(std::to_string(i));
+    auto val = std::string("value of ") + std::to_string(i);
+    auto valuePtr = cacheHelper.createCacheable(val.c_str());
     regionPtr->put(key, valuePtr);
     auto&& vecKeys = regionPtr->keys();
     ASSERT(vecKeys.size() == (i + 1), "expected more entries");
   }
   for (i = 0; i < 10; i++) {
     char buf[100];
-    sprintf(buf, "%d", i);
-    auto key = CacheableKey::create(buf);
+    auto key = CacheableKey::create(std::to_string(i));
     regionPtr->destroy(key);
     std::cout
         << "removed key "
@@ -151,11 +140,9 @@
   auto&& vecKeys = regionPtr->keys();
   ASSERT(vecKeys.size() == 0, "expected more entries");
   for (i = 20; i < 40; i++) {
-    char buf[100];
-    sprintf(buf, "%d", i);
-    auto key = CacheableKey::create(buf);
-    sprintf(buf, "value of %d", i);
-    auto valuePtr = cacheHelper.createCacheable(buf);
+    auto key = CacheableKey::create(std::to_string(i));
+    auto val = std::string("value of ") + std::to_string(i);
+    auto valuePtr = cacheHelper.createCacheable(val.c_str());
     regionPtr->put(key, valuePtr);
   }
   vecKeys = regionPtr->keys();
diff --git a/cppcache/integration-test/testSerialization.cpp b/cppcache/integration-test/testSerialization.cpp
index 3c95ddd..6925b52 100644
--- a/cppcache/integration-test/testSerialization.cpp
+++ b/cppcache/integration-test/testSerialization.cpp
@@ -18,8 +18,6 @@
 #include <cinttypes>
 #include <memory>
 
-#include <geode/internal/geode_base.hpp>
-
 #include "fw_dunit.hpp"
 #include "ThinClientHelper.hpp"
 
@@ -39,8 +37,6 @@
 using apache::geode::client::DataSerializable;
 
 int32_t g_classIdToReturn = 0x04;
-int32_t g_classIdToReturn2 = 0x1234;
-int32_t g_classIdToReturn4 = 0x123456;
 
 template <class T>
 std::shared_ptr<T> duplicate(const std::shared_ptr<T> &orig) {
@@ -103,27 +99,30 @@
     ot->m_struct.b = (i % 2 == 0) ? true : false;
     ot->m_struct.c = static_cast<char>(65) + i;
     ot->m_struct.d = ((2.0) * static_cast<double>(i));
+    ot->m_struct.e = (static_cast<uint64_t>(i) << 32) + i;
 
-    printf("Created OtherType: %d, %s, %c, %e\n", ot->m_struct.a,
-           ot->m_struct.b ? "true" : "false", ot->m_struct.c, ot->m_struct.d);
+    std::cout << "Created OtherType: " << ot->m_struct.a << ", "
+              << (ot->m_struct.b ? "true" : "false") << ", " << ot->m_struct.c
+              << ", " << ot->m_struct.d << "\n";
 
-    printf("double hex 0x%016" PRIX64 "\n", ot->m_struct.e);
+    std::cout << "double hex 0x" << std::setw(16) << std::setfill('0')
+              << ot->m_struct.e << "\n";
 
     return std::move(ot);
   }
 
   static void validateCT(int32_t i, const std::shared_ptr<Cacheable> otPtr) {
-    char logmsg[1000];
-    sprintf(logmsg, "validateCT for %d", i);
-    LOG(logmsg);
+    LOG(std::string("validateCT for ") + std::to_string(i));
     XASSERT(otPtr != nullptr);
     auto ot = std::dynamic_pointer_cast<OtherType>(otPtr);
     XASSERT(ot != nullptr);
 
-    printf("Validating OtherType: %d, %s, %c, %e\n", ot->m_struct.a,
-           ot->m_struct.b ? "true" : "false", ot->m_struct.c, ot->m_struct.d);
+    std::cout << "Validating OtherType: " << ot->m_struct.a << ", "
+              << (ot->m_struct.b ? "true" : "false") << ", " << ot->m_struct.c
+              << ", " << ot->m_struct.d << "\n";
 
-    printf("double hex 0x%016" PRIX64 "\n", ot->m_struct.e);
+    std::cout << "double hex 0x" << std::setw(16) << std::setfill('0')
+              << ot->m_struct.e << "\n";
 
     XASSERT(ot->m_struct.a == static_cast<int>(i));
     XASSERT(ot->m_struct.b == ((i % 2 == 0) ? true : false));
diff --git a/cppcache/integration-test/testSpinLock.cpp b/cppcache/integration-test/testSpinLock.cpp
index ec93060..b2f2242 100644
--- a/cppcache/integration-test/testSpinLock.cpp
+++ b/cppcache/integration-test/testSpinLock.cpp
@@ -18,14 +18,13 @@
 #include "fw_dunit.hpp"
 
 #include <mutex>
-#include <util/concurrent/spinlock_mutex.hpp>
 
-#include <ace/Task.h>
-#include <ace/Time_Value.h>
-#include <ace/Guard_T.h>
+#include "util/concurrent/binary_semaphore.hpp"
+#include "util/concurrent/spinlock_mutex.hpp"
 
 namespace {  // NOLINT(google-build-namespaces)
 
+using apache::geode::client::binary_semaphore;
 using apache::geode::util::concurrent::spinlock_mutex;
 
 DUNIT_TASK(s1p1, Basic)
@@ -35,83 +34,112 @@
   }
 END_TASK(Basic)
 
-perf::Semaphore *triggerA;
-perf::Semaphore *triggerB;
-perf::Semaphore *triggerM;
-
 spinlock_mutex lock;
-ACE_Time_Value *btime;
+std::chrono::steady_clock::time_point btime;
 
-class ThreadA : public ACE_Task_Base {
+class ThreadA {
  public:
-  ThreadA() : ACE_Task_Base() {}
+  ThreadA(binary_semaphore& triggerA, binary_semaphore& triggerM)
+      : triggerA_{triggerA}, triggerM_{triggerM} {}
 
-  int svc() {
-    {
-      std::lock_guard<spinlock_mutex> lk(lock);
-      LOG("ThreadA: Acquired lock x.");
-      triggerM->release();
-      triggerA->acquire();
-    }
-    LOG("ThreadA: Released lock.");
-    return 0;
+  ~ThreadA() { stop(); }
+
+  void start() {
+    thread_ = std::thread{[this]() { run(); }};
   }
+
+  void stop() {
+    if (thread_.joinable()) {
+      thread_.join();
+    }
+  }
+
+ protected:
+  void run() {
+    std::lock_guard<spinlock_mutex> lk(lock);
+    LOG("ThreadA: Acquired lock x.");
+    triggerM_.release();
+    triggerA_.acquire();
+
+    LOG("ThreadA: Released lock.");
+  }
+
+ protected:
+  std::thread thread_;
+  binary_semaphore& triggerA_;
+  binary_semaphore& triggerM_;
 };
 
-class ThreadB : public ACE_Task_Base {
+class ThreadB {
  public:
-  ThreadB() : ACE_Task_Base() {}
+  ThreadB(binary_semaphore& triggerB, binary_semaphore& triggerM)
+      : triggerB_{triggerB}, triggerM_{triggerM} {}
 
-  int svc() {
-    triggerB->acquire();
-    {
-      std::lock_guard<spinlock_mutex> lk(lock);
-      btime = new ACE_Time_Value(ACE_OS::gettimeofday());
-      LOG("ThreadB: Acquired lock.");
-      triggerM->release();
-    }
-    return 0;
+  ~ThreadB() { stop(); }
+
+  void start() {
+    thread_ = std::thread{[this]() { run(); }};
   }
+
+  void stop() {
+    if (thread_.joinable()) {
+      thread_.join();
+    }
+  }
+
+ protected:
+  void run() {
+    triggerB_.acquire();
+
+    std::lock_guard<spinlock_mutex> lk(lock);
+    btime = std::chrono::steady_clock::now();
+    LOG("ThreadB: Acquired lock.");
+    triggerM_.release();
+  }
+
+ protected:
+  std::thread thread_;
+  binary_semaphore& triggerB_;
+  binary_semaphore& triggerM_;
 };
 
 DUNIT_TASK(s1p1, TwoThreads)
   {
-    triggerA = new perf::Semaphore(0);
-    triggerB = new perf::Semaphore(0);
-    triggerM = new perf::Semaphore(0);
+    binary_semaphore triggerA{0};
+    binary_semaphore triggerB{0};
+    binary_semaphore triggerM{0};
 
-    ThreadA *threadA = new ThreadA();
-    ThreadB *threadB = new ThreadB();
+    ThreadA threadA{triggerA, triggerM};
+    ThreadB threadB{triggerB, triggerM};
 
-    threadA->activate();
-    threadB->activate();
+    threadA.start();
+    threadB.start();
 
     // A runs, locks the spinlock, and triggers me. B is idle.
-    triggerM->acquire();
+    triggerM.acquire();
     // A is now idle, but holds lock. Tell B to acquire the lock
-    ACE_Time_Value stime = ACE_OS::gettimeofday();
-    triggerB->release();
+    auto stime = std::chrono::steady_clock::now();
+    triggerB.release();
     SLEEP(5000);
     // B will be stuck until we tell A to release it.
-    triggerA->release();
+    triggerA.release();
     // wait until B tells us it has acquired the lock.
-    triggerM->acquire();
+    triggerM.acquire();
 
     // Now diff btime (when B acquired the lock) and stime to see that it
     // took longer than the 5000 seconds before A released it.
-    ACE_Time_Value delta = *btime - stime;
-    char msg[1024];
-    sprintf(msg, "acquire delay was %lu\n", delta.msec());
-    LOG(msg);
-    ASSERT(delta.msec() >= 4900, "Expected 5 second or more spinlock delay");
+    auto delta =
+        std::chrono::duration_cast<std::chrono::milliseconds>(btime - stime)
+            .count();
+
+    LOG("acquire delay was " + std::to_string(delta));
+    ASSERT(delta >= 4900, "Expected 5 second or more spinlock delay");
     // Note the test is against 4900 instead of 5000 as there are some
     // measurement
     // issues. Often delta comes back as 4999 on linux.
 
-    threadA->wait();
-    delete threadA;
-    threadB->wait();
-    delete threadB;
+    threadA.stop();
+    threadB.stop();
   }
 END_TASK(TwoThreads)
 
diff --git a/cppcache/integration-test/testSystemProperties.cpp b/cppcache/integration-test/testSystemProperties.cpp
index b8ac576..b865f46 100644
--- a/cppcache/integration-test/testSystemProperties.cpp
+++ b/cppcache/integration-test/testSystemProperties.cpp
@@ -40,8 +40,8 @@
   if (tempValue == nullptr) {
     return (false);
   }
-  flag = strcmp(tempValue->value().c_str(), value);
-  return (!flag);
+
+  return tempValue->value() == value;
 }
 
 BEGIN_TEST(DEFAULT)
@@ -58,7 +58,7 @@
     ASSERT(statisticsArchiveFileName == "statArchive.gfs",
            "Expected statisticsArchiveFileName == \"statArchive.gfs\"");
     auto &&logLevel = Log::levelToChars(systemProperties->logLevel());
-    ASSERT_STREQ("config", logLevel);
+    ASSERT_STREQ(std::string{"config"}, logLevel);
     delete systemProperties;
   }
 END_TEST(DEFAULT)
@@ -67,7 +67,7 @@
   {
     // When the tests are run from the build script the environment variable
     // TESTSRC is set.
-    std::string testSource(ACE_OS::getenv("TESTSRC"));
+    std::string testSource(std::getenv("TESTSRC"));
     std::string filePath = testSource + "/resources/system.properties";
 
     // Make sure product can at least log to stdout.
diff --git a/cppcache/integration-test/testThinClientAfterRegionLive.cpp b/cppcache/integration-test/testThinClientAfterRegionLive.cpp
index 7944d11..9d6a2af 100644
--- a/cppcache/integration-test/testThinClientAfterRegionLive.cpp
+++ b/cppcache/integration-test/testThinClientAfterRegionLive.cpp
@@ -32,7 +32,7 @@
 static int numberOfLocators = 1;
 static bool isRegionLive[4] = {false, false, false, false};
 static bool isRegionDead[4] = {false, false, false, false};
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 
 class DisconnectCacheListioner : public CacheListener {
diff --git a/cppcache/integration-test/testThinClientBigValue.cpp b/cppcache/integration-test/testThinClientBigValue.cpp
index 5c2ad19..754bf43 100644
--- a/cppcache/integration-test/testThinClientBigValue.cpp
+++ b/cppcache/integration-test/testThinClientBigValue.cpp
@@ -16,11 +16,13 @@
  */
 
 #include <cinttypes>
+#include <sstream>
 
 #include <geode/internal/geode_base.hpp>
 
 #include "fw_dunit.hpp"
 #include "ThinClientHelper.hpp"
+#include "testUtils.hpp"
 
 #define CLIENT1 s1p1
 #define CLIENT2 s1p2
@@ -35,10 +37,11 @@
 using apache::geode::client::CacheableInt32;
 using apache::geode::client::CacheableInt64;
 
+using unitTests::TestUtils;
+
 void grow(int *iptr) { *iptr = *iptr + GROWTH; }
 
 void putSize(std::shared_ptr<Region> &rptr, const char *buf, int size) {
-  char msg[1024];
   auto keyPtr = CacheableKey::create(buf);
   uint8_t base = 0;
 
@@ -54,19 +57,17 @@
   auto valPtr =
       CacheableBytes::create(std::vector<int8_t>(valbuf, valbuf + size));
   // auto valPtr = CacheableString::create( valbuf);
-  sprintf(msg, "about to put key: %s, with value size: %d", buf, size);
-  LOG(msg);
+  auto msg = std::string("put key: ") + buf +
+             ", with value size : " + std::to_string(size);
+  LOG(std::string("about to ") + msg);
   rptr->put(keyPtr, valPtr);
   delete[] valbuf;
-  sprintf(msg, "put key: %s, with value size: %d", buf, size);
   LOG(msg);
 }
 
 void verify(std::shared_ptr<CacheableBytes> &valuePtr, int size) {
-  char msg[200];
-  sprintf(msg, "verifying value of size %d", size);
-  ASSERT(size == 0 || valuePtr != nullptr, msg);
-  sprintf(msg, "value size is not %d", size);
+  ASSERT(size == 0 || valuePtr != nullptr,
+         std::string("verifying value of size ") + std::to_string(size));
   int tryCnt = 0;
   bool notIt = true;
   int valSize = (valuePtr != nullptr ? valuePtr->length() : 0);
@@ -75,16 +76,18 @@
     SLEEP(100);
   }
 
-  ASSERT(valSize == size, msg);
+  ASSERT(valSize == size,
+         std::string("value size is not %d") + std::to_string(size));
 
   auto &&bytes = reinterpret_cast<const uint8_t *>(valuePtr->value().data());
   uint8_t base = 0;
   for (int i = 0; i < size; i++) {
     if (bytes[i] != base) {
-      sprintf(msg, "verifying buf[%d] == %d for size %d, found %d instead", i,
-              base, size, valuePtr->value()[i]);
+      std::stringstream strm;
+      strm << "verifying buf[" << i << "] == " << base << " for size " << size
+           << ", found " << valuePtr->value()[i] << " instead";
+      ASSERT(false, strm.str());
     }
-    ASSERT(bytes[i] == base, msg);
     if (base == 255) {
       base = 0;
     } else {
@@ -96,7 +99,7 @@
 static int numberOfLocators = 1;
 bool isLocalServer = true;
 bool isLocator = true;
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 
 DUNIT_TASK(SERVER1, StartServer)
@@ -135,14 +138,14 @@
     LOG("Beginning puts.");
     int expectEntries = 0;
     for (int i = 0; i <= MAX_PAYLOAD; grow(&i)) {
-      sprintf(buf, "put size=%d\n", i);
-      LOG(buf);
-      char keybuf[100];
-      sprintf(keybuf, "key%010d", i);
-      putSize(regPtr, keybuf, i);
+      LOG(std::string("put size=") + std::to_string(i));
+      auto keyName =
+          std::string("key") + TestUtils::zeroPaddedStringFromInt(i, 10);
+      putSize(regPtr, keyName.c_str(), i);
       expectEntries++;
     }
-    dunit::globals()->rebind("entriesToExpect", expectEntries);
+
+    dunit::globals().find_or_construct<int>("entriesToExpect")(expectEntries);
     LOG("Finished putting entries.");
   }
 END_TASK(puts)
@@ -151,12 +154,11 @@
   {
     auto regPtr = getHelper()->getRegion(regionNames[0]);
     // region should already have n entries...
-    dunit::globals()->getIntValue("entriesToExpect");
 
     for (int i = 0; i <= MAX_PAYLOAD; grow(&i)) {
-      char keybuf[100];
-      sprintf(keybuf, "key%010d", i);
-      auto keyPtr = CacheableKey::create(keybuf);
+      auto keyName =
+          std::string("key") + TestUtils::zeroPaddedStringFromInt(i, 10);
+      auto keyPtr = CacheableKey::create(keyName);
       auto valPtr =
           std::dynamic_pointer_cast<CacheableBytes>(regPtr->get(keyPtr));
       int ntry = 20;
@@ -179,12 +181,15 @@
     char keybuf[100];
     char valbuf[200];
     for (int index = 0; index < MAX_PUTS; ++index) {
-      sprintf(keybuf, "keys1%010d", index);
-      sprintf(valbuf, "values1%0100d", index);
-      regPtr->put(keybuf, valbuf);
+      auto key =
+          std::string("keys1") + TestUtils::zeroPaddedStringFromInt(index, 10);
+      auto value = std::string("values1") +
+                   TestUtils::zeroPaddedStringFromInt(index, 100);
+      regPtr->put(key, value);
       expectEntries++;
     }
-    dunit::globals()->rebind("entriesToExpect", expectEntries);
+
+    dunit::globals().find_or_construct<int>("entriesToExpect")(expectEntries);
     LOG("Finished putting entries.");
   }
 END_TASK(ManyPuts)
@@ -193,13 +198,14 @@
   {
     auto regPtr = getHelper()->getRegion(regionNames[0]);
     // region should already have n entries...
-    int entriesExpected = dunit::globals()->getIntValue("entriesToExpect");
+    auto entriesExpected = dunit::globals().find<int>("entriesToExpect").first;
+    ASSERT(entriesExpected != nullptr, "entriesExpected is null");
 
-    char keybuf[100];
-    for (int index = 0; index < entriesExpected; ++index) {
-      sprintf(keybuf, "keys1%010d", index);
+    for (int index = 0; index < *entriesExpected; ++index) {
+      auto key =
+          std::string("keys1") + TestUtils::zeroPaddedStringFromInt(index, 10);
       auto valPtr =
-          std::dynamic_pointer_cast<CacheableString>(regPtr->get(keybuf));
+          std::dynamic_pointer_cast<CacheableString>(regPtr->get(key));
       ASSERT(valPtr != nullptr, "expected non-null value");
       ASSERT(valPtr->length() == 107, "unexpected size of value in verify");
     }
@@ -212,15 +218,16 @@
     auto regPtr = getHelper()->getRegion(regionNames[0]);
     LOG("Beginning updated many puts.");
     int expectEntries = 0;
-    char keybuf[100];
-    char valbuf[1100];
     for (int index = 0; index < MAX_PUTS; ++index) {
-      sprintf(keybuf, "keys1%010d", index);
-      sprintf(valbuf, "values2%01000d", index);
-      regPtr->put(keybuf, valbuf);
+      auto key =
+          std::string("keys1") + TestUtils::zeroPaddedStringFromInt(index, 10);
+      auto value = std::string("values2") +
+                   TestUtils::zeroPaddedStringFromInt(index, 1000);
+      regPtr->put(key, value);
       expectEntries++;
     }
-    dunit::globals()->rebind("entriesToExpect", expectEntries);
+
+    dunit::globals().find_or_construct<int>("entriesToExpect")(expectEntries);
     LOG("Finished putting entries.");
   }
 END_TASK(UpdateManyPuts)
@@ -229,13 +236,14 @@
   {
     // region should given old entries from cache
     auto regPtr = getHelper()->getRegion(regionNames[0]);
-    int entriesExpected = dunit::globals()->getIntValue("entriesToExpect");
+    auto entriesExpected = dunit::globals().find<int>("entriesToExpect").first;
+    ASSERT(entriesExpected != nullptr, "entriesExpected is null");
 
-    char keybuf[100];
-    for (int index = 0; index < entriesExpected; ++index) {
-      sprintf(keybuf, "keys1%010d", index);
+    for (int index = 0; index < *entriesExpected; ++index) {
+      auto key =
+          std::string("keys1") + TestUtils::zeroPaddedStringFromInt(index, 10);
       auto valPtr =
-          std::dynamic_pointer_cast<CacheableString>(regPtr->get(keybuf));
+          std::dynamic_pointer_cast<CacheableString>(regPtr->get(key));
       ASSERT(valPtr != nullptr, "expected non-null value");
       ASSERT(valPtr->length() == 107, "unexpected size of value in verify");
     }
@@ -248,15 +256,17 @@
   {
     auto regPtr = getHelper()->getRegion(regionNames[0]);
     // region should already have n entries...
-    int entriesExpected = dunit::globals()->getIntValue("entriesToExpect");
+    auto entriesExpected = dunit::globals().find<int>("entriesToExpect").first;
+    ASSERT(entriesExpected != nullptr, "entriesExpected is null");
+
     // invalidate the region to force getting new values
     regPtr->localInvalidateRegion();
 
-    char keybuf[100];
-    for (int index = 0; index < entriesExpected; ++index) {
-      sprintf(keybuf, "keys1%010d", index);
+    for (int index = 0; index < *entriesExpected; ++index) {
+      auto key =
+          std::string("keys1") + TestUtils::zeroPaddedStringFromInt(index, 10);
       auto valPtr =
-          std::dynamic_pointer_cast<CacheableString>(regPtr->get(keybuf));
+          std::dynamic_pointer_cast<CacheableString>(regPtr->get(key));
       ASSERT(valPtr != nullptr, "expected non-null value");
       ASSERT(valPtr->length() == 1007, "unexpected size of value in verify");
     }
@@ -269,22 +279,25 @@
   {
     auto regPtr = getHelper()->getRegion(regionNames[0]);
     // region should already have n entries...
-    int entriesExpected = dunit::globals()->getIntValue("entriesToExpect");
+    auto entriesExpected = dunit::globals().find<int>("entriesToExpect").first;
+    ASSERT(entriesExpected != nullptr, "entriesExpected is null");
+
     // invalidate the region to force getting new values
     regPtr->localInvalidateRegion();
 
     std::vector<std::shared_ptr<CacheableKey>> vec;
-    char keybuf[100];
-    for (int index = 0; index < entriesExpected; ++index) {
-      sprintf(keybuf, "keys1%010d", index);
-      vec.push_back(CacheableKey::create(keybuf));
+    for (int index = 0; index < *entriesExpected; ++index) {
+      auto key =
+          std::string("keys1") + TestUtils::zeroPaddedStringFromInt(index, 10);
+      vec.push_back(CacheableKey::create(key));
     }
     regPtr->getAll(vec);
     LOG("On client getAll for entries completed.");
-    for (int index = 0; index < entriesExpected; ++index) {
-      sprintf(keybuf, "keys1%010d", index);
+    for (int index = 0; index < *entriesExpected; ++index) {
+      auto key =
+          std::string("keys1") + TestUtils::zeroPaddedStringFromInt(index, 10);
       auto valPtr =
-          std::dynamic_pointer_cast<CacheableString>(regPtr->get(keybuf));
+          std::dynamic_pointer_cast<CacheableString>(regPtr->get(key));
       ASSERT(valPtr != nullptr, "expected non-null value");
       ASSERT(valPtr->length() == 1007, "unexpected size of value in verify");
     }
@@ -301,11 +314,14 @@
     char valbuf[1100];
     for (int64_t index = 0; index < MAX_PUTS; ++index) {
       int64_t key = index * index * index;
-      sprintf(valbuf, "values3%0200" PRId64, index);
-      regPtr->put(CacheableInt64::create(key), valbuf);
+      auto value =
+          std::string("values3") +
+          TestUtils::zeroPaddedStringFromInt(static_cast<int32_t>(index), 200);
+      regPtr->put(CacheableInt64::create(key), value);
       expectEntries++;
     }
-    dunit::globals()->rebind("entriesToExpect", expectEntries);
+
+    dunit::globals().find_or_construct<int>("entriesToExpect")(expectEntries);
     LOG("Finished putting int64 entries.");
   }
 END_TASK(UpdateManyPutsInt64)
@@ -313,9 +329,10 @@
 DUNIT_TASK(CLIENT2, VerifyManyPutsInt64)
   {
     auto regPtr = getHelper()->getRegion(regionNames[0]);
-    int entriesExpected = dunit::globals()->getIntValue("entriesToExpect");
+    auto entriesExpected = dunit::globals().find<int>("entriesToExpect").first;
+    ASSERT(entriesExpected != nullptr, "entriesExpected is null");
 
-    for (int64_t index = 0; index < entriesExpected; ++index) {
+    for (int64_t index = 0; index < *entriesExpected; ++index) {
       int64_t key = index * index * index;
       // auto valPtr =
       // std::dynamic_pointer_cast<CacheableString>(regPtr->get(key));
@@ -326,7 +343,7 @@
     }
     LOG("On client Found all int64 entries with "
         "correct size via get.");
-    for (int64_t index = 0; index < entriesExpected; ++index) {
+    for (int64_t index = 0; index < *entriesExpected; ++index) {
       // auto key =
       // CacheableKey::create(CacheableInt64::create(index
       // * index * index));
@@ -347,19 +364,21 @@
   {
     auto regPtr = getHelper()->getRegion(regionNames[0]);
     // region should already have n entries...
-    int entriesExpected = dunit::globals()->getIntValue("entriesToExpect");
+    auto entriesExpected = dunit::globals().find<int>("entriesToExpect").first;
+    ASSERT(entriesExpected != nullptr, "entriesExpected is null");
+
     // invalidate the region to force getting new
     // values
     regPtr->localInvalidateRegion();
 
     std::vector<std::shared_ptr<CacheableKey>> vec;
-    for (int64_t index = 0; index < entriesExpected; ++index) {
+    for (int64_t index = 0; index < *entriesExpected; ++index) {
       int64_t key = index * index * index;
       vec.push_back(CacheableInt64::create(key));
     }
     const auto valuesMap = regPtr->getAll(vec);
     LOG("On client getAll for int64 entries completed.");
-    for (int32_t index = 0; index < entriesExpected; ++index) {
+    for (int32_t index = 0; index < *entriesExpected; ++index) {
       auto key = vec[index];
       ASSERT(regPtr->containsKey(key), "must contain key");
       auto entry = regPtr->getEntry(key);
diff --git a/cppcache/integration-test/testThinClientCacheableStringArray.cpp b/cppcache/integration-test/testThinClientCacheableStringArray.cpp
index 57807d8..3f3f00e 100644
--- a/cppcache/integration-test/testThinClientCacheableStringArray.cpp
+++ b/cppcache/integration-test/testThinClientCacheableStringArray.cpp
@@ -15,9 +15,7 @@
  * limitations under the License.
  */
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-#include <ace/Task.h>
+
 #include <string>
 
 #define ROOT_NAME "TestThinClientCacheableStringArray"
@@ -46,7 +44,7 @@
 static int numberOfLocators = 1;
 bool isLocalServer = true;
 bool isLocator = true;
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 
 const char *_regionNames[] = {"Portfolios", "Positions"};
@@ -100,36 +98,33 @@
       auto &&qry = qs->newQuery(qryStr);
       auto &&results = qry->execute();
 
-      char buf[100];
       auto count = results->size();
-      sprintf(buf, "results size=%zd", count);
-      LOG(buf);
+      LOG(std::string("results size=") + std::to_string(count));
       for (auto &&ser : hacks::range(*results)) {
         count--;
 
         if (auto portfolio = std::dynamic_pointer_cast<Portfolio>(ser)) {
-          printf("   query pulled portfolio object ID %d, pkid %s\n",
-                 portfolio->getID(), portfolio->getPkid()->value().c_str());
+          std::cout << "   query pulled portfolio object ID "
+                    << portfolio->getID() << ", pkid "
+                    << portfolio->getPkid()->value() << "\n";
         } else if (auto position = std::dynamic_pointer_cast<Position>(ser)) {
-          printf("   query  pulled position object secId %s, shares %d\n",
-                 position->getSecId()->value().c_str(),
-                 position->getSharesOutstanding());
+          std::cout << "   query  pulled position object secId "
+                    << position->getSecId()->value() << ", shares "
+                    << position->getSharesOutstanding() << "\n";
         } else if (ser) {
-          printf(" query pulled object %s\n", ser->toString().c_str());
+          std::cout << " query pulled object " << ser->toString() << "\n";
         } else {
-          printf("   query pulled nullptr object\n");
+          std::cout << "   query pulled nullptr object\n";
         }
       }
-      sprintf(buf, "results last count=%zd", count);
-      LOG(buf);
+      LOG(std::string("results last count=") + std::to_string(count));
     } catch (IllegalStateException &ise) {
-      char isemsg[500] = {0};
-      ACE_OS::snprintf(isemsg, 499, "IllegalStateException: %s", ise.what());
-      LOG(isemsg);
-      FAIL(isemsg);
+      std::string excpmsg = "IllegalStateException: " + std::string{ise.what()};
+
+      LOG(excpmsg);
+      FAIL(excpmsg);
     } catch (Exception &excp) {
-      char excpmsg[500] = {0};
-      ACE_OS::snprintf(excpmsg, 499, "Exception: %s", excp.what());
+      std::string excpmsg = "Exception: " + std::string{excp.what()};
       LOG(excpmsg);
       FAIL(excpmsg);
     } catch (...) {
diff --git a/cppcache/integration-test/testThinClientCacheables.cpp b/cppcache/integration-test/testThinClientCacheables.cpp
index f4912b9..2762e87 100644
--- a/cppcache/integration-test/testThinClientCacheables.cpp
+++ b/cppcache/integration-test/testThinClientCacheables.cpp
@@ -22,9 +22,7 @@
 #include "BuiltinCacheableWrappers.hpp"
 #include "Utils.hpp"
 
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-
+#include <iostream>
 #include <string>
 
 #include "CacheHelper.hpp"
@@ -78,8 +76,9 @@
 void createRegion(const char *name, bool ackMode,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << "  ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
                                           clientNotificationEnabled);
   ASSERT(regPtr != nullptr, "Failed to create region.");
@@ -107,8 +106,8 @@
     auto int32val = std::dynamic_pointer_cast<CacheableInt32>(
         verifyReg->get(static_cast<int32_t>(keychksum)));
     if (int32val == nullptr) {
-      printf("GetsTask::keychksum: %u, key: %s\n", keychksum,
-             Utils::nullSafeToString(key).c_str());
+      std::cout << "GetsTask::keychksum: " << keychksum
+                << ", key: " << Utils::nullSafeToString(key) << "\n";
       FAIL("Could not find the checksum for the given key.");
     }
     uint32_t valchksum = static_cast<uint32_t>(int32val->value());
@@ -168,10 +167,11 @@
     DSCode keyTypeId = keyTypes[keyTypeIndex];
     DSCode valTypeId = valueTypes[valueTypeIndex];
 
-    printf("PutsTask::keyType = %s and valType = %s and taskIndexPut = %d\n",
-           CacheableWrapperFactory::getTypeForId(keyTypeId).c_str(),
-           CacheableWrapperFactory::getTypeForId(valTypeId).c_str(),
-           taskIndexPut);
+    std::cout << "PutsTask::keyType = "
+              << CacheableWrapperFactory::getTypeForId(keyTypeId)
+              << " and valType = "
+              << CacheableWrapperFactory::getTypeForId(valTypeId)
+              << " and taskIndexPut = " << taskIndexPut << "\n";
 
     CacheableWrapper *key = CacheableWrapperFactory::createInstance(keyTypeId);
     int maxKeys =
@@ -241,10 +241,11 @@
     DSCode keyTypeId = keyTypes[keyTypeIndex];
     DSCode valTypeId = valueTypes[valueTypeIndex];
 
-    printf("GetsTask::keyType = %s and valType = %s and taskIndexGet = %d\n",
-           CacheableWrapperFactory::getTypeForId(keyTypeId).c_str(),
-           CacheableWrapperFactory::getTypeForId(valTypeId).c_str(),
-           taskIndexGet);
+    std::cout << "GetsTask::keyType = "
+              << CacheableWrapperFactory::getTypeForId(keyTypeId)
+              << " and valType = "
+              << CacheableWrapperFactory::getTypeForId(valTypeId)
+              << " and taskIndexGet = " << taskIndexGet << "\n";
 
     CacheableWrapper *key = CacheableWrapperFactory::createInstance(keyTypeId);
     int maxKeys =
diff --git a/cppcache/integration-test/testThinClientCacheablesLimits.cpp b/cppcache/integration-test/testThinClientCacheablesLimits.cpp
index e2bbfaa..bb6c17c 100644
--- a/cppcache/integration-test/testThinClientCacheablesLimits.cpp
+++ b/cppcache/integration-test/testThinClientCacheablesLimits.cpp
@@ -21,9 +21,6 @@
 #include "fw_dunit.hpp"
 #include "BuiltinCacheableWrappers.hpp"
 
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-
 #include <cstring>
 
 #include "CacheHelper.hpp"
@@ -39,7 +36,7 @@
 static bool isLocator = false;
 static bool isLocalServer = true;
 static int numberOfLocators = 1;
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 #include "LocatorHelper.hpp"
 
@@ -55,15 +52,13 @@
 #define KEY_BYTE "key_byte"
 #define KEY_EMPTY_BYTESARR "key_empty_bytes_array"
 #define KEY_STRING "key_string"
-#define FAIL_MESSAGE                                               \
-  "Byte sent and received at boundAry condition are not same for " \
-  "CacheableBytes or CacheableString for item %d"
 
 void createRegion(const char *name, bool ackMode,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr = getHelper()->createRegion(name, ackMode, false, nullptr,
                                           clientNotificationEnabled);
   ASSERT(regPtr != nullptr, "Failed to create region.");
@@ -102,8 +97,7 @@
 
 DUNIT_TASK_DEFINITION(CLIENT1, StepOne)
   {
-    initClientWithPool(true, "__TEST_POOL1__", locatorsG, nullptr, nullptr, 0,
-                       true);
+    initClientWithPool(true, "__TEST_POOL1__", locatorsG, {}, nullptr, 0, true);
     getHelper()->createPooledRegion(_regionNames[1], NO_ACK, locatorsG,
                                     "__TEST_POOL1__", false, false);
     LOG("StepOne complete.");
@@ -131,11 +125,12 @@
       char msgAssert1[100];
       char msgAssert2[100];
 
-      sprintf(msgAssert1, "Contains Key byte failed for item %d ", count);
-      sprintf(msgAssert2, "Contains Key String failed for item %d ", count);
-
-      ASSERT(!verifyReg->containsKey(KEY_BYTE), msgAssert1);
-      ASSERT(!verifyReg->containsKey(KEY_STRING), msgAssert2);
+      ASSERT(!verifyReg->containsKey(KEY_BYTE),
+             std::string("Contains Key byte failed for item ") +
+                 std::to_string(count));
+      ASSERT(!verifyReg->containsKey(KEY_STRING),
+             std::string("Contains Key String failed for item ") +
+                 std::to_string(count));
       ASSERT(!verifyReg->containsKey(KEY_EMPTY_BYTESARR),
              "Contains key failed for empty bytes array");
       ASSERT(!verifyReg->containsValueForKey(KEY_EMPTY_BYTESARR),
@@ -162,13 +157,15 @@
            !memcmp(stringPtrReturn->value().c_str(),
                    stringPtrSent->value().c_str(), stringPtrReturn->length()));
       if (isSameBytes && isSameString) {
-        char logMSG[100];
-        sprintf(logMSG, "Compare %d Passed for length %d", count,
-                keyArr[count]);
-        LOG(logMSG);
+        auto msg = std::string("Compare ") + std::to_string(count) +
+                   " Passed for length " + std::to_string(keyArr[count]);
+        LOG(msg);
       }
-      char failmsg[250];
-      sprintf(failmsg, FAIL_MESSAGE, count);
+      auto failmsg =
+          std::string(
+              "Byte sent and received at boundAry condition are not same for "
+              "CacheableBytes or CacheableString for item ") +
+          std::to_string(count);
       ASSERT((isSameBytes && isSameString), failmsg);
 
       ASSERT(emptyBytesArrReturn->length() == 0,
diff --git a/cppcache/integration-test/testThinClientClearRegion.cpp b/cppcache/integration-test/testThinClientClearRegion.cpp
index b1dc869..c353b5d 100644
--- a/cppcache/integration-test/testThinClientClearRegion.cpp
+++ b/cppcache/integration-test/testThinClientClearRegion.cpp
@@ -53,7 +53,7 @@
 static int numberOfLocators = 1;
 bool isLocalServer = true;
 bool isLocator = true;
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 
 DUNIT_TASK(SERVER1, StartServer)
diff --git a/cppcache/integration-test/testThinClientConflation.cpp b/cppcache/integration-test/testThinClientConflation.cpp
index 17954d5..18c2ed7 100644
--- a/cppcache/integration-test/testThinClientConflation.cpp
+++ b/cppcache/integration-test/testThinClientConflation.cpp
@@ -54,33 +54,34 @@
     if (valuePtr != nullptr) {
       m_value = valuePtr->value();
     }
-    sprintf(buf, "Key = %s, Value = %d", keyPtr->toString().c_str(),
-            valuePtr->value());
-    LOG(buf);
+    auto msg = std::string("Key = ") + keyPtr->toString() +
+               ", Value = " + std::to_string(valuePtr->value());
+    LOG(msg);
   }
 
  public:
   OperMonitor() : m_events(0), m_value(0) {}
-  ~OperMonitor() {}
+  ~OperMonitor() noexcept override = default;
 
-  virtual void afterCreate(const EntryEvent &event) { check(event); }
+  void afterCreate(const EntryEvent &event) override { check(event); }
 
-  virtual void afterUpdate(const EntryEvent &event) { check(event); }
+  void afterUpdate(const EntryEvent &event) override { check(event); }
 
   void validate(bool conflation) {
     LOG("validate called");
-    char buf[256] = {'\0'};
 
     if (conflation) {
-      sprintf(buf, "Conflation On: Expected events = 2, Actual = %d", m_events);
-      ASSERT(m_events == 2, buf);
+      auto msg = std::string("Conflation On: Expected events = 2, Actual = ") +
+                 std::to_string(m_events);
+      ASSERT(m_events == 2, msg);
     } else {
-      sprintf(buf, "Conflation Off: Expected events = 5, Actual = %d",
-              m_events);
-      ASSERT(m_events == 5, buf);
+      auto msg = std::string("Conflation Off: Expected events = 5, Actual = ") +
+                 std::to_string(m_events);
+      ASSERT(m_events == 5, msg);
     }
-    sprintf(buf, "Expected Value = 5, Actual = %d", m_value);
-    ASSERT(m_value == 5, buf);
+    auto msg =
+        std::string("Expected Value = 5, Actual = ") + std::to_string(m_value);
+    ASSERT(m_value == 5, msg);
   }
 };
 
diff --git a/cppcache/integration-test/testThinClientCq.cpp b/cppcache/integration-test/testThinClientCq.cpp
index 7a32dd3..987a5a8 100644
--- a/cppcache/integration-test/testThinClientCq.cpp
+++ b/cppcache/integration-test/testThinClientCq.cpp
@@ -16,21 +16,17 @@
  */
 #include "fw_dunit.hpp"
 #include <geode/CqAttributesFactory.hpp>
-#include <geode/CqAttributes.hpp>
 #include <geode/CqListener.hpp>
 #include <geode/CqStatusListener.hpp>
-#include <geode/CqQuery.hpp>
 #include <geode/CqServiceStatistics.hpp>
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include <string>
+#include <sstream>
 
 #define ROOT_NAME "TestThinClientCq"
 #define ROOT_SCOPE DISTRIBUTED_ACK
 
 #include "CacheHelper.hpp"
 
-#include "QueryStrings.hpp"
 #include "QueryHelper.hpp"
 
 #include <geode/Query.hpp>
@@ -59,7 +55,7 @@
 
 static bool m_isPdx = false;
 
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 const char *cqNames[MAX_LISTNER] = {"MyCq_0", "MyCq_1", "MyCq_2", "MyCq_3",
                                     "MyCq_4", "MyCq_5", "MyCq_6", "MyCq_7"};
@@ -161,15 +157,15 @@
     }
   }
 
-  void onEvent(const CqEvent &cqe) {
+  void onEvent(const CqEvent &cqe) override {
     //  LOG("MyCqListener::OnEvent called");
     updateCount(cqe);
   }
-  void onError(const CqEvent &cqe) {
+  void onError(const CqEvent &cqe) override {
     updateCount(cqe);
     //   LOG("MyCqListener::OnError called");
   }
-  void close() {
+  void close() override {
     //   LOG("MyCqListener::close called");
   }
 };
@@ -225,20 +221,22 @@
     }
   }
 
-  void onEvent(const CqEvent &cqe) {
+  void onEvent(const CqEvent &cqe) override {
     LOGINFO("MyCqStatusListener::OnEvent %d called", m_id);
     updateCount(cqe);
   }
-  void onError(const CqEvent &cqe) {
+  void onError(const CqEvent &cqe) override {
     updateCount(cqe);
     LOGINFO("MyCqStatusListener::OnError %d called", m_id);
   }
-  void close() { LOGINFO("MyCqStatusListener::close %d called", m_id); }
-  void onCqDisconnected() {
+  void close() override {
+    LOGINFO("MyCqStatusListener::close %d called", m_id);
+  }
+  void onCqDisconnected() override {
     LOGINFO("MyCqStatusListener %d got onCqDisconnected", m_id);
     m_cqsDisconnectedCount++;
   }
-  void onCqConnected() {
+  void onCqConnected() override {
     LOGINFO("MyCqStatusListener %d got onCqConnected", m_id);
     m_cqsConnectedCount++;
   }
@@ -296,7 +294,7 @@
 void createServer_group(bool locator, const char *XML) {
   LOG("Starting SERVER1...");
   if (isLocalServer) {
-    CacheHelper::initServer(1, XML, locator ? locHostPort : nullptr);
+    CacheHelper::initServer(1, XML, locator ? locHostPort : std::string{});
   }
   LOG("SERVER1 started");
 }
@@ -304,7 +302,7 @@
 void createServer_group2(bool locator, const char *XML) {
   LOG("Starting SERVER2...");
   if (isLocalServer) {
-    CacheHelper::initServer(2, XML, locator ? locHostPort : nullptr);
+    CacheHelper::initServer(2, XML, locator ? locHostPort : std::string{});
   }
   LOG("SERVER2 started");
 }
@@ -506,6 +504,7 @@
 DUNIT_TASK_DEFINITION(CLIENT1, StepFour)
   {
     QueryHelper::getHelper();
+    std::stringstream strm;
 
     auto pool =
         getHelper()->getCache()->getPoolManager().find(regionNamesCq[0]);
@@ -517,8 +516,6 @@
       qs = getHelper()->cachePtr->getQueryService();
     }
 
-    char buf[1024];
-
     uint8_t i = 0;
     int j = 0;
     uint32_t inserts[MAX_LISTNER];
@@ -534,16 +531,18 @@
 
     CqAttributesFactory cqFac;
     for (i = 0; i < MAX_LISTNER; i++) {
-      sprintf(buf, "get info for cq[%s]:", cqNames[i]);
-      LOG(buf);
+      strm.str("");
+      strm << "get info for cq[" << cqNames[i] << "]:";
+      LOG(strm.str());
+
       auto cqy = qs->getCq(cqNames[i]);
       auto cqStats = cqy->getStatistics();
-      sprintf(buf,
-              "Cq[%s]From CqStatistics: numInserts[%d], numDeletes[%d], "
-              "numUpdates[%d], numEvents[%d]",
-              cqNames[i], cqStats->numInserts(), cqStats->numDeletes(),
-              cqStats->numUpdates(), cqStats->numEvents());
-      LOG(buf);
+      strm.str("");
+      strm << "Cq[" << cqNames[i] << "] From CqStatistics : numInserts["
+           << cqStats->numInserts() << "], numDeletes[" << cqStats->numDeletes()
+           << "], numUpdates[" << cqStats->numUpdates() << "], numEvents["
+           << cqStats->numEvents() << "]";
+      LOG(strm.str());
       for (j = 0; j <= i; j++) {
         inserts[j] += cqStats->numInserts();
         updates[j] += cqStats->numUpdates();
@@ -552,9 +551,10 @@
       }
       auto cqAttr = cqy->getCqAttributes();
       auto vl = cqAttr->getCqListeners();
-      sprintf(buf, "number of listeners for cq[%s] is %zd", cqNames[i],
-              vl.size());
-      LOG(buf);
+      strm.str("");
+      strm << "number of listeners for cq[" << cqNames[i] << "] is "
+           << vl.size();
+      LOG(strm.str());
       ASSERT(vl.size() == static_cast<size_t>(i + 1),
              "incorrect number of listeners");
       if (i == (MAX_LISTNER - 1)) {
@@ -565,17 +565,18 @@
         }
         for (j = 0; j < MAX_LISTNER; j++) {
           MyCqListener *ml = myLl[j];
-          sprintf(buf,
-                  "MyCount for Listener[%d]: numInserts[%d], numDeletes[%d], "
-                  "numUpdates[%d], numEvents[%d]",
-                  j, ml->getNumInserts(), ml->getNumDeletes(),
-                  ml->getNumUpdates(), ml->getNumEvents());
-          LOG(buf);
-          sprintf(buf,
-                  "sum of stats for Listener[%d]: numInserts[%d], "
-                  "numDeletes[%d], numUpdates[%d], numEvents[%d]",
-                  j, inserts[j], deletes[j], updates[j], events[j]);
-          LOG(buf);
+          strm.str("");
+          strm << "MyCount for Listener[" << j << "]: numInserts["
+               << ml->getNumInserts() << "], numDeletes[" << ml->getNumDeletes()
+               << "], numUpdates[" << ml->getNumUpdates() << "], numEvents["
+               << ml->getNumEvents() << "]";
+          LOG(strm.str());
+          strm.str("");
+          strm << "sum of stats for Listener[" << j << "]: numInserts["
+               << inserts[j] << "], numDeletes[" << deletes[j]
+               << "], numUpdates[" << updates[j] << "], numEvents[" << events[j]
+               << "]";
+          LOG(strm.str());
           ASSERT(ml->getNumInserts() == inserts[j],
                  "accumulative insert count incorrect");
           ASSERT(ml->getNumUpdates() == updates[j],
@@ -590,20 +591,23 @@
         auto ptr = vl[0];
         cqAttrMtor.removeCqListener(ptr);
         vl = cqAttr->getCqListeners();
-        sprintf(buf, "number of listeners for cq[%s] is %zd", cqNames[i],
-                vl.size());
-        LOG(buf);
+        strm.str("");
+        strm << "number of listeners for cq[" << cqNames[i] << "] is "
+             << vl.size();
+        LOG(strm.str());
         ASSERT(vl.size() == i, "incorrect number of listeners");
       }
     }
+
     try {
       auto cqy = qs->getCq(cqNames[1]);
       cqy->stop();
 
       cqy = qs->getCq(cqNames[6]);
 
-      sprintf(buf, "cq[%s] should have been running!", cqNames[6]);
-      ASSERT(cqy->isRunning() == true, buf);
+      strm.str("");
+      strm << "cq[" << cqNames[6] << "] should have been running!";
+      ASSERT(cqy->isRunning() == true, strm.str());
       bool got_exception = false;
       try {
         cqy->execute();
@@ -615,23 +619,27 @@
         LOG(failmsg.c_str());
         got_exception = true;
       }
-      sprintf(buf, "cq[%s] should gotten exception!", cqNames[6]);
-      ASSERT(got_exception == true, buf);
+      strm.str("");
+      strm << "cq[" << cqNames[6] << "] should have gotten exception!";
+      ASSERT(got_exception == true, strm.str());
 
       cqy->stop();
 
-      sprintf(buf, "cq[%s] should have been stopped!", cqNames[6]);
-      ASSERT(cqy->isStopped() == true, buf);
+      strm.str("");
+      strm << "cq[" << cqNames[6] << "] should have been stopped!";
+      ASSERT(cqy->isStopped() == true, strm.str());
 
       cqy = qs->getCq(cqNames[2]);
       cqy->close();
 
-      sprintf(buf, "cq[%s] should have been closed!", cqNames[2]);
-      ASSERT(cqy->isClosed() == true, buf);
+      strm.str("");
+      strm << "cq[" << cqNames[2] << "] should have been closed!";
+      ASSERT(cqy->isClosed() == true, strm.str());
 
       cqy = qs->getCq(cqNames[2]);
-      sprintf(buf, "cq[%s] should have been removed after close!", cqNames[2]);
-      ASSERT(cqy == nullptr, buf);
+      strm.str("");
+      strm << "cq[" << cqNames[2] << "] should have been removed after close!";
+      ASSERT(cqy == nullptr, strm.str());
     } catch (Exception &excp) {
       std::string failmsg = "";
       failmsg += excp.getName();
@@ -643,24 +651,13 @@
     }
     auto serviceStats = qs->getCqServiceStatistics();
     ASSERT(serviceStats != nullptr, "serviceStats is nullptr");
-    sprintf(buf,
-            "numCqsActive=%d, numCqsCreated=%d, "
-            "numCqsClosed=%d,numCqsStopped=%d, numCqsOnClient=%d",
-            serviceStats->numCqsActive(), serviceStats->numCqsCreated(),
-            serviceStats->numCqsClosed(), serviceStats->numCqsStopped(),
-            serviceStats->numCqsOnClient());
-    LOG(buf);
-    /*
-    for(i=0; i < MAX_LISTNER; i++)
-    {
-    auto cqy = qs->getCq(cqNames[i]);
-     CqState state = cqy->getState();
-     CqState cqState;
-     cqState.setState(state);
-     sprintf(buf, "cq[%s] is in state[%s]", cqNames[i], cqState.toString());
-     LOG(buf);
-    }
-    */
+    strm.str("");
+    strm << "numCqsActive=" << serviceStats->numCqsActive()
+         << ", numCqsCreated = " << serviceStats->numCqsCreated()
+         << ", numCqsClosed= " << serviceStats->numCqsClosed()
+         << ", numCqsStopped=" << serviceStats->numCqsStopped()
+         << ", numCqsOnClient=" << serviceStats->numCqsOnClient();
+    LOG(strm.str());
 
     ASSERT(serviceStats->numCqsActive() == 6, "active count incorrect!");
     ASSERT(serviceStats->numCqsCreated() == 9, "created count incorrect!");
@@ -679,13 +676,13 @@
       FAIL(failmsg.c_str());
       LOG(excp.getStackTrace());
     }
-    sprintf(buf,
-            "numCqsActive=%d, numCqsCreated=%d, "
-            "numCqsClosed=%d,numCqsStopped=%d, numCqsOnClient=%d",
-            serviceStats->numCqsActive(), serviceStats->numCqsCreated(),
-            serviceStats->numCqsClosed(), serviceStats->numCqsStopped(),
-            serviceStats->numCqsOnClient());
-    LOG(buf);
+    strm.str("");
+    strm << "numCqsActive=" << serviceStats->numCqsActive()
+         << ", numCqsCreated = " << serviceStats->numCqsCreated()
+         << ", numCqsClosed= " << serviceStats->numCqsClosed()
+         << ", numCqsStopped=" << serviceStats->numCqsStopped()
+         << ", numCqsOnClient=" << serviceStats->numCqsOnClient();
+    LOG(strm.str());
     ASSERT(serviceStats->numCqsActive() == 0, "active count incorrect!");
     ASSERT(serviceStats->numCqsCreated() == 9, "created count incorrect!");
     ASSERT(serviceStats->numCqsClosed() == 1, "closed count incorrect!");
@@ -702,13 +699,13 @@
       FAIL(failmsg.c_str());
       LOG(excp.getStackTrace());
     }
-    sprintf(buf,
-            "numCqsActive=%d, numCqsCreated=%d, "
-            "numCqsClosed=%d,numCqsStopped=%d, numCqsOnClient=%d",
-            serviceStats->numCqsActive(), serviceStats->numCqsCreated(),
-            serviceStats->numCqsClosed(), serviceStats->numCqsStopped(),
-            serviceStats->numCqsOnClient());
-    LOG(buf);
+    strm.str("");
+    strm << "numCqsActive=" << serviceStats->numCqsActive()
+         << ", numCqsCreated = " << serviceStats->numCqsCreated()
+         << ", numCqsClosed= " << serviceStats->numCqsClosed()
+         << ", numCqsStopped=" << serviceStats->numCqsStopped()
+         << ", numCqsOnClient=" << serviceStats->numCqsOnClient();
+    LOG(strm.str());
     ASSERT(serviceStats->numCqsActive() == 0, "active count incorrect!");
     ASSERT(serviceStats->numCqsCreated() == 9, "created count incorrect!");
     ASSERT(serviceStats->numCqsClosed() == 9, "closed count incorrect!");
@@ -890,13 +887,15 @@
     char KeyStr[256] = {0};
     char valStr[256] = {0};
     for (int i = 1; i <= 5; i++) {
-      ACE_OS::snprintf(KeyStr, 256, "Key-%d ", i);
-      ACE_OS::snprintf(valStr, 256, "val-%d ", i);
-      auto keyport = CacheableKey::create(KeyStr);
-      auto valport = CacheableString::create(valStr);
+      std::string key = "Key-" + std::to_string(i);
+      std::string value = "val-" + std::to_string(i);
+
+      auto keyport = CacheableKey::create(key);
+      auto valport = CacheableString::create(value);
+
       regPtr0->put(keyport, valport);
       regPtr1->put(keyport, valport);
-      SLEEP(10 * 1000);  // sleep a while to allow server query to complete
+      SLEEP(10000);  // sleep a while to allow server query to complete
     }
     LOGINFO("putEntries complete");
 
@@ -1030,16 +1029,16 @@
     auto regPtr0 = getHelper()->getRegion(regionName);
     auto regPtr1 = getHelper()->getRegion(regionName1);
     std::shared_ptr<Cacheable> val = nullptr;
-    char KeyStr[256] = {0};
-    char valStr[256] = {0};
     for (int i = 1; i <= 5; i++) {
-      ACE_OS::snprintf(KeyStr, 256, "Key-%d ", i);
-      ACE_OS::snprintf(valStr, 256, "val-%d ", i);
-      auto keyport = CacheableKey::create(KeyStr);
-      auto valport = CacheableString::create(valStr);
+      std::string key = "Key-" + std::to_string(i);
+      std::string value = "val-" + std::to_string(i);
+
+      auto keyport = CacheableKey::create(key);
+      auto valport = CacheableString::create(value);
+
       regPtr0->put(keyport, valport);
       regPtr1->put(keyport, valport);
-      SLEEP(10 * 1000);  // sleep a while to allow server query to complete
+      SLEEP(10000);  // sleep a while to allow server query to complete
     }
     LOGINFO("putEntries complete");
   }
@@ -1098,15 +1097,15 @@
 
     auto regPtr0 = getHelper()->getRegion(regionName);
     std::shared_ptr<Cacheable> val = nullptr;
-    char KeyStr[256] = {0};
-    char valStr[256] = {0};
     for (int i = 1; i <= 5; i++) {
-      ACE_OS::snprintf(KeyStr, 256, "Key-%d ", i);
-      ACE_OS::snprintf(valStr, 256, "val-%d ", i);
-      auto keyport = CacheableKey::create(KeyStr);
-      auto valport = CacheableString::create(valStr);
+      std::string key = "Key-" + std::to_string(i);
+      std::string value = "val-" + std::to_string(i);
+
+      auto keyport = CacheableKey::create(key);
+      auto valport = CacheableString::create(value);
+
       regPtr0->put(keyport, valport);
-      SLEEP(10 * 1000);  // sleep a while to allow server query to complete
+      SLEEP(10000);  // sleep a while to allow server query to complete
     }
     LOGINFO("putEntries complete");
 
@@ -1157,12 +1156,14 @@
     myStatusCq2->clear();
 
     for (int i = 1; i <= 5; i++) {
-      ACE_OS::snprintf(KeyStr, 256, "Key-%d ", i);
-      ACE_OS::snprintf(valStr, 256, "val-%d ", i);
-      auto keyport = CacheableKey::create(KeyStr);
-      auto valport = CacheableString::create(valStr);
+      std::string key = "Key-" + std::to_string(i);
+      std::string value = "val-" + std::to_string(i);
+
+      auto keyport = CacheableKey::create(key);
+      auto valport = CacheableString::create(value);
+
       regPtr0->put(keyport, valport);
-      SLEEP(10 * 1000);  // sleep a while to allow server query to complete
+      SLEEP(10000);  // sleep a while to allow server query to complete
     }
     LOGINFO("putEntries complete again");
 
diff --git a/cppcache/integration-test/testThinClientCqDelta.cpp b/cppcache/integration-test/testThinClientCqDelta.cpp
index b5577cc..ff52730 100644
--- a/cppcache/integration-test/testThinClientCqDelta.cpp
+++ b/cppcache/integration-test/testThinClientCqDelta.cpp
@@ -60,7 +60,7 @@
  public:
   CqDeltaListener() : m_deltaCount(0), m_valueCount(0) {}
 
-  virtual void onEvent(const CqEvent &aCqEvent) {
+  void onEvent(const CqEvent &aCqEvent) override {
     auto deltaValue = aCqEvent.getDeltaValue();
     DeltaTestImpl newValue;
     auto input = getHelper()->getCache()->createDataInput(
@@ -106,13 +106,15 @@
   }
 }
 
-void createPooledRegion(const char *name, bool ackMode, const char *locators,
-                        const char *poolname,
+void createPooledRegion(const std::string &name, bool ackMode,
+                        const std::string &locators,
+                        const std::string &poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name.c_str() << " ackMode is "
+            << ackMode << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -136,8 +138,9 @@
 void createRegion(const char *name, bool ackMode,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   // ack, caching
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
                                           clientNotificationEnabled);
diff --git a/cppcache/integration-test/testThinClientCqDurable.cpp b/cppcache/integration-test/testThinClientCqDurable.cpp
index 348687b..d0785fe 100644
--- a/cppcache/integration-test/testThinClientCqDurable.cpp
+++ b/cppcache/integration-test/testThinClientCqDurable.cpp
@@ -16,12 +16,10 @@
  */
 
 #include <string>
+#include <sstream>
 #include <thread>
 #include <chrono>
 
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-
 #include <geode/CqAttributesFactory.hpp>
 #include <geode/CqAttributes.hpp>
 #include <geode/CqListener.hpp>
@@ -171,7 +169,7 @@
   LOG("Starting SERVER1...");
   if (isLocalServer) {
     CacheHelper::initServer(1, "remotequery.xml",
-                            locator ? locatorsG : nullptr);
+                            locator ? locatorsG : std::string{});
   }
   LOG("SERVER1 started");
 }
@@ -179,7 +177,7 @@
 void createServer_XML() {
   LOG("Starting SERVER...");
   if (isLocalServer) {
-    CacheHelper::initServer(1, "serverDurableClient.xml", nullptr);
+    CacheHelper::initServer(1, "serverDurableClient.xml");
   }
   LOG("SERVER started");
 }
@@ -418,10 +416,7 @@
       auto &&results = qry->executeWithInitialResults();
 
       LOG("EXECUTE 1 STOP");
-      auto count = results->size();
-      char buf[100];
-      sprintf(buf, "results size=%zd", count);
-      LOG(buf);
+      LOG(std::string("results size=") + std::to_string(results->size()));
     } catch (const Exception &excp) {
       std::string logmsg = "";
       logmsg += excp.getName();
@@ -579,14 +574,15 @@
       cqy->stop();
       SLEEP(1500);  // sleep 0.025 min to allow server stop query to complete
       auto cqStats = cqy->getStatistics();
-      sprintf(buf,
-              "numInserts[%d], numDeletes[%d], numUpdates[%d], numEvents[%d]",
-              cqStats->numInserts(), cqStats->numDeletes(),
-              cqStats->numUpdates(), cqStats->numEvents());
-      LOG(buf);
-      sprintf(buf, "MyCount:onEventCount=%d, onErrorCount=%d", onEventCount,
-              onErrorCount);
-      LOG(buf);
+      std::stringstream strm;
+      strm << "numInserts[" << cqStats->numInserts() << "], numDeletes["
+           << cqStats->numDeletes() << "], numUpdates[" << cqStats->numUpdates()
+           << "], numEvents[" << cqStats->numEvents() << "]";
+      LOG(strm.str());
+      strm.str("");
+      strm << "MyCount:onEventCount=" << onEventCount
+           << ", onErrorCount = " << onErrorCount;
+      LOG(strm.str());
       ASSERT(cqStats->numEvents() > 0, "stats incorrect!");
       cqy->close();
     } catch (Exception &excp) {
diff --git a/cppcache/integration-test/testThinClientCqFailover.cpp b/cppcache/integration-test/testThinClientCqFailover.cpp
index 09f56dd..07b7d1a 100644
--- a/cppcache/integration-test/testThinClientCqFailover.cpp
+++ b/cppcache/integration-test/testThinClientCqFailover.cpp
@@ -19,9 +19,7 @@
 #include <geode/CqAttributes.hpp>
 #include <geode/CqListener.hpp>
 #include <geode/CqQuery.hpp>
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-#include <ace/Task.h>
+
 #include <string>
 
 #define ROOT_NAME "TestThinClientCqFailover"
@@ -88,29 +86,23 @@
   void close() override { LOG("MyCqListener::close called"); }
 };
 
-class KillServerThread : public ACE_Task_Base {
+class KillServerThread {
  public:
-  bool m_running;
-  MyCqListener *m_listener;
-  explicit KillServerThread(MyCqListener *listener)
-      : m_running(false), m_listener(listener) {}
-  int svc(void) {
-    while (m_running == true) {
+  void start() {
+    thread_ = std::thread{[]() {
       CacheHelper::closeServer(1);
       LOG("THREAD CLOSED SERVER 1");
-      // m_listener->setFailedOver();
-      m_running = false;
-    }
-    return 0;
+    }};
   }
-  void start() {
-    m_running = true;
-    activate();
-  }
+
   void stop() {
-    m_running = false;
-    wait();
+    if (thread_.joinable()) {
+      thread_.join();
+    }
   }
+
+ protected:
+  std::thread thread_;
 };
 
 void initClientCq(const bool isthinClient) {
@@ -227,13 +219,13 @@
 
       SLEEP(15000);
     } catch (IllegalStateException &ise) {
-      char isemsg[500] = {0};
-      ACE_OS::snprintf(isemsg, 499, "IllegalStateException: %s", ise.what());
-      LOG(isemsg);
-      FAIL(isemsg);
+      std::string excpmsg = "IllegalStateException: " + std::string{ise.what()};
+
+      LOG(excpmsg);
+      FAIL(excpmsg);
     } catch (Exception &excp) {
-      char excpmsg[500] = {0};
-      ACE_OS::snprintf(excpmsg, 499, "Exception: %s", excp.what());
+      std::string excpmsg = "Exception: " + std::string{excp.what()};
+
       LOG(excpmsg);
       FAIL(excpmsg);
     } catch (...) {
@@ -287,19 +279,19 @@
       auto vl = cqAttr->getCqListeners();
       cqLstner = vl[0];
     } catch (Exception &excp) {
-      char excpmsg[500] = {0};
-      ACE_OS::snprintf(excpmsg, 499, "Exception: %s", excp.what());
+      std::string excpmsg = "Exception: " + std::string{excp.what()};
+
       LOG(excpmsg);
       ASSERT(false, "get listener failed");
     }
     ASSERT(cqLstner != nullptr, "listener is nullptr");
     auto myListener = dynamic_cast<MyCqListener *>(cqLstner.get());
     ASSERT(myListener != nullptr, "my listener is nullptr<cast failed>");
-    kst = new KillServerThread(myListener);
-    char buf[1024];
-    sprintf(buf, "before kill server 1, before=%d, after=%d",
-            myListener->getCountBefore(), myListener->getCountAfter());
-    LOG(buf);
+
+    kst = new KillServerThread();
+    LOG(std::string("before kill server 1, before=") +
+        std::to_string(myListener->getCountBefore()) +
+        ", after=" + std::to_string(myListener->getCountAfter()));
     ASSERT(myListener->getCountAfter() == 0,
            "cq after failover should be zero");
     ASSERT(myListener->getCountBefore() == 6109,
@@ -374,18 +366,17 @@
       auto vl = cqAttr->getCqListeners();
       cqLstner = vl[0];
     } catch (Exception &excp) {
-      char excpmsg[500] = {0};
-      ACE_OS::snprintf(excpmsg, 499, "Exception: %s", excp.what());
+      std::string excpmsg = "Exception: " + std::string{excp.what()};
+
       LOG(excpmsg);
       ASSERT(false, "get listener failed");
     }
     ASSERT(cqLstner != nullptr, "listener is nullptr");
     auto myListener = dynamic_cast<MyCqListener *>(cqLstner.get());
     ASSERT(myListener != nullptr, "my listener is nullptr<cast failed>");
-    char buf[1024];
-    sprintf(buf, "after failed over: before=%d, after=%d",
-            myListener->getCountBefore(), myListener->getCountAfter());
-    LOG(buf);
+    LOG(std::string("after failed over: before=") +
+        std::to_string(myListener->getCountBefore()) +
+        ", after=" + std::to_string(myListener->getCountAfter()));
     ASSERT(myListener->getCountBefore() == 6109,
            "check cq event count before failover");
     ASSERT(myListener->getCountAfter() == 509,
diff --git a/cppcache/integration-test/testThinClientCqHAFailover.cpp b/cppcache/integration-test/testThinClientCqHAFailover.cpp
index 790f9a6..2006fa9 100644
--- a/cppcache/integration-test/testThinClientCqHAFailover.cpp
+++ b/cppcache/integration-test/testThinClientCqHAFailover.cpp
@@ -19,9 +19,7 @@
 #include <geode/CqAttributes.hpp>
 #include <geode/CqListener.hpp>
 #include <geode/CqQuery.hpp>
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-#include <ace/Task.h>
+
 #include <string>
 
 #define ROOT_NAME "TestThinClientCqHAFailover"
@@ -87,29 +85,23 @@
   void close() override { LOG("MyCqListener::close called"); }
 };
 
-class KillServerThread : public ACE_Task_Base {
+class KillServerThread {
  public:
-  bool m_running;
-  MyCqListener *m_listener;
-  explicit KillServerThread(MyCqListener *listener)
-      : m_running(false), m_listener(listener) {}
-  int svc(void) {
-    while (m_running == true) {
+  void start() {
+    thread_ = std::thread{[]() {
       CacheHelper::closeServer(1);
       LOG("THREAD CLOSED SERVER 1");
-      // m_listener->setFailedOver();
-      m_running = false;
-    }
-    return 0;
+    }};
   }
-  void start() {
-    m_running = true;
-    activate();
-  }
+
   void stop() {
-    m_running = false;
-    wait();
+    if (thread_.joinable()) {
+      thread_.join();
+    }
   }
+
+ protected:
+  std::thread thread_;
 };
 
 void initClientCq() {
@@ -225,37 +217,35 @@
       auto &&qry = qs->newCq(cqName, qryStr, cqAttr);
       auto &&results = qry->executeWithInitialResults();
 
-      char buf[100];
       auto count = results->size();
-      sprintf(buf, "results size=%zd", count);
-      LOG(buf);
+      LOG(std::string("results size=") + std::to_string(count));
       for (auto &&ser : hacks::range(*results)) {
         count--;
         if (auto portfolio = std::dynamic_pointer_cast<Portfolio>(ser)) {
-          printf("   query pulled portfolio object ID %d, pkid %s\n",
-                 portfolio->getID(), portfolio->getPkid()->value().c_str());
+          std::cout << "   query pulled portfolio object ID "
+                    << portfolio->getID() << ", pkid "
+                    << portfolio->getPkid()->value() << "\n";
         } else if (auto position = std::dynamic_pointer_cast<Position>(ser)) {
-          printf("   query  pulled position object secId %s, shares %d\n",
-                 position->getSecId()->value().c_str(),
-                 position->getSharesOutstanding());
+          std::cout << "   query  pulled position object secId "
+                    << position->getSecId()->value() << ", shares "
+                    << position->getSharesOutstanding() << "\n";
         } else if (ser) {
-          printf(" query pulled object %s\n", ser->toString().c_str());
+          std::cout << " query pulled object " << ser->toString() << "\n";
         } else {
-          printf("   query pulled nullptr object\n");
+          std::cout << "   query pulled nullptr object\n";
         }
       }
-      sprintf(buf, "results last count=%zd", count);
-      LOG(buf);
+      LOG(std::string("results last count=") + std::to_string(count));
       //  ASSERT( count==0, "results traversal count incorrect!" );
       SLEEP(15000);
     } catch (IllegalStateException &ise) {
-      char isemsg[500] = {0};
-      ACE_OS::snprintf(isemsg, 499, "IllegalStateException: %s", ise.what());
-      LOG(isemsg);
-      FAIL(isemsg);
+      std::string excpmsg = "IllegalStateException: " + std::string{ise.what()};
+
+      LOG(excpmsg);
+      FAIL(excpmsg);
     } catch (Exception &excp) {
-      char excpmsg[500] = {0};
-      ACE_OS::snprintf(excpmsg, 499, "Exception: %s", excp.what());
+      std::string excpmsg = "Exception: " + std::string{excp.what()};
+
       LOG(excpmsg);
       FAIL(excpmsg);
     } catch (...) {
@@ -309,19 +299,19 @@
       auto vl = cqAttr->getCqListeners();
       cqLstner = vl[0];
     } catch (Exception &excp) {
-      char excpmsg[500] = {0};
-      ACE_OS::snprintf(excpmsg, 499, "Exception: %s", excp.what());
+      std::string excpmsg = "Exception: " + std::string{excp.what()};
+
       LOG(excpmsg);
       ASSERT(false, "get listener failed");
     }
     ASSERT(cqLstner != nullptr, "listener is nullptr");
     MyCqListener *myListener = dynamic_cast<MyCqListener *>(cqLstner.get());
     ASSERT(myListener != nullptr, "my listener is nullptr<cast failed>");
-    kst = new KillServerThread(myListener);
+    kst = new KillServerThread();
     char buf[1024];
-    sprintf(buf, "before kill server 1, before=%d, after=%d",
-            myListener->getCountBefore(), myListener->getCountAfter());
-    LOG(buf);
+    LOG(std::string("before kill server 1, before=") +
+        std::to_string(myListener->getCountBefore()) +
+        ", after=" + std::to_string(myListener->getCountAfter()));
     ASSERT(myListener->getCountAfter() == 0,
            "cq after failover should be zero");
     ASSERT(myListener->getCountBefore() == 6108,
@@ -396,18 +386,17 @@
       auto vl = cqAttr->getCqListeners();
       cqLstner = vl[0];
     } catch (Exception &excp) {
-      char excpmsg[500] = {0};
-      ACE_OS::snprintf(excpmsg, 499, "Exception: %s", excp.what());
+      std::string excpmsg = "Exception: " + std::string{excp.what()};
+
       LOG(excpmsg);
       ASSERT(false, "get listener failed");
     }
     ASSERT(cqLstner != nullptr, "listener is nullptr");
     MyCqListener *myListener = dynamic_cast<MyCqListener *>(cqLstner.get());
     ASSERT(myListener != nullptr, "my listener is nullptr<cast failed>");
-    char buf[1024];
-    sprintf(buf, "after failed over: before=%d, after=%d",
-            myListener->getCountBefore(), myListener->getCountAfter());
-    LOG(buf);
+    LOG(std::string("after failed over: before=") +
+        std::to_string(myListener->getCountBefore()) +
+        ", after=" + std::to_string(myListener->getCountAfter()));
     ASSERT(myListener->getCountBefore() == 6108,
            "check cq event count before failover");
     ASSERT(myListener->getCountAfter() == 6109,
diff --git a/cppcache/integration-test/testThinClientCqIR.cpp b/cppcache/integration-test/testThinClientCqIR.cpp
index 0d9b88f..a6d818b 100644
--- a/cppcache/integration-test/testThinClientCqIR.cpp
+++ b/cppcache/integration-test/testThinClientCqIR.cpp
@@ -15,8 +15,6 @@
  * limitations under the License.
  */
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include <string>
 #include <geode/CqAttributesFactory.hpp>
 #include <geode/CqAttributes.hpp>
@@ -87,7 +85,7 @@
   LOG("Starting SERVER1...");
   if (isLocalServer) {
     CacheHelper::initServer(1, "remotequery.xml",
-                            locator ? locatorsG : nullptr);
+                            locator ? locatorsG : std::string{});
   }
   LOG("SERVER1 started");
 }
@@ -185,16 +183,14 @@
       auto results = qry->executeWithInitialResults();
       LOG("before executing executeWithInitialResults done.");
 
-      char buf[100];
       auto count = results->size();
-      sprintf(buf, "results size=%zd", count);
-      LOG(buf);
+      LOG(std::string("results size=") + std::to_string(count));
       ASSERT(count > 0, "count should be > 0");
       for (auto &&ser : hacks::range(*results)) {
         count--;
 
         if (ser) {
-          printf(" query pulled object %s\n", ser->toString().c_str());
+          std::cout << " query pulled object '" << ser->toString() << "'\n";
 
           auto stPtr = std::dynamic_pointer_cast<Struct>(ser);
           ASSERT(stPtr != nullptr, "Failed to get struct in CQ result.");
@@ -204,7 +200,7 @@
           ASSERT(serKey != nullptr, "Failed to get KEY in CQ result.");
           if (serKey != nullptr) {
             LOG("got struct key ");
-            printf("  got struct key %s\n", serKey->toString().c_str());
+            std::cout << "  got struct key '" << serKey->toString() << "'\n";
           }
 
           auto serVal = (*stPtr)["value"];
@@ -212,14 +208,13 @@
 
           if (serVal != nullptr) {
             LOG("got struct value ");
-            printf("  got struct value %s\n", serVal->toString().c_str());
+            std::cout << "  got struct value '" << serVal->toString() << "'\n";
           }
         } else {
-          printf("   query pulled bad object\n");
+          std::cout << "   query pulled bad object\n";
         }
       }
-      sprintf(buf, "results last count=%zd", count);
-      LOG(buf);
+      LOG(std::string("results last count=") + std::to_string(count));
 
       qry = qs->newCq("MyCq2", "select * from /Portfolios2", cqAttr);
 
@@ -228,14 +223,13 @@
       LOG("before executing executeWithInitialResults2 done.");
 
       count = results->size();
-      sprintf(buf, "results2 size=%zd", count);
-      LOG(buf);
+      LOG(std::string("results2 size=") + std::to_string(count));
       ASSERT(count > 0, "count should be > 0");
       for (auto &&ser : hacks::range(*results)) {
         count--;
 
         if (ser) {
-          printf(" query pulled object %s\n", ser->toString().c_str());
+          std::cout << " query pulled object '" << ser->toString() << "'\n";
 
           auto stPtr = std::dynamic_pointer_cast<Struct>(ser);
           ASSERT(stPtr != nullptr, "Failed to get struct in CQ result.");
@@ -245,7 +239,7 @@
           ASSERT(serKey != nullptr, "Failed to get KEY in CQ result.");
           if (serKey != nullptr) {
             LOG("got struct key ");
-            printf("  got struct key %s\n", serKey->toString().c_str());
+            std::cout << "  got struct key '" << serKey->toString() << "'\n";
           }
 
           auto serVal = (*stPtr)["value"];
@@ -253,14 +247,13 @@
 
           if (serVal != nullptr) {
             LOG("got struct value ");
-            printf("  got struct value %s\n", serVal->toString().c_str());
+            std::cout << "  got struct value '" << serVal->toString() << "'\n";
           }
         } else {
-          printf("   query pulled bad object\n");
+          std::cout << "   query pulled bad object\n";
         }
       }
-      sprintf(buf, "results last count=%zd", count);
-      LOG(buf);
+      LOG(std::string("results last count=") + std::to_string(count));
 
       {
         auto regPtr0 = getHelper()->getRegion(regionNamesCq[0]);
@@ -268,8 +261,9 @@
       }
       SLEEP(20000);
       qry = qs->getCq(cqName);
-      sprintf(buf, "cq[%s] should have been removed after close!", cqName);
-      ASSERT(qry == nullptr, buf);
+      auto msg = std::string("cq[") + cqName +
+                 "] should have been removed after close!";
+      ASSERT(qry == nullptr, msg);
     } catch (const Exception &excp) {
       std::string logmsg = "";
       logmsg += excp.getName();
@@ -293,12 +287,12 @@
         LOG("regPtr0==nullptr");
       } else {
         LOG("regPtr0!=nullptr");
-        ASSERT(regPtr0->isDestroyed(), "should have been distroyed");
+        ASSERT(regPtr0->isDestroyed(), "should have been destroyed");
       }
     } catch (...) {
       LOG("exception in getting region");
     }
-    LOG("region has been destoryed");
+    LOG("region has been destroyed");
   }
 END_TASK_DEFINITION
 
diff --git a/cppcache/integration-test/testThinClientDeltaWithNotification.cpp b/cppcache/integration-test/testThinClientDeltaWithNotification.cpp
index 9059e22..5c28221 100644
--- a/cppcache/integration-test/testThinClientDeltaWithNotification.cpp
+++ b/cppcache/integration-test/testThinClientDeltaWithNotification.cpp
@@ -36,7 +36,7 @@
 bool isLocalServer = false;
 
 static bool isLocator = false;
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #define CLIENT1 s1p1
 #define CLIENT2 s1p2
@@ -78,13 +78,15 @@
   return cacheHelper;
 }
 
-void createPooledRegion(const char *name, bool ackMode, const char *locators,
-                        const char *poolname,
+void createPooledRegion(const std::string &name, bool ackMode,
+                        const std::string &locators,
+                        const std::string &poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -101,8 +103,9 @@
       0, nullptr, ExpirationAction::LOCAL_INVALIDATE);
 }
 
-void createPooledLRURegion(const char *name, bool ackMode, const char *locators,
-                           const char *poolname,
+void createPooledLRURegion(const std::string &name, bool ackMode,
+                           const std::string &locators,
+                           const std::string &poolname,
                            bool clientNotificationEnabled = false,
                            bool cachingEnable = true) {
   LOG(" createPooledLRURegion entered");
@@ -117,7 +120,9 @@
 void createRegion(const char *name, bool ackMode,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   fflush(stdout);
   // ack, caching
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
@@ -320,10 +325,9 @@
   {
     // Wait for notification
     SLEEP(5000);
-    char buff[100];
-    sprintf(buff, "From delta count %d  From data count %d",
-            DeltaEx::fromDeltaCount, DeltaEx::fromDataCount);
-    LOG(buff);
+    LOG(std::string("From delta count ") +
+        std::to_string(DeltaEx::fromDeltaCount) + "From data count " +
+        std::to_string(DeltaEx::fromDataCount));
     ASSERT(DeltaEx::fromDataCount == 13,
            "DeltaEx::fromDataCount should have been 13");
     // 1 for the first case when delta is false, 2 for the second case when
diff --git a/cppcache/integration-test/testThinClientDisconnectionListioner.cpp b/cppcache/integration-test/testThinClientDisconnectionListioner.cpp
index 9dd1c34..4045db5 100644
--- a/cppcache/integration-test/testThinClientDisconnectionListioner.cpp
+++ b/cppcache/integration-test/testThinClientDisconnectionListioner.cpp
@@ -28,7 +28,7 @@
 static bool isLocalServer = true;
 static int numberOfLocators = 1;
 static int isDisconnected = false;
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 
 class DisconnectCacheListioner : public CacheListener {
diff --git a/cppcache/integration-test/testThinClientFixedPartitionResolver.cpp b/cppcache/integration-test/testThinClientFixedPartitionResolver.cpp
index 784022e..8d3775b 100644
--- a/cppcache/integration-test/testThinClientFixedPartitionResolver.cpp
+++ b/cppcache/integration-test/testThinClientFixedPartitionResolver.cpp
@@ -18,8 +18,6 @@
 #include "BuiltinCacheableWrappers.hpp"
 #include "Utils.hpp"
 #include <geode/FixedPartitionResolver.hpp>
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 
 #include <string>
 
@@ -183,7 +181,7 @@
 bool isLocalServer = false;
 
 static bool isLocator = false;
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 
 std::vector<char *> storeEndPoints(const char *points) {
diff --git a/cppcache/integration-test/testThinClientGetInterests.cpp b/cppcache/integration-test/testThinClientGetInterests.cpp
index bd41030..ae6ad58 100644
--- a/cppcache/integration-test/testThinClientGetInterests.cpp
+++ b/cppcache/integration-test/testThinClientGetInterests.cpp
@@ -69,11 +69,9 @@
     auto vkey = regPtr0->getInterestList();
     auto vreg = regPtr0->getInterestListRegex();
     for (size_t i = 0; i < vkey.size(); i++) {
-      char buf[1024];
       const char *key =
           std::dynamic_pointer_cast<CacheableString>(vkey[i])->value().c_str();
-      sprintf(buf, "key[%zd]=%s", i, key);
-      LOG(buf);
+      LOG(std::string("key[") + std::to_string(i) + "] = " + key);
       bool found = false;
       for (const auto &k : vkey) {
         if (!strcmp(key, k->toString().c_str())) {
@@ -81,15 +79,17 @@
           break;
         }
       }
-      sprintf(buf, "key[%zd]=%s not found!", i, key);
-      ASSERT(found, buf);
+      std::string msg;
+      if (!found) {
+        msg = std::string("key[") + std::to_string(i) + "]=" + key +
+              " not found!";
+      }
+      ASSERT(found, msg);
     }
     for (size_t i = 0; i < vreg.size(); i++) {
-      char buf[1024];
       auto ptr = vreg[i];
       const char *reg = ptr->value().c_str();
-      sprintf(buf, "regex[%zd]=%s", i, reg);
-      LOG(buf);
+      LOG(std::string("regex[") + std::to_string(i) + "]=" + reg);
       bool found = false;
       for (size_t j = 0; j < vreg.size(); j++) {
         if (!strcmp(reg, testregex[j])) {
@@ -97,16 +97,19 @@
           break;
         }
       }
-      sprintf(buf, "regex[%zd]=%s not found!", i, reg);
-      ASSERT(found, buf);
+
+      std::string msg;
+      if (!found) {
+        msg = std::string("regex[") + std::to_string(i) + "]=" + reg +
+              " not found!";
+      }
+      ASSERT(found, msg);
     }
     regPtr0->registerAllKeys(true);
     auto vreg1 = regPtr0->getInterestListRegex();
     for (size_t i = 0; i < vreg1.size(); i++) {
-      char buf[1024];
       auto ptr = vreg1[i];
-      sprintf(buf, "regex[%zd]=%s", i, ptr->value().c_str());
-      LOG(buf);
+      LOG(std::string("regex[") + std::to_string(i) + "]=" + ptr->value());
     }
   }
 END_TASK(SetupClient1)
diff --git a/cppcache/integration-test/testThinClientHADistOps.cpp b/cppcache/integration-test/testThinClientHADistOps.cpp
index 92f557b..23a2138 100644
--- a/cppcache/integration-test/testThinClientHADistOps.cpp
+++ b/cppcache/integration-test/testThinClientHADistOps.cpp
@@ -15,8 +15,6 @@
  * limitations under the License.
  */
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 
 #include <string>
 
@@ -39,7 +37,7 @@
 bool isLocalServer = false;
 
 static bool isLocator = false;
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #include "LocatorHelper.hpp"
 static int clientWithRedundancy = 0;
@@ -91,20 +89,18 @@
                   bool noKey) {
   // Verify key and value exist in this region, in this process.
   const char *value = val ? val : "";
-  char *buf =
-      reinterpret_cast<char *>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
+  std::string msg;
   if (noKey) {
-    sprintf(buf, "Verify key %s does not exist in region %s", key, name);
+    msg =
+        std::string("Verify key ") + key + " does not exist in region " + name;
   } else if (!val) {
-    sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-            name);
+    msg = std::string("Verify value for key ") + key +
+          " does not exist in region " + name;
   } else {
-    sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-            name);
+    msg = std::string("Verify value for key ") + key + " is: " + value +
+          " in region " + name;
   }
-  LOG(buf);
-  free(buf);
+  LOG(msg);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -163,9 +159,8 @@
 }
 
 void _verifyInvalid(const char *name, const char *key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyInvalid() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyInvalid() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, false);
   LOG("Entry invalidated.");
 }
@@ -173,9 +168,8 @@
 #define verifyDestroyed(x, y) _verifyDestroyed(x, y, __LINE__)
 
 void _verifyDestroyed(const char *name, const char *key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyDestroyed() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyDestroyed() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, true);
   LOG("Entry destroyed.");
 }
@@ -184,17 +178,16 @@
 
 void _verifyEntry(const char *name, const char *key, const char *val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
 
 void destroyEntry(const char *name, const char *key) {
   LOG("destroyEntry() entered.");
-  fprintf(stdout, "Destroying entry -- key: %s  in region %s\n", key, name);
-  fflush(stdout);
+  std::cout << "Destroying entry -- key: " << key << " in region " << name
+            << "\n"
+            << std::flush;
   // Destroy entry, verify entry is destroyed
   auto keyPtr = CacheableKey::create(key);
 
@@ -213,8 +206,9 @@
 void createRegion(const char *name, bool ackMode,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   char *endpoints = nullptr;
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
                                           endpoints, clientNotificationEnabled);
@@ -227,8 +221,9 @@
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto poolPtr = getHelper()->createPool(
       poolname, locators, nullptr, reduendency, clientNotificationEnabled);
   auto regPtr = getHelper()->createRegionAndAttachPool(name, ackMode, poolname,
@@ -238,9 +233,9 @@
 }
 void createEntry(const char *name, const char *key, const char *value) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -263,9 +258,9 @@
 
 void updateEntry(const char *name, const char *key, const char *value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -286,16 +281,14 @@
 
 void doGetAgain(const char *name, const char *key, const char *value) {
   LOG("doGetAgain() entered.");
-  fprintf(stdout,
-          "get for entry -- key: %s  expecting value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "get for entry -- key: " << key << " expecting value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "get  region name%s\n", regPtr->getName().c_str());
-  fflush(stdout);
+  std::cout << "get  region name " << regPtr->getName() << "\n" << std::flush;
   ASSERT(regPtr != nullptr, "Region not found.");
 
   auto checkPtr = std::dynamic_pointer_cast<CacheableString>(
@@ -303,10 +296,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In doGetAgain, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In doGetAgain, get returned ") + checkPtr->value() +
+        " for key  " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -316,18 +307,15 @@
 
 void doNetsearch(const char *name, const char *key, const char *value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key
+            << " expecting value: " << value << " in region " << name << "\n"
+            << std::flush;
   static int count = 0;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
-  fflush(stdout);
+  std::cout << "netsearch region " << regPtr->getName() << "\n" << std::flush;
   ASSERT(regPtr != nullptr, "Region not found.");
 
   if (count == 0) {
@@ -342,10 +330,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key  " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -358,7 +344,7 @@
 const char *nvals[] = {"New Value-1", "New Value-2", "New Value-3",
                        "New Value-4"};
 
-const char *regionNames[] = {"DistRegionAck", "DistRegionNoAck"};
+const char *regionName = "DistRegionAck";
 
 const bool USE_ACK = true;
 const bool NO_ACK = false;
@@ -375,17 +361,10 @@
   {
     getHelper()->createPoolWithLocators("__TESTPOOL1_", locatorsG, true, 1);
 
-    getHelper()->createRegionAndAttachPool(regionNames[0], USE_ACK,
-                                           "__TESTPOOL1_", true);
-    getHelper()->createRegionAndAttachPool(regionNames[1], NO_ACK,
-                                           "__TESTPOOL1_", true);
-    /* createPooledRegion( regionNames[0], USE_ACK, locatorsG,
-     "__TESTPOOL1_" );
-     createPooledRegion( regionNames[1], NO_ACK, locatorsG, "__TESTPOOL2_"
-     );*/
+    getHelper()->createRegionAndAttachPool(regionName, USE_ACK, "__TESTPOOL1_",
+                                           true);
 
-    createEntry(regionNames[0], keys[0], vals[0]);
-    createEntry(regionNames[1], keys[2], vals[2]);
+    createEntry(regionName, keys[0], vals[0]);
 
     LOG("CreateClient1PoolAndRegions complete.");
   }
@@ -395,18 +374,10 @@
   {
     getHelper()->createPoolWithLocators("__TESTPOOL1_", locatorsG, true, 1);
 
-    getHelper()->createRegionAndAttachPool(regionNames[0], USE_ACK,
-                                           "__TESTPOOL1_", true);
-    getHelper()->createRegionAndAttachPool(regionNames[1], NO_ACK,
-                                           "__TESTPOOL1_", true);
+    getHelper()->createRegionAndAttachPool(regionName, USE_ACK, "__TESTPOOL1_",
+                                           true);
 
-    /* createPooledRegion( regionNames[0], USE_ACK,  locatorsG,
-     "__TESTPOOL1_" );
-     createPooledRegion( regionNames[1], NO_ACK,  locatorsG, "__TESTPOOL2_"
-     );*/
-
-    createEntry(regionNames[0], keys[1], vals[1]);
-    createEntry(regionNames[1], keys[3], vals[3]);
+    createEntry(regionName, keys[1], vals[1]);
 
     LOG("CreateClient2PoolAndRegions complete.");
   }
@@ -414,12 +385,9 @@
 
 DUNIT_TASK_DEFINITION(CLIENT1, RegisterClient1Keys)
   {
-    auto reg0 = getHelper()->getRegion(regionNames[0]);
-    auto reg1 = getHelper()->getRegion(regionNames[1]);
+    auto reg0 = getHelper()->getRegion(regionName);
     auto vec0 = reg0->serverKeys();
-    auto vec1 = reg1->serverKeys();
     ASSERT(vec0.size() == 2, "Should have 2 keys in first region.");
-    ASSERT(vec1.size() == 2, "Should have 2 keys in second region.");
     std::string key0, key1;
     key0 = vec0[0]->toString().c_str();
     key1 = vec0[1]->toString().c_str();
@@ -429,76 +397,54 @@
     ASSERT(key1 == keys[0] || key1 == keys[1],
            "Unexpected key in first region.");
 
-    key0 = vec1[0]->toString().c_str();
-    key1 = vec1[1]->toString().c_str();
-    ASSERT(key0 != key1, "The two keys should be different in second region.");
-    ASSERT(key0 == keys[2] || key0 == keys[3],
-           "Unexpected key in second region.");
-    ASSERT(key1 == keys[2] || key1 == keys[3],
-           "Unexpected key in second region.");
-
-    doNetsearch(regionNames[0], keys[1], vals[1]);
-    doNetsearch(regionNames[1], keys[3], vals[3]);
+    doNetsearch(regionName, keys[1], vals[1]);
 
     auto keyPtr1 = CacheableKey::create(keys[1]);
-    auto keyPtr3 = CacheableKey::create(keys[3]);
 
-    auto regPtr0 = getHelper()->getRegion(regionNames[0]);
-    auto regPtr1 = getHelper()->getRegion(regionNames[1]);
+    auto regPtr0 = getHelper()->getRegion(regionName);
 
     std::vector<std::shared_ptr<CacheableKey>> keys0, keys1;
     keys0.push_back(keyPtr1);
-    keys1.push_back(keyPtr3);
     regPtr0->registerKeys(keys0);
-    regPtr1->registerKeys(keys1);
     LOG("RegisterClient1Keys complete.");
   }
 END_TASK_DEFINITION
 
 DUNIT_TASK_DEFINITION(CLIENT2, RegisterClient2Keys)
   {
-    doNetsearch(regionNames[0], keys[0], vals[0]);
-    doNetsearch(regionNames[1], keys[2], vals[2]);
+    doNetsearch(regionName, keys[0], vals[0]);
 
     auto keyPtr0 = CacheableKey::create(keys[0]);
     auto keyPtr2 = CacheableKey::create(keys[2]);
 
-    auto regPtr0 = getHelper()->getRegion(regionNames[0]);
-    auto regPtr1 = getHelper()->getRegion(regionNames[1]);
+    auto regPtr0 = getHelper()->getRegion(regionName);
 
     std::vector<std::shared_ptr<CacheableKey>> keys0, keys1;
     keys0.push_back(keyPtr0);
     keys1.push_back(keyPtr2);
     regPtr0->registerKeys(keys0);
-    regPtr1->registerKeys(keys1);
     LOG("RegisterClient2Keys complete.");
   }
 END_TASK_DEFINITION
 
 DUNIT_TASK_DEFINITION(CLIENT1, UpdateClient1Entries)
   {
-    updateEntry(regionNames[0], keys[0], nvals[0]);
-    updateEntry(regionNames[1], keys[2], nvals[2]);
+    updateEntry(regionName, keys[0], nvals[0]);
     LOG("UpdateClient1Entries complete.");
   }
 END_TASK_DEFINITION
 
 DUNIT_TASK_DEFINITION(CLIENT2, VerifyAndUpdateClient2Entries)
   {
-    verifyEntry(regionNames[0], keys[0], nvals[0]);
-    verifyEntry(regionNames[1], keys[2], nvals[2]);
+    verifyEntry(regionName, keys[0], nvals[0]);
 
-    updateEntry(regionNames[0], keys[1], nvals[1]);
-    updateEntry(regionNames[1], keys[3], nvals[3]);
+    updateEntry(regionName, keys[1], nvals[1]);
     LOG("VerifyAndUpdateClient2Entries complete.");
   }
 END_TASK_DEFINITION
 
 DUNIT_TASK_DEFINITION(CLIENT1, VerifyClient1Entries)
-  {
-    verifyEntry(regionNames[0], keys[1], nvals[1]);
-    verifyEntry(regionNames[1], keys[3], nvals[3]);
-  }
+  { verifyEntry(regionName, keys[1], nvals[1]); }
 END_TASK_DEFINITION
 
 DUNIT_TASK_DEFINITION(CLIENT2, DoAbsolutelyNothing)
@@ -507,10 +453,8 @@
 
 DUNIT_TASK_DEFINITION(CLIENT2, DestroyAllKeys)
   {
-    destroyEntry(regionNames[0], keys[0]);
-    destroyEntry(regionNames[0], keys[1]);
-    destroyEntry(regionNames[1], keys[2]);
-    destroyEntry(regionNames[1], keys[3]);
+    destroyEntry(regionName, keys[0]);
+    destroyEntry(regionName, keys[1]);
   }
 END_TASK_DEFINITION
 
diff --git a/cppcache/integration-test/testThinClientHAEventIDMap.cpp b/cppcache/integration-test/testThinClientHAEventIDMap.cpp
index f294fec..7c6225f 100644
--- a/cppcache/integration-test/testThinClientHAEventIDMap.cpp
+++ b/cppcache/integration-test/testThinClientHAEventIDMap.cpp
@@ -20,9 +20,6 @@
 #include <thread>
 #include <chrono>
 
-#include <ace/High_Res_Timer.h>
-#include <ace/OS.h>
-
 #include <geode/EntryEvent.hpp>
 
 #define ROOT_NAME "testThinClientHAEventIDMap"
@@ -93,7 +90,7 @@
 static bool isLocator = false;
 static int numberOfLocators = 1;
 
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 int g_redundancyLevel = 0;
 
@@ -124,22 +121,21 @@
                   bool noKey, bool isCreated = false) {
   // Verify key and value exist in this region, in this process.
   const char *value = val ? val : "";
-  char *buf =
-      reinterpret_cast<char *>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
+  std::string msg;
+
   if (!isCreated) {
     if (noKey) {
-      sprintf(buf, "Verify key %s does not exist in region %s", key, name);
+      msg = std::string("Verify key ") + key + " does not exist in region " +
+            name;
     } else if (!val) {
-      sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-              name);
+      msg = std::string("Verify value for key ") + key +
+            " does not exist in region " + name;
     } else {
-      sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-              name);
+      msg = std::string("Verify value for key ") + key + " is: " + value +
+            " in region " + name;
     }
-    LOG(buf);
+    LOG(msg);
   }
-  free(buf);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -214,21 +210,20 @@
                      bool noKey, bool isCreated = false) {
   // Verify key and value exist in this region, in this process.
   int value = val;
-  char *buf = reinterpret_cast<char *>(malloc(1024 + strlen(key) + 20));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
+  std::string msg;
   if (!isCreated) {
     if (noKey) {
-      sprintf(buf, "Verify key %s does not exist in region %s", key, name);
-    } else if (val == 0) {
-      sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-              name);
+      msg = std::string("Verify key ") + key + " does not exist in region " +
+            name;
+    } else if (!val) {
+      msg = std::string("Verify value for key ") + key +
+            " does not exist in region " + name;
     } else {
-      sprintf(buf, "Verify value for key %s is: %d in region %s", key, value,
-              name);
+      msg = std::string("Verify value for key ") + key +
+            " is: " + std::to_string(value) + " in region " + name;
     }
-    LOG(buf);
+    LOG(msg);
   }
-  free(buf);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -305,8 +300,7 @@
 void _verifyEntry(const char *name, const char *key, const char *val,
                   int line) {
   char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -315,17 +309,15 @@
 
 void _verifyIntEntry(const char *name, const char *key, const int val,
                      int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyIntEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyIntEntry() called from ") + std::to_string(line) +
+      "\n");
   _verifyIntEntry(name, key, val, false);
   LOG("Entry verified.");
 }
 
 void _verifyCreated(const char *name, const char *key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyCreated() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyCreated() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, false, true);
   LOG("Entry created.");
 }
@@ -333,8 +325,9 @@
 void createRegion(const char *name, bool ackMode,
                   bool clientNotificationEnabled = true) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   char *endpoints = nullptr;
   // ack, caching
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
@@ -345,9 +338,9 @@
 
 void createEntry(const char *name, const char *key, const char *value) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -370,9 +363,9 @@
 
 void createIntEntry(const char *name, const char *key, const int value) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %d in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableInt32::create(value);
@@ -405,12 +398,11 @@
 const char *nvals[] = {"New Value-1", "New Value-2", "New Value-3",
                        "New Value-4"};
 
-const char *regionNames[] = {"DistRegionAck", "DistRegionNoAck"};
+const char *regionName = "DistRegionAck";
 
 const bool USE_ACK = true;
 const bool NO_ACK = false;
 std::shared_ptr<DupChecker> checker1;
-std::shared_ptr<DupChecker> checker2;
 
 void initClientAndRegion(int redundancy,
                          bool clientNotificationEnabled = true) {
@@ -418,9 +410,7 @@
   getHelper()->createPoolWithLocators("__TESTPOOL1_", locatorsG,
                                       clientNotificationEnabled, redundancy);
 
-  getHelper()->createRegionAndAttachPool(regionNames[0], USE_ACK,
-                                         "__TESTPOOL1_", true);
-  getHelper()->createRegionAndAttachPool(regionNames[1], NO_ACK, "__TESTPOOL1_",
+  getHelper()->createRegionAndAttachPool(regionName, USE_ACK, "__TESTPOOL1_",
                                          true);
 }
 
@@ -451,18 +441,11 @@
     LOG("Initialized client with redundancy level 1.");
 
     checker1 = std::make_shared<DupChecker>();
-    checker2 = std::make_shared<DupChecker>();
 
-    setCacheListener(regionNames[0], checker1);
-    setCacheListener(regionNames[1], checker2);
+    setCacheListener(regionName, checker1);
 
     try {
-      getHelper()->getRegion(regionNames[0])->registerAllKeys();
-    } catch (...) {
-    }
-
-    try {
-      getHelper()->getRegion(regionNames[1])->registerAllKeys();
+      getHelper()->getRegion(regionName)->registerAllKeys();
     } catch (...) {
     }
 
@@ -482,21 +465,13 @@
 DUNIT_TASK_DEFINITION(CLIENT1, CreateEntries)
   {
     for (int value = 1; value <= 100; value++) {
-      createIntEntry(regionNames[0], keys[0], value);
+      createIntEntry(regionName, keys[0], value);
       std::this_thread::sleep_for(std::chrono::milliseconds(10));
-      createIntEntry(regionNames[0], keys[1], value);
+      createIntEntry(regionName, keys[1], value);
       std::this_thread::sleep_for(std::chrono::milliseconds(10));
-      createIntEntry(regionNames[0], keys[2], value);
+      createIntEntry(regionName, keys[2], value);
       std::this_thread::sleep_for(std::chrono::milliseconds(10));
-      createIntEntry(regionNames[0], keys[3], value);
-      std::this_thread::sleep_for(std::chrono::milliseconds(10));
-      createIntEntry(regionNames[1], keys[0], value);
-      std::this_thread::sleep_for(std::chrono::milliseconds(10));
-      createIntEntry(regionNames[1], keys[1], value);
-      std::this_thread::sleep_for(std::chrono::milliseconds(10));
-      createIntEntry(regionNames[1], keys[2], value);
-      std::this_thread::sleep_for(std::chrono::milliseconds(10));
-      createIntEntry(regionNames[1], keys[3], value);
+      createIntEntry(regionName, keys[3], value);
       std::this_thread::sleep_for(std::chrono::milliseconds(10));
     }
   }
@@ -516,19 +491,13 @@
     // wait 30 sec for notifications to complete
     std::this_thread::sleep_for(std::chrono::seconds(30));
 
-    verifyIntEntry(regionNames[0], keys[0], 100);
-    verifyIntEntry(regionNames[0], keys[1], 100);
-    verifyIntEntry(regionNames[0], keys[2], 100);
-    verifyIntEntry(regionNames[0], keys[3], 100);
-    verifyIntEntry(regionNames[1], keys[0], 100);
-    verifyIntEntry(regionNames[1], keys[1], 100);
-    verifyIntEntry(regionNames[1], keys[2], 100);
-    verifyIntEntry(regionNames[1], keys[3], 100);
+    verifyIntEntry(regionName, keys[0], 100);
+    verifyIntEntry(regionName, keys[1], 100);
+    verifyIntEntry(regionName, keys[2], 100);
+    verifyIntEntry(regionName, keys[3], 100);
 
     LOG("Validating checker1 cachelistener");
     checker1->validate();
-    LOG("Validating checker2 cachelistener");
-    checker2->validate();
 
     LOG("VerifyClient2Entries complete.");
   }
diff --git a/cppcache/integration-test/testThinClientHAFailover.cpp b/cppcache/integration-test/testThinClientHAFailover.cpp
index 7435c9a..6880c09 100644
--- a/cppcache/integration-test/testThinClientHAFailover.cpp
+++ b/cppcache/integration-test/testThinClientHAFailover.cpp
@@ -15,9 +15,7 @@
  * limitations under the License.
  */
 #include "fw_dunit.hpp"
-#include <ace/High_Res_Timer.h>
 
-#include <ace/OS.h>
 #include <string>
 
 #define ROOT_NAME "testThinClientHAFailover"
@@ -42,7 +40,7 @@
 
 static bool isLocator = false;
 static int numberOfLocators = 1;
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 
 void initClient(int redundancyLevel) {
@@ -90,22 +88,20 @@
                   bool noKey, bool isCreated = false) {
   // Verify key and value exist in this region, in this process.
   const char *value = val ? val : "";
-  char *buf =
-      reinterpret_cast<char *>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
+  std::string msg;
   if (!isCreated) {
     if (noKey) {
-      sprintf(buf, "Verify key %s does not exist in region %s", key, name);
+      msg = std::string("Verify key ") + key + " does not exist in region " +
+            name;
     } else if (!val) {
-      sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-              name);
+      msg = std::string("Verify value for key ") + key +
+            " does not exist in region " + name;
     } else {
-      sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-              name);
+      msg = std::string("Verify value for key ") + key + " is: " + value +
+            " in region " + name;
     }
-    LOG(buf);
+    LOG(msg);
   }
-  free(buf);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -180,9 +176,7 @@
 
 void _verifyEntry(const char *name, const char *key, const char *val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -190,9 +184,8 @@
 #define verifyCreated(x, y) _verifyCreated(x, y, __LINE__)
 
 void _verifyCreated(const char *name, const char *key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyCreated() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyCreated() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, false, true);
   LOG("Entry created.");
 }
@@ -200,8 +193,9 @@
 void createRegion(const char *name, bool ackMode,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   char *endpoints = nullptr;
   // ack, caching
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
@@ -211,9 +205,9 @@
 }
 void createEntry(const char *name, const char *key, const char *value) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -236,9 +230,9 @@
 
 void updateEntry(const char *name, const char *key, const char *value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -259,17 +253,14 @@
 
 void doNetsearch(const char *name, const char *key, const char *value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
-  fflush(stdout);
+  std::cout << "netsearch  region " << regPtr->getName() << "\n" << std::flush;
   ASSERT(regPtr != nullptr, "Region not found.");
 
   // ASSERT( !regPtr->containsKey( keyPtr ), "Key should not have been found in
@@ -282,10 +273,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
diff --git a/cppcache/integration-test/testThinClientHAFailoverRegex.cpp b/cppcache/integration-test/testThinClientHAFailoverRegex.cpp
index c0ea44f..5a81955 100644
--- a/cppcache/integration-test/testThinClientHAFailoverRegex.cpp
+++ b/cppcache/integration-test/testThinClientHAFailoverRegex.cpp
@@ -15,9 +15,7 @@
  * limitations under the License.
  */
 #include "fw_dunit.hpp"
-#include <ace/High_Res_Timer.h>
 
-#include <ace/OS.h>
 #include <string>
 
 #define ROOT_NAME "testThinClientHAFailoverRegex"
@@ -42,7 +40,7 @@
 
 static bool isLocator = false;
 static int numberOfLocators = 1;
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 
 void initClient() {
@@ -68,22 +66,20 @@
                   bool noKey, bool isCreated = false) {
   // Verify key and value exist in this region, in this process.
   const char *value = val ? val : "";
-  char *buf =
-      reinterpret_cast<char *>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
+  std::string msg;
   if (!isCreated) {
     if (noKey) {
-      sprintf(buf, "Verify key %s does not exist in region %s", key, name);
+      msg = std::string("Verify key ") + key + " does not exist in region " +
+            name;
     } else if (!val) {
-      sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-              name);
+      msg = std::string("Verify value for key ") + key +
+            " does not exist in region " + name;
     } else {
-      sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-              name);
+      msg = std::string("Verify value for key ") + key + " is: " + value +
+            " in region " + name;
     }
-    LOG(buf);
+    LOG(msg);
   }
-  free(buf);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -158,9 +154,7 @@
 
 void _verifyEntry(const char *name, const char *key, const char *val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -168,9 +162,8 @@
 #define verifyCreated(x, y) _verifyCreated(x, y, __LINE__)
 
 void _verifyCreated(const char *name, const char *key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyCreated() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyCreated() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, false, true);
   LOG("Entry created.");
 }
@@ -178,8 +171,9 @@
 void createRegion(const char *name, bool ackMode,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   // ack, caching
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
                                           clientNotificationEnabled);
@@ -189,9 +183,9 @@
 
 void createEntry(const char *name, const char *key, const char *value) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -214,9 +208,9 @@
 
 void updateEntry(const char *name, const char *key, const char *value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -237,17 +231,14 @@
 
 void doNetsearch(const char *name, const char *key, const char *value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
-  fflush(stdout);
+  std::cout << "netsearch  region " << regPtr->getName() << "\n" << std::flush;
   ASSERT(regPtr != nullptr, "Region not found.");
 
   // ASSERT( !regPtr->containsKey( keyPtr ), "Key should not have been found in
@@ -260,10 +251,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -277,7 +266,7 @@
 const char *nvals[] = {"New Value-1", "New Value-2", "New Value-3",
                        "New Value-4"};
 
-const char *regionNames[] = {"DistRegionAck", "DistRegionNoAck"};
+const char *regionName = "DistRegionAck";
 
 const bool USE_ACK = true;
 void initClientAndRegion(int redundancy) {
@@ -285,10 +274,8 @@
   auto pp = Properties::create();
   getHelper()->createPoolWithLocators("__TESTPOOL1_", locatorsG, true,
                                       redundancy);
-  getHelper()->createRegionAndAttachPool(regionNames[0], USE_ACK,
-                                         "__TESTPOOL1_", true);
-  getHelper()->createRegionAndAttachPool(regionNames[1], USE_ACK,
-                                         "__TESTPOOL1_", true);
+  getHelper()->createRegionAndAttachPool(regionName, USE_ACK, "__TESTPOOL1_",
+                                         true);
 }
 //#include "ThinClientDurableInit.hpp"
 #include "LocatorHelper.hpp"
@@ -336,7 +323,7 @@
 
 /*DUNIT_TASK_DEFINITION( CLIENT1, StepOne )
 {
-  createRegion( regionNames[0], USE_ACK, false );
+  createRegion( regionName, USE_ACK, false );
   createRegion( regionNames[1], NO_ACK, false );
   LOG( "StepOne complete." );
 }
@@ -344,7 +331,7 @@
 
 DUNIT_TASK_DEFINITION( CLIENT2, StepTwo )
 {
-  createRegion( regionNames[0], USE_ACK, false );
+  createRegion( regionName, USE_ACK, false );
   createRegion( regionNames[1], NO_ACK, false );
 
   LOG( "StepTwo complete." );
@@ -362,37 +349,29 @@
 
 DUNIT_TASK_DEFINITION(CLIENT2, RegisterRegexes)
   {
-    auto regPtr0 = getHelper()->getRegion(regionNames[0]);
-    auto regPtr1 = getHelper()->getRegion(regionNames[1]);
+    auto regPtr0 = getHelper()->getRegion(regionName);
 
     if (g_redundancyLevel > 1) {
       regPtr0->registerRegex(testregex[0]);
-      regPtr1->registerRegex(testregex[2]);
     } else {
       regPtr0->registerRegex(testregex[0]);
-      regPtr1->registerRegex(testregex[2]);
     }
   }
 END_TASK_DEFINITION
 
 DUNIT_TASK_DEFINITION(CLIENT1, StepThree)
   {
-    createEntry(regionNames[0], keys[0], vals[0]);
-    createEntry(regionNames[0], keys[1], vals[1]);
-    createEntry(regionNames[1], keys[2], vals[2]);
-    createEntry(regionNames[1], keys[3], vals[3]);
+    createEntry(regionName, keys[0], vals[0]);
+    createEntry(regionName, keys[1], vals[1]);
     LOG("StepThree complete.");
   }
 END_TASK_DEFINITION
 
 DUNIT_TASK_DEFINITION(CLIENT2, StepFour)
   {
-    verifyCreated(regionNames[0], keys[0]);
-    verifyCreated(regionNames[1], keys[2]);
-    verifyEntry(regionNames[0], keys[0], vals[0]);
-    verifyEntry(regionNames[1], keys[2], vals[2]);
-    doNetsearch(regionNames[0], keys[1], vals[1]);
-    doNetsearch(regionNames[1], keys[3], vals[3]);
+    verifyCreated(regionName, keys[0]);
+    verifyEntry(regionName, keys[0], vals[0]);
+    doNetsearch(regionName, keys[1], vals[1]);
     LOG("StepFour complete.");
   }
 END_TASK_DEFINITION
@@ -409,10 +388,8 @@
 
 DUNIT_TASK_DEFINITION(CLIENT1, StepFive)
   {
-    updateEntry(regionNames[0], keys[0], nvals[0]);
-    updateEntry(regionNames[0], keys[1], nvals[1]);
-    updateEntry(regionNames[1], keys[2], nvals[2]);
-    updateEntry(regionNames[1], keys[3], nvals[3]);
+    updateEntry(regionName, keys[0], nvals[0]);
+    updateEntry(regionName, keys[1], nvals[1]);
     SLEEP(1000);
     LOG("StepFive complete.");
   }
@@ -420,12 +397,9 @@
 
 DUNIT_TASK_DEFINITION(CLIENT2, StepSix)
   {
-    auto reg0 = getHelper()->getRegion(regionNames[0]);
-    auto reg1 = getHelper()->getRegion(regionNames[1]);
+    auto reg0 = getHelper()->getRegion(regionName);
     auto vec0 = reg0->serverKeys();
-    auto vec1 = reg1->serverKeys();
     ASSERT(vec0.size() == 2, "Should have 2 keys in first region.");
-    ASSERT(vec1.size() == 2, "Should have 2 keys in second region.");
     std::string key0, key1;
     key0 = vec0[0]->toString().c_str();
     key1 = vec0[1]->toString().c_str();
@@ -435,18 +409,8 @@
     ASSERT(key1 == keys[0] || key1 == keys[1],
            "Unexpected key in first region.");
 
-    key0 = vec1[0]->toString().c_str();
-    key1 = vec1[1]->toString().c_str();
-    ASSERT(key0 != key1, "The two keys should be different in second region.");
-    ASSERT(key0 == keys[2] || key0 == keys[3],
-           "Unexpected key in second region.");
-    ASSERT(key1 == keys[2] || key1 == keys[3],
-           "Unexpected key in second region.");
-
-    verifyEntry(regionNames[0], keys[0], nvals[0]);
-    verifyEntry(regionNames[0], keys[1], vals[1]);
-    verifyEntry(regionNames[1], keys[2], nvals[2]);
-    verifyEntry(regionNames[1], keys[3], vals[3]);
+    verifyEntry(regionName, keys[0], nvals[0]);
+    verifyEntry(regionName, keys[1], vals[1]);
     LOG("StepSix complete.");
   }
 END_TASK_DEFINITION
@@ -485,10 +449,8 @@
 
 DUNIT_TASK_DEFINITION(CLIENT1, StepSeven)
   {
-    updateEntry(regionNames[0], keys[0], vals[0]);
-    updateEntry(regionNames[0], keys[1], vals[1]);
-    updateEntry(regionNames[1], keys[2], vals[2]);
-    updateEntry(regionNames[1], keys[3], vals[3]);
+    updateEntry(regionName, keys[0], vals[0]);
+    updateEntry(regionName, keys[1], vals[1]);
     SLEEP(1000);
     LOG("StepSeven complete.");
   }
@@ -496,13 +458,8 @@
 
 DUNIT_TASK_DEFINITION(CLIENT2, StepEight)
   {
-    verifyEntry(regionNames[0], keys[0], vals[0]);
-    verifyEntry(regionNames[0], keys[1], vals[1]);
-    verifyEntry(regionNames[1], keys[2], vals[2]);
-    verifyEntry(regionNames[1], keys[3], vals[3]);
-
-    auto regPtr1 = getHelper()->getRegion(regionNames[1]);
-    regPtr1->unregisterRegex(testregex[2]);
+    verifyEntry(regionName, keys[0], vals[0]);
+    verifyEntry(regionName, keys[1], vals[1]);
 
     LOG("StepEight complete.");
   }
@@ -531,10 +488,8 @@
 
 DUNIT_TASK_DEFINITION(CLIENT1, StepNine)
   {
-    updateEntry(regionNames[0], keys[0], nvals[0]);
-    updateEntry(regionNames[0], keys[1], nvals[1]);
-    updateEntry(regionNames[1], keys[2], nvals[2]);
-    updateEntry(regionNames[1], keys[3], nvals[3]);
+    updateEntry(regionName, keys[0], nvals[0]);
+    updateEntry(regionName, keys[1], nvals[1]);
     SLEEP(1000);
     LOG("StepNine complete.");
   }
@@ -542,10 +497,8 @@
 
 DUNIT_TASK_DEFINITION(CLIENT2, StepTen)
   {
-    verifyEntry(regionNames[0], keys[0], nvals[0]);
-    verifyEntry(regionNames[0], keys[1], vals[1]);
-    verifyEntry(regionNames[1], keys[2], vals[2]);
-    verifyEntry(regionNames[1], keys[3], vals[3]);
+    verifyEntry(regionName, keys[0], nvals[0]);
+    verifyEntry(regionName, keys[1], vals[1]);
     LOG("StepTen complete.");
   }
 END_TASK_DEFINITION
@@ -562,10 +515,8 @@
 
 DUNIT_TASK_DEFINITION(CLIENT1, StepEleven)
   {
-    updateEntry(regionNames[0], keys[0], vals[0]);
-    updateEntry(regionNames[0], keys[1], vals[1]);
-    updateEntry(regionNames[1], keys[2], vals[2]);
-    updateEntry(regionNames[1], keys[3], vals[3]);
+    updateEntry(regionName, keys[0], vals[0]);
+    updateEntry(regionName, keys[1], vals[1]);
     SLEEP(1000);
     LOG("StepEleven complete.");
   }
@@ -573,10 +524,8 @@
 
 DUNIT_TASK_DEFINITION(CLIENT2, StepTwelve)
   {
-    verifyEntry(regionNames[0], keys[0], vals[0]);
-    verifyEntry(regionNames[0], keys[1], vals[1]);
-    verifyEntry(regionNames[1], keys[2], vals[2]);
-    verifyEntry(regionNames[1], keys[3], vals[3]);
+    verifyEntry(regionName, keys[0], vals[0]);
+    verifyEntry(regionName, keys[1], vals[1]);
     LOG("StepTwelve complete.");
   }
 END_TASK_DEFINITION
diff --git a/cppcache/integration-test/testThinClientHAMixedRedundancy.cpp b/cppcache/integration-test/testThinClientHAMixedRedundancy.cpp
index abd2b52..ee14bf9 100644
--- a/cppcache/integration-test/testThinClientHAMixedRedundancy.cpp
+++ b/cppcache/integration-test/testThinClientHAMixedRedundancy.cpp
@@ -15,9 +15,7 @@
  * limitations under the License.
  */
 #include "fw_dunit.hpp"
-#include <ace/High_Res_Timer.h>
 
-#include <ace/OS.h>
 #include <string>
 
 #define ROOT_NAME "testThinClientHAMixedRedundancy"
@@ -40,7 +38,7 @@
 #define SERVERS s2p2
 #define SERVER1 s2p2
 static bool isLocator = false;
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 bool g_poolConfig = false;
 bool g_poolLocators = false;
@@ -73,22 +71,20 @@
                   bool noKey, bool isCreated = false) {
   // Verify key and value exist in this region, in this process.
   const char *value = val ? val : "";
-  char *buf =
-      reinterpret_cast<char *>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
+  std::string msg;
   if (!isCreated) {
     if (noKey) {
-      sprintf(buf, "Verify key %s does not exist in region %s", key, name);
+      msg = std::string("Verify key ") + key + " does not exist in region " +
+            name;
     } else if (!val) {
-      sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-              name);
+      msg = std::string("Verify value for key ") + key +
+            " does not exist in region " + name;
     } else {
-      sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-              name);
+      msg = std::string("Verify value for key ") + key + " is: " + value +
+            " in region " + name;
     }
-    LOG(buf);
+    LOG(msg);
   }
-  free(buf);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -163,17 +159,14 @@
 
 void _verifyEntry(const char *name, const char *key, const char *val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
 
 void _verifyCreated(const char *name, const char *key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyCreated() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyCreated() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, false, true);
   LOG("Entry created.");
 }
@@ -181,8 +174,9 @@
 void createRegion(const char *name, bool ackMode,
                   bool clientNotificationEnabled = true) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   char *endpoints = nullptr;
   // ack, caching
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
@@ -193,9 +187,9 @@
 
 void createEntry(const char *name, const char *key, const char *value) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -218,9 +212,9 @@
 
 void updateEntry(const char *name, const char *key, const char *value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -241,17 +235,14 @@
 
 void doNetsearch(const char *name, const char *key, const char *value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
-  fflush(stdout);
+  std::cout << "netsearch  region " << regPtr->getName() << "\n" << std::flush;
   ASSERT(regPtr != nullptr, "Region not found.");
 
   // ASSERT( !regPtr->containsKey( keyPtr ), "Key should not have been found in
@@ -264,10 +255,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
diff --git a/cppcache/integration-test/testThinClientHAPeriodicAck.cpp b/cppcache/integration-test/testThinClientHAPeriodicAck.cpp
index 0ffcde9..b6fc81b 100644
--- a/cppcache/integration-test/testThinClientHAPeriodicAck.cpp
+++ b/cppcache/integration-test/testThinClientHAPeriodicAck.cpp
@@ -20,9 +20,6 @@
 #include <thread>
 #include <chrono>
 
-#include <ace/High_Res_Timer.h>
-#include <ace/OS.h>
-
 #include <geode/EntryEvent.hpp>
 
 #define ROOT_NAME "testThinClientHAPeriodicAck"
@@ -97,7 +94,7 @@
 static bool isLocator = false;
 static bool isLocalServer = false;
 static int numberOfLocators = 1;
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 int g_redundancyLevel = 0;
 bool g_poolConfig = false;
@@ -142,22 +139,20 @@
                   bool noKey, bool isCreated = false) {
   // Verify key and value exist in this region, in this process.
   const char *value = val ? val : "";
-  char *buf =
-      reinterpret_cast<char *>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
+  std::string msg;
   if (!isCreated) {
     if (noKey) {
-      sprintf(buf, "Verify key %s does not exist in region %s", key, name);
+      msg = std::string("Verify key ") + key + " does not exist in region " +
+            name;
     } else if (!val) {
-      sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-              name);
+      msg = std::string("Verify value for key ") + key +
+            " does not exist in region " + name;
     } else {
-      sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-              name);
+      msg = std::string("Verify value for key ") + key + " is: " + value +
+            " in region " + name;
     }
-    LOG(buf);
+    LOG(msg);
   }
-  free(buf);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -232,21 +227,20 @@
                      bool noKey, bool isCreated = false) {
   // Verify key and value exist in this region, in this process.
   int value = val;
-  char *buf = reinterpret_cast<char *>(malloc(1024 + strlen(key) + 20));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
+  std::string msg;
   if (!isCreated) {
     if (noKey) {
-      sprintf(buf, "Verify key %s does not exist in region %s", key, name);
-    } else if (val == 0) {
-      sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-              name);
+      msg = std::string("Verify key ") + key + " does not exist in region " +
+            name;
+    } else if (!val) {
+      msg = std::string("Verify value for key ") + key +
+            " does not exist in region " + name;
     } else {
-      sprintf(buf, "Verify value for key %s is: %d in region %s", key, value,
-              name);
+      msg = std::string("Verify value for key ") + key +
+            " is: " + std::to_string(value) + " in region " + name;
     }
-    LOG(buf);
+    LOG(msg);
   }
-  free(buf);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -322,9 +316,7 @@
 
 void _verifyEntry(const char *name, const char *key, const char *val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -333,17 +325,15 @@
 
 void _verifyIntEntry(const char *name, const char *key, const int val,
                      int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyIntEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyIntEntry() called from ") + std::to_string(line) +
+      "\n");
   _verifyIntEntry(name, key, val, false);
   LOG("Entry verified.");
 }
 
 void _verifyCreated(const char *name, const char *key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyCreated() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyCreated() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, false, true);
   LOG("Entry created.");
 }
@@ -351,8 +341,9 @@
 void createRegion(const char *name, bool ackMode,
                   bool clientNotificationEnabled = true) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   char *endpoints = nullptr;
   // ack, caching
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
@@ -363,9 +354,9 @@
 
 void createEntry(const char *name, const char *key, const char *value) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -388,9 +379,9 @@
 
 void createIntEntry(const char *name, const char *key, const int value) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %d in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableInt32::create(value);
diff --git a/cppcache/integration-test/testThinClientHAQueryFailover.cpp b/cppcache/integration-test/testThinClientHAQueryFailover.cpp
index 25e46d6..9e0b80a 100644
--- a/cppcache/integration-test/testThinClientHAQueryFailover.cpp
+++ b/cppcache/integration-test/testThinClientHAQueryFailover.cpp
@@ -15,9 +15,7 @@
  * limitations under the License.
  */
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-#include <ace/Task.h>
+
 #include <string>
 
 #define ROOT_NAME "testThinClientHAQueryFailover"
@@ -55,31 +53,26 @@
 static bool isLocator = false;
 static int numberOfLocators = 1;
 
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 
-class KillServerThread : public ACE_Task_Base {
+class KillServerThread {
  public:
-  bool m_running;
-  KillServerThread() : m_running(false) {}
-  int svc(void) {
-    while (m_running == true) {
-      // CacheHelper::initServer( 2, "cacheserver_remoteoql2.xml");
-      // LOG("THREAD STARTED SERVER 2");
+  void start() {
+    thread_ = std::thread{[]() {
       CacheHelper::closeServer(1);
       LOG("THREAD CLOSED SERVER 1");
-      m_running = false;
-    }
-    return 0;
+    }};
   }
-  void start() {
-    m_running = true;
-    activate();
-  }
+
   void stop() {
-    m_running = false;
-    wait();
+    if (thread_.joinable()) {
+      thread_.join();
+    }
   }
+
+ protected:
+  std::thread thread_;
 };
 
 void initClient() {
@@ -129,8 +122,9 @@
 void createRegion(const char *name, bool ackMode,
                   bool clientNotificationEnabled = true) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   char *endpoints = nullptr;
   auto regPtr = getHelper()->createRegion(name, ackMode, false, nullptr,
                                           endpoints, clientNotificationEnabled);
@@ -216,24 +210,7 @@
 
         std::shared_ptr<SelectResults> results;
 
-        // try
-        //{
         results = qry->execute();
-        //}
-        /*
-        catch(IllegalStateException &)
-        {
-          printf("IllegalStateException occurred at iteration %d\n", i);
-          //SLEEP(1000);
-          continue;
-        }
-        catch(Exception &)
-        {
-          printf("Exception occurred at iteration %d\n", i);
-          //SLEEP(1000);
-          continue;
-        }
-        */
 
         if (i == 10) {
           kst->start();
@@ -243,11 +220,10 @@
         auto resultsize = results->size();
 
         if (i % 100 == 0) {
-          printf("Iteration upto %d done, result size is %zd\n", i, resultsize);
+          std::cout << "Iteration upto " << i << " done, result size is "
+                    << resultsize << "\n";
         }
 
-        // ASSERT(resultsize==4, "Failed verification");
-
         if (resultsize != 4)  // the XMLs for server 1 and server 2 have 1 and 2
                               // entries respectively
         {
@@ -258,13 +234,13 @@
 
       kst->stop();
     } catch (IllegalStateException &ise) {
-      char isemsg[500] = {0};
-      ACE_OS::snprintf(isemsg, 499, "IllegalStateException: %s", ise.what());
-      LOG(isemsg);
-      FAIL(isemsg);
+      std::string excpmsg = "IllegalStateException: " + std::string{ise.what()};
+
+      LOG(excpmsg);
+      FAIL(excpmsg);
     } catch (Exception &excp) {
-      char excpmsg[500] = {0};
-      ACE_OS::snprintf(excpmsg, 499, "Exception: %s", excp.what());
+      std::string excpmsg = "Exception: " + std::string{excp.what()};
+
       LOG(excpmsg);
       FAIL(excpmsg);
     } catch (...) {
diff --git a/cppcache/integration-test/testThinClientHeapLRU.cpp b/cppcache/integration-test/testThinClientHeapLRU.cpp
index 0572527..ff99cf8 100644
--- a/cppcache/integration-test/testThinClientHeapLRU.cpp
+++ b/cppcache/integration-test/testThinClientHeapLRU.cpp
@@ -19,8 +19,6 @@
 #define ROOT_SCOPE DISTRIBUTED_ACK
 
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include "BuiltinCacheableWrappers.hpp"
 
 #include <string>
@@ -63,9 +61,7 @@
   dunit::sleep(10000);
   auto me = dataReg->entries(false);
   LOG("Verifying size outside loop");
-  char buf[1024];
-  sprintf(buf, "region size is %zd", me.size());
-  LOG(buf);
+  LOG(std::string("region size is d") + std::to_string(me.size()));
 
   ASSERT(me.size() <= 1024, "Should have evicted anything over 1024 entries");
 }
diff --git a/cppcache/integration-test/testThinClientIntResPolKeysInv.cpp b/cppcache/integration-test/testThinClientIntResPolKeysInv.cpp
index fe869d5..12f78f6 100644
--- a/cppcache/integration-test/testThinClientIntResPolKeysInv.cpp
+++ b/cppcache/integration-test/testThinClientIntResPolKeysInv.cpp
@@ -15,8 +15,6 @@
  * limitations under the License.
  */
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include <string>
 
 #define ROOT_NAME "testThinClientIntResPolKeysInv"
@@ -60,22 +58,20 @@
                   bool noKey, bool isCreated = false) {
   // Verify key and value exist in this region, in this process.
   const char *value = val ? val : "";
-  char *buf =
-      reinterpret_cast<char *>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
+  std::string msg;
   if (!isCreated) {
     if (noKey) {
-      sprintf(buf, "Verify key %s does not exist in region %s", key, name);
+      msg = std::string("Verify key ") + key + " does not exist in region " +
+            name;
     } else if (!val) {
-      sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-              name);
+      msg = std::string("Verify value for key ") + key +
+            " does not exist in region " + name;
     } else {
-      sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-              name);
+      msg = std::string("Verify value for key ") + key + " is: " + value +
+            " in region " + name;
     }
-    LOG(buf);
+    LOG(msg);
   }
-  free(buf);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -148,17 +144,15 @@
 #define verifyInvalid(x, y) _verifyInvalid(x, y, __LINE__)
 
 void _verifyInvalid(const char *name, const char *key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyInvalid() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyInvalid() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, false);
   LOG("Entry invalidated.");
 }
 
 void _verifyDestroyed(const char *name, const char *key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyDestroyed() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyDestroyed() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, true);
   LOG("Entry destroyed.");
 }
@@ -167,17 +161,14 @@
 
 void _verifyEntry(const char *name, const char *key, const char *val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line) + "\n");
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
 
 void _verifyCreated(const char *name, const char *key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyCreated() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyCreated() called from ") + std::to_string(line) +
+      "\n");
   _verifyEntry(name, key, nullptr, false, true);
   LOG("Entry created.");
 }
@@ -185,8 +176,9 @@
 void createRegion(const char *name, bool ackMode, const char *endpoints,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
                                           endpoints, clientNotificationEnabled);
   ASSERT(regPtr != nullptr, "Failed to create region.");
@@ -195,9 +187,9 @@
 void createEntry(const char *name, const char *key,
                  const char *value = nullptr) {
   LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Create entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   if (value == nullptr) {
@@ -223,9 +215,9 @@
 
 void updateEntry(const char *name, const char *key, const char *value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -246,17 +238,14 @@
 
 void doNetsearch(const char *name, const char *key, const char *value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
-  fflush(stdout);
+  std::cout << "netsearch  region " << regPtr->getName() << "\n" << std::flush;
   ASSERT(regPtr != nullptr, "Region not found.");
 
   ASSERT(!regPtr->containsKey(keyPtr),
@@ -269,10 +258,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") + checkPtr->value() +
+        " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -371,7 +358,6 @@
 DUNIT_TASK_DEFINITION(CLIENT2, StepEight)
   {
     auto regPtr1 = getHelper()->getRegion(regionNames[1]);
-    // regPtr1->registerRegex(regexWildcard);
     regPtr1->registerAllKeys();
 
     verifyInvalid(regionNames[1], keys[0]);
diff --git a/cppcache/integration-test/testThinClientInterest1Cacheless.cpp b/cppcache/integration-test/testThinClientInterest1Cacheless.cpp
index 31819a7..e6f4fb5 100644
--- a/cppcache/integration-test/testThinClientInterest1Cacheless.cpp
+++ b/cppcache/integration-test/testThinClientInterest1Cacheless.cpp
@@ -38,16 +38,18 @@
   inline void checkEntry(const EntryEvent &event) {
     auto keyPtr = std::dynamic_pointer_cast<CacheableString>(event.getKey());
     for (int i = 0; i < 5; i++) {
-      if (!ACE_OS::strcmp(keys[i], keyPtr->value().c_str())) {
+      if (keyPtr->value() == keys[i]) {
         auto valPtr =
             std::dynamic_pointer_cast<CacheableString>(event.getNewValue());
-        if (!ACE_OS::strcmp(vals[i], valPtr->value().c_str())) m_gotit[i] = 1;
+        if (valPtr->value() == vals[i]) {
+          m_gotit[i] = 1;
+        }
         break;
       }
     }
   }
-  virtual void afterCreate(const EntryEvent &event) { checkEntry(event); }
-  virtual void afterUpdate(const EntryEvent &event) { checkEntry(event); }
+  void afterCreate(const EntryEvent &event) override { checkEntry(event); }
+  void afterUpdate(const EntryEvent &event) override { checkEntry(event); }
   inline bool gotAll() {
     for (int i = 0; i < 5; i++) {
       if (m_gotit[i] == 0) return false;
diff --git a/cppcache/integration-test/testThinClientInterest1_Bug1001.cpp b/cppcache/integration-test/testThinClientInterest1_Bug1001.cpp
index f0bb56d..7697fb3 100644
--- a/cppcache/integration-test/testThinClientInterest1_Bug1001.cpp
+++ b/cppcache/integration-test/testThinClientInterest1_Bug1001.cpp
@@ -31,18 +31,16 @@
 using apache::geode::client::Exception;
 
 std::shared_ptr<CacheableString> getUString(int index) {
+  std::wostringstream strm;
   std::wstring baseStr(40, L'\x20AC');
-  wchar_t indexStr[15];
-  swprintf(indexStr, 14, L"%10d", index);
-  baseStr.append(indexStr);
-  return CacheableString::create(baseStr);
+  strm << baseStr << std::setw(10) << std::setfill(L'0') << index;
+  return CacheableString::create(strm.str());
 }
 std::shared_ptr<CacheableString> getUAString(int index) {
+  std::wostringstream strm;
   std::wstring baseStr(40, L'A');
-  wchar_t indexStr[15];
-  swprintf(indexStr, 14, L"%10d", index);
-  baseStr.append(indexStr);
-  return CacheableString::create(baseStr);
+  strm << baseStr << std::setw(10) << std::setfill(L'0') << index;
+  return CacheableString::create(strm.str());
 }
 
 DUNIT_TASK_DEFINITION(CLIENT1, SetupClient1)
@@ -81,9 +79,8 @@
     auto regPtr = getHelper()->getRegion(regionNames[0]);
     for (int i = 0; i < 5; i++) {
       auto keyPtr1 = CacheableKey::create(keys[i]);
-      char buf[1024];
-      sprintf(buf, "key[%s] should have been found", keys[i]);
-      ASSERT(regPtr->containsKey(keyPtr1), buf);
+      auto msg = std::string("key[") + keys[i] + "] should have been found";
+      ASSERT(regPtr->containsKey(keyPtr1), msg);
     }
   }
 END_TASK_DEFINITION
@@ -104,9 +101,8 @@
     auto regPtr = getHelper()->getRegion(regionNames[0]);
     for (int index = 0; index < 5; ++index) {
       auto keyPtr = CacheableKey::create(keys[index]);
-      char buf[1024];
-      sprintf(buf, "key[%s] should have been found", keys[index]);
-      ASSERT(regPtr->containsKey(keyPtr), buf);
+      auto msg = std::string("key[") + keys[index] + "] should have been found";
+      ASSERT(regPtr->containsKey(keyPtr), msg);
       auto val = std::dynamic_pointer_cast<CacheableString>(
           regPtr->getEntry(keyPtr)->getValue());
       ASSERT(strcmp(val->value().c_str(), nvals[index]) == 0,
@@ -240,7 +236,7 @@
       auto lCStringP = CacheableString::create(str);
       lCStringP->value();
     } catch (const Exception &geodeExcp) {
-      printf("%s: %s", geodeExcp.getName().c_str(), geodeExcp.what());
+      std::cout << geodeExcp.getName() << " : " << geodeExcp.what();
       FAIL("Should not have got exception.");
     }
 
@@ -252,7 +248,7 @@
       auto lCStringP = CacheableString::create(str);
       lCStringP->value();
     } catch (const Exception &geodeExcp) {
-      printf("%s: %s", geodeExcp.getName().c_str(), geodeExcp.what());
+      std::cout << geodeExcp.getName() << " : " << geodeExcp.what();
       FAIL("Should not have got exception.");
     }
 
diff --git a/cppcache/integration-test/testThinClientInterestNotify.cpp b/cppcache/integration-test/testThinClientInterestNotify.cpp
index 9f8673b..0e41fdb 100644
--- a/cppcache/integration-test/testThinClientInterestNotify.cpp
+++ b/cppcache/integration-test/testThinClientInterestNotify.cpp
@@ -14,6 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include <sstream>
 
 #include "fw_dunit.hpp"
 #include "ThinClientHelper.hpp"
@@ -47,24 +48,23 @@
   std::string m_name;
 
   void check(const EntryEvent &event, const char *eventType) {
-    char buf[256] = {'\0'};
-
     try {
       auto keyPtr = std::dynamic_pointer_cast<CacheableString>(event.getKey());
       auto valuePtr =
           std::dynamic_pointer_cast<CacheableInt32>(event.getNewValue());
-
-      sprintf(buf, "%s: %s: Key = %s, NewValue = %s", m_name.c_str(), eventType,
-              keyPtr->value().c_str(),
-              (valuePtr == nullptr ? "nullptr" : valuePtr->toString().c_str()));
-      LOG(buf);
+      std::stringstream strm;
+      strm << m_name << ": " << eventType << ": Key = " << keyPtr->value()
+           << (valuePtr ? valuePtr->toString() : "nullptr");
+      LOG(strm.str());
     } catch (const Exception &excp) {
-      sprintf(buf, "%s: %s: %s: %s", m_name.c_str(), eventType,
-              excp.getName().c_str(), excp.what());
-      LOG(buf);
+      std::stringstream strm;
+      strm << m_name << ": " << eventType << ": " << excp.getName() << ": "
+           << excp.what();
+      LOG(strm.str());
     } catch (...) {
-      sprintf(buf, "%s: %s: unknown exception", m_name.c_str(), eventType);
-      LOG(buf);
+      std::stringstream strm;
+      strm << m_name << ": " << eventType << ": unknown exception";
+      LOG(strm.str());
     }
   }
 
@@ -76,24 +76,24 @@
         m_destroys(0),
         m_name(name) {}
 
-  ~EventListener() {}
+  ~EventListener() noexcept override = default;
 
-  virtual void afterCreate(const EntryEvent &event) {
+  void afterCreate(const EntryEvent &event) override {
     check(event, "afterCreate");
     m_creates++;
   }
 
-  virtual void afterUpdate(const EntryEvent &event) {
+  void afterUpdate(const EntryEvent &event) override {
     check(event, "afterUpdate");
     m_updates++;
   }
 
-  virtual void afterInvalidate(const EntryEvent &event) {
+  void afterInvalidate(const EntryEvent &event) override {
     check(event, "afterInvalidate");
     m_invalidates++;
   }
 
-  virtual void afterDestroy(const EntryEvent &event) {
+  void afterDestroy(const EntryEvent &event) override {
     check(event, "afterDestroy");
     m_destroys++;
   }
@@ -107,23 +107,24 @@
 
   // validate expected event counts
   void validate(int creates, int updates, int invalidates, int destroys) {
-    char logmsg[256] = {'\0'};
-    sprintf(logmsg, "VALIDATE CALLED for %s", m_name.c_str());
-    LOG(logmsg);
-    sprintf(logmsg, "creates: expected = %d, actual = %d", creates, m_creates);
-    LOG(logmsg);
-    ASSERT(m_creates == creates, logmsg);
-    sprintf(logmsg, "updates: expected = %d, actual = %d", updates, m_updates);
-    LOG(logmsg);
-    ASSERT(m_updates == updates, logmsg);
-    sprintf(logmsg, "invalidates: expected = %d, actual = %d", invalidates,
-            m_invalidates);
-    LOG(logmsg);
-    ASSERT(m_invalidates == invalidates, logmsg);
-    sprintf(logmsg, "destroys: expected = %d, actual = %d", destroys,
-            m_destroys);
-    LOG(logmsg);
-    ASSERT(m_destroys == destroys, logmsg);
+    LOG(std::string("VALIDATE CALLED for ") + m_name);
+    auto msg = std::string("creates: expected = ") + std::to_string(creates) +
+               ", actual = " + std::to_string(m_creates);
+    LOG(msg);
+    ASSERT(m_creates == creates, msg);
+    msg = std::string("updates: expected = ") + std::to_string(updates) +
+          ", actual = " + std::to_string(m_updates);
+    LOG(msg);
+    ASSERT(m_updates == updates, msg);
+    msg = std::string("invalidates: expected = ") +
+          std::to_string(invalidates) +
+          ", actual = " + std::to_string(m_invalidates);
+    LOG(msg);
+    ASSERT(m_invalidates == invalidates, msg);
+    msg = std::string("destroys: expected = ") + std::to_string(destroys) +
+          ", actual = " + std::to_string(m_destroys);
+    LOG(msg);
+    ASSERT(m_destroys == destroys, msg);
   }
 };
 
@@ -147,7 +148,6 @@
 
 #include "ThinClientDurableInit.hpp"
 #include "ThinClientTasks_C2S2.hpp"
-#include "LocatorHelper.hpp"
 
 void initClientForInterestNotify(std::shared_ptr<EventListener> &mon1,
                                  std::shared_ptr<EventListener> &mon2,
@@ -262,8 +262,7 @@
 
 DUNIT_TASK_DEFINITION(SERVER_AND_FEEDER, FeederUpAndFeed)
   {
-    initClientWithPool(true, "__TEST_POOL1__", locatorsG, nullptr, nullptr, 0,
-                       true);
+    initClientWithPool(true, "__TEST_POOL1__", locatorsG, {}, nullptr, 0, true);
     getHelper()->createPooledRegion(regions[0], USE_ACK, locatorsG,
                                     "__TEST_POOL1__", true, true);
     getHelper()->createPooledRegion(regions[1], USE_ACK, locatorsG,
diff --git a/cppcache/integration-test/testThinClientLRUExpiration.cpp b/cppcache/integration-test/testThinClientLRUExpiration.cpp
index 8d06af5..94f3346 100644
--- a/cppcache/integration-test/testThinClientLRUExpiration.cpp
+++ b/cppcache/integration-test/testThinClientLRUExpiration.cpp
@@ -19,9 +19,6 @@
 
 #include <string>
 
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-
 #include <geode/internal/chrono/duration.hpp>
 
 #define ROOT_NAME "testThinClientLRUExpiration"
@@ -51,7 +48,7 @@
 bool isLocalServer = false;
 
 static bool isLocator = false;
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 
 const char *regionNames[] = {"DistRegionAck1", "DistRegionAck2",
@@ -82,32 +79,32 @@
 void printAttribute(RegionAttributes attr) {
   using apache::geode::internal::chrono::duration::to_string;
 
-  printf("CachingEnable: %s\n",
-         attr.getCachingEnabled() ? "enabled" : "disabled");
-  printf("InitialCapacity: %d\n", attr.getInitialCapacity());
-  printf("LoadFactor: %f\n", attr.getLoadFactor());
-  printf("ConcurencyLevel: %d\n", attr.getConcurrencyLevel());
-  printf("RegionTimeToLive: %s\n",
-         to_string(attr.getRegionTimeToLive()).c_str());
-  printf("RegionIdleTimeout: %s\n",
-         to_string(attr.getRegionIdleTimeout()).c_str());
-  printf("EntryTimeToLive: %s\n", to_string(attr.getEntryTimeToLive()).c_str());
-  printf("EntryIdleTimeout: %s\n",
-         to_string(attr.getEntryIdleTimeout()).c_str());
-  printf("getLruEntriesLimit: %d\n", attr.getLruEntriesLimit());
-  printf("RegionTimeToLiveAction: %d\n",
-         static_cast<int>(attr.getRegionTimeToLiveAction()));
-  printf("RegionIdleTimeoutAction: %d\n",
-         static_cast<int>(attr.getRegionIdleTimeoutAction()));
-  printf("EntryTimeToLiveAction: %d\n",
-         static_cast<int>(attr.getEntryTimeToLiveAction()));
-  printf("EntryIdleTimeoutAction: %d\n",
-         static_cast<int>(attr.getEntryIdleTimeoutAction()));
-  printf("LruEvictionAction: %d\n",
-         static_cast<int>(attr.getLruEvictionAction()));
-  printf("ClientNotification: %s\n",
-         attr.getClientNotificationEnabled() ? "true" : "false");
-  // printf("getEndPoint: %s\n",attr.getEndpoints());
+  std::cout << "CachingEnable: "
+            << (attr.getCachingEnabled() ? "enabled" : "disabled") << "\n";
+  std::cout << "InitialCapacity: " << attr.getInitialCapacity() << "\n";
+  std::cout << "LoadFactor: " << attr.getLoadFactor() << "\n";
+  std::cout << "ConcurencyLevel: " << attr.getConcurrencyLevel() << "\n";
+  std::cout << "RegionTimeToLive: " << to_string(attr.getRegionTimeToLive())
+            << "\n";
+  std::cout << "RegionIdleTimeout: " << to_string(attr.getRegionIdleTimeout())
+            << "\n";
+  std::cout << "EntryTimeToLive: " << to_string(attr.getEntryTimeToLive())
+            << "\n";
+  std::cout << "EntryIdleTimeout: " << to_string(attr.getEntryIdleTimeout())
+            << "\n";
+  std::cout << "getLruEntriesLimit: " << attr.getLruEntriesLimit() << "\n";
+  std::cout << "RegionTimeToLiveAction: "
+            << static_cast<int>(attr.getRegionTimeToLiveAction()) << "\n";
+  std::cout << "RegionIdleTimeoutAction: "
+            << static_cast<int>(attr.getRegionIdleTimeoutAction()) << "\n";
+  std::cout << "EntryTimeToLiveAction: "
+            << static_cast<int>(attr.getEntryTimeToLiveAction()) << "\n";
+  std::cout << "EntryIdleTimeoutAction: "
+            << static_cast<int>(attr.getEntryIdleTimeoutAction()) << "\n";
+  std::cout << "LruEvictionAction: "
+            << static_cast<int>(attr.getLruEvictionAction()) << "\n";
+  std::cout << "ClientNotification: "
+            << (attr.getClientNotificationEnabled() ? "true" : "false") << "\n";
 }
 
 void setCacheListener(const char *regName,
@@ -139,15 +136,11 @@
     rptr->put(1, 2);
     FAIL("Put should not be happened");
   } catch (RegionDestroyedException &ex) {
-    char buffer[1024];
-    sprintf(buffer, "Got expected exception %s: msg = %s", ex.getName().c_str(),
-            ex.what());
-    LOG(buffer);
+    LOG(std::string("Got expected exception ") + ex.getName() +
+        ": msg = " + ex.what());
   } catch (Exception &ex) {
-    char buffer[1024];
-    sprintf(buffer, "Got unexpected exception %s: msg = %s",
-            ex.getName().c_str(), ex.what());
-    FAIL(buffer);
+    FAIL(std::string("Got expected exception ") + ex.getName() +
+         ": msg = " + ex.what());
   }
 }
 
@@ -157,8 +150,9 @@
                   const std::chrono::seconds &rttl,
                   const std::chrono::seconds &rit, int lel,
                   ExpirationAction action = ExpirationAction::DESTROY) {
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto
       regPtr =  // getHelper()->createRegion( name, ackMode, true,
                 // ettl,eit,rttl,rit,lel,action,endpoints,clientNotificationEnabled
@@ -172,19 +166,15 @@
 
 void doRgnOperations(const char *name, int n, int rgnOpt = 0) {
   std::shared_ptr<CacheableString> value;
-  char buf[16];
   if (rgnOpt == 0) {
-    memset(buf, 'A', 15);
-    buf[15] = '\0';
-    memcpy(buf, "Value - ", 8);
-    value = CacheableString::create(buf);
+    value = CacheableString::create("Value - AAAAAAA");
     ASSERT(value != nullptr, "Failed to create value.");
   }
   auto rptr = getHelper()->getRegion(name);
   ASSERT(rptr != nullptr, "Region not found.");
   for (int i = 0; i < n; i++) {
-    sprintf(buf, "KeyA - %d", i + 1);
-    auto key = CacheableKey::create(buf);
+    auto keyStr = std::string("KeyA - ") + std::to_string(i + 1);
+    auto key = CacheableKey::create(keyStr);
     switch (rgnOpt) {
       case 0:
         rptr->put(key, value);
@@ -210,11 +200,12 @@
 
 void dumpCounters(const char *regName) {
   auto rptr = getHelper()->getRegion(regName);
-  printf("Region size: %d\n", rptr->size());
+  std::cout << "Region size: " << rptr->size() << "\n";
   if (regListener != nullptr) {
-    printf("counts:: creates: %d, updates: %d, invalidates: %d, destroys: %d\n",
-           regListener->getCreates(), regListener->getUpdates(),
-           regListener->getInvalidates(), regListener->getDestroys());
+    std::cout << "counts:: creates: " << regListener->getCreates()
+              << ", updates: " << regListener->getUpdates()
+              << ", invalidates: " << regListener->getInvalidates()
+              << ", destroys: " << regListener->getDestroys() << "\n";
   }
 }
 
@@ -226,11 +217,11 @@
   auto rptr = getHelper()->getRegion(regName);
   if (isValue) {
     auto v = rptr->values();
-    printf("Region value size: %zd\n", v.size());
+    std::cout << "Region value size: " << v.size() << "\n";
     return v.size();
   } else if (!useRegionSize) {
     auto v = rptr->keys();
-    printf("Region key size: %zd\n", v.size());
+    std::cout << "Region key size: " << v.size() << "\n";
     return v.size();
   } else {
     return rptr->size();
@@ -255,10 +246,8 @@
     try {
       doRgnOperations(regionName, noOfEntry, rgnOpt);
     } catch (EntryNotFoundException &ex) {
-      char buffer[1024];
-      sprintf(buffer, "Got expected exception %s: msg = %s",
-              ex.getName().c_str(), ex.what());
-      LOG(buffer);
+      LOG(std::string("Got expected exception ") + ex.getName() +
+          ": msg = " + ex.what());
     }
     localDestroyRegion(regionName);
   }
@@ -303,7 +292,7 @@
 DUNIT_TASK(CLIENT1, StepThreeCase1)
   {
     doRgnOperations(regionNames[0], 100);
-    ACE_OS::sleep(1);
+    std::this_thread::sleep_for(std::chrono::seconds(1));
     auto n = getNumOfEntries(regionNames[0]);
     ASSERT(n == 100, "Expected 100 entries");
     LOG("StepThree complete.");
@@ -320,7 +309,7 @@
 DUNIT_TASK(CLIENT1, StepFiveCase1)
   {
     // wair 5 sec so all enteries gone
-    ACE_OS::sleep(5);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
     auto n = getNumOfEntries(regionNames[0]);
     ASSERT(n == 0, "Expected 0 entries");
     LOG("StepFive complete.");
@@ -328,7 +317,7 @@
 END_TASK(StepFiveCase1)
 DUNIT_TASK(CLIENT2, StepSixCase1)
   {
-    ACE_OS::sleep(5);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
     // all enteris has been deleted
     // int n = getNumOfEntries(regionNames[0],true);
     auto n = getNumOfEntries(regionNames[0]);
@@ -384,10 +373,10 @@
 END_TASK(StepFourCase2)
 DUNIT_TASK(CLIENT1, StepFiveCase2)
   {
-    ACE_OS::sleep(2);
+    std::this_thread::sleep_for(std::chrono::seconds(2));
     auto n = getNumOfEntries(regionNames[0]);
     ASSERT(n == 100, "Expected 100 entries");
-    ACE_OS::sleep(5);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
     // value should be invalidate as passing true
     n = getNumOfEntries(regionNames[0], true);
     ASSERT(n == 0, "Expected 0 entries");
@@ -396,7 +385,7 @@
 END_TASK(StepFiveCase2)
 DUNIT_TASK(CLIENT2, StepSixCase2)
   {
-    ACE_OS::sleep(2);
+    std::this_thread::sleep_for(std::chrono::seconds(2));
     auto n = getNumOfEntries(regionNames[0], true);
     ASSERT(n == 100, "Expected 100 entries");
     LOG("StepSixCase2 complete.");
@@ -455,7 +444,7 @@
 END_TASK(StepFiveCase3)
 DUNIT_TASK(CLIENT2, StepSixCase3)
   {
-    ACE_OS::sleep(2);
+    std::this_thread::sleep_for(std::chrono::seconds(2));
     auto n = getNumOfEntries(regionNames[0]);
     ASSERT(n == 10, "Expected 10 entries");
     n = getNumOfEntries(regionNames[0], true);
@@ -512,12 +501,12 @@
 END_TASK(StepFourCase4)
 DUNIT_TASK(CLIENT1, StepFiveCase4)
   {
-    ACE_OS::sleep(2);
+    std::this_thread::sleep_for(std::chrono::seconds(2));
     auto n = getNumOfEntries(regionNames[0]);
     ASSERT(n == 5, "Expected 5 entries");
     n = getNumOfEntries(regionNames[0], true);
     ASSERT(n == 5, "Expected 5 entries");
-    ACE_OS::sleep(4);
+    std::this_thread::sleep_for(std::chrono::seconds(4));
     n = getNumOfEntries(regionNames[0]);
     ASSERT(n == 5, "Expected 5 entries");
     LOG("StepFiveCase4 "
@@ -526,7 +515,7 @@
 END_TASK(StepFiveCase4)
 DUNIT_TASK(CLIENT2, StepSixCase4)
   {
-    ACE_OS::sleep(1);
+    std::this_thread::sleep_for(std::chrono::seconds(1));
     auto n = getNumOfEntries(regionNames[0]);
     ASSERT(n == 10, "Expected 10 entries");
     n = getNumOfEntries(regionNames[0], true);
@@ -596,7 +585,7 @@
 END_TASK(StepFourCase5)
 DUNIT_TASK(CLIENT1, StepFiveCase5)
   {
-    ACE_OS::sleep(2);
+    std::this_thread::sleep_for(std::chrono::seconds(2));
     auto n = getNumOfEntries(regionNames[0]);
     ASSERT(n == 5,
            "Expected "
@@ -607,7 +596,7 @@
            "Expected "
            "5 "
            "entries");
-    ACE_OS::sleep(4);
+    std::this_thread::sleep_for(std::chrono::seconds(4));
     n = getNumOfEntries(regionNames[0]);
     ASSERT(n == 0,
            "Expected "
@@ -620,7 +609,7 @@
 END_TASK(StepFiveCase5)
 DUNIT_TASK(CLIENT2, StepSixCase5)
   {
-    ACE_OS::sleep(2);
+    std::this_thread::sleep_for(std::chrono::seconds(2));
     auto n = getNumOfEntries(regionNames[0]);
     ASSERT(n == 5,
            "Expecte"
@@ -711,12 +700,12 @@
 END_TASK(StepFourCase6)
 DUNIT_TASK(CLIENT1, StepFiveCase6)
   {
-    ACE_OS::sleep(2);
+    std::this_thread::sleep_for(std::chrono::seconds(2));
     auto n = getNumOfEntries(regionNames[0]);
     ASSERT(n == 5, "Expected 5 entries");
     n = getNumOfEntries(regionNames[0], true);
     ASSERT(n == 5, "Expected 5 entries");
-    ACE_OS::sleep(4);
+    std::this_thread::sleep_for(std::chrono::seconds(4));
     n = getNumOfEntries(regionNames[0]);
     ASSERT(n == 5, "Expected 5 entries");
     LOG("StepFiveCase6 complete.");
@@ -724,7 +713,7 @@
 END_TASK(StepFiveCase6)
 DUNIT_TASK(CLIENT2, StepSixCase6)
   {
-    ACE_OS::sleep(1);
+    std::this_thread::sleep_for(std::chrono::seconds(1));
     auto n = getNumOfEntries(regionNames[0]);
     ASSERT(n == 10, "Expected 10 entries");
     n = getNumOfEntries(regionNames[0], true);
@@ -771,21 +760,21 @@
 END_TASK(StepFourCase7)
 DUNIT_TASK(CLIENT1, StepFiveCase7)
   {
-    ACE_OS::sleep(15);
+    std::this_thread::sleep_for(std::chrono::seconds(15));
     ValidateDestroyRegion(regionNames[0]);
     LOG("StepFiveCase7 complete.");
   }
 END_TASK(StepFiveCase7)
 DUNIT_TASK(CLIENT2, StepSixCase7)
   {
-    ACE_OS::sleep(3);
+    std::this_thread::sleep_for(std::chrono::seconds(3));
     ValidateDestroyRegion(regionNames[0]);
     LOG("StepSixCase7 complete.");
   }
 END_TASK(StepSixCase7)
 DUNIT_TASK(CLIENT1, StepOneCase8)
   {
-    ACE_OS::sleep(10);
+    std::this_thread::sleep_for(std::chrono::seconds(10));
     // regionName, ettl, eit , rttl, rit,lel,endpoints,noOfEntry,rgnOpetation -
     // [put-0/get-5/destroy-3] ,destroyRgn - [true/false]
     // ,clientNotificationEnabled - [true/false] ,ExpirationAction
@@ -823,17 +812,17 @@
 END_TASK(StepFourCase8)
 DUNIT_TASK(CLIENT1, StepFiveCase8)
   {
-    ACE_OS::sleep(5);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
     auto n = getNumOfEntries(regionNames[1]);
     ASSERT(n == 10, "Expected 0 entries");
-    ACE_OS::sleep(10);
+    std::this_thread::sleep_for(std::chrono::seconds(10));
     ValidateDestroyRegion(regionNames[1]);
     LOG("StepFiveCase8 complete.");
   }
 END_TASK(StepFiveCase8)
 DUNIT_TASK(CLIENT2, StepSixCase8)
   {
-    ACE_OS::sleep(2);
+    std::this_thread::sleep_for(std::chrono::seconds(2));
     ValidateDestroyRegion(regionNames[1]);
     LOG("StepSixCase8 complete.");
   }
@@ -861,7 +850,7 @@
 END_TASK(StepTwoCase9)
 DUNIT_TASK(CLIENT1, StepThreeCase9)
   {
-    ACE_OS::sleep(2);
+    std::this_thread::sleep_for(std::chrono::seconds(2));
     doRgnOperations(regionNames[2], 10);
     auto n = getNumOfEntries(regionNames[2]);
     ASSERT(n == 5, "Expected 5 entries");
@@ -878,17 +867,17 @@
 END_TASK(StepFourCase9)
 DUNIT_TASK(CLIENT1, StepFiveCase9)
   {
-    ACE_OS::sleep(5);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
     auto n = getNumOfEntries(regionNames[2]);
     ASSERT(n == 0, "Expected 0 entries");
-    ACE_OS::sleep(8);
+    std::this_thread::sleep_for(std::chrono::seconds(8));
     ValidateDestroyRegion(regionNames[2]);
     LOG("StepFiveCase9 complete.");
   }
 END_TASK(StepFiveCase9)
 DUNIT_TASK(CLIENT2, StepSixCase9)
   {
-    ACE_OS::sleep(3);
+    std::this_thread::sleep_for(std::chrono::seconds(3));
     ValidateDestroyRegion(regionNames[2]);
     LOG("StepSixCase9 complete.");
   }
@@ -932,17 +921,17 @@
 END_TASK(StepFourCase10)
 DUNIT_TASK(CLIENT1, StepFiveCase10)
   {
-    ACE_OS::sleep(5);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
     auto n = getNumOfEntries(regionNames[3]);
     ASSERT(n == 0, "Expected 0 entries");
-    ACE_OS::sleep(10);
+    std::this_thread::sleep_for(std::chrono::seconds(10));
     ValidateDestroyRegion(regionNames[3]);
     LOG("StepFiveCase10 complete.");
   }
 END_TASK(StepFiveCase10)
 DUNIT_TASK(CLIENT2, StepSixCase10)
   {
-    ACE_OS::sleep(3);
+    std::this_thread::sleep_for(std::chrono::seconds(3));
     ValidateDestroyRegion(regionNames[3]);
     LOG("StepSixCase10 complete.");
   }
@@ -1021,7 +1010,7 @@
 END_TASK(StepFourCase11)
 DUNIT_TASK(CLIENT1, StepFiveCase11)
   {
-    ACE_OS::sleep(5);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
     auto n = getNumOfEntries(regionNames[4]);
 
     ASSERT(regWriter->isWriterInvoked() == true, "Writer Should be invoked");
@@ -1058,7 +1047,7 @@
       so expect 5 entries instead of 0 earlier. */
     ASSERT(n == 5, "Expected 5 entries");
 
-    ACE_OS::sleep(3);
+    std::this_thread::sleep_for(std::chrono::seconds(3));
     LOG("StepSixCase11 complete.");
   }
 END_TASK(StepSixCase11)
@@ -1149,7 +1138,7 @@
 END_TASK(StepFourCase12)
 DUNIT_TASK(CLIENT1, StepFiveCase12)
   {
-    ACE_OS::sleep(5);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
     auto n = getNumOfEntries(regionNames[5]);
 
     ASSERT(regWriter->isWriterInvoked() == true, "Writer Should be invoked");
@@ -1168,7 +1157,7 @@
 END_TASK(StepFiveCase12)
 DUNIT_TASK(CLIENT2, StepSixCase12)
   {
-    ACE_OS::sleep(3);
+    std::this_thread::sleep_for(std::chrono::seconds(3));
     auto n = getNumOfEntries(regionNames[5]);
     ASSERT(regWriter->isWriterInvoked() == false,
            "Writer Should not be invoked");
@@ -1262,7 +1251,7 @@
 END_TASK(StepFourCase13)
 DUNIT_TASK(CLIENT1, StepFiveCase13)
   {
-    ACE_OS::sleep(5);
+    std::this_thread::sleep_for(std::chrono::seconds(5));
     auto n = getNumOfEntries(regionNames[5]);
 
     ASSERT(regWriter->isWriterInvoked() == true, "Writer Should be invoked");
@@ -1281,7 +1270,7 @@
 END_TASK(StepFiveCase13)
 DUNIT_TASK(CLIENT2, StepSixCase13)
   {
-    ACE_OS::sleep(3);
+    std::this_thread::sleep_for(std::chrono::seconds(3));
     auto n = getNumOfEntries(regionNames[5]);
     ASSERT(regWriter->isWriterInvoked() == false,
            "Writer Should not be invoked");
diff --git a/cppcache/integration-test/testThinClientLargePutAllWithCallBackArg.cpp b/cppcache/integration-test/testThinClientLargePutAllWithCallBackArg.cpp
index 40b0441..42c9712 100644
--- a/cppcache/integration-test/testThinClientLargePutAllWithCallBackArg.cpp
+++ b/cppcache/integration-test/testThinClientLargePutAllWithCallBackArg.cpp
@@ -19,8 +19,10 @@
 
 DUNIT_MAIN
   {
-    CALL_TASK(CreateServer1);
-    CALL_TASK(CreateServer2);
+    CALL_TASK(CreateLocator1);
+
+    CALL_TASK(CreateServer1_With_Locator_XML);
+    CALL_TASK(CreateServer2_With_Locator_XML);
 
     CALL_TASK(CreateClient1RegionsWithCachingWithConcurrencyCheck);
     CALL_TASK(CreateClient2Regions);
diff --git a/cppcache/integration-test/testThinClientListenerCallbackArgTest.cpp b/cppcache/integration-test/testThinClientListenerCallbackArgTest.cpp
index 5f294ce..c48cf7d 100644
--- a/cppcache/integration-test/testThinClientListenerCallbackArgTest.cpp
+++ b/cppcache/integration-test/testThinClientListenerCallbackArgTest.cpp
@@ -21,12 +21,9 @@
 #include "ThinClientHelper.hpp"
 #include "TallyListener.hpp"
 #include "TallyWriter.hpp"
-#include "testobject/PdxType.hpp"
 #include "testobject/VariousPdxTypes.hpp"
 
-#include "SerializationRegistry.hpp"
 #include "CacheRegionHelper.hpp"
-#include "CacheImpl.hpp"
 
 #define CLIENT1 s1p1
 #define CLIENT2 s1p2
@@ -44,7 +41,7 @@
 
 bool isLocalServer = true;
 static bool isLocator = false;
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #include "LocatorHelper.hpp"
 
@@ -77,7 +74,7 @@
     LOG("CallbackListener contructor called");
   }
 
-  virtual ~CallbackListener() {}
+  ~CallbackListener() noexcept override = default;
 
   int getCreates() { return m_creates; }
 
@@ -142,30 +139,31 @@
     check(event.getCallbackArgument(), updateEvent);
   }
 
-  virtual void afterCreate(const EntryEvent &event) {
+  void afterCreate(const EntryEvent &event) override {
     checkcallbackArg(event, m_creates);
   }
 
-  virtual void afterUpdate(const EntryEvent &event) {
+  void afterUpdate(const EntryEvent &event) override {
     checkcallbackArg(event, m_updates);
   }
 
-  virtual void afterInvalidate(const EntryEvent &event) {
+  void afterInvalidate(const EntryEvent &event) override {
     checkcallbackArg(event, m_invalidates);
   }
 
-  virtual void afterDestroy(const EntryEvent &event) {
+  void afterDestroy(const EntryEvent &event) override {
     checkcallbackArg(event, m_destroys);
   }
 
-  virtual void afterRegionInvalidate(const RegionEvent &event) {
+  void afterRegionInvalidate(const RegionEvent &event) override {
     checkcallbackArg(event, m_regionInvalidate);
   }
 
-  virtual void afterRegionDestroy(const RegionEvent &event) {
+  void afterRegionDestroy(const RegionEvent &event) override {
     checkcallbackArg(event, m_regionDestroy);
   }
-  virtual void afterRegionClear(const RegionEvent &event) {
+
+  void afterRegionClear(const RegionEvent &event) override {
     checkcallbackArg(event, m_regionClear);
   }
 };
@@ -184,28 +182,23 @@
 void validateEventCount(int line) {
   LOGINFO("ValidateEvents called from line (%d).", line);
   int num = reg1Listener1->getCreates();
-  char buf[1024];
-  sprintf(buf, "Didn't get expected callback arg in aftercreate event");
-  ASSERT(7 == num, buf);
+  ASSERT(num == 7, "Didn't get expected callback arg in aftercreate event");
   num = reg1Listener1->getUpdates();
-  sprintf(buf, "Didn't get expected callback arg in afterupdate events");
-  ASSERT(3 == num, buf);
+  ASSERT(num == 3, "Didn't get expected callback arg in afterupdate events");
   num = reg1Listener1->getInvalidates();
-  sprintf(buf, "Didn't get expected callback arg in afterInvalidates events");
-  ASSERT(2 == num, buf);
+  ASSERT(num == 2,
+         "Didn't get expected callback arg in afterInvalidates events");
   num = reg1Listener1->getDestroys();
-  sprintf(buf, "Didn't get expected callback arg in afterdestroy events");
-  ASSERT(5 == num, buf);
+  ASSERT(num == 5, "Didn't get expected callback arg in afterdestroy events");
   num = reg1Listener1->getRegionInvalidates();
-  sprintf(buf,
-          "Didn't get expected callback arg in afterRegionInvalidates events");
-  ASSERT(1 == num, buf);
+  ASSERT(num == 1,
+         "Didn't get expected callback arg in afterRegionInvalidates events");
   num = reg1Listener1->getRegionDestroys();
-  sprintf(buf, "Didn't get expected callback arg in afterRegiondestroy events");
-  ASSERT(1 == num, buf);
+  ASSERT(num == 1,
+         "Didn't get expected callback arg in afterRegiondestroy events");
   num = reg1Listener1->getRegionClear();
-  sprintf(buf, "Didn't get expected callback arg in afterRegionClear events");
-  ASSERT(1 == num, buf);
+  ASSERT(num == 1,
+         "Didn't get expected callback arg in afterRegionClear events");
 }
 
 DUNIT_TASK_DEFINITION(SERVER1, StartServer)
diff --git a/cppcache/integration-test/testThinClientListenerEvents.cpp b/cppcache/integration-test/testThinClientListenerEvents.cpp
index a102f13..4406ca8 100644
--- a/cppcache/integration-test/testThinClientListenerEvents.cpp
+++ b/cppcache/integration-test/testThinClientListenerEvents.cpp
@@ -104,11 +104,6 @@
     int toalFunCall = regListener1->getCount();
     ASSERT(4 == toalFunCall,
            "afterCreate() did not call expected number of times");
-    // printf("[NIL_DEBUG_DUnitTest:149] Total Function Call =
-    // %d.............\n",
-    // toalFunCall);
-    // printf("\n[NIL_DEBUG_DUnitTest:150:Remote get ended.
-    // ..................\n");
   }
 END_TASK_DEFINITION
 
diff --git a/cppcache/integration-test/testThinClientLocator.cpp b/cppcache/integration-test/testThinClientLocator.cpp
index 9cf7a02..6dbd3e6 100644
--- a/cppcache/integration-test/testThinClientLocator.cpp
+++ b/cppcache/integration-test/testThinClientLocator.cpp
@@ -20,7 +20,7 @@
 bool isLocalServer = false;
 bool isLocator = false;
 
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 
 #define CLIENT1 s1p1
@@ -37,8 +37,12 @@
 DUNIT_TASK(SERVER12, CreateServer12)
   {
     // starting servers
-    if (isLocalServer) CacheHelper::initServer(1, nullptr, locHostPort);
-    if (isLocalServer) CacheHelper::initServer(2, nullptr, locHostPort);
+    if (isLocalServer) {
+      CacheHelper::initServer(1, {}, locHostPort);
+    }
+    if (isLocalServer) {
+      CacheHelper::initServer(2, {}, locHostPort);
+    }
     LOG("Server12 started");
   }
 END_TASK(CreateServer12)
@@ -49,8 +53,6 @@
                        true);
     getHelper()->createPooledRegion(regionNames[0], USE_ACK, locHostPort,
                                     "__TEST_POOL1__", true, true);
-    getHelper()->createPooledRegion(regionNames[1], NO_ACK, locHostPort,
-                                    "__TEST_POOL1__", true, true);
     LOG("StepOne complete.");
   }
 END_TASK(StepOne)
@@ -60,8 +62,6 @@
                        true);
     getHelper()->createPooledRegion(regionNames[0], USE_ACK, locHostPort,
                                     "__TEST_POOL1__", true, true);
-    getHelper()->createPooledRegion(regionNames[1], NO_ACK, locHostPort,
-                                    "__TEST_POOL1__", true, true);
     LOG("StepTwo complete.");
   }
 END_TASK(StepTwo)
@@ -69,34 +69,27 @@
 DUNIT_TASK(CLIENT1, StepThree)
   {
     createEntry(regionNames[0], keys[0], vals[0]);
-    createEntry(regionNames[1], keys[2], vals[2]);
     LOG("StepThree complete.");
   }
 END_TASK(StepThree)
 DUNIT_TASK(CLIENT2, StepFour)
   {
     doNetsearch(regionNames[0], keys[0], vals[0]);
-    doNetsearch(regionNames[1], keys[2], vals[2]);
     createEntry(regionNames[0], keys[1], vals[1]);
-    createEntry(regionNames[1], keys[3], vals[3]);
     LOG("StepFour complete.");
   }
 END_TASK(StepFour)
 DUNIT_TASK(CLIENT1, StepFive)
   {
     doNetsearch(regionNames[0], keys[1], vals[1]);
-    doNetsearch(regionNames[1], keys[3], vals[3]);
     updateEntry(regionNames[0], keys[0], nvals[0]);
-    updateEntry(regionNames[1], keys[2], nvals[2]);
     LOG("StepFive complete.");
   }
 END_TASK(StepFive)
 DUNIT_TASK(CLIENT2, StepSix)
   {
     doNetsearch(regionNames[0], keys[0], vals[0], false);
-    doNetsearch(regionNames[1], keys[2], vals[2], false);
     updateEntry(regionNames[0], keys[1], nvals[1]);
-    updateEntry(regionNames[1], keys[3], nvals[3]);
     LOG("StepSix complete.");
   }
 END_TASK(StepSix)
diff --git a/cppcache/integration-test/testThinClientLocatorFailover.cpp b/cppcache/integration-test/testThinClientLocatorFailover.cpp
index 6811c3b..996a41c 100644
--- a/cppcache/integration-test/testThinClientLocatorFailover.cpp
+++ b/cppcache/integration-test/testThinClientLocatorFailover.cpp
@@ -22,7 +22,7 @@
 bool isLocalServer = false;
 bool isLocator = false;
 
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 3);
 #define CLIENT1 s1p1
 #define CLIENT2 s1p2
@@ -41,7 +41,7 @@
 DUNIT_TASK(SERVERS, CreateServer1_All)
   {
     // starting servers
-    if (isLocalServer) CacheHelper::initServer(1, nullptr, locatorsG);
+    if (isLocalServer) CacheHelper::initServer(1, {}, locatorsG);
     LOG("Server One started");
   }
 END_TASK(CreateServer1_All)
@@ -82,7 +82,7 @@
 DUNIT_TASK(SERVERS, CreateServer2_All)
   {
     if (isLocalServer) {
-      CacheHelper::initServer(2, nullptr, locatorsG);
+      CacheHelper::initServer(2, {}, locatorsG);
       LOG("Server 2 started");
     }
   }
@@ -135,7 +135,7 @@
 DUNIT_TASK(SERVERS, Re_CreateServer1_All)
   {
     if (isLocalServer) {
-      CacheHelper::initServer(1, nullptr, locatorsG);
+      CacheHelper::initServer(1, {}, locatorsG);
       LOG("Server 1 started");
       SLEEP(30000);
     }
@@ -199,7 +199,7 @@
 DUNIT_TASK(SERVERS, StartServer2_All)
   {
     if (isLocalServer) {
-      CacheHelper::initServer(2, nullptr, nullptr);
+      CacheHelper::initServer(2);
       LOG("SERVER2 Started");
       SLEEP(30000);
     }
diff --git a/cppcache/integration-test/testThinClientMultiDS.cpp b/cppcache/integration-test/testThinClientMultiDS.cpp
deleted file mode 100644
index a700b43..0000000
--- a/cppcache/integration-test/testThinClientMultiDS.cpp
+++ /dev/null
@@ -1,425 +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.
- */
-
-#include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-
-#include <string>
-
-#define ROOT_NAME "testThinClientMultiDS"
-#define ROOT_SCOPE DISTRIBUTED_ACK
-
-#include "ThinClientSecurityHelper.hpp"
-
-#ifdef __disabled_test__
-
-#define CLIENT1 s1p1
-#define CLIENT2 s1p2
-#define SERVER1 s2p1
-#define SERVER2 s2p2
-
-static int clientWithNothing = 0;
-void initClient() {
-  if (cacheHelper == nullptr) {
-    auto config = Properties::create();
-    if (clientWithNothing > 1) config->insert("grid-client", "true");
-    clientWithNothing += 1;
-    cacheHelper = new CacheHelper(true, config);
-  }
-  ASSERT(cacheHelper, "Failed to create a CacheHelper client instance.");
-}
-
-void initializeClient() {
-  initCredentialGenerator();
-  initClientAuth('A');
-  LOG("client initialized.");
-}
-void startServer(int instance, const char *xmlfile, const char *lochostport) {
-  credentialGeneratorHandler = CredentialGenerator::create("DUMMY");
-  std::string cmdServerAuthenticator;
-  cmdServerAuthenticator = credentialGeneratorHandler->getServerCmdParams(
-      "authenticator:dummy", getXmlPath());
-  printf("string %s", cmdServerAuthenticator.c_str());
-  CacheHelper::initServer(instance, xmlfile, lochostport,
-                          const_cast<char *>(cmdServerAuthenticator.c_str()),
-                          false, true, true);
-  LOG("Server started");
-}
-
-DUNIT_TASK_DEFINITION(SERVER1, CreateServer1)
-  {
-    CacheHelper::initServer(1, "cacheserver_notify_subscription.xml", nullptr,
-                            nullptr, false, true, true);
-    CacheHelper::initServer(2, "cacheserver_notify_subscription2.xml", nullptr,
-                            nullptr, false, true, true);
-    LOG("SERVER1 and server2 started");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER2, CreateServer2)
-  {
-    CacheHelper::initServer(3, "cacheserver_notify_subscription3.xml", nullptr,
-                            nullptr, false, true, true);
-    CacheHelper::initServer(4, "cacheserver_notify_subscription4.xml", nullptr,
-                            nullptr, false, true, true);
-    LOG("SERVER2 started");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT1, InitClient1_Pool)
-  {
-    try {
-      initClient();
-    } catch (Exception &excp) {
-      LOG(excp.what());
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, InitClient2_Pool)
-  {
-    try {
-      initClient();
-    } catch (Exception &excp) {
-      LOG(excp.what());
-    }
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT1, StepOne_Pool_EndPoint)
-  {
-    try {
-      // getHelper()->createPoolWithEPs("__TESTPOOL1_",
-      // "localhost:24680,localhost:24681");
-      // getHelper()->createPoolWithEPs("__TESTPOOL2_",
-      // "localhost:24682,localhost:24683");
-      char tmp[128];
-      sprintf(tmp, "localhost:%d,localhost:%d", CacheHelper::staticHostPort1,
-              CacheHelper::staticHostPort2);
-      getHelper()->createPoolWithEPs("__TESTPOOL1_", tmp);
-      char tmp2[128];
-      sprintf(tmp2, "localhost:%d,localhost:%d", CacheHelper::staticHostPort3,
-              CacheHelper::staticHostPort4);
-      getHelper()->createPoolWithEPs("__TESTPOOL2_", tmp2);
-
-      getHelper()->createRegionAndAttachPool(regionNames[0], USE_ACK,
-                                             "__TESTPOOL1_", false);
-      getHelper()->createRegionAndAttachPool(regionNames[1], NO_ACK,
-                                             "__TESTPOOL2_", false);
-      auto regPtr0 = getHelper()->getRegion(regionNames[0]);
-      auto regPtr1 = getHelper()->getRegion(regionNames[1]);
-      for (int i = 0; i < 100; i++) {
-        regPtr0->put(keys[0], vals[0]);
-        regPtr1->put(keys[2], vals[2]);
-      }
-    } catch (Exception &excp) {
-      LOG(excp.what());
-      ASSERT(false, "Got unexpected exception");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, StepTwo_Pool_EndPoint)
-  {
-    try {
-      // getHelper()->createPoolWithEPs("__TESTPOOL1_",
-      // "localhost:24680,localhost:24681",false);
-      // getHelper()->createPoolWithEPs("__TESTPOOL2_",
-      // "localhost:24682,localhost:24683",false);
-      char tmp[128];
-      sprintf(tmp, "localhost:%d,localhost:%d", CacheHelper::staticHostPort1,
-              CacheHelper::staticHostPort2);
-      getHelper()->createPoolWithEPs("__TESTPOOL1_", tmp);
-      char tmp2[128];
-      sprintf(tmp2, "localhost:%d,localhost:%d", CacheHelper::staticHostPort3,
-              CacheHelper::staticHostPort4);
-      getHelper()->createPoolWithEPs("__TESTPOOL2_", tmp2);
-
-      getHelper()->createRegionAndAttachPool(regionNames[0], USE_ACK,
-                                             "__TESTPOOL1_", false);
-      getHelper()->createRegionAndAttachPool(regionNames[1], NO_ACK,
-                                             "__TESTPOOL2_", false);
-      auto regPtr0 = getHelper()->getRegion(regionNames[0]);
-      auto regPtr1 = getHelper()->getRegion(regionNames[1]);
-      for (int i = 0; i < 100; i++) {
-        regPtr0->put(keys[1], vals[1]);
-        regPtr1->put(keys[3], vals[3]);
-      }
-    } catch (Exception &excp) {
-      LOG(excp.what());
-      ASSERT(false, "Got unexpected exception");
-    }
-
-    LOG("Steptwo complete.");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT1, StepOne_1)
-  {
-    try {
-      auto regPtr0 = getHelper()->getRegion(regionNames[0]);
-      auto regPtr1 = getHelper()->getRegion(regionNames[1]);
-      auto checkPtr =
-          std::dynamic_pointer_cast<CacheableString>(regPtr0->get(keys[2]));
-      ASSERT(checkPtr == nullptr, "checkPtr should be null");
-      auto checkPtr1 =
-          std::dynamic_pointer_cast<CacheableString>(regPtr0->get(keys[0]));
-      ASSERT(checkPtr1 != nullptr, "checkPtr1 should not be null");
-    } catch (Exception &excp) {
-      LOG(excp.what());
-      ASSERT(false, "Got unexpected exception");
-    }
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(SERVER1, CloseServer1)
-  {
-    CacheHelper::closeServer(1);
-    LOG("SERVER1 stopped");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT1, StepOne_2)
-  {
-    try {
-      auto regPtr0 = getHelper()->getRegion(regionNames[0]);
-      auto regPtr1 = getHelper()->getRegion(regionNames[1]);
-      for (int i = 0; i < 100; i++) {
-        regPtr0->put(keys[0], regPtr1->get(keys[2]));
-        regPtr1->put(keys[2], regPtr0->get(keys[0]));
-      }
-
-    } catch (Exception &excp) {
-      LOG(excp.what());
-      ASSERT(false, "Got unexpected exception");
-    }
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT1, CloseCache1)
-  { cleanProc(); }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, CloseCache2)
-  { cleanProc(); }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(SERVER2, CloseServer1_1)
-  {
-    CacheHelper::closeServer(2);
-    LOG("SERVER2 stopped");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(SERVER2, CloseServer2)
-  {
-    CacheHelper::closeServer(3);
-    CacheHelper::closeServer(4);
-    LOG("SERVER2 stopped");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER1, SecureStartServer1)
-  {
-    char tmp[128];
-    sprintf(tmp, "localhost:%d", CacheHelper::staticLocatorHostPort1);
-    startServer(1, "cacheserver_notify_subscription.xml", tmp);
-    startServer(2, "cacheserver_notify_subscription2.xml", tmp);
-    LOG("SecureServer1 started");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(SERVER2, SecureStartServer2)
-  {
-    char tmp[128];
-    sprintf(tmp, "localhost:%d", CacheHelper::staticLocatorHostPort2);
-    startServer(3, "cacheserver_notify_subscription3.xml", tmp);
-    startServer(4, "cacheserver_notify_subscription4.xml", tmp);
-    LOG("SecureServer2 started");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(SERVER1, StartLocator1)
-  {
-    CacheHelper::initLocator(1, false, true);
-    LOG("Locator1 started");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(SERVER2, StartLocator2)
-  {
-    CacheHelper::initLocator(2, false, true);
-    LOG("Locator2 started");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StartSecureClient1)
-  {
-    initializeClient();
-    LOG("StartSecureClient1 started");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT2, StartSecureClient2)
-  {
-    initializeClient();
-    LOG("StartSecureClient2 started");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT1, StepOne_Pool_SecureEndPoint)
-  {
-    try {
-      //  getHelper()->createPoolWithEPs("__TESTPOOL1_",
-      //  "localhost:24680,localhost:24681");
-      // getHelper()->createPoolWithEPs("__TESTPOOL2_",
-      // "localhost:24682,localhost:24683");
-      char tmp[128];
-      sprintf(tmp, "localhost:%d,localhost:%d", CacheHelper::staticHostPort1,
-              CacheHelper::staticHostPort2);
-      getHelper()->createPoolWithEPs("__TESTPOOL1_", tmp);
-      char tmp2[128];
-      sprintf(tmp2, "localhost:%d,localhost:%d", CacheHelper::staticHostPort3,
-              CacheHelper::staticHostPort4);
-      getHelper()->createPoolWithEPs("__TESTPOOL2_", tmp2);
-
-      getHelper()->createRegionAndAttachPool(regionNames[0], USE_ACK,
-                                             "__TESTPOOL1_", false);
-      getHelper()->createRegionAndAttachPool(regionNames[1], NO_ACK,
-                                             "__TESTPOOL2_", false);
-      auto regPtr0 = getHelper()->getRegion(regionNames[0]);
-      auto regPtr1 = getHelper()->getRegion(regionNames[1]);
-      for (int i = 0; i < 100; i++) {
-        regPtr0->put(keys[0], vals[0]);
-        regPtr1->put(keys[2], vals[2]);
-      }
-    } catch (Exception &excp) {
-      LOG(excp.what());
-      ASSERT(false, "Got unexpected exception");
-    }
-    LOG("StepOne_Pool_SecureEndPoint complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, StepTwo_Pool_SecureEndPoint)
-  {
-    try {
-      // getHelper()->createPoolWithEPs("__TESTPOOL1_",
-      // "localhost:24680,localhost:24681");
-      // getHelper()->createPoolWithEPs("__TESTPOOL2_",
-      // "localhost:24682,localhost:24683");
-      char tmp[128];
-      sprintf(tmp, "localhost:%d,localhost:%d", CacheHelper::staticHostPort1,
-              CacheHelper::staticHostPort2);
-      getHelper()->createPoolWithEPs("__TESTPOOL1_", tmp);
-      char tmp2[128];
-      sprintf(tmp2, "localhost:%d,localhost:%d", CacheHelper::staticHostPort3,
-              CacheHelper::staticHostPort4);
-      getHelper()->createPoolWithEPs("__TESTPOOL2_", tmp2);
-
-      getHelper()->createRegionAndAttachPool(regionNames[0], USE_ACK,
-                                             "__TESTPOOL1_", false);
-      getHelper()->createRegionAndAttachPool(regionNames[1], NO_ACK,
-                                             "__TESTPOOL2_", false);
-      auto regPtr0 = getHelper()->getRegion(regionNames[0]);
-      auto regPtr1 = getHelper()->getRegion(regionNames[1]);
-      for (int i = 0; i < 100; i++) {
-        regPtr0->put(keys[1], vals[1]);
-        regPtr1->put(keys[3], vals[3]);
-      }
-    } catch (Exception &excp) {
-      LOG(excp.what());
-      ASSERT(false, "Got unexpected exception");
-    }
-
-    LOG("StepTwo_Pool_SecureEndPoint complete.");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT1, StepOne_secureclient1)
-  {
-    try {
-      auto regPtr0 = getHelper()->getRegion(regionNames[0]);
-      auto regPtr1 = getHelper()->getRegion(regionNames[1]);
-      auto checkPtr =
-          std::dynamic_pointer_cast<CacheableString>(regPtr0->get(keys[2]));
-      ASSERT(checkPtr == nullptr, "checkPtr should be null");
-      auto checkPtr1 =
-          std::dynamic_pointer_cast<CacheableString>(regPtr0->get(keys[0]));
-      ASSERT(checkPtr1 != nullptr, "checkPtr1 should not be null");
-    } catch (Exception &excp) {
-      LOG(excp.what());
-      ASSERT(false, "Got unexpected exception");
-    }
-    LOG("StepOne_secureclient1 complete.");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT1, StepOne_secureclient2)
-  {
-    try {
-      auto regPtr0 = getHelper()->getRegion(regionNames[0]);
-      auto regPtr1 = getHelper()->getRegion(regionNames[1]);
-      for (int i = 0; i < 100; i++) {
-        regPtr0->put(keys[0], regPtr1->get(keys[2]));
-        regPtr1->put(keys[2], regPtr0->get(keys[0]));
-      }
-
-    } catch (Exception &excp) {
-      LOG(excp.what());
-      ASSERT(false, "Got unexpected exception");
-    }
-    LOG("StepOne_secureclient2 complete.");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(SERVER1, CloseLocator1)
-  {
-    SLEEP(2000);
-    CacheHelper::closeServer(2);
-    CacheHelper::closeLocator(1);
-    LOG("SERVER1 stopped");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER2, CloseLocator2)
-  {
-    CacheHelper::closeServer(3);
-    CacheHelper::closeServer(4);
-    CacheHelper::closeLocator(2);
-    LOG("Locator1 stopped");
-  }
-END_TASK_DEFINITION
-DUNIT_MAIN
-  {
-    CALL_TASK(CreateServer1);
-    CALL_TASK(CreateServer2);
-    CALL_TASK(InitClient1_Pool);
-    CALL_TASK(InitClient2_Pool);
-    CALL_TASK(StepOne_Pool_EndPoint);
-    CALL_TASK(StepTwo_Pool_EndPoint);
-    CALL_TASK(StepOne_1);
-    CALL_TASK(CloseServer1);
-    CALL_TASK(StepOne_2);
-    CALL_TASK(CloseServer1_1);
-    CALL_TASK(CloseServer2);
-    CALL_TASK(CloseCache1);
-    CALL_TASK(CloseCache2);
-    // Test MultiDS with security config
-    CALL_TASK(StartLocator1);
-    CALL_TASK(StartLocator2);
-    CALL_TASK(SecureStartServer1);
-    CALL_TASK(SecureStartServer2);
-    CALL_TASK(StartSecureClient1);
-    CALL_TASK(StartSecureClient2);
-    CALL_TASK(StepOne_Pool_SecureEndPoint);
-    CALL_TASK(StepTwo_Pool_SecureEndPoint);
-    CALL_TASK(StepOne_secureclient1);
-    CALL_TASK(CloseServer1);
-    CALL_TASK(StepOne_secureclient2);
-    CALL_TASK(CloseCache1);
-    CALL_TASK(CloseCache2);
-    CALL_TASK(CloseLocator1);
-    CALL_TASK(CloseLocator2);
-  }
-END_MAIN
-#endif
diff --git a/cppcache/integration-test/testThinClientNotificationWithDeltaWithoutcache.cpp b/cppcache/integration-test/testThinClientNotificationWithDeltaWithoutcache.cpp
index 1eb1835..1c2a847 100644
--- a/cppcache/integration-test/testThinClientNotificationWithDeltaWithoutcache.cpp
+++ b/cppcache/integration-test/testThinClientNotificationWithDeltaWithoutcache.cpp
@@ -81,13 +81,15 @@
   return cacheHelper;
 }
 
-void createPooledRegion(const char *name, bool ackMode, const char *locators,
-                        const char *poolname,
+void createPooledRegion(const std::string &name, bool ackMode,
+                        const std::string &locators,
+                        const std::string &poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -98,8 +100,9 @@
 void createRegionCachingDisabled(const char *name, bool ackMode,
                                  bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   // ack, caching
   auto regPtr = getHelper()->createRegion(name, ackMode, false, nullptr,
                                           clientNotificationEnabled);
@@ -207,12 +210,11 @@
   {
     // Wait for notification
     SLEEP(1000);
-    char buff[100];
-    sprintf(buff, "From delta count %d  From data count %d",
-            DeltaEx::fromDeltaCount, DeltaEx::fromDataCount);
-    LOG(buff);
+    LOG(std::string("From delta count ") +
+        std::to_string(DeltaEx::fromDeltaCount) + "  From data count " +
+        std::to_string(DeltaEx::fromDataCount));
     // In case of Cacheless client only full object would arrive on notification
-    // channel.
+    // channe
     ASSERT(DeltaEx::fromDataCount == 2,
            "DeltaEx::fromDataCount should have been 2");
     ASSERT(DeltaEx::fromDeltaCount == 0,
diff --git a/cppcache/integration-test/testThinClientPRPutAllFailover.cpp b/cppcache/integration-test/testThinClientPRPutAllFailover.cpp
index a40df90..c5c7d53 100644
--- a/cppcache/integration-test/testThinClientPRPutAllFailover.cpp
+++ b/cppcache/integration-test/testThinClientPRPutAllFailover.cpp
@@ -22,8 +22,6 @@
 #include "BuiltinCacheableWrappers.hpp"
 #include "Utils.hpp"
 
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include "TallyListener.hpp"
 #include <string>
 #include "CacheHelper.hpp"
@@ -47,7 +45,7 @@
 std::shared_ptr<TallyListener> reg1Listener1;
 bool isLocalServer = false;
 static bool isLocator = false;
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 
 void setCacheListener(const char *regName,
@@ -82,8 +80,6 @@
     getHelper()->createPoolWithLocators("__TEST_POOL1__", locatorsG);
     getHelper()->createRegionAndAttachPool(regionNames[0], USE_ACK,
                                            "__TEST_POOL1__");
-    getHelper()->createRegionAndAttachPool(regionNames[1], NO_ACK,
-                                           "__TEST_POOL1__");
 
     reg1Listener1 = std::make_shared<TallyListener>();
     setCacheListener(regionNames[0], reg1Listener1);
@@ -98,8 +94,6 @@
     getHelper()->createPoolWithLocators("__TEST_POOL1__", locatorsG, true, 2);
     getHelper()->createRegionAndAttachPool(regionNames[0], USE_ACK,
                                            "__TEST_POOL1__");
-    getHelper()->createRegionAndAttachPool(regionNames[1], NO_ACK,
-                                           "__TEST_POOL1__");
 
     reg1Listener1 = std::make_shared<TallyListener>();
     setCacheListener(regionNames[0], reg1Listener1);
@@ -111,8 +105,6 @@
   {
     auto regPtr0 = getHelper()->getRegion(regionNames[0]);
     regPtr0->registerAllKeys();
-    auto regPtr1 = getHelper()->getRegion(regionNames[1]);
-    regPtr1->registerAllKeys();
     LOG("StepTwo_Pooled_EndPoint_RegisterAllKeys complete.");
   }
 END_TASK_DEFINITION
@@ -123,18 +115,16 @@
     auto dataReg = getHelper()->getRegion(regionNames[0]);
     HashMapOfCacheable entryMap;
     entryMap.clear();
-    char key[256];
-    char value[256];
     for (int32_t item = 0; item < 1000; item++) {
-      sprintf(key, "key-%d", item);
-      sprintf(value, "%d", item);
-      entryMap.emplace(CacheableKey::create(key),
-                       CacheableString::create(value));
+      auto key =
+          CacheableKey::create(std::string("key-") + std::to_string(item));
+      auto value = CacheableString::create(std::to_string(item));
+      entryMap.emplace(key, value);
       LOGDEBUG(
           "CPPTEST:PutAllOneTask Doing PutAll on key using key: = %s: & value: "
           "= "
           "%s",
-          key, value);
+          key->toString().c_str(), value->value().c_str());
     }
     try {
       dataReg->putAll(entryMap);
@@ -156,18 +146,16 @@
     auto dataReg = getHelper()->getRegion(regionNames[0]);
     HashMapOfCacheable entryMap;
     entryMap.clear();
-    char key[256];
-    char value[256];
     for (int32_t item = 1000; item < 2000; item++) {
-      sprintf(key, "key-%d", item);
-      sprintf(value, "%d", item);
+      auto key =
+          CacheableKey::create(std::string("key-") + std::to_string(item));
+      auto value = CacheableString::create(std::to_string(item));
       LOGDEBUG(
           "CPPTEST:PutAllTwoTask Doing PutAll on key using key: = %s: & value: "
           "= "
           "%s",
-          key, value);
-      entryMap.emplace(CacheableKey::create(key),
-                       CacheableString::create(value));
+          key->toString().c_str(), value->value().c_str());
+      entryMap.emplace(key, value);
     }
     try {
       dataReg->putAll(entryMap);
@@ -189,18 +177,16 @@
     auto dataReg = getHelper()->getRegion(regionNames[0]);
     HashMapOfCacheable entryMap;
     entryMap.clear();
-    char key[256];
-    char value[256];
     for (int32_t item = 2000; item < 3000; item++) {
-      sprintf(key, "key-%d", item);
-      sprintf(value, "%d", item);
+      auto key =
+          CacheableKey::create(std::string("key-") + std::to_string(item));
+      auto value = CacheableString::create(std::to_string(item));
       LOGDEBUG(
           "CPPTEST:PutAllThreeTask Doing PutAll on key using key: = %s: & "
           "value: "
           "= %s",
-          key, value);
-      entryMap.emplace(CacheableKey::create(key),
-                       CacheableString::create(value));
+          key->toString().c_str(), value->value().c_str());
+      entryMap.emplace(key, value);
     }
     try {
       dataReg->putAll(entryMap);
@@ -222,18 +208,16 @@
     auto dataReg = getHelper()->getRegion(regionNames[0]);
     HashMapOfCacheable entryMap;
     entryMap.clear();
-    char key[256];
-    char value[256];
     for (int32_t item = 3000; item < 4000; item++) {
-      sprintf(key, "key-%d", item);
-      sprintf(value, "%d", item);
+      auto key =
+          CacheableKey::create(std::string("key-") + std::to_string(item));
+      auto value = CacheableString::create(std::to_string(item));
       LOGDEBUG(
           "CPPTEST:PutAllFourTask Doing PutAll on key using key: = %s: & "
           "value: "
           "= %s",
-          key, value);
-      entryMap.emplace(CacheableKey::create(key),
-                       CacheableString::create(value));
+          key->toString().c_str(), value->value().c_str());
+      entryMap.emplace(key, value);
     }
     try {
       dataReg->putAll(entryMap);
@@ -261,15 +245,14 @@
            "Got wrong number of creation events.");
 
     ASSERT(dataReg->size() == 4000, "Expected 4000 entries in region");
-    char key[256];
-    char value[256];
     for (int32_t item = 0; item < 4000; item++) {
-      sprintf(key, "key-%d", item);
-      sprintf(value, "%d", item);
+      auto key =
+          CacheableKey::create(std::string("key-") + std::to_string(item));
+      auto value = CacheableString::create(std::to_string(item));
       LOGDEBUG("CPPTEST:VerifyAllPutAllTask Doing get on key using: = %s: ",
-               key);
-      auto checkPtr = std::dynamic_pointer_cast<CacheableString>(
-          dataReg->get(CacheableKey::create(key)));
+               key->toString().c_str());
+      auto checkPtr =
+          std::dynamic_pointer_cast<CacheableString>(dataReg->get(key));
       ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
       LOGDEBUG("CPPTEST:VerifyAllPutAllTask value is: = %s: ",
                checkPtr->value().c_str());
@@ -286,18 +269,16 @@
     HashMapOfCacheable entryMap;
     std::vector<std::shared_ptr<CacheableKey>> keysVector;
     entryMap.clear();
-    char key[256];
-    char value[256];
     for (int32_t item = 0; item < 1000; item++) {
-      sprintf(key, "key-%d", item);
-      sprintf(value, "%d", item);
-      entryMap.emplace(CacheableKey::create(key),
-                       CacheableString::create(value));
-      keysVector.push_back(CacheableKey::create(key));
+      auto key =
+          CacheableKey::create(std::string("key-") + std::to_string(item));
+      auto value = CacheableString::create(std::to_string(item));
+      entryMap.emplace(key, value);
+      keysVector.push_back(key);
       LOGDEBUG(
           "CPPTEST:RemoveAllOneTask Doing PutAll on key using key: = %s: & "
           "value: = %s",
-          key, value);
+          key->toString().c_str(), value->value().c_str());
     }
     try {
       dataReg->putAll(entryMap);
@@ -321,18 +302,16 @@
     HashMapOfCacheable entryMap;
     std::vector<std::shared_ptr<CacheableKey>> keysVector;
     entryMap.clear();
-    char key[256];
-    char value[256];
     for (int32_t item = 1000; item < 2000; item++) {
-      sprintf(key, "key-%d", item);
-      sprintf(value, "%d", item);
-      entryMap.emplace(CacheableKey::create(key),
-                       CacheableString::create(value));
-      keysVector.push_back(CacheableKey::create(key));
+      auto key =
+          CacheableKey::create(std::string("key-") + std::to_string(item));
+      auto value = CacheableString::create(std::to_string(item));
+      entryMap.emplace(key, value);
+      keysVector.push_back(key);
       LOGDEBUG(
           "CPPTEST:RemoveAllTwoTask Doing RemoveAll on key using key: = %s: & "
           "value: = %s",
-          key, value);
+          key->toString().c_str(), value->value().c_str());
     }
     try {
       dataReg->putAll(entryMap);
@@ -356,19 +335,17 @@
     HashMapOfCacheable entryMap;
     std::vector<std::shared_ptr<CacheableKey>> keysVector;
     entryMap.clear();
-    char key[256];
-    char value[256];
     for (int32_t item = 2000; item < 3000; item++) {
-      sprintf(key, "key-%d", item);
-      sprintf(value, "%d", item);
-      entryMap.emplace(CacheableKey::create(key),
-                       CacheableString::create(value));
-      keysVector.push_back(CacheableKey::create(key));
+      auto key =
+          CacheableKey::create(std::string("key-") + std::to_string(item));
+      auto value = CacheableString::create(std::to_string(item));
+      entryMap.emplace(key, value);
+      keysVector.push_back(key);
       LOGDEBUG(
           "CPPTEST:RemoveAllThreeTask Doing RemoveAll on key using key: = %s: "
           "& "
           "value: = %s",
-          key, value);
+          key->toString().c_str(), value->value().c_str());
     }
     try {
       dataReg->putAll(entryMap);
@@ -393,18 +370,16 @@
     HashMapOfCacheable entryMap;
     std::vector<std::shared_ptr<CacheableKey>> keysVector;
     entryMap.clear();
-    char key[256];
-    char value[256];
     for (int32_t item = 3000; item < 4000; item++) {
-      sprintf(key, "key-%d", item);
-      sprintf(value, "%d", item);
-      entryMap.emplace(CacheableKey::create(key),
-                       CacheableString::create(value));
-      keysVector.push_back(CacheableKey::create(key));
+      auto key =
+          CacheableKey::create(std::string("key-") + std::to_string(item));
+      auto value = CacheableString::create(std::to_string(item));
+      entryMap.emplace(key, value);
+      keysVector.push_back(key);
       LOGDEBUG(
           "CPPTEST:RemoveAllFourTask Doing RemoveAll on key using key: = %s: & "
           "value: = %s",
-          key, value);
+          key->toString().c_str(), value->value().c_str());
     }
     try {
       dataReg->putAll(entryMap);
diff --git a/cppcache/integration-test/testThinClientPRSingleHop.cpp b/cppcache/integration-test/testThinClientPRSingleHop.cpp
deleted file mode 100644
index db00235..0000000
--- a/cppcache/integration-test/testThinClientPRSingleHop.cpp
+++ /dev/null
@@ -1,1212 +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.
- */
-
-#define ROOT_NAME "testThinClientPRSingleHop"
-#define ROOT_SCOPE DISTRIBUTED_ACK
-
-#include <string>
-#include <random>
-#include <limits>
-
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-#include <ace/ACE.h>
-
-#include <statistics/StatisticsFactory.hpp>
-
-#include "fw_dunit.hpp"
-#include "BuiltinCacheableWrappers.hpp"
-#include "Utils.hpp"
-
-#include "CacheHelper.hpp"
-
-// Include these 2 headers for access to CacheImpl for test hooks.
-#include "CacheImplHelper.hpp"
-#include "testUtils.hpp"
-
-#include "ThinClientHelper.hpp"
-
-#define CLIENT1 s1p1
-#define SERVER1 s2p1
-#define SERVER2 s1p2
-#define SERVER3 s2p2
-
-using apache::geode::client::CacheServerException;
-using apache::geode::client::CacheWriterException;
-using apache::geode::client::Exception;
-using apache::geode::client::internal::DSCode;
-
-using apache::geode::client::testing::CacheableWrapper;
-using apache::geode::client::testing::CacheableWrapperFactory;
-
-bool isLocalServer = false;
-const std::string endPoints = CacheHelper::getTcrEndpoints(isLocalServer, 3);
-
-static bool isLocator = false;
-const char *locatorsG =
-    CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
-
-std::string convertHostToCanonicalForm(const char *endpoints) {
-  if (endpoints == nullptr) return nullptr;
-  std::string hostString("");
-  uint16_t port = 0;
-  std::string endpointsStr(endpoints);
-  std::string endpointsStr1(endpoints);
-  // Parse this string to get all hostnames and port numbers.
-  std::string endpoint;
-  std::string::size_type length = endpointsStr.size();
-  std::string::size_type pos = 0;
-  ACE_TCHAR hostName[256], fullName[256];
-  pos = endpointsStr.find(':', 0);
-  if (pos != std::string::npos) {
-    endpoint = endpointsStr.substr(0, pos);
-    pos += 1;  // skip ':'
-    length -= (pos);
-    endpointsStr = endpointsStr.substr(pos, length);
-  } else {
-    hostString = "";
-    return "";
-  }
-  hostString = endpoint;
-  port = atoi(endpointsStr.c_str());
-  if (strcmp(hostString.c_str(), "localhost") == 0) {
-    ACE_OS::hostname(hostName, sizeof(hostName) - 1);
-    struct hostent *host;
-    host = ACE_OS::gethostbyname(hostName);
-    ACE_OS::snprintf(fullName, 256, "%s:%d", host->h_name, port);
-    return fullName;
-  }
-  pos = endpointsStr1.find('.', 0);
-  if (pos != std::string::npos) {
-    ACE_INET_Addr addr(endpoints);
-    addr.get_host_name(hostName, 256);
-    ACE_OS::snprintf(fullName, 256, "%s:%d", hostName, port);
-    return fullName;
-  }
-  return endpoints;
-}
-
-template <typename T>
-T randomValue(T maxValue) {
-  static thread_local std::default_random_engine generator(
-      std::random_device{}());
-  return std::uniform_int_distribution<T>{0, maxValue}(generator);
-}
-
-class putThread : public ACE_Task_Base {
- private:
-  std::shared_ptr<Region> regPtr;
-  int m_min;
-  int m_max;
-  bool m_isWarmUpTask;
-  int m_failureCount;
-
- public:
-  putThread(const char *name, int min, int max, bool isWarmUpTask)
-      : regPtr(getHelper()->getRegion(name)),
-        m_min(min),
-        m_max(max),
-        m_isWarmUpTask(isWarmUpTask),
-        m_failureCount(0) {}
-
-  int getFailureCount() { return m_failureCount; }
-
-  int svc(void) {
-    std::shared_ptr<CacheableKey> keyPtr;
-    for (int i = m_min; i < m_max; i++) {
-      if (!m_isWarmUpTask) {
-        auto rand = randomValue(std::numeric_limits<int32_t>::max());
-        keyPtr = std::dynamic_pointer_cast<CacheableKey>(
-            CacheableInt32::create(rand));
-        LOGDEBUG("svc: putting key %d  ", rand);
-      } else {
-        keyPtr =
-            std::dynamic_pointer_cast<CacheableKey>(CacheableInt32::create(i));
-        LOGDEBUG("svc: putting key %d  ", i);
-      }
-      try {
-        regPtr->put(keyPtr, static_cast<int>(keyPtr->hashcode()));
-        bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                              ->getAndResetNetworkHopFlag();
-        if (networkhop) {
-          m_failureCount++;
-        }
-      } catch (const Exception &excp) {
-        LOGINFO("Exception occured in put %s: %s ", excp.getName().c_str(),
-                excp.what());
-      } catch (...) {
-        LOG("Random Exception occured");
-      }
-
-      if (!m_isWarmUpTask) {
-        try {
-          regPtr->get(keyPtr);
-          bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                                ->getAndResetNetworkHopFlag();
-          if (networkhop) {
-            m_failureCount++;
-          }
-        } catch (const Exception &excp) {
-          LOGINFO("Exception occured in get %s: %s ", excp.getName().c_str(),
-                  excp.what());
-        } catch (...) {
-          LOG("Random Exception occured");
-        }
-
-        try {
-          regPtr->destroy(keyPtr);
-          bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                                ->getAndResetNetworkHopFlag();
-          if (networkhop) {
-            m_failureCount++;
-          }
-        } catch (const Exception &excp) {
-          LOGINFO("Exception occured in destroy %s: %s ",
-                  excp.getName().c_str(), excp.what());
-        } catch (...) {
-          LOG("Random Exception occured");
-        }
-      }
-    }
-    LOG("releaseThreadLocalConnection PutThread");
-    auto pool =
-        getHelper()->getCache()->getPoolManager().find("__TEST_POOL1__");
-    pool->releaseThreadLocalConnection();
-    LOG("releaseThreadLocalConnection PutThread done");
-    return 0;
-  }
-  void start() { activate(); }
-  void stop() { wait(); }
-};
-
-#if defined(WIN32)
-// because we run out of memory on our pune windows desktops
-#define DEFAULTNUMKEYS 5
-#else
-#define DEFAULTNUMKEYS 15
-#endif
-#define KEYSIZE 256
-
-std::vector<std::string> storeEndPoints(const std::string points) {
-  std::vector<std::string> endpointNames;
-  size_t end = 0;
-  size_t start;
-  std::string delim = ",";
-  while ((start = points.find_first_not_of(delim, end)) != std::string::npos) {
-    end = points.find(delim, start);
-    if (end == std::string::npos) {
-      end = points.length();
-    }
-    endpointNames.push_back(points.substr(start, end - start));
-  }
-  ASSERT(endpointNames.size() == 3, "There should be 3 end points");
-  return endpointNames;
-}
-
-std::vector<std::string> endpointNames = storeEndPoints(endPoints);
-
-DUNIT_TASK_DEFINITION(SERVER1, CreateServer1)
-  {
-    if (isLocalServer) {
-      CacheHelper::initServer(1, "cacheserver1_partitioned.xml");
-    }
-    LOG("SERVER1 started");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER2, CreateServer2)
-  {
-    if (isLocalServer) {
-      CacheHelper::initServer(2, "cacheserver2_partitioned.xml");
-    }
-    LOG("SERVER2 started");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER3, CreateServer3)
-  {
-    if (isLocalServer) {
-      CacheHelper::initServer(3, "cacheserver3_partitioned.xml");
-    }
-    LOG("SERVER3 started");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER1, CreateServer1_R1)
-  {
-    if (isLocalServer) {
-      CacheHelper::initServer(1, "cacheserver1_partitioned_R1.xml");
-    }
-    LOG("SERVER1 started");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER2, CreateServer2_R1)
-  {
-    if (isLocalServer) {
-      CacheHelper::initServer(2, "cacheserver2_partitioned_R1.xml");
-    }
-    LOG("SERVER2 started");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepOne_Pooled_Locator)
-  {
-    initClient(true);
-
-    getHelper()->createPoolWithLocators("__TEST_POOL1__", locatorsG);
-    getHelper()->createRegionAndAttachPool(regionNames[0], USE_ACK,
-                                           "__TEST_POOL1__", false);
-    getHelper()->createRegionAndAttachPool(regionNames[1], NO_ACK,
-                                           "__TEST_POOL1__", false);
-
-    LOG("StepOne_Pooled_Locator complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepOne_Pooled_LocatorTL)
-  {
-    initClient(true);
-
-    auto regPtr = getHelper()->createPooledRegionStickySingleHop(
-        regionNames[0], USE_ACK, locatorsG, "__TEST_POOL1__", false, false);
-    ASSERT(regPtr != nullptr, "Failed to create region.");
-    regPtr = getHelper()->createPooledRegionStickySingleHop(
-        regionNames[1], NO_ACK, locatorsG, "__TEST_POOL1__", false, false);
-    ASSERT(regPtr != nullptr, "Failed to create region.");
-
-    LOG("StepOne_Pooled_LocatorTL complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, WarmUpTask)
-  {
-    LOG("WarmUpTask started.");
-    int failureCount = 0;
-    auto dataReg = getHelper()->getRegion(regionNames[0]);
-
-    // This is to get MetaDataService going.
-    for (int i = 0; i < 2000; i++) {
-      auto keyPtr =
-          std::dynamic_pointer_cast<CacheableKey>(CacheableInt32::create(i));
-      try {
-        LOGDEBUG("CPPTEST: put item %d", i);
-        dataReg->put(keyPtr, keyPtr->hashcode());
-        bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                              ->getAndResetNetworkHopFlag();
-        LOGINFO("WarmUpTask: networkhop is %d ", networkhop);
-        if (networkhop) {
-          failureCount++;
-        }
-        LOGINFO("CPPTEST: put success ");
-      } catch (CacheServerException &) {
-        // This is actually a success situation!
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: Put caused extra hop.");
-        FAIL("Put caused extra hop.");
-        //}
-        // LOGINFO("CPPTEST: SINGLEHOP SUCCEEDED while putting key %s with
-        // hashcode %d", logmsg, (int32_t)keyPtr->hashcode());
-      } catch (CacheWriterException &) {
-        // This is actually a success situation! Once bug #521 is fixed.
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: Put caused extra hop.");
-        FAIL("Put caused extra hop.");
-        //}
-        // LOGINFO("CPPTEST: SINGLEHOP SUCCEEDED while putting key %s with
-        // hashcode %d", logmsg, (int32_t)keyPtr->hashcode());
-      } catch (Exception &ex) {
-        LOGERROR("CPPTEST: Unexpected %s: %s", ex.getName().c_str(), ex.what());
-        FAIL(ex.what());
-      } catch (...) {
-        LOGERROR("CPPTEST: Put caused random exception in WarmUpTask");
-        cleanProc();
-        FAIL("Put caused unexpected exception");
-      }
-    }
-    // it takes time to fetch prmetadata so relaxing this limit
-    ASSERT(failureCount < 100, "Count should be less than 100");
-    int poolconn = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                       ->getPoolSize("__TEST_POOL1__");
-    LOGINFO("poolconn = %d and endpoints size = %d ", poolconn,
-            endpointNames.size());
-
-    // SLEEP(20000);
-
-    LOG("WarmUpTask completed.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, WarmUpTask3)
-  {
-    LOG("WarmUpTask3 started.");
-    int failureCount = 0;
-    auto dataReg = getHelper()->getRegion(regionNames[0]);
-
-    // This is to get MetaDataService going.
-    for (int i = 0; i < 2000; i++) {
-      auto keyPtr =
-          std::dynamic_pointer_cast<CacheableKey>(CacheableInt32::create(i));
-      try {
-        LOGDEBUG("CPPTEST: put item %d", i);
-        dataReg->put(keyPtr, keyPtr->hashcode());
-        bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                              ->getAndResetNetworkHopFlag();
-        LOGINFO("WarmUpTask3: networkhop is %d ", networkhop);
-        if (networkhop) {
-          failureCount++;
-        }
-        LOGINFO("CPPTEST: put success ");
-      } catch (CacheServerException &) {
-        // This is actually a success situation!
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: Put caused extra hop.");
-        FAIL("Put caused extra hop.");
-        //}
-        // LOGINFO("CPPTEST: SINGLEHOP SUCCEEDED while putting key %s with
-        // hashcode %d", logmsg, (int32_t)keyPtr->hashcode());
-      } catch (CacheWriterException &) {
-        // This is actually a success situation! Once bug #521 is fixed.
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: Put caused extra hop.");
-        FAIL("Put caused extra hop.");
-        //}
-        // LOGINFO("CPPTEST: SINGLEHOP SUCCEEDED while putting key %s with
-        // hashcode %d", logmsg, (int32_t)keyPtr->hashcode());
-      } catch (Exception &ex) {
-        LOGERROR("CPPTEST: Unexpected %s: %s", ex.getName().c_str(), ex.what());
-        FAIL(ex.what());
-      } catch (...) {
-        LOGERROR("CPPTEST: Put caused random exception in WarmUpTask");
-        cleanProc();
-        FAIL("Put caused unexpected exception");
-      }
-    }
-    // it takes time to fetch prmetadata so relaxing this limit
-    int expectedFailCount = 2000 / 3;
-    ASSERT(failureCount < expectedFailCount,
-           "Count should be less than expectedFailCount");
-    int poolconn = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                       ->getPoolSize("__TEST_POOL1__");
-    LOGINFO("poolconn = %d and endpoints size = %d ", poolconn,
-            endpointNames.size());
-
-    LOG("WarmUpTask3 completed.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, ThreadedWarmUpTask)
-  {
-    LOG("ThreadedWarmUpTask started.");
-    bool isWarmUpTask = true;
-    putThread *threads[1];
-
-    for (int thdIdx = 0; thdIdx < 1; thdIdx++) {
-      threads[thdIdx] = new putThread(regionNames[0], 0, 200, isWarmUpTask);
-      threads[thdIdx]->start();
-    }
-    // SLEEP(10000); // wait for threads to become active
-
-    for (int thdIdx = 0; thdIdx < 1; thdIdx++) {
-      threads[thdIdx]->stop();
-    }
-    // SLEEP(20000);
-    int totalFailureCount = 0;
-    for (int thdIdx = 0; thdIdx < 1; thdIdx++) {
-      totalFailureCount += threads[thdIdx]->getFailureCount();
-    }
-    LOGINFO("ThreadedWarmUpTask totalFailureCount is %d.", totalFailureCount);
-    // relaxing this limit as it takes time
-    ASSERT(totalFailureCount < 100,
-           "totalFailureCount should be less than 100");
-
-    LOG("ThreadedWarmUpTask completed.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForAllKeysTask)
-  {
-    LOG("CheckPrSingleHopForAllKeysTask started.");
-    static size_t taskIndexPut = 0;
-
-    auto keyTypes = CacheableWrapperFactory::getRegisteredKeyTypes();
-    auto valueTypes = CacheableWrapperFactory::getRegisteredValueTypes();
-
-    size_t keyTypeIndex = taskIndexPut / valueTypes.size();
-    size_t valueTypeIndex = taskIndexPut % valueTypes.size();
-
-    DSCode keyTypeId = keyTypes[keyTypeIndex];
-    DSCode valTypeId = valueTypes[valueTypeIndex];
-
-    LOGDEBUG(
-        "CheckPrSingleHopForAllKeysTask::keyType = %s and valType = %s and "
-        "taskIndexPut = %d\n",
-        CacheableWrapperFactory::getTypeForId(keyTypeId).c_str(),
-        CacheableWrapperFactory::getTypeForId(valTypeId).c_str(), taskIndexPut);
-
-    CacheableWrapper *key = CacheableWrapperFactory::createInstance(keyTypeId);
-    int maxKeys =
-        (key->maxKeys() < DEFAULTNUMKEYS ? key->maxKeys() : DEFAULTNUMKEYS);
-    delete key;
-
-    auto dataReg = getHelper()->getRegion(regionNames[0]);
-    auto verifyReg = getHelper()->getRegion(regionNames[1]);
-    for (int i = 0; i < maxKeys; i++) {
-      CacheableWrapper *tmpkey =
-          CacheableWrapperFactory::createInstance(keyTypeId);
-      tmpkey->initKey(i, KEYSIZE);
-      auto keyPtr =
-          std::dynamic_pointer_cast<CacheableKey>(tmpkey->getCacheable());
-
-      ASSERT(tmpkey->getCacheable() != nullptr,
-             "tmpkey->getCacheable() is nullptr");
-
-      try {
-        LOGDEBUG("CPPTEST: Putting key %s with hashcode %d",
-                 keyPtr->toString().c_str(), keyPtr->hashcode());
-
-        dataReg->put(keyPtr, keyPtr->hashcode());
-        bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                              ->getAndResetNetworkHopFlag();
-        ASSERT(!networkhop, "It is networkhop operation");
-      } catch (CacheServerException &) {
-        LOGERROR("CPPTEST: Put caused extra hop.");
-        FAIL("Put caused extra hop.");
-      } catch (CacheWriterException &) {
-        LOGERROR("CPPTEST: Put caused extra hop.");
-        FAIL("Put caused extra hop.");
-      } catch (Exception &ex) {
-        LOGERROR("CPPTEST: Put caused unexpected %s: %s", ex.getName().c_str(),
-                 ex.what());
-        cleanProc();
-        FAIL("Put caused unexpected exception");
-      } catch (...) {
-        LOGERROR(
-            "CPPTEST: Put caused random exception in "
-            "CheckPrSingleHopForAllKeysTask");
-        cleanProc();
-        FAIL("Put caused unexpected exception");
-      }
-
-      try {
-        LOGDEBUG("CPPTEST: Destroying key %s with hashcode %d",
-                 keyPtr->toString().c_str(), keyPtr->hashcode());
-
-        dataReg->destroy(keyPtr);
-        bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                              ->getAndResetNetworkHopFlag();
-        ASSERT(!networkhop, "It is networkhop operation");
-      } catch (CacheServerException &) {
-        LOGERROR("CPPTEST: Destroy caused extra hop.");
-        FAIL("Destroy caused extra hop.");
-      } catch (CacheWriterException &) {
-        LOGERROR("CPPTEST: Destroy caused extra hop.");
-        FAIL("Destroy caused extra hop.");
-      } catch (Exception &ex) {
-        LOGERROR("CPPTEST: Destroy caused unexpected %s: %s",
-                 ex.getName().c_str(), ex.what());
-        cleanProc();
-        FAIL("Destroy caused unexpected exception");
-      } catch (...) {
-        LOGERROR(
-            "CPPTEST: Destroy caused random exception in "
-            "CheckPrSingleHopForAllKeysTask");
-        cleanProc();
-        FAIL("Destroy caused unexpected exception");
-      }
-      delete tmpkey;
-    }
-    taskIndexPut += static_cast<int>(valueTypes.size());
-    if (taskIndexPut == valueTypes.size() * keyTypes.size()) {
-      taskIndexPut = 0;
-    }
-
-    LOG("CheckPrSingleHopForAllKeysTask completed.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, ThreadedCheckPrSingleHopForIntKeysTask)
-  {
-    bool isWarmUpTask = false;
-    LOG("ThreadedCheckPrSingleHopForIntKeysTask started.");
-
-    putThread *threads[100];
-
-    for (int thdIdx = 0; thdIdx < 100; thdIdx++) {
-      threads[thdIdx] = new putThread(regionNames[0], 200, 1000, isWarmUpTask);
-      threads[thdIdx]->start();
-    }
-    // SLEEP(10000); // wait for threads to become active
-
-    for (int thdIdx = 0; thdIdx < 100; thdIdx++) {
-      threads[thdIdx]->stop();
-    }
-
-    // SLEEP(20000);
-    int totalFailureCount = 0;
-    for (int thdIdx = 0; thdIdx < 100; thdIdx++) {
-      totalFailureCount += threads[thdIdx]->getFailureCount();
-    }
-    ASSERT(totalFailureCount == 0,
-           "totalFailureCount should be exaclty equal to 0");
-    int poolconn = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                       ->getPoolSize("__TEST_POOL1__");
-    LOGINFO("ThreadedCheckPrSingleHopForIntKeysTask: poolconn is %d ",
-            poolconn);
-
-    LOG("ThreadedCheckPrSingleHopForIntKeysTask completed.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask2)
-  {
-    LOG("CheckPrSingleHopForIntKeysTask2 started.");
-
-    auto dataReg = getHelper()->getRegion(regionNames[0]);
-
-    for (int i = 2000; i < 3000; i++) {
-      auto keyPtr =
-          std::dynamic_pointer_cast<CacheableKey>(CacheableInt32::create(i));
-
-      try {
-        LOGDEBUG("CPPTEST: Putting key %d with hashcode %d", i,
-                 keyPtr->hashcode());
-        dataReg->put(keyPtr, keyPtr->hashcode());
-        bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                              ->getAndResetNetworkHopFlag();
-        int poolconn = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                           ->getPoolSize("__TEST_POOL1__");
-        LOGINFO(
-            "CheckPrSingleHopForIntKeysTask2: networkhop %d poolconn is %d ",
-            networkhop, poolconn);
-        ASSERT(!networkhop, "It is networkhop operation.");
-        ASSERT(poolconn == 2, "pool connections should be equal to 2.");
-        // ASSERT( singlehop, "It is not single hop operation" );
-      } catch (CacheServerException &) {
-        // This is actually a success situation!
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: Put caused extra hop.");
-        FAIL("Put caused extra hop.");
-        //}
-      } catch (CacheWriterException &) {
-        // This is actually a success situation! Once bug #521 is fixed.
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: Put caused extra hop.");
-        FAIL("Put caused extra hop.");
-        //}
-      } catch (Exception &ex) {
-        LOGERROR("CPPTEST: Put caused unexpected %s: %s", ex.getName().c_str(),
-                 ex.what());
-        cleanProc();
-        FAIL("Put caused unexpected exception");
-      } catch (...) {
-        LOGERROR("CPPTEST: Put caused random exception");
-        cleanProc();
-        FAIL("Put caused unexpected exception");
-      }
-
-      try {
-        LOGINFO("CPPTEST: Destroying key %i with hashcode %d", i,
-                keyPtr->hashcode());
-        dataReg->destroy(keyPtr);
-        bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                              ->getAndResetNetworkHopFlag();
-        int poolconn = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                           ->getPoolSize("__TEST_POOL1__");
-        LOGDEBUG(
-            "CheckPrSingleHopForIntKeysTask2: networkhop %d poolconn is %d ",
-            networkhop, poolconn);
-        ASSERT(!networkhop, "It is networkhop operation.");
-        ASSERT(poolconn == 2, "pool connections should be equal to 2.");
-        // LOGINFO("CheckPrSingleHopForIntKeysTask: networkhop %d ",
-        // networkhop);
-        // ASSERT(!networkhop , "It is networkhop operation.");
-        // ASSERT( singlehop , "It is not single hop operation" );
-      } catch (CacheServerException &) {
-        // This is actually a success situation!
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: Destroy caused extra hop.");
-        FAIL("Destroy caused extra hop.");
-        //}
-        LOGINFO(
-            "CPPTEST: SINGLEHOP SUCCEEDED while destroying key %d with "
-            "hashcode "
-            "%d",
-            i, keyPtr->hashcode());
-      } catch (CacheWriterException &) {
-        // This is actually a success situation! Once bug #521 is fixed.
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: Destroy caused extra hop.");
-        FAIL("Destroy caused extra hop.");
-        //}
-        LOGINFO(
-            "CPPTEST: SINGLEHOP SUCCEEDED while destroying key %d with "
-            "hashcode "
-            "%d",
-            i, keyPtr->hashcode());
-      } catch (Exception &ex) {
-        LOGERROR("CPPTEST: Destroy caused unexpected %s: %s",
-                 ex.getName().c_str(), ex.what());
-        cleanProc();
-        FAIL("Destroy caused unexpected exception");
-      } catch (...) {
-        LOGERROR("CPPTEST: Put caused random exception");
-        cleanProc();
-        FAIL("Put caused unexpected exception");
-      }
-    }
-    LOG("CheckPrSingleHopForIntKeysTask2 put completed.");
-
-    for (int i = 0; i < 1000; i++) {
-      auto keyPtr =
-          std::dynamic_pointer_cast<CacheableKey>(CacheableInt32::create(i));
-
-      try {
-        LOGDEBUG("CPPTEST: getting key %d with hashcode %d", i,
-                 keyPtr->hashcode());
-        dataReg->get(keyPtr /*,(int32_t)keyPtr->hashcode()*/);
-        bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                              ->getAndResetNetworkHopFlag();
-        int poolconn = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                           ->getPoolSize("__TEST_POOL1__");
-        LOGINFO(
-            "CheckPrSingleHopForIntKeysTask2: networkhop %d poolconn is %d ",
-            networkhop, poolconn);
-        ASSERT(!networkhop, "It is networkhop operation.");
-        ASSERT(poolconn == 2, "pool connections should be equal to 2.");
-        // LOGINFO("CheckPrSingleHopForIntKeysTask2: networkhop %d ",
-        // networkhop);
-        // ASSERT(!networkhop , "It is networkhop operation.");
-        // ASSERT( singlehop, "It is not single hop operation" );
-      } catch (CacheServerException &) {
-        // This is actually a success situation!
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: get caused extra hop.");
-        FAIL("get caused extra hop.");
-        //}
-        LOGINFO(
-            "CPPTEST: SINGLEHOP SUCCEEDED while getting key %d with hashcode "
-            "%d",
-            i, keyPtr->hashcode());
-      } catch (CacheWriterException &) {
-        // This is actually a success situation! Once bug #521 is fixed.
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: get caused extra hop.");
-        FAIL("get caused extra hop.");
-        //}
-        LOGINFO(
-            "CPPTEST: SINGLEHOP SUCCEEDED while getting key %d with hashcode "
-            "%d",
-            i, keyPtr->hashcode());
-      } catch (Exception &ex) {
-        LOGERROR("CPPTEST: get caused unexpected %s: %s", ex.getName().c_str(),
-                 ex.what());
-        cleanProc();
-        FAIL("get caused unexpected exception");
-      } catch (...) {
-        LOGERROR("CPPTEST: get caused random exception");
-        cleanProc();
-        FAIL("get caused unexpected exception");
-      }
-    }
-    LOG("CheckPrSingleHopForIntKeysTask2 get completed.");
-
-    for (int i = 1000; i < 2000; i++) {
-      std::vector<std::shared_ptr<CacheableKey>> keysVector;
-      for (int j = i; j < i + 5; j++) {
-        keysVector.push_back(CacheableInt32::create(j));
-      }
-
-      try {
-        // LOGINFO("CPPTEST: getting key %d with hashcode %d", i,
-        // (int32_t)keyPtr->hashcode());
-        dataReg->getAll(keysVector);
-        bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                              ->getAndResetNetworkHopFlag();
-        LOGINFO("CheckPrSingleHopForIntKeysTask2: networkhop %d ", networkhop);
-        ASSERT(!networkhop, "It is networkhop operation.");
-        // ASSERT( singlehop, "It is not single hop operation" );
-      } catch (CacheServerException &) {
-        // This is actually a success situation!
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: getAll caused extra hop.");
-        FAIL("getAll caused extra hop.");
-        //}
-        // LOGINFO("CPPTEST: SINGLEHOP SUCCEEDED while getting key %d with
-        // hashcode %d", i, (int32_t)keyPtr->hashcode());
-      } catch (CacheWriterException &) {
-        // This is actually a success situation! Once bug #521 is fixed.
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: getAll caused extra hop.");
-        FAIL("getAll caused extra hop.");
-        //}
-        // LOGINFO("CPPTEST: SINGLEHOP SUCCEEDED while getting key %d with
-        // hashcode %d", i, (int32_t)keyPtr->hashcode());
-      } catch (Exception &ex) {
-        LOGERROR("CPPTEST: getALL caused unexpected %s: %s",
-                 ex.getName().c_str(), ex.what());
-        cleanProc();
-        FAIL("getAll caused unexpected exception");
-      } catch (...) {
-        LOGERROR("CPPTEST: getAll caused random exception");
-        cleanProc();
-        FAIL("getAll caused unexpected exception");
-      }
-    }
-
-    LOG("CheckPrSingleHopForIntKeysTask2 get completed.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForGetAllTask)
-  {
-    auto dataReg = getHelper()->getRegion(regionNames[0]);
-    std::vector<std::shared_ptr<CacheableKey>> keysVector;
-    for (int i = 0; i < 100; i++) {
-      auto keyPtr =
-          std::dynamic_pointer_cast<CacheableKey>(CacheableInt32::create(i));
-      dataReg->put(keyPtr, keyPtr->hashcode());
-      keysVector.push_back(keyPtr);
-    }
-
-    auto valuesMap = dataReg->getAll(keysVector);
-    ASSERT(valuesMap.size() == 100, "GetAll returns wrong number of values");
-
-    valuesMap = dataReg->getAll(keysVector, CacheableInt32::create(1000));
-    ASSERT(valuesMap.size() == 100,
-           "GetAllWithCallBack returns wrong number of values");
-
-    LOG("CheckPrSingleHopForGetAll get completed.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask)
-  {
-    LOG("CheckPrSingleHopForIntKeysTask started.");
-
-    auto dataReg = getHelper()->getRegion(regionNames[0]);
-
-    for (int i = 2000; i < 3000; i++) {
-      auto keyPtr =
-          std::dynamic_pointer_cast<CacheableKey>(CacheableInt32::create(i));
-
-      try {
-        LOGDEBUG("CPPTEST: Putting key %d with hashcode %d", i,
-                 keyPtr->hashcode());
-        dataReg->put(keyPtr, keyPtr->hashcode());
-        bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                              ->getAndResetNetworkHopFlag();
-        LOGINFO("CheckPrSingleHopForIntKeysTask: networkhop %d ", networkhop);
-        ASSERT(!networkhop, "It is networkhop operation.");
-        // ASSERT( singlehop, "It is not single hop operation" );
-      } catch (CacheServerException &) {
-        // This is actually a success situation!
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: Put caused extra hop.");
-        FAIL("Put caused extra hop.");
-        //}
-      } catch (CacheWriterException &) {
-        // This is actually a success situation! Once bug #521 is fixed.
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: Put caused extra hop.");
-        FAIL("Put caused extra hop.");
-      } catch (Exception &ex) {
-        LOGERROR("CPPTEST: Put caused unexpected %s: %s", ex.getName().c_str(),
-                 ex.what());
-        cleanProc();
-        FAIL("Put caused unexpected exception");
-      } catch (...) {
-        LOGERROR("CPPTEST: Put caused random exception");
-        cleanProc();
-        FAIL("Put caused unexpected exception");
-      }
-
-      try {
-        LOGDEBUG("CPPTEST: Destroying key %i with hashcode %d", i,
-                 keyPtr->hashcode());
-        dataReg->destroy(keyPtr);
-        bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                              ->getAndResetNetworkHopFlag();
-        LOGINFO("CheckPrSingleHopForIntKeysTask: networkhop %d ", networkhop);
-        ASSERT(!networkhop, "It is networkhop operation.");
-        // ASSERT( singlehop , "It is not single hop operation" );
-      } catch (CacheServerException &) {
-        // This is actually a success situation!
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: Destroy caused extra hop.");
-        FAIL("Destroy caused extra hop.");
-        //}
-      } catch (CacheWriterException &) {
-        // This is actually a success situation! Once bug #521 is fixed.
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: Destroy caused extra hop.");
-        FAIL("Destroy caused extra hop.");
-      } catch (Exception &ex) {
-        LOGERROR("CPPTEST: Destroy caused unexpected %s: %s",
-                 ex.getName().c_str(), ex.what());
-        cleanProc();
-        FAIL("Destroy caused unexpected exception");
-      } catch (...) {
-        LOGERROR("CPPTEST: Put caused random exception");
-        cleanProc();
-        FAIL("Put caused unexpected exception");
-      }
-    }
-    LOG("CheckPrSingleHopForIntKeysTask put completed.");
-
-    for (int i = 0; i < 1000; i++) {
-      auto keyPtr =
-          std::dynamic_pointer_cast<CacheableKey>(CacheableInt32::create(i));
-
-      try {
-        LOGDEBUG("CPPTEST: getting key %d with hashcode %d", i,
-                 keyPtr->hashcode());
-        dataReg->get(keyPtr /*,(int32_t)keyPtr->hashcode()*/);
-        bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                              ->getAndResetNetworkHopFlag();
-        LOGINFO("CheckPrSingleHopForIntKeysTask: networkhop %d ", networkhop);
-        ASSERT(!networkhop, "It is networkhop operation.");
-        // ASSERT( singlehop, "It is not single hop operation" );
-      } catch (CacheServerException &) {
-        // This is actually a success situation!
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: get caused extra hop.");
-        FAIL("get caused extra hop.");
-        //}
-      } catch (CacheWriterException &) {
-        // This is actually a success situation! Once bug #521 is fixed.
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: get caused extra hop.");
-        FAIL("get caused extra hop.");
-      } catch (Exception &ex) {
-        LOGERROR("CPPTEST: get caused unexpected %s: %s", ex.getName().c_str(),
-                 ex.what());
-        cleanProc();
-        FAIL("get caused unexpected exception");
-      } catch (...) {
-        LOGERROR("CPPTEST: get caused random exception");
-        cleanProc();
-        FAIL("get caused unexpected exception");
-      }
-    }
-    LOG("CheckPrSingleHopForIntKeysTask get completed.");
-
-    for (int i = 1000; i < 2000; i++) {
-      std::vector<std::shared_ptr<CacheableKey>> keysVector;
-      for (int j = i; j < i + 5; j++) {
-        keysVector.push_back(CacheableInt32::create(j));
-      }
-
-      try {
-        // LOGINFO("CPPTEST: getting key %d with hashcode %d", i,
-        // (int32_t)keyPtr->hashcode());
-        dataReg->getAll(keysVector);
-        bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                              ->getAndResetNetworkHopFlag();
-        LOGINFO("CheckPrSingleHopForIntKeysTask: networkhop %d ", networkhop);
-        ASSERT(!networkhop, "It is networkhop operation.");
-        // ASSERT( singlehop, "It is not single hop operation" );
-      } catch (CacheServerException &) {
-        // This is actually a success situation!
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: getAll caused extra hop.");
-        FAIL("getAll caused extra hop.");
-        //}
-        // LOGINFO("CPPTEST: SINGLEHOP SUCCEEDED while getting key %d with
-        // hashcode %d", i, (int32_t)keyPtr->hashcode());
-      } catch (CacheWriterException &) {
-        // This is actually a success situation! Once bug #521 is fixed.
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: getAll caused extra hop.");
-        FAIL("getAll caused extra hop.");
-        //}
-        // LOGINFO("CPPTEST: SINGLEHOP SUCCEEDED while getting key %d with
-        // hashcode %d", i, (int32_t)keyPtr->hashcode());
-      } catch (Exception &ex) {
-        LOGERROR("CPPTEST: getALL caused unexpected %s: %s",
-                 ex.getName().c_str(), ex.what());
-        cleanProc();
-        FAIL("getAll caused unexpected exception");
-      } catch (...) {
-        LOGERROR("CPPTEST: getAll caused random exception");
-        cleanProc();
-        FAIL("getAll caused unexpected exception");
-      }
-
-      try {
-        // LOGINFO("CPPTEST: getting key %d with hashcode %d", i,
-        // (int32_t)keyPtr->hashcode());
-        dataReg->getAll(keysVector, CacheableInt32::create(1000));
-        bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                              ->getAndResetNetworkHopFlag();
-        LOGINFO("CheckPrSingleHopForIntKeysTask: networkhop %d ", networkhop);
-        ASSERT(!networkhop, "It is networkhop operation.");
-        // ASSERT( singlehop, "It is not single hop operation" );
-      } catch (CacheServerException &) {
-        // This is actually a success situation!
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: getAll caused extra hop.");
-        FAIL("getAll caused extra hop.");
-        //}
-        // LOGINFO("CPPTEST: SINGLEHOP SUCCEEDED while getting key %d with
-        // hashcode %d", i, (int32_t)keyPtr->hashcode());
-      } catch (CacheWriterException &) {
-        // This is actually a success situation! Once bug #521 is fixed.
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: getAll caused extra hop.");
-        FAIL("getAll caused extra hop.");
-        //}
-        // LOGINFO("CPPTEST: SINGLEHOP SUCCEEDED while getting key %d with
-        // hashcode %d", i, (int32_t)keyPtr->hashcode());
-      } catch (Exception &ex) {
-        LOGERROR("CPPTEST: getALL caused unexpected %s: %s",
-                 ex.getName().c_str(), ex.what());
-        cleanProc();
-        FAIL("getAll caused unexpected exception");
-      } catch (...) {
-        LOGERROR("CPPTEST: getAll caused random exception");
-        cleanProc();
-        FAIL("getAll caused unexpected exception");
-      }
-    }
-    int poolconn = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                       ->getPoolSize("__TEST_POOL1__");
-    LOGINFO("CheckPrSingleHopForIntKeysTask: poolconn is %d ", poolconn);
-    LOG("CheckPrSingleHopForIntKeysTask get completed.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, CloseCache1)
-  {
-    auto pool =
-        getHelper()->getCache()->getPoolManager().find("__TEST_POOL1__");
-    if (pool->getThreadLocalConnections()) {
-      LOG("releaseThreadLocalConnection1 doing...");
-      pool->releaseThreadLocalConnection();
-      LOG("releaseThreadLocalConnection1 done");
-    }
-    cleanProc();
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER1, CloseServer1)
-  {
-    if (isLocalServer) {
-      CacheHelper::closeServer(1);
-      LOG("SERVER1 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER2, CloseServer2)
-  {
-    if (isLocalServer) {
-      CacheHelper::closeServer(2);
-      LOG("SERVER2 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER3, CloseServer3)
-  {
-    if (isLocalServer) {
-      CacheHelper::closeServer(3);
-      LOG("SERVER3 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER1, CreateLocator1)
-  {
-    // starting locator
-    if (isLocator) CacheHelper::initLocator(1);
-    LOG("Locator1 started");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER1, CloseLocator1)
-  {
-    // stop locator
-    if (isLocator) {
-      CacheHelper::closeLocator(1);
-      LOG("Locator1 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER1, CreateServer1_With_Locator_PR)
-  {
-    // starting servers
-    if (isLocalServer) {
-      CacheHelper::initServer(1, "cacheserver1_partitioned.xml", locatorsG);
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER2, CreateServer2_With_Locator_PR)
-  {
-    // starting servers
-    if (isLocalServer) {
-      CacheHelper::initServer(2, "cacheserver2_partitioned.xml", locatorsG);
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER3, CreateServer3_With_Locator_PR)
-  {
-    // starting servers
-    if (isLocalServer) {
-      CacheHelper::initServer(3, "cacheserver3_partitioned.xml", locatorsG);
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, CheckGetAllTask)
-  {
-    auto dataReg = getHelper()->getRegion(regionNames[0]);
-    std::vector<std::shared_ptr<CacheableKey>> keysVector;
-    for (int i = 0; i < 100000; i++) {
-      auto keyPtr =
-          std::dynamic_pointer_cast<CacheableKey>(CacheableInt32::create(i));
-      dataReg->put(keyPtr, keyPtr->hashcode());
-      keysVector.push_back(keyPtr);
-    }
-
-    ACE_Time_Value startTime = ACE_OS::gettimeofday();
-    auto valuesMap = dataReg->getAll(keysVector);
-    ACE_Time_Value interval = ACE_OS::gettimeofday() - startTime;
-    LOGDEBUG("NILKANTH: Time taken to execute getALL sec = %d and MSec = %d ",
-             interval.sec(), interval.usec());
-    ASSERT(valuesMap.size() == 100000, "GetAll returns wrong number of values");
-
-    valuesMap = dataReg->getAll(keysVector, CacheableInt32::create(10000));
-    ASSERT(valuesMap.size() == 100000,
-           "GetAllWithCallBack returns wrong number of values");
-
-    LOGINFO(
-        "CheckPrSingleHopForGetAllWithCallBack get completed. "
-        "valuesMap->size() "
-        "= %d",
-        valuesMap.size());
-  }
-END_TASK_DEFINITION
-
-DUNIT_MAIN
-  {
-    CacheableHelper::registerBuiltins(true);
-
-    for (int k = 0; k < 2; k++) {
-      CALL_TASK(CreateLocator1);
-
-      CALL_TASK(CreateServer1_With_Locator_PR);
-      CALL_TASK(CreateServer2_With_Locator_PR);
-      CALL_TASK(CreateServer3_With_Locator_PR);
-
-      if (k == 0) {
-        CALL_TASK(StepOne_Pooled_Locator);
-      } else {
-        CALL_TASK(StepOne_Pooled_LocatorTL);
-      }
-
-      CALL_TASK(WarmUpTask);
-      CALL_TASK(CheckPrSingleHopForIntKeysTask);
-      size_t totKeyTypes =
-          CacheableWrapperFactory::getRegisteredKeyTypes().size();
-
-      CALL_TASK(CheckPrSingleHopForIntKeysTask);
-      for (size_t i = 0; i < totKeyTypes; i++) {
-        CALL_TASK(CheckPrSingleHopForAllKeysTask);
-      }
-
-      CALL_TASK(CheckPrSingleHopForGetAllTask);
-
-      CALL_TASK(CloseCache1);
-
-      CALL_TASK(CloseServer1);
-      CALL_TASK(CloseServer2);
-      CALL_TASK(CloseServer3);
-
-      CALL_TASK(CloseLocator1);
-    }
-
-    // Check for max-connection value when 3 servers and max-connections set to
-    // 2,
-    // then chk pools max connection size.
-    // TestCase for getAll thread safe. bug #783 and #792
-    CALL_TASK(CreateLocator1);  // s1
-
-    CALL_TASK(CreateServer1_With_Locator_PR);  // s1
-    CALL_TASK(CreateServer2_With_Locator_PR);  // s2
-    CALL_TASK(CreateServer3_With_Locator_PR);  // s3
-
-    CALL_TASK(StepOne_Pooled_Locator);  // c1
-
-    CALL_TASK(CheckGetAllTask);
-
-    CALL_TASK(CloseCache1);
-
-    CALL_TASK(CloseServer1);
-    CALL_TASK(CloseServer2);
-    CALL_TASK(CloseServer3);
-
-    CALL_TASK(CloseLocator1);
-  }
-END_MAIN
diff --git a/cppcache/integration-test/testThinClientPRSingleHopServerGroup.cpp b/cppcache/integration-test/testThinClientPRSingleHopServerGroup.cpp
index fba653d..cf7be02 100644
--- a/cppcache/integration-test/testThinClientPRSingleHopServerGroup.cpp
+++ b/cppcache/integration-test/testThinClientPRSingleHopServerGroup.cpp
@@ -20,22 +20,15 @@
 
 #include <string>
 
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-#include <ace/ACE.h>
-
 #include <statistics/StatisticsFactory.hpp>
 
 #include "fw_dunit.hpp"
-#include "BuiltinCacheableWrappers.hpp"
 #include "Utils.hpp"
 
 #include "CacheHelper.hpp"
 
 // Include these 2 headers for access to CacheImpl for test hooks.
-#include "CacheImplHelper.hpp"
 #include "testUtils.hpp"
-
 #include "ThinClientHelper.hpp"
 
 #define CLIENT1 s1p1
@@ -51,7 +44,7 @@
 bool isLocalServer = false;
 
 static bool isLocator = false;
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 
 const char *group1 = "ABC";
diff --git a/cppcache/integration-test/testThinClientPartitionResolver.cpp b/cppcache/integration-test/testThinClientPartitionResolver.cpp
index 0d4dde2..098f900 100644
--- a/cppcache/integration-test/testThinClientPartitionResolver.cpp
+++ b/cppcache/integration-test/testThinClientPartitionResolver.cpp
@@ -22,8 +22,6 @@
 #include "BuiltinCacheableWrappers.hpp"
 #include "Utils.hpp"
 #include <geode/PartitionResolver.hpp>
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 
 #include <string>
 
diff --git a/cppcache/integration-test/testThinClientPdxDeltaWithNotification.cpp b/cppcache/integration-test/testThinClientPdxDeltaWithNotification.cpp
index f0b9b46..317e83f 100644
--- a/cppcache/integration-test/testThinClientPdxDeltaWithNotification.cpp
+++ b/cppcache/integration-test/testThinClientPdxDeltaWithNotification.cpp
@@ -35,7 +35,7 @@
 bool isLocalServer = false;
 
 static bool isLocator = false;
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #define CLIENT1 s1p1
 #define CLIENT2 s1p2
@@ -78,13 +78,15 @@
   return cacheHelper;
 }
 
-void createPooledRegion(const char *name, bool ackMode, const char *locators,
-                        const char *poolname,
+void createPooledRegion(const std::string &name, bool ackMode,
+                        const std::string &locators,
+                        const std::string &poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -92,7 +94,8 @@
   LOG("Pooled Region created.");
 }
 
-void createPooledExpirationRegion(const char *name, const char *poolname) {
+void createPooledExpirationRegion(const std::string &name,
+                                  const std::string &poolname) {
   LOG("createPooledExpirationRegion() entered.");
   // Entry time-to-live = 1 second.
   auto regPtr = getHelper()->createPooledRegionDiscOverFlow(
@@ -101,8 +104,9 @@
       0, nullptr, ExpirationAction::LOCAL_INVALIDATE);
 }
 
-void createPooledLRURegion(const char *name, bool ackMode, const char *locators,
-                           const char *poolname,
+void createPooledLRURegion(const std::string &name, bool ackMode,
+                           const std::string &locators,
+                           const std::string &poolname,
                            bool clientNotificationEnabled = false,
                            bool cachingEnable = true) {
   LOG(" createPooledLRURegion entered");
@@ -114,11 +118,12 @@
   LOG(" createPooledLRURegion exited");
 }
 
-void createRegion(const char *name, bool ackMode,
+void createRegion(const std::string &name, bool ackMode,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   // ack, caching
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
                                           clientNotificationEnabled);
@@ -126,7 +131,8 @@
   LOG("Region created.");
 }
 
-void createLRURegion(const char *name, bool clientNotificationEnabled = false,
+void createLRURegion(const std::string &name,
+                     bool clientNotificationEnabled = false,
                      bool cachingEnable = true) {
   LOG(" createPooledLRURegion entered");
   auto regPtr = getHelper()->createRegionDiscOverFlow(
@@ -136,7 +142,7 @@
   LOG(" createPooledLRURegion exited");
 }
 
-void createExpirationRegion(const char *name,
+void createExpirationRegion(const std::string &name,
                             bool clientNotificationEnabled = false,
                             bool cachingEnable = true) {
   LOG(" createPooledLRURegion entered");
@@ -320,10 +326,9 @@
   {
     // Wait for notification
     SLEEP(5000);
-    char buff[100];
-    sprintf(buff, "From Pdxdelta count %d  From data count %d",
-            PdxDeltaEx::m_fromDeltaCount, PdxDeltaEx::m_fromDataCount);
-    LOG(buff);
+    LOG(std::string("From PdxDelta count ") +
+        std::to_string(PdxDeltaEx::m_fromDeltaCount) + "  From data count " +
+        std::to_string(PdxDeltaEx::m_fromDataCount));
     ASSERT(PdxDeltaEx::m_fromDataCount == 13,
            "Client2_PdxVerifyDelta PdxDeltaEx::m_fromDataCount should have "
            "been 13");
diff --git a/cppcache/integration-test/testThinClientPdxEnum.cpp b/cppcache/integration-test/testThinClientPdxEnum.cpp
index 4438468..cd19a59 100644
--- a/cppcache/integration-test/testThinClientPdxEnum.cpp
+++ b/cppcache/integration-test/testThinClientPdxEnum.cpp
@@ -32,7 +32,7 @@
 #define SERVER1 s2p1
 static bool isLocator = false;
 
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 
 DUNIT_TASK_DEFINITION(CLIENT1, SetupClientPoolLoc)
@@ -40,7 +40,7 @@
     LOG("Starting Step One with Pool + Locator lists");
     initClient(true);
 
-    createPool("__TEST_POOL1__", locatorsG, nullptr, 0, true);
+    createPool("__TEST_POOL1__", locatorsG, {}, 0, true);
     createRegionAndAttachPool("DistRegionAck", USE_ACK, "__TEST_POOL1__");
 
     LOG("SetupClient complete.");
diff --git a/cppcache/integration-test/testThinClientPdxInstance.cpp b/cppcache/integration-test/testThinClientPdxInstance.cpp
deleted file mode 100644
index 1515d3c..0000000
--- a/cppcache/integration-test/testThinClientPdxInstance.cpp
+++ /dev/null
@@ -1,2666 +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.
- */
-
-#include <string>
-
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-#include <ace/Date_Time.h>
-
-#include <geode/PdxInstance.hpp>
-#include <geode/PdxInstanceFactory.hpp>
-#include <geode/WritablePdxInstance.hpp>
-
-#include "fw_dunit.hpp"
-#include "testobject/PdxType.hpp"
-#include "testobject/NestedPdxObject.hpp"
-#include "CachePerfStats.hpp"
-#include "LocalRegion.hpp"
-
-#define ROOT_NAME "testThinClientPdxInstance"
-#define ROOT_SCOPE DISTRIBUTED_ACK
-
-#include "CacheHelper.hpp"
-#include "CacheImpl.hpp"
-#include "SerializationRegistry.hpp"
-#include "CacheRegionHelper.hpp"
-
-using PdxTests::Address;
-
-using testobject::ChildPdx;
-using testobject::ParentPdx;
-using testobject::SerializePdx;
-
-using apache::geode::client::Cacheable;
-using apache::geode::client::CacheableArrayList;
-using apache::geode::client::CacheableDate;
-using apache::geode::client::CacheableEnum;
-using apache::geode::client::CacheableHashMap;
-using apache::geode::client::CacheableHashSet;
-using apache::geode::client::CacheableInt32;
-using apache::geode::client::CacheableKey;
-using apache::geode::client::CacheableLinkedHashSet;
-using apache::geode::client::CacheableObjectArray;
-using apache::geode::client::CacheableVector;
-using apache::geode::client::CacheHelper;
-using apache::geode::client::CacheRegionHelper;
-using apache::geode::client::IllegalStateException;
-using apache::geode::client::LocalRegion;
-using apache::geode::client::PdxFieldTypes;
-using apache::geode::client::PdxInstance;
-using apache::geode::client::PdxSerializable;
-using apache::geode::client::Properties;
-using apache::geode::client::WritablePdxInstance;
-
-bool isLocalServer = false;
-
-CacheHelper *cacheHelper = nullptr;
-
-#define CLIENT1 s1p1
-#define CLIENT2 s1p2
-#define SERVER1 s2p1
-static bool isLocator = false;
-const bool USE_ACK = true;
-const bool NO_ACK = false;
-
-const char *locatorsG =
-    CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
-
-const char *regionNames[] = {"DistRegionAck", "DistRegionNoAck"};
-
-template <typename T1, typename T2>
-bool genericValCompare(T1 value1, T2 value2) /*const*/
-{
-  if (value1 != value2) return false;
-  return true;
-}
-
-template <typename T1, typename T2, typename L>
-bool genericCompare(std::vector<T1> value1, std::vector<T2> value2,
-                    L length) /*const*/
-{
-  L i = 0;
-  while (i < length) {
-    if (value1[i] != value2[i]) {
-      return false;
-    } else {
-      i++;
-    }
-  }
-  return true;
-}
-
-template <typename T1, typename T2>
-bool generic2DCompare(T1 **value1, T2 **value2, int length,
-                      int *arrLengths) /*const*/
-{
-  for (int j = 0; j < length; j++) {
-    for (int k = 0; k < arrLengths[j]; k++) {
-      LOGINFO("generic2DCompare value1 = %d \t value2 = %d ", value1[j][k],
-              value2[j][k]);
-      if (value1[j][k] != value2[j][k]) return false;
-    }
-  }
-  LOGINFO("PdxObject::genericCompare Line_34");
-  return true;
-}
-
-void initClient(const bool isthinClient, bool isPdxReadSerailized) {
-  LOGINFO("isPdxReadSerailized = %d ", isPdxReadSerailized);
-  if (cacheHelper == nullptr) {
-    auto config = Properties::create();
-    config->insert("enable-time-statistics", "true");
-    LOGINFO("enabled-time-statistics ");
-    cacheHelper = new CacheHelper(isthinClient, false, isPdxReadSerailized,
-                                  config, false);
-  }
-  ASSERT(cacheHelper, "Failed to create a CacheHelper client instance.");
-}
-static int clientWithXml = 0;
-void initClient(const char *clientXmlFile) {
-  if (cacheHelper == nullptr) {
-    auto config = Properties::create();
-    if (clientWithXml > 2) config->insert("grid-client", "true");
-    clientWithXml += 1;
-    config->insert("enable-time-statistics", "true");
-    cacheHelper = new CacheHelper(nullptr, clientXmlFile, config);
-  }
-  ASSERT(cacheHelper, "Failed to create a CacheHelper client instance.");
-}
-void cleanProc() {
-  if (cacheHelper != nullptr) {
-    delete cacheHelper;
-    cacheHelper = nullptr;
-  }
-}
-CacheHelper *getHelper() {
-  ASSERT(cacheHelper != nullptr, "No cacheHelper initialized.");
-  return cacheHelper;
-}
-void createPooledRegion(const char *name, bool ackMode, const char *locators,
-                        const char *poolname,
-                        bool clientNotificationEnabled = false,
-                        bool cachingEnable = true) {
-  LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
-  auto regPtr =
-      getHelper()->createPooledRegion(name, ackMode, locators, poolname,
-                                      cachingEnable, clientNotificationEnabled);
-  ASSERT(regPtr != nullptr, "Failed to create region.");
-  LOG("Pooled Region created.");
-}
-DUNIT_TASK_DEFINITION(SERVER1, CreateLocator1)
-  {
-    // starting locator
-    if (isLocator) CacheHelper::initLocator(1);
-    LOG("Locator1 started");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER1, CreateServer1)
-  {
-    if (isLocalServer) {
-      CacheHelper::initServer(1, "cacheserver_pdxinstance_hashcode.xml");
-    }
-    LOG("SERVER1 started");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER1, CreateServer1_With_Locator)
-  {
-    if (isLocalServer) {
-      CacheHelper::initServer(1, "cacheserver_pdxinstance_hashcode.xml",
-                              locatorsG);
-    }
-    LOG("SERVER1 with locator started");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepOne_Pooled_Locator_PdxReadSerialized)
-  {
-    initClient(true, true);
-    createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TEST_POOL1__",
-                       false, false);
-    LOG("StepOne_Pooled_Locator complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, StepTwo_Pooled_Locator_PdxReadSerialized)
-  {
-    initClient(true, true);
-    createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TEST_POOL1__",
-                       false, false);
-    LOG("StepOne_Pooled_Locator complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2,
-                      StepTwo_Pooled_Locator_CachingEnabled_PdxReadSerialized)
-  {
-    initClient(true, true);
-    createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TEST_POOL1__",
-                       false, true);
-    LOG("StepTwo_Pooled_Locator complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepOne_Pooled_Locator)
-  {
-    initClient(true, false);
-    createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TEST_POOL1__",
-                       false, false);
-    LOG("StepOne_Pooled_Locator complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, StepTwo_Pooled_Locator)
-  {
-    initClient(true, false);
-    createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TEST_POOL1__",
-                       false, false);
-    LOG("StepTwo_Pooled_Locator complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, testReadSerializedXMLProperty_Client2)
-  {
-    ASSERT(cacheHelper->getCache()->getPdxReadSerialized() == true,
-           "Pdx read serialized property should be true.");
-    LOG("testReadSerializedXMLProperty complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, testReadSerializedXMLProperty_Client1)
-  {
-    ASSERT(cacheHelper->getCache()->getPdxReadSerialized() == true,
-           "Pdx read serialized property should be true.");
-    LOG("testReadSerializedXMLProperty complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, putPdxWithIdentityField)
-  {
-    LOG("putPdxWithIdentityField started ");
-
-    try {
-      auto serializationRegistry =
-          CacheRegionHelper::getCacheImpl(cacheHelper->getCache().get())
-              ->getSerializationRegistry();
-      serializationRegistry->addPdxSerializableType(
-          SerializePdx::createDeserializable);
-      LOG("SerializePdx Registered Successfully....");
-    } catch (apache::geode::client::IllegalStateException & /* ex*/) {
-      LOG("SerializePdx IllegalStateException");
-    }
-
-    auto rptr = getHelper()->getRegion(regionNames[0]);
-    // Creating object of type PdxObject
-    /*SerializePdxPtr*/ auto sp = std::make_shared<SerializePdx>(true);
-
-    // PUT Operation
-    rptr->put(CacheableInt32::create(1), sp);
-    LOG("pdxPut 1 completed ");
-
-    LOG("putPdxWithIdentityField complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, putCacheableObjectArrayWithPdxFields)
-  {
-    LOG("putCacheableObjectArrayWithPdxFields started ");
-
-    try {
-      auto serializationRegistry =
-          CacheRegionHelper::getCacheImpl(cacheHelper->getCache().get())
-              ->getSerializationRegistry();
-      serializationRegistry->addPdxSerializableType(
-          Address::createDeserializable);
-      LOG("Address Registered Successfully....");
-    } catch (apache::geode::client::IllegalStateException & /* ex*/) {
-      LOG("Address IllegalStateException");
-    }
-
-    auto rptr = getHelper()->getRegion(regionNames[0]);
-
-    // Creating CacheableobjectArray of type PdxObject
-    std::shared_ptr<CacheableObjectArray> objectArray =
-        CacheableObjectArray::create();
-    objectArray->push_back(
-        std::shared_ptr<Address>(new Address(1, "street0", "city0")));
-    objectArray->push_back(
-        std::shared_ptr<Address>(new Address(2, "street1", "city1")));
-    objectArray->push_back(
-        std::shared_ptr<Address>(new Address(3, "street2", "city2")));
-    objectArray->push_back(
-        std::shared_ptr<Address>(new Address(4, "street3", "city3")));
-    objectArray->push_back(
-        std::shared_ptr<Address>(new Address(5, "street4", "city4")));
-    objectArray->push_back(
-        std::shared_ptr<Address>(new Address(6, "street5", "city5")));
-    objectArray->push_back(
-        std::shared_ptr<Address>(new Address(7, "street6", "city6")));
-    objectArray->push_back(
-        std::shared_ptr<Address>(new Address(8, "street7", "city7")));
-    objectArray->push_back(
-        std::shared_ptr<Address>(new Address(9, "street8", "city8")));
-    objectArray->push_back(
-        std::shared_ptr<Address>(new Address(10, "street9", "city9")));
-
-    // PUT Operation
-    rptr->put(CacheableInt32::create(100), objectArray);
-    LOG("putCacheableObjectArrayWithPdxFields on key 100 completed ");
-
-    LOG("putCacheableObjectArrayWithPdxFields complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, verifyPdxIdentityField)
-  {
-    LOG("verifyPdxIdentityField started ");
-
-    try {
-      auto serializationRegistry =
-          CacheRegionHelper::getCacheImpl(cacheHelper->getCache().get())
-              ->getSerializationRegistry();
-      serializationRegistry->addPdxSerializableType(
-          SerializePdx::createDeserializable);
-      LOG("SerializePdx Registered Successfully....");
-    } catch (apache::geode::client::IllegalStateException & /* ex*/) {
-      LOG("SerializePdx IllegalStateException");
-    }
-
-    auto rptr = getHelper()->getRegion(regionNames[0]);
-
-    auto pi = std::dynamic_pointer_cast<PdxInstance>(
-        rptr->get(CacheableInt32::create(1)));
-    LOG("PdxInstancePtr get complete");
-
-    LOG("Statistics for for (PdxTests.PdxType) PdxInstance");
-    LocalRegion *lregPtr = (dynamic_cast<LocalRegion *>(rptr.get()));
-
-    LOGINFO(
-        "pdxInstanceDeserializations for (PdxTests.PdxType) PdxInstance  = %d ",
-        lregPtr->getCacheImpl()
-            ->getCachePerfStats()
-            .getPdxInstanceDeserializations());
-    LOGINFO(
-        "pdxInstanceCreations for (PdxTests.PdxType) PdxInstance  = %d ",
-        lregPtr->getCacheImpl()->getCachePerfStats().getPdxInstanceCreations());
-    LOGINFO(
-        "pdxInstanceDeserializationTime for(PdxTests.PdxType) PdxInstance  = "
-        "%d ",
-        lregPtr->getCacheImpl()
-            ->getCachePerfStats()
-            .getPdxInstanceDeserializationTime());
-
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceDeserializations() == 0,
-           "pdxInstanceDeserialization should be equal to 0.");
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceCreations() == 1,
-           "pdxInstanceCreations should be equal to 1.");
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceDeserializationTime() > 0,
-           "pdxInstanceDeserializationTime should be greater than equal to 0.");
-
-    ASSERT(pi->getFieldNames()->length() == 4,
-           "number of fields should be four in SerializePdx");
-
-    ASSERT(pi->isIdentityField("i1") == true,
-           "SerializePdx1.i1 should be identity field");
-
-    ASSERT(pi->isIdentityField("i2") == false,
-           "SerializePdx1.i2 should NOT be identity field");
-
-    ASSERT(pi->hasField("i1") == true,
-           "SerializePdx1.i1 should be in PdxInstance stream");
-
-    ASSERT(pi->hasField("i3") == false,
-           "There is no field i3 in SerializePdx1's PdxInstance stream");
-
-    std::shared_ptr<CacheableKey> javaPdxHCKey =
-        CacheableKey::create("javaPdxHC");
-    auto pIPtr2 = std::dynamic_pointer_cast<Cacheable>(rptr->get(javaPdxHCKey));
-    LOG("javaPdxHCKey get done");
-    CacheableInt32 *val = dynamic_cast<CacheableInt32 *>(pIPtr2.get());
-    LOG("javaPdxHCKey cast done");
-    int javaPdxHC = val->value();
-    LOGINFO("javaPdxHC hash code = %d ", javaPdxHC);
-
-    int pdxInstHashcode = pi->hashcode();
-
-    ASSERT(
-        javaPdxHC == pdxInstHashcode,
-        "Pdxhashcode for identity field object SerializePdx1 not matched with "
-        "java pdx hash code.");
-
-    auto pi2 = std::dynamic_pointer_cast<PdxInstance>(
-        rptr->get(CacheableInt32::create(1)));
-
-    LOGINFO(
-        "pdxInstanceDeserializations for (PdxTests.PdxType) PdxInstance  = %d ",
-        lregPtr->getCacheImpl()
-            ->getCachePerfStats()
-            .getPdxInstanceDeserializations());
-    LOGINFO(
-        "pdxInstanceCreations for (PdxTests.PdxType) PdxInstance  = %d ",
-        lregPtr->getCacheImpl()->getCachePerfStats().getPdxInstanceCreations());
-    LOGINFO(
-        "pdxInstanceDeserializationTime for(PdxTests.PdxType) PdxInstance  = "
-        "%d ",
-        lregPtr->getCacheImpl()
-            ->getCachePerfStats()
-            .getPdxInstanceDeserializationTime());
-
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceDeserializations() == 0,
-           "pdxInstanceDeserialization should be equal to 0.");
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceCreations() == 2,
-           "pdxInstanceCreations should be equal to 2.");
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceDeserializationTime() > 0,
-           "pdxInstanceDeserializationTime should be greater than 0.");
-
-    bool ret = false;
-    ret = (*pi == *pi2);
-    LOGINFO("PdxObject ret = %d ", ret);
-    ASSERT(ret == true, "Both PdxInstances should be equal.");
-
-    LOG("verifyPdxIdentityField complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, verifyCacheableObjectArrayWithPdxField)
-  {
-    LOG("verifyCacheableObjectArrayWithPdxField started ");
-
-    try {
-      auto serializationRegistry =
-          CacheRegionHelper::getCacheImpl(cacheHelper->getCache().get())
-              ->getSerializationRegistry();
-      serializationRegistry->addPdxSerializableType(
-          Address::createDeserializable);
-      LOG("Address Registered Successfully....");
-    } catch (apache::geode::client::IllegalStateException & /* ex*/) {
-      LOG("Address IllegalStateException");
-    }
-
-    auto rptr = getHelper()->getRegion(regionNames[0]);
-
-    auto objectArrayPtr = std::dynamic_pointer_cast<CacheableObjectArray>(
-        rptr->get(CacheableInt32::create(100)));
-    LOG("PdxInstancePtr get on key 100 complete");
-
-    for (size_t i = 0; i < objectArrayPtr->size(); i++) {
-      auto pi = std::dynamic_pointer_cast<PdxInstance>(objectArrayPtr->at(i));
-      LOG("PdxInstancePtr obtained from CacheableObjectArray");
-
-      auto pdxFactory =
-          cacheHelper->getCache()->createPdxInstanceFactory("PdxTests.Address");
-      LOG("PdxInstanceFactoryPtr created for PdxTests.Address....");
-
-      pdxFactory.writeInt("_aptNumber", static_cast<int32_t>(i + 1));
-      char streetStr[256] = {0};
-      sprintf(streetStr, "street%zd", i);
-      pdxFactory.writeString("_street", streetStr);
-      char cityStr[256] = {0};
-      sprintf(cityStr, "city%zd", i);
-      pdxFactory.writeString("_city", cityStr);
-
-      auto addrPtr = std::dynamic_pointer_cast<Address>(pi->getObject());
-      LOG("AddressPtr created using PdxInstance getObject()....");
-      auto newAddrPtr = std::make_shared<Address>(static_cast<int32_t>(i + 1),
-                                                  streetStr, cityStr);
-      LOG("AddressPtr created using new....");
-      ASSERT(addrPtr->equals(*newAddrPtr) == true,
-             "Both PdxInstances should be equal.");
-
-      auto retPtr = pdxFactory.create();
-      LOG("PdxInstancePtr created....");
-
-      bool ret = false;
-      ret = (*pi == *retPtr);
-      LOGINFO("PdxObject ret = %d ", ret);
-      ASSERT(ret == true, "Both PdxInstances should be equal.");
-    }
-
-    LOG("verifyCacheableObjectArrayWithPdxField complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, putPdxWithNullIdentityFields)
-  {
-    LOG("putPdxWithNullIdentityFields started ");
-
-    auto rptr = getHelper()->getRegion(regionNames[0]);
-    // Creating object of type PdxObject
-    auto sp = std::make_shared<SerializePdx>(false);
-
-    // PUT Operation
-    rptr->put(CacheableInt32::create(2), sp);
-    LOG("pdxPut 1 completed ");
-
-    LOG("putPdxWithNullIdentityFields complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, verifyPdxNullIdentityFieldHC)
-  {
-    LOG("verifyPdxNullIdentityFieldHC started ");
-
-    auto rptr = getHelper()->getRegion(regionNames[0]);
-
-    auto pi = std::dynamic_pointer_cast<PdxInstance>(
-        rptr->get(CacheableInt32::create(2)));
-    LOG("PdxInstancePtr get complete");
-
-    std::shared_ptr<CacheableKey> javaPdxHCKey =
-        CacheableKey::create("javaPdxHC");
-    auto pIPtr2 = std::dynamic_pointer_cast<Cacheable>(rptr->get(javaPdxHCKey));
-    LOG("javaPdxHCKey get done");
-    CacheableInt32 *val = dynamic_cast<CacheableInt32 *>(pIPtr2.get());
-    LOG("javaPdxHCKey cast done");
-    int javaPdxHC = val->value();
-    LOGINFO("javaPdxHC hash code = %d ", javaPdxHC);
-
-    int pdxInstHashcode = pi->hashcode();
-
-    ASSERT(
-        javaPdxHC == pdxInstHashcode,
-        "Pdxhashcode for identity field object SerializePdx1 not matched with "
-        "java pdx hash code.");
-
-    auto pi2 = std::dynamic_pointer_cast<PdxInstance>(
-        rptr->get(CacheableInt32::create(2)));
-
-    bool ret = false;
-    ret = (*pi == *pi2);
-    LOGINFO("PdxObject ret = %d ", ret);
-    ASSERT(ret == true, "Both PdxInstances should be equal.");
-
-    std::vector<std::shared_ptr<CacheableKey>> keys1;
-    keys1.push_back(CacheableInt32::create(1));
-    keys1.push_back(CacheableInt32::create(2));
-
-    const auto valuesMap = rptr->getAll(keys1);
-    LOG("getAll on Pdx objects completed.");
-
-    ASSERT(valuesMap.size() == keys1.size(), "getAll size did not match");
-
-    LOG("verifyPdxNullIdentityFieldHC complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, pdxPut)
-  {
-    LOG("pdxPut started ");
-    auto serializationRegistry =
-        CacheRegionHelper::getCacheImpl(cacheHelper->getCache().get())
-            ->getSerializationRegistry();
-    try {
-      serializationRegistry->addPdxSerializableType(
-          PdxTests::PdxType::createDeserializable);
-      LOG("PdxObject Registered Successfully....");
-    } catch (apache::geode::client::IllegalStateException & /* ex*/) {
-      LOG("PdxObject IllegalStateException");
-    }
-
-    // Creating object of type PdxObject
-    auto pdxobj = std::make_shared<PdxTests::PdxType>();
-
-    auto keyport = CacheableKey::create("pdxput");
-    auto keyport1 = CacheableKey::create("pdxput2");
-    auto rptr = getHelper()->getRegion(regionNames[0]);
-
-    // PUT Operation
-    rptr->put(keyport, pdxobj);
-    LOG("pdxPut 1 completed ");
-
-    auto pIPtr1 = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-
-    LOG("Statistics for for (PdxTests.PdxType) PdxInstance");
-    LocalRegion *lregPtr = (dynamic_cast<LocalRegion *>(rptr.get()));
-
-    LOGINFO(
-        "pdxInstanceDeserializations for (PdxTests.PdxType) PdxInstance = %d ",
-        lregPtr->getCacheImpl()
-            ->getCachePerfStats()
-            .getPdxInstanceDeserializations());
-    LOGINFO(
-        "pdxInstanceCreations for (PdxTests.PdxType) PdxInstance = %d ",
-        lregPtr->getCacheImpl()->getCachePerfStats().getPdxInstanceCreations());
-    LOGINFO(
-        "pdxInstanceDeserializationTime for(PdxTests.PdxType) PdxInstance = "
-        "%d ",
-        lregPtr->getCacheImpl()
-            ->getCachePerfStats()
-            .getPdxInstanceDeserializationTime());
-
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceDeserializations() == 0,
-           "pdxInstanceDeserialization should be equal to 0.");
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceCreations() == 1,
-           "pdxInstanceCreations should be equal to 1.");
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceDeserializationTime() > 0,
-           "pdxInstanceDeserializationTime should be greater than 0.");
-
-    auto toString = pIPtr1->toString();
-    LOGINFO("pdxinstance toString = %s ", toString.c_str());
-    int pdxInstHashcode = pIPtr1->hashcode();
-    LOGINFO("pdxinstance hash code = %d ", pdxInstHashcode);
-
-    auto javaPdxHCKey = CacheableKey::create("javaPdxHC");
-    auto pIPtr2 = std::dynamic_pointer_cast<Cacheable>(rptr->get(javaPdxHCKey));
-    LOG("In verifyPdxInstanceHashcode get done");
-    CacheableInt32 *val = dynamic_cast<CacheableInt32 *>(pIPtr2.get());
-    LOG("In verifyPdxInstanceHashcode cast done");
-    int javaPdxHC = val->value();
-    LOGINFO("javaPdxHC hash code = %d ", javaPdxHC);
-
-    ASSERT(javaPdxHC == pdxInstHashcode,
-           "Pdxhashcode hashcode not matched with java pdx hash code.");
-
-    // Creating object of type ParentPdx
-    auto parentPdxObj = std::make_shared<ParentPdx>(1);
-
-    LOG("pdxPut parentPdxObj created ");
-    rptr->put(keyport1, parentPdxObj);
-
-    LOG("pdxPut 2 completed ");
-
-    LOG("pdxPut complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, getObject)
-  {
-    LOG("getObject started ");
-    auto serializationRegistry =
-        CacheRegionHelper::getCacheImpl(cacheHelper->getCache().get())
-            ->getSerializationRegistry();
-    try {
-      serializationRegistry->addPdxSerializableType(
-          PdxTests::PdxType::createDeserializable);
-      LOG("PdxObject Registered Successfully....");
-    } catch (apache::geode::client::IllegalStateException & /* ex*/) {
-      LOG("PdxObject IllegalStateException");
-    }
-
-    try {
-      serializationRegistry->addPdxSerializableType(
-          ChildPdx::createDeserializable);
-      LOG("ChildPdx Registered Successfully....");
-    } catch (apache::geode::client::IllegalStateException & /* ex*/) {
-      LOG("ChildPdx IllegalStateException");
-    }
-
-    try {
-      serializationRegistry->addPdxSerializableType(
-          ParentPdx::createDeserializable);
-      LOG("ParentPdx Registered Successfully....");
-    } catch (apache::geode::client::IllegalStateException & /* ex*/) {
-      LOG("ParentPdx IllegalStateException");
-    }
-
-    auto keyport = CacheableKey::create("pdxput");
-    auto keyport1 = CacheableKey::create("pdxput2");
-    auto rptr = getHelper()->getRegion(regionNames[0]);
-
-    auto pIPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    LOG("PdxObject get Successful....");
-
-    LOGINFO("pdxinstance classname = " + pIPtr->getClassName());
-    ASSERT(pIPtr->getClassName() == "PdxTests.PdxType",
-           "pdxInstance.getClassName should return PdxTests.PdxType.");
-
-    auto pt = pIPtr->getObject();
-
-    LOG("PdxObject getObject Successful....");
-
-    LOG("Statistics for for (PdxTests.PdxType) PdxInstance ");
-    auto &&lregPtr = std::dynamic_pointer_cast<LocalRegion>(rptr);
-
-    LOGINFO(
-        "pdxInstanceDeserializations for (PdxTests.PdxType) PdxInstance  = %d ",
-        lregPtr->getCacheImpl()
-            ->getCachePerfStats()
-            .getPdxInstanceDeserializations());
-    LOGINFO(
-        "pdxInstanceCreations for (PdxTests.PdxType) PdxInstance  = %d ",
-        lregPtr->getCacheImpl()->getCachePerfStats().getPdxInstanceCreations());
-    LOGINFO(
-        "pdxInstanceDeserializationTime for(PdxTests.PdxType) PdxInstance  = "
-        "%d ",
-        lregPtr->getCacheImpl()
-            ->getCachePerfStats()
-            .getPdxInstanceDeserializationTime());
-
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceDeserializations() == 1,
-           "pdxInstanceDeserialization should be equal to 1.");
-    ASSERT(
-        lregPtr->getCacheImpl()->getCachePerfStats().getPdxInstanceCreations() >
-            1,
-        "pdxInstanceCreations should be greater than 1.");
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceDeserializationTime() > 0,
-           "pdxInstanceDeserializationTime should be greater than 0.");
-
-    auto ptorig = std::make_shared<PdxTests::PdxType>();
-    LOG("PdxObject ptorig Successful....");
-    PdxTests::PdxType *obj1 = ptorig.get();
-    LOG("obj1 Successful....");
-    PdxTests::PdxType *obj2 = dynamic_cast<PdxTests::PdxType *>(pt.get());
-    LOG("obj2 Successful....");
-
-    ASSERT(obj1->equals(*obj2, true) == true,
-           "PdxInstance.getObject not equals original object.");
-
-    auto pIPtr1 = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport1));
-    LOG("ParentPdxObject get Successful....");
-    auto toString = pIPtr1->toString();
-    LOGINFO("ParentPdxObject toString = %s ", toString.c_str());
-    auto pt1 = std::dynamic_pointer_cast<ParentPdx>(pIPtr1->getObject());
-    LOG("ParentPdxObject getObject Successful....");
-
-    LOGINFO(
-        "pdxInstanceDeserializations for (PdxTests.PdxType) PdxInstance  = %d ",
-        lregPtr->getCacheImpl()
-            ->getCachePerfStats()
-            .getPdxInstanceDeserializations());
-    LOGINFO(
-        "pdxInstanceCreations for (PdxTests.PdxType) PdxInstance  = %d ",
-        lregPtr->getCacheImpl()->getCachePerfStats().getPdxInstanceCreations());
-    LOGINFO(
-        "pdxInstanceDeserializationTime for(PdxTests.PdxType) PdxInstance  = "
-        "%d ",
-        lregPtr->getCacheImpl()
-            ->getCachePerfStats()
-            .getPdxInstanceDeserializationTime());
-
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceDeserializations() == 2,
-           "pdxInstanceDeserialization should be equal to 2.");
-    ASSERT(
-        lregPtr->getCacheImpl()->getCachePerfStats().getPdxInstanceCreations() >
-            1,
-        "pdxInstanceCreations should be greater than 1.");
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceDeserializationTime() > 0,
-           "pdxInstanceDeserializationTime should be greater than 0.");
-
-    auto parentPdxObj = std::make_shared<ParentPdx>(1);
-    LOG("ParentPdxObject parentPdxObj Successful....");
-    ParentPdx *parentObj1 = parentPdxObj.get();
-    LOG("parentObj1 Successful....");
-    ParentPdx *parentObj2 = dynamic_cast<ParentPdx *>(pt1.get());
-    LOG("parentObj2 Successful....");
-
-    ASSERT(parentObj1->equals(*parentObj2, true) == true,
-           "PdxInstance.getObject not equals original object.");
-
-    LOG("getObject complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, verifyPdxInstanceEquals)
-  {
-    LOG("Task verifyPdxInstanceEquals started.");
-
-    try {
-      auto serializationRegistry =
-          CacheRegionHelper::getCacheImpl(cacheHelper->getCache().get())
-              ->getSerializationRegistry();
-      serializationRegistry->addPdxSerializableType(
-          PdxTests::PdxType::createDeserializable);
-      LOG("PdxObject Registered Successfully....");
-    } catch (apache::geode::client::IllegalStateException & /* ex*/) {
-      LOG("PdxObject IllegalStateException");
-    }
-
-    auto keyport = CacheableKey::create("pdxput");
-    auto keyport1 = CacheableKey::create("pdxput2");
-    auto rptr = getHelper()->getRegion(regionNames[0]);
-
-    auto pIPtr1 = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    LOG("get1 Successfully....");
-    auto pIPtr2 = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    LOG("get2 Successfully....");
-
-    bool ret = false;
-    ret = (*pIPtr1 == *pIPtr2);
-    LOGINFO("PdxObject ret = %d ", ret);
-    ASSERT(ret == true, "Both PdxInstances should be equal.");
-
-    pIPtr1 = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport1));
-    LOG("parentPdx get1 Successfully....");
-    pIPtr2 = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport1));
-    LOG("parentPdx get2 Successfully....");
-
-    ret = (*pIPtr1 == *pIPtr2);
-    LOGINFO("parentPdx ret = %d ", ret);
-    ASSERT(ret == true, "Both PdxInstances should be equal.");
-
-    LOG("Task verifyPdxInstanceEquals complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, verifyPdxInstanceHashcode)
-  {
-    LOG("verifyPdxInstanceHashcode started ");
-
-    auto rptr = getHelper()->getRegion(regionNames[0]);
-    auto keyport1 = CacheableKey::create("javaPdxHC");
-    auto keyport2 = CacheableKey::create("pdxput2");
-    auto pIPtr1 = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport2));
-    int pdxInstHashcode = pIPtr1->hashcode();
-    LOGINFO("pdxinstance hash code = %d ", pdxInstHashcode);
-
-    auto pIPtr2 = std::dynamic_pointer_cast<Cacheable>(rptr->get(keyport1));
-    LOG("In verifyPdxInstanceHashcode get done");
-    CacheableInt32 *val1 = dynamic_cast<CacheableInt32 *>(pIPtr2.get());
-    LOG("In verifyPdxInstanceHashcode cast done");
-    int javaPdxHC = val1->value();
-    LOGINFO("javaPdxHC hash code again = %d ", javaPdxHC);
-
-    ASSERT(javaPdxHC == pdxInstHashcode,
-           "Pdxhashcode hashcode not matched with java padx hash code.");
-
-    LOG("verifyPdxInstanceHashcode complete");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, accessPdxInstance)
-  {
-    LOG("accessPdxInstance started ");
-    auto serializationRegistry =
-        CacheRegionHelper::getCacheImpl(cacheHelper->getCache().get())
-            ->getSerializationRegistry();
-    try {
-      serializationRegistry->addPdxSerializableType(
-          PdxTests::PdxType::createDeserializable);
-      LOG("PdxObject Registered Successfully....");
-    } catch (apache::geode::client::IllegalStateException & /* ex*/) {
-      LOG("PdxObject IllegalStateException");
-    }
-
-    try {
-      serializationRegistry->addPdxSerializableType(
-          Address::createDeserializable);
-      LOG("Address Registered Successfully....");
-    } catch (apache::geode::client::IllegalStateException & /* ex*/) {
-      LOG("Address IllegalStateException");
-    }
-
-    auto keyport = CacheableKey::create("pdxput");
-    auto keyport1 = CacheableKey::create("pdxput2");
-    auto rptr = getHelper()->getRegion(regionNames[0]);
-
-    auto pIPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    LOGINFO("PdxInstancePtr created ");
-
-    auto pdxobjPtr = std::make_shared<PdxTests::PdxType>();
-
-    bool bval = pIPtr->getBooleanField("m_bool");
-    ASSERT(pdxobjPtr->getBool() == bval, "bool values should be equal");
-    ASSERT(pIPtr->getFieldType("m_bool") == PdxFieldTypes::BOOLEAN,
-           "Type Value BOOLEAN Mismatch");
-
-    signed char byteVal = pIPtr->getByteField("m_byte");
-    ASSERT(pdxobjPtr->getByte() == byteVal, "byte values should be equal");
-    ASSERT(pIPtr->getFieldType("m_byte") == PdxFieldTypes::BYTE,
-           "Type Value BYTE Mismatch");
-
-    byteVal = pIPtr->getByteField("m_sbyte");
-    ASSERT(pdxobjPtr->getSByte() == byteVal, "Sbyte values should be equal");
-    ASSERT(pIPtr->getFieldType("m_sbyte") == PdxFieldTypes::BYTE,
-           "Type Value BYTE Mismatch");
-
-    int16_t shortVal = pIPtr->getShortField("m_int16");
-    ASSERT(pdxobjPtr->getShort() == shortVal, "shortVal should be equal");
-    ASSERT(pIPtr->getFieldType("m_int16") == PdxFieldTypes::SHORT,
-           "Type Value SHORT Mismatch");
-
-    shortVal = pIPtr->getShortField("m_uint16");
-    ASSERT(pdxobjPtr->getUint16() == shortVal, "m_uint16 should be equal");
-    ASSERT(pIPtr->getFieldType("m_uint16") == PdxFieldTypes::SHORT,
-           "Type Value SHORT Mismatch");
-
-    int val = pIPtr->getIntField("m_int32");
-    ASSERT(pdxobjPtr->getInt() == val, "int32 values should be equal");
-    ASSERT(pIPtr->getFieldType("m_int32") == PdxFieldTypes::INT,
-           "Type Value INT Mismatch");
-
-    val = pIPtr->getIntField("m_uint32");
-    ASSERT(pdxobjPtr->getUInt() == val, "m_uint32 values should be equal");
-    ASSERT(pIPtr->getFieldType("m_uint32") == PdxFieldTypes::INT,
-           "Type Value INT Mismatch");
-
-    int64_t longVal = pIPtr->getLongField("m_long");
-    ASSERT(pdxobjPtr->getLong() == longVal, "int64 values should be equal");
-    ASSERT(pIPtr->getFieldType("m_long") == PdxFieldTypes::LONG,
-           "Type Value LONG Mismatch");
-
-    longVal = pIPtr->getLongField("m_ulong");
-    ASSERT(pdxobjPtr->getULong() == longVal, "m_ulong values should be equal");
-    ASSERT(pIPtr->getFieldType("m_ulong") == PdxFieldTypes::LONG,
-           "Type Value LONG Mismatch");
-
-    float floatVal = pIPtr->getFloatField("m_float");
-    ASSERT(pdxobjPtr->getFloat() == floatVal, "floatVal should be equal");
-    ASSERT(pIPtr->getFieldType("m_float") == PdxFieldTypes::FLOAT,
-           "Type Value FLOAT Mismatch");
-
-    double doubleVal = pIPtr->getDoubleField("m_double");
-    ASSERT(pdxobjPtr->getDouble() == doubleVal, "doubleVal should be equal");
-    ASSERT(pIPtr->getFieldType("m_double") == PdxFieldTypes::DOUBLE,
-           "Type Value DOUBLE Mismatch");
-
-    auto stringVal = pIPtr->getStringField("m_string");
-    ASSERT(stringVal == pdxobjPtr->getString(), "stringVal should be equal");
-    ASSERT(pIPtr->getFieldType("m_string") == PdxFieldTypes::STRING,
-           "Type Value STRING Mismatch");
-
-    auto stringArrayVal = pIPtr->getStringArrayField("m_stringArray");
-    ASSERT(pdxobjPtr->getStringArrayLength() ==
-               static_cast<int32_t>(stringArrayVal.size()),
-           "stringArrayLen should be equal");
-    ASSERT(pIPtr->getFieldType("m_stringArray") == PdxFieldTypes::STRING_ARRAY,
-           "Type Value STRING_ARRAY Mismatch");
-    auto strArray = pdxobjPtr->getStringArray();
-    for (size_t i = 0; i < stringArrayVal.size(); i++) {
-      ASSERT(strArray[i] == stringArrayVal[i],
-             "All stringVals should be equal");
-    }
-
-    auto byteArray = pIPtr->getByteArrayField("m_byteArray");
-    ASSERT(genericValCompare(pdxobjPtr->getByteArrayLength(),
-                             static_cast<int32_t>(byteArray.size())) == true,
-           "byteArrayLength should be equal");
-    ASSERT(genericCompare(pdxobjPtr->getByteArray(), byteArray,
-                          byteArray.size()) == true,
-           "byteArray should be equal");
-    ASSERT(pIPtr->getFieldType("m_byteArray") == PdxFieldTypes::BYTE_ARRAY,
-           "Type Value BYTE_ARRAY Mismatch");
-
-    auto charArray = pIPtr->getCharArrayField("m_charArray");
-    ASSERT(genericValCompare(pdxobjPtr->getCharArrayLength(),
-                             static_cast<int32_t>(charArray.size())) == true,
-           "charArrayLength should be equal");
-    ASSERT(genericCompare(pdxobjPtr->getCharArray(), charArray,
-                          charArray.size()) == true,
-           "charArray should be equal");
-    ASSERT(pIPtr->getFieldType("m_charArray") == PdxFieldTypes::CHAR_ARRAY,
-           "Type Value CHAR_ARRAY Mismatch");
-
-    byteArray = pIPtr->getByteArrayField("m_sbyteArray");
-    ASSERT(genericValCompare(pdxobjPtr->getByteArrayLength(),
-                             static_cast<int32_t>(byteArray.size())) == true,
-           "sbyteArrayLength should be equal");
-    ASSERT(genericCompare(pdxobjPtr->getSByteArray(), byteArray,
-                          byteArray.size()) == true,
-           "m_sbyteArray should be equal");
-    ASSERT(pIPtr->getFieldType("m_sbyteArray") == PdxFieldTypes::BYTE_ARRAY,
-           "Type Value BYTE_ARRAY Mismatch");
-
-    auto boolArray = pIPtr->getBooleanArrayField("m_boolArray");
-    auto boolArrayLength = boolArray.size();
-    ASSERT(genericValCompare(pdxobjPtr->getBoolArrayLength(),
-                             static_cast<int32_t>(boolArrayLength)) == true,
-           "boolArrayLength should be equal");
-    ASSERT(genericCompare(pdxobjPtr->getBoolArray(), boolArray,
-                          boolArrayLength) == true,
-           "boolArray should be equal");
-    ASSERT(pIPtr->getFieldType("m_boolArray") == PdxFieldTypes::BOOLEAN_ARRAY,
-           "Type Value BOOLEAN_ARRAY Mismatch");
-
-    auto shortArray = pIPtr->getShortArrayField("m_int16Array");
-    auto shortArrayLength = shortArray.size();
-    ASSERT(genericValCompare(pdxobjPtr->getShortArrayLength(),
-                             static_cast<int32_t>(shortArrayLength)) == true,
-           "shortArrayLength should be equal");
-    ASSERT(genericCompare(pdxobjPtr->getShortArray(), shortArray,
-                          shortArrayLength) == true,
-           "shortArray should be equal");
-    ASSERT(pIPtr->getFieldType("m_int16Array") == PdxFieldTypes::SHORT_ARRAY,
-           "Type Value SHORT_ARRAY Mismatch");
-
-    shortArray = pIPtr->getShortArrayField("m_uint16Array");
-    shortArrayLength = shortArray.size();
-    ASSERT(genericValCompare(pdxobjPtr->getShortArrayLength(),
-                             static_cast<int32_t>(shortArrayLength)) == true,
-           "shortArrayLength should be equal");
-    ASSERT(genericCompare(pdxobjPtr->getUInt16Array(), shortArray,
-                          shortArrayLength) == true,
-           "m_uint16Array should be equal");
-    ASSERT(pIPtr->getFieldType("m_uint16Array") == PdxFieldTypes::SHORT_ARRAY,
-           "Type Value SHORT_ARRAY Mismatch");
-
-    auto intArray = pIPtr->getIntArrayField("m_int32Array");
-    auto intArrayLength = intArray.size();
-    ASSERT(genericValCompare(pdxobjPtr->getIntArrayLength(),
-                             static_cast<int32_t>(intArrayLength)) == true,
-           "intArrayLength should be equal");
-    ASSERT(genericCompare(pdxobjPtr->getIntArray(), intArray, intArrayLength) ==
-               true,
-           "intArray should be equal");
-    ASSERT(pIPtr->getFieldType("m_int32Array") == PdxFieldTypes::INT_ARRAY,
-           "Type Value INT_ARRAY Mismatch");
-
-    intArray = pIPtr->getIntArrayField("m_uint32Array");
-    ASSERT(genericValCompare(pdxobjPtr->getIntArrayLength(),
-                             static_cast<int32_t>(intArrayLength)) == true,
-           "intArrayLength should be equal");
-    ASSERT(genericCompare(pdxobjPtr->getUIntArray(), intArray,
-                          intArrayLength) == true,
-           "m_uint32Array should be equal");
-    ASSERT(pIPtr->getFieldType("m_uint32Array") == PdxFieldTypes::INT_ARRAY,
-           "Type Value INT_ARRAY Mismatch");
-
-    auto longArray = pIPtr->getLongArrayField("m_longArray");
-    auto longArrayLength = longArray.size();
-    ASSERT(genericValCompare(pdxobjPtr->getLongArrayLength(),
-                             static_cast<int32_t>(longArrayLength)) == true,
-           "longArrayLength should be equal");
-    ASSERT(genericCompare(pdxobjPtr->getLongArray(), longArray,
-                          longArrayLength) == true,
-           "longArray should be equal");
-    ASSERT(pIPtr->getFieldType("m_longArray") == PdxFieldTypes::LONG_ARRAY,
-           "Type Value LONG_ARRAY Mismatch");
-
-    longArray = pIPtr->getLongArrayField("m_ulongArray");
-    longArrayLength = longArray.size();
-    ASSERT(genericValCompare(pdxobjPtr->getLongArrayLength(),
-                             static_cast<int32_t>(longArrayLength)) == true,
-           "longArrayLength should be equal");
-    ASSERT(genericCompare(pdxobjPtr->getULongArray(), longArray,
-                          longArrayLength) == true,
-           "m_ulongArray should be equal");
-    ASSERT(pIPtr->getFieldType("m_ulongArray") == PdxFieldTypes::LONG_ARRAY,
-           "Type Value LONG_ARRAY Mismatch");
-
-    auto doubleArray = pIPtr->getDoubleArrayField("m_doubleArray");
-    auto doubleArrayLength = doubleArray.size();
-    ASSERT(genericValCompare(pdxobjPtr->getDoubleArrayLength(),
-                             static_cast<int32_t>(doubleArrayLength)) == true,
-           "doubleArrayLength should be equal");
-    ASSERT(genericCompare(pdxobjPtr->getDoubleArray(), doubleArray,
-                          doubleArrayLength) == true,
-           "doubleArray should be equal");
-    ASSERT(pIPtr->getFieldType("m_doubleArray") == PdxFieldTypes::DOUBLE_ARRAY,
-           "Type Value DOUBLE_ARRAY Mismatch");
-
-    auto floatArray = pIPtr->getFloatArrayField("m_floatArray");
-    auto floatArrayLength = floatArray.size();
-    ASSERT(genericValCompare(pdxobjPtr->getFloatArrayLength(),
-                             static_cast<int32_t>(floatArrayLength)) == true,
-           "floatArrayLength should be equal");
-    ASSERT(genericCompare(pdxobjPtr->getFloatArray(), floatArray,
-                          floatArrayLength) == true,
-           "floatArray should be equal");
-    ASSERT(pIPtr->getFieldType("m_floatArray") == PdxFieldTypes::FLOAT_ARRAY,
-           "Type Value FLOAT_ARRAY Mismatch");
-
-    auto object = pIPtr->getCacheableField("m_pdxEnum");
-    ASSERT(object != nullptr, "enumObject should not be nullptr");
-    auto enumObject = std::dynamic_pointer_cast<CacheableEnum>(object);
-    ASSERT(
-        enumObject->getEnumOrdinal() == pdxobjPtr->getEnum()->getEnumOrdinal(),
-        "enumObject ordinal should be equal");
-    ASSERT(enumObject->getEnumClassName() ==
-               pdxobjPtr->getEnum()->getEnumClassName(),
-           "enumObject classname should be equal");
-    ASSERT(enumObject->getEnumName() == pdxobjPtr->getEnum()->getEnumName(),
-           "enumObject enumname should be equal");
-    ASSERT(pIPtr->getFieldType("m_pdxEnum") == PdxFieldTypes::OBJECT,
-           "Type Value OBJECT Mismatch");
-
-    auto dateObject = pIPtr->getCacheableDateField("m_dateTime");
-    ASSERT(dateObject != nullptr, "date should not be nullptr");
-    ASSERT((*(dateObject.get()) == *(pdxobjPtr->getDate().get())) == true,
-           "dateObject should be equal");
-    ASSERT(pIPtr->getFieldType("m_dateTime") == PdxFieldTypes::DATE,
-           "Type Value DATE Mismatch");
-
-    auto object2 = pIPtr->getCacheableField("m_map");
-    ASSERT(object2 != nullptr, "object2 should not be nullptr");
-    auto mapObject = std::dynamic_pointer_cast<CacheableHashMap>(object2);
-    ASSERT(genericValCompare(pdxobjPtr->getHashMap()->size(),
-                             mapObject->size()) == true,
-           "mapobject size should be equal");
-    ASSERT(pIPtr->getFieldType("m_map") == PdxFieldTypes::OBJECT,
-           "Type Value OBJECT Mismatch");
-
-    object2 = pIPtr->getCacheableField("m_vector");
-    ASSERT(object2 != nullptr, "object2 should not be nullptr");
-    auto vec = std::dynamic_pointer_cast<CacheableVector>(object2);
-    ASSERT(
-        genericValCompare(pdxobjPtr->getVector()->size(), vec->size()) == true,
-        "vec size should be equal");
-    ASSERT(pIPtr->getFieldType("m_vector") == PdxFieldTypes::OBJECT,
-           "Type Value OBJECT Mismatch");
-
-    object2 = pIPtr->getCacheableField("m_arraylist");
-    ASSERT(object2 != nullptr, "object2 should not be nullptr");
-    auto arrList = std::dynamic_pointer_cast<CacheableArrayList>(object2);
-    ASSERT(genericValCompare(pdxobjPtr->getArrayList()->size(),
-                             arrList->size()) == true,
-           "arrList size should be equal");
-    ASSERT(pIPtr->getFieldType("m_arraylist") == PdxFieldTypes::OBJECT,
-           "Type Value OBJECT Mismatch");
-
-    object2 = pIPtr->getCacheableField("m_chs");
-    ASSERT(object2 != nullptr, "object2 should not be nullptr");
-    auto hashSet = std::dynamic_pointer_cast<CacheableHashSet>(object2);
-    ASSERT(genericValCompare(pdxobjPtr->getHashSet()->size(),
-                             hashSet->size()) == true,
-           "hashSet size should be equal");
-    ASSERT(pIPtr->getFieldType("m_chs") == PdxFieldTypes::OBJECT,
-           "Type Value OBJECT Mismatch");
-
-    object2 = pIPtr->getCacheableField("m_clhs");
-    ASSERT(object2 != nullptr, "object2 should not be nullptr");
-    auto linkedHashSet =
-        std::dynamic_pointer_cast<CacheableLinkedHashSet>(object2);
-    ASSERT(genericValCompare(pdxobjPtr->getLinkedHashSet()->size(),
-                             linkedHashSet->size()) == true,
-           "linkedHashSet size should be equal");
-    ASSERT(pIPtr->getFieldType("m_clhs") == PdxFieldTypes::OBJECT,
-           "Type Value OBJECT Mismatch");
-
-    int8_t **byteByteArrayVal = nullptr;
-    int32_t byteArrayLen = 0;
-    int32_t *elementLength = nullptr;
-    pIPtr->getField("m_byteByteArray", &byteByteArrayVal, byteArrayLen,
-                    elementLength);
-    ASSERT(genericValCompare(pdxobjPtr->getbyteByteArrayLength(),
-                             byteArrayLen) == true,
-           "byteByteArrayLength should be equal");
-    int8_t **bytArray = pdxobjPtr->getArrayOfByteArrays();
-    ASSERT(generic2DCompare(byteByteArrayVal, bytArray, byteArrayLen,
-                            elementLength) == true,
-           "byteByteArray should be equal");
-    for (auto i = 0; i < byteArrayLen; i++) {
-      delete[] byteByteArrayVal[i];
-    }
-    delete[] byteByteArrayVal;
-    delete[] elementLength;
-    ASSERT(pIPtr->getFieldType("m_byteByteArray") ==
-               PdxFieldTypes::ARRAY_OF_BYTE_ARRAYS,
-           "Type Value ARRAY_OF_BYTE_ARRAYS Mismatch");
-
-    auto objectArray = pIPtr->getCacheableObjectArrayField("m_objectArray");
-    ASSERT(objectArray != nullptr, "objectArray should not be nullptr");
-    ASSERT(genericValCompare(pdxobjPtr->getCacheableObjectArray()->size(),
-                             objectArray->size()) == true,
-           "objectArray size should be equal");
-    ASSERT(pIPtr->getFieldType("m_objectArray") == PdxFieldTypes::OBJECT_ARRAY,
-           "Type Value OBJECT_ARRAY Mismatch");
-
-    auto objectArrayEmptyFieldName = pIPtr->getCacheableObjectArrayField("");
-    ASSERT(objectArrayEmptyFieldName != nullptr,
-           "objectArrayEmptyFieldName should not be nullptr");
-    ASSERT(genericValCompare(
-               pdxobjPtr->getCacheableObjectArrayEmptyPdxFieldName()->size(),
-               objectArrayEmptyFieldName->size()) == true,
-           "objectArrayEmptyFieldName size should be equal");
-
-    for (size_t i = 0; i < objectArray->size(); i++) {
-      auto pi = std::dynamic_pointer_cast<PdxInstance>(objectArray->at(i));
-      LOG("PdxInstancePtr obtained from CacheableObjectArray");
-
-      auto pdxFactory =
-          cacheHelper->getCache()->createPdxInstanceFactory("PdxTests.Address");
-      LOG("PdxInstanceFactoryPtr created for PdxTests.Address....");
-
-      pdxFactory.writeInt("_aptNumber", static_cast<int32_t>(i + 1));
-      char streetStr[256] = {0};
-      sprintf(streetStr, "street%zd", i);
-      pdxFactory.writeString("_street", streetStr);
-      char cityStr[256] = {0};
-      sprintf(cityStr, "city%zd", i);
-      pdxFactory.writeString("_city", cityStr);
-
-      auto addrPtr = std::dynamic_pointer_cast<Address>(pi->getObject());
-      LOG("AddressPtr created using PdxInstance getObject()....");
-      auto newAddrPtr = std::make_shared<Address>(static_cast<int32_t>(i + 1),
-                                                  streetStr, cityStr);
-      LOG("AddressPtr created using new....");
-      ASSERT(addrPtr->equals(*newAddrPtr) == true,
-             "Both PdxInstances should be equal.");
-
-      auto retPtr = pdxFactory.create();
-      LOG("PdxInstancePtr created....");
-
-      bool ret = false;
-      ret = (*pi == *retPtr);
-      LOGINFO("PdxObject ret = %d ", ret);
-      ASSERT(ret == true, "Both PdxInstances should be equal.");
-    }
-    LOGINFO("PdxInstancePtr for ParentPdx accessPdxInstance ");
-    pIPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport1));
-    LOGINFO("PdxInstancePtr for ParentPdx object got ");
-
-    auto childObjPtr = pIPtr->getCacheableField("m_childPdx");
-    ASSERT(childObjPtr != nullptr, "childObjPtr should not be nullptr");
-    LOGINFO("got childPdx field ");
-    auto cpi = std::dynamic_pointer_cast<PdxInstance>(childObjPtr);
-    LOGINFO("cast to pdxinstance done ");
-    auto cpo = std::dynamic_pointer_cast<ChildPdx>(cpi->getObject());
-    LOGINFO("got childPdx getObject ");
-    auto childpdxobjPtr = std::make_shared<ChildPdx>(1);
-    LOGINFO("created new childPdx");
-    ASSERT(cpo->equals(*childpdxobjPtr) == true, "child pdx should be equal");
-    LOG("accessPdxInstance complete");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, modifyPdxInstance)
-  {
-    LOG("modifyPdxInstance started ");
-
-    auto rptr = getHelper()->getRegion(regionNames[0]);
-    auto keyport = CacheableKey::create("pdxput");
-    auto keyport1 = CacheableKey::create("pdxput2");
-
-    auto pIPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    LOG("modifyPdxInstance get complete.");
-
-    std::shared_ptr<WritablePdxInstance> wpiPtr(pIPtr->createWriter());
-
-    ASSERT(pIPtr != nullptr, "pIPtr != nullptr expected");
-    int val = 0;
-    int newVal = 0;
-    ASSERT(pIPtr->hasField("m_int32") == true, "m_id1 = true expected");
-    val = pIPtr->getIntField("m_int32");
-    wpiPtr->setField("m_int32", val + 1);
-    rptr->put(keyport, wpiPtr);
-    auto newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_int32") == true, "m_int32 = true expected");
-    newVal = newPiPtr->getIntField("m_int32");
-    ASSERT(val + 1 == newVal, "val + 1 == newVal expected");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_int32", false);
-      FAIL(
-          "setField on m_int32 with bool value should throw expected "
-          "IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_int32 with bool value caught expected "
-          "IllegalStateException");
-    }
-
-    bool boolVal = true;
-    wpiPtr = pIPtr->createWriter();
-    wpiPtr->setField("m_bool", false);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_bool") == true, "m_bool = true expected");
-    boolVal = newPiPtr->getBooleanField("m_bool");
-    ASSERT(boolVal == false, "bool is not equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_bool", 500);
-      FAIL(
-          "setField on m_bool with int value should throw expected "
-          "IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_bool with int value caught expected "
-          "IllegalStateException");
-    }
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_char", 500.0);
-      FAIL(
-          "setField on m_char with float value should throw expected "
-          "IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_char with float value caught expected "
-          "IllegalStateException");
-    }
-
-    signed char byteVal = 0;
-    signed char setByteVal = 0x75;
-    wpiPtr = pIPtr->createWriter();
-    wpiPtr->setField("m_byte", setByteVal);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_byte") == true, "m_byte = true expected");
-    byteVal = newPiPtr->getByteField("m_byte");
-    ASSERT(byteVal == setByteVal, "byte is not equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    signed char setSByteVal = 0x57;
-    wpiPtr = pIPtr->createWriter();
-    wpiPtr->setField("m_sbyte", setSByteVal);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_sbyte") == true, "m_sbyte = true expected");
-    byteVal = newPiPtr->getByteField("m_sbyte");
-    ASSERT(byteVal == setSByteVal, "m_sbyte is not equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_byte", static_cast<int64_t>(0x56787878));
-      FAIL(
-          "setField on m_byte with int64_t value should throw expected "
-          "IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_byte with int64_t value caught expected "
-          "IllegalStateException");
-    }
-
-    int16_t shortVal = 0;
-    wpiPtr = pIPtr->createWriter();
-    wpiPtr->setField("m_int16", static_cast<int16_t>(0x5678));
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_int16") == true, "m_int16 = true expected");
-    shortVal = newPiPtr->getShortField("m_int16");
-    ASSERT(shortVal == 0x5678, "short is not equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_int16", static_cast<int64_t>(0x56787878));
-      FAIL(
-          "setField on m_int16 with int64_t value should throw expected "
-          "IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_int16 with int64_t value caught expected "
-          "IllegalStateException");
-    }
-
-    int64_t longVal = 0;
-    wpiPtr = pIPtr->createWriter();
-    wpiPtr->setField("m_long", static_cast<int64_t>(0x56787878));
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_long") == true, "m_long = true expected");
-    longVal = newPiPtr->getLongField("m_long");
-    ASSERT(longVal == 0x56787878, "long is not equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_long", 18389.34f);
-      FAIL(
-          "setField on m_long with float value should throw expected "
-          "IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_long with float value caught expected "
-          "IllegalStateException");
-    }
-
-    float fVal = 0.0f;
-    wpiPtr = pIPtr->createWriter();
-    wpiPtr->setField("m_float", 18389.34f);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_float") == true, "m_float = true expected");
-    fVal = newPiPtr->getFloatField("m_float");
-    ASSERT(fVal == 18389.34f, "fval is not equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_float", 'D');
-      FAIL(
-          "setField on m_float with char value should throw expected "
-          "IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_float with char value caught expected "
-          "IllegalStateException");
-    }
-
-    double dVal = 0.0;
-    wpiPtr = pIPtr->createWriter();
-    wpiPtr->setField("m_double", 18389.34);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_double") == true, "m_double = true expected");
-    dVal = newPiPtr->getDoubleField("m_double");
-    ASSERT(dVal == 18389.34, "dval is not equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_double", 'D');
-      FAIL(
-          "setField on m_double with char value should throw expected "
-          "IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_double with char value caught expected "
-          "IllegalStateException");
-    }
-
-    std::vector<bool> setBoolArray{true, false, true,  false,
-                                   true, true,  false, true};
-    wpiPtr->setField("m_boolArray", setBoolArray);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_boolArray") == true,
-           "m_boolArray = true expected");
-    auto getBoolArray = newPiPtr->getBooleanArrayField("m_boolArray");
-    ASSERT(getBoolArray.size() == 8, "Arraylength == 8 expected");
-    ASSERT(
-        genericCompare(setBoolArray, getBoolArray, getBoolArray.size()) == true,
-        "boolArray should be equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_boolArray", 'D');
-      FAIL(
-          "setField on m_boolArray with char value should throw expected "
-          "IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_boolArray with char value caught expected "
-          "IllegalStateException");
-    }
-
-    std::vector<int8_t> setByteArray{0x34, 0x64, 0x34, 0x64};
-    wpiPtr->setField("m_byteArray", setByteArray);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_byteArray") == true,
-           "m_byteArray = true expected");
-    auto getByteArray = newPiPtr->getByteArrayField("m_byteArray");
-    ASSERT(getByteArray.size() == 4, "Arraylength == 4 expected");
-    ASSERT(
-        genericCompare(setByteArray, getByteArray, getByteArray.size()) == true,
-        "byteArray should be equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_byteArray", "string");
-      FAIL(
-          "setField on m_byteArray with string value should throw expected "
-          "IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_byteArray with string value caught expected "
-          "IllegalStateException");
-    }
-
-    std::vector<char16_t> setCharArray{'c', 'v', 'c', 'v'};
-    wpiPtr->setField("m_charArray", setCharArray);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_charArray") == true,
-           "m_charArray = true expected");
-    auto getCharArray = newPiPtr->getCharArrayField("m_charArray");
-    ASSERT(getCharArray.size() == 4, "Arraylength == 4 expected");
-    ASSERT(
-        genericCompare(setCharArray, getCharArray, getCharArray.size()) == true,
-        "charArray should be equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_charArray", "string");
-      FAIL(
-          "setField on m_charArray with string value should throw expected "
-          "IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_charArray with string value caught expected "
-          "IllegalStateException");
-    }
-
-    std::vector<int16_t> setShortArray{0x2332, 0x4545, 0x88, 0x898};
-    wpiPtr->setField("m_int16Array", setShortArray);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_int16Array") == true,
-           "m_int16Array = true expected");
-    auto getShortArray = newPiPtr->getShortArrayField("m_int16Array");
-    ASSERT(getShortArray.size() == 4, "Arraylength == 4 expected");
-    ASSERT(genericCompare(setShortArray, getShortArray, getShortArray.size()) ==
-               true,
-           "shortArray should be equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_int16Array", setCharArray);
-      FAIL(
-          "setField on m_int16Array with setCharArray value should throw "
-          "expected IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_int16Array with setCharArray value caught expected "
-          "IllegalStateException");
-    }
-
-    std::vector<int32_t> setIntArray{23, 676868, 34343};
-    wpiPtr->setField("m_int32Array", setIntArray);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_int32Array") == true,
-           "m_int32Array = true expected");
-    auto newValArray = newPiPtr->getIntArrayField("m_int32Array");
-    ASSERT(newValArray.size() == 3, "Arraylength == 3 expected");
-    ASSERT(genericCompare(setIntArray, newValArray, newValArray.size()) == true,
-           "intArray should be equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_int32Array", setShortArray);
-      FAIL(
-          "setField on m_int32Array with setShortArray value should throw "
-          "expected IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_int32Array with setShortArray value caught expected "
-          "IllegalStateException");
-    }
-
-    std::vector<int64_t> setLongArray{3245435, 3425435};
-    wpiPtr->setField("m_longArray", setLongArray);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_longArray") == true,
-           "m_longArray = true expected");
-    auto getLongArray = newPiPtr->getLongArrayField("m_longArray");
-    ASSERT(getLongArray.size() == 2, "Arraylength == 2 expected");
-    ASSERT(
-        genericCompare(setLongArray, getLongArray, getLongArray.size()) == true,
-        "longArray should be equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_longArray", setIntArray);
-      FAIL(
-          "setField on m_longArray with setIntArray value should throw "
-          "expected "
-          "IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_longArray with setIntArray value caught expected "
-          "IllegalStateException");
-    }
-
-    std::vector<float> setFloatArray{232.565f, 234323354.67f};
-    wpiPtr->setField("m_floatArray", setFloatArray);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_floatArray") == true,
-           "m_floatArray = true expected");
-    auto getFloatArray = newPiPtr->getFloatArrayField("m_floatArray");
-    ASSERT(getFloatArray.size() == 2, "Arraylength == 2 expected");
-    ASSERT(genericCompare(setFloatArray, getFloatArray, getFloatArray.size()) ==
-               true,
-           "floatArray should be equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_floatArray", setLongArray);
-      FAIL(
-          "setField on m_floatArray with setLongArray value should throw "
-          "expected IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_floatArray with setLongArray value caught expected "
-          "IllegalStateException");
-    }
-
-    std::vector<double> setDoubleArray{23423432.00, 43242354315.00};
-    wpiPtr->setField("m_doubleArray", setDoubleArray);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_doubleArray") == true,
-           "m_doubleArray = true expected");
-    auto getDoubleArray = newPiPtr->getDoubleArrayField("m_doubleArray");
-    ASSERT(getDoubleArray.size() == 2, "Arraylength == 2 expected");
-    ASSERT(genericCompare(setDoubleArray, getDoubleArray,
-                          getDoubleArray.size()) == true,
-           "doubleArray should be equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_doubleArray", setFloatArray);
-      FAIL(
-          "setField on m_doubleArray with setFloatArray value should throw "
-          "expected IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_doubleArray with setFloatArray value caught expected "
-          "IllegalStateException");
-    }
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_string", setFloatArray);
-      FAIL(
-          "setField on m_string with setFloatArray value should throw expected "
-          "IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_string with setFloatArray value caught expected "
-          "IllegalStateException");
-    }
-
-    std::string setString = "change the string";
-    wpiPtr->setField("m_string", setString);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(pIPtr->hasField("m_string") == true, "m_string = true expected");
-    ASSERT(newPiPtr->hasField("m_string") == true, "m_string = true expected");
-    auto stringVal = newPiPtr->getStringField("m_string");
-    ASSERT(stringVal == setString, "stringVal should be equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    std::shared_ptr<CacheableDate> dateVal;
-    wpiPtr = pIPtr->createWriter();
-    time_t timeofday = 0;
-    const ACE_Time_Value currentTime = ACE_OS::gettimeofday();
-    timeofday = currentTime.sec();
-    auto datePtr = CacheableDate::create(timeofday);
-    wpiPtr->setField("m_dateTime", datePtr);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_dateTime") == true,
-           "m_dateTime = true expected");
-    ASSERT(pIPtr->hasField("m_dateTime") == true, "m_date = true expected");
-    dateVal = newPiPtr->getCacheableDateField("m_dateTime");
-    ASSERT((*dateVal == *datePtr) == true, "dateObject should be equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_dateTime", setString);
-      FAIL(
-          "setField on m_dateTime with setString value should throw expected "
-          "IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_dateTime with setString value caught expected "
-          "IllegalStateException");
-    }
-
-    std::shared_ptr<Cacheable> object;
-    wpiPtr = pIPtr->createWriter();
-    auto setVec = CacheableVector::create();
-    setVec->push_back(CacheableInt32::create(3));
-    setVec->push_back(CacheableInt32::create(4));
-    wpiPtr->setField("m_vector", setVec);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_vector") == true, "m_vector = true expected");
-    ASSERT(pIPtr->hasField("m_vector") == true, "m_vector = true expected");
-    object = newPiPtr->getCacheableField("m_vector");
-    auto vecVal = std::dynamic_pointer_cast<CacheableVector>(object);
-    ASSERT(genericValCompare(setVec->size(), vecVal->size()) == true,
-           "vec size should be equal");
-    for (size_t j = 0; j < vecVal->size(); j++) {
-      genericValCompare(setVec->at(j), vecVal->at(j));
-    }
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_vector", setString);
-      FAIL(
-          "setField on m_vector with setString value should throw expected "
-          "IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_vector with setString value caught expected "
-          "IllegalStateException");
-    }
-
-    wpiPtr = pIPtr->createWriter();
-    auto setarr = CacheableArrayList::create();
-    setarr->push_back(CacheableInt32::create(3));
-    setarr->push_back(CacheableInt32::create(4));
-    setarr->push_back(CacheableInt32::create(5));
-    wpiPtr->setField("m_arraylist", setarr);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_arraylist") == true,
-           "m_arraylist = true expected");
-    ASSERT(pIPtr->hasField("m_arraylist") == true,
-           "m_arraylist = true expected");
-    object = newPiPtr->getCacheableField("m_arraylist");
-    auto arrVal = std::dynamic_pointer_cast<CacheableArrayList>(object);
-    ASSERT(genericValCompare(setarr->size(), arrVal->size()) == true,
-           "arrList size should be equal");
-    for (size_t j = 0; j < arrVal->size(); j++) {
-      genericValCompare(setarr->at(j), arrVal->at(j));
-    }
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_arraylist", setFloatArray);
-      FAIL(
-          "setField on m_arraylist with setFloatArray value should throw "
-          "expected IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_arraylist with setFloatArray value caught expected "
-          "IllegalStateException");
-    }
-
-    wpiPtr = pIPtr->createWriter();
-    auto hashset = CacheableHashSet::create();
-    hashset->insert(CacheableInt32::create(3));
-    hashset->insert(CacheableInt32::create(4));
-    hashset->insert(CacheableInt32::create(5));
-    wpiPtr->setField("m_chs", hashset);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_chs") == true, "m_chs = true expected");
-    ASSERT(pIPtr->hasField("m_chs") == true, "m_chs = true expected");
-    object = newPiPtr->getCacheableField("m_chs");
-    auto hashsetVal = std::dynamic_pointer_cast<CacheableHashSet>(object);
-    ASSERT(genericValCompare(hashset->size(), hashsetVal->size()) == true,
-           "m_chs size should be equal");
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_chs", 100);
-      FAIL(
-          "setField on m_chs with int value should throw expected "
-          "IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_chs with int value caught expected "
-          "IllegalStateException");
-    }
-
-    wpiPtr = pIPtr->createWriter();
-    auto hashmap = CacheableHashMap::create();
-    hashmap->emplace(CacheableInt32::create(3), CacheableInt32::create(3));
-    hashmap->emplace(CacheableInt32::create(4), CacheableInt32::create(4));
-    hashmap->emplace(CacheableInt32::create(5), CacheableInt32::create(5));
-    wpiPtr->setField("m_map", hashmap);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_map") == true, "m_map = true expected");
-    ASSERT(pIPtr->hasField("m_map") == true, "m_map = true expected");
-    object = newPiPtr->getCacheableField("m_map");
-    auto hashmapVal = std::dynamic_pointer_cast<CacheableHashMap>(object);
-    ASSERT(genericValCompare(hashmap->size(), hashmapVal->size()) == true,
-           "m_map size should be equal");
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_map", 0.0f);
-      FAIL(
-          "setField on m_map with float value should throw expected "
-          "IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_map with float value caught expected "
-          "IllegalStateException");
-    }
-
-    wpiPtr = pIPtr->createWriter();
-    auto linkedhashset = CacheableLinkedHashSet::create();
-    linkedhashset->insert(CacheableInt32::create(3));
-    linkedhashset->insert(CacheableInt32::create(4));
-    linkedhashset->insert(CacheableInt32::create(5));
-    wpiPtr->setField("m_clhs", linkedhashset);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(newPiPtr->hasField("m_clhs") == true, "m_clhs = true expected");
-    ASSERT(pIPtr->hasField("m_clhs") == true, "m_clhs = true expected");
-    object = newPiPtr->getCacheableField("m_clhs");
-    auto linkedhashsetVal =
-        std::dynamic_pointer_cast<CacheableLinkedHashSet>(object);
-    ASSERT(genericValCompare(linkedhashsetVal->size(), linkedhashset->size()) ==
-               true,
-           "m_clhs size should be equal");
-
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_clhs", 'c');
-      FAIL(
-          "setField on m_clhs with char value should throw expected "
-          "IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_clhs with char value caught expected "
-          "IllegalStateException");
-    }
-
-    LOGINFO("Testing byteByteArray");
-    int8_t **getbyteByteArray = nullptr;
-    int byteByteArrayLength = 0;
-    int32_t *elementLength = nullptr;
-    int8_t **setbyteByteArray = new int8_t *[4];
-    setbyteByteArray[0] = new int8_t[1];
-    setbyteByteArray[1] = new int8_t[2];
-    setbyteByteArray[2] = new int8_t[1];
-    setbyteByteArray[3] = new int8_t[2];
-    setbyteByteArray[0][0] = 0x23;
-    setbyteByteArray[1][0] = 0x34;
-    setbyteByteArray[1][1] = 0x55;
-    setbyteByteArray[2][0] = 0x23;
-    setbyteByteArray[3][0] = 0x34;
-    setbyteByteArray[3][1] = 0x55;
-    wpiPtr = pIPtr->createWriter();
-    int lengthArr[4];
-    lengthArr[0] = 1;
-    lengthArr[1] = 2;
-    lengthArr[2] = 1;
-    lengthArr[3] = 2;
-    wpiPtr->setField("m_byteByteArray", setbyteByteArray, 4, lengthArr);
-    LOGINFO("Testing byteByteArray setField");
-    rptr->put(keyport, wpiPtr);
-    LOGINFO("Testing byteByteArray put");
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    LOGINFO("Testing byteByteArray get");
-    ASSERT(newPiPtr->hasField("m_byteByteArray") == true,
-           "m_byteByteArray = true expected");
-    LOGINFO("Testing byteByteArray hasField");
-    ASSERT(pIPtr->hasField("m_byteByteArray") == true,
-           "m_byteByteArray = true expected");
-    newPiPtr->getField("m_byteByteArray", &getbyteByteArray,
-                       byteByteArrayLength, elementLength);
-    LOGINFO("Testing byteByteArray getField");
-    ASSERT(genericValCompare(4, byteByteArrayLength) == true,
-           "byteByteArrayLength should be equal");
-    ASSERT(generic2DCompare(getbyteByteArray, setbyteByteArray,
-                            byteByteArrayLength, elementLength) == true,
-           "byteByteArray should be equal");
-    for (auto i = 0; i < byteByteArrayLength; i++) {
-      delete[] getbyteByteArray[i];
-      delete[] setbyteByteArray[i];
-    }
-    delete[] getbyteByteArray;
-    delete[] setbyteByteArray;
-    delete[] elementLength;
-    wpiPtr = pIPtr->createWriter();
-    try {
-      wpiPtr->setField("m_byteByteArray", linkedhashset);
-      FAIL(
-          "setField on m_byteByteArray with linkedhashset value should throw "
-          "expected IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("setField on m_byteByteArray with linkedhashset value caught "
-          "expected "
-          "IllegalStateException");
-    }
-
-    std::vector<std::string> setStringArray = {"test1", "test2", "test3"};
-    wpiPtr->setField("m_stringArray", setStringArray.data(), 3);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    auto getStringArray = newPiPtr->getStringArrayField("m_stringArray");
-    ASSERT(getStringArray.size() == 3, "Arraylength == 3 expected");
-    for (size_t i = 0; i < getStringArray.size(); i++) {
-      LOGINFO("set string is %s ", setStringArray[i].c_str());
-      LOGINFO("get string is %s ", getStringArray[i].c_str());
-      ASSERT(setStringArray[i] == getStringArray[i],
-             "All stringVals should be equal");
-    }
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    LOGINFO("PdxInstancePtr for ParentPdx modifyPdxInstance ");
-    pIPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport1));
-    LOGINFO("PdxInstancePtr for ParentPdx object got ");
-
-    auto childObjPtr = pIPtr->getCacheableField("m_childPdx");
-    ASSERT(childObjPtr != nullptr, "childObjPtr should not be nullptr");
-    LOGINFO("got childPdx field ");
-    auto cpi = std::dynamic_pointer_cast<PdxInstance>(childObjPtr);
-    LOGINFO("cast to pdxinstance done ");
-    wpiPtr = pIPtr->createWriter();
-    auto childpdxobjPtr = std::make_shared<ChildPdx>(2);
-    LOGINFO("created new childPdx");
-    wpiPtr->setField("m_childPdx", childpdxobjPtr);
-    LOGINFO("childPdx seField done");
-    rptr->put(keyport1, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport1));
-    LOGINFO("ChildPdx object put get done");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-    childObjPtr = newPiPtr->getCacheableField("m_childPdx");
-    ASSERT(childObjPtr != nullptr, "childObjPtr should not be nullptr");
-    LOGINFO("got childPdx field ");
-    auto cpi1 = std::dynamic_pointer_cast<PdxInstance>(childObjPtr);
-    ASSERT((*cpi == *cpi1) == false, "PdxInstance should not be equal");
-
-    auto cpo = std::dynamic_pointer_cast<ChildPdx>(cpi1->getObject());
-    LOGINFO("got childPdx getObject ");
-    ASSERT(cpo->equals(*childpdxobjPtr) == true, "child pdx should be equal");
-
-    char16_t parentCharSetVal = 'Z';
-    wpiPtr = pIPtr->createWriter();
-    wpiPtr->setField("m_char", parentCharSetVal);
-    rptr->put(keyport1, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport1));
-    ASSERT(newPiPtr->hasField("m_char") == true, "m_char = true expected");
-    auto parentCharVal = newPiPtr->getCharField("m_char");
-    ASSERT(parentCharVal == parentCharSetVal, "char is not equal");
-
-    std::vector<char16_t> setParentCharArray{'c', 'v', 'c', 'v'};
-    wpiPtr->setField("m_charArray", setParentCharArray);
-    rptr->put(keyport1, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport1));
-    ASSERT(newPiPtr->hasField("m_charArray") == true,
-           "m_charArray = true expected");
-    auto getParentCharArray = newPiPtr->getCharArrayField("m_charArray");
-    ASSERT(getParentCharArray.size() == 4, "Arraylength == 4 expected");
-    ASSERT(genericCompare(setParentCharArray, getParentCharArray,
-                          getParentCharArray.size()) == true,
-           "charArray should be equal");
-    LOG("modifyPdxInstance complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, modifyPdxInstanceAndCheckLocally)
-  {
-    LOG("modifyPdxInstanceAndCheckLocally started ");
-
-    auto rptr = getHelper()->getRegion(regionNames[0]);
-    auto keyport = CacheableKey::create("pdxput");
-
-    auto pIPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    LOG("modifyPdxInstanceAndCheckLocally get complete.");
-
-    LOG("Statistics for for (PdxTests.PdxType) PdxInstance ");
-    LocalRegion *lregPtr = (dynamic_cast<LocalRegion *>(rptr.get()));
-
-    LOGINFO(
-        "pdxInstanceDeserializations for (PdxTests.PdxType) PdxInstance  = %d ",
-        lregPtr->getCacheImpl()
-            ->getCachePerfStats()
-            .getPdxInstanceDeserializations());
-    LOGINFO(
-        "pdxInstanceCreations for (PdxTests.PdxType) PdxInstance  = %d ",
-        lregPtr->getCacheImpl()->getCachePerfStats().getPdxInstanceCreations());
-    LOGINFO(
-        "pdxInstanceDeserializationTime for(PdxTests.PdxType) PdxInstance  = "
-        "%d ",
-        lregPtr->getCacheImpl()
-            ->getCachePerfStats()
-            .getPdxInstanceDeserializationTime());
-
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceDeserializations() == 0,
-           "pdxInstanceDeserialization should be equal to 0.");
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceCreations() == 1,
-           "pdxInstanceCreations should be equal to 1.");
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceDeserializationTime() > 0,
-           "pdxInstanceDeserializationTime should be greater than 0.");
-
-    std::shared_ptr<WritablePdxInstance> wpiPtr(pIPtr->createWriter());
-
-    ASSERT(pIPtr != nullptr, "pIPtr != nullptr expected");
-    int val = 0;
-    int newVal = 0;
-    ASSERT(pIPtr->hasField("m_int32") == true, "m_int32 = true expected");
-    val = pIPtr->getIntField("m_int32");
-    LOGINFO("PdxInstance val is %d ", val);
-    ASSERT(val == 591768540, "val = 591768540 expected");
-
-    wpiPtr->setField("m_int32", val + 1);
-    rptr->put(keyport, wpiPtr);
-    LOG("modifyPdxInstanceAndCheckLocally put complete.");
-    auto newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    LOG("modifyPdxInstanceAndCheckLocally get complete.");
-    ASSERT(newPiPtr->hasField("m_int32") == true, "m_id1 = true expected");
-    newVal = newPiPtr->getIntField("m_int32");
-    LOGINFO("PdxInstance newVal is %d ", newVal);
-    ASSERT(val + 1 == newVal, "val + 1 == newVal expected");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    std::vector<bool> setBoolArray{true, false, true,  false,
-                                   true, true,  false, true};
-    wpiPtr->setField("m_boolArray", setBoolArray);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(pIPtr->hasField("m_boolArray") == true,
-           "m_boolArray = true expected");
-    auto getBoolArray = newPiPtr->getBooleanArrayField("m_boolArray");
-    auto arrayLen = getBoolArray.size();
-    ASSERT(arrayLen == 8, "Arraylength == 8 expected");
-    ASSERT(genericCompare(setBoolArray, getBoolArray, arrayLen) == true,
-           "boolArray should be equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    std::vector<int8_t> setByteArray{0x34, 0x64, 0x34, 0x64};
-    wpiPtr->setField("m_byteArray", setByteArray);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(pIPtr->hasField("m_byteArray") == true,
-           "m_byteArray = true expected");
-    auto getByteArray = newPiPtr->getByteArrayField("m_byteArray");
-    arrayLen = getByteArray.size();
-    ASSERT(arrayLen == 4, "Arraylength == 4 expected");
-    ASSERT(genericCompare(setByteArray, getByteArray, arrayLen) == true,
-           "byteArray should be equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    std::vector<int16_t> setShortArray{0x2332, 0x4545, 0x88, 0x898};
-    wpiPtr->setField("m_int16Array", setShortArray);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(pIPtr->hasField("m_int16Array") == true,
-           "m_int16Array = true expected");
-    auto getShortArray = newPiPtr->getShortArrayField("m_int16Array");
-    arrayLen = getShortArray.size();
-    ASSERT(arrayLen == 4, "Arraylength == 4 expected");
-    ASSERT(genericCompare(setShortArray, getShortArray, arrayLen) == true,
-           "shortArray should be equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    std::vector<int32_t> setIntArray{23, 676868, 34343};
-    wpiPtr->setField("m_int32Array", setIntArray);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(pIPtr->hasField("m_int32Array") == true,
-           "m_int32Array = true expected");
-    auto newValArray = newPiPtr->getIntArrayField("m_int32Array");
-    arrayLen = newValArray.size();
-    ASSERT(arrayLen == 3, "Arraylength == 3 expected");
-    ASSERT(genericCompare(setIntArray, newValArray, arrayLen) == true,
-           "intArray should be equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    std::vector<int64_t> setLongArray{3245435, 3425435};
-    wpiPtr->setField("m_longArray", setLongArray);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(pIPtr->hasField("m_longArray") == true,
-           "m_longArray = true expected");
-    auto getLongArray = newPiPtr->getLongArrayField("m_longArray");
-    arrayLen = getLongArray.size();
-    ASSERT(arrayLen == 2, "Arraylength == 2 expected");
-    ASSERT(genericCompare(setLongArray, getLongArray, arrayLen) == true,
-           "longArray should be equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    std::vector<float> setFloatArray{232.565f, 234323354.67f};
-    wpiPtr->setField("m_floatArray", setFloatArray);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(pIPtr->hasField("m_floatArray") == true,
-           "m_floatArray = true expected");
-    auto getFloatArray = newPiPtr->getFloatArrayField("m_floatArray");
-    arrayLen = getFloatArray.size();
-    ASSERT(arrayLen == 2, "Arraylength == 2 expected");
-    ASSERT(genericCompare(setFloatArray, getFloatArray, arrayLen) == true,
-           "floatArray should be equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    std::vector<double> setDoubleArray{23423432.00, 43242354315.00};
-    wpiPtr->setField("m_doubleArray", setDoubleArray);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(pIPtr->hasField("m_doubleArray") == true,
-           "m_doubleArray = true expected");
-    auto getDoubleArray = newPiPtr->getDoubleArrayField("m_doubleArray");
-    arrayLen = getDoubleArray.size();
-    ASSERT(arrayLen == 2, "Arraylength == 2 expected");
-    ASSERT(genericCompare(setDoubleArray, getDoubleArray, arrayLen) == true,
-           "doubleArray should be equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    bool boolVal = true;
-    wpiPtr = pIPtr->createWriter();
-    wpiPtr->setField("m_bool", false);
-    LOG("modifyPdxInstanceAndCheckLocally setField bool done.");
-    rptr->put(keyport, wpiPtr);
-    LOG("modifyPdxInstanceAndCheckLocally put again complete.");
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(pIPtr->hasField("m_bool") == true, "m_bool = true expected");
-    LOG("modifyPdxInstanceAndCheckLocally get again complete.");
-    boolVal = newPiPtr->getBooleanField("m_bool");
-    LOG("modifyPdxInstanceAndCheckLocally getField complete.");
-    ASSERT(boolVal == false, "bool is not equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    wpiPtr = pIPtr->createWriter();
-    wpiPtr->setField("m_bool", true);
-    LOG("modifyPdxInstanceAndCheckLocally setField bool done.");
-    rptr->put(keyport, wpiPtr);
-    LOG("modifyPdxInstanceAndCheckLocally put again complete.");
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(pIPtr->hasField("m_bool") == true, "m_bool = true expected");
-    LOG("modifyPdxInstanceAndCheckLocally get again complete.");
-    boolVal = newPiPtr->getBooleanField("m_bool");
-    LOG("modifyPdxInstanceAndCheckLocally getField complete.");
-    ASSERT(boolVal == true, "bool is not equal");
-    ASSERT((*pIPtr == *newPiPtr) == true, "PdxInstance should be equal");
-
-    float fVal = 0.0f;
-    wpiPtr = pIPtr->createWriter();
-    wpiPtr->setField("m_float", 18389.34f);
-    LOG("modifyPdxInstanceAndCheckLocally setField float done.");
-    rptr->put(keyport, wpiPtr);
-    LOG("modifyPdxInstanceAndCheckLocally put again complete.");
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(pIPtr->hasField("m_float") == true, "m_float = true expected");
-    LOG("modifyPdxInstanceAndCheckLocally get again complete.");
-    fVal = newPiPtr->getFloatField("m_float");
-    LOGINFO("modifyPdxInstanceAndCheckLocally getField complete. fval = %f",
-            fVal);
-    ASSERT(fVal == 18389.34f, "fval is not equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    double dVal = 0.0;
-    wpiPtr = pIPtr->createWriter();
-    wpiPtr->setField("m_double", 18389.34);
-    LOG("modifyPdxInstanceAndCheckLocally setField float done.");
-    rptr->put(keyport, wpiPtr);
-    LOG("modifyPdxInstanceAndCheckLocally put again complete.");
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(pIPtr->hasField("m_double") == true, "m_double = true expected");
-    LOG("modifyPdxInstanceAndCheckLocally get again complete.");
-    dVal = newPiPtr->getDoubleField("m_double");
-    LOGINFO("modifyPdxInstanceAndCheckLocally getField complete. fval = %lf",
-            dVal);
-    ASSERT(dVal == 18389.34, "fval is not equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    signed char byteVal = 0;
-    signed char setSByteVal = 0x74;
-    wpiPtr = pIPtr->createWriter();
-    wpiPtr->setField("m_byte", setSByteVal);
-    LOG("modifyPdxInstanceAndCheckLocally setField byte done.");
-    rptr->put(keyport, wpiPtr);
-    LOG("modifyPdxInstanceAndCheckLocally put again complete.");
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(pIPtr->hasField("m_byte") == true, "m_byte = true expected");
-    LOG("modifyPdxInstanceAndCheckLocally get again complete.");
-    byteVal = newPiPtr->getByteField("m_byte");
-    LOGINFO("modifyPdxInstanceAndCheckLocally getField complete byteVal = %d ",
-            byteVal);
-    ASSERT(byteVal == setSByteVal, "byte is not equal");
-    ASSERT((*pIPtr == *newPiPtr) == true, "PdxInstance should be equal");
-
-    int16_t shortVal = 0;
-    wpiPtr = pIPtr->createWriter();
-    wpiPtr->setField("m_int16", static_cast<int16_t>(0x5678));
-    LOG("modifyPdxInstanceAndCheckLocally setField short done.");
-    rptr->put(keyport, wpiPtr);
-    LOG("modifyPdxInstanceAndCheckLocally put again complete.");
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(pIPtr->hasField("m_int16") == true, "m_int16 = true expected");
-    LOG("modifyPdxInstanceAndCheckLocally get again complete.");
-    shortVal = newPiPtr->getShortField("m_int16");
-    LOGINFO("modifyPdxInstanceAndCheckLocally getField complete shortVal = %d ",
-            shortVal);
-    ASSERT(shortVal == 0x5678, "short is not equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    int64_t longVal = 0;
-    wpiPtr = pIPtr->createWriter();
-    wpiPtr->setField("m_long", static_cast<int64_t>(0x56787878));
-    LOG("modifyPdxInstanceAndCheckLocally setField short done.");
-    rptr->put(keyport, wpiPtr);
-    LOG("modifyPdxInstanceAndCheckLocally put again complete.");
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(pIPtr->hasField("m_long") == true, "m_long = true expected");
-    LOG("modifyPdxInstanceAndCheckLocally get again complete.");
-    longVal = newPiPtr->getLongField("m_long");
-    LOGINFO("modifyPdxInstanceAndCheckLocally getField complete longVal = %ld ",
-            longVal);
-    ASSERT(longVal == 0x56787878, "long is not equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    std::string str1 = "change the string";
-    wpiPtr->setField("m_string", str1);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(pIPtr->hasField("m_string") == true, "m_string = true expected");
-    LOG("modifyPdxInstanceAndCheckLocally get string complete.");
-    auto getstringVal = newPiPtr->getStringField("m_string");
-    LOGINFO("modifyPdxInstanceAndCheckLocally getstringVal = %s , str1 = %s ",
-            getstringVal.c_str(), str1.c_str());
-    ASSERT(getstringVal == str1, "getstringVal should be equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    std::shared_ptr<CacheableDate> dateVal;
-    wpiPtr = pIPtr->createWriter();
-    time_t timeofday = 0;
-    const ACE_Time_Value currentTime = ACE_OS::gettimeofday();
-    timeofday = currentTime.sec();
-    auto datePtr = CacheableDate::create(timeofday);
-    wpiPtr->setField("m_dateTime", datePtr);
-    rptr->put(keyport, wpiPtr);
-    newPiPtr = std::dynamic_pointer_cast<PdxInstance>(rptr->get(keyport));
-    ASSERT(pIPtr->hasField("m_dateTime") == true, "m_date = true expected");
-    dateVal = newPiPtr->getCacheableDateField("m_dateTime");
-    ASSERT((*(dateVal.get()) == *(datePtr.get())) == true,
-           "dateObject should be equal");
-    ASSERT((*pIPtr == *newPiPtr) == false, "PdxInstance should not be equal");
-
-    LOG("modifyPdxInstanceAndCheckLocally complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, pdxIFPutGetTest)
-  {
-    LOG("pdxIFPutGetTest started ");
-    auto serializationRegistry =
-        CacheRegionHelper::getCacheImpl(cacheHelper->getCache().get())
-            ->getSerializationRegistry();
-    try {
-      serializationRegistry->addPdxSerializableType(
-          Address::createDeserializable);
-      LOG("Address Registered Successfully....");
-    } catch (apache::geode::client::IllegalStateException & /* ex*/) {
-      LOG("Address IllegalStateException");
-    }
-
-    try {
-      serializationRegistry->addPdxSerializableType(
-          PdxTests::PdxType::createDeserializable);
-      LOG("PdxObject Registered Successfully....");
-    } catch (apache::geode::client::IllegalStateException & /* ex*/) {
-      LOG("PdxObject IllegalStateException");
-    }
-
-    try {
-      serializationRegistry->addPdxSerializableType(
-          ChildPdx::createDeserializable);
-      LOG("ChildPdx Registered Successfully....");
-    } catch (apache::geode::client::IllegalStateException & /* ex*/) {
-      LOG("ChildPdx IllegalStateException");
-    }
-
-    try {
-      serializationRegistry->addPdxSerializableType(
-          ParentPdx::createDeserializable);
-      LOG("ParentPdx Registered Successfully....");
-    } catch (apache::geode::client::IllegalStateException & /* ex*/) {
-      LOG("ParentPdx IllegalStateException");
-    }
-
-    auto rptr = getHelper()->getRegion(regionNames[0]);
-
-    auto pdxobj = std::make_shared<PdxTests::PdxType>();
-
-    auto pdxFactory =
-        cacheHelper->getCache()->createPdxInstanceFactory("PdxTests.PdxType");
-    LOG("PdxInstanceFactoryPtr created....");
-
-    int *lengthArr = new int[2];
-
-    lengthArr[0] = 1;
-    lengthArr[1] = 2;
-
-    pdxFactory.writeBoolean("m_bool", pdxobj->getBool());
-    try {
-      pdxFactory.writeBoolean("m_bool", pdxobj->getBool());
-      FAIL(
-          "calling writeBoolean on same fieldname should have thrown "
-          "IllegalStateException");
-    } catch (IllegalStateException &) {
-      LOG("Got expected IllegalStateException for m_bool");
-    }
-    pdxFactory.markIdentityField("m_bool");
-    pdxFactory.writeByte("m_byte", pdxobj->getByte());
-    pdxFactory.markIdentityField("m_byte");
-    pdxFactory.writeShort("m_int16", pdxobj->getShort());
-    pdxFactory.markIdentityField("m_int16");
-    pdxFactory.writeInt("m_int32", pdxobj->getInt());
-    pdxFactory.markIdentityField("m_int32");
-    pdxFactory.writeLong("m_long", pdxobj->getLong());
-    pdxFactory.markIdentityField("m_long");
-    pdxFactory.writeFloat("m_float", pdxobj->getFloat());
-    pdxFactory.markIdentityField("m_float");
-    pdxFactory.writeDouble("m_double", pdxobj->getDouble());
-    pdxFactory.markIdentityField("m_double");
-    pdxFactory.writeString("m_string", pdxobj->getString());
-    pdxFactory.markIdentityField("m_string");
-    pdxFactory.writeDate("m_dateTime", pdxobj->getDate());
-    pdxFactory.markIdentityField("m_dateTime");
-    pdxFactory.writeBooleanArray("m_boolArray", pdxobj->getBoolArray());
-    pdxFactory.markIdentityField("m_boolArray");
-    pdxFactory.writeByteArray("m_byteArray", pdxobj->getByteArray());
-    pdxFactory.markIdentityField("m_byteArray");
-    pdxFactory.writeShortArray("m_int16Array", pdxobj->getShortArray());
-    pdxFactory.markIdentityField("m_int16Array");
-    pdxFactory.writeIntArray("m_int32Array", pdxobj->getIntArray());
-    pdxFactory.markIdentityField("m_int32Array");
-    pdxFactory.writeLongArray("m_longArray", pdxobj->getLongArray());
-    pdxFactory.markIdentityField("m_longArray");
-    pdxFactory.writeFloatArray("m_floatArray", pdxobj->getFloatArray());
-    pdxFactory.markIdentityField("m_floatArray");
-    pdxFactory.writeDoubleArray("m_doubleArray", pdxobj->getDoubleArray());
-    pdxFactory.markIdentityField("m_doubleArray");
-    pdxFactory.writeObject("m_map", pdxobj->getHashMap());
-    pdxFactory.markIdentityField("m_map");
-    pdxFactory.writeStringArray("m_stringArray", pdxobj->getStringArray());
-    pdxFactory.markIdentityField("m_stringArray");
-    pdxFactory.writeObjectArray("m_objectArray",
-                                pdxobj->getCacheableObjectArray());
-    pdxFactory.writeObject("m_pdxEnum", pdxobj->getEnum());
-    pdxFactory.markIdentityField("m_pdxEnum");
-    pdxFactory.writeObject("m_arraylist", pdxobj->getArrayList());
-    pdxFactory.markIdentityField("m_arraylist");
-    pdxFactory.writeObject("m_linkedlist", pdxobj->getLinkedList());
-    pdxFactory.markIdentityField("m_linkedlist");
-    pdxFactory.writeObject("m_hashtable", pdxobj->getHashTable());
-    pdxFactory.markIdentityField("m_hashtable");
-    pdxFactory.writeObject("m_vector", pdxobj->getVector());
-    pdxFactory.markIdentityField("m_vector");
-    pdxFactory.writeArrayOfByteArrays(
-        "m_byteByteArray", pdxobj->getArrayOfByteArrays(), 2, lengthArr);
-    pdxFactory.markIdentityField("m_byteByteArray");
-    pdxFactory.writeChar("m_char", pdxobj->getChar());
-    pdxFactory.markIdentityField("m_char");
-    pdxFactory.writeCharArray("m_charArray", pdxobj->getCharArray());
-    pdxFactory.markIdentityField("m_charArray");
-    pdxFactory.writeObject("m_chs", pdxobj->getHashSet());
-    pdxFactory.markIdentityField("m_chs");
-    pdxFactory.writeObject("m_clhs", pdxobj->getLinkedHashSet());
-    pdxFactory.markIdentityField("m_clhs");
-    pdxFactory.writeByte("m_sbyte", pdxobj->getSByte());
-    pdxFactory.markIdentityField("m_sbyte");
-    pdxFactory.writeByteArray("m_sbyteArray", pdxobj->getSByteArray());
-    pdxFactory.markIdentityField("m_sbyteArray");
-    pdxFactory.writeShort("m_uint16", pdxobj->getUint16());
-    pdxFactory.markIdentityField("m_uint16");
-    pdxFactory.writeInt("m_uint32", pdxobj->getUInt());
-    pdxFactory.markIdentityField("m_uint32");
-    pdxFactory.writeLong("m_ulong", pdxobj->getULong());
-    pdxFactory.markIdentityField("m_ulong");
-    pdxFactory.writeShortArray("m_uint16Array", pdxobj->getUInt16Array());
-    pdxFactory.markIdentityField("m_uint16Array");
-    pdxFactory.writeIntArray("m_uint32Array", pdxobj->getUIntArray());
-    pdxFactory.markIdentityField("m_uint32Array");
-    pdxFactory.writeLongArray("m_ulongArray", pdxobj->getULongArray());
-    pdxFactory.markIdentityField("m_ulongArray");
-
-    pdxFactory.writeByteArray("m_byte252", pdxobj->getByte252());
-    pdxFactory.markIdentityField("m_byte252");
-    pdxFactory.writeByteArray("m_byte253", pdxobj->getByte253());
-    pdxFactory.markIdentityField("m_byte253");
-    pdxFactory.writeByteArray("m_byte65535", pdxobj->getByte65535());
-    pdxFactory.markIdentityField("m_byte65535");
-    pdxFactory.writeByteArray("m_byte65536", pdxobj->getByte65536());
-    pdxFactory.markIdentityField("m_byte65536");
-    pdxFactory.writeObject("m_address", pdxobj->getCacheableObjectArray());
-
-    pdxFactory.writeObjectArray(
-        "", pdxobj->getCacheableObjectArrayEmptyPdxFieldName());
-
-    std::shared_ptr<PdxInstance> ret = pdxFactory.create();
-    LOG("PdxInstancePtr created....");
-
-    ASSERT(ret->getClassName() == "PdxTests.PdxType",
-           "pdxInstance.getClassName should return PdxTests.PdxType.");
-
-    auto psPtr = ret->getObject();
-    LOG("getObject created....");
-
-    LOG("Statistics for for (PdxTests.PdxType) PdxInstance ");
-    auto &&lregPtr = std::dynamic_pointer_cast<LocalRegion>(rptr);
-
-    LOGINFO(
-        "pdxInstanceDeserializations for (PdxTests.PdxType) PdxInstance  = %d ",
-        lregPtr->getCacheImpl()
-            ->getCachePerfStats()
-            .getPdxInstanceDeserializations());
-    LOGINFO(
-        "pdxInstanceCreations for (PdxTests.PdxType) PdxInstance  = %d ",
-        lregPtr->getCacheImpl()->getCachePerfStats().getPdxInstanceCreations());
-    LOGINFO(
-        "pdxInstanceDeserializationTime for(PdxTests.PdxType) PdxInstance  = "
-        "%d ",
-        lregPtr->getCacheImpl()
-            ->getCachePerfStats()
-            .getPdxInstanceDeserializationTime());
-
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceDeserializations() == 1,
-           "pdxInstanceDeserialization should be equal to 1.");
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceCreations() == 0,
-           "pdxInstanceCreations should be equal to 0.");
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceDeserializationTime() == 0,
-           "pdxInstanceDeserializationTime should be equal to 0.");
-
-    PdxTests::PdxType *obj2 = pdxobj.get();
-    PdxTests::PdxType *obj1 = dynamic_cast<PdxTests::PdxType *>(psPtr.get());
-
-    LOGINFO("Avinash Equal Starts");
-    ASSERT(obj1->equals(*obj2, false) == true, "PdxObjects should be equal.");
-    LOGINFO("Avinash Equal Finish");
-
-    auto key = CacheableKey::create("pi");
-    rptr->put(key, ret);
-    LOG("put done....");
-
-    auto newPiPtr = std::dynamic_pointer_cast<PdxSerializable>(rptr->get(key));
-    LOG("get done....");
-
-    LOGINFO(
-        "pdxInstanceDeserializations for (PdxTests.PdxType) PdxInstance  = %d ",
-        lregPtr->getCacheImpl()
-            ->getCachePerfStats()
-            .getPdxInstanceDeserializations());
-    LOGINFO(
-        "pdxInstanceCreations for (PdxTests.PdxType) PdxInstance  = %d ",
-        lregPtr->getCacheImpl()->getCachePerfStats().getPdxInstanceCreations());
-    LOGINFO(
-        "pdxInstanceDeserializationTime for(PdxTests.PdxType) PdxInstance  = "
-        "%d ",
-        lregPtr->getCacheImpl()
-            ->getCachePerfStats()
-            .getPdxInstanceDeserializationTime());
-
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceDeserializations() == 1,
-           "pdxInstanceDeserialization should be equal to 1.");
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceCreations() == 0,
-           "pdxInstanceCreations should be equal to 0.");
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceDeserializationTime() > 0,
-           "pdxInstanceDeserializationTime should be greater than 0.");
-
-    PdxTests::PdxType *obj3 = dynamic_cast<PdxTests::PdxType *>(newPiPtr.get());
-
-    ASSERT(obj2->equals(*obj3, false) == true, "PdxObjects should be equal.");
-
-    int pdxInstHashcode = ret->hashcode();
-    LOGINFO("pdxinstance hash code = %d ", pdxInstHashcode);
-
-    auto javaPdxHCKey = CacheableKey::create("javaPdxHC");
-    auto pIPtr2 = std::dynamic_pointer_cast<Cacheable>(rptr->get(javaPdxHCKey));
-    LOG("In pdxIFPutGetTest get done");
-    CacheableInt32 *val = dynamic_cast<CacheableInt32 *>(pIPtr2.get());
-    LOG("In pdxIFPutGetTest cast done");
-    int javaPdxHC = val->value();
-    LOGINFO("javaPdxHC hash code = %d ", javaPdxHC);
-
-    ASSERT(javaPdxHC == pdxInstHashcode,
-           "Pdxhashcode hashcode not matched with java pdx hash code.");
-
-    auto pp = std::make_shared<ParentPdx>(10);
-    auto pdxFactory2 = cacheHelper->getCache()->createPdxInstanceFactory(
-        "testobject.ParentPdx");
-    pdxFactory2.writeInt("m_parentId", pp->getParentId());
-    pdxFactory2.writeObject("m_enum", pp->getEnum());
-    pdxFactory2.writeString("m_parentName", pp->getParentName());
-    pdxFactory2.writeObject("m_childPdx", pp->getChildPdx());
-    pdxFactory2.writeChar("m_char", pp->getChar());
-    pdxFactory2.writeChar("m_wideChar", pp->getChar());
-    pdxFactory2.writeCharArray("m_charArray", pp->getCharArray());
-
-    LOG("write set done....");
-    std::shared_ptr<PdxInstance> ip2 = pdxFactory2.create();
-    LOG("PdxInstancePtr created");
-
-    LOGINFO("PdxInstance getClassName = " + ip2->getClassName());
-    ASSERT(ip2->getClassName() == "testobject.ParentPdx",
-           "pdxInstance.getClassName should return testobject.ParentPdx.");
-
-    auto keyport = CacheableKey::create("pp");
-    rptr->put(keyport, ip2);
-    LOG("put done....");
-
-    newPiPtr = std::dynamic_pointer_cast<PdxSerializable>(rptr->get(keyport));
-    LOG("get done....");
-
-    LOGINFO(
-        "pdxInstanceDeserializations for (testobject::ParentPdx) PdxInstance = "
-        "%d ",
-        lregPtr->getCacheImpl()
-            ->getCachePerfStats()
-            .getPdxInstanceDeserializations());
-    LOGINFO(
-        "pdxInstanceCreations for (testobject::ParentPdx) PdxInstance  = %d ",
-        lregPtr->getCacheImpl()->getCachePerfStats().getPdxInstanceCreations());
-    LOGINFO(
-        "pdxInstanceDeserializationTime for(testobject::ParentPdx) PdxInstance "
-        "= %d ",
-        lregPtr->getCacheImpl()
-            ->getCachePerfStats()
-            .getPdxInstanceDeserializationTime());
-
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceDeserializations() == 1,
-           "pdxInstanceDeserialization should be equal to 1.");
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceCreations() == 0,
-           "pdxInstanceCreations should be equal to 0.");
-    ASSERT(lregPtr->getCacheImpl()
-                   ->getCachePerfStats()
-                   .getPdxInstanceDeserializationTime() > 0,
-           "pdxInstanceDeserializationTime should be greater than 0.");
-
-    auto pp1 = std::dynamic_pointer_cast<ParentPdx>(newPiPtr);
-    LOG("got std::shared_ptr<ParentPdx>....");
-
-    ParentPdx *rawPP1 = dynamic_cast<ParentPdx *>(pp1.get());
-    LOG("got rawPP1....");
-
-    ParentPdx *rawPP2 = dynamic_cast<ParentPdx *>(pp.get());
-    LOG("got rawpp2....");
-
-    ASSERT(rawPP1->equals(*rawPP2, false) == true,
-           "ParentPdx objects should be equal.");
-
-    LOG("pdxIFPutGetTest complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, pdxInstanceWithEmptyKeys)
-  {
-    LOG("pdxInstanceWithEmptyKeys started ");
-    auto rptr = getHelper()->getRegion(regionNames[0]);
-    auto pdxFactory =
-        cacheHelper->getCache()->createPdxInstanceFactory("EMPTY_KEY_NAME");
-    LOG("PdxInstanceFactoryPtr created....");
-
-    bool falseValue = false;
-    pdxFactory.writeBoolean("", falseValue);
-    std::shared_ptr<PdxInstance> putValue = pdxFactory.create();
-
-    auto key = CacheableKey::create("pp");
-    rptr->put(key, putValue);
-    LOG("put done with boolean Value and Empty Key....");
-
-    auto getValue = std::dynamic_pointer_cast<PdxInstance>(rptr->get(key));
-    LOG("get done with boolean Value and Empty Key....");
-
-    ASSERT(*putValue == *getValue,
-           "Boolean Value Did not match in case of Empty PdxField Key");
-    bool fieldValue = getValue->getBooleanField("");
-    ASSERT(fieldValue == falseValue,
-           "Mismatch in the PdxInstance with Empty key");
-
-    LOG("pdxInstanceWithEmptyKeys complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER1, CloseServer1)
-  {
-    if (isLocalServer) {
-      CacheHelper::closeServer(1);
-      LOG("SERVER1 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, CloseCache1)
-  { cleanProc(); }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, CloseCache2)
-  { cleanProc(); }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER1, CloseLocator1)
-  {
-    // stop locator
-    if (isLocator) {
-      CacheHelper::closeLocator(1);
-      LOG("Locator1 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-void testPdxInstance() {
-  CALL_TASK(CreateLocator1);
-  CALL_TASK(CreateServer1_With_Locator);
-
-  CALL_TASK(StepOne_Pooled_Locator);
-  CALL_TASK(StepTwo_Pooled_Locator);
-
-  CALL_TASK(pdxIFPutGetTest);
-
-  CALL_TASK(CloseCache1);
-  CALL_TASK(CloseCache2);
-  CALL_TASK(CloseServer1);
-
-  CALL_TASK(CloseLocator1);
-}
-
-void testPdxInstanceWithPdxReadSerializedAndCaching() {
-  CALL_TASK(CreateLocator1);
-  CALL_TASK(CreateServer1_With_Locator);
-
-  CALL_TASK(StepOne_Pooled_Locator_PdxReadSerialized);
-  CALL_TASK(StepTwo_Pooled_Locator_CachingEnabled_PdxReadSerialized);
-
-  CALL_TASK(pdxPut);
-  CALL_TASK(modifyPdxInstanceAndCheckLocally);
-  CALL_TASK(pdxInstanceWithEmptyKeys);
-
-  CALL_TASK(CloseCache1);
-  CALL_TASK(CloseCache2);
-  CALL_TASK(CloseServer1);
-
-  CALL_TASK(CloseLocator1);
-}
-
-void testPdxInstanceWithPdxReadSerialized() {
-  CALL_TASK(CreateLocator1);
-  CALL_TASK(CreateServer1_With_Locator);
-
-  CALL_TASK(StepOne_Pooled_Locator_PdxReadSerialized);
-  CALL_TASK(StepTwo_Pooled_Locator_PdxReadSerialized);
-
-  CALL_TASK(pdxPut);
-  CALL_TASK(getObject);
-  CALL_TASK(verifyPdxInstanceEquals);
-  CALL_TASK(verifyPdxInstanceHashcode);
-  CALL_TASK(accessPdxInstance);
-  CALL_TASK(modifyPdxInstance);
-
-  CALL_TASK(CloseCache1);
-  CALL_TASK(CloseCache2);
-  CALL_TASK(CloseServer1);
-
-  CALL_TASK(CloseLocator1);
-}
-
-DUNIT_MAIN
-  {
-    //    testPdxInstance();
-
-    //    testPdxInstanceWithPdxReadSerializedAndCaching();
-
-    testPdxInstanceWithPdxReadSerialized();
-  }
-END_MAIN
diff --git a/cppcache/integration-test/testThinClientPdxTests.cpp b/cppcache/integration-test/testThinClientPdxTests.cpp
index e240686..7c38693 100644
--- a/cppcache/integration-test/testThinClientPdxTests.cpp
+++ b/cppcache/integration-test/testThinClientPdxTests.cpp
@@ -32,9 +32,6 @@
 
 #include "fw_dunit.hpp"
 
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-
 #include <geode/PdxInstance.hpp>
 #include <geode/UserFunctionExecutionException.hpp>
 #include <geode/FunctionService.hpp>
@@ -107,7 +104,7 @@
 bool isLocalServer = false;
 
 const char *poolNames[] = {"Pool1", "Pool2", "Pool3"};
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 bool isPoolConfig = false;  // To track if pool case is running
 // const char * qRegionNames[] = { "Portfolios", "Positions", "Portfolios2",
@@ -4435,14 +4432,12 @@
 
     // PDXReaderWriterInvalidUsage
     {
-        // disable see bug 999 for more details.
-        // testReaderWriterInvalidUsage();
+      // disable see bug 999 for more details.
+      // testReaderWriterInvalidUsage();
     }
 
     // Test LinkedList
-    {
-      runJavaInterOpsUsingLinkedList();
-    }
+    { runJavaInterOpsUsingLinkedList(); }
 
     // NestedPdxOps
     { runNestedPdxOps(); }
diff --git a/cppcache/integration-test/testThinClientPoolAttrTest.cpp b/cppcache/integration-test/testThinClientPoolAttrTest.cpp
index 1ea7ead..65aa48c 100644
--- a/cppcache/integration-test/testThinClientPoolAttrTest.cpp
+++ b/cppcache/integration-test/testThinClientPoolAttrTest.cpp
@@ -35,7 +35,7 @@
 bool isLocalServer = false;
 bool isLocator = false;
 
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 const char *poolRegNames[] = {"PoolRegion1"};
 const char *poolName = "__TEST_POOL1__";
@@ -44,17 +44,16 @@
 const char *serverGroup = "ServerGroup1";
 std::shared_ptr<Cache> cachePtr;
 
-class putThread : public ACE_Task_Base {
- private:
-  std::shared_ptr<Region> regPtr;
-
+class PutThread {
  public:
-  explicit putThread(const char *name) : regPtr(getHelper()->getRegion(name)) {}
+  explicit PutThread() : regPtr{nullptr} {}
+  explicit PutThread(const std::string &name)
+      : regPtr{getHelper()->getRegion(name)} {}
 
-  int svc(void) {
+  void run() {
     // TODO: No. of connection should be = minConnection
 
-    for (int i = 0; i < 10000; i++) {
+    for (auto i = 0; i < 10000; ++i) {
       try {
         regPtr->put(keys[i % 5], vals[i % 6]);
       } catch (const Exception &) {
@@ -64,11 +63,23 @@
       }
       // TODO: Check no. of connection > minConnetion
     }
-    // LOG(" Incremented 100 times by thread.");
-    return 0;
   }
-  void start() { activate(); }
+
+  void start() {
+    thread_ = std::thread{[this]() { run(); }};
+  }
+
+  void wait() {
+    if (thread_.joinable()) {
+      thread_.join();
+    }
+  }
+
   void stop() { wait(); }
+
+ protected:
+  std::shared_ptr<Region> regPtr;
+  std::thread thread_;
 };
 
 void doAttrTestingAndCreatePool(const char *poolNameToUse) {
@@ -227,9 +238,8 @@
 DUNIT_TASK(CLIENT2, StartC2)
   {
     auto props = Properties::create();
-    std::string path = "cacheserver_pool_client.xml";
-    std::string duplicateFile;
-    CacheHelper::createDuplicateXMLFile(duplicateFile, path);
+    auto duplicateFile =
+        CacheHelper::createDuplicateXMLFile("cacheserver_pool_client.xml");
 
     props->insert("cache-xml-file", duplicateFile.c_str());
 
@@ -238,10 +248,10 @@
       initClient(true, props);
       LOG(" started client");
       ASSERT(getHelper()
-                     ->getCache()
-                     ->getPoolManager()
-                     .find("clientPoolMultiUser")
-                     ->getMultiuserAuthentication() == true,
+                 ->getCache()
+                 ->getPoolManager()
+                 .find("clientPoolMultiUser")
+                 ->getMultiuserAuthentication(),
              "MultiUser secure mode should be true for Pool");
     } catch (const Exception &excp) {
       LOG("Exception during client 2 XML creation");
@@ -267,15 +277,14 @@
                   ->getPoolManager()
                   .find(poolNameString.c_str())
                   ->getMinConnections();
-    char logmsg[100] = {0};
-    sprintf(logmsg, "Pool level not equal to min level. Expected %d, actual %d",
-            min, level);
-    ASSERT(level == min, logmsg);
+    ASSERT(level == min,
+           std::string("Pool level not equal to min level. Expected ") +
+               std::to_string(min) + ", actual " + std::to_string(level));
 
-    putThread *threads[25];
+    PutThread threads[25];
     for (int thdIdx = 0; thdIdx < 10; thdIdx++) {
-      threads[thdIdx] = new putThread(poolRegNames[0]);
-      threads[thdIdx]->start();
+      threads[thdIdx] = PutThread(poolRegNames[0]);
+      threads[thdIdx].start();
     }
 
     SLEEP(5000);  // wait for threads to become active
@@ -288,12 +297,12 @@
                   ->getPoolManager()
                   .find(poolNameString.c_str())
                   ->getMaxConnections();
-    sprintf(logmsg, "Pool level not equal to max level. Expected %d, actual %d",
-            max, level);
-    ASSERT(level == max, logmsg);
+    ASSERT(level == max,
+           std::string("Pool level not equal to max level. Expected ") +
+               std::to_string(max) + ", actual " + std::to_string(level));
 
     for (int thdIdx = 0; thdIdx < 10; thdIdx++) {
-      threads[thdIdx]->stop();
+      threads[thdIdx].stop();
     }
 
     // Milli second sleep: IdleTimeout is 5 sec, load conditioning
@@ -308,22 +317,21 @@
               ->getPoolManager()
               .find(poolNameString.c_str())
               ->getMinConnections();
-    sprintf(logmsg,
-            "Pool level not equal to min level after idle timeout. "
-            "Expected %d, actual %d",
-            min, level);
-    ASSERT(level == min, logmsg);
+    ASSERT(
+        level == min,
+        std::string(
+            "Pool level not equal to min level after idle timeout. Expected ") +
+            std::to_string(min) + ", actual " + std::to_string(level));
 
     LOG("Waiting 1 minute for load conditioning to kick in");
     SLEEP(60000);
 
     level = TestUtils::getCacheImpl(getHelper()->cachePtr)
                 ->getPoolSize(poolNameString);
-    sprintf(logmsg,
-            "Pool level not equal to min level after load "
-            "conditioning. Expected %d, actual %d",
-            min, level);
-    ASSERT(level == min, logmsg);
+    ASSERT(level == min, std::string("Pool level not equal to min level after "
+                                     "load conditioning. Expected ") +
+                             std::to_string(min) + ", actual " +
+                             std::to_string(level));
   }
 END_TASK(ClientOp)
 
diff --git a/cppcache/integration-test/testThinClientPoolExecuteFunctionThrowsException.cpp b/cppcache/integration-test/testThinClientPoolExecuteFunctionThrowsException.cpp
index 50e0727..9199f27 100644
--- a/cppcache/integration-test/testThinClientPoolExecuteFunctionThrowsException.cpp
+++ b/cppcache/integration-test/testThinClientPoolExecuteFunctionThrowsException.cpp
@@ -47,7 +47,7 @@
 bool isLocator = false;
 bool isPoolWithEndpoint = false;
 
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 const char *poolRegNames[] = {"partition_region", "PoolRegion2"};
 
@@ -119,11 +119,15 @@
 
 DUNIT_TASK_DEFINITION(SERVER, StartS12)
   {
-    const char *lhp = nullptr;
-    if (!isPoolWithEndpoint) lhp = locHostPort;
+    std::string lhp;
+    if (!isPoolWithEndpoint) {
+      lhp = locHostPort;
+    }
+
     if (isLocalServer) {
       CacheHelper::initServer(1, "func_cacheserver1_pool.xml", lhp);
     }
+
     if (isLocalServer) {
       CacheHelper::initServer(2, "func_cacheserver2_pool.xml", lhp);
     }
@@ -140,7 +144,6 @@
     // createRegionAndAttachPool(poolRegNames[0],USE_ACK, poolName);
 
     auto regPtr0 = createRegionAndAttachPool(poolRegNames[0], USE_ACK);
-    ;  // getHelper()->createRegion( poolRegNames[0], USE_ACK);
     regPtr0->registerAllKeys();
 
     LOG("Clnt1Init complete.");
@@ -150,14 +153,13 @@
 DUNIT_TASK_DEFINITION(CLIENT1, Client1OpTest)
   {
     auto regPtr0 = getHelper()->getRegion(poolRegNames[0]);
-    char buf[128];
 
     for (int i = 0; i < 34; i++) {
-      sprintf(buf, "VALUE--%d", i);
-      auto value = CacheableString::create(buf);
+      auto value =
+          CacheableString::create(std::string("VALUE--") + std::to_string(i));
 
-      sprintf(buf, "KEY--%d", i);
-      auto key = CacheableString::create(buf);
+      auto key =
+          CacheableString::create(std::string("KEY--") + std::to_string(i));
       regPtr0->put(key, value);
     }
     std::this_thread::sleep_for(
@@ -169,8 +171,8 @@
     for (int i = 1; i <= 200; i++) {
       std::shared_ptr<Cacheable> value(CacheableInt32::create(i));
 
-      sprintf(buf, "execKey-%d", i);
-      auto key = CacheableKey::create(buf);
+      auto key =
+          CacheableKey::create(std::string("execKey-") + std::to_string(i));
       regPtr0->put(key, value);
     }
     LOG("Put for execKey's on region complete.");
@@ -178,15 +180,15 @@
     LOG("Adding filter");
     auto arrList = CacheableArrayList::create();
     for (int i = 100; i < 120; i++) {
-      sprintf(buf, "execKey-%d", i);
-      auto key = CacheableKey::create(buf);
+      auto key =
+          CacheableKey::create(std::string("execKey-") + std::to_string(i));
       arrList->push_back(key);
     }
 
     auto filter = CacheableVector::create();
     for (int i = 100; i < 120; i++) {
-      sprintf(buf, "execKey-%d", i);
-      auto key = CacheableKey::create(buf);
+      auto key =
+          CacheableKey::create(std::string("execKey-") + std::to_string(i));
       filter->push_back(key);
     }
     LOG("Adding filter done.");
diff --git a/cppcache/integration-test/testThinClientPoolExecuteHAFunction.cpp b/cppcache/integration-test/testThinClientPoolExecuteHAFunction.cpp
index e63bbb6..8a0467a 100644
--- a/cppcache/integration-test/testThinClientPoolExecuteHAFunction.cpp
+++ b/cppcache/integration-test/testThinClientPoolExecuteHAFunction.cpp
@@ -16,6 +16,8 @@
  */
 #include "fw_dunit.hpp"
 #include "ThinClientHelper.hpp"
+#include "testUtils.hpp"
+
 #include <geode/FunctionService.hpp>
 #include <geode/Execution.hpp>
 #include <geode/DefaultResultCollector.hpp>
@@ -32,11 +34,13 @@
 using apache::geode::client::Exception;
 using apache::geode::client::FunctionService;
 
+using unitTests::TestUtils;
+
 bool isLocalServer = false;
 bool isLocator = false;
 bool isPoolWithEndpoint = false;
 
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 const char *poolRegNames[] = {"partition_region", "PoolRegion2"};
 const char *poolName = "__TEST_POOL1__";
@@ -47,20 +51,6 @@
 const char *OnServerHAShutdownFunction = "OnServerHAShutdownFunction";
 
 const char *RegionOperationsHAFunction = "RegionOperationsHAFunction";
-#define verifyGetResults()                                      \
-  bool found = false;                                           \
-  for (int j = 0; j < 34; j++) {                                \
-    if (j % 2 == 0) continue;                                   \
-    sprintf(buf, "VALUE--%d", j);                               \
-    if (strcmp(buf, std::dynamic_pointer_cast<CacheableString>( \
-                        resultList->operator[](i))              \
-                        ->value()                               \
-                        .c_str()) == 0) {                       \
-      found = true;                                             \
-      break;                                                    \
-    }                                                           \
-  }                                                             \
-  ASSERT(found, "this returned value is invalid");
 
 class MyResultCollector : public DefaultResultCollector {
  public:
@@ -116,8 +106,11 @@
 
 DUNIT_TASK_DEFINITION(SERVER, StartS12)
   {
-    const char *lhp = nullptr;
-    if (!isPoolWithEndpoint) lhp = locHostPort;
+    std::string lhp;
+    if (!isPoolWithEndpoint) {
+      lhp = locHostPort;
+    }
+
     if (isLocalServer) {
       CacheHelper::initServer(1, "func_cacheserver1_pool.xml", lhp);
     }
@@ -129,8 +122,10 @@
 
 DUNIT_TASK_DEFINITION(SERVER, StartS13)
   {
-    const char *lhp = nullptr;
-    if (!isPoolWithEndpoint) lhp = locHostPort;
+    std::string lhp;
+    if (!isPoolWithEndpoint) {
+      lhp = locHostPort;
+    }
     if (isLocalServer) {
       CacheHelper::initServer(1, "func_cacheserver1_pool.xml", lhp);
     }
@@ -151,7 +146,6 @@
     // createRegionAndAttachPool(poolRegNames[0],USE_ACK, poolName);
 
     auto regPtr0 = createRegionAndAttachPool(poolRegNames[0], USE_ACK);
-    ;  // getHelper()->createRegion( poolRegNames[0], USE_ACK);
     regPtr0->registerAllKeys();
 
     LOG("Clnt1Init complete.");
@@ -176,21 +170,20 @@
     auto regPtr0 = getHelper()->getRegion(poolRegNames[0]);
     char buf[128];
 
-    for (int i = 0; i < 34; i++) {
-      sprintf(buf, "VALUE--%d", i);
-      auto value = CacheableString::create(buf);
+    for (int i = 1; i < 35; i++) {
+      auto value =
+          CacheableString::create(std::string("VALUE--") + std::to_string(i));
 
-      sprintf(buf, "KEY--%d", i);
-      auto key = CacheableString::create(buf);
+      auto key =
+          CacheableString::create(std::string("KEY--") + std::to_string(i));
       regPtr0->put(key, value);
     }
     SLEEP(10000);  // let the put finish
     try {
       auto routingObj = CacheableVector::create();
-      for (int i = 0; i < 34; i++) {
-        if (i % 2 == 0) continue;
-        sprintf(buf, "KEY--%d", i);
-        auto key = CacheableKey::create(buf);
+      for (int i = 1; i < 35; i += 2) {
+        auto key =
+            CacheableString::create(std::string("KEY--") + std::to_string(i));
         routingObj->push_back(key);
       }
       // UNUSED bool getResult = true;
@@ -205,9 +198,8 @@
       if (executeFunctionResult == nullptr) {
         ASSERT(false, "get executeFunctionResult is nullptr");
       } else {
-        sprintf(buf, "echo String : result count = %zd",
-                executeFunctionResult->size());
-        LOG(buf);
+        LOG(std::string("echo String : result count = ") +
+            std::to_string(executeFunctionResult->size()));
         resultList->clear();
 
         for (unsigned item = 0;
@@ -220,20 +212,19 @@
             resultList->push_back(arrayList->operator[](pos));
           }
         }
-        sprintf(buf, "get result count = %zd", resultList->size());
-        LOG(buf);
+        LOG(std::string("get result count = ") +
+            std::to_string(resultList->size()));
         ASSERT(resultList->size() == 17,
                "get executeFunctionResult count is not 17");
         for (size_t i = 0; i < resultList->size(); i++) {
-          sprintf(buf, "result[%zd] is null\n", i);
-          ASSERT(resultList->operator[](i) != nullptr, buf);
-          sprintf(buf, "get result[%zd]=%s", i,
-                  std::dynamic_pointer_cast<CacheableString>(
-                      resultList->operator[](i))
-                      ->value()
-                      .c_str());
-          LOG(buf);
-          verifyGetResults()
+          ASSERT(resultList->operator[](i) != nullptr,
+                 std::string("result [") + std::to_string(i) + "] is null");
+          auto msg = std::string("get result [") + std::to_string(i) + "] is " +
+                     std::dynamic_pointer_cast<CacheableString>(
+                         resultList->operator[](i))
+                         ->value();
+          LOG(msg);
+          TestUtils::verifyGetResults(resultList.get(), i);
         }
       }
 
@@ -251,9 +242,8 @@
       if (executeFunctionResult == nullptr) {
         ASSERT(false, "get executeFunctionResult is nullptr");
       } else {
-        sprintf(buf, "echo String : result count = %zd",
-                executeFunctionResult->size());
-        LOG(buf);
+        LOG(std::string("echo String : result count = ") +
+            std::to_string(executeFunctionResult->size()));
         resultList->clear();
 
         for (unsigned item = 0;
@@ -266,20 +256,18 @@
             resultList->push_back(arrayList->operator[](pos));
           }
         }
-        sprintf(buf, "get result count = %zd", resultList->size());
-        LOG(buf);
+        LOG(std::string("get result count = ") +
+            std::to_string(resultList->size()));
         ASSERT(resultList->size() == 17,
                "get executeFunctionResult count is not 17");
         for (size_t i = 0; i < resultList->size(); i++) {
-          sprintf(buf, "result[%zd] is null\n", i);
-          ASSERT(resultList->operator[](i) != nullptr, buf);
-          sprintf(buf, "get result[%zd]=%s", i,
-                  std::dynamic_pointer_cast<CacheableString>(
-                      resultList->operator[](i))
-                      ->value()
-                      .c_str());
-          LOG(buf);
-          verifyGetResults()
+          ASSERT(resultList->operator[](i) != nullptr,
+                 std::string("result [") + std::to_string(i) + "] is null");
+          LOG(std::string("get result [") + std::to_string(i) + "] is " +
+              std::dynamic_pointer_cast<CacheableString>(
+                  resultList->operator[](i))
+                  ->value());
+          TestUtils::verifyGetResults(resultList.get(), i);
         }
       }
       /*-------------------------------onRegion with single filter key
@@ -302,21 +290,20 @@
     auto regPtr0 = getHelper()->getRegion(poolRegNames[0]);
     char buf[128];
 
-    for (int i = 0; i < 34; i++) {
-      sprintf(buf, "VALUE--%d", i);
-      auto value = CacheableString::create(buf);
+    for (int i = 1; i < 35; i++) {
+      auto value =
+          CacheableString::create(std::string("VALUE--") + std::to_string(i));
 
-      sprintf(buf, "KEY--%d", i);
-      auto key = CacheableString::create(buf);
+      auto key =
+          CacheableString::create(std::string("KEY--") + std::to_string(i));
       regPtr0->put(key, value);
     }
     SLEEP(10000);  // let the put finish
     try {
       auto routingObj = CacheableVector::create();
-      for (int i = 0; i < 34; i++) {
-        if (i % 2 == 0) continue;
-        sprintf(buf, "KEY--%d", i);
-        auto key = CacheableKey::create(buf);
+      for (int i = 1; i < 35; i += 2) {
+        auto key =
+            CacheableString::create(std::string("KEY--") + std::to_string(i));
         routingObj->push_back(key);
       }
 
@@ -336,9 +323,8 @@
       if (executeFunctionResult == nullptr) {
         ASSERT(false, "get executeFunctionResult is nullptr");
       } else {
-        sprintf(buf, "echo String : result count = %zd",
-                executeFunctionResult->size());
-        LOG(buf);
+        LOG(std::string("echo String : result count = ") +
+            std::to_string(executeFunctionResult->size()));
         resultList->clear();
         for (unsigned item = 0;
              item < static_cast<uint32_t>(executeFunctionResult->size());
@@ -350,20 +336,19 @@
             resultList->push_back(arrayList->operator[](pos));
           }
         }
-        sprintf(buf, "get result count = %zd", resultList->size());
-        LOG(buf);
+        LOG(std::string("get result count = ") +
+            std::to_string(resultList->size()));
         ASSERT(resultList->size() == 17,
                "get executeFunctionResult count is not 17");
         for (size_t i = 0; i < resultList->size(); i++) {
-          sprintf(buf, "result[%zd] is null\n", i);
-          ASSERT(resultList->operator[](i) != nullptr, buf);
-          sprintf(buf, "get result[%zd]=%s", i,
-                  std::dynamic_pointer_cast<CacheableString>(
-                      resultList->operator[](i))
-                      ->value()
-                      .c_str());
-          LOG(buf);
-          verifyGetResults()
+          ASSERT(resultList->operator[](i) != nullptr,
+                 std::string("result [") + std::to_string(i) + "] is null");
+          auto msg = std::string("get result [") + std::to_string(i) + "] is " +
+                     std::dynamic_pointer_cast<CacheableString>(
+                         resultList->operator[](i))
+                         ->value();
+          LOG(msg);
+          TestUtils::verifyGetResults(resultList.get(), i);
         }
       }
 
@@ -376,9 +361,8 @@
       if (executeFunctionResult1 == nullptr) {
         ASSERT(false, "get executeFunctionResult1 is nullptr");
       } else {
-        sprintf(buf, "echo String : result count = %zd",
-                executeFunctionResult1->size());
-        LOG(buf);
+        LOG(std::string("echo String : result count = ") +
+            std::to_string(executeFunctionResult->size()));
         resultList->clear();
         for (unsigned item = 0;
              item < static_cast<uint32_t>(executeFunctionResult1->size());
@@ -390,20 +374,19 @@
             resultList->push_back(arrayList->operator[](pos));
           }
         }
-        sprintf(buf, "get result count = %zd", resultList->size());
-        LOG(buf);
+        LOG(std::string("get result count = ") +
+            std::to_string(resultList->size()));
         ASSERT(resultList->size() == 17,
                "get executeFunctionResult1 count is not 17");
         for (size_t i = 0; i < resultList->size(); i++) {
-          sprintf(buf, "result[%zd] is null\n", i);
-          ASSERT(resultList->operator[](i) != nullptr, buf);
-          sprintf(buf, "get result[%zd]=%s", i,
-                  std::dynamic_pointer_cast<CacheableString>(
-                      resultList->operator[](i))
-                      ->value()
-                      .c_str());
-          LOG(buf);
-          verifyGetResults()
+          ASSERT(resultList->operator[](i) != nullptr,
+                 std::string("result [") + std::to_string(i) + "] is null");
+          auto msg = std::string("get result [") + std::to_string(i) + "] is " +
+                     std::dynamic_pointer_cast<CacheableString>(
+                         resultList->operator[](i))
+                         ->value();
+          LOG(msg);
+          TestUtils::verifyGetResults(resultList.get(), i);
         }
       }
     } catch (const Exception &excp) {
diff --git a/cppcache/integration-test/testThinClientPoolExecuteHAFunctionPrSHOP.cpp b/cppcache/integration-test/testThinClientPoolExecuteHAFunctionPrSHOP.cpp
index 936ef90..1937fc1 100644
--- a/cppcache/integration-test/testThinClientPoolExecuteHAFunctionPrSHOP.cpp
+++ b/cppcache/integration-test/testThinClientPoolExecuteHAFunctionPrSHOP.cpp
@@ -16,6 +16,8 @@
  */
 #include "fw_dunit.hpp"
 #include "ThinClientHelper.hpp"
+#include "testUtils.hpp"
+
 #include <geode/FunctionService.hpp>
 #include <geode/Execution.hpp>
 #include <geode/DefaultResultCollector.hpp>
@@ -31,10 +33,12 @@
 using apache::geode::client::Exception;
 using apache::geode::client::FunctionService;
 
+using unitTests::TestUtils;
+
 bool isLocalServer = false;
 bool isLocator = false;
 
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 const char *poolRegNames[] = {"partition_region", "PoolRegion2"};
 const char *poolName = "__TEST_POOL1__";
@@ -47,20 +51,6 @@
 const char *RegionOperationsHAFunction = "RegionOperationsHAFunction";
 const char *RegionOperationsHAFunctionPrSHOP =
     "RegionOperationsHAFunctionPrSHOP";
-#define verifyGetResults()                                      \
-  bool found = false;                                           \
-  for (int j = 0; j < 34; j++) {                                \
-    if (j % 2 == 0) continue;                                   \
-    sprintf(buf, "VALUE--%d", j);                               \
-    if (strcmp(buf, std::dynamic_pointer_cast<CacheableString>( \
-                        resultList->operator[](i))              \
-                        ->value()                               \
-                        .c_str()) == 0) {                       \
-      found = true;                                             \
-      break;                                                    \
-    }                                                           \
-  }                                                             \
-  ASSERT(found, "this returned value is invalid");
 
 class MyResultCollector : public DefaultResultCollector {
  public:
@@ -175,20 +165,19 @@
     char buf[128];
 
     for (int i = 0; i < 350; i++) {
-      sprintf(buf, "VALUE--%d", i);
-      auto value = CacheableString::create(buf);
+      auto value =
+          CacheableString::create(std::string("VALUE--") + std::to_string(i));
 
-      sprintf(buf, "KEY--%d", i);
-      auto key = CacheableString::create(buf);
+      auto key =
+          CacheableString::create(std::string("KEY--") + std::to_string(i));
       regPtr0->put(key, value);
     }
     SLEEP(10000);  // let the put finish
     try {
       auto routingObj = CacheableVector::create();
-      for (int i = 0; i < 34; i++) {
-        if (i % 2 == 0) continue;
-        sprintf(buf, "KEY--%d", i);
-        auto key = CacheableKey::create(buf);
+      for (int i = 1; i < 35; i += 2) {
+        auto key =
+            CacheableString::create(std::string("KEY--") + std::to_string(i));
         routingObj->push_back(key);
       }
       // UNUSED bool getResult = true;
@@ -204,9 +193,8 @@
       if (executeFunctionResult == nullptr) {
         ASSERT(false, "get executeFunctionResult is nullptr");
       } else {
-        sprintf(buf, "echo String : result count = %zd",
-                executeFunctionResult->size());
-        LOG(buf);
+        LOG(std::string("echo String : result count = ") +
+            std::to_string(executeFunctionResult->size()));
         resultList->clear();
 
         for (unsigned item = 0;
@@ -219,20 +207,18 @@
             resultList->push_back(arrayList->operator[](pos));
           }
         }
-        sprintf(buf, "get result count = %zd", resultList->size());
-        LOG(buf);
+        LOG(std::string("get result count = ") +
+            std::to_string(resultList->size()));
         ASSERT(resultList->size() == 17,
                "get executeFunctionResult count is not 17");
         for (size_t i = 0; i < resultList->size(); i++) {
-          sprintf(buf, "result[%zd] is null\n", i);
-          ASSERT(resultList->operator[](i) != nullptr, buf);
-          sprintf(buf, "get result[%zd]=%s", i,
-                  std::dynamic_pointer_cast<CacheableString>(
-                      resultList->operator[](i))
-                      ->value()
-                      .c_str());
-          LOG(buf);
-          verifyGetResults()
+          ASSERT(resultList->operator[](i) != nullptr,
+                 std::string("result [") + std::to_string(i) + "] is null");
+          LOG(std::string("get result [") + std::to_string(i) + "] is " +
+              std::dynamic_pointer_cast<CacheableString>(
+                  resultList->operator[](i))
+                  ->value());
+          TestUtils::verifyGetResults(resultList.get(), i);
         }
       }
     } catch (const Exception &excp) {
@@ -250,23 +236,21 @@
 DUNIT_TASK_DEFINITION(CLIENT1, Client1OnServerHATest)
   {
     auto regPtr0 = getHelper()->getRegion(poolRegNames[0]);
-    char buf[128];
 
     for (int i = 0; i < 34; i++) {
-      sprintf(buf, "VALUE--%d", i);
-      auto value = CacheableString::create(buf);
+      auto value =
+          CacheableString::create(std::string("VALUE--") + std::to_string(i));
 
-      sprintf(buf, "KEY--%d", i);
-      auto key = CacheableString::create(buf);
+      auto key =
+          CacheableString::create(std::string("KEY--") + std::to_string(i));
       regPtr0->put(key, value);
     }
     SLEEP(10000);  // let the put finish
     try {
       auto routingObj = CacheableVector::create();
-      for (int i = 0; i < 34; i++) {
-        if (i % 2 == 0) continue;
-        sprintf(buf, "KEY--%d", i);
-        auto key = CacheableKey::create(buf);
+      for (int i = 1; i < 35; i += 2) {
+        auto key =
+            CacheableString::create(std::string("KEY--") + std::to_string(i));
         routingObj->push_back(key);
       }
 
@@ -286,9 +270,8 @@
       if (executeFunctionResult == nullptr) {
         ASSERT(false, "get executeFunctionResult is nullptr");
       } else {
-        sprintf(buf, "echo String : result count = %zd",
-                executeFunctionResult->size());
-        LOG(buf);
+        LOG(std::string("echo String : result count = ") +
+            std::to_string(executeFunctionResult->size()));
         resultList->clear();
         for (unsigned item = 0;
              item < static_cast<uint32_t>(executeFunctionResult->size());
@@ -300,20 +283,19 @@
             resultList->push_back(arrayList->operator[](pos));
           }
         }
-        sprintf(buf, "get result count = %zd", resultList->size());
-        LOG(buf);
+        LOG(std::string("get result count = ") +
+            std::to_string(resultList->size()));
         ASSERT(resultList->size() == 17,
                "get executeFunctionResult count is not 17");
         for (size_t i = 0; i < resultList->size(); i++) {
-          sprintf(buf, "result[%zd] is null\n", i);
-          ASSERT(resultList->operator[](i) != nullptr, buf);
-          sprintf(buf, "get result[%zd]=%s", i,
-                  std::dynamic_pointer_cast<CacheableString>(
-                      resultList->operator[](i))
-                      ->value()
-                      .c_str());
-          LOG(buf);
-          verifyGetResults()
+          ASSERT(resultList->operator[](i) != nullptr,
+                 std::string("result [") + std::to_string(i) + "] is null");
+          auto msg = std::string("get result [") + std::to_string(i) + "] is " +
+                     std::dynamic_pointer_cast<CacheableString>(
+                         resultList->operator[](i))
+                         ->value();
+          LOG(msg);
+          TestUtils::verifyGetResults(resultList.get(), i);
         }
       }
 
@@ -326,9 +308,8 @@
       if (executeFunctionResult1 == nullptr) {
         ASSERT(false, "get executeFunctionResult1 is nullptr");
       } else {
-        sprintf(buf, "echo String : result count = %zd",
-                executeFunctionResult1->size());
-        LOG(buf);
+        LOG(std::string("echo String : result count = ") +
+            std::to_string(executeFunctionResult->size()));
         resultList->clear();
         for (unsigned item = 0;
              item < static_cast<uint32_t>(executeFunctionResult1->size());
@@ -340,20 +321,21 @@
             resultList->push_back(arrayList->operator[](pos));
           }
         }
-        sprintf(buf, "get result count = %zd", resultList->size());
-        LOG(buf);
+        LOG(std::string("get result count = ") +
+            std::to_string(resultList->size()));
         ASSERT(resultList->size() == 17,
                "get executeFunctionResult1 count is not 17");
         for (size_t i = 0; i < resultList->size(); i++) {
-          sprintf(buf, "result[%zd] is null\n", i);
-          ASSERT(resultList->operator[](i) != nullptr, buf);
-          sprintf(buf, "get result[%zd]=%s", i,
-                  std::dynamic_pointer_cast<CacheableString>(
-                      resultList->operator[](i))
-                      ->value()
-                      .c_str());
-          LOG(buf);
-          verifyGetResults()
+          LOG(std::string("get result count = ") +
+              std::to_string(resultList->size()));
+          ASSERT(resultList->operator[](i) != nullptr,
+                 std::string("result [") + std::to_string(i) + "] is null");
+          auto msg = std::string("get result [") + std::to_string(i) + "] is " +
+                     std::dynamic_pointer_cast<CacheableString>(
+                         resultList->operator[](i))
+                         ->value();
+          LOG(msg);
+          TestUtils::verifyGetResults(resultList.get(), i);
         }
       }
     } catch (const Exception &excp) {
diff --git a/cppcache/integration-test/testThinClientPoolLocator.cpp b/cppcache/integration-test/testThinClientPoolLocator.cpp
index 3c38346..12783db 100644
--- a/cppcache/integration-test/testThinClientPoolLocator.cpp
+++ b/cppcache/integration-test/testThinClientPoolLocator.cpp
@@ -24,9 +24,9 @@
 bool isLocalServer = false;
 bool isLocator = false;
 
-const char *locHostPort1 =
+const std::string locHostPort1 =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
-const char *locHostPort2 =
+const std::string locHostPort2 =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 2);
 #define CLIENT1 s1p1
 #define CLIENT2 s1p2
diff --git a/cppcache/integration-test/testThinClientPoolRedundancy.cpp b/cppcache/integration-test/testThinClientPoolRedundancy.cpp
index 59258b3..d7780e5 100644
--- a/cppcache/integration-test/testThinClientPoolRedundancy.cpp
+++ b/cppcache/integration-test/testThinClientPoolRedundancy.cpp
@@ -30,7 +30,7 @@
 
 bool isLocalServer = false;
 bool isLocator = false;
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 const char *poolRegNames[] = {"PoolRegion1", "PoolRegion2", "PoolRegion3"};
 const char *poolNames[] = {"Pool1", "Pool2", "Pool3"};
@@ -274,12 +274,10 @@
 
     ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
 
-    char buf[1024];
-    sprintf(buf, "get returned %s for key %s", checkPtr->value().c_str(),
-            keys[1]);
-    LOG(buf);
+    LOG(std::string("get returned ") + checkPtr->value() + " for key " +
+        keys[1]);
 
-    if (strcmp(checkPtr->value().c_str(), nvals[1]) != 0) {
+    if (checkPtr->value() != nvals[1]) {
       LOG("ServerGroup2 is not available. So poolRegion2 returned old value..");
       return;
     }
diff --git a/cppcache/integration-test/testThinClientPoolRegInterest.cpp b/cppcache/integration-test/testThinClientPoolRegInterest.cpp
index 94284ad..35dc5b7 100644
--- a/cppcache/integration-test/testThinClientPoolRegInterest.cpp
+++ b/cppcache/integration-test/testThinClientPoolRegInterest.cpp
@@ -28,7 +28,7 @@
 bool isLocalServer = false;
 bool isLocator = false;
 
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 const char *poolRegNames[] = {"PoolRegion1", "PoolRegion2"};
 const char *poolName = "__TEST_POOL1__";
diff --git a/cppcache/integration-test/testThinClientPoolServer.cpp b/cppcache/integration-test/testThinClientPoolServer.cpp
index 65c1a2d..a565617 100644
--- a/cppcache/integration-test/testThinClientPoolServer.cpp
+++ b/cppcache/integration-test/testThinClientPoolServer.cpp
@@ -33,7 +33,7 @@
 bool isLocalServer = false;
 bool isLocator = false;
 
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 const char *poolRegNames[] = {"PoolRegion1", "PoolRegion2", "PoolRegion3"};
 const char *poolName = "__TEST_POOL1__";
@@ -83,7 +83,7 @@
   {
     initClient(true);
     // Create Pool with no server group
-    getHelper()->createPool(poolName, locHostPort, nullptr);
+    getHelper()->createPool(poolName, locHostPort, {});
 
     getHelper()->createRegionAndAttachPool(poolRegNames[0], USE_ACK,
                                            "__TEST_POOL1__");
@@ -187,7 +187,6 @@
   {
     CALL_TASK(StartLocator1);
     CALL_TASK(StartServers);
-    ;
     CALL_TASK(StartClient1);
     CALL_TASK(StartClient2);
     CALL_TASK(CreateClient1Entries);
diff --git a/cppcache/integration-test/testThinClientPutAllPRSingleHop.cpp b/cppcache/integration-test/testThinClientPutAllPRSingleHop.cpp
deleted file mode 100644
index 541e211..0000000
--- a/cppcache/integration-test/testThinClientPutAllPRSingleHop.cpp
+++ /dev/null
@@ -1,403 +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.
- */
-
-#define ROOT_NAME "testThinClientPutAllPRSingleHop"
-#define ROOT_SCOPE DISTRIBUTED_ACK
-
-#include <string>
-
-#include <ace/ACE.h>
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-
-#include <statistics/StatisticsFactory.hpp>
-
-#include "fw_dunit.hpp"
-#include "BuiltinCacheableWrappers.hpp"
-#include "Utils.hpp"
-
-#include "CacheHelper.hpp"
-
-// Include these 2 headers for access to CacheImpl for test hooks.
-#include "CacheImplHelper.hpp"
-#include "testUtils.hpp"
-
-#include "ThinClientHelper.hpp"
-
-#define CLIENT1 s1p1
-#define SERVER1 s2p1
-#define SERVER2 s1p2
-#define SERVER3 s2p2
-
-using apache::geode::client::Cacheable;
-using apache::geode::client::CacheServerException;
-using apache::geode::client::CacheWriterException;
-using apache::geode::client::Exception;
-using apache::geode::client::HashMapOfCacheable;
-
-bool isLocalServer = false;
-
-static bool isLocator = false;
-const char *locatorsG =
-    CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
-
-DUNIT_TASK_DEFINITION(SERVER1, CreateServer1)
-  {
-    if (isLocalServer) {
-      CacheHelper::initServer(1, "cacheserver1_partitioned.xml");
-    }
-    LOG("SERVER1 started");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER2, CreateServer2)
-  {
-    if (isLocalServer) {
-      CacheHelper::initServer(2, "cacheserver2_partitioned.xml");
-    }
-    LOG("SERVER2 started");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER3, CreateServer3)
-  {
-    if (isLocalServer) {
-      CacheHelper::initServer(3, "cacheserver3_partitioned.xml");
-    }
-    LOG("SERVER3 started");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepOne_Pooled_Endpoint)
-  {
-    initClient(true);
-
-    // getHelper()->createPoolWithEPs("__TEST_POOL1__", endpoints);
-    getHelper()->createRegionAndAttachPool(
-        regionNames[0], USE_ACK, "__TEST_POOL1__",
-        true /*false:: caching disabled originally*/);
-    getHelper()->createRegionAndAttachPool(regionNames[1], NO_ACK,
-                                           "__TEST_POOL1__", true);
-
-    LOG("StepOne_Pooled_EndPoint complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepOne_Pooled_EndpointTL)
-  {
-    initClient(true);
-
-    auto regPtr = getHelper()->createPooledRegionStickySingleHop(
-        regionNames[0], USE_ACK, nullptr, "__TEST_POOL1__", false, false);
-    ASSERT(regPtr != nullptr, "Failed to create region.");
-    regPtr = getHelper()->createPooledRegionStickySingleHop(
-        regionNames[1], NO_ACK, nullptr, "__TEST_POOL1__", false, false);
-    ASSERT(regPtr != nullptr, "Failed to create region.");
-
-    LOG("StepOne_Pooled_EndPointTL complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, WarmUpTask)
-  {
-    LOG("WarmUpTask started.");
-    int failureCount = 0;
-    auto dataReg = getHelper()->getRegion(regionNames[0]);
-
-    // This is to get MetaDataService going.
-    for (int i = 3000; i < 8000; i++) {
-      auto keyPtr =
-          std::dynamic_pointer_cast<CacheableKey>(CacheableInt32::create(i));
-      try {
-        LOGINFO("CPPTEST: put item %d", i);
-        dataReg->put(keyPtr, keyPtr->hashcode());
-        bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                              ->getAndResetNetworkHopFlag();
-        LOGINFO("WarmUpTask: networkhop is %d ", networkhop);
-        if (networkhop) {
-          failureCount++;
-        }
-        LOGINFO("CPPTEST: put success ");
-      } catch (CacheServerException &) {
-        // This is actually a success situation!
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: Put caused extra hop.");
-        FAIL("Put caused extra hop.");
-        //}
-        // LOGINFO("CPPTEST: SINGLEHOP SUCCEEDED while putting key %s with
-        // hashcode %d", logmsg, (int32_t)keyPtr->hashcode());
-      } catch (CacheWriterException &) {
-        // This is actually a success situation! Once bug #521 is fixed.
-        // bool singlehop = TestUtils::getCacheImpl(getHelper(
-        // )->cachePtr)->getAndResetSingleHopFlag();
-        // if (!singlehop) {
-        LOGERROR("CPPTEST: Put caused extra hop.");
-        FAIL("Put caused extra hop.");
-        //}
-        // LOGINFO("CPPTEST: SINGLEHOP SUCCEEDED while putting key %s with
-        // hashcode %d", logmsg, (int32_t)keyPtr->hashcode());
-      } catch (Exception &ex) {
-        LOGERROR("CPPTEST: Unexpected %s: %s", ex.getName().c_str(), ex.what());
-        FAIL(ex.what());
-      } catch (...) {
-        LOGERROR("CPPTEST: Put caused random exception in WarmUpTask");
-        cleanProc();
-        FAIL("Put caused unexpected exception");
-      }
-    }
-    // it takes time to fetch prmetadata so relaxing this limit
-    ASSERT(failureCount < 100, "Count should be less than 100");
-
-    SLEEP(20000);
-
-    LOG("WarmUpTask completed.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask)
-  {
-    LOG("CheckPrSingleHopForIntKeysTask started.");
-
-    auto dataReg = getHelper()->getRegion(regionNames[0]);
-
-    LOG("CheckPrSingleHopForIntKeysTask get completed.");
-
-    {
-      LOGINFO("Iteration putALL Start ");
-      try {
-        HashMapOfCacheable valMap;
-
-        for (int j = 1000; j < 25000; j++) {
-          auto keyPtr = std::dynamic_pointer_cast<CacheableKey>(
-              CacheableInt32::create(j));
-          auto valPtr = std::dynamic_pointer_cast<Cacheable>(
-              CacheableInt32::create(keyPtr->hashcode()));
-          LOGINFO("CPPTEST: putALL CASE:: getting key %d with hashcode %d", j,
-                  keyPtr->hashcode());
-          valMap.emplace(keyPtr, valPtr);
-        }
-        LOGINFO("TEST-1");
-        ACE_Time_Value startTime = ACE_OS::gettimeofday();
-        dataReg->putAll(valMap);
-        ACE_Time_Value interval = ACE_OS::gettimeofday() - startTime;
-
-        LOGINFO("Time taken to execute putAll SH sec = %d and MSec = %d ",
-                interval.sec(), interval.usec());
-        bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                              ->getAndResetNetworkHopFlag();
-        LOGINFO("CheckPrSingleHopForIntKeysTask2: putALL OP :: networkhop %d ",
-                networkhop);
-        ASSERT(networkhop == false, "PutAll : Should not cause network hop");
-      } catch (CacheServerException &) {
-        LOGERROR("CPPTEST: putAll caused extra hop.");
-        FAIL("putAll caused extra hop.");
-      } catch (CacheWriterException &) {
-        LOGERROR("CPPTEST: putAll caused extra hop.");
-        FAIL("putAll caused extra hop.");
-      } catch (Exception &ex) {
-        LOGERROR("CPPTEST: putAll caused unexpected %s: %s",
-                 ex.getName().c_str(), ex.what());
-        cleanProc();
-        FAIL("putAll caused unexpected exception");
-      } catch (...) {
-        LOGERROR("CPPTEST: putAll caused random exception");
-        cleanProc();
-        FAIL("putAll caused unexpected exception");
-      }
-    }
-    int poolconn = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                       ->getPoolSize("__TEST_POOL1__");
-    LOGINFO("CheckPrSingleHopForIntKeysTask: poolconn is %d ", poolconn);
-    LOG("CheckPrSingleHopForIntKeysTask get completed.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopRemoveAllForIntKeysTask)
-  {
-    LOG("CheckPrSingleHopRemoveAllForIntKeysTask started.");
-
-    auto dataReg = getHelper()->getRegion(regionNames[0]);
-
-    LOG("CheckPrSingleHopForIntKeysTask get completed.");
-
-    {
-      LOGINFO("Iteration removeAll Start ");
-      try {
-        HashMapOfCacheable valMap;
-        std::vector<std::shared_ptr<CacheableKey>> keysVector;
-        for (int j = 1000; j < 25000; j++) {
-          auto keyPtr = CacheableInt32::create(j);
-          auto valPtr = CacheableInt32::create(keyPtr->hashcode());
-          LOGINFO("CPPTEST: removeall CASE:: getting key %d with hashcode %d",
-                  j, keyPtr->hashcode());
-          valMap.emplace(keyPtr, valPtr);
-          keysVector.push_back(keyPtr);
-        }
-        LOGINFO("TEST-1");
-        ACE_Time_Value startTime = ACE_OS::gettimeofday();
-        dataReg->putAll(valMap);
-        ACE_Time_Value interval = ACE_OS::gettimeofday() - startTime;
-
-        LOGINFO("Time taken to execute putAll SH sec = %d and MSec = %d ",
-                interval.sec(), interval.usec());
-        bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                              ->getAndResetNetworkHopFlag();
-        LOGINFO("CheckPrSingleHopForIntKeysTask2: putALL OP :: networkhop %d ",
-                networkhop);
-        ASSERT(networkhop == false, "PutAll : Should not cause network hop");
-
-        LOGINFO("RemoveALL test");
-        startTime = ACE_OS::gettimeofday();
-        dataReg->removeAll(keysVector);
-        interval = ACE_OS::gettimeofday() - startTime;
-
-        LOGINFO("Time taken to execute removeAll SH sec = %d and MSec = %d ",
-                interval.sec(), interval.usec());
-        networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                         ->getAndResetNetworkHopFlag();
-        LOGINFO(
-            "CheckPrSingleHopForIntKeysTask2: removeall OP :: networkhop %d ",
-            networkhop);
-        ASSERT(networkhop == false, "RemoveAll : Should not cause network hop");
-      } catch (CacheServerException &) {
-        LOGERROR("CPPTEST: removeall caused extra hop.");
-        FAIL("removeall caused extra hop.");
-      } catch (CacheWriterException &) {
-        LOGERROR("CPPTEST: removeall caused extra hop.");
-        FAIL("removeall caused extra hop.");
-      } catch (Exception &ex) {
-        LOGERROR("CPPTEST: removeall caused unexpected %s: %s",
-                 ex.getName().c_str(), ex.what());
-        cleanProc();
-        FAIL("putAll caused unexpected exception");
-      } catch (...) {
-        LOGERROR("CPPTEST: removeall caused random exception");
-        cleanProc();
-        FAIL("removeall caused unexpected exception");
-      }
-    }
-    int poolconn = TestUtils::getCacheImpl(getHelper()->cachePtr)
-                       ->getPoolSize("__TEST_POOL1__");
-    LOGINFO("CheckPrSingleHopRemoveAllForIntKeysTask: poolconn is %d ",
-            poolconn);
-    LOG("CheckPrSingleHopRemoveAllForIntKeysTask get completed.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, CloseCache1)
-  {
-    auto pool =
-        getHelper()->getCache()->getPoolManager().find("__TEST_POOL1__");
-    if (pool->getThreadLocalConnections()) {
-      LOG("releaseThreadLocalConnection1 doing...");
-      pool->releaseThreadLocalConnection();
-      LOG("releaseThreadLocalConnection1 done");
-    }
-    cleanProc();
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER1, CloseServer1)
-  {
-    if (isLocalServer) {
-      CacheHelper::closeServer(1);
-      LOG("SERVER1 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER2, CloseServer2)
-  {
-    if (isLocalServer) {
-      CacheHelper::closeServer(2);
-      LOG("SERVER2 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER3, CloseServer3)
-  {
-    if (isLocalServer) {
-      CacheHelper::closeServer(3);
-      LOG("SERVER3 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_MAIN
-  {
-    CacheableHelper::registerBuiltins(true);
-
-    // First pool with endpoints
-    /////////////////////////////////////////////
-    /*TODO:: change k < 1 to its original k < 2*/
-    for (int k = 0; k < 1; k++) {
-      CALL_TASK(CreateServer1);
-      CALL_TASK(CreateServer2);
-      CALL_TASK(CreateServer3);
-
-      if (k == 0) {
-        CALL_TASK(StepOne_Pooled_Endpoint);
-      } else {
-        CALL_TASK(StepOne_Pooled_EndpointTL);  // StickySingleHop Case
-      }
-
-      CALL_TASK(WarmUpTask);  //
-
-      CALL_TASK(CheckPrSingleHopForIntKeysTask);  //
-
-      CALL_TASK(CloseCache1);
-
-      CALL_TASK(CloseServer1);
-      CALL_TASK(CloseServer2);
-      CALL_TASK(CloseServer3);
-    }
-  }
-END_MAIN
-
-DUNIT_MAIN
-  {
-    CacheableHelper::registerBuiltins(true);
-
-    // First pool with endpoints
-    /////////////////////////////////////////////
-    /*TODO:: change k < 1 to its original k < 2*/
-    for (int k = 0; k < 1; k++) {
-      CALL_TASK(CreateServer1);
-      CALL_TASK(CreateServer2);
-      CALL_TASK(CreateServer3);
-
-      if (k == 0) {
-        CALL_TASK(StepOne_Pooled_Endpoint);
-      } else {
-        CALL_TASK(StepOne_Pooled_EndpointTL);  // StickySingleHop Case
-      }
-
-      CALL_TASK(WarmUpTask);  //
-
-      CALL_TASK(CheckPrSingleHopRemoveAllForIntKeysTask);  //
-
-      CALL_TASK(CloseCache1);
-
-      CALL_TASK(CloseServer1);
-      CALL_TASK(CloseServer2);
-      CALL_TASK(CloseServer3);
-    }
-  }
-END_MAIN
diff --git a/cppcache/integration-test/testThinClientPutWithDelta.cpp b/cppcache/integration-test/testThinClientPutWithDelta.cpp
index fee7eb7..2921a92 100644
--- a/cppcache/integration-test/testThinClientPutWithDelta.cpp
+++ b/cppcache/integration-test/testThinClientPutWithDelta.cpp
@@ -33,7 +33,7 @@
 bool isLocalServer = false;
 
 static bool isLocator = false;
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #define CLIENT1 s1p1
 #define CLIENT2 s1p2
@@ -76,13 +76,15 @@
   return cacheHelper;
 }
 
-void createPooledRegion(const char *name, bool ackMode, const char *locators,
-                        const char *poolname,
+void createPooledRegion(const std::string &name, bool ackMode,
+                        const std::string &locators,
+                        const std::string &poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -93,8 +95,9 @@
 void createRegion(const char *name, bool ackMode, const char *endpoints,
                   bool clientNotificationEnabled = false) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   // ack, caching
   auto regPtr = getHelper()->createRegion(name, ackMode, true, nullptr,
                                           endpoints, clientNotificationEnabled);
diff --git a/cppcache/integration-test/testThinClientRegionQueryDifferentServerConfigs.cpp b/cppcache/integration-test/testThinClientRegionQueryDifferentServerConfigs.cpp
index 8180af3..22908e2 100644
--- a/cppcache/integration-test/testThinClientRegionQueryDifferentServerConfigs.cpp
+++ b/cppcache/integration-test/testThinClientRegionQueryDifferentServerConfigs.cpp
@@ -44,7 +44,7 @@
 bool isLocalServer = false;
 bool isLocator = false;
 const char *poolNames[] = {"Pool1", "Pool2", "Pool3"};
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 
 const char *qRegionNames[] = {"Portfolios", "Positions"};
@@ -119,7 +119,7 @@
       results = qry->execute();
       FAIL("Expected a QueryException");
     } catch (const QueryException &ex) {
-      printf("Good expected exception: %s\n", ex.what());
+      std::cout << "Good expected exception : " << ex.what() << "\n";
     }
 
     // now region queries
@@ -131,7 +131,7 @@
       results = reg->query(qry2Str.c_str());
       FAIL("Expected a QueryException");
     } catch (const QueryException &ex) {
-      printf("Good expected exception: %s\n", ex.what());
+      std::cout << "Good expected exception : " << ex.what() << "\n";
     }
 
     LOG("StepOne complete.");
@@ -177,7 +177,7 @@
       results = reg->query(qry1Str.c_str());
       FAIL("Expected a QueryException");
     } catch (const QueryException &ex) {
-      printf("Good expected exception: %s\n", ex.what());
+      std::cout << "Good expected exception : " << ex.what() << "\n";
     }
     results = reg->query(qry2Str.c_str());
     ASSERT(results->size() == static_cast<size_t>(qh.getPositionSetSize() *
diff --git a/cppcache/integration-test/testThinClientRegionQueryExclusiveness.cpp b/cppcache/integration-test/testThinClientRegionQueryExclusiveness.cpp
index c28396d..b2f53f2 100644
--- a/cppcache/integration-test/testThinClientRegionQueryExclusiveness.cpp
+++ b/cppcache/integration-test/testThinClientRegionQueryExclusiveness.cpp
@@ -16,9 +16,7 @@
  */
 
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-#include <ace/Task.h>
+
 #include <string>
 
 #define ROOT_NAME "testThinClientRegionQueryExclusiveness"
@@ -50,7 +48,7 @@
 bool isLocator = false;
 bool isLocalServer = false;
 const char *poolNames[] = {"Pool1", "Pool2", "Pool3"};
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 
 const char *qRegionNames[] = {"Portfolios", "Positions"};
@@ -71,7 +69,7 @@
   }
 
   std::shared_ptr<Pool> pool1 = nullptr;
-  pool1 = createPool(poolNames[0], locHostPort, nullptr, 0, true);
+  pool1 = createPool(poolNames[0], locHostPort, {}, 0, true);
   createRegionAndAttachPool(qRegionNames[0], USE_ACK, poolNames[0]);
 
   auto rptr = getHelper()->cachePtr->getRegion(qRegionNames[0]);
diff --git a/cppcache/integration-test/testThinClientRemoteQueryFailover.cpp b/cppcache/integration-test/testThinClientRemoteQueryFailover.cpp
index cae59fa..ecbcb45 100644
--- a/cppcache/integration-test/testThinClientRemoteQueryFailover.cpp
+++ b/cppcache/integration-test/testThinClientRemoteQueryFailover.cpp
@@ -16,9 +16,7 @@
  */
 
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-#include <ace/Task.h>
+
 #include <string>
 
 #define ROOT_NAME "testThinClientRemoteQueryFailover"
@@ -53,26 +51,23 @@
 using testobject::Position;
 using testobject::PositionPdx;
 
-class KillServerThread : public ACE_Task_Base {
+class KillServerThread {
  public:
-  bool m_running;
-  KillServerThread() : m_running(false) {}
-  int svc(void) {
-    while (m_running == true) {
+  void start() {
+    thread_ = std::thread{[]() {
       CacheHelper::closeServer(1);
       LOG("THREAD CLOSED SERVER 1");
-      m_running = false;
-    }
-    return 0;
+    }};
   }
-  void start() {
-    m_running = true;
-    activate();
-  }
+
   void stop() {
-    m_running = false;
-    wait();
+    if (thread_.joinable()) {
+      thread_.join();
+    }
   }
+
+ protected:
+  std::thread thread_;
 };
 
 bool isLocator = false;
@@ -81,7 +76,7 @@
 const char *qRegionNames[] = {"Portfolios", "Positions"};
 KillServerThread *kst = nullptr;
 const char *poolNames[] = {"Pool1", "Pool2", "Pool3"};
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 bool isPoolConfig = false;  // To track if pool case is running
 
@@ -139,7 +134,7 @@
     }
 
     isPoolConfig = true;
-    createPool(poolNames[0], locHostPort, nullptr, 0, true);
+    createPool(poolNames[0], locHostPort, {}, 0, true);
     createRegionAndAttachPool(qRegionNames[0], USE_ACK, poolNames[0]);
 
     auto rptr = getHelper()->cachePtr->getRegion(qRegionNames[0]);
@@ -184,7 +179,8 @@
         auto resultsize = results->size();
 
         if (i % 100 == 0) {
-          printf("Iteration upto %d done, result size is %zd\n", i, resultsize);
+          std::cout << "Iteration upto " << i << " done, result size is "
+                    << resultsize << "\n";
         }
 
         if (resultsize != 4)  // the XMLs for server 1 and server 2 have 1 and 2
@@ -197,13 +193,13 @@
 
       kst->stop();
     } catch (IllegalStateException &ise) {
-      char isemsg[500] = {0};
-      ACE_OS::snprintf(isemsg, 499, "IllegalStateException: %s", ise.what());
-      LOG(isemsg);
-      FAIL(isemsg);
+      std::string excpmsg = "IllegalStateException: " + std::string{ise.what()};
+
+      LOG(excpmsg);
+      FAIL(excpmsg);
     } catch (Exception &excp) {
-      char excpmsg[500] = {0};
-      ACE_OS::snprintf(excpmsg, 499, "Exception: %s", excp.what());
+      std::string excpmsg = "Exception: " + std::string{excp.what()};
+
       LOG(excpmsg);
       FAIL(excpmsg);
     } catch (...) {
diff --git a/cppcache/integration-test/testThinClientRemoteQueryFailoverPdx.cpp b/cppcache/integration-test/testThinClientRemoteQueryFailoverPdx.cpp
index eb486ac..c7c65db 100644
--- a/cppcache/integration-test/testThinClientRemoteQueryFailoverPdx.cpp
+++ b/cppcache/integration-test/testThinClientRemoteQueryFailoverPdx.cpp
@@ -15,9 +15,7 @@
  * limitations under the License.
  */
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-#include <ace/Task.h>
+
 #include <string>
 
 #define ROOT_NAME "testThinClientRemoteQueryFailoverPdx"
@@ -50,26 +48,23 @@
 using apache::geode::client::QueryService;
 using apache::geode::client::SelectResults;
 
-class KillServerThread : public ACE_Task_Base {
+class KillServerThread {
  public:
-  bool m_running;
-  KillServerThread() : m_running(false) {}
-  int svc(void) {
-    while (m_running == true) {
+  void start() {
+    thread_ = std::thread{[]() {
       CacheHelper::closeServer(1);
       LOG("THREAD CLOSED SERVER 1");
-      m_running = false;
-    }
-    return 0;
+    }};
   }
-  void start() {
-    m_running = true;
-    activate();
-  }
+
   void stop() {
-    m_running = false;
-    wait();
+    if (thread_.joinable()) {
+      thread_.join();
+    }
   }
+
+ protected:
+  std::thread thread_;
 };
 
 bool isLocator = false;
@@ -78,7 +73,7 @@
 const char *qRegionNames[] = {"Portfolios", "Positions"};
 KillServerThread *kst = nullptr;
 const char *poolNames[] = {"Pool1", "Pool2", "Pool3"};
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 bool isPoolConfig = false;  // To track if pool case is running
 
@@ -135,7 +130,7 @@
     }
 
     isPoolConfig = true;
-    createPool(poolNames[0], locHostPort, nullptr, 0, true);
+    createPool(poolNames[0], locHostPort, {}, 0, true);
     createRegionAndAttachPool(qRegionNames[0], USE_ACK, poolNames[0]);
 
     auto rptr = getHelper()->cachePtr->getRegion(qRegionNames[0]);
@@ -180,7 +175,8 @@
         auto resultsize = results->size();
 
         if (i % 100 == 0) {
-          printf("Iteration upto %d done, result size is %zd\n", i, resultsize);
+          std::cout << "Iteration upto " << i << " done, result size is "
+                    << resultsize << "\n";
         }
 
         if (resultsize != 4)  // the XMLs for server 1 and server 2 have 1 and 2
@@ -193,13 +189,13 @@
 
       kst->stop();
     } catch (IllegalStateException &ise) {
-      char isemsg[500] = {0};
-      ACE_OS::snprintf(isemsg, 499, "IllegalStateException: %s", ise.what());
-      LOG(isemsg);
-      FAIL(isemsg);
+      std::string excpmsg = "IllegalStateException: " + std::string{ise.what()};
+
+      LOG(excpmsg);
+      FAIL(excpmsg);
     } catch (Exception &excp) {
-      char excpmsg[500] = {0};
-      ACE_OS::snprintf(excpmsg, 499, "Exception: %s", excp.what());
+      std::string excpmsg = "Exception: " + std::string{excp.what()};
+
       LOG(excpmsg);
       FAIL(excpmsg);
     } catch (...) {
diff --git a/cppcache/integration-test/testThinClientRemoteQueryRS.cpp b/cppcache/integration-test/testThinClientRemoteQueryRS.cpp
index f47033a..54ba991 100644
--- a/cppcache/integration-test/testThinClientRemoteQueryRS.cpp
+++ b/cppcache/integration-test/testThinClientRemoteQueryRS.cpp
@@ -15,8 +15,6 @@
  * limitations under the License.
  */
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include <string>
 
 #define ROOT_NAME "testThinClientRemoteQueryRS"
@@ -58,7 +56,7 @@
 bool isLocalServer = false;
 
 const char *poolNames[] = {"Pool1", "Pool2", "Pool3"};
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 bool isPoolConfig = false;  // To track if pool case is running
 const char *qRegionNames[] = {"Portfolios", "Positions", "Portfolios2",
@@ -83,7 +81,7 @@
     // ignore exception
   }
   isPoolConfig = true;
-  createPool(poolNames[0], locHostPort, nullptr, 0, true);
+  createPool(poolNames[0], locHostPort, {}, 0, true);
   createRegionAndAttachPool(qRegionNames[0], USE_ACK, poolNames[0]);
   createRegionAndAttachPool(qRegionNames[1], USE_ACK, poolNames[0]);
   createRegionAndAttachPool(qRegionNames[2], USE_ACK, poolNames[0]);
@@ -150,10 +148,8 @@
 
     QueryHelper *qh = &QueryHelper::getHelper();
 
-    char buf[100];
-    sprintf(buf, "SetSize %zd, NumSets %zd", qh->getPortfolioSetSize(),
-            qh->getPortfolioNumSets());
-    LOG(buf);
+    LOG(std::string("SetSize") + std::to_string(qh->getPortfolioSetSize()) +
+        ", NumSets " + std::to_string(qh->getPortfolioNumSets()));
 
     if (!m_isPdx) {
       qh->populatePortfolioData(regPtr0, qh->getPortfolioSetSize(),
@@ -202,9 +198,8 @@
       auto qry = qs->newQuery(resultsetQueriesOPL[i].query());
       auto results = qry->execute();
       if (!qh->verifyRS(results, resultsetRowCountsOPL[i])) {
-        char failmsg[100] = {0};
-        ACE_OS::sprintf(failmsg, "Query verify failed for query index %d", i);
-        ASSERT(false, failmsg);
+        ASSERT(false,
+               "Query verify failed for query index " + std::to_string(i));
       }
 
       auto rsptr = std::dynamic_pointer_cast<ResultSet>(results);
@@ -216,21 +211,21 @@
         if (!m_isPdx) {
           auto ser = (*rsptr)[rows];
           if (auto portfolio = std::dynamic_pointer_cast<Portfolio>(ser)) {
-            printf(
-                "   query idx %d pulled portfolio object ID %d, pkid  :: %s\n",
-                i, portfolio->getID(), portfolio->getPkid()->value().c_str());
+            std::cout << "   query idx " << i << " pulled portfolio object ID "
+                      << portfolio->getID()
+                      << ", pkid  :: " << portfolio->getPkid()->value() << "\n";
           } else if (auto position = std::dynamic_pointer_cast<Position>(ser)) {
-            printf(
-                "   query idx %d pulled position object secId %s, shares  :: "
-                "%d\n",
-                i, position->getSecId()->value().c_str(),
-                position->getSharesOutstanding());
+            std::cout << "   query idx " << i
+                      << " pulled position object secId "
+                      << position->getSecId()->value()
+                      << ", shares  :: " << position->getSharesOutstanding()
+                      << "\n";
           } else {
             if (ser != nullptr) {
-              printf(" query idx %d pulled object %s \n", i,
-                     ser->toString().c_str());
+              std::cout << " query idx " << i << " pulled object "
+                        << ser->toString() << " \n";
             } else {
-              printf("   query idx %d pulled bad object \n", i);
+              std::cout << "   query idx " << i << " pulled bad object \n";
               FAIL("Unexpected object received in query");
             }
           }
@@ -238,24 +233,22 @@
           auto pdxser = (*rsptr)[rows];
           if (auto portfoliopdx =
                   std::dynamic_pointer_cast<PortfolioPdx>(pdxser)) {
-            printf(
-                "   query idx %d pulled portfolioPdx object ID %d, pkid %s  :: "
-                "\n",
-                i, portfoliopdx->getID(), portfoliopdx->getPkid().c_str());
+            std::cout << "   query idx " << i
+                      << " pulled portfolioPdx object ID "
+                      << portfoliopdx->getID() << ", pkid  "
+                      << portfoliopdx->getPkid() << "\n";
           } else if (auto positionpdx =
                          std::dynamic_pointer_cast<PositionPdx>(pdxser)) {
-            printf(
-                "   query idx %d pulled positionPdx object secId %s, shares %d "
-                " "
-                ":: \n",
-                i, positionpdx->getSecId().c_str(),
-                positionpdx->getSharesOutstanding());
+            std::cout << "   query idx " << i
+                      << " pulled positionPdx object secId "
+                      << positionpdx->getSecId() << ", shares "
+                      << positionpdx->getSharesOutstanding() << "  :: \n";
           } else {
             if (pdxser != nullptr) {
-              printf(" query idx %d pulled object %s  :: \n", i,
-                     pdxser->toString().c_str());
+              std::cout << " query idx " << i << " pulled object "
+                        << pdxser->toString() << "  :: \n";
             } else {
-              printf("   query idx %d pulled bad object  :: \n", i);
+              std::cout << "   query idx " << i << " pulled bad object  :: \n";
               FAIL("Unexpected object received in query");
             }
           }
@@ -264,7 +257,7 @@
     }
 
     if (!doAnyErrorOccured) {
-      printf("HURRAY !! StepFour PASSED \n\n");
+      std::cout << "HURRAY !! StepFour PASSED \n\n";
     } else {
       FAIL("Failed in StepFour verification");
     }
@@ -303,8 +296,8 @@
                                         ? resultsetRowCounts[i]
                                         : resultsetRowCounts[i] *
                                               qh->getPortfolioNumSets()))) {
-          char failmsg[100] = {0};
-          ACE_OS::sprintf(failmsg, "Query verify failed for query index %d", i);
+          std::string failmsg =
+              "Query verify failed for query index " + std::to_string(i);
           ASSERT(false, failmsg);
         }
 
@@ -317,23 +310,23 @@
           if (!m_isPdx) {
             auto ser = (*rsptr)[rows];
             if (auto portfolio = std::dynamic_pointer_cast<Portfolio>(ser)) {
-              printf(
-                  "   query idx %d pulled portfolio object ID %d, pkid  :: "
-                  "%s\n",
-                  i, portfolio->getID(), portfolio->getPkid()->value().c_str());
+              std::cout << "   query idx " << i
+                        << " pulled portfolio object ID " << portfolio->getID()
+                        << ", pkid  :: " << portfolio->getPkid()->value()
+                        << "\n";
             } else if (auto position =
                            std::dynamic_pointer_cast<Position>(ser)) {
-              printf(
-                  "   query idx %d pulled position object secId %s, shares  :: "
-                  "%d\n",
-                  i, position->getSecId()->value().c_str(),
-                  position->getSharesOutstanding());
+              std::cout << "   query idx " << i
+                        << " pulled position object secId "
+                        << position->getSecId()->value()
+                        << ", shares  :: " << position->getSharesOutstanding()
+                        << "\n";
             } else {
               if (ser != nullptr) {
-                printf(" query idx %d pulled object %s \n", i,
-                       ser->toString().c_str());
+                std::cout << " query idx " << i << " pulled object "
+                          << ser->toString() << "\n";
               } else {
-                printf("   query idx %d pulled bad object \n", i);
+                std::cout << "   query idx " << i << " pulled bad object \n";
                 FAIL("Unexpected object received in query");
               }
             }
@@ -341,25 +334,22 @@
             auto pdxser = (*rsptr)[rows];
             if (auto portfoliopdx =
                     std::dynamic_pointer_cast<PortfolioPdx>(pdxser)) {
-              printf(
-                  "   query idx %d pulled portfolioPdx object ID %d, pkid %s  "
-                  ":: "
-                  "\n",
-                  i, portfoliopdx->getID(), portfoliopdx->getPkid().c_str());
+              std::cout << "   query idx " << i
+                        << " pulled portfoliopdx object ID "
+                        << portfoliopdx->getID()
+                        << ", pkid  :: " << portfoliopdx->getPkid() << "\n";
             } else if (auto positionpdx =
                            std::dynamic_pointer_cast<PositionPdx>(pdxser)) {
-              printf(
-                  "   query idx %d pulled positionPdx object secId %s, shares "
-                  "%d "
-                  " :: \n",
-                  i, positionpdx->getSecId().c_str(),
-                  positionpdx->getSharesOutstanding());
+              std::cout << "   query idx " << i
+                        << " pulled positionpdx object secId "
+                        << positionpdx->getSecId() << ", shares  :: "
+                        << positionpdx->getSharesOutstanding() << "\n";
             } else {
               if (pdxser != nullptr) {
-                printf(" query idx %d pulled object %s  :: \n", i,
-                       pdxser->toString().c_str());
+                std::cout << " query idx " << i << " pulled object "
+                          << pdxser->toString() << "\n";
               } else {
-                printf("   query idx %d pulled bad object  :: \n", i);
+                std::cout << "   query idx " << i << " pulled bad object \n";
                 FAIL("Unexpected object received in query");
               }
             }
@@ -369,7 +359,7 @@
     }
 
     if (!doAnyErrorOccured) {
-      printf("HURRAY !! We PASSED \n\n");
+      std::cout << "HURRAY !! We PASSED \n\n";
     } else {
       FAIL("Failed in StepFive verification");
     }
@@ -414,8 +404,8 @@
                                         ? resultsetRowCountsPQ[i]
                                         : resultsetRowCountsPQ[i] *
                                               qh->getPortfolioNumSets()))) {
-          char failmsg[100] = {0};
-          ACE_OS::sprintf(failmsg, "Query verify failed for query index %d", i);
+          std::string failmsg =
+              "Query verify failed for query index " + std::to_string(i);
           ASSERT(false, failmsg);
         }
 
@@ -428,23 +418,23 @@
           if (!m_isPdx) {
             auto ser = (*rsptr)[rows];
             if (auto portfolio = std::dynamic_pointer_cast<Portfolio>(ser)) {
-              printf(
-                  "   query idx %d pulled portfolio object ID %d, pkid %s : \n",
-                  i, portfolio->getID(), portfolio->getPkid()->value().c_str());
+              std::cout << "   query idx " << i
+                        << " pulled portfolio object ID " << portfolio->getID()
+                        << ", pkid  :: " << portfolio->getPkid()->value()
+                        << "\n";
             } else if (auto position =
                            std::dynamic_pointer_cast<Position>(ser)) {
-              printf(
-                  "   query idx %d pulled position object secId %s, shares %d  "
-                  ": "
-                  "\n",
-                  i, position->getSecId()->value().c_str(),
-                  position->getSharesOutstanding());
+              std::cout << "   query idx " << i
+                        << " pulled position object secId "
+                        << position->getSecId()->value()
+                        << ", shares  :: " << position->getSharesOutstanding()
+                        << "\n";
             } else {
               if (ser != nullptr) {
-                printf(" query idx %d pulled object %s  : \n", i,
-                       ser->toString().c_str());
+                std::cout << " query idx " << i << " pulled object "
+                          << ser->toString() << "  : \n";
               } else {
-                printf("   query idx %d pulled bad object  \n", i);
+                std::cout << "   query idx " << i << " pulled bad object  \n";
                 FAIL("Unexpected object received in query");
               }
             }
@@ -452,25 +442,22 @@
             auto ser = (*rsptr)[rows];
             if (auto portfoliopdx =
                     std::dynamic_pointer_cast<PortfolioPdx>(ser)) {
-              printf(
-                  "   query idx %d pulled portfolioPdx object ID %d, pkid %s  "
-                  ": "
-                  "\n",
-                  i, portfoliopdx->getID(), portfoliopdx->getPkid().c_str());
+              std::cout << "   query idx " << i
+                        << " pulled portfoliopdx object ID "
+                        << portfoliopdx->getID()
+                        << ", pkid  :: " << portfoliopdx->getPkid() << "\n";
             } else if (auto positionpdx =
                            std::dynamic_pointer_cast<PositionPdx>(ser)) {
-              printf(
-                  "   query idx %d pulled positionPdx object secId %s, shares "
-                  "%d "
-                  " : \n",
-                  i, positionpdx->getSecId().c_str(),
-                  positionpdx->getSharesOutstanding());
+              std::cout << "   query idx " << i
+                        << " pulled positionPdx object secId "
+                        << positionpdx->getSecId() << ", shares "
+                        << positionpdx->getSharesOutstanding() << "  :: \n";
             } else {
               if (ser != nullptr) {
-                printf(" query idx %d pulled object %s : \n", i,
-                       ser->toString().c_str());
+                std::cout << " query idx " << i << " pulled object "
+                          << ser->toString() << " \n";
               } else {
-                printf("   query idx %d pulled bad object\n", i);
+                std::cout << "   query idx " << i << " pulled bad object\n";
                 FAIL("Unexpected object received in query");
               }
             }
@@ -480,7 +467,7 @@
     }
 
     if (!doAnyErrorOccured) {
-      printf("HURRAY !! We PASSED \n\n");
+      std::cout << "HURRAY !! We PASSED \n\n";
     } else {
       FAIL("Failed in StepSix verification");
     }
@@ -505,10 +492,9 @@
 
         try {
           auto results = qry->execute();
+          std::string failmsg =
+              "Query exception didnt occur for index " + std::to_string(i);
 
-          char failmsg[100] = {0};
-          ACE_OS::sprintf(failmsg, "Query exception didnt occur for index %d",
-                          i);
           LOG(failmsg);
           FAIL(failmsg);
         } catch (apache::geode::client::QueryException &) {
diff --git a/cppcache/integration-test/testThinClientRemoteQuerySS.cpp b/cppcache/integration-test/testThinClientRemoteQuerySS.cpp
index c35fa9b..7b98aff 100644
--- a/cppcache/integration-test/testThinClientRemoteQuerySS.cpp
+++ b/cppcache/integration-test/testThinClientRemoteQuerySS.cpp
@@ -15,8 +15,6 @@
  * limitations under the License.
  */
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include <string>
 
 #define ROOT_NAME "testThinClientRemoteQuerySS"
@@ -64,7 +62,7 @@
 bool isLocalServer = false;
 
 const char *poolNames[] = {"Pool1", "Pool2", "Pool3"};
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 bool isPoolConfig = false;  // To track if pool case is running
 const char *qRegionNames[] = {"Portfolios", "Positions", "Portfolios2",
@@ -82,91 +80,88 @@
   return ((str == nullptr) ? "(null)" : *str);
 }
 
-void _printFields(std::shared_ptr<Cacheable> field, Struct *ssptr,
-                  int32_t &fields) {
+void _printAllFields(std::shared_ptr<Cacheable> field, Struct *ssptr,
+                     int32_t &fields) {
   try {
     if (auto portfolio = std::dynamic_pointer_cast<Portfolio>(field)) {
-      printf("   pulled %s :- ID %d, pkid %s\n",
-             ssptr->getFieldName(fields).c_str(), portfolio->getID(),
-             checkNullString(portfolio->getPkid()->value().c_str()));
-      printf("   pulled %s :- ID %d, pkid %s\n",
-             ssptr->getFieldName(fields).c_str(), portfolio->getID(),
-             checkNullString(portfolio->getPkid()->value().c_str()));
+      std::cout << "   pulled " << ssptr->getFieldName(fields) << " :- ID "
+                << portfolio->getID() << ", pkid "
+                << (portfolio->getPkid()->value()) << "\n";
     } else if (auto position = std::dynamic_pointer_cast<Position>(field)) {
-      printf("   pulled %s :- secId %s, shares %d\n",
-             ssptr->getFieldName(fields).c_str(),
-             checkNullString(position->getSecId()->value().c_str()),
-             position->getSharesOutstanding());
+      std::cout << "   pulled " << ssptr->getFieldName(fields) << " :- secId "
+                << position->getSecId()->value() << ", shares "
+                << position->getSharesOutstanding() << "\n";
     } else if (auto portfolioPdx =
                    std::dynamic_pointer_cast<PortfolioPdx>(field)) {
-      printf("   pulled %s :- ID %d, pkid %s\n",
-             ssptr->getFieldName(fields).c_str(), portfolioPdx->getID(),
-             portfolioPdx->getPkid().c_str());
+      std::cout << "   pulled " << ssptr->getFieldName(fields) << " :- ID "
+                << portfolioPdx->getID() << ", pkid " << portfolioPdx->getPkid()
+                << "\n";
     } else if (auto positionPdx =
                    std::dynamic_pointer_cast<PositionPdx>(field)) {
-      printf("   pulled %s :- secId %s, shares %d\n",
-             ssptr->getFieldName(fields).c_str(),
-             positionPdx->getSecId().c_str(),
-             positionPdx->getSharesOutstanding());
+      std::cout << "   pulled " << ssptr->getFieldName(fields) << " :- secId "
+                << positionPdx->getSecId() << ", shares "
+                << positionPdx->getSharesOutstanding() << "\n";
     } else {
       if (auto str = std::dynamic_pointer_cast<CacheableString>(field)) {
-        printf("   pulled %s :- %s\n", ssptr->getFieldName(fields).c_str(),
-               checkNullString(str->value().c_str()));
+        std::cout << "   pulled " << ssptr->getFieldName(fields) << " :- "
+                  << str->value() << "\n";
       } else if (auto boolptr =
                      std::dynamic_pointer_cast<CacheableBoolean>(field)) {
-        printf("   pulled %s :- %s\n", ssptr->getFieldName(fields).c_str(),
-               boolptr->toString().c_str());
+        std::cout << "   pulled " << ssptr->getFieldName(fields) << " :- "
+                  << boolptr->toString() << "\n";
       } else {
         if (auto ptr = std::dynamic_pointer_cast<CacheableKey>(field)) {
-          printf("   pulled %s :- %s \n", ssptr->getFieldName(fields).c_str(),
-                 ptr->toString().c_str());
+          std::cout << "   pulled " << ssptr->getFieldName(fields) << " :- "
+                    << ptr->toString() << " \n";
         } else if (auto strArr =
                        std::dynamic_pointer_cast<CacheableStringArray>(field)) {
-          printf(" string array object printing \n\n");
+          std::cout << " string array object printing \n\n";
           for (int stri = 0; stri < strArr->length(); stri++) {
-            printf("   pulled %s(%d) - %s \n",
-                   ssptr->getFieldName(fields).c_str(), stri,
-                   strArr->operator[](stri)->value().c_str());
+            std::cout << "   pulled " << ssptr->getFieldName(fields) << "("
+                      << stri << ") - " << strArr->operator[](stri)->value()
+                      << " \n";
           }
         } else if (auto map =
                        std::dynamic_pointer_cast<CacheableHashMap>(field)) {
           int index = 0;
           for (const auto &iter : *map) {
-            printf("   hashMap %d of %zd ... \n", ++index, map->size());
-            _printFields(iter.first, ssptr, fields);
-            _printFields(iter.second, ssptr, fields);
+            std::cout << "   hashMap " << ++index << " of " << map->size()
+                      << " ... \n";
+            _printAllFields(iter.first, ssptr, fields);
+            _printAllFields(iter.second, ssptr, fields);
           }
-          printf("   end of map \n");
+          std::cout << "   end of map \n";
         } else if (auto structimpl = std::dynamic_pointer_cast<Struct>(field)) {
-          printf("   structImpl %s {\n", ssptr->getFieldName(fields).c_str());
+          std::cout << "   structImpl " << ssptr->getFieldName(fields)
+                    << " {\n";
           for (int32_t inner_fields = 0; inner_fields < structimpl->size();
                inner_fields++) {
             auto innerField = (*structimpl)[inner_fields];
             if (innerField == nullptr) {
-              printf(
-                  "we got null fields here, probably we have nullptr data\n");
+              std::cout
+                  << "we got null fields here, probably we have nullptr data\n";
               continue;
             }
 
-            _printFields(innerField, structimpl.get(), inner_fields);
+            _printAllFields(innerField, structimpl.get(), inner_fields);
 
           }  // end of field iterations
-          printf("   } //end of %s\n", ssptr->getFieldName(fields).c_str());
+          std::cout << "   } //end of " << ssptr->getFieldName(fields) << "\n";
         } else {
-          printf(
-              "unknown field data.. couldn't even convert it to Cacheable "
-              "variants\n");
+          std::cout << "unknown field data.. couldn't even convert it to "
+                       "Cacheable variants\n";
         }
       }
 
     }  // end of else
   } catch (const std::out_of_range &e) {
-    printf("Caught a non-fatal out_of_range exception: %s", e.what());
+    std::cout << "Caught a non-fatal out_of_range exception: " << e.what();
   }
 }
 
-void _verifyStructSet(std::shared_ptr<StructSet> &ssptr, int i) {
-  printf("query idx %d \n", i);
+void _verifyStructSet(std::shared_ptr<StructSet> &ssptr, int) {
+  std::cout << "query idx "
+            << " \n";
   for (size_t rows = 0; rows < ssptr->size(); rows++) {
     if (rows > QueryHelper::getHelper().getPortfolioSetSize()) {
       continue;
@@ -174,19 +169,19 @@
 
     Struct *siptr = dynamic_cast<Struct *>(((*ssptr)[rows]).get());
     if (siptr == nullptr) {
-      printf("siptr is nullptr \n\n");
+      std::cout << "siptr is nullptr \n\n";
       continue;
     }
 
-    printf("   Row : %zd \n", rows);
+    std::cout << "   Row : " << rows << " \n";
     for (int32_t fields = 0; fields < siptr->size(); fields++) {
       auto field = (*siptr)[fields];
       if (field == nullptr) {
-        printf("we got null fields here, probably we have nullptr data\n");
+        std::cout << "we got null fields here, probably we have nullptr data\n";
         continue;
       }
 
-      _printFields(field, siptr, fields);
+      _printAllFields(field, siptr, fields);
 
     }  // end of field iterations
   }    // end of row iterations
@@ -248,7 +243,7 @@
   }
 
   isPoolConfig = true;
-  createPool(poolNames[0], locHostPort, nullptr, 0, true);
+  createPool(poolNames[0], locHostPort, {}, 0, true);
   createRegionAndAttachPool(qRegionNames[0], USE_ACK, poolNames[0]);
   createRegionAndAttachPool(qRegionNames[1], USE_ACK, poolNames[0]);
   createRegionAndAttachPool(qRegionNames[2], USE_ACK, poolNames[0]);
@@ -321,10 +316,8 @@
     qh->populatePortfolioPdxData(regPtr4, qh->getPortfolioSetSize(),
                                  qh->getPortfolioNumSets());
 
-    char buf[100];
-    sprintf(buf, "SetSize %zd, NumSets %zd", qh->getPortfolioSetSize(),
-            qh->getPortfolioNumSets());
-    LOG(buf);
+    LOG(std::string("SetSize") + std::to_string(qh->getPortfolioSetSize()) +
+        ", NumSets " + std::to_string(qh->getPortfolioNumSets()));
 
     LOG("StepThree complete.\n");
   }
@@ -349,8 +342,8 @@
       auto results = qry->execute();
       if (!qh->verifySS(results, structsetRowCountsOPL[i],
                         structsetFieldCountsOPL[i])) {
-        char failmsg[100] = {0};
-        ACE_OS::sprintf(failmsg, "Query verify failed for query index %d", i);
+        std::string failmsg =
+            "Query verify failed for query index " + std::to_string(i);
         ASSERT(false, failmsg);
       }
 
@@ -363,7 +356,9 @@
       _verifyStructSet(ssptr, i);
     }
 
-    if (!doAnyErrorOccured) printf("HURRAY !! StepFour PASSED \n\n");
+    if (!doAnyErrorOccured) {
+      std::cout << "HOORAY !! StepFour PASSED \n\n";
+    }
 
     LOG("StepFour complete.");
   }
@@ -372,7 +367,6 @@
 DUNIT_TASK_DEFINITION(CLIENT1, StepFive)
   {
     SLEEP(100);
-    bool doAnyErrorOccured = false;
     auto qh = &QueryHelper::getHelper();
 
     std::shared_ptr<QueryService> qs = nullptr;
@@ -398,13 +392,13 @@
                      ? structsetRowCounts[i]
                      : structsetRowCounts[i] * qh->getPortfolioNumSets()),
                 structsetFieldCounts[i])) {
-          char failmsg[100] = {0};
-          ACE_OS::sprintf(failmsg, "Query verify failed for query index %d", i);
+          std::string failmsg =
+              "Query verify failed for query index " + std::to_string(i);
           ASSERT(false, failmsg);
         }
 
         auto ssptr = std::dynamic_pointer_cast<StructSet>(results);
-        if ((ssptr) == nullptr) {
+        if (ssptr == nullptr) {
           LOG("Zero records were expected and found. Moving onto next. ");
           continue;
         }
@@ -413,8 +407,7 @@
       }
     }
 
-    if (!doAnyErrorOccured) printf("HURRAY !! We PASSED \n\n");
-
+    std::cout << "HOORAY !! We PASSED \n\n";
     LOG("StepFive complete.");
   }
 END_TASK_DEFINITION
@@ -461,8 +454,8 @@
                      ? structsetRowCountsPQ[i]
                      : structsetRowCountsPQ[i] * qh->getPortfolioNumSets()),
                 structsetFieldCountsPQ[i])) {
-          char failmsg[100] = {0};
-          ACE_OS::sprintf(failmsg, "Query verify failed for query index %d", i);
+          std::string failmsg =
+              "Query verify failed for query index " + std::to_string(i);
           ASSERT(false, failmsg);
         }
 
@@ -474,7 +467,10 @@
         _verifyStructSet(ssptr, i);
       }
     }
-    if (!doAnyErrorOccured) printf("HURRAY !! We PASSED \n\n");
+    if (!doAnyErrorOccured) {
+      std::cout << "HOORAY !! We PASSED \n\n";
+    }
+
     LOG("StepSix complete.");
   }
 END_TASK_DEFINITION
@@ -505,10 +501,10 @@
 
     for (size_t set = 1; set <= numSets; ++set) {
       for (size_t current = 1; current <= setSize; ++current) {
-        char posname[100] = {0};
-        ACE_OS::sprintf(posname, "pos%zd-%zd", set, current);
+        std::string key =
+            "pos" + std::to_string(set) + '-' + std::to_string(current);
 
-        auto posKey(CacheableKey::create(posname));
+        auto posKey = CacheableKey::create(key);
         auto pos = std::make_shared<PositionPdx>(
             secIds[current % numSecIds], static_cast<int32_t>(current * 100));
 
@@ -524,10 +520,10 @@
     numSets = qh.getPortfolioNumSets();
     for (size_t set = 1; set <= numSets; ++set) {
       for (size_t current = 1; current <= setSize; ++current) {
-        char portname[100] = {0};
-        ACE_OS::sprintf(portname, "port%zd-%zd", set, current);
+        std::string key =
+            "port" + std::to_string(set) + '-' + std::to_string(current);
 
-        auto portKey = CacheableKey::create(portname);
+        auto portKey = CacheableKey::create(key);
         auto port =
             std::make_shared<PortfolioPdx>(static_cast<int32_t>(current), 1);
 
@@ -582,15 +578,14 @@
 
         try {
           auto results = qry->execute();
+          std::string failmsg =
+              "Query exception didnt occur for index " + std::to_string(i);
 
-          char failmsg[100] = {0};
-          ACE_OS::sprintf(failmsg, "Query exception didnt occur for index %d",
-                          i);
           LOG(failmsg);
           FAIL(failmsg);
         } catch (apache::geode::client::QueryException &ex) {
           // ok, expecting an exception, do nothing
-          fprintf(stdout, "Got expected exception: %s", ex.what());
+          std::cout << "Got expected exception: " << ex.what();
         } catch (...) {
           ASSERT(false, "Got unexpected exception");
         }
diff --git a/cppcache/integration-test/testThinClientRemoteQueryTimeout.cpp b/cppcache/integration-test/testThinClientRemoteQueryTimeout.cpp
index d1568ca..f2555f5 100644
--- a/cppcache/integration-test/testThinClientRemoteQueryTimeout.cpp
+++ b/cppcache/integration-test/testThinClientRemoteQueryTimeout.cpp
@@ -15,8 +15,6 @@
  * limitations under the License.
  */
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include <string>
 
 #define ROOT_NAME "testThinClientRemoteQueryTimeout"
@@ -56,7 +54,7 @@
 bool isLocalServer = false;
 bool isLocator = false;
 const char *poolNames[] = {"Pool1", "Pool2", "Pool3"};
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 
 const char *qRegionNames[] = {"Portfolios", "Positions", "Portfolios2",
@@ -83,7 +81,7 @@
     // ignore exception
   }
   isPoolConfig = true;
-  createPool(poolNames[0], locHostPort, nullptr, 0, true);
+  createPool(poolNames[0], locHostPort, {}, 0, true);
   createRegionAndAttachPool(qRegionNames[0], USE_ACK, poolNames[0]);
 
   auto regptr = getHelper()->getRegion(qRegionNames[0]);
@@ -169,12 +167,11 @@
     try {
       LOG("EXECUTE 1 START");
 
-      results = qry->execute(std::chrono::seconds(3));
+      results = qry->execute(std::chrono::milliseconds(100));
 
       LOG("EXECUTE 1 STOP");
+      std::string logmsg = "Result size is " + std::to_string(results->size());
 
-      char logmsg[50] = {0};
-      ACE_OS::sprintf(logmsg, "Result size is %zd", results->size());
       LOG(logmsg);
 
       LOG("Didnt get expected timeout exception for first execute");
@@ -188,7 +185,7 @@
       LOG(logmsg.c_str());
     }
 
-    SLEEP(150000);  // sleep 2.5 min to allow server query to complete
+    SLEEP(15000);
 
     LOG("StepThree complete.");
   }
@@ -216,8 +213,7 @@
 
       LOG("EXECUTE 2 STOP");
 
-      char logmsg[50] = {0};
-      ACE_OS::sprintf(logmsg, "Result size is %zd", results->size());
+      std::string logmsg = "Result size is " + std::to_string(results->size());
       LOG(logmsg);
     } catch (Exception &excp) {
       std::string failmsg = "";
@@ -251,14 +247,12 @@
     try {
       LOG("EXECUTE 3 START");
 
-      results = qry->execute(std::chrono::seconds(2));
+      results = qry->execute(std::chrono::milliseconds(100));
 
       LOG("EXECUTE 3 STOP");
+      std::string logmsg = "Result size is " + std::to_string(results->size());
 
-      char logmsg[50] = {0};
-      ACE_OS::sprintf(logmsg, "Result size is %zd", results->size());
       LOG(logmsg);
-
       LOG("Didnt get expected timeout exception for third execute");
       FAIL("Didnt get expected timeout exception for third execute");
     } catch (const TimeoutException &excp) {
@@ -267,7 +261,7 @@
       logmsg += excp.getName();
       logmsg += ": ";
       logmsg += excp.what();
-      LOG(logmsg.c_str());
+      LOG(logmsg);
     }
 
     SLEEP(40000);  // sleep to allow server query to complete
@@ -297,9 +291,8 @@
       results = qry->execute(std::chrono::seconds(850));
 
       LOG("EXECUTE 4 STOP");
+      std::string logmsg = "Result size is " + std::to_string(results->size());
 
-      char logmsg[50] = {0};
-      ACE_OS::sprintf(logmsg, "Result size is %zd", results->size());
       LOG(logmsg);
     } catch (Exception &excp) {
       std::string failmsg = "";
@@ -342,12 +335,11 @@
           paramList->push_back(Cacheable::create(queryparamSetSS[5][j]));
         }
       }
-      results = qry->execute(paramList, std::chrono::seconds(1));
+      results = qry->execute(paramList, std::chrono::milliseconds(2000));
 
       LOG("EXECUTE Five STOP");
+      std::string logmsg = "Result size is " + std::to_string(results->size());
 
-      char logmsg[50] = {0};
-      ACE_OS::sprintf(logmsg, "Result size is %zd", results->size());
       LOG(logmsg);
 
       LOG("Didnt get expected timeout exception for fifth execute");
@@ -398,9 +390,8 @@
       results = qry->execute(paramList, std::chrono::seconds(850));
 
       LOG("EXECUTE 6 STOP");
+      std::string logmsg = "Result size is " + std::to_string(results->size());
 
-      char logmsg[50] = {0};
-      ACE_OS::sprintf(logmsg, "Result size is %zd", results->size());
       LOG(logmsg);
     } catch (Exception &excp) {
       std::string failmsg = "";
@@ -437,9 +428,8 @@
       results = qry->execute(std::chrono::seconds(-3));
 
       LOG("Task::verifyNegativeValueTimeout - EXECUTE 1 STOP");
+      std::string logmsg = "Result size is " + std::to_string(results->size());
 
-      char logmsg[50] = {0};
-      ACE_OS::sprintf(logmsg, "Result size is %zd", results->size());
       LOG(logmsg);
 
       LOG("Didnt get expected timeout exception for first execute");
@@ -455,7 +445,7 @@
       LOG(logmsg.c_str());
     }
 
-    SLEEP(150000);  // sleep 2.5 min to allow server query to complete
+    SLEEP(15000);
 
     LOG("StepThree complete.");
   }
@@ -482,9 +472,8 @@
       results = qry->execute(std::chrono::seconds(2147500));
 
       LOG("Task:: verifyLargeValueTimeout - EXECUTE 1 STOP");
+      std::string logmsg = "Result size is " + std::to_string(results->size());
 
-      char logmsg[50] = {0};
-      ACE_OS::sprintf(logmsg, "Result size is %zd", results->size());
       LOG(logmsg);
 
       LOG("Didnt get expected timeout exception for first execute");
@@ -500,7 +489,7 @@
       LOG(logmsg.c_str());
     }
 
-    SLEEP(150000);  // sleep 2.5 min to allow server query to complete
+    SLEEP(15000);
 
     LOG("StepThree complete.");
   }
@@ -567,10 +556,8 @@
 
 DUNIT_MAIN
   {
-    // Basic Old Test
-    runRemoteQueryTimeoutTest();
-
     UnsetPortfolioType();
+
     for (int runIdx = 1; runIdx <= 2; ++runIdx) {
       // New Test with Pool + EP
       runRemoteQueryTimeoutTest();
diff --git a/cppcache/integration-test/testThinClientRemoteRegionQuery.cpp b/cppcache/integration-test/testThinClientRemoteRegionQuery.cpp
index 781ecb7..e11ad7e 100644
--- a/cppcache/integration-test/testThinClientRemoteRegionQuery.cpp
+++ b/cppcache/integration-test/testThinClientRemoteRegionQuery.cpp
@@ -15,8 +15,6 @@
  * limitations under the License.
  */
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include <string>
 
 #define ROOT_NAME "testThinClientRemoteRegionQuery"
@@ -49,7 +47,7 @@
 bool isLocator = false;
 
 const char* poolNames[] = {"Pool1", "Pool2", "Pool3"};
-const char* locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 static bool m_isPdx = false;
 const char* qRegionNames[] = {"Portfolios", "Positions", "Portfolios2",
@@ -90,6 +88,7 @@
 DUNIT_TASK_DEFINITION(CLIENT1, StepOnePoolLocator)
   {
     initClient(true);
+    LOG("StepOnePoolLocator");
     try {
       auto serializationRegistry =
           CacheRegionHelper::getCacheImpl(cacheHelper->getCache().get())
@@ -106,13 +105,12 @@
     } catch (const IllegalStateException&) {
       // ignore exception
     }
-    createPool(poolNames[0], locHostPort, nullptr, 0, true);
+    createPool(poolNames[0], locHostPort, {}, 0, true);
     createRegionAndAttachPool(qRegionNames[0], USE_ACK, poolNames[0]);
     createRegionAndAttachPool(qRegionNames[1], USE_ACK, poolNames[0]);
 
     createRegionAndAttachPool(qRegionNames[2], USE_ACK, poolNames[0]);
-
-    createPool(poolNames[1], locHostPort, nullptr, 0, true);
+    createPool(poolNames[1], locHostPort, {}, 0, true);
     createRegionAndAttachPool(qRegionNames[3], USE_ACK, poolNames[1]);
 
     auto regptr = getHelper()->getRegion(qRegionNames[0]);
@@ -134,10 +132,8 @@
 
     QueryHelper* qh = &QueryHelper::getHelper();
 
-    char buf[100];
-    sprintf(buf, "SetSize %zd, NumSets %zd", qh->getPortfolioSetSize(),
-            qh->getPortfolioNumSets());
-    LOG(buf);
+    LOG(std::string("SetSize") + std::to_string(qh->getPortfolioSetSize()) +
+        ", NumSets " + std::to_string(qh->getPortfolioNumSets()));
 
     if (!m_isPdx) {
       qh->populatePortfolioData(regPtr0, qh->getPortfolioSetSize(),
@@ -171,7 +167,6 @@
 DUNIT_TASK_DEFINITION(CLIENT1, StepThree)
   {
     bool doAnyErrorOccured = false;
-
     auto region = getHelper()->getRegion(qRegionNames[0]);
 
     for (int i = 0; i < QueryStrings::RQsize(); i++) {
@@ -188,14 +183,13 @@
         continue;
       }
 
-      auto results = region->query((regionQueries[i].query()));
+      auto results = region->query(regionQueries[i].query());
 
       if (results->size() != regionQueryRowCounts[i]) {
-        char failmsg[100] = {0};
-        ACE_OS::sprintf(
-            failmsg,
-            "FAIL: Query # %d expected result size is %zd, actual is %zd", i,
-            regionQueryRowCounts[i], results->size());
+        std::string failmsg = "FAIL: Query #" + std::to_string(i) +
+                              " expected result size is " +
+                              std::to_string(regionQueryRowCounts[i]) +
+                              ", actual is " + std::to_string(results->size());
         doAnyErrorOccured = true;
         LOG(failmsg);
         continue;
@@ -263,11 +257,10 @@
       bool expectedResult = regionQueryRowCounts[i] > 0 ? true : false;
 
       if (existsValue != expectedResult) {
-        char failmsg[100] = {0};
-        ACE_OS::sprintf(
-            failmsg,
-            "FAIL: Query # %d existsValue expected is %s, actual is %s", i,
-            expectedResult ? "true" : "false", existsValue ? "true" : "false");
+        std::string failmsg = "FAIL: Query #" + std::to_string(i) +
+                              " existsValue expected is " +
+                              (expectedResult ? "true" : "false") +
+                              ", actual is " + (existsValue ? "true" : "false");
         ASSERT(false, failmsg);
       }
     }
@@ -323,45 +316,26 @@
       }
 
       try {
-        auto result = region->selectValue((regionQueries[i].query()));
-
-        /*
-              if (result == nullptr)
-              {
-                char logmsg[100] = {0};
-                ACE_OS::sprintf(logmsg, "Query # %d query selectValue result is
-           nullptr", i);
-                LOG(logmsg);
-              }
-              else
-              {
-                char logmsg[100] = {0};
-                ACE_OS::sprintf(logmsg, "Query # %d query selectValue result
-           size
-           is not nullptr", i);
-                LOG(logmsg);
-              }
-        */
+        auto result = region->selectValue(regionQueries[i].query());
         if (!(regionQueryRowCounts[i] == 0 || regionQueryRowCounts[i] == 1)) {
-          char logmsg[100] = {0};
-          ACE_OS::sprintf(
-              logmsg, "FAIL: Query # %d expected query exception did not occur",
-              i);
+          std::string logmsg = "FAIL: Query #" + std::to_string(i) +
+                               " expected query exception did not occur";
+
           LOG(logmsg);
           doAnyErrorOccured = true;
         }
       } catch (const QueryException&) {
         if (regionQueryRowCounts[i] == 0 || regionQueryRowCounts[i] == 1) {
-          char logmsg[100] = {0};
-          ACE_OS::sprintf(
-              logmsg, "FAIL: Query # %d unexpected query exception occured", i);
+          std::string logmsg = "FAIL: Query #" + std::to_string(i) +
+                               " unexpected query exception occurred";
+
           LOG(logmsg);
           doAnyErrorOccured = true;
         }
       } catch (...) {
-        char logmsg[100] = {0};
-        ACE_OS::sprintf(logmsg,
-                        "FAIL: Query # %d unexpected exception occurred", i);
+        std::string logmsg = "FAIL: Query #" + std::to_string(i) +
+                             " unexpected exception occurred";
+
         LOG(logmsg);
         FAIL(logmsg);
       }
@@ -429,10 +403,10 @@
       }
 
       try {
-        auto results = region->query((regionQueries[i].query()));
+        auto results = region->query(regionQueries[i].query());
+        std::string failmsg =
+            "Query exception didnt occur for index " + std::to_string(i);
 
-        char failmsg[100] = {0};
-        ACE_OS::sprintf(failmsg, "Query exception didnt occur for index %d", i);
         LOG(failmsg);
         FAIL(failmsg);
       } catch (apache::geode::client::QueryException&) {
diff --git a/cppcache/integration-test/testThinClientRemoveOps.cpp b/cppcache/integration-test/testThinClientRemoveOps.cpp
index 336df7a..3f20c0c 100644
--- a/cppcache/integration-test/testThinClientRemoveOps.cpp
+++ b/cppcache/integration-test/testThinClientRemoveOps.cpp
@@ -16,8 +16,6 @@
  */
 
 #include "fw_dunit.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
 #include "testobject/PdxType.hpp"
 #include "testobject/VariousPdxTypes.hpp"
 
@@ -51,7 +49,7 @@
 static bool isLocator = false;
 static int numberOfLocators = 0;
 
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 
 void initClient(const bool isthinClient) {
@@ -78,20 +76,15 @@
                   bool noKey) {
   // Verify key and value exist in this region, in this process.
   const char *value = val ? val : "";
-  char *buf =
-      reinterpret_cast<char *>(malloc(1024 + strlen(key) + strlen(value)));
-  ASSERT(buf, "Unable to malloc buffer for logging.");
   if (noKey) {
-    sprintf(buf, "Verify key %s does not exist in region %s", key, name);
+    LOG(std::string("Verify key ") + key + " does not exist in region " + name);
   } else if (!val) {
-    sprintf(buf, "Verify value for key %s does not exist in region %s", key,
-            name);
+    LOG(std::string("Verify value for key ") + key +
+        " does not exist in region " + name);
   } else {
-    sprintf(buf, "Verify value for key %s is: %s in region %s", key, value,
-            name);
+    LOG(std::string("Verify value for key ") + key + "is:" + value +
+        " in region " + name);
   }
-  LOG(buf);
-  free(buf);
 
   auto regPtr = getHelper()->getRegion(name);
   ASSERT(regPtr != nullptr, "Region not found.");
@@ -150,17 +143,13 @@
 }
 
 void _verifyInvalid(const char *name, const char *key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyInvalid() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyInvalid() called from ") + std::to_string(line));
   _verifyEntry(name, key, nullptr, false);
   LOG("Entry invalidated.");
 }
 
 void _verifyDestroyed(const char *name, const char *key, int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyDestroyed() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyDestroyed() called from ") + std::to_string(line));
   _verifyEntry(name, key, nullptr, true);
   LOG("Entry destroyed.");
 }
@@ -169,9 +158,7 @@
 
 void _verifyEntry(const char *name, const char *key, const char *val,
                   int line) {
-  char logmsg[1024];
-  sprintf(logmsg, "verifyEntry() called from %d.\n", line);
-  LOG(logmsg);
+  LOG(std::string("verifyEntry() called from ") + std::to_string(line));
   _verifyEntry(name, key, val, false);
   LOG("Entry verified.");
 }
@@ -180,21 +167,24 @@
                   bool clientNotificationEnabled = false,
                   bool cachingEnable = true) {
   LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr = getHelper()->createRegion(name, ackMode, cachingEnable, nullptr,
                                           clientNotificationEnabled);
   ASSERT(regPtr != nullptr, "Failed to create region.");
   LOG("Region created.");
 }
 
-void createPooledRegion(const char *name, bool ackMode, const char *locators,
-                        const char *poolname,
+void createPooledRegion(const std::string &name, bool ackMode,
+                        const std::string &locators,
+                        const std::string &poolname,
                         bool clientNotificationEnabled = false,
                         bool cachingEnable = true) {
   LOG("createRegion_Pool() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
+  std::cout << "Creating region --  " << name << " ackMode is " << ackMode
+            << "\n"
+            << std::flush;
   auto regPtr =
       getHelper()->createPooledRegion(name, ackMode, locators, poolname,
                                       cachingEnable, clientNotificationEnabled);
@@ -204,9 +194,9 @@
 
 void putEntry(const char *name, const char *key, const char *value) {
   LOG("putEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Put entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -228,9 +218,9 @@
 
 void localPutEntry(const char *name, const char *key, const char *value) {
   LOG("putEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Put entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -247,10 +237,8 @@
 
 void createEntryTwice(const char *name, const char *key, const char *value) {
   LOG("createEntryTwice() entered.");
-  char message[500];
-  sprintf(message, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  LOG(message);
+  std::cout << "Creating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n";
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
   auto regPtr = getHelper()->getRegion(name);
@@ -269,9 +257,9 @@
 
 void updateEntry(const char *name, const char *key, const char *value) {
   LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "Updating entry -- key: " << key << " value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Update entry, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
   auto valPtr = CacheableString::create(value);
@@ -292,16 +280,14 @@
 
 void doGetAgain(const char *name, const char *key, const char *value) {
   LOG("doGetAgain() entered.");
-  fprintf(stdout,
-          "get for entry -- key: %s  expecting value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
+  std::cout << "get for entry -- key: " << key << " expecting value: " << value
+            << " in region " << name << "\n"
+            << std::flush;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "get  region name%s\n", regPtr->getName().c_str());
-  fflush(stdout);
+  std::cout << "get  region name " << regPtr->getName() << "\n" << std::flush;
   ASSERT(regPtr != nullptr, "Region not found.");
 
   auto checkPtr = std::dynamic_pointer_cast<CacheableString>(
@@ -309,10 +295,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In doGetAgain, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In doGetAgain, get returned ") +
+        checkPtr->value().c_str() + " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -322,18 +306,15 @@
 
 void doNetsearch(const char *name, const char *key, const char *value) {
   LOG("doNetsearch() entered.");
-  fprintf(
-      stdout,
-      "Netsearching for entry -- key: %s  expecting value: %s in region %s\n",
-      key, value, name);
-  fflush(stdout);
+  std::cout << "Netsearching for entry -- key: " << key
+            << " expecting value: " << value << " in region " << name << "\n"
+            << std::flush;
   static int count = 0;
   // Get entry created in Process A, verify entry is correct
   auto keyPtr = CacheableKey::create(key);
 
   auto regPtr = getHelper()->getRegion(name);
-  fprintf(stdout, "netsearch  region %s\n", regPtr->getName().c_str());
-  fflush(stdout);
+  std::cout << "netsearch region " << regPtr->getName() << "\n" << std::flush;
   ASSERT(regPtr != nullptr, "Region not found.");
 
   if (count == 0) {
@@ -348,10 +329,8 @@
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
-    char buf[1024];
-    sprintf(buf, "In net search, get returned %s for key %s",
-            checkPtr->value().c_str(), key);
-    LOG(buf);
+    LOG(std::string("In net search, get returned ") +
+        checkPtr->value().c_str() + " for key " + key);
   } else {
     LOG("checkPtr is nullptr");
   }
@@ -365,12 +344,10 @@
 const char *nvals[] = {"New Value-1", "New Value-2", "New Value-3",
                        "New Value-4"};
 
-const char *regionNames[] = {"DistRegionAck", "DistRegionNoAck",
-                             "exampleRegion"};
+const char *regionNames[] = {"DistRegionAck", "exampleRegion"};
 
 const bool USE_ACK = true;
 const bool NO_ACK = false;
-//#include "LocatorHelper.hpp"
 
 DUNIT_TASK_DEFINITION(SERVER1, CreateServer1)
   {
@@ -397,7 +374,7 @@
 
 DUNIT_TASK_DEFINITION(SERVER1, CreateServer1_With_Locator)
   {
-    if (isLocalServer) CacheHelper::initServer(1, nullptr, locatorsG);
+    if (isLocalServer) CacheHelper::initServer(1, {}, locatorsG);
     LOG("SERVER1 with locator started");
   }
 END_TASK_DEFINITION
@@ -406,7 +383,6 @@
   {
     initClient(true);
     createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TESTPOOL1_");
-    createPooledRegion(regionNames[1], NO_ACK, locatorsG, "__TESTPOOL1_");
     LOG("StepOne_Pooled complete.");
   }
 END_TASK_DEFINITION
@@ -414,7 +390,7 @@
 DUNIT_TASK_DEFINITION(CLIENT1, StepSeven_Pooled_Locator)
   {
     initClient(true);
-    createPooledRegion(regionNames[2], USE_ACK, locatorsG, "__TESTPOOL1_");
+    createPooledRegion(regionNames[1], USE_ACK, locatorsG, "__TESTPOOL1_");
     LOG("StepSeven_Pooled_Locator complete.");
   }
 END_TASK_DEFINITION
@@ -423,7 +399,6 @@
   {
     initClient(true);
     createPooledRegion(regionNames[0], USE_ACK, locatorsG, "__TESTPOOL1_");
-    createPooledRegion(regionNames[1], NO_ACK, locatorsG, "__TESTPOOL1_");
     LOG("StepTwo complete.");
   }
 END_TASK_DEFINITION
@@ -431,7 +406,6 @@
 DUNIT_TASK_DEFINITION(CLIENT1, StepThree)
   {
     putEntry(regionNames[0], keys[0], vals[0]);
-    putEntry(regionNames[1], keys[2], vals[2]);
     LOG("StepThree complete.");
   }
 END_TASK_DEFINITION
@@ -439,7 +413,6 @@
 DUNIT_TASK_DEFINITION(CLIENT1, StepFive)
   {
     auto reg0 = getHelper()->getRegion(regionNames[0]);
-    auto reg1 = getHelper()->getRegion(regionNames[1]);
 
     auto keyPtr = CacheableString::create(keys[0]);
     auto keyPtr1 = CacheableString::create(keys[2]);
@@ -448,53 +421,34 @@
     ASSERT(reg0->remove(keys[4], vals[4]) == false,
            "Result of remove should be false, as this entry is not present in "
            "first region.");
-    ASSERT(reg1->remove(keys[4], vals[4]) == false,
-           "Result of remove should be false, as this entry is not present in "
-           "second region.");
 
     // Try removing non-existent key, but existing value from regions, result
     // should be false.
     ASSERT(reg0->remove(keys[4], vals[0]) == false,
            "Result of remove should be false, as this key is not present in "
            "first region.");
-    ASSERT(reg1->remove(keys[4], vals[0]) == false,
-           "Result of remove should be false, as this key is not present in "
-           "second region.");
 
     // Try removing existent key, but non-existing value from regions, result
     // should be false.
     ASSERT(reg0->remove(keys[0], vals[4]) == false,
            "Result of remove should be false, as this value is not present in "
            "first region.");
-    ASSERT(reg1->remove(keys[0], vals[4]) == false,
-           "Result of remove should be false, as this value is not present in "
-           "second region.");
 
     // Try removing existent key, and existing value from regions, result should
     // be true.
     ASSERT(reg0->remove(keys[0], vals[0]) == true,
            "Result of remove should be true, as this entry is present in first "
            "region.");
-    ASSERT(
-        reg1->remove(keys[2], vals[2]) == true,
-        "Result of remove should be true, as this entry is present in second "
-        "region.");
 
     ASSERT(reg0->containsKey(keys[0]) == false, "containsKey should be false");
     ASSERT(reg0->containsKeyOnServer(keyPtr) == false,
            "containsKeyOnServer should be false");
-    ASSERT(reg1->containsKey(keys[2]) == false, "containsKey should be false");
-    ASSERT(reg1->containsKeyOnServer(keyPtr1) == false,
-           "containsKeyOnServer should be false");
 
     // Try removing already deleted entry from regions, result should be false,
     // but no exception.
     ASSERT(reg0->remove(keys[0], vals[0]) == false,
            "Result of remove should be false, as this entry is not present in "
            "first region.");
-    ASSERT(reg1->remove(keys[0], vals[0]) == false,
-           "Result of remove should be false, as this entry is not present in "
-           "second region.");
 
     // Try locally destroying already deleted entry from regions, It should
     // result
@@ -509,15 +463,6 @@
           "localDestroy operation on already removed entry.");
     }
 
-    try {
-      reg1->localDestroy(keys[0]);
-      FAIL(
-          "local destroy on already removed key should have thrown "
-          "EntryNotFoundException");
-    } catch (EntryNotFoundException &) {
-      LOG("Got expected EntryNotFoundException for "
-          "localDestroy operation on already removed entry.");
-    }
     LOG("StepFive complete.");
   }
 END_TASK_DEFINITION
@@ -525,13 +470,11 @@
 DUNIT_TASK_DEFINITION(CLIENT2, StepSix)
   {
     auto reg0 = getHelper()->getRegion(regionNames[0]);
-    auto reg1 = getHelper()->getRegion(regionNames[1]);
 
     auto keyPtr = CacheableString::create(keys[1]);
     auto keyPtr1 = CacheableString::create(keys[3]);
 
     putEntry(regionNames[0], keys[1], nvals[1]);
-    putEntry(regionNames[1], keys[3], nvals[3]);
 
     // Try removing value that is present on client as well as server, result
     // should be true.
@@ -539,106 +482,67 @@
         reg0->remove(keys[1], nvals[1]) == true,
         "Result of remove should be true, as this value is present locally, & "
         "also present on server.");
-    ASSERT(
-        reg1->remove(keys[3], nvals[3]) == true,
-        "Result of remove should be true, as this value is present locally, & "
-        "also present on server.");
     ASSERT(reg0->containsKey(keys[1]) == false, "containsKey should be false");
     ASSERT(reg0->containsKeyOnServer(keyPtr) == false,
            "containsKeyOnServer should be false");
-    ASSERT(reg1->containsKey(keys[3]) == false, "containsKey should be false");
-    ASSERT(reg1->containsKeyOnServer(keyPtr1) == false,
-           "containsKeyOnServer should be false");
     LOGINFO("Step 6.1 complete.");
 
     // Try removing value that is present on client but not on server, result
     // should be false.
     putEntry(regionNames[0], keys[1], vals[1]);
-    putEntry(regionNames[1], keys[3], vals[3]);
     localPutEntry(regionNames[0], keys[1], nvals[1]);
-    localPutEntry(regionNames[1], keys[3], nvals[3]);
     ASSERT(
         reg0->remove(keys[1], nvals[1]) == false,
         "Result of remove should be false, as this value is present locally, "
         "but not present on server.");
-    ASSERT(
-        reg1->remove(keys[3], nvals[3]) == false,
-        "Result of remove should be false, as this value is present locally, "
-        "but not present on server.");
     ASSERT(reg0->containsKey(keys[1]) == true, "containsKey should be true");
     ASSERT(reg0->containsKeyOnServer(keyPtr) == true,
            "containsKeyOnServer should be true");
-    ASSERT(reg1->containsKey(keys[3]) == true, "containsKey should be true");
-    ASSERT(reg1->containsKeyOnServer(keyPtr1) == true,
-           "containsKeyOnServer should be true");
+
     LOGINFO("Step 6.2 complete.");
 
     // Try removing value that is not present on client but present on server,
     // result should be false.
     reg0->destroy(keys[1]);
-    reg1->destroy(keys[3]);
     putEntry(regionNames[0], keys[1], vals[1]);
-    putEntry(regionNames[1], keys[3], vals[3]);
     localPutEntry(regionNames[0], keys[1], nvals[1]);
-    localPutEntry(regionNames[1], keys[3], nvals[3]);
     ASSERT(reg0->remove(keys[1], vals[1]) == false,
            "Result of remove should be false, as this value is not present "
            "locally, but present only on server.");
-    ASSERT(reg1->remove(keys[3], vals[3]) == false,
-           "Result of remove should be false, as this value is not present "
-           "locally, but present only on server.");
     ASSERT(reg0->containsKey(keys[1]) == true, "containsKey should be true");
     ASSERT(reg0->containsKeyOnServer(keyPtr) == true,
            "containsKeyOnServer should be true");
-    ASSERT(reg1->containsKey(keys[3]) == true, "containsKey should be true");
-    ASSERT(reg1->containsKeyOnServer(keyPtr1) == true,
-           "containsKeyOnServer should be true");
+
     LOGINFO("Step 6.3 complete.");
 
     // Try removing value that is invalidated on client but exists on server,
     // result should be false.
     reg0->destroy(keys[1]);
-    reg1->destroy(keys[3]);
     putEntry(regionNames[0], keys[1], nvals[1]);
-    putEntry(regionNames[1], keys[3], nvals[3]);
     reg0->invalidate(keys[1]);
-    reg1->invalidate(keys[3]);
     ASSERT(reg0->remove(keys[1], nvals[1]) == false,
            "Result of remove should be false, as this value is not present "
            "locally, but present only on server.");
-    ASSERT(reg1->remove(keys[3], nvals[3]) == false,
-           "Result of remove should be false, as this value is not present "
-           "locally, but present only on server.");
     ASSERT(reg0->containsKey(keys[1]) == true, "containsKey should be true");
     ASSERT(reg0->containsKeyOnServer(keyPtr) == true,
            "containsKeyOnServer should be true");
-    ASSERT(reg1->containsKey(keys[3]) == true, "containsKey should be true");
-    ASSERT(reg1->containsKeyOnServer(keyPtr1) == true,
-           "containsKeyOnServer should be true");
+
     LOGINFO("Step 6.4 complete.");
 
     // Try removing null value, that is invalidated on client but exists on the
     // server, result should be false.
     reg0->destroy(keys[1]);
-    reg1->destroy(keys[3]);
     putEntry(regionNames[0], keys[1], vals[1]);
-    putEntry(regionNames[1], keys[3], vals[3]);
-    reg0->localInvalidate(keys[1]);
-    reg1->localInvalidate(keys[3]);
+    reg0->localInvalidate(
+        keys[1]);  // Invalidating a key sets its value to null
     ASSERT(reg0->remove(keys[1], static_cast<std::shared_ptr<Cacheable>>(
                                      nullptr)) == false,
            "Result of remove should be false, as this value is not present "
            "locally, but present only on server.");
-    ASSERT(reg1->remove(keys[3], static_cast<std::shared_ptr<Cacheable>>(
-                                     nullptr)) == false,
-           "Result of remove should be false, as this value is not present "
-           "locally, but present only on server.");
     ASSERT(reg0->containsKey(keys[1]) == true, "containsKey should be true");
     ASSERT(reg0->containsKeyOnServer(keyPtr) == true,
            "containsKeyOnServer should be true");
-    ASSERT(reg1->containsKey(keys[3]) == true, "containsKey should be true");
-    ASSERT(reg1->containsKeyOnServer(keyPtr1) == true,
-           "containsKeyOnServer should be true");
+
     LOGINFO("Step 6.5 complete.");
 
     // Try removing a entry (value) which is not present on client as well as
@@ -646,19 +550,13 @@
     ASSERT(reg0->remove("NewKey1", "NewValue1") == false,
            "Result of remove should be false, as this value is not present "
            "locally, and not present on server.");
-    ASSERT(reg1->remove("NewKey3", "NewValue3") == false,
-           "Result of remove should be false, as this value is not present "
-           "locally, and not present on server.");
     auto keyPtr2 = CacheableString::create("NewKey1");
     auto keyPtr3 = CacheableString::create("NewKey3");
     ASSERT(reg0->containsKey("NewKey1") == false,
            "containsKey should be false");
     ASSERT(reg0->containsKeyOnServer(keyPtr2) == false,
            "containsKeyOnServer should be false");
-    ASSERT(reg1->containsKey("NewKey3") == false,
-           "containsKey should be false");
-    ASSERT(reg1->containsKeyOnServer(keyPtr3) == false,
-           "containsKeyOnServer should be false");
+
     LOGINFO("Step 6.6 complete.");
 
     // Try removing a entry with a null value, which is not present on client as
@@ -667,79 +565,50 @@
                                        nullptr)) == false,
            "Result of remove should be false, as this value is not present "
            "locally, and not present on server.");
-    ASSERT(reg1->remove("NewKey3", static_cast<std::shared_ptr<Cacheable>>(
-                                       nullptr)) == false,
-           "Result of remove should be false, as this value is not present "
-           "locally, and not present on server.");
+
     ASSERT(reg0->containsKey("NewKey1") == false,
            "containsKey should be false");
     ASSERT(reg0->containsKeyOnServer(keyPtr2) == false,
            "containsKeyOnServer should be false");
-    ASSERT(reg1->containsKey("NewKey3") == false,
-           "containsKey should be false");
-    ASSERT(reg1->containsKeyOnServer(keyPtr3) == false,
-           "containsKeyOnServer should be false");
+
     LOGINFO("Step 6.7 complete.");
 
     // Try removing a entry (value) which is not present on client but exists on
     // the server, result should be true.
     reg0->destroy(keys[1]);
-    reg1->destroy(keys[3]);
     putEntry(regionNames[0], keys[1], nvals[1]);
-    putEntry(regionNames[1], keys[3], nvals[3]);
     reg0->localDestroy(keys[1]);
-    reg1->localDestroy(keys[3]);
     ASSERT(reg0->remove(keys[1], nvals[1]) == true,
            "Result of remove should be true, as this value does not exist "
            "locally, but exists on server.");
-    ASSERT(reg1->remove(keys[3], nvals[3]) == true,
-           "Result of remove should be true, as this value does not exist "
-           "locally, but exists on server.");
     ASSERT(reg0->containsKey(keys[1]) == false, "containsKey should be false");
     ASSERT(reg0->containsKeyOnServer(keyPtr) == false,
            "containsKeyOnServer should be false");
-    ASSERT(reg1->containsKey(keys[3]) == false, "containsKey should be false");
-    ASSERT(reg1->containsKeyOnServer(keyPtr1) == false,
-           "containsKeyOnServer should be false");
+
     LOG("Step6.8 complete.");
 
     putEntry(regionNames[0], keys[1], nvals[1]);
-    putEntry(regionNames[1], keys[3], nvals[3]);
     reg0->destroy(keys[1]);
-    reg1->destroy(keys[3]);
     ASSERT(reg0->remove(keys[1], static_cast<std::shared_ptr<Cacheable>>(
                                      nullptr)) == false,
            "Result of remove should be false, as this value does not exist "
            "locally, but exists on server.");
-    ASSERT(reg1->remove(keys[3], static_cast<std::shared_ptr<Cacheable>>(
-                                     nullptr)) == false,
-           "Result of remove should be false, as this value does not exist "
-           "locally, but exists on server.");
     ASSERT(reg0->containsKey(keys[1]) == false, "containsKey should be false");
     ASSERT(reg0->containsKeyOnServer(keyPtr) == false,
            "containsKeyOnServer should be false");
-    ASSERT(reg1->containsKey(keys[3]) == false, "containsKey should be false");
-    ASSERT(reg1->containsKeyOnServer(keyPtr1) == false,
-           "containsKeyOnServer should be false");
+
     LOG("Step6.8.1 complete.");
 
     // Try locally removing an entry which is locally destroyed with a nullptr.
     reg0->put(keys[1], vals[1]);
-    reg1->put(keys[3], vals[3]);
     ASSERT(reg0->remove(keys[1], vals[1]) == true,
            "Result of remove should be true, as this value does not exists "
            "locally.");
     ASSERT(reg0->remove(keys[1], vals[1]) == false,
            "Result of remove should be false, as this value does not exists "
            "locally.");
-    ASSERT(reg1->remove(keys[3], vals[3]) == true,
-           "Result of remove should be false, as this value does not exists "
-           "locally.");
-    ASSERT(reg1->remove(keys[3], vals[3]) == false,
-           "Result of remove should be false, as this value does not exists "
-           "locally.");
     ASSERT(reg0->containsKey(keys[1]) == false, "containsKey should be false");
-    ASSERT(reg1->containsKey(keys[3]) == false, "containsKey should be false");
+
     LOG("Step6.8.2 complete.");
 
     //-------------------------------------localRemove
@@ -755,23 +624,12 @@
       LOG("Got expected EntryNotFoundException for "
           "destroy operation on already removed entry.");
     }
-    try {
-      reg1->destroy(keys[3]);
-      FAIL(
-          "destroy on already removed key should have thrown "
-          "EntryNotFoundException");
-    } catch (EntryNotFoundException &) {
-      LOG("Got expected EntryNotFoundException for "
-          "destroy operation on already removed entry.");
-    }
+
     reg0->localPut(keys[1], vals[1]);
-    reg1->localPut(keys[3], vals[3]);
     ASSERT(reg0->localRemove(keys[1], vals[1]) == true,
            "Result of remove should be true, as this value exists locally.");
-    ASSERT(reg1->localRemove(keys[3], vals[3]) == true,
-           "Result of remove should be true, as this value exists locally.");
     ASSERT(reg0->containsKey(keys[1]) == false, "containsKey should be false");
-    ASSERT(reg1->containsKey(keys[3]) == false, "containsKey should be false");
+
     LOG("Step6.9 complete.");
 
     // Try local destroy on entry that is already removed, should get an
@@ -785,142 +643,93 @@
       LOG("Got expected EntryNotFoundException for "
           "localDestroy operation on already removed entry.");
     }
-    try {
-      reg1->localDestroy(keys[3]);
-      FAIL(
-          "local destroy on already removed key should have thrown "
-          "EntryNotFoundException");
-    } catch (EntryNotFoundException &) {
-      LOG("Got expected EntryNotFoundException for "
-          "localDestroy operation on already removed entry.");
-    }
+
     LOG("Step6.10 complete.");
 
     // Try locally removing an entry (value) which is not present on the client
     // (value mismatch).
     reg0->localPut(keys[1], vals[1]);
-    reg1->localPut(keys[3], vals[3]);
     ASSERT(reg0->localRemove(keys[1], nvals[1]) == false,
            "Result of remove should be false, as this value does not exists "
            "locally.");
-    ASSERT(reg1->localRemove(keys[3], nvals[3]) == false,
-           "Result of remove should be false, as this value does not exists "
-           "locally.");
+
     ASSERT(reg0->containsKey(keys[1]) == true, "containsKey should be true");
-    ASSERT(reg1->containsKey(keys[3]) == true, "containsKey should be true");
+
     LOG("Step6.11 complete.");
 
     // Try locally removing an entry (value) which is invalidated with a value.
     reg0->localDestroy(keys[1]);
-    reg1->localDestroy(keys[3]);
     reg0->localPut(keys[1], vals[1]);
-    reg1->localPut(keys[3], vals[3]);
     reg0->invalidate(keys[1]);
-    reg1->invalidate(keys[3]);
     ASSERT(reg0->localRemove(keys[1], vals[1]) == false,
            "Result of remove should be false, as this value does not exists "
            "locally.");
-    ASSERT(reg1->localRemove(keys[3], vals[3]) == false,
-           "Result of remove should be false, as this value does not exists "
-           "locally.");
     ASSERT(reg0->containsKey(keys[1]) == true, "containsKey should be true");
-    ASSERT(reg1->containsKey(keys[3]) == true, "containsKey should be true");
+
     LOG("Step6.12 complete.");
 
     // Try locally removing an entry (value) which is invalidated with a
     // nullptr.
     reg0->localDestroy(keys[1]);
-    reg1->localDestroy(keys[3]);
     reg0->localPut(keys[1], vals[1]);
-    reg1->localPut(keys[3], vals[3]);
     reg0->invalidate(keys[1]);
-    reg1->invalidate(keys[3]);
     ASSERT(reg0->localRemove(keys[1], static_cast<std::shared_ptr<Cacheable>>(
                                           nullptr)) == true,
            "Result of remove should be true, as this value does not exists "
            "locally.");
-    ASSERT(reg1->localRemove(keys[3], static_cast<std::shared_ptr<Cacheable>>(
-                                          nullptr)) == true,
-           "Result of remove should be true, as this value does not exists "
-           "locally.");
     ASSERT(reg0->containsKey(keys[1]) == false, "containsKey should be false");
-    ASSERT(reg1->containsKey(keys[3]) == false, "containsKey should be false");
+
     LOG("Step6.13 complete.");
 
     // Try locally removing an entry (value) with a nullptr.
     reg0->localPut(keys[1], vals[1]);
-    reg1->localPut(keys[3], vals[3]);
     ASSERT(reg0->localRemove(keys[1], static_cast<std::shared_ptr<Cacheable>>(
                                           nullptr)) == false,
            "Result of remove should be false, as this value does not exists "
            "locally.");
-    ASSERT(reg1->localRemove(keys[3], static_cast<std::shared_ptr<Cacheable>>(
-                                          nullptr)) == false,
-           "Result of remove should be false, as this value does not exists "
-           "locally.");
     ASSERT(reg0->containsKey(keys[1]) == true, "containsKey should be true");
-    ASSERT(reg1->containsKey(keys[3]) == true, "containsKey should be true");
+
     LOG("Step6.14 complete.");
 
     // Try locally removing an entry which is locally destroyed with a value.
     reg0->localPut(keys[1], vals[1]);
-    reg1->localPut(keys[3], vals[3]);
     reg0->localDestroy(keys[1]);
-    reg1->localDestroy(keys[3]);
     ASSERT(reg0->localRemove(keys[1], vals[1]) == false,
            "Result of remove should be false, as this value does not exists "
            "locally.");
-    ASSERT(reg1->localRemove(keys[3], vals[3]) == false,
-           "Result of remove should be false, as this value does not exists "
-           "locally.");
     ASSERT(reg0->containsKey(keys[1]) == false, "containsKey should be true");
-    ASSERT(reg1->containsKey(keys[3]) == false, "containsKey should be true");
+
     LOG("Step6.15 complete.");
 
     // Try locally removing an entry which is locally destroyed with a nullptr.
     reg0->localPut(keys[1], vals[1]);
-    reg1->localPut(keys[3], vals[3]);
     reg0->localDestroy(keys[1]);
-    reg1->localDestroy(keys[3]);
     ASSERT(reg0->localRemove(keys[1], static_cast<std::shared_ptr<Cacheable>>(
                                           nullptr)) == false,
            "Result of remove should be false, as this value does not exists "
            "locally.");
-    ASSERT(reg1->localRemove(keys[3], static_cast<std::shared_ptr<Cacheable>>(
-                                          nullptr)) == false,
-           "Result of remove should be false, as this value does not exists "
-           "locally.");
     ASSERT(reg0->containsKey(keys[1]) == false, "containsKey should be false");
-    ASSERT(reg1->containsKey(keys[3]) == false, "containsKey should be false");
+
     LOG("Step6.16 complete.");
 
     // Try locally removing an entry which is already removed.
     reg0->localPut(keys[1], vals[1]);
-    reg1->localPut(keys[3], vals[3]);
     ASSERT(reg0->localRemove(keys[1], vals[1]) == true,
            "Result of remove should be true, as this value does not exists "
            "locally.");
     ASSERT(reg0->localRemove(keys[1], vals[1]) == false,
            "Result of remove should be false, as this value does not exists "
            "locally.");
-    ASSERT(reg1->localRemove(keys[3], vals[3]) == true,
-           "Result of remove should be false, as this value does not exists "
-           "locally.");
-    ASSERT(reg1->localRemove(keys[3], vals[3]) == false,
-           "Result of remove should be false, as this value does not exists "
-           "locally.");
     ASSERT(reg0->containsKey(keys[1]) == false, "containsKey should be false");
-    ASSERT(reg1->containsKey(keys[3]) == false, "containsKey should be false");
-    LOG("Step6.17 complete.");
-    // Try locally removing an entry when region scope is not null.
 
+    LOG("Step6.17 complete.");
     LOG("StepSix complete.");
   }
 END_TASK_DEFINITION
 
 DUNIT_TASK_DEFINITION(CLIENT1, StepEight)
   {
-    auto reg = getHelper()->getRegion(regionNames[2]);
+    auto reg = getHelper()->getRegion(regionNames[1]);
 
     auto keyPtr = CacheableString::create(keys[0]);
     auto keyPtr1 = CacheableString::create(keys[1]);
@@ -946,8 +755,8 @@
       LOG("Got expected EntryNotFoundException for "
           "destroy operation on already removed entry.");
     }
-    putEntry(regionNames[2], keys[0], vals[0]);
-    putEntry(regionNames[2], keys[1], vals[1]);
+    putEntry(regionNames[1], keys[0], vals[0]);
+    putEntry(regionNames[1], keys[1], vals[1]);
     SLEEP(10000);  // This is for expiration on server to execute.
     ASSERT(
         reg->remove(keys[0], vals[0]) == false,
@@ -969,8 +778,8 @@
     // server with null value, result should be true.
     reg->destroy(keys[0]);
     reg->destroy(keys[1]);
-    putEntry(regionNames[2], keys[0], nvals[0]);
-    putEntry(regionNames[2], keys[1], nvals[1]);
+    putEntry(regionNames[1], keys[0], nvals[0]);
+    putEntry(regionNames[1], keys[1], nvals[1]);
     reg->localDestroy(keys[0]);
     reg->localDestroy(keys[1]);
     SLEEP(10000);  // This is for expiration on server to execute.
@@ -1011,8 +820,8 @@
       LOG("Got expected EntryNotFoundException for "
           "destroy operation on already removed entry.");
     }
-    putEntry(regionNames[2], keys[0], nvals[0]);
-    putEntry(regionNames[2], keys[1], nvals[1]);
+    putEntry(regionNames[1], keys[0], nvals[0]);
+    putEntry(regionNames[1], keys[1], nvals[1]);
     SLEEP(10000);  // This is for expiration on server to execute.
     ASSERT(
         reg->remove(keys[0],
@@ -1037,8 +846,8 @@
     // as on server with a null value, result should be true.
     reg->destroy(keys[0]);
     reg->destroy(keys[1]);
-    putEntry(regionNames[2], keys[0], nvals[0]);
-    putEntry(regionNames[2], keys[1], nvals[1]);
+    putEntry(regionNames[1], keys[0], nvals[0]);
+    putEntry(regionNames[1], keys[1], nvals[1]);
     reg->invalidate(keys[0]);
     reg->invalidate(keys[1]);
     SLEEP(10000);  // This is for expiration on server to execute.
@@ -1110,9 +919,7 @@
 DUNIT_TASK_DEFINITION(CLIENT1, StepFiveA)
   {
     putEntry(regionNames[0], keys[0], vals[0]);
-    putEntry(regionNames[1], keys[2], vals[2]);
     auto reg0 = getHelper()->getRegion(regionNames[0]);
-    auto reg1 = getHelper()->getRegion(regionNames[1]);
 
     auto keyPtr = CacheableString::create(keys[0]);
     auto keyPtr1 = CacheableString::create(keys[2]);
@@ -1121,9 +928,6 @@
     ASSERT(reg0->removeEx(keys[4]) == false,
            "Result of remove should be false, as this entry is not present in "
            "first region.");
-    ASSERT(reg1->removeEx(keys[4]) == false,
-           "Result of remove should be false, as this entry is not present in "
-           "second region.");
 
     // Try removing existent key, and existing value from regions, result should
     // be true.
@@ -1131,26 +935,16 @@
     ASSERT(reg0->removeEx(keys[0]) == true,
            "Result of remove should be true, as this entry is present in first "
            "region.");
-    ASSERT(
-        reg1->removeEx(keys[2]) == true,
-        "Result of remove should be true, as this entry is present in second "
-        "region.");
 
     ASSERT(reg0->containsKey(keys[0]) == false, "containsKey should be false");
     ASSERT(reg0->containsKeyOnServer(keyPtr) == false,
            "containsKeyOnServer should be false");
-    ASSERT(reg1->containsKey(keys[2]) == false, "containsKey should be false");
-    ASSERT(reg1->containsKeyOnServer(keyPtr1) == false,
-           "containsKeyOnServer should be false");
 
     // Try removing already deleted entry from regions, result should be false,
     // but no exception.
     ASSERT(reg0->removeEx(keys[0]) == false,
            "Result of remove should be false, as this entry is not present in "
            "first region.");
-    ASSERT(reg1->removeEx(keys[0]) == false,
-           "Result of remove should be false, as this entry is not present in "
-           "second region.");
 
     // Try locally destroying already deleted entry from regions, It should
     // result
@@ -1165,15 +959,6 @@
           "localDestroy operation on already removed entry.");
     }
 
-    try {
-      reg1->localDestroy(keys[0]);
-      FAIL(
-          "local destroy on already removed key should have thrown "
-          "EntryNotFoundException");
-    } catch (EntryNotFoundException &) {
-      LOG("Got expected EntryNotFoundException for "
-          "localDestroy operation on already removed entry.");
-    }
     LOG("StepFiveA complete.");
   }
 END_TASK_DEFINITION
@@ -1349,7 +1134,6 @@
     ASSERT(regPtr0->containsKey(keyObject1) == false,
            "containsKey should be false");
     try {
-      // retVal = regPtr0->get(keyObject1);
       retVal = regPtr0->get(x);
       ASSERT(retVal == nullptr, "value should not be found");
       FAIL("Expected IllegalArgumentException here for get");
@@ -1431,15 +1215,6 @@
            "containsKey should be false");
     regPtr0->localPut(keyObject4, valObject1);
     regPtr0->localDestroy(keyObject4);
-    /*try {
-          objVal1 =
-    std::dynamic_pointer_cast<PdxTests::PdxType>(regPtr0->get(keyObject4));;//
-    need to verify that if entry is deleted then some exception should be thrown
-          FAIL("Expected EntryExistException here for get");
-    }catch (Exception)
-    {
-     LOG (" Expected  exception thrown by get");
-    }*/
 
     createRegion("ABC", USE_ACK, true, true);
     auto regPtr2 = getHelper()->getRegion("ABC");
@@ -1458,13 +1233,11 @@
 DUNIT_TASK_DEFINITION(CLIENT2, StepSixA)
   {
     auto reg0 = getHelper()->getRegion(regionNames[0]);
-    auto reg1 = getHelper()->getRegion(regionNames[1]);
 
     auto keyPtr = CacheableString::create(keys[1]);
     auto keyPtr1 = CacheableString::create(keys[3]);
 
     putEntry(regionNames[0], keys[1], nvals[1]);
-    putEntry(regionNames[1], keys[3], nvals[3]);
 
     // Try removing value that is present on client as well as server, result
     // should be true.
@@ -1472,16 +1245,9 @@
         reg0->removeEx(keys[1]) == true,
         "Result of remove should be true, as this value is present locally, & "
         "also present on server.");
-    ASSERT(
-        reg1->removeEx(keys[3]) == true,
-        "Result of remove should be true, as this value is present locally, & "
-        "also present on server.");
     ASSERT(reg0->containsKey(keys[1]) == false, "containsKey should be false");
     ASSERT(reg0->containsKeyOnServer(keyPtr) == false,
            "containsKeyOnServer should be false");
-    ASSERT(reg1->containsKey(keys[3]) == false, "containsKey should be false");
-    ASSERT(reg1->containsKeyOnServer(keyPtr1) == false,
-           "containsKeyOnServer should be false");
     LOGINFO("Step 6a.1 complete.");
 
     // Try removing value that is invalidated on client but exists on server,
@@ -1496,77 +1262,44 @@
           "destroy operation on already removed entry.");
     }
 
-    try {
-      reg1->destroy(keys[3]);
-      FAIL(
-          "destroy on already removed key should have thrown "
-          "EntryNotFoundException");
-    } catch (EntryNotFoundException &) {
-      LOG("Got expected EntryNotFoundException for "
-          "destroy operation on already removed entry.");
-    }
-
     putEntry(regionNames[0], keys[1], nvals[1]);
-    putEntry(regionNames[1], keys[3], nvals[3]);
     reg0->invalidate(keys[1]);
-    reg1->invalidate(keys[3]);
     ASSERT(
         reg0->removeEx(keys[1]) == true,
         "Result of remove should be true, as invalidated key can be deleted.");
-    ASSERT(
-        reg1->removeEx(keys[3]) == true,
-        "Result of remove should be true, as invalidated key can be deleted.");
     LOGINFO("Step 6a.2 complete.");
 
     // Try removing a entry (value) which is not present on client as well as
     // server, result should be false.
     ASSERT(reg0->removeEx("NewKey1") == false,
            "Result of remove should be false, as this value is not present.");
-    ASSERT(reg1->removeEx("NewKey3") == false,
-           "Result of remove should be false, as this value is not present.");
     auto keyPtr2 = CacheableString::create("NewKey1");
     auto keyPtr3 = CacheableString::create("NewKey3");
     ASSERT(reg0->containsKey("NewKey1") == false,
            "containsKey should be false");
     ASSERT(reg0->containsKeyOnServer(keyPtr2) == false,
            "containsKeyOnServer should be false");
-    ASSERT(reg1->containsKey("NewKey3") == false,
-           "containsKey should be false");
-    ASSERT(reg1->containsKeyOnServer(keyPtr3) == false,
-           "containsKeyOnServer should be false");
     LOGINFO("Step 6a.3 complete.");
 
     // Try removing a entry (value) which is not present on client but exists on
     // the server, result should be true.
     putEntry(regionNames[0], keys[1], nvals[1]);
-    putEntry(regionNames[1], keys[3], nvals[3]);
     reg0->localDestroy(keys[1]);
-    reg1->localDestroy(keys[3]);
     ASSERT(reg0->removeEx(keys[1]) == true,
            "Result of remove should be true, as this value does not exist "
            "locally, but exists on server.");
-    ASSERT(reg1->removeEx(keys[3]) == true,
-           "Result of remove should be true, as this value does not exist "
-           "locally, but exists on server.");
     ASSERT(reg0->containsKey(keys[1]) == false, "containsKey should be false");
     ASSERT(reg0->containsKeyOnServer(keyPtr) == false,
            "containsKeyOnServer should be false");
-    ASSERT(reg1->containsKey(keys[3]) == false, "containsKey should be false");
-    ASSERT(reg1->containsKeyOnServer(keyPtr1) == false,
-           "containsKeyOnServer should be false");
     LOG("Step 6a.4 complete.");
 
     //-------------------------------------localRemove
     // Testcases------------------------------------------------
     // Try locally removing an entry (value) which is present on the client.
     reg0->localPut(keys[1], vals[1]);
-    reg1->localPut(keys[3], vals[3]);
     ASSERT(reg0->localRemoveEx(keys[1]) == true,
            "Result of remove should be true, as this value exists locally.");
-    ASSERT(reg1->localRemoveEx(keys[3]) == true,
-           "Result of remove should be true, as this value exists locally.");
     ASSERT(reg0->containsKey(keys[1]) == false, "containsKey should be false");
-    ASSERT(reg1->containsKey(keys[3]) == false, "containsKey should be false");
     LOG("Step 6a.5 complete.");
 
     // Try local destroy on entry that is already removed, should get an
@@ -1580,62 +1313,35 @@
       LOG("Got expected EntryNotFoundException for "
           "localDestroy operation on already removed entry.");
     }
-    try {
-      reg1->localDestroy(keys[3]);
-      FAIL(
-          "local destroy on already removed key should have thrown "
-          "EntryNotFoundException");
-    } catch (EntryNotFoundException &) {
-      LOG("Got expected EntryNotFoundException for "
-          "localDestroy operation on already removed entry.");
-    }
+
     LOG("Step 6a.6 complete.");
 
     // Try locally removing an entry (value) which is invalidated with a value.
     reg0->localPut(keys[1], vals[1]);
-    reg1->localPut(keys[3], vals[3]);
     reg0->invalidate(keys[1]);
-    reg1->invalidate(keys[3]);
     ASSERT(reg0->localRemoveEx(keys[1]) == true,
            "Result of remove should be true.");
-    ASSERT(reg1->localRemoveEx(keys[3]) == true,
-           "Result of remove should be true.");
     ASSERT(reg0->containsKey(keys[1]) == false, "containsKey should be true");
-    ASSERT(reg1->containsKey(keys[3]) == false, "containsKey should be true");
     LOG("Step 6a.7 complete.");
 
     // Try locally removing an entry which is locally destroyed with a value.
     reg0->localPut(keys[1], vals[1]);
-    reg1->localPut(keys[3], vals[3]);
     reg0->localDestroy(keys[1]);
-    reg1->localDestroy(keys[3]);
     ASSERT(reg0->localRemoveEx(keys[1]) == false,
            "Result of remove should be false, as this value does not exists "
            "locally.");
-    ASSERT(reg1->localRemoveEx(keys[3]) == false,
-           "Result of remove should be false, as this value does not exists "
-           "locally.");
     ASSERT(reg0->containsKey(keys[1]) == false, "containsKey should be true");
-    ASSERT(reg1->containsKey(keys[3]) == false, "containsKey should be true");
     LOG("Step 6a.8 complete.");
 
     // Try locally removing an entry which is already removed.
     reg0->localPut(keys[1], vals[1]);
-    reg1->localPut(keys[3], vals[3]);
     ASSERT(reg0->localRemoveEx(keys[1]) == true,
            "Result of remove should be true, as this value does not exists "
            "locally.");
     ASSERT(reg0->localRemoveEx(keys[1]) == false,
            "Result of remove should be false, as this value does not exists "
            "locally.");
-    ASSERT(reg1->localRemoveEx(keys[3]) == true,
-           "Result of remove should be false, as this value does not exists "
-           "locally.");
-    ASSERT(reg1->localRemoveEx(keys[3]) == false,
-           "Result of remove should be false, as this value does not exists "
-           "locally.");
     ASSERT(reg0->containsKey(keys[1]) == false, "containsKey should be false");
-    ASSERT(reg1->containsKey(keys[3]) == false, "containsKey should be false");
     LOG("Step 6a.9 complete.");
     // Try locally removing an entry when region scope is not null.
 
@@ -1740,7 +1446,6 @@
 DUNIT_MAIN
   {
     runRemoveOps();
-
     runRemoveOps1();
   }
 END_MAIN
diff --git a/cppcache/integration-test/testThinClientSecurityAuthentication.cpp b/cppcache/integration-test/testThinClientSecurityAuthentication.cpp
deleted file mode 100644
index 6dc29c3..0000000
--- a/cppcache/integration-test/testThinClientSecurityAuthentication.cpp
+++ /dev/null
@@ -1,501 +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.
- */
-#include "fw_dunit.hpp"
-#include "ThinClientHelper.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-
-#include "ThinClientSecurity.hpp"
-#include <geode/CacheTransactionManager.hpp>
-
-#define CORRECT_CREDENTIALS 'C'
-#define INCORRECT_CREDENTIALS 'I'
-#define NOT_PROVIDED_CREDENTIALS 'N'
-
-using apache::geode::client::testframework::security::CredentialGenerator;
-
-const char *locHostPort =
-    CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
-const char *regionNamesAuth[] = {"DistRegionAck", "DistRegionNoAck"};
-std::shared_ptr<CredentialGenerator> credentialGeneratorHandler;
-
-std::string getXmlPath() {
-  char xmlPath[1000] = {'\0'};
-  const char *path = ACE_OS::getenv("TESTSRC");
-  ASSERT(path != nullptr,
-         "Environment variable TESTSRC for test source directory is not set.");
-  strncpy(xmlPath, path, strlen(path) - strlen("cppcache"));
-  strncat(xmlPath, "xml/Security/", sizeof(xmlPath) - strlen(xmlPath) - 1);
-  return std::string(xmlPath);
-}
-
-void initCredentialGenerator() {
-  static int loopNum = 1;
-
-  switch (loopNum) {
-    case 1: {
-      credentialGeneratorHandler = CredentialGenerator::create("DUMMY");
-      break;
-    }
-    case 2: {
-      credentialGeneratorHandler = CredentialGenerator::create("LDAP");
-      break;
-    }
-    default:
-    case 3: {
-      credentialGeneratorHandler = CredentialGenerator::create("PKCS");
-      break;
-    }
-  }
-
-  if (credentialGeneratorHandler == nullptr) {
-    FAIL("credentialGeneratorHandler is nullptr");
-  }
-
-  loopNum++;
-  if (loopNum > 3) loopNum = 1;
-}
-
-void initClientAuth(char credentialsType) {
-  auto config = Properties::create();
-  if (credentialGeneratorHandler == nullptr) {
-    FAIL("credentialGeneratorHandler is nullptr");
-  }
-  bool insertAuthInit = true;
-  switch (credentialsType) {
-    case 'C':
-      credentialGeneratorHandler->getValidCredentials(config);
-      config->insert("security-password",
-                     config->find("security-username")->value().c_str());
-      printf("Username is %s and Password is %s ",
-             config->find("security-username")->value().c_str(),
-             config->find("security-password")->value().c_str());
-      break;
-    case 'I':
-      credentialGeneratorHandler->getInvalidCredentials(config);
-      config->insert("security-password", "junk");
-      printf("Username is %s and Password is %s ",
-             config->find("security-username")->value().c_str(),
-             config->find("security-password")->value().c_str());
-      break;
-    case 'N':
-    default:
-      insertAuthInit = false;
-      break;
-  }
-  if (insertAuthInit) {
-    // config->insert(
-    // "security-client-auth-factory","createUserPasswordAuthInitInstance" );
-    // config->insert( "security-client-auth-library","authinitImpl" );
-    credentialGeneratorHandler->getAuthInit(config);
-  }
-
-  try {
-    initClient(true, config);
-  } catch (...) {
-    throw;
-  }
-}
-
-#define CLIENT1 s1p1
-#define CLIENT2 s1p2
-#define CLIENT3 s2p1
-#define LOCATORSERVER s2p2
-
-DUNIT_TASK_DEFINITION(LOCATORSERVER, CreateLocator)
-  {
-    if (isLocator) CacheHelper::initLocator(1);
-    LOG("Locator1 started");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(LOCATORSERVER, CreateServer1)
-  {
-    initCredentialGenerator();
-    std::string cmdServerAuthenticator;
-    if (credentialGeneratorHandler == nullptr) {
-      FAIL("credentialGeneratorHandler is nullptr");
-    }
-
-    try {
-      if (isLocalServer) {
-        cmdServerAuthenticator = credentialGeneratorHandler->getServerCmdParams(
-            "authenticator", getXmlPath());
-        printf("Input to server cmd is -->  %s",
-               cmdServerAuthenticator.c_str());
-        CacheHelper::initServer(
-            1, nullptr, locHostPort,
-            const_cast<char *>(cmdServerAuthenticator.c_str()));
-        LOG("Server1 started");
-      }
-    } catch (...) {
-      printf("this is some exception");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(LOCATORSERVER, CreateServer2)
-  {
-    std::string cmdServerAuthenticator2;
-    cmdServerAuthenticator2 = credentialGeneratorHandler->getServerCmdParams(
-        "authenticator", getXmlPath());
-    printf("Input to server cmd is -->  %s", cmdServerAuthenticator2.c_str());
-    CacheHelper::initServer(
-        2, "cacheserver_notify_subscription2.xml", locHostPort,
-        const_cast<char *>(cmdServerAuthenticator2.c_str()));
-    LOG("Server2 started");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepOne)
-  {
-    initCredentialGenerator();
-    try {
-      initClientAuth(INCORRECT_CREDENTIALS);
-    } catch (
-        const apache::geode::client::AuthenticationFailedException &other) {
-      LOG(other.getStackTrace());
-      LOG(other.what());
-    }
-
-    try {
-      createRegionForSecurity(regionNamesAuth[0], USE_ACK, true);
-      FAIL("Should have thrown AuthenticationFailedException.");
-    } catch (
-        const apache::geode::client::AuthenticationFailedException &other) {
-      LOG(other.getStackTrace());
-      LOG(other.what());
-    } catch (const apache::geode::client::Exception &other) {
-      LOG(other.getStackTrace());
-      LOG(other.what());
-      FAIL("Only AuthenticationFailedException is expected");
-    }
-    LOG("StepOne Completed");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepTwo)
-  {
-    initClientAuth(CORRECT_CREDENTIALS);
-    try {
-      createRegionForSecurity(regionNamesAuth[0], USE_ACK, true);
-      createEntry(regionNamesAuth[0], keys[0], vals[0]);
-      updateEntry(regionNamesAuth[0], keys[0], nvals[0]);
-      auto regPtr0 = getHelper()->getRegion(regionNamesAuth[0]);
-      regPtr0->containsKeyOnServer(
-          apache::geode::client::CacheableKey::create(keys[0]));
-    } catch (const apache::geode::client::Exception &other) {
-      LOG(other.getStackTrace());
-      FAIL(other.what());
-    }
-    LOG("Handshake  and  Authentication successfully completed");
-    LOG("StepTwo Completed");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, StepThree)
-  {
-    initCredentialGenerator();
-    initClientAuth(CORRECT_CREDENTIALS);
-    try {
-      createRegionForSecurity(regionNamesAuth[0], USE_ACK, true);
-    } catch (const apache::geode::client::Exception &other) {
-      LOG(other.getStackTrace());
-      FAIL(other.what());
-    }
-    LOG("Handshake  and  Authentication successfully completed");
-  }
-  LOG("StepThree Completed");
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT3, StepFour)
-  {
-    initCredentialGenerator();
-    try {
-      initClientAuth(NOT_PROVIDED_CREDENTIALS);
-    } catch (
-        const apache::geode::client::AuthenticationRequiredException &other) {
-      LOG(other.getStackTrace());
-      FAIL(other.what());
-    }
-
-    try {
-      createRegionForSecurity(regionNamesAuth[0], USE_ACK, true);
-      FAIL("Should have thrown AuthenticationRequiredException.");
-    } catch (
-        const apache::geode::client::AuthenticationRequiredException &other) {
-      LOG(other.getStackTrace());
-      LOG(other.what());
-    } catch (const apache::geode::client::Exception &other) {
-      LOG(other.getStackTrace());
-      LOG(other.what());
-      FAIL("Only AuthenticationRequiredException is expected");
-    }
-    LOG("StepFour Completed");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, StepFive)
-  {
-    SLEEP(80);
-    try {
-      createRegionForSecurity(regionNamesAuth[1], USE_ACK, true);
-      auto regPtr0 = getHelper()->getRegion(regionNamesAuth[0]);
-      auto keyPtr = CacheableKey::create(keys[0]);
-      auto checkPtr =
-          std::dynamic_pointer_cast<CacheableString>(regPtr0->get(keyPtr));
-      if (checkPtr != nullptr && !strcmp(nvals[0], checkPtr->value().c_str())) {
-        LOG("checkPtr is not null");
-        char buf[1024];
-        sprintf(buf, "In net search, get returned %s for key %s",
-                checkPtr->value().c_str(), keys[0]);
-        LOG(buf);
-      } else {
-        LOG("checkPtr is nullptr");
-      }
-    } catch (const apache::geode::client::Exception &other) {
-      LOG(other.getStackTrace());
-      FAIL(other.what());
-    }
-    LOG("Handshake  and  Authentication successfully completed after FailOver");
-    LOG("StepFive Completed");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepSix)
-  {
-    initClientAuth(CORRECT_CREDENTIALS);
-    try {
-      createRegionForSecurity(regionNamesAuth[0], USE_ACK, true);
-      createEntry(regionNamesAuth[0], keys[0], vals[0]);
-      updateEntry(regionNamesAuth[0], keys[0], nvals[0]);
-    } catch (const apache::geode::client::Exception &other) {
-      LOG(other.getStackTrace());
-      FAIL(other.what());
-    }
-    LOG("Handshake  and  Authentication successfully completed");
-    LOG("StepSix Completed");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, StepSeven)
-  {
-    try {
-      initClientAuth(INCORRECT_CREDENTIALS);
-    } catch (
-        const apache::geode::client::AuthenticationFailedException &other) {
-      LOG(other.getStackTrace());
-      LOG(other.what());
-    }
-    LOG("Setting JavaConnectionPoolSize to 0 ");
-    CacheHelper::setJavaConnectionPoolSize(0);
-    SLEEP(500);
-    try {
-      createRegionForSecurity(regionNamesAuth[0], USE_ACK, true, nullptr, true,
-                              0);
-      FAIL("Should have thrown AuthenticationFailedException.");
-    } catch (
-        const apache::geode::client::AuthenticationFailedException &other) {
-      LOG(other.getStackTrace());
-      LOG(other.what());
-    } catch (const apache::geode::client::Exception &other) {
-      LOG(other.getStackTrace());
-      LOG(other.what());
-      FAIL("Only AuthenticationFailedException is expected");
-    }
-    LOG("StepSeven Completed");
-  }
-END_TASK_DEFINITION
-
-void createEntryTx(const char *name, const char *key, const char *value) {
-  LOG("createEntry() entered.");
-  fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
-  // Create entry, verify entry is correct
-  auto keyPtr = CacheableKey::create(key);
-  auto valPtr = CacheableString::create(value);
-
-  auto regPtr = getHelper()->getRegion(name);
-  ASSERT(regPtr != nullptr, "Region not found.");
-
-  // ASSERT( !regPtr->containsKey( keyPtr ), "Key should not have been found in
-  // region." );
-  // ASSERT( !regPtr->containsValueForKey( keyPtr ), "Value should not have been
-  // found in region." );
-
-  // regPtr->create( keyPtr, valPtr );
-  regPtr->put(keyPtr, valPtr);
-  LOG("Created entry.");
-
-  // verifyEntry( name, key, value );
-  LOG("Entry created.");
-}
-
-void updateEntryTx(const char *name, const char *key, const char *value) {
-  LOG("updateEntry() entered.");
-  fprintf(stdout, "Updating entry -- key: %s  value: %s in region %s\n", key,
-          value, name);
-  fflush(stdout);
-  // Update entry, verify entry is correct
-  auto keyPtr = CacheableKey::create(key);
-  auto valPtr = CacheableString::create(value);
-
-  auto regPtr = getHelper()->getRegion(name);
-  ASSERT(regPtr != nullptr, "Region not found.");
-
-  ASSERT(regPtr->containsKey(keyPtr), "Key should have been found in region.");
-  ASSERT(regPtr->containsValueForKey(keyPtr),
-         "Value should have been found in region.");
-
-  regPtr->put(keyPtr, valPtr);
-  LOG("Put entry.");
-
-  verifyEntry(name, key, value);
-  LOG("Entry updated.");
-}
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepEight)
-  {
-    initClientAuth(CORRECT_CREDENTIALS);
-    try {
-      createRegionForSecurity(regionNamesAuth[1], USE_ACK, true);
-      auto regPtr0 = getHelper()->getRegion(regionNamesAuth[1]);
-      auto txManager = getHelper()->getCache()->getCacheTransactionManager();
-      LOG("txManager got");
-      txManager->begin();
-      LOG("txManager begin done");
-      createEntryTx(regionNamesAuth[1], "TxKey", "TxValue");
-      LOG("createEntryTx done");
-      txManager->commit();
-      LOG("txManager commit done");
-
-      auto keyPtr = CacheableKey::create("TxKey");
-      auto checkPtr =
-          std::dynamic_pointer_cast<CacheableString>(regPtr0->get(keyPtr));
-      ASSERT(checkPtr != nullptr, "Value not found.");
-      LOGINFO("checkPtr->value().c_str() = %s ", checkPtr->value().c_str());
-      ASSERT(strcmp("TxValue", checkPtr->value().c_str()) == 0,
-             "Value not correct.");
-      if (checkPtr != nullptr &&
-          !strcmp("TxValue", checkPtr->value().c_str())) {
-        LOG("checkPtr is not null");
-        char buf[1024];
-        sprintf(buf, "In net search, get returned %s for key %s",
-                checkPtr->value().c_str(), "TxKey");
-        LOG(buf);
-      } else {
-        LOG("checkPtr is nullptr");
-      }
-
-      txManager->begin();
-      LOG("txManager begin done");
-      createEntryTx(regionNamesAuth[1], "TxKey", "TxNewValue");
-      LOG("createEntryTx done");
-      txManager->rollback();
-      LOG("txManager rollback done");
-
-      checkPtr =
-          std::dynamic_pointer_cast<CacheableString>(regPtr0->get(keyPtr));
-      ASSERT(checkPtr != nullptr, "Value not found.");
-      ASSERT(strcmp("TxValue", checkPtr->value().c_str()) == 0,
-             "Value not correct.");
-      if (checkPtr != nullptr &&
-          !strcmp("TxValue", checkPtr->value().c_str())) {
-        LOG("checkPtr is not null");
-        char buf[1024];
-        sprintf(buf, "In net search, get returned %s for key %s",
-                checkPtr->value().c_str(), "TxKey");
-        LOG(buf);
-      } else {
-        LOG("checkPtr is nullptr");
-      }
-
-    } catch (const apache::geode::client::Exception &other) {
-      LOG(other.getStackTrace());
-      FAIL(other.what());
-    }
-
-    LOG("StepEight Completed");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, CloseCache1)
-  { cleanProc(); }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, CloseCache2)
-  { cleanProc(); }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT3, CloseCache3)
-  { cleanProc(); }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(LOCATORSERVER, CloseServer1)
-  {
-    if (isLocalServer) {
-      CacheHelper::closeServer(1);
-      LOG("SERVER1 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(LOCATORSERVER, CloseServer2)
-  {
-    if (isLocalServer) {
-      CacheHelper::closeServer(2);
-      LOG("SERVER2 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(LOCATORSERVER, CloseLocator)
-  {
-    if (isLocator) {
-      CacheHelper::closeLocator(1);
-      LOG("Locator1 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-void doThinClientSecurityAuthentication() {
-  CALL_TASK(CreateLocator);
-  CALL_TASK(CreateServer1);
-  CALL_TASK(StepOne);
-  CALL_TASK(CreateServer2);
-  CALL_TASK(CloseCache1);
-  CALL_TASK(StepTwo);
-  CALL_TASK(StepThree);
-  CALL_TASK(StepFour);
-  CALL_TASK(CloseServer1);
-  CALL_TASK(StepFive);
-  CALL_TASK(CloseCache1);
-  CALL_TASK(CloseCache2);
-  CALL_TASK(StepSix);
-  CALL_TASK(StepSeven);
-  CALL_TASK(StepEight);
-  CALL_TASK(CloseCache1);
-  CALL_TASK(CloseCache2);
-  CALL_TASK(CloseCache3);
-  CALL_TASK(CloseServer2);
-  CALL_TASK(CloseLocator);
-}
-
-DUNIT_MAIN
-  { doThinClientSecurityAuthentication(); }
-END_MAIN
diff --git a/cppcache/integration-test/testThinClientSecurityAuthenticationMU.cpp b/cppcache/integration-test/testThinClientSecurityAuthenticationMU.cpp
deleted file mode 100644
index a72fb5c..0000000
--- a/cppcache/integration-test/testThinClientSecurityAuthenticationMU.cpp
+++ /dev/null
@@ -1,552 +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.
- */
-
-#define ROOT_NAME "testThinClientSecurityAuthenticationMU"
-
-#include "fw_dunit.hpp"
-#include "ThinClientHelper.hpp"
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-
-#include "ThinClientSecurity.hpp"
-#include <geode/CacheTransactionManager.hpp>
-
-#define CORRECT_CREDENTIALS 'C'
-#define INCORRECT_CREDENTIALS 'I'
-#define NOT_PROVIDED_CREDENTIALS 'N'
-
-using apache::geode::client::testframework::security::CredentialGenerator;
-
-const char *locHostPort =
-    CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
-const char *regionNamesAuth[] = {"DistRegionAck", "DistRegionNoAck"};
-std::shared_ptr<CredentialGenerator> credentialGeneratorHandler;
-
-std::string getXmlPath() {
-  char xmlPath[1000] = {'\0'};
-  const char *path = ACE_OS::getenv("TESTSRC");
-  ASSERT(path != nullptr,
-         "Environment variable TESTSRC for test source directory is not set.");
-  strncpy(xmlPath, path, strlen(path) - strlen("cppcache"));
-  strncat(xmlPath, "xml/Security/", sizeof(xmlPath) - strlen(xmlPath) - 1);
-  return std::string(xmlPath);
-}
-
-void initCredentialGenerator() {
-  static int loopNum = 1;
-
-  switch (loopNum) {
-    case 1: {
-      credentialGeneratorHandler = CredentialGenerator::create("DUMMY");
-      break;
-    }
-    case 2: {
-      credentialGeneratorHandler = CredentialGenerator::create("LDAP");
-      break;
-    }
-    default:
-    case 3: {
-      credentialGeneratorHandler = CredentialGenerator::create("PKCS");
-      break;
-    }
-  }
-
-  if (credentialGeneratorHandler == nullptr) {
-    FAIL("credentialGeneratorHandler is nullptr");
-  }
-
-  loopNum++;
-  if (loopNum > 2) loopNum = 1;
-}
-std::shared_ptr<Properties> userCreds;
-void initClientAuth(char credentialsType) {
-  printf(" in initclientAuth 0 = %c ", credentialsType);
-  userCreds = Properties::create();
-  auto config = Properties::create();
-  if (credentialGeneratorHandler == nullptr) {
-    FAIL("credentialGeneratorHandler is nullptr");
-  }
-  bool insertAuthInit = true;
-  switch (credentialsType) {
-    case 'C':
-      LOG(" in initclientAuth0.00");
-      credentialGeneratorHandler->getValidCredentials(userCreds);
-      // config->insert("security-password" ,
-      // config->find("security-username")->value().c_str() );
-      // printf("Username is %s and Password is %s
-      // ",userCreds->find("security-username")->value().c_str(),userCreds->find("security-password")->value().c_str());
-      break;
-    case 'I':
-      LOG(" in initclientAuth0.0");
-      credentialGeneratorHandler->getInvalidCredentials(userCreds);
-      // config->insert("security-password" , "junk");
-      //   printf("Username is %s and Password is %s
-      //   ",userCreds->find("security-username")->value().c_str(),userCreds->find("security-password")->value().c_str());
-      break;
-    case 'N':
-    default:
-      insertAuthInit = false;
-      break;
-  }
-  if (insertAuthInit) {
-    // config->insert(
-    // "security-client-auth-factory","createUserPasswordAuthInitInstance" );
-    // config->insert( "security-client-auth-library","authinitImpl" );
-    credentialGeneratorHandler->getAuthInit(config);
-  }
-
-  try {
-    LOG(" in initclientAuth");
-    initClient(true, config);
-    LOG(" in initclientAuth 2");
-  } catch (...) {
-    throw;
-  }
-}
-
-#define CLIENT1 s1p1
-#define CLIENT2 s1p2
-#define CLIENT3 s2p1
-#define LOCATORSERVER s2p2
-
-DUNIT_TASK_DEFINITION(LOCATORSERVER, CreateLocator)
-  {
-    if (isLocator) CacheHelper::initLocator(1);
-    LOG("Locator1 started");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(LOCATORSERVER, CreateServer1)
-  {
-    initCredentialGenerator();
-    std::string cmdServerAuthenticator;
-    if (credentialGeneratorHandler == nullptr) {
-      FAIL("credentialGeneratorHandler is nullptr");
-    }
-
-    try {
-      if (isLocalServer) {
-        cmdServerAuthenticator = credentialGeneratorHandler->getServerCmdParams(
-            "authenticator", getXmlPath());
-        printf("Input to server cmd is -->  %s",
-               cmdServerAuthenticator.c_str());
-        CacheHelper::initServer(
-            1, nullptr, locHostPort,
-            const_cast<char *>(cmdServerAuthenticator.c_str()));
-        LOG("Server1 started");
-      }
-    } catch (...) {
-      printf("this is some exception");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(LOCATORSERVER, CreateServer2)
-  {
-    std::string cmdServerAuthenticator2;
-    cmdServerAuthenticator2 = credentialGeneratorHandler->getServerCmdParams(
-        "authenticator", getXmlPath());
-    printf("Input to server cmd is -->  %s", cmdServerAuthenticator2.c_str());
-    CacheHelper::initServer(
-        2, "cacheserver_notify_subscription2.xml", locHostPort,
-        const_cast<char *>(cmdServerAuthenticator2.c_str()));
-    LOG("Server2 started");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepOne)
-  {
-    LOG(" 1");
-    initCredentialGenerator();
-    LOG(" 2");
-    try {
-      initClientAuth(INCORRECT_CREDENTIALS);
-      LOG(" 3");
-    } catch (
-        const apache::geode::client::AuthenticationFailedException &other) {
-      LOG(other.getStackTrace().c_str());
-      LOG(other.what());
-    }
-
-    try {
-      LOG(" 4");
-      createRegionForSecurity(regionNamesAuth[0], USE_ACK, false, nullptr,
-                              false, -1, true, 0);
-      LOG(" 5");
-      // need to insure pool name
-      auto pool = getPool(regionNamesAuth[0]);
-      LOG(" 6");
-      if (pool != nullptr) {
-        LOG(" 7");
-        auto virtualCache = getVirtualCache(userCreds, pool);
-        LOG(" 8");
-        virtualCache.getRegion(regionNamesAuth[0])->put(keys[0], vals[0]);
-        LOG("Operation allowed, something is wrong.");
-      } else {
-        LOG("Pool is nullptr");
-      }
-      FAIL("Should have thrown AuthenticationFailedException.");
-    } catch (
-        const apache::geode::client::AuthenticationFailedException &other) {
-      LOG(other.getStackTrace().c_str());
-      LOG(other.what());
-    } catch (const apache::geode::client::Exception &other) {
-      LOG(other.getStackTrace().c_str());
-      LOG(other.what());
-      FAIL("Only AuthenticationFailedException is expected");
-    }
-    LOG("StepOne Completed");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepTwo)
-  {
-    initClientAuth(CORRECT_CREDENTIALS);
-    try {
-      createRegionForSecurity(regionNamesAuth[0], USE_ACK, false, nullptr,
-                              false, -1, true, 0);
-      char buff[128] = {'\0'};
-      sprintf(buff, "%s_0", regionNamesAuth[0]);
-      auto pool = getPool(regionNamesAuth[0]);
-      if (pool != nullptr) {
-        auto virtualCache = getVirtualCache(userCreds, pool);
-        auto virtualRegion = virtualCache.getRegion(regionNamesAuth[0]);
-        virtualRegion->create(keys[0], vals[0]);
-        virtualRegion->put(keys[0], nvals[0]);
-        virtualRegion->containsKeyOnServer(
-            apache::geode::client::CacheableKey::create(keys[0]));
-        LOG("Operation allowed.");
-      } else {
-        LOG("Pool is nullptr");
-      }
-    } catch (const apache::geode::client::Exception &other) {
-      LOG(other.getStackTrace().c_str());
-      FAIL(other.what());
-    }
-    LOG("Handshake  and  Authentication successfully completed");
-    LOG("StepTwo Completed");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, StepThree)
-  {
-    initCredentialGenerator();
-    initClientAuth(CORRECT_CREDENTIALS);
-    try {
-      createRegionForSecurity(regionNamesAuth[0], USE_ACK, false, nullptr,
-                              false, -1, true, 0);
-      // need to insure pool name
-      auto pool = getPool(regionNamesAuth[0]);
-      if (pool != nullptr) {
-        auto virtualCache = getVirtualCache(userCreds, pool);
-        virtualCache.getRegion(regionNamesAuth[0])->put(keys[0], vals[0]);
-      } else {
-        LOG("Pool is nullptr");
-      }
-    } catch (const apache::geode::client::Exception &other) {
-      LOG(other.getStackTrace().c_str());
-      FAIL(other.what());
-    }
-    LOG("Handshake  and  Authentication successfully completed");
-  }
-  LOG("StepThree Completed");
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT3, StepFour)
-  {
-    initCredentialGenerator();
-    try {
-      initClientAuth(NOT_PROVIDED_CREDENTIALS);
-    } catch (
-        const apache::geode::client::AuthenticationRequiredException &other) {
-      LOG(other.getStackTrace().c_str());
-      FAIL(other.what());
-    }
-
-    try {
-      createRegionForSecurity(regionNamesAuth[0], USE_ACK, false, nullptr,
-                              false, -1, true, 0);
-      // need to insure pool name
-      auto pool = getPool(regionNamesAuth[0]);
-      if (pool != nullptr) {
-        auto virtualCache = getVirtualCache(userCreds, pool);
-        virtualCache.getRegion(regionNamesAuth[0])->put(keys[0], vals[0]);
-      } else {
-        LOG("Pool is nullptr");
-      }
-      FAIL("Should have thrown AuthenticationRequiredException.");
-    } catch (
-        const apache::geode::client::AuthenticationRequiredException &other) {
-      LOG(other.getStackTrace().c_str());
-      LOG(other.what());
-    } catch (
-        const apache::geode::client::AuthenticationFailedException &other) {
-      LOG(other.getStackTrace().c_str());
-      LOG(other.what());
-    } catch (const apache::geode::client::Exception &other) {
-      LOG(other.getStackTrace().c_str());
-      LOG(other.what());
-      FAIL("Only AuthenticationRequiredException is expected");
-    }
-    LOG("StepFour Completed");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, StepFive)
-  {
-    SLEEP(80);
-    try {
-      createRegionForSecurity(regionNamesAuth[1], USE_ACK, false, nullptr,
-                              false, -1, true, 0);
-      // need to insure pool name
-      auto pool = getPool(regionNamesAuth[1]);
-
-      std::shared_ptr<Region> virtualRegion;
-      if (pool != nullptr) {
-        auto virtualCache = getVirtualCache(userCreds, pool);
-        virtualRegion = virtualCache.getRegion(regionNamesAuth[1]);
-      } else {
-        LOG("Pool is nullptr");
-      }
-      auto keyPtr = CacheableKey::create(keys[0]);
-      LOG("before get");
-      auto checkPtr = std::dynamic_pointer_cast<CacheableString>(
-          virtualRegion->get(keyPtr));
-      if (checkPtr != nullptr && !strcmp(nvals[0], checkPtr->value().c_str())) {
-        LOG("checkPtr is not null");
-        char buf[1024];
-        sprintf(buf, "In net search, get returned %s for key %s",
-                checkPtr->value().c_str(), keys[0]);
-        LOG(buf);
-      } else {
-        LOG("checkPtr is nullptr");
-      }
-    } catch (const apache::geode::client::Exception &other) {
-      LOG(other.getStackTrace().c_str());
-      FAIL(other.what());
-    }
-    LOG("Handshake  and  Authentication successfully completed after FailOver");
-    LOG("StepFive Completed");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepSix)
-  {
-    initClientAuth(CORRECT_CREDENTIALS);
-    try {
-      createRegionForSecurity(regionNamesAuth[0], USE_ACK, false, nullptr,
-                              false, -1, true, 0);
-      char buff[128] = {'\0'};
-      sprintf(buff, "%s_1", regionNamesAuth[0]);
-      auto pool = getPool(regionNamesAuth[0]);
-      if (pool != nullptr) {
-        auto virtualCache = getVirtualCache(userCreds, pool);
-        auto virtualRegion = virtualCache.getRegion(regionNamesAuth[0]);
-        virtualRegion->create(keys[0], vals[0]);
-        virtualRegion->put(keys[0], nvals[0]);
-        LOG("Operation allowed, something is wrong.");
-      } else {
-        LOG("Pool is nullptr");
-      }
-    } catch (const apache::geode::client::Exception &other) {
-      LOG(other.getStackTrace().c_str());
-      FAIL(other.what());
-    }
-    LOG("Handshake  and  Authentication successfully completed");
-    LOG("StepSix Completed");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, StepSeven)
-  {
-    try {
-      initClientAuth(INCORRECT_CREDENTIALS);
-    } catch (
-        const apache::geode::client::AuthenticationFailedException &other) {
-      LOG(other.getStackTrace().c_str());
-      LOG(other.what());
-    }
-    LOG("Setting JavaConnectionPoolSize to 0 ");
-    CacheHelper::setJavaConnectionPoolSize(0);
-    SLEEP(500);
-    try {
-      createRegionForSecurity(regionNamesAuth[0], USE_ACK, false, nullptr,
-                              false, -1, true, 0);
-      char buff[128] = {'\0'};
-      sprintf(buff, "%s_0", regionNamesAuth[0]);
-      auto pool = getPool(regionNamesAuth[0]);
-      if (pool != nullptr) {
-        auto virtualCache = getVirtualCache(userCreds, pool);
-        auto virtualRegion = virtualCache.getRegion(regionNamesAuth[0]);
-        virtualRegion->create(keys[0], vals[0]);
-        virtualRegion->put(keys[0], nvals[0]);
-        LOG("Operation allowed, something is wrong.");
-      } else {
-        LOG("Pool is nullptr");
-      }
-      FAIL("Should have thrown AuthenticationFailedException.");
-    } catch (
-        const apache::geode::client::AuthenticationFailedException &other) {
-      LOG(other.getStackTrace().c_str());
-      LOG(other.what());
-    } catch (const apache::geode::client::Exception &other) {
-      LOG(other.getStackTrace().c_str());
-      LOG(other.what());
-      FAIL("Only AuthenticationFailedException is expected");
-    }
-    LOG("StepSeven Completed");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepEight)
-  {
-    initClientAuth(CORRECT_CREDENTIALS);
-    try {
-      createRegionForSecurity(regionNamesAuth[1], USE_ACK, false, nullptr,
-                              false, -1, true, 0);
-      // need to insure pool name
-      auto pool = getPool(regionNamesAuth[1]);
-
-      std::shared_ptr<Region> virtualRegion;
-      if (pool != nullptr) {
-        auto virtualCache = getVirtualCache(userCreds, pool);
-        virtualRegion = virtualCache.getRegion(regionNamesAuth[1]);
-      } else {
-        LOG("Pool is nullptr");
-      }
-
-      auto txManager = getHelper()->getCache()->getCacheTransactionManager();
-      LOG("txManager got");
-      txManager->begin();
-      LOG("txManager begin done");
-      virtualRegion->put("TxKey", "TxValue");
-      LOG("createEntryTx done");
-      txManager->commit();
-      LOG("txManager commit done");
-
-      auto checkPtr = std::dynamic_pointer_cast<CacheableString>(
-          virtualRegion->get("TxKey"));
-      ASSERT(checkPtr != nullptr, "Value not found.");
-      LOGINFO("checkPtr->value().c_str() = %s ", checkPtr->value().c_str());
-      ASSERT(strcmp("TxValue", checkPtr->value().c_str()) == 0,
-             "Value not correct.");
-      if (checkPtr != nullptr &&
-          !strcmp("TxValue", checkPtr->value().c_str())) {
-        LOG("checkPtr is not null");
-        char buf[1024];
-        sprintf(buf, "In net search, get returned %s for key %s",
-                checkPtr->value().c_str(), "TxKey");
-        LOG(buf);
-      } else {
-        LOG("checkPtr is nullptr");
-      }
-
-      txManager->begin();
-      LOG("txManager begin done");
-      virtualRegion->put("TxKey", "TxNewValue");
-      LOG("createEntryTx done");
-      txManager->rollback();
-      LOG("txManager rollback done");
-
-      checkPtr = std::dynamic_pointer_cast<CacheableString>(
-          virtualRegion->get("TxKey"));
-      ASSERT(checkPtr != nullptr, "Value not found.");
-      ASSERT(strcmp("TxValue", checkPtr->value().c_str()) == 0,
-             "Value not correct.");
-      if (checkPtr != nullptr &&
-          !strcmp("TxValue", checkPtr->value().c_str())) {
-        LOG("checkPtr is not null");
-        char buf[1024];
-        sprintf(buf, "In net search, get returned %s for key %s",
-                checkPtr->value().c_str(), "TxKey");
-        LOG(buf);
-      } else {
-        LOG("checkPtr is nullptr");
-      }
-    } catch (const apache::geode::client::Exception &other) {
-      LOG(other.getStackTrace().c_str());
-      FAIL(other.what());
-    }
-    LOG("StepEight Completed");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, CloseCache1)
-  { cleanProc(); }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, CloseCache2)
-  { cleanProc(); }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT3, CloseCache3)
-  { cleanProc(); }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(LOCATORSERVER, CloseServer1)
-  {
-    if (isLocalServer) {
-      CacheHelper::closeServer(1);
-      LOG("SERVER1 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(LOCATORSERVER, CloseServer2)
-  {
-    if (isLocalServer) {
-      CacheHelper::closeServer(2);
-      LOG("SERVER2 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(LOCATORSERVER, CloseLocator)
-  {
-    if (isLocator) {
-      CacheHelper::closeLocator(1);
-      LOG("Locator1 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-void doThinClientSecurityAuthentication() {
-  CALL_TASK(CreateLocator);
-  CALL_TASK(CreateServer1);
-  CALL_TASK(StepOne);
-  CALL_TASK(CreateServer2);
-  CALL_TASK(CloseCache1);
-  CALL_TASK(StepTwo);
-  CALL_TASK(StepThree);
-  CALL_TASK(StepFour);
-  CALL_TASK(CloseServer1);
-  CALL_TASK(StepFive);
-  CALL_TASK(CloseCache1);
-  CALL_TASK(CloseCache2);
-  CALL_TASK(StepSix);
-  CALL_TASK(StepSeven);
-  CALL_TASK(StepEight);
-  CALL_TASK(CloseCache1);
-  CALL_TASK(CloseCache2);
-  CALL_TASK(CloseCache3);
-  CALL_TASK(CloseServer2);
-  CALL_TASK(CloseLocator);
-}
-
-DUNIT_MAIN
-  { doThinClientSecurityAuthentication(); }
-END_MAIN
diff --git a/cppcache/integration-test/testThinClientSecurityAuthenticationSetAuthInitialize.cpp b/cppcache/integration-test/testThinClientSecurityAuthenticationSetAuthInitialize.cpp
index 7198bf5..c3600cb 100644
--- a/cppcache/integration-test/testThinClientSecurityAuthenticationSetAuthInitialize.cpp
+++ b/cppcache/integration-test/testThinClientSecurityAuthenticationSetAuthInitialize.cpp
@@ -15,9 +15,6 @@
  * limitations under the License.
  */
 
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-
 #include <geode/AuthInitialize.hpp>
 
 #include "fw_dunit.hpp"
@@ -29,21 +26,11 @@
 using apache::geode::client::Cacheable;
 using apache::geode::client::testframework::security::CredentialGenerator;
 
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 const char *regionNamesAuth[] = {"DistRegionAck", "DistRegionNoAck"};
 std::shared_ptr<CredentialGenerator> credentialGeneratorHandler;
 
-std::string getXmlPath() {
-  char xmlPath[1000] = {'\0'};
-  const char *path = ACE_OS::getenv("TESTSRC");
-  ASSERT(path != NULL,
-         "Environment variable TESTSRC for test source directory is not set.");
-  strncpy(xmlPath, path, strlen(path) - strlen("cppcache"));
-  strncat(xmlPath, "xml/Security/", sizeof(xmlPath) - strlen(xmlPath) - 1);
-  return std::string(xmlPath);
-}
-
 #define SECURITY_USERNAME "security-username"
 #define SECURITY_PASSWORD "security-password"
 class UserPasswordAuthInit : public AuthInitialize {
@@ -112,20 +99,11 @@
 
     try {
       if (isLocalServer) {
-        cmdServerAuthenticator +=
-            " --J=-Dgemfire.security-authz-xml-uri=" + getXmlPath() +
-            "authz-dummy.xml "
-            "--J=-Dgemfire.security-client-authenticator=javaobject."
-            "DummyAuthenticator.create";
-        printf("Input to server cmd is -->  %s",
-               cmdServerAuthenticator.c_str());
-        CacheHelper::initServer(
-            1, nullptr, locHostPort,
-            const_cast<char *>(cmdServerAuthenticator.c_str()));
+        CacheHelper::initServer(1, {}, locHostPort);
         LOG("Server1 started");
       }
     } catch (...) {
-      printf("this is some exception");
+      std::cout << "this is some exception";
     }
   }
 END_TASK_DEFINITION
diff --git a/cppcache/integration-test/testThinClientSecurityAuthorization.cpp b/cppcache/integration-test/testThinClientSecurityAuthorization.cpp
deleted file mode 100644
index cf4aca3..0000000
--- a/cppcache/integration-test/testThinClientSecurityAuthorization.cpp
+++ /dev/null
@@ -1,707 +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.
- */
-#include "fw_dunit.hpp"
-#include <geode/FunctionService.hpp>
-#include <geode/CqAttributesFactory.hpp>
-
-#define ROOT_NAME "testThinClientSecurityAuthentication"
-#define ROOT_SCOPE DISTRIBUTED_ACK
-
-#include "CacheHelper.hpp"
-#include "ThinClientHelper.hpp"
-#include <ace/Process.h>
-
-#include "ThinClientSecurity.hpp"
-
-using apache::geode::client::CqAttributesFactory;
-using apache::geode::client::FunctionService;
-using apache::geode::client::HashMapOfCacheable;
-using apache::geode::client::QueryService;
-using apache::geode::client::testframework::security::CredentialGenerator;
-using apache::geode::client::testframework::security::OP_CONTAINS_KEY;
-using apache::geode::client::testframework::security::OP_CREATE;
-using apache::geode::client::testframework::security::OP_DESTROY;
-using apache::geode::client::testframework::security::OP_EXECUTE_FUNCTION;
-using apache::geode::client::testframework::security::OP_GET;
-using apache::geode::client::testframework::security::OP_GETALL;
-using apache::geode::client::testframework::security::OP_INVALIDATE;
-using apache::geode::client::testframework::security::OP_KEY_SET;
-using apache::geode::client::testframework::security::OP_PUTALL;
-using apache::geode::client::testframework::security::OP_QUERY;
-using apache::geode::client::testframework::security::OP_REGION_CLEAR;
-using apache::geode::client::testframework::security::OP_REGISTER_CQ;
-using apache::geode::client::testframework::security::OP_REGISTER_INTEREST;
-using apache::geode::client::testframework::security::OP_UNREGISTER_INTEREST;
-using apache::geode::client::testframework::security::OP_UPDATE;
-using apache::geode::client::testframework::security::opCodeList;
-
-const char *locHostPort =
-    CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
-std::shared_ptr<CredentialGenerator> credentialGeneratorHandler;
-
-std::string getXmlPath() {
-  char xmlPath[1000] = {'\0'};
-  const char *path = ACE_OS::getenv("TESTSRC");
-  ASSERT(path != nullptr,
-         "Environment variable TESTSRC for test source directory is not set.");
-  strncpy(xmlPath, path, strlen(path) - strlen("cppcache"));
-  strncat(xmlPath, "xml/Security/", sizeof(xmlPath) - strlen(xmlPath) - 1);
-  return std::string(xmlPath);
-}
-
-void initCredentialGenerator() {
-  static int loopNum = 1;
-
-  switch (loopNum) {
-    case 1: {
-      credentialGeneratorHandler = CredentialGenerator::create("DUMMY");
-      break;
-    }
-    case 2: {
-      credentialGeneratorHandler = CredentialGenerator::create("LDAP");
-      break;
-    }
-    default:
-    case 3: {
-      credentialGeneratorHandler = CredentialGenerator::create("PKCS");
-      break;
-    }
-  }
-
-  if (credentialGeneratorHandler == nullptr) {
-    FAIL("credentialGeneratorHandler is nullptr");
-  }
-
-  loopNum++;
-  if (loopNum > 3) loopNum = 1;
-}
-
-opCodeList::value_type tmpRArr[] = {
-    OP_GET,     OP_GETALL,      OP_REGISTER_INTEREST, OP_UNREGISTER_INTEREST,
-    OP_KEY_SET, OP_CONTAINS_KEY};
-
-opCodeList::value_type tmpWArr[] = {OP_CREATE,  OP_UPDATE,     OP_PUTALL,
-                                    OP_DESTROY, OP_INVALIDATE, OP_REGION_CLEAR};
-
-opCodeList::value_type tmpAArr[] = {OP_CREATE,       OP_UPDATE,
-                                    OP_DESTROY,      OP_INVALIDATE,
-                                    OP_REGION_CLEAR, OP_REGISTER_INTEREST,
-                                    OP_GET,          OP_QUERY,
-                                    OP_REGISTER_CQ,  OP_EXECUTE_FUNCTION};
-
-#define HANDLE_NO_NOT_AUTHORIZED_EXCEPTION                        \
-  catch (const apache::geode::client::NotAuthorizedException &) { \
-    LOG("NotAuthorizedException Caught");                         \
-    FAIL("should not have caught NotAuthorizedException");        \
-  }                                                               \
-  catch (const apache::geode::client::Exception &other) {         \
-    LOG("Got apache::geode::client::Exception& other ");          \
-    LOG(other.getStackTrace());                                   \
-    FAIL(other.what());                                           \
-  }
-
-#define HANDLE_NOT_AUTHORIZED_EXCEPTION                           \
-  catch (const apache::geode::client::NotAuthorizedException &) { \
-    LOG("NotAuthorizedException Caught");                         \
-    LOG("Success");                                               \
-  }                                                               \
-  catch (const apache::geode::client::Exception &other) {         \
-    LOG(other.getStackTrace());                                   \
-    FAIL(other.what());                                           \
-  }
-
-#define ADMIN_CLIENT s1p1
-#define WRITER_CLIENT s1p2
-#define READER_CLIENT s2p1
-
-const char *regionNamesAuth[] = {"DistRegionAck"};
-
-void initClientAuth(char UserType) {
-  auto config = Properties::create();
-  opCodeList wr(tmpWArr, tmpWArr + sizeof tmpWArr / sizeof *tmpWArr);
-  opCodeList rt(tmpRArr, tmpRArr + sizeof tmpRArr / sizeof *tmpRArr);
-  opCodeList ad(tmpAArr, tmpAArr + sizeof tmpAArr / sizeof *tmpAArr);
-  credentialGeneratorHandler->getAuthInit(config);
-  switch (UserType) {
-    case 'W':
-      credentialGeneratorHandler->getAllowedCredentialsForOps(wr, config,
-                                                              nullptr);
-      break;
-    case 'R':
-      credentialGeneratorHandler->getAllowedCredentialsForOps(rt, config,
-                                                              nullptr);
-      break;
-    case 'A':
-      credentialGeneratorHandler->getAllowedCredentialsForOps(ad, config,
-                                                              nullptr);
-      break;
-    default:
-      break;
-  }
-
-  auto alias = config->find("security-alias");
-  auto uname = config->find("security-username");
-  auto passwd = config->find("security-password");
-
-  char msgAlias[100];
-  char msgUname[100];
-  char msgPasswd[100];
-
-  sprintf(msgAlias, "PKCS alias is %s",
-          alias == nullptr ? "null" : alias->value().c_str());
-  sprintf(msgUname, "username is %s",
-          uname == nullptr ? "null" : uname->value().c_str());
-  sprintf(msgPasswd, "password is %s",
-          passwd == nullptr ? "null" : passwd->value().c_str());
-
-  LOG(msgAlias);
-  LOG(msgUname);
-  LOG(msgPasswd);
-
-  try {
-    initClient(true, config);
-  } catch (...) {
-    throw;
-  }
-}
-
-DUNIT_TASK_DEFINITION(ADMIN_CLIENT, StartServer1)
-  {
-    initCredentialGenerator();
-    std::string cmdServerAuthenticator;
-
-    if (isLocalServer) {
-      cmdServerAuthenticator = credentialGeneratorHandler->getServerCmdParams(
-          "authenticator:authorizer", getXmlPath());
-      printf("string %s", cmdServerAuthenticator.c_str());
-      CacheHelper::initServer(
-          1, "cacheserver_notify_subscription.xml", locHostPort,
-          const_cast<char *>(cmdServerAuthenticator.c_str()));
-      LOG("Server1 started");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(ADMIN_CLIENT, StartServer2)
-  {
-    std::string cmdServerAuthenticator;
-
-    if (isLocalServer) {
-      cmdServerAuthenticator = credentialGeneratorHandler->getServerCmdParams(
-          "authenticator:authorizer", getXmlPath());
-      printf("string %s", cmdServerAuthenticator.c_str());
-      CacheHelper::initServer(
-          2, "cacheserver_notify_subscription2.xml", locHostPort,
-          const_cast<char *>(cmdServerAuthenticator.c_str()));
-      LOG("Server2 started");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(ADMIN_CLIENT, StartLocator)
-  {
-    if (isLocator) {
-      CacheHelper::initLocator(1);
-      LOG("Locator1 started");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(ADMIN_CLIENT, StepOne)
-  {
-    initClientAuth('A');
-    try {
-      LOG("Tying Region creation");
-      createRegionForSecurity(regionNamesAuth[0], USE_ACK, true);
-
-      auto regPtr = getHelper()->getRegion(regionNamesAuth[0]);
-
-      LOG("Region created successfully");
-      //---------------------for region clear tests-----
-      regPtr->put(1, 1);
-      regPtr->clear();
-
-      auto getVal = regPtr->get(1);
-      if (getVal == nullptr) {
-        LOG("Get completed after region.clear successfully");
-      } else {
-        FAIL("Get did not complete successfully");
-      }
-
-      //---------------------------------------------------
-      LOG("Tying Entry creation");
-      createEntry(regionNamesAuth[0], keys[0], vals[0]);
-      LOG("Entry created successfully");
-      updateEntry(regionNamesAuth[0], keys[0], nvals[0]);
-      LOG("Entry updated successfully");
-      HashMapOfCacheable entrymap;
-      entrymap.clear();
-      for (int i = 0; i < 5; i++) {
-        entrymap.emplace(CacheableKey::create(i), CacheableInt32::create(i));
-      }
-
-      regPtr->putAll(entrymap);
-      LOG("PutAll completed successfully");
-      for (int i = 0; i < 5; i++) {
-        regPtr->invalidate(CacheableKey::create(i));
-      }
-      std::vector<std::shared_ptr<CacheableKey>> entrykeys;
-      for (int i = 0; i < 5; i++) {
-        entrykeys.push_back(CacheableKey::create(i));
-      }
-      const auto valuesMap = regPtr->getAll(entrykeys);
-      if (valuesMap.size() > 0) {
-        LOG("GetAll completed successfully");
-      } else {
-        FAIL("GetAll did not complete successfully");
-      }
-
-      LOG("GetServerKeys check started for ADMIN");
-      auto keysvec = regPtr->serverKeys();
-      LOG("GetServerKeys check passed for ADMIN");
-
-      regPtr->query("1=1");
-      LOG("Query completed successfully");
-      auto pool =
-          getHelper()->getCache()->getPoolManager().find(regionNamesAuth[0]);
-      std::shared_ptr<QueryService> qs;
-      if (pool != nullptr) {
-        // Using region name as pool name
-        qs = pool->getQueryService();
-      } else {
-        qs = getHelper()->cachePtr->getQueryService();
-      }
-      char queryString[100];
-      sprintf(queryString, "select * from /%s", regionNamesAuth[0]);
-      CqAttributesFactory cqFac;
-      auto cqAttrs = cqFac.create();
-      auto qry = qs->newCq("cq_security", queryString, cqAttrs);
-      qs->executeCqs();
-      qs->closeCqs();
-      LOG("CQ completed successfully");
-      if (pool != nullptr) {
-        // TODO:
-        FunctionService::onServer(pool).execute("securityTest")->getResult();
-        LOG("Function execution completed successfully");
-        FunctionService::onServers(pool).execute("securityTest")->getResult();
-        LOG("Function execution completed successfully");
-        FunctionService::onRegion(regPtr).execute("securityTest")->getResult();
-        LOG("Function execution completed successfully");
-        FunctionService::onRegion(regPtr).execute("FireNForget");
-        LOG("Function execution with no result completed successfully");
-      } else {
-        LOG("Skipping function execution for non pool case");
-      }
-      invalidateEntry(regionNamesAuth[0], keys[0]);
-      LOG("Entry invalidated successfully");
-      verifyInvalid(regionNamesAuth[0], keys[0]);
-      LOG("Entry invalidate-verified successfully");
-      destroyEntry(regionNamesAuth[0], keys[0]);
-      LOG("Entry destroyed successfully");
-      verifyDestroyed(regionNamesAuth[0], keys[0]);
-      LOG("Entry destroy-verified successfully");
-      destroyRegion(regionNamesAuth[0]);
-      LOG("Region destroy successfully");
-      LOG("Tying Region creation");
-      createRegionForSecurity(regionNamesAuth[0], USE_ACK, true);
-      LOG("Region created successfully");
-      createEntry(regionNamesAuth[0], keys[2], vals[2]);
-      LOG("Entry created successfully");
-      auto regPtr0 = getHelper()->getRegion(regionNamesAuth[0]);
-      if (regPtr0 != nullptr) {
-        LOG("Going to do registerAllKeys");
-        regPtr0->registerAllKeys();
-        LOG("Going to do unregisterAllKeys");
-        regPtr0->unregisterAllKeys();
-      }
-    }
-    HANDLE_NO_NOT_AUTHORIZED_EXCEPTION
-    LOG("StepOne complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(WRITER_CLIENT, StepTwo)
-  {
-    initCredentialGenerator();
-    initClientAuth('W');
-    try {
-      createRegionForSecurity(regionNamesAuth[0], USE_ACK, true);
-      LOG("Region created successfully");
-      createEntry(regionNamesAuth[0], keys[0], vals[0]);
-      LOG("Entry created successfully");
-      updateEntry(regionNamesAuth[0], keys[0], nvals[0]);
-      LOG("Entry updated successfully");
-      HashMapOfCacheable entrymap;
-      entrymap.clear();
-      for (int i = 0; i < 5; i++) {
-        entrymap.emplace(CacheableKey::create(i), CacheableInt32::create(i));
-      }
-      auto regPtr = getHelper()->getRegion(regionNamesAuth[0]);
-      regPtr->putAll(entrymap);
-      LOG("PutAll completed successfully");
-      invalidateEntry(regionNamesAuth[0], keys[0]);
-      LOG("Entry invalidated successfully");
-      verifyInvalid(regionNamesAuth[0], keys[0]);
-      LOG("Entry invalidate-verified successfully");
-      destroyEntry(regionNamesAuth[0], keys[0]);
-      LOG("Entry destroyed successfully");
-      verifyDestroyed(regionNamesAuth[0], keys[0]);
-      LOG("Entry destroy-verified successfully");
-      createEntry(regionNamesAuth[0], keys[0], vals[0]);
-      LOG("Entry created successfully");
-      updateEntry(regionNamesAuth[0], keys[0], nvals[0]);
-      LOG("Entry updated successfully");
-      verifyEntry(regionNamesAuth[0], keys[0], nvals[0]);
-      LOG("Entry updation-verified successfully");
-    }
-    HANDLE_NO_NOT_AUTHORIZED_EXCEPTION
-    try {
-      auto regPtr = getHelper()->getRegion(regionNamesAuth[0]);
-      LOG("containsKeyOnServer");
-      regPtr->containsKeyOnServer(
-          apache::geode::client::CacheableKey::create(keys[2]));
-      FAIL("containsKeyOnServer should hav failed for writer");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      auto regPtr0 = getHelper()->getRegion(regionNamesAuth[0]);
-      auto keyPtr = CacheableKey::create(keys[2]);
-      auto checkPtr =
-          std::dynamic_pointer_cast<CacheableString>(regPtr0->get(keyPtr));
-      if (checkPtr != nullptr) {
-        char buf[1024];
-        sprintf(buf, "In net search, get returned %s for key %s",
-                checkPtr->value().c_str(), keys[2]);
-        LOG(buf);
-        FAIL("Should not get the value");
-      } else {
-        LOG("checkPtr is nullptr");
-      }
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-    auto regPtr0 = getHelper()->getRegion(regionNamesAuth[0]);
-    try {
-      LOG("Going to do registerAllKeys");
-      regPtr0->registerAllKeys();
-      FAIL("Should not be able to do Register Interest");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      for (int i = 0; i < 5; i++) {
-        regPtr0->invalidate(CacheableKey::create(i));
-      }
-      std::vector<std::shared_ptr<CacheableKey>> entrykeys;
-      for (int i = 0; i < 5; i++) {
-        entrykeys.push_back(CacheableKey::create(i));
-      }
-      const auto valuesMap = regPtr0->getAll(entrykeys);
-      if (valuesMap.size() > 0) {
-        FAIL("GetAll should not have completed successfully");
-      }
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      regPtr0->query("1=1");
-      FAIL("Query should not have completed successfully");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    auto pool =
-        getHelper()->getCache()->getPoolManager().find(regionNamesAuth[0]);
-
-    try {
-      std::shared_ptr<QueryService> qs;
-      if (pool != nullptr) {
-        // Using region name as pool name
-        qs = pool->getQueryService();
-      } else {
-        qs = getHelper()->cachePtr->getQueryService();
-      }
-      char queryString[100];
-      sprintf(queryString, "select * from /%s", regionNamesAuth[0]);
-      CqAttributesFactory cqFac;
-      auto cqAttrs = cqFac.create();
-      auto qry = qs->newCq("cq_security", queryString, cqAttrs);
-      qs->executeCqs();
-      FAIL("CQ should not have completed successfully");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      LOG("GetServerKeys check started for WRITER");
-      auto keysvec = regPtr0->serverKeys();
-      LOG("GetServerKeys check passed for WRITER");
-      FAIL("GetServerKeys should not have completed successfully for WRITER");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    createEntry(regionNamesAuth[0], keys[2], vals[2]);
-    LOG("Entry created successfully");
-
-    LOG("StepTwo complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(READER_CLIENT, StepThree)
-  {
-    initCredentialGenerator();
-    initClientAuth('R');
-    std::shared_ptr<Region> rptr;
-    char buf[100];
-    int value = 102;
-
-    createRegionForSecurity(regionNamesAuth[0], USE_ACK, true);
-
-    rptr = getHelper()->getRegion(regionNamesAuth[0]);
-    sprintf(buf, "%s: %d", rptr->getName().c_str(), value);
-    auto key = CacheableKey::create(buf);
-    sprintf(buf, "testUpdate::%s: value of %d", rptr->getName().c_str(), value);
-    auto valuePtr = buf;
-    try {
-      LOG("Trying put Operation");
-      rptr->put(key, valuePtr);
-      LOG(" Put Operation Successful");
-      FAIL("Should have got NotAuthorizedException during put");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      LOG("Trying createEntry");
-      createEntry(regionNamesAuth[0], keys[2], vals[2]);
-      FAIL("Should have got NotAuthorizedException during createEntry");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    ASSERT(!rptr->containsKey(keys[2]),
-           "Key should not have been found in the region");
-    try {
-      LOG("containsKeyOnServer");
-      rptr->containsKeyOnServer(
-          apache::geode::client::CacheableKey::create(keys[2]));
-    }
-    HANDLE_NO_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      LOG("Trying updateEntry");
-      updateEntry(regionNamesAuth[0], keys[2], nvals[2], false, false);
-      FAIL("Should have got NotAuthorizedException during updateEntry");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    ASSERT(!rptr->containsKey(keys[2]),
-           "Key should not have been found in the region");
-
-    try {
-      auto regPtr0 = getHelper()->getRegion(regionNamesAuth[0]);
-      auto keyPtr = CacheableKey::create(keys[2]);
-      auto checkPtr =
-          std::dynamic_pointer_cast<CacheableString>(regPtr0->get(keyPtr));
-      if (checkPtr != nullptr) {
-        LOG("In net search, get returned " + checkPtr->value() + " for key " +
-            keys[2]);
-      } else {
-        LOG("checkPtr is nullptr");
-      }
-    }
-    HANDLE_NO_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      LOG("Trying region clear..");
-      auto regPtr0 = getHelper()->getRegion(regionNamesAuth[0]);
-      regPtr0->clear();
-      FAIL("Should have got NotAuthorizedException for region.clear ops");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    auto regPtr0 = getHelper()->getRegion(regionNamesAuth[0]);
-    if (regPtr0 != nullptr) {
-      try {
-        LOG("Going to do registerAllKeys");
-        regPtr0->registerAllKeys();
-        LOG("Going to do unregisterAllKeys");
-        regPtr0->unregisterAllKeys();
-      }
-      HANDLE_NO_NOT_AUTHORIZED_EXCEPTION
-    }
-
-    try {
-      HashMapOfCacheable entrymap;
-      entrymap.clear();
-      for (int i = 0; i < 5; i++) {
-        entrymap.emplace(CacheableKey::create(i), CacheableInt32::create(i));
-      }
-      regPtr0->putAll(entrymap);
-      FAIL("PutAll should not have completed successfully");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      LOG("GetServerKeys check started for READER");
-      auto keysvec = regPtr0->serverKeys();
-      LOG("GetServerKeys check passed for READER");
-    }
-    HANDLE_NO_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      std::vector<std::shared_ptr<CacheableKey>> entrykeys;
-      for (int i = 0; i < 5; i++) {
-        entrykeys.push_back(CacheableKey::create(i));
-      }
-      const auto valuesMap = regPtr0->getAll(entrykeys);
-      if (valuesMap.size() > 0) {
-        LOG("GetAll completed successfully");
-      } else {
-        FAIL("GetAll did not complete successfully");
-      }
-    }
-    HANDLE_NO_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      regPtr0->query("1=1");
-      FAIL("Query should not have completed successfully");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    auto pool =
-        getHelper()->getCache()->getPoolManager().find(regionNamesAuth[0]);
-
-    try {
-      std::shared_ptr<QueryService> qs;
-      if (pool != nullptr) {
-        // Using region name as pool name
-        qs = pool->getQueryService();
-      } else {
-        qs = getHelper()->cachePtr->getQueryService();
-      }
-      char queryString[100];
-      sprintf(queryString, "select * from /%s", regionNamesAuth[0]);
-      CqAttributesFactory cqFac;
-      auto cqAttrs = cqFac.create();
-      auto qry = qs->newCq("cq_security", queryString, cqAttrs);
-      qs->executeCqs();
-      //    FAIL("CQ should not have completed successfully");
-    }
-    HANDLE_NO_NOT_AUTHORIZED_EXCEPTION
-
-    pool = getHelper()->getCache()->getPoolManager().find(regionNamesAuth[0]);
-
-    try {
-      if (pool != nullptr) {
-        FunctionService::onServer(pool).execute("securityTest")->getResult();
-        FAIL("Function execution should not have completed successfully");
-      } else {
-        LOG("Skipping function execution for non pool case");
-      }
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      if (pool != nullptr) {
-        FunctionService::onServer(pool).execute("securityTest")->getResult();
-        FAIL("Function execution should not have completed successfully");
-      } else {
-        LOG("Skipping function execution for non pool case");
-      }
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      if (pool != nullptr) {
-        FunctionService::onServers(pool).execute("securityTest")->getResult();
-        FAIL("Function execution should not have completed successfully");
-      } else {
-        LOG("Skipping function execution for non pool case");
-      }
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      if (pool != nullptr) {
-        regPtr0 = getHelper()->getRegion(regionNamesAuth[0]);
-        FunctionService::onRegion(regPtr0).execute("securityTest")->getResult();
-        FAIL("Function execution should not have completed successfully");
-      } else {
-        LOG("Skipping function execution for non pool case");
-      }
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    LOG("StepThree complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(ADMIN_CLIENT, CloseServer1)
-  {
-    SLEEP(9000);
-    if (isLocalServer) {
-      CacheHelper::closeServer(1);
-      LOG("SERVER1 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(ADMIN_CLIENT, CloseServer2)
-  {
-    if (isLocalServer) {
-      CacheHelper::closeServer(2);
-      LOG("SERVER2 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(ADMIN_CLIENT, CloseLocator)
-  {
-    if (isLocator) {
-      CacheHelper::closeLocator(1);
-      LOG("Locator1 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(ADMIN_CLIENT, CloseCacheAdmin)
-  { cleanProc(); }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(WRITER_CLIENT, CloseCacheWriter)
-  { cleanProc(); }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(READER_CLIENT, CloseCacheReader)
-  { cleanProc(); }
-END_TASK_DEFINITION
-
-void doThinClientSecurityAuthorization() {
-  CALL_TASK(StartLocator);
-  CALL_TASK(StartServer1);
-  CALL_TASK(StepOne);
-  CALL_TASK(StepTwo);
-  CALL_TASK(StartServer2);
-  CALL_TASK(CloseServer1);
-  CALL_TASK(StepThree);
-  CALL_TASK(CloseCacheReader);
-  CALL_TASK(CloseCacheWriter);
-  CALL_TASK(CloseCacheAdmin);
-  CALL_TASK(CloseServer2);
-  CALL_TASK(CloseLocator);
-}
-
-DUNIT_MAIN
-  { doThinClientSecurityAuthorization(); }
-END_MAIN
diff --git a/cppcache/integration-test/testThinClientSecurityAuthorizationMU.cpp b/cppcache/integration-test/testThinClientSecurityAuthorizationMU.cpp
deleted file mode 100644
index 2d2262d..0000000
--- a/cppcache/integration-test/testThinClientSecurityAuthorizationMU.cpp
+++ /dev/null
@@ -1,971 +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.
- */
-#include "fw_dunit.hpp"
-#include <geode/FunctionService.hpp>
-#include <geode/Execution.hpp>
-#include <geode/UserFunctionExecutionException.hpp>
-#include <geode/RegionAttributesFactory.hpp>
-#include <geode/CqAttributesFactory.hpp>
-
-#define ROOT_NAME "testThinClientSecurityAuthenticationMU"
-#define ROOT_SCOPE DISTRIBUTED_ACK
-
-#include "CacheHelper.hpp"
-#include "ThinClientHelper.hpp"
-#include <ace/Process.h>
-
-#include "ThinClientSecurity.hpp"
-
-using apache::geode::client::CacheableArrayList;
-using apache::geode::client::CacheableBoolean;
-using apache::geode::client::CacheableVector;
-using apache::geode::client::ClassCastException;
-using apache::geode::client::CqAttributesFactory;
-using apache::geode::client::FunctionService;
-using apache::geode::client::HashMapOfCacheable;
-using apache::geode::client::QueryService;
-using apache::geode::client::UserFunctionExecutionException;
-using apache::geode::client::testframework::security::CredentialGenerator;
-using apache::geode::client::testframework::security::OP_CONTAINS_KEY;
-using apache::geode::client::testframework::security::OP_CREATE;
-using apache::geode::client::testframework::security::OP_DESTROY;
-using apache::geode::client::testframework::security::OP_EXECUTE_FUNCTION;
-using apache::geode::client::testframework::security::OP_GET;
-using apache::geode::client::testframework::security::OP_GETALL;
-using apache::geode::client::testframework::security::OP_INVALIDATE;
-using apache::geode::client::testframework::security::OP_KEY_SET;
-using apache::geode::client::testframework::security::OP_PUTALL;
-using apache::geode::client::testframework::security::OP_QUERY;
-using apache::geode::client::testframework::security::OP_REGION_CLEAR;
-using apache::geode::client::testframework::security::OP_REGISTER_CQ;
-using apache::geode::client::testframework::security::OP_REGISTER_INTEREST;
-using apache::geode::client::testframework::security::OP_UNREGISTER_INTEREST;
-using apache::geode::client::testframework::security::OP_UPDATE;
-using apache::geode::client::testframework::security::opCodeList;
-
-const char *locHostPort =
-    CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
-
-std::shared_ptr<CredentialGenerator> credentialGeneratorHandler;
-
-const char *exFuncNameSendException = "executeFunction_SendException";
-
-std::string getXmlPath() {
-  char xmlPath[1000] = {'\0'};
-  const char *path = ACE_OS::getenv("TESTSRC");
-  ASSERT(path != nullptr,
-         "Environment variable TESTSRC for test source directory is not set.");
-  strncpy(xmlPath, path, strlen(path) - strlen("cppcache"));
-  strncat(xmlPath, "xml/Security/", sizeof(xmlPath) - strlen(xmlPath) - 1);
-  return std::string(xmlPath);
-}
-
-void initCredentialGenerator() {
-  static int loopNum = 1;
-
-  switch (loopNum) {
-    case 1: {
-      credentialGeneratorHandler = CredentialGenerator::create("DUMMY");
-      break;
-    }
-    case 2: {
-      credentialGeneratorHandler = CredentialGenerator::create("LDAP");
-      break;
-    }
-    default:
-    case 3: {
-      credentialGeneratorHandler = CredentialGenerator::create("PKCS");
-      break;
-    }
-  }
-
-  if (credentialGeneratorHandler == nullptr) {
-    FAIL("credentialGeneratorHandler is nullptr");
-  }
-
-  loopNum++;
-  if (loopNum > 2) loopNum = 1;
-}
-
-opCodeList::value_type tmpRArr[] = {
-    OP_GET,     OP_GETALL,      OP_REGISTER_INTEREST, OP_UNREGISTER_INTEREST,
-    OP_KEY_SET, OP_CONTAINS_KEY};
-
-opCodeList::value_type tmpWArr[] = {OP_CREATE,  OP_UPDATE,     OP_PUTALL,
-                                    OP_DESTROY, OP_INVALIDATE, OP_REGION_CLEAR};
-
-opCodeList::value_type tmpAArr[] = {OP_CREATE,       OP_UPDATE,
-                                    OP_DESTROY,      OP_INVALIDATE,
-                                    OP_REGION_CLEAR, OP_REGISTER_INTEREST,
-                                    OP_GET,          OP_QUERY,
-                                    OP_REGISTER_CQ,  OP_EXECUTE_FUNCTION};
-
-#define HANDLE_NO_NOT_AUTHORIZED_EXCEPTION                        \
-  catch (const apache::geode::client::NotAuthorizedException &) { \
-    LOG("NotAuthorizedException Caught");                         \
-    FAIL("should not have caught NotAuthorizedException");        \
-  }                                                               \
-  catch (const apache::geode::client::Exception &other) {         \
-    LOG("Got apache::geode::client::Exception& other ");          \
-    LOG(other.getStackTrace().c_str());                           \
-    FAIL(other.what());                                           \
-  }
-
-#define HANDLE_NOT_AUTHORIZED_EXCEPTION                           \
-  catch (const apache::geode::client::NotAuthorizedException &) { \
-    LOG("NotAuthorizedException Caught");                         \
-    LOG("Success");                                               \
-  }                                                               \
-  catch (const apache::geode::client::Exception &other) {         \
-    LOG(other.getStackTrace().c_str());                           \
-    FAIL(other.what());                                           \
-  }
-
-#define ADMIN_CLIENT s1p1
-#define WRITER_CLIENT s1p2
-#define READER_CLIENT s2p1
-
-const std::string regionNamesAuth[] = {"DistRegionAck"};
-std::shared_ptr<Properties> userCreds;
-void initClientAuth(char UserType) {
-  userCreds = Properties::create();
-  auto config = Properties::create();
-  opCodeList wr(tmpWArr, tmpWArr + sizeof tmpWArr / sizeof *tmpWArr);
-  opCodeList rt(tmpRArr, tmpRArr + sizeof tmpRArr / sizeof *tmpRArr);
-  opCodeList ad(tmpAArr, tmpAArr + sizeof tmpAArr / sizeof *tmpAArr);
-  credentialGeneratorHandler->getAuthInit(config);
-  switch (UserType) {
-    case 'W':
-      credentialGeneratorHandler->getAllowedCredentialsForOps(wr, userCreds,
-                                                              nullptr);
-      break;
-    case 'R':
-      credentialGeneratorHandler->getAllowedCredentialsForOps(rt, userCreds,
-                                                              nullptr);
-      break;
-    case 'A':
-      credentialGeneratorHandler->getAllowedCredentialsForOps(ad, userCreds,
-                                                              nullptr);
-      break;
-    default:
-      break;
-  }
-
-  auto alias = userCreds->find("security-alias");
-  auto uname = userCreds->find("security-username");
-  auto passwd = userCreds->find("security-password");
-
-  char msgAlias[100];
-  char msgUname[100];
-  char msgPasswd[100];
-
-  sprintf(msgAlias, "PKCS alias is %s",
-          alias == nullptr ? "null" : alias->value().c_str());
-  sprintf(msgUname, "username is %s",
-          uname == nullptr ? "null" : uname->value().c_str());
-  sprintf(msgPasswd, "password is %s",
-          passwd == nullptr ? "null" : passwd->value().c_str());
-
-  LOG(msgAlias);
-  LOG(msgUname);
-  LOG(msgPasswd);
-
-  try {
-    initClient(true, config);
-  } catch (...) {
-    throw;
-  }
-}
-
-DUNIT_TASK_DEFINITION(ADMIN_CLIENT, StartServer1)
-  {
-    initCredentialGenerator();
-    std::string cmdServerAuthenticator;
-
-    if (isLocalServer) {
-      cmdServerAuthenticator = credentialGeneratorHandler->getServerCmdParams(
-          "authenticator:authorizer", getXmlPath());
-      printf("string %s", cmdServerAuthenticator.c_str());
-      CacheHelper::initServer(
-          1, "cacheserver_notify_subscription.xml", locHostPort,
-          const_cast<char *>(cmdServerAuthenticator.c_str()));
-      LOG("Server1 started");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(ADMIN_CLIENT, StartServer2)
-  {
-    std::string cmdServerAuthenticator;
-
-    if (isLocalServer) {
-      cmdServerAuthenticator = credentialGeneratorHandler->getServerCmdParams(
-          "authenticator:authorizer", getXmlPath());
-      printf("string %s", cmdServerAuthenticator.c_str());
-      CacheHelper::initServer(
-          2, "cacheserver_notify_subscription2.xml", locHostPort,
-          const_cast<char *>(cmdServerAuthenticator.c_str()));
-      LOG("Server2 started");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(ADMIN_CLIENT, StartLocator)
-  {
-    if (isLocator) {
-      CacheHelper::initLocator(1);
-      LOG("Locator1 started");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(ADMIN_CLIENT, StepOne)
-  {
-    initClientAuth('A');
-    try {
-      LOG("Tying Region creation");
-      createRegionForSecurity(regionNamesAuth[0], USE_ACK, true, nullptr, false,
-                              -1, true, 0);
-      LOG("Region created successfully");
-      LOG("Tying Entry creation");
-
-      auto pool = getPool(regionNamesAuth[0]);
-      LOG(" 6");
-
-      if (pool == nullptr) {
-        FAIL("Pool is nullptr");
-      }
-
-      LOG(" 7");
-      auto virtualCache = getVirtualCache(userCreds, pool);
-      LOG(" 8");
-      auto regionPtr = virtualCache.getRegion(regionNamesAuth[0]);
-
-      LOG("Operation allowed, something is wrong.");
-
-      //---------------------for region clear tests-----
-      regionPtr->put(1, 1);
-      regionPtr->clear();
-
-      auto getVal = regionPtr->get(1);
-      if (getVal == nullptr) {
-        LOG("Get completed after region.clear successfully");
-      } else {
-        FAIL("Get did not complete successfully");
-      }
-
-      //---------------------------------------------------
-      regionPtr->create(keys[0], vals[0]);
-      LOG("Entry created successfully");
-      regionPtr->put(keys[0], nvals[0]);
-      LOG("Entry updated successfully");
-      HashMapOfCacheable entrymap;
-      entrymap.clear();
-      for (int i = 0; i < 5; i++) {
-        entrymap.emplace(CacheableKey::create(i), CacheableInt32::create(i));
-      }
-      regionPtr->putAll(entrymap);
-      LOG("PutAll completed successfully");
-
-      LOG("GetServerKeys check started for ADMIN");
-      auto keysvec = regionPtr->serverKeys();
-      LOG("GetServerKeys check passed for ADMIN");
-
-      std::vector<std::shared_ptr<CacheableKey>> entrykeys;
-      for (int i = 0; i < 5; i++) {
-        entrykeys.push_back(CacheableKey::create(i));
-      }
-
-      const auto valuesMap = regionPtr->getAll(entrykeys);
-      if (valuesMap.size() > 0) {
-        LOG("GetAll completed successfully");
-      } else {
-        FAIL("GetAll did not complete successfully");
-      }
-      regionPtr->query("1=1");
-      LOG("Query completed successfully");
-
-      std::shared_ptr<QueryService> qs;
-      // Using region name as pool name
-      try {
-        qs = pool->getQueryService();
-        FAIL("Pool should not return queryservice in multiusermode");
-      } catch (const apache::geode::client::UnsupportedOperationException &) {
-        LOG("UnsupportedOperationException Caught for pool.getQuerySerice in "
-            "multiusermode");
-        LOG("Success");
-      } catch (const apache::geode::client::Exception &other) {
-        LOG(other.getStackTrace().c_str());
-        FAIL(other.what());
-      }
-
-      qs = virtualCache.getQueryService();
-
-      auto queryString = "select * from /" + regionNamesAuth[0];
-
-      auto &&qry = qs->newQuery(queryString);
-      printf(" before query executing\n");
-      auto &&results = qry->execute(std::chrono::seconds(850));
-      LOG("Query completed successfully");
-
-      auto &&cqAttrs = CqAttributesFactory{}.create();
-      auto &&cqQry = qs->newCq("cq_security", queryString, cqAttrs);
-      cqQry->execute();
-      cqQry->close();
-      LOG("CQ completed successfully");
-
-      if (pool) {
-        FunctionService::onServer(virtualCache)
-            .execute("securityTest")
-            ->getResult();
-        LOG("onServer executed successfully.");
-        FunctionService::onServers(virtualCache)
-            .execute("securityTest")
-            ->getResult();
-        LOG("onServerS executed successfully.");
-        FunctionService::onRegion(regionPtr)
-            .execute("securityTest")
-            ->getResult();
-        LOG("FunctionService::onRegion executed successfully.");
-        FunctionService::onRegion(regionPtr).execute("FireNForget");
-        LOG("Function execution with no result completed successfully");
-
-        //-----------------------Test with
-        // sendException-------------------------------//
-        LOG("Function execution with sendException");
-        char buf[128];
-        for (int i = 1; i <= 200; i++) {
-          auto value = CacheableInt32::create(i);
-
-          sprintf(buf, "execKey-%d", i);
-          auto key = CacheableKey::create(buf);
-          regionPtr->put(key, value);
-        }
-        LOG("Put for execKey's on region complete.");
-
-        LOG("Adding filter");
-        auto arrList = CacheableArrayList::create();
-        for (int i = 100; i < 120; i++) {
-          sprintf(buf, "execKey-%d", i);
-          auto key = CacheableKey::create(buf);
-          arrList->push_back(key);
-        }
-
-        auto filter = CacheableVector::create();
-        for (int i = 100; i < 120; i++) {
-          sprintf(buf, "execKey-%d", i);
-          auto key = CacheableKey::create(buf);
-          filter->push_back(key);
-        }
-        LOG("Adding filter done.");
-
-        auto args = CacheableBoolean::create(1);
-
-        auto funcExec = FunctionService::onRegion(regionPtr);
-
-        auto collector = funcExec.withArgs(args).withFilter(filter).execute(
-            exFuncNameSendException, std::chrono::seconds(15));
-
-        auto result = collector->getResult();
-
-        if (result == nullptr) {
-          ASSERT(false, "echo String : result is nullptr");
-        } else {
-          try {
-            for (size_t i = 0; i < result->size(); i++) {
-              auto uFEPtr =
-                  std::dynamic_pointer_cast<UserFunctionExecutionException>(
-                      result->operator[](i));
-              ASSERT(uFEPtr != nullptr, "uFEPtr exception is nullptr");
-              LOGINFO("Done casting to uFEPtr");
-              LOGINFO("Read expected uFEPtr exception %s ",
-                      uFEPtr->getMessage().c_str());
-            }
-          } catch (ClassCastException &ex) {
-            std::string logmsg = "";
-            logmsg += ex.getName();
-            logmsg += ": ";
-            logmsg += ex.what();
-            LOG(logmsg.c_str());
-            LOG(ex.getStackTrace().c_str());
-            FAIL(
-                "exFuncNameSendException casting to string for bool arguement "
-                "exception.");
-          } catch (...) {
-            FAIL(
-                "exFuncNameSendException casting to string for bool arguement "
-                "Unknown exception.");
-          }
-        }
-
-        LOG("exFuncNameSendException done for bool arguement.");
-
-        collector = funcExec.withArgs(arrList).withFilter(filter).execute(
-            exFuncNameSendException, std::chrono::seconds(15));
-
-        result = collector->getResult();
-        ASSERT(result->size() == arrList->size() + 1,
-               "region get: resultList count is not as arrayList count + "
-               "exception");
-
-        for (size_t i = 0; i < result->size(); i++) {
-          try {
-            auto intValue = std::dynamic_pointer_cast<CacheableInt32>(
-                result->operator[](i));
-            ASSERT(intValue != nullptr, "int value is nullptr");
-            LOGINFO("intValue is %d ", intValue->value());
-          } catch (ClassCastException &ex) {
-            LOG("exFuncNameSendException casting to int for arrayList "
-                "arguement "
-                "exception.");
-            std::string logmsg = "";
-            logmsg += ex.getName();
-            logmsg += ": ";
-            logmsg += ex.what();
-            LOG(logmsg.c_str());
-            LOG(ex.getStackTrace().c_str());
-            auto uFEPtr =
-                std::dynamic_pointer_cast<UserFunctionExecutionException>(
-                    result->operator[](i));
-            ASSERT(uFEPtr != nullptr, "uFEPtr exception is nullptr");
-            LOGINFO("Done casting to uFEPtr");
-            LOGINFO("Read expected uFEPtr exception %s ",
-                    uFEPtr->getMessage().c_str());
-          } catch (...) {
-            FAIL(
-                "exFuncNameSendException casting to string for bool arguement "
-                "Unknown exception.");
-          }
-        }
-
-        LOG("exFuncNameSendException done for arrayList arguement.");
-
-        LOG("Function execution with sendException successfull");
-        //----------------------------------------------------------------------------------------------//
-
-        LOG("Function execution completed successfully");
-      } else {
-        LOG("Skipping function execution for non pool case");
-      }
-      regionPtr->destroy(keys[0]);
-      LOG("Entry destroyed successfully");
-      destroyRegion(regionNamesAuth[0]);
-      LOG("Region destroy successfully");
-      LOG("Tying Region creation");
-      createRegionForSecurity(regionNamesAuth[0], USE_ACK, false, nullptr,
-                              false, -1, true, 0);
-      char buf[100] = {'\0'};
-      static int indexForPool = 0;
-      sprintf(buf, "%s_%d", regionNamesAuth[0].c_str(), indexForPool++);
-      pool = getPool(buf);
-      LOG(" 6");
-      if (pool != nullptr) {
-        LOG(" 7");
-        virtualCache = getVirtualCache(userCreds, pool);
-        LOG(" 8");
-        regionPtr = virtualCache.getRegion(regionNamesAuth[0]);
-        LOG("Operation allowed, something is wrong.");
-      } else {
-        LOG("Pool is nullptr");
-      }
-
-      LOG("Region created successfully");
-      regionPtr->create(keys[2], vals[2]);
-      LOG("Entry created successfully");
-      virtualCache.close();
-      LOG("Cache close successfully");
-    }
-    HANDLE_NO_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      LOG("Trying operation using real region in multiusersecure mode");
-      auto regPtr = getHelper()->getRegion(regionNamesAuth[0]);
-      regPtr->put("key", "val");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    LOG("StepOne complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(WRITER_CLIENT, StepTwo)
-  {
-    initCredentialGenerator();
-    initClientAuth('W');
-    try {
-      createRegionForSecurity(regionNamesAuth[0], USE_ACK, true, nullptr, false,
-                              -1, true, 0);
-      LOG("Region created successfully");
-
-      auto pool = getPool(regionNamesAuth[0]);
-      LOG(" 6");
-
-      if (pool == nullptr) {
-        FAIL("Pool is nullptr");
-      }
-
-      LOG(" 7");
-      auto virtualCache = getVirtualCache(userCreds, pool);
-      LOG(" 8");
-      auto regionPtr = virtualCache.getRegion(regionNamesAuth[0]);
-      LOG("Operation allowed, something is wrong.");
-
-      regionPtr->create(keys[0], vals[0]);
-      LOG("Entry created successfully");
-      regionPtr->put(keys[0], nvals[0]);
-      LOG("Entry updated successfully");
-      HashMapOfCacheable entrymap;
-      entrymap.clear();
-      for (int i = 0; i < 5; i++) {
-        entrymap.emplace(CacheableKey::create(i), CacheableInt32::create(i));
-      }
-      regionPtr->putAll(entrymap);
-      LOG("PutAll completed successfully");
-      regionPtr->destroy(keys[0]);
-      LOG("Entry destroyed successfully");
-      regionPtr->create(keys[0], vals[0]);
-      LOG("Entry created successfully");
-      regionPtr->put(keys[0], nvals[0]);
-      LOG("Entry updated successfully");
-    }
-    HANDLE_NO_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      std::shared_ptr<Region> regionPtr;
-      auto pool = getPool(regionNamesAuth[0]);
-      if (pool != nullptr) {
-        auto virtualCache = getVirtualCache(userCreds, pool);
-        regionPtr = virtualCache.getRegion(regionNamesAuth[0]);
-      } else {
-        LOG("Pool is nullptr");
-      }
-      LOG("GetServerKeys check started for WRITER");
-      auto keysvec = regionPtr->serverKeys();
-      LOG("GetServerKeys check passed for WRITER");
-      FAIL("GetServerKeys should not have completed successfully for WRITER");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      auto pool = getPool(regionNamesAuth[0]);
-      LOG(" 6");
-      if (pool == nullptr) {
-        LOG("Pool is nullptr");
-      }
-      LOG(" 7");
-      auto virtualCache = getVirtualCache(userCreds, pool);
-      LOG(" 8");
-      auto regionPtr = virtualCache.getRegion(regionNamesAuth[0]);
-      LOG("Operation allowed, something is wrong.");
-      auto keyPtr = CacheableKey::create(keys[2]);
-      auto checkPtr =
-          std::dynamic_pointer_cast<CacheableString>(regionPtr->get(keyPtr));
-      if (checkPtr != nullptr) {
-        char buf[1024];
-        sprintf(buf, "In net search, get returned %s for key %s",
-                checkPtr->value().c_str(), keys[2]);
-        LOG(buf);
-        FAIL("Should not get the value");
-      } else {
-        LOG("checkPtr is nullptr");
-      }
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      LOG("Going to do registerAllKeys");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      auto pool = getPool(regionNamesAuth[0]);
-      LOG(" 6");
-      if (pool == nullptr) {
-        LOG("Pool is nullptr");
-      }
-      LOG(" 7");
-      auto virtualCache = getVirtualCache(userCreds, pool);
-      LOG(" 8");
-      auto regionPtr = virtualCache.getRegion(regionNamesAuth[0]);
-      LOG("Operation allowed, something is wrong.");
-
-      std::vector<std::shared_ptr<CacheableKey>> entrykeys;
-      for (int i = 0; i < 5; i++) {
-        entrykeys.push_back(CacheableKey::create(i));
-      }
-
-      const auto valuesMap = regionPtr->getAll(entrykeys);
-      if (valuesMap.size() > 0) {
-        FAIL("GetAll should not have completed successfully");
-      }
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      std::shared_ptr<Region> regionPtr;
-      auto pool = getPool(regionNamesAuth[0]);
-      LOG(" 6");
-      if (pool != nullptr) {
-        LOG(" 7");
-        auto virtualCache = getVirtualCache(userCreds, pool);
-        LOG(" 8");
-        regionPtr = virtualCache.getRegion(regionNamesAuth[0]);
-        LOG("Operation allowed, something is wrong.");
-      } else {
-        LOG("Pool is nullptr");
-      }
-      regionPtr->query("1=1");
-      FAIL("Query should not have completed successfully");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      auto pool = getPool(regionNamesAuth[0]);
-      auto virtualCache = getVirtualCache(userCreds, pool);
-      auto queryService = virtualCache.getQueryService();
-
-      auto queryString = "select * from /" + regionNamesAuth[0];
-
-      auto cqAttrs = CqAttributesFactory{}.create();
-      auto qry = queryService->newCq("cq_security", queryString, cqAttrs);
-      queryService->executeCqs();
-      FAIL("CQ should not have completed successfully");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      auto pool = getPool(regionNamesAuth[0]);
-      auto virtualCache = getVirtualCache(userCreds, pool);
-
-      FunctionService::onServer(virtualCache)
-          .execute("securityTest")
-          ->getResult();
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      auto pool = getPool(regionNamesAuth[0]);
-      auto virtualCache = getVirtualCache(userCreds, pool);
-
-      FunctionService::onServers(virtualCache)
-          .execute("securityTest")
-          ->getResult();
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      auto pool = getPool(regionNamesAuth[0]);
-      auto virtualCache = getVirtualCache(userCreds, pool);
-      std::shared_ptr<Region> regionPtr;
-      regionPtr = virtualCache.getRegion(regionNamesAuth[0]);
-
-      //-----------------------Test with
-      // sendException-------------------------------//
-      LOG("Function execution with sendException with expected Authorization "
-          "exception");
-      char buf[128];
-      for (int i = 1; i <= 200; i++) {
-        auto value = CacheableInt32::create(i);
-
-        sprintf(buf, "execKey-%d", i);
-        auto key = CacheableKey::create(buf);
-        regionPtr->put(key, value);
-      }
-      LOG("Put for execKey's on region complete.");
-
-      LOG("Adding filter");
-      auto arrList = CacheableArrayList::create();
-      for (int i = 100; i < 120; i++) {
-        sprintf(buf, "execKey-%d", i);
-        auto key = CacheableKey::create(buf);
-        arrList->push_back(key);
-      }
-
-      auto filter = CacheableVector::create();
-      for (int i = 100; i < 120; i++) {
-        sprintf(buf, "execKey-%d", i);
-        auto key = CacheableKey::create(buf);
-        filter->push_back(key);
-      }
-      LOG("Adding filter done.");
-
-      auto args = CacheableBoolean::create(1);
-
-      LOG("OnServers with sendException");
-
-      auto funcExec = FunctionService::onServers(virtualCache);
-
-      auto collector = funcExec.withArgs(args).execute(
-          exFuncNameSendException, std::chrono::seconds(15));
-
-      //----------------------------------------------------------------------------------------------//
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      auto pool = getPool(regionNamesAuth[0]);
-      auto virtualCache = getVirtualCache(userCreds, pool);
-      std::shared_ptr<Region> regionPtr;
-      regionPtr = virtualCache.getRegion(regionNamesAuth[0]);
-
-      FunctionService::onRegion(regionPtr).execute("securityTest")->getResult();
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      auto pool = getPool(regionNamesAuth[0]);
-      auto virtualCache = getVirtualCache(userCreds, pool);
-      std::shared_ptr<Region> regionPtr;
-      regionPtr = virtualCache.getRegion(regionNamesAuth[0]);
-
-      //-----------------------Test with
-      // sendException-------------------------------//
-      LOG("Function execution with sendException with expected Authorization "
-          "exception with onRegion");
-      char buf[128];
-      for (int i = 1; i <= 200; i++) {
-        auto value = CacheableInt32::create(i);
-
-        sprintf(buf, "execKey-%d", i);
-        auto key = CacheableKey::create(buf);
-        regionPtr->put(key, value);
-      }
-      LOG("Put for execKey's on region complete.");
-
-      LOG("Adding filter");
-      auto arrList = CacheableArrayList::create();
-      for (int i = 100; i < 120; i++) {
-        sprintf(buf, "execKey-%d", i);
-        auto key = CacheableKey::create(buf);
-        arrList->push_back(key);
-      }
-
-      auto filter = CacheableVector::create();
-      for (int i = 100; i < 120; i++) {
-        sprintf(buf, "execKey-%d", i);
-        auto key = CacheableKey::create(buf);
-        filter->push_back(key);
-      }
-      LOG("Adding filter done.");
-
-      auto args = CacheableBoolean::create(1);
-
-      LOG("OnServers with sendException");
-
-      auto funcExec = FunctionService::onRegion(regionPtr);
-
-      auto collector = funcExec.withArgs(args).withFilter(filter).execute(
-          exFuncNameSendException, std::chrono::seconds(15));
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    std::shared_ptr<Region> regionPtr;
-    auto pool = getPool(regionNamesAuth[0]);
-    LOG(" 6");
-    if (pool != nullptr) {
-      LOG(" 7");
-      auto virtualCache = getVirtualCache(userCreds, pool);
-      LOG(" 8");
-      regionPtr = virtualCache.getRegion(regionNamesAuth[0]);
-      LOG("Operation allowed, something is wrong.");
-    } else {
-      LOG("Pool is nullptr");
-    }
-
-    regionPtr->create(keys[2], vals[2]);
-    LOG("Entry created successfully");
-
-    LOG("StepTwo complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(READER_CLIENT, StepThree)
-  {
-    initCredentialGenerator();
-    initClientAuth('R');
-    char buf[100];
-    int value = 102;
-
-    createRegionForSecurity(regionNamesAuth[0], USE_ACK, false, nullptr, false,
-                            -1, true, 0);
-    std::shared_ptr<Region> rptr;
-    auto pool = getPool(regionNamesAuth[0]);
-    LOG(" 6");
-    if (pool != nullptr) {
-      LOG("Pool is nullptr");
-    }
-    LOG(" 7");
-    auto virtualCache = getVirtualCache(userCreds, pool);
-    LOG(" 8");
-    rptr = virtualCache.getRegion(regionNamesAuth[0]);
-    LOG("Operation allowed, something is wrong.");
-
-    sprintf(buf, "%s: %d", rptr->getName().c_str(), value);
-    auto key = CacheableKey::create(buf);
-    sprintf(buf, "testUpdate::%s: value of %d", rptr->getName().c_str(), value);
-    auto valuePtr = buf;
-    try {
-      LOG("Trying put Operation");
-      rptr->put(key, valuePtr);
-      LOG(" Put Operation Successful");
-      FAIL("Should have got NotAuthorizedException during put");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      LOG("Trying createEntry");
-      createEntry(regionNamesAuth[0], keys[2], vals[2]);
-      rptr->create(keys[2], vals[2]);
-      FAIL("Should have got NotAuthorizedException during createEntry");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      LOG("Trying region clear..");
-      rptr->clear();
-      FAIL("Should have got NotAuthorizedException for region.clear ops");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      LOG("Trying updateEntry");
-      rptr->put(keys[2], nvals[2]);
-      FAIL("Should have got NotAuthorizedException during updateEntry");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      auto keyPtr = CacheableKey::create(keys[2]);
-      auto checkPtr =
-          std::dynamic_pointer_cast<CacheableString>(rptr->get(keyPtr));
-      if (checkPtr != nullptr) {
-        LOG("In net search, get returned " + checkPtr->value() + " for key " +
-            keys[2]);
-      } else {
-        LOG("checkPtr is nullptr");
-      }
-    }
-    HANDLE_NO_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      HashMapOfCacheable entrymap;
-      entrymap.clear();
-      for (int i = 0; i < 5; i++) {
-        entrymap.emplace(CacheableKey::create(i), CacheableInt32::create(i));
-      }
-      rptr->putAll(entrymap);
-      FAIL("PutAll should not have completed successfully");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      LOG("GetServerKeys check started for READER");
-      auto keysvec = rptr->serverKeys();
-      LOG("GetServerKeys check passed for READER");
-    }
-    HANDLE_NO_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      std::vector<std::shared_ptr<CacheableKey>> entrykeys;
-      for (int i = 0; i < 5; i++) {
-        entrykeys.push_back(CacheableKey::create(i));
-      }
-      const auto valuesMap = rptr->getAll(entrykeys);
-      if (valuesMap.size() > 0) {
-        LOG("GetAll completed successfully");
-      } else {
-        FAIL("GetAll did not complete successfully");
-      }
-    }
-    HANDLE_NO_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      rptr->query("1=1");
-
-      FAIL("Query should not have completed successfully");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    try {
-      FunctionService::onServer(virtualCache)
-          .execute("securityTest")
-          ->getResult();
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-
-    LOG("StepThree complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(ADMIN_CLIENT, CloseServer1)
-  {
-    SLEEP(9000);
-    if (isLocalServer) {
-      CacheHelper::closeServer(1);
-      LOG("SERVER1 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(ADMIN_CLIENT, CloseServer2)
-  {
-    if (isLocalServer) {
-      CacheHelper::closeServer(2);
-      LOG("SERVER2 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(ADMIN_CLIENT, CloseLocator)
-  {
-    if (isLocator) {
-      CacheHelper::closeLocator(1);
-      LOG("Locator1 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(ADMIN_CLIENT, CloseCacheAdmin)
-  { cleanProc(); }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(WRITER_CLIENT, CloseCacheWriter)
-  { cleanProc(); }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(READER_CLIENT, CloseCacheReader)
-  { cleanProc(); }
-END_TASK_DEFINITION
-
-void doThinClientSecurityAuthorization() {
-  CALL_TASK(StartLocator);
-  CALL_TASK(StartServer1);
-  CALL_TASK(StepOne);
-  CALL_TASK(StepTwo);
-  CALL_TASK(StartServer2);
-  CALL_TASK(CloseServer1);
-  CALL_TASK(StepThree);
-  CALL_TASK(CloseCacheReader);
-  CALL_TASK(CloseCacheWriter);
-  CALL_TASK(CloseCacheAdmin);
-  CALL_TASK(CloseServer2);
-  CALL_TASK(CloseLocator);
-}
-
-DUNIT_MAIN
-  { doThinClientSecurityAuthorization(); }
-END_MAIN
diff --git a/cppcache/integration-test/testThinClientSecurityCQAuthorizationMU.cpp b/cppcache/integration-test/testThinClientSecurityCQAuthorizationMU.cpp
deleted file mode 100644
index 3a388c5..0000000
--- a/cppcache/integration-test/testThinClientSecurityCQAuthorizationMU.cpp
+++ /dev/null
@@ -1,515 +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.
- */
-#include "fw_dunit.hpp"
-#include <geode/CqAttributesFactory.hpp>
-#include <geode/CqAttributes.hpp>
-#include <geode/CqListener.hpp>
-#include <geode/CqQuery.hpp>
-#include <geode/CqServiceStatistics.hpp>
-#include <geode/AuthenticatedView.hpp>
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-#include <string>
-
-#define ROOT_NAME "testThinClientSecurityCQAuthorizationMU"
-#define ROOT_SCOPE DISTRIBUTED_ACK
-
-#include "CacheHelper.hpp"
-
-#include "QueryStrings.hpp"
-#include "QueryHelper.hpp"
-
-#include <geode/Query.hpp>
-#include <geode/QueryService.hpp>
-
-#include "ThinClientCQ.hpp"
-
-#include "CacheHelper.hpp"
-#include "ThinClientHelper.hpp"
-#include <ace/Process.h>
-
-using apache::geode::client::testframework::security::CredentialGenerator;
-
-using apache::geode::client::AuthenticatedView;
-using apache::geode::client::CqAttributesFactory;
-using apache::geode::client::CqEvent;
-using apache::geode::client::CqListener;
-using apache::geode::client::CqOperation;
-using apache::geode::client::Exception;
-using apache::geode::client::IllegalStateException;
-using apache::geode::client::QueryService;
-
-const char *locHostPort =
-    CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
-std::shared_ptr<CredentialGenerator> credentialGeneratorHandler;
-#define CLIENT1 s1p1
-#define SERVER1 s2p1
-#define CLIENT2 s1p2
-
-#define MAX_LISTNER 8
-
-const char *cqNames[MAX_LISTNER] = {"MyCq_0", "MyCq_1", "MyCq_2", "MyCq_3",
-                                    "MyCq_4", "MyCq_5", "MyCq_6", "MyCq_7"};
-
-const char *queryStrings[MAX_LISTNER] = {
-    "select * from /Portfolios p where p.ID < 1",
-    "select * from /Portfolios p where p.ID < 2",
-    "select * from /Portfolios p where p.ID = 2",
-    "select * from /Portfolios p where p.ID >= 3",
-    "select * from /Portfolios p where p.ID = 4",
-    "select * from /Portfolios p where p.ID = 5",
-    "select * from /Portfolios p where p.ID = 6",
-    "select * from /Portfolios p where p.ID = 7"};
-
-const char *regionNamesCq[] = {"Portfolios", "Positions", "Portfolios2",
-                               "Portfolios3"};
-
-class MyCqListener : public CqListener {
-  uint8_t m_id;
-  uint32_t m_numInserts;
-  uint32_t m_numUpdates;
-  uint32_t m_numDeletes;
-  uint32_t m_numEvents;
-
- public:
-  uint8_t getId() { return m_id; }
-  uint32_t getNumInserts() { return m_numInserts; }
-  uint32_t getNumUpdates() { return m_numUpdates; }
-  uint32_t getNumDeletes() { return m_numDeletes; }
-  uint32_t getNumEvents() { return m_numEvents; }
-  explicit MyCqListener(uint8_t id)
-      : m_id(id),
-        m_numInserts(0),
-        m_numUpdates(0),
-        m_numDeletes(0),
-        m_numEvents(0) {}
-  ~MyCqListener() noexcept override = default;
-  inline void updateCount(const CqEvent &cqEvent) {
-    printf(" in cqEvent.getQueryOperation() %d id = %d\n",
-           static_cast<int>(cqEvent.getQueryOperation()), m_id);
-    printf(" in update key = %s \n",
-           (dynamic_cast<CacheableString *>(cqEvent.getKey().get()))
-               ->value()
-               .c_str());
-    m_numEvents++;
-    switch (cqEvent.getQueryOperation()) {
-      case CqOperation::OP_TYPE_CREATE:
-        m_numInserts++;
-        break;
-      case CqOperation::OP_TYPE_UPDATE:
-        m_numUpdates++;
-        break;
-      case CqOperation::OP_TYPE_DESTROY:
-        m_numDeletes++;
-        break;
-      case CqOperation::OP_TYPE_INVALID:
-      case CqOperation::OP_TYPE_INVALIDATE:
-      case CqOperation::OP_TYPE_REGION_CLEAR:
-      case CqOperation::OP_TYPE_MARKER:
-        break;
-    }
-    printf(" in create = %d, update = %d , delete = %d ", m_numInserts,
-           m_numUpdates, m_numDeletes);
-  }
-
-  void onEvent(const CqEvent &cqe) override {
-    LOG("MyCqListener::OnEvent called");
-    updateCount(cqe);
-  }
-  void onError(const CqEvent &cqe) override {
-    updateCount(cqe);
-    LOG("MyCqListener::OnError called");
-  }
-  void close() override { LOG("MyCqListener::close called"); }
-};
-
-std::string getXmlPath() {
-  char xmlPath[1000] = {'\0'};
-  const char *path = ACE_OS::getenv("TESTSRC");
-  ASSERT(path != nullptr,
-         "Environment variable TESTSRC for test source directory is not set.");
-  strncpy(xmlPath, path, strlen(path) - strlen("cppcache"));
-  strncat(xmlPath, "xml/Security/", sizeof(xmlPath) - strlen(xmlPath) - 1);
-  return std::string(xmlPath);
-}
-
-void initCredentialGenerator() {
-  credentialGeneratorHandler = CredentialGenerator::create("DUMMY3");
-
-  if (credentialGeneratorHandler == nullptr) {
-    FAIL("credentialGeneratorHandler is nullptr");
-  }
-}
-std::shared_ptr<Properties> userCreds;
-void initClientCq(const bool isthinClient) {
-  userCreds = Properties::create();
-  auto config = Properties::create();
-  // credentialGeneratorHandler->getAuthInit(config);
-  credentialGeneratorHandler->getValidCredentials(userCreds);
-
-  if (cacheHelper == nullptr) {
-    cacheHelper = new CacheHelper(isthinClient, config);
-  }
-  ASSERT(cacheHelper, "Failed to create a CacheHelper client instance.");
-  try {
-    auto serializationRegistry =
-        CacheRegionHelper::getCacheImpl(cacheHelper->getCache().get())
-            ->getSerializationRegistry();
-    serializationRegistry->addDataSerializableType(
-        Position::createDeserializable, 2);
-    serializationRegistry->addDataSerializableType(
-        Portfolio::createDeserializable, 3);
-  } catch (const IllegalStateException &) {
-    // ignore exception
-  }
-}
-
-DUNIT_TASK_DEFINITION(CLIENT1, CreateServer1)
-  {
-    initCredentialGenerator();
-    std::string cmdServerAuthenticator;
-
-    if (isLocalServer) {
-      cmdServerAuthenticator = credentialGeneratorHandler->getServerCmdParams(
-          "authenticator:authorizer:authorizerPP", getXmlPath());
-      printf("string %s", cmdServerAuthenticator.c_str());
-      CacheHelper::initServer(
-          1, "remotequery.xml", nullptr,
-          const_cast<char *>(cmdServerAuthenticator.c_str()));
-      LOG("Server1 started");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, CreateServer2)
-  {
-    std::string cmdServerAuthenticator;
-
-    if (isLocalServer) {
-      cmdServerAuthenticator = credentialGeneratorHandler->getServerCmdParams(
-          "authenticator:authorizer:authorizerPP", getXmlPath());
-      printf("string %s", cmdServerAuthenticator.c_str());
-      CacheHelper::initServer(
-          2, "remotequery2.xml", nullptr,
-          const_cast<char *>(cmdServerAuthenticator.c_str()));
-      LOG("Server2 started");
-    }
-    SLEEP(20000);
-  }
-END_TASK_DEFINITION
-
-void stepOne() {
-  LOG("StepOne1 complete. 1");
-  initClientCq(true);
-  LOG("StepOne1 complete. 2");
-  createRegionForCQMU(regionNamesCq[0], USE_ACK, false);
-  LOG("StepOne1 complete. 3");
-  auto regptr = getHelper()->getRegion(regionNamesCq[0]);
-  LOG("StepOne1 complete. 4");
-  LOG("StepOne1 complete. 5");
-  auto subregPtr =
-      regptr->createSubregion(regionNamesCq[1], regptr->getAttributes());
-
-  LOG("StepOne complete.");
-}
-
-void stepOne2() {
-  LOG("StepOne2 complete. 1");
-  initClientCq(true);
-  LOG("StepOne2 complete. 2");
-  createRegionForCQMU(regionNamesCq[0], USE_ACK, false);
-  LOG("StepOne2 complete. 3");
-  auto regptr = getHelper()->getRegion(regionNamesCq[0]);
-  LOG("StepOne2 complete. 4");
-  LOG("StepOne2 complete. 5");
-  auto subregPtr =
-      regptr->createSubregion(regionNamesCq[1], regptr->getAttributes());
-
-  LOG("StepOne2 complete.");
-}
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepOne_PoolEP)
-  { stepOne(); }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, StepOne2_PoolEP)
-  {
-    initCredentialGenerator();
-    stepOne2();
-  }
-END_TASK_DEFINITION
-std::shared_ptr<Pool> getPool(const char *name) {
-  return getHelper()->getCache()->getPoolManager().find(name);
-}
-
-static std::shared_ptr<QueryService> userQueryService;
-
-AuthenticatedView setUpAuthenticatedView(const int userId) {
-  auto creds = Properties::create();
-  char tmp[25] = {'\0'};
-  sprintf(tmp, "user%d", userId);
-
-  creds->insert("security-username", tmp);
-  creds->insert("security-password", tmp);
-  return getHelper()->getCache()->createAuthenticatedView(creds,
-                                                          regionNamesCq[0]);
-}
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepTwo)
-  {
-    auto authenticatedView = setUpAuthenticatedView(4);
-
-    auto regPtr0 = authenticatedView.getRegion(regionNamesCq[0]);
-    auto subregPtr0 = regPtr0->getSubregion(regionNamesCq[1]);
-
-    authenticatedView.close();
-    LOG("StepTwo complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepThree)
-  {
-    uint8_t i = 0;
-    // QueryHelper * qh = &QueryHelper::getHelper();
-    // userCache = getVirtualCache(userCreds, regionNamesCq[0]);
-    auto authenticatedView = setUpAuthenticatedView(4);
-    userQueryService = authenticatedView.getQueryService();
-    std::shared_ptr<QueryService> qs;
-
-    qs = userQueryService;
-
-    try {
-      for (i = 0; i < MAX_LISTNER; i++) {
-        auto cqLstner = std::make_shared<MyCqListener>(i);
-        CqAttributesFactory cqFac;
-        cqFac.addCqListener(cqLstner);
-        auto cqAttr = cqFac.create();
-
-        auto qry = qs->newCq(cqNames[i], queryStrings[i], cqAttr);
-        qry->execute();
-      }
-
-      LOG("EXECUTE 1 START");
-
-      // qs->executeCqs();
-
-      LOG("EXECUTE 1 STOP");
-    } catch (const Exception &excp) {
-      std::string logmsg = "";
-      logmsg += excp.getName();
-      logmsg += ": ";
-      logmsg += excp.what();
-      LOG(logmsg.c_str());
-      LOG(excp.getStackTrace());
-    }
-
-    authenticatedView.close();
-    LOG("StepThree complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, StepTwo2)
-  {
-    auto authenticatedView = setUpAuthenticatedView(3);
-    auto regPtr0 = authenticatedView.getRegion(regionNamesCq[0]);
-    auto subregPtr0 = regPtr0->getSubregion(regionNamesCq[1]);
-
-    QueryHelper *qh = &QueryHelper::getHelper();
-
-    qh->populatePortfolioData(regPtr0, 3, 2, 1);
-    qh->populatePositionData(subregPtr0, 3, 2);
-    for (int i = 1; i <= 4; i++) {
-      auto port = std::make_shared<Portfolio>(i, 2);
-
-      char tmp[25] = {'\0'};
-      sprintf(tmp, "port1-%d", i);
-      auto keyport = CacheableKey::create(tmp);
-      regPtr0->put(keyport, port);
-      SLEEP(10);  // sleep a while to allow server query to complete
-    }
-
-    LOG("StepTwo2 complete. Sleeping .25 min for server query to complete...");
-    SLEEP(15000);  // sleep .25 min to allow server query to complete
-    authenticatedView.close();
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepFour)
-  {
-    // auto userCache = getVirtualCache(userCreds, regionNamesCq[0]);
-    std::shared_ptr<QueryService> qs;
-
-    qs = userQueryService;
-
-    char buf[1024];
-
-    uint8_t i = 0;
-
-    CqAttributesFactory cqFac;
-    for (i = 0; i < MAX_LISTNER; i++) {
-      sprintf(buf, "get info for cq[%s]:", cqNames[i]);
-      LOG(buf);
-      auto cqy = qs->getCq(cqNames[i]);
-      // auto cqStats = cqy->getStatistics();
-    }
-
-    // if key port1-4 then only query 3 and 4 will satisfied
-    auto cqy = qs->getCq(cqNames[3]);
-    auto cqAttr = cqy->getCqAttributes();
-    auto vl = cqAttr->getCqListeners();
-
-    auto cqListener_3 = static_cast<MyCqListener *>(vl[0].get());
-    printf(" cqListener_3 should have one create event = %d \n",
-           cqListener_3->getNumInserts());
-    ASSERT(cqListener_3->getNumInserts() == 1,
-           "incorrect number of events got listener 3");
-
-    cqy = qs->getCq(cqNames[4]);
-    cqAttr = cqy->getCqAttributes();
-    vl = cqAttr->getCqListeners();
-
-    auto cqListener_4 = static_cast<MyCqListener *>(vl[0].get());
-    printf(" cqListener_4 should have one create event = %d \n",
-           cqListener_4->getNumInserts());
-    ASSERT(cqListener_4->getNumInserts() == 1,
-           "incorrect number of events got listener 4");
-
-    /*for(i=0; i < MAX_LISTNER; i++)
-    {
-      sprintf(buf, "get info for cq[%s]:", cqNames[i]);
-      LOG(buf);
-     auto cqy = qs->getCq(cqNames[i]);
-      cqy->stop();
-      cqy->close();
-     //auto cqStats = cqy->getStatistics();
-    }*/
-
-    // userCache->close();
-    LOG("StepFour complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepFour2)
-  {
-    auto qs = userQueryService;
-
-    char buf[1024];
-
-    uint8_t i = 0;
-
-    for (i = 0; i < MAX_LISTNER; i++) {
-      sprintf(buf, "get info for cq[%s]:", cqNames[i]);
-      LOG(buf);
-      auto cqy = qs->getCq(cqNames[i]);
-      // auto cqStats = cqy->getStatistics();
-    }
-
-    // if key port1-4 then only query 3 and 4 will satisfied
-    auto cqy = qs->getCq(cqNames[3]);
-    auto cqAttr = cqy->getCqAttributes();
-    auto vl = cqAttr->getCqListeners();
-
-    MyCqListener *cqListener_3 = static_cast<MyCqListener *>(vl[0].get());
-    printf(" cqListener_3 should have one update event = %d \n",
-           cqListener_3->getNumUpdates());
-    ASSERT(cqListener_3->getNumUpdates() == 1,
-           "incorrect number of events got listener 3");
-
-    cqy = qs->getCq(cqNames[4]);
-    cqAttr = cqy->getCqAttributes();
-    vl = cqAttr->getCqListeners();
-
-    auto cqListener_4 = static_cast<MyCqListener *>(vl[0].get());
-    printf(" cqListener_4 should have one update event = %d \n",
-           cqListener_4->getNumUpdates());
-    ASSERT(cqListener_4->getNumUpdates() == 1,
-           "incorrect number of events got listener 4");
-
-    /*for(i=0; i < MAX_LISTNER; i++)
-    {
-      sprintf(buf, "get info for cq[%s]:", cqNames[i]);
-      LOG(buf);
-     auto cqy = qs->getCq(cqNames[i]);
-      cqy->stop();
-      cqy->close();
-     //auto cqStats = cqy->getStatistics();
-    }*/
-
-    LOG("StepFour2 complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, CloseCache1)
-  {
-    LOG("cleanProc 1...");
-    cleanProc();
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, CloseCache2)
-  {
-    LOG("cleanProc 2...");
-    cleanProc();
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER1, CloseServer1)
-  {
-    LOG("closing Server1...");
-    if (isLocalServer) {
-      CacheHelper::closeServer(1);
-      LOG("SERVER1 stopped");
-    }
-    SLEEP(5000);
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER1, CloseServer2)
-  {
-    LOG("closing Server2...");
-    if (isLocalServer) {
-      CacheHelper::closeServer(2);
-      LOG("SERVER2 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-void doThinClientCq() {
-  //  CALL_TASK(CreateLocator);
-  //  CALL_TASK(CreateServer1_Locator);
-  //
-  //  CALL_TASK(StepOne_PoolLocator);
-  //  CALL_TASK(StepOne2_PoolLocator);
-
-  CALL_TASK(StepTwo);
-  CALL_TASK(StepThree);
-  CALL_TASK(StepTwo2);
-  CALL_TASK(StepFour);  // validates listener events
-  CALL_TASK(CreateServer2);
-  CALL_TASK(CloseServer1);
-  CALL_TASK(StepTwo2);  // again put data
-  CALL_TASK(StepFour2);
-  CALL_TASK(CloseCache1);
-  CALL_TASK(CloseCache2);
-  CALL_TASK(CloseServer2);
-
-  //  CALL_TASK(CloseLocator);
-}
-
-DUNIT_MAIN
-  { doThinClientCq(); }
-END_MAIN
diff --git a/cppcache/integration-test/testThinClientSecurityDurableCQAuthorizationMU.cpp b/cppcache/integration-test/testThinClientSecurityDurableCQAuthorizationMU.cpp
deleted file mode 100644
index 1b73cd9..0000000
--- a/cppcache/integration-test/testThinClientSecurityDurableCQAuthorizationMU.cpp
+++ /dev/null
@@ -1,650 +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.
- */
-#include "fw_dunit.hpp"
-#include <geode/CqAttributesFactory.hpp>
-#include <geode/CqAttributes.hpp>
-#include <geode/CqListener.hpp>
-#include <geode/CqQuery.hpp>
-#include <geode/CqServiceStatistics.hpp>
-#include <geode/AuthenticatedView.hpp>
-#include <ace/OS.h>
-#include <ace/High_Res_Timer.h>
-#include <string>
-
-#define ROOT_NAME "testThinClientSecurityDurableCQAuthorizationMU"
-#define ROOT_SCOPE DISTRIBUTED_ACK
-
-#include "CacheHelper.hpp"
-
-#include "QueryStrings.hpp"
-#include "QueryHelper.hpp"
-
-#include <geode/Query.hpp>
-#include <geode/QueryService.hpp>
-
-#include "ThinClientCQ.hpp"
-
-#include "CacheHelper.hpp"
-#include "ThinClientHelper.hpp"
-#include <ace/Process.h>
-
-using apache::geode::client::AuthenticatedView;
-using apache::geode::client::CqAttributesFactory;
-using apache::geode::client::CqEvent;
-using apache::geode::client::CqListener;
-using apache::geode::client::CqOperation;
-using apache::geode::client::Exception;
-using apache::geode::client::IllegalStateException;
-using apache::geode::client::QueryService;
-using apache::geode::client::testframework::security::CredentialGenerator;
-
-const char *locHostPort =
-    CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
-
-std::shared_ptr<CredentialGenerator> credentialGeneratorHandler;
-
-#define CLIENT1 s1p1
-#define SERVER1 s2p1
-#define CLIENT2 s1p2
-
-#define MAX_LISTNER 8
-
-const char *cqNames[MAX_LISTNER] = {"MyCq_0", "MyCq_1", "MyCq_2", "MyCq_3",
-                                    "MyCq_4", "MyCq_5", "MyCq_6", "MyCq_7"};
-
-const char *queryStrings[MAX_LISTNER] = {
-    "select * from /Portfolios p where p.ID < 1",
-    "select * from /Portfolios p where p.ID < 2",
-    "select * from /Portfolios p where p.ID = 2",
-    "select * from /Portfolios p where p.ID >= 3",
-    "select * from /Portfolios p where p.ID = 4",
-    "select * from /Portfolios p where p.ID = 5",
-    "select * from /Portfolios p where p.ID = 6",
-    "select * from /Portfolios p where p.ID = 7"};
-
-const char *regionNamesCq[] = {"Portfolios", "Positions", "Portfolios2",
-                               "Portfolios3"};
-
-class MyCqListener : public CqListener {
-  uint8_t m_id;
-  uint32_t m_numInserts;
-  uint32_t m_numUpdates;
-  uint32_t m_numDeletes;
-  uint32_t m_numEvents;
-
- public:
-  uint8_t getId() { return m_id; }
-  uint32_t getNumInserts() { return m_numInserts; }
-  uint32_t getNumUpdates() { return m_numUpdates; }
-  uint32_t getNumDeletes() { return m_numDeletes; }
-  uint32_t getNumEvents() { return m_numEvents; }
-  explicit MyCqListener(uint8_t id)
-      : m_id(id),
-        m_numInserts(0),
-        m_numUpdates(0),
-        m_numDeletes(0),
-        m_numEvents(0) {}
-  ~MyCqListener() noexcept override = default;
-  inline void updateCount(const CqEvent &cqEvent) {
-    printf(" in cqEvent.getQueryOperation() %d id = %d\n",
-           static_cast<int>(cqEvent.getQueryOperation()), m_id);
-    printf(" in update key = %s \n",
-           (dynamic_cast<CacheableString *>(cqEvent.getKey().get()))
-               ->value()
-               .c_str());
-    m_numEvents++;
-    switch (cqEvent.getQueryOperation()) {
-      case CqOperation::OP_TYPE_CREATE:
-        m_numInserts++;
-        break;
-      case CqOperation::OP_TYPE_UPDATE:
-        m_numUpdates++;
-        break;
-      case CqOperation::OP_TYPE_DESTROY:
-        m_numDeletes++;
-        break;
-      case CqOperation::OP_TYPE_INVALID:
-      case CqOperation::OP_TYPE_INVALIDATE:
-      case CqOperation::OP_TYPE_REGION_CLEAR:
-      case CqOperation::OP_TYPE_MARKER:
-        break;
-    }
-    printf(" in create = %d, update = %d , delete = %d ", m_numInserts,
-           m_numUpdates, m_numDeletes);
-  }
-
-  void onEvent(const CqEvent &cqe) override {
-    LOG("MyCqListener::OnEvent called");
-    updateCount(cqe);
-  }
-  void onError(const CqEvent &cqe) override {
-    updateCount(cqe);
-    LOG("MyCqListener::OnError called");
-  }
-  void close() override { LOG("MyCqListener::close called"); }
-};
-
-std::string getXmlPath() {
-  char xmlPath[1000] = {'\0'};
-  const char *path = ACE_OS::getenv("TESTSRC");
-  ASSERT(path != nullptr,
-         "Environment variable TESTSRC for test source directory is not set.");
-  strncpy(xmlPath, path, strlen(path) - strlen("cppcache"));
-  strncat(xmlPath, "xml/Security/", sizeof(xmlPath) - strlen(xmlPath) - 1);
-  return std::string(xmlPath);
-}
-
-void initCredentialGenerator() {
-  credentialGeneratorHandler = CredentialGenerator::create("DUMMY3");
-
-  if (credentialGeneratorHandler == nullptr) {
-    FAIL("credentialGeneratorHandler is nullptr");
-  }
-}
-std::shared_ptr<Properties> userCreds;
-const char *durableIds[] = {"DurableId1", "DurableId2"};
-void initClientCq(const bool isthinClient, int clientIdx) {
-  userCreds = Properties::create();
-  auto config = Properties::create();
-  // credentialGeneratorHandler->getAuthInit(config);
-  credentialGeneratorHandler->getValidCredentials(userCreds);
-
-  config->insert("durable-client-id", durableIds[clientIdx]);
-  config->insert("durable-timeout", std::chrono::seconds(60));
-  config->insert("notify-ack-interval", std::chrono::seconds(1));
-
-  if (cacheHelper == nullptr) {
-    cacheHelper = new CacheHelper(isthinClient, config);
-  }
-  ASSERT(cacheHelper, "Failed to create a CacheHelper client instance.");
-  try {
-    CacheImpl *cacheImpl =
-        CacheRegionHelper::getCacheImpl(cacheHelper->getCache().get());
-    cacheImpl->getSerializationRegistry()->addDataSerializableType(
-        Position::createDeserializable, 2);
-    cacheImpl->getSerializationRegistry()->addDataSerializableType(
-        Portfolio::createDeserializable, 3);
-  } catch (const IllegalStateException &) {
-    // ignore exception
-  }
-}
-
-bool closeLogicalCache = false;
-bool logicalCacheKeepAlive = false;
-bool durableCq = false;
-
-DUNIT_TASK_DEFINITION(CLIENT1, CreateServer1)
-  {
-    initCredentialGenerator();
-    std::string cmdServerAuthenticator;
-
-    if (isLocalServer) {
-      cmdServerAuthenticator = credentialGeneratorHandler->getServerCmdParams(
-          "authenticator:authorizerPP", getXmlPath());
-      printf("string %s", cmdServerAuthenticator.c_str());
-      CacheHelper::initServer(
-          1, "remotequery.xml", nullptr,
-          const_cast<char *>(cmdServerAuthenticator.c_str()));
-      LOG("Server1 started");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, CreateServer2)
-  {
-    std::string cmdServerAuthenticator;
-
-    if (isLocalServer) {
-      cmdServerAuthenticator = credentialGeneratorHandler->getServerCmdParams(
-          "authenticator:authorizerPP", getXmlPath());
-      printf("string %s", cmdServerAuthenticator.c_str());
-      CacheHelper::initServer(
-          2, "remotequery2.xml", nullptr,
-          const_cast<char *>(cmdServerAuthenticator.c_str()));
-      LOG("Server2 started");
-    }
-    SLEEP(20000);
-  }
-END_TASK_DEFINITION
-
-void stepOne() {
-  LOG("StepOne1 complete. 1");
-  initClientCq(true, 0);
-  LOG("StepOne1 complete. 2");
-  createRegionForCQMU(regionNamesCq[0], USE_ACK, false);
-  LOG("StepOne1 complete. 3");
-  auto regptr = getHelper()->getRegion(regionNamesCq[0]);
-  LOG("StepOne1 complete. 4");
-  auto subregPtr =
-      regptr->createSubregion(regionNamesCq[1], regptr->getAttributes());
-
-  LOG("StepOne complete.");
-}
-
-void readyForEvents() {
-  try {
-    getHelper()->cachePtr->readyForEvents();
-    LOG("StepOne readyForevents Complete");
-  } catch (...) {
-    LOG("Exception occured while sending readyForEvents");
-  }
-}
-
-void stepOne2() {
-  LOG("StepOne2 complete. 1");
-  initClientCq(true, 1);
-  LOG("StepOne2 complete. 2");
-  createRegionForCQMU(regionNamesCq[0], USE_ACK, false);
-  LOG("StepOne2 complete. 3");
-  auto regptr = getHelper()->getRegion(regionNamesCq[0]);
-  LOG("StepOne2 complete. 4");
-  auto subregPtr =
-      regptr->createSubregion(regionNamesCq[1], regptr->getAttributes());
-
-  LOG("StepOne2 complete.");
-}
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepOne_PoolEP)
-  { stepOne(); }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, StepOne2_PoolEP)
-  {
-    initCredentialGenerator();
-    stepOne2();
-  }
-END_TASK_DEFINITION
-
-std::shared_ptr<Pool> getPool(const char *name) {
-  return getHelper()->getCache()->getPoolManager().find(name);
-}
-
-AuthenticatedView setUpAuthenticatedView(const int userId) {
-  auto creds = Properties::create();
-  char tmp[25] = {'\0'};
-  sprintf(tmp, "user%d", userId);
-
-  creds->insert("security-username", tmp);
-  creds->insert("security-password", tmp);
-  return getHelper()->getCache()->createAuthenticatedView(creds,
-                                                          regionNamesCq[0]);
-}
-
-static std::shared_ptr<QueryService> userQueryService;
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepTwo)
-  {
-    auto authenticatedView = setUpAuthenticatedView(4);
-    auto regPtr0 = authenticatedView.getRegion(regionNamesCq[0]);
-    auto subregPtr0 = regPtr0->getSubregion(regionNamesCq[1]);
-
-    // QueryHelper * qh = &QueryHelper::getHelper();
-
-    // qh->populatePortfolioData(regPtr0  , 2, 1, 1);
-    // qh->populatePositionData(subregPtr0, 2, 1);
-
-    if (closeLogicalCache) {
-      authenticatedView.close();
-    }
-
-    LOG("StepTwo complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, ReadyForEvents)
-  { readyForEvents(); }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepThree)
-  {
-    uint8_t i = 0;
-    // QueryHelper * qh = &QueryHelper::getHelper();
-    // userCache = getVirtualCache(userCreds, regionNamesCq[0]);
-
-    auto authenticatedView = setUpAuthenticatedView(4);
-    userQueryService = authenticatedView.getQueryService();
-
-    std::shared_ptr<QueryService> qs;
-
-    qs = userQueryService;
-
-    try {
-      for (i = 0; i < MAX_LISTNER; i++) {
-        auto cqLstner = std::make_shared<MyCqListener>(i);
-        CqAttributesFactory cqFac;
-        cqFac.addCqListener(cqLstner);
-        auto cqAttr = cqFac.create();
-        printf("adding new cq = %s , %d", cqNames[i], durableCq);
-        auto qry = qs->newCq(cqNames[i], queryStrings[i], cqAttr, durableCq);
-        qry->execute();
-      }
-
-      LOG("EXECUTE 1 START");
-
-      // qs->executeCqs();
-
-      LOG("EXECUTE 1 STOP");
-    } catch (const Exception &excp) {
-      std::string logmsg = "";
-      logmsg += excp.getName();
-      logmsg += ": ";
-      logmsg += excp.what();
-      LOG(logmsg.c_str());
-      LOG(excp.getStackTrace().c_str());
-    }
-
-    if (closeLogicalCache) {
-      authenticatedView.close();
-    }
-
-    LOG("StepThree complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, CloseCache1Down)
-  {
-    getHelper()->disconnect(true);
-    cleanProc();
-    LOG("Clnt1Down complete: Keepalive = True");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, StepTwo2)
-  {
-    auto authenticatedView = setUpAuthenticatedView(3);
-    auto regPtr0 = authenticatedView.getRegion(regionNamesCq[0]);
-    auto subregPtr0 = regPtr0->getSubregion(regionNamesCq[1]);
-
-    QueryHelper *qh = &QueryHelper::getHelper();
-
-    qh->populatePortfolioData(regPtr0, 3, 2, 1);
-    qh->populatePositionData(subregPtr0, 3, 2);
-    for (int i = 1; i <= 4; i++) {
-      auto port = std::make_shared<Portfolio>(i, 2);
-
-      char tmp[25] = {'\0'};
-      sprintf(tmp, "port1-%d", i);
-      auto keyport = CacheableKey::create(tmp);
-      regPtr0->put(keyport, port);
-      SLEEP(10);  // sleep a while to allow server query to complete
-    }
-
-    LOG("StepTwo2 complete. Sleeping .25 min for server query to complete...");
-    SLEEP(15000);  // sleep .25 min to allow server query to complete
-
-    if (closeLogicalCache) {
-      authenticatedView.close();
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepFour)
-  {
-    // auto userCache = getVirtualCache(userCreds, regionNamesCq[0]);
-    auto qs = userQueryService;
-
-    char buf[1024];
-
-    uint8_t i = 0;
-
-    for (i = 0; i < MAX_LISTNER; i++) {
-      sprintf(buf, "get info for cq[%s]:", cqNames[i]);
-      LOG(buf);
-      auto cqy = qs->getCq(cqNames[i]);
-      // auto cqStats = cqy->getStatistics();
-    }
-
-    // if key port1-4 then only query 3 and 4 will satisfied
-    auto cqy = qs->getCq(cqNames[3]);
-    auto cqAttr = cqy->getCqAttributes();
-    auto vl = cqAttr->getCqListeners();
-
-    auto cqListener_3 = static_cast<MyCqListener *>(vl[0].get());
-    printf(" cqListener_3 should have one create event = %d \n",
-           cqListener_3->getNumInserts());
-    ASSERT(cqListener_3->getNumInserts() == 1,
-           "incorrect number of events got listener 3");
-
-    cqy = qs->getCq(cqNames[4]);
-    cqAttr = cqy->getCqAttributes();
-    vl = cqAttr->getCqListeners();
-
-    auto cqListener_4 = static_cast<MyCqListener *>(vl[0].get());
-    printf(" cqListener_4 should have one create event = %d \n",
-           cqListener_4->getNumInserts());
-    ASSERT(cqListener_4->getNumInserts() == 1,
-           "incorrect number of events got listener 4");
-
-    LOG("StepFour complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepFour2)
-  {
-    SLEEP(15000);  // sleep .25 min
-    // auto userCache = getVirtualCache(userCreds, regionNamesCq[0]);
-
-    auto authenticatedView = setUpAuthenticatedView(4);
-    userQueryService = authenticatedView.getQueryService();
-    auto qs = userQueryService;
-
-    char buf[1024];
-
-    uint8_t i = 0;
-
-    for (i = 0; i < MAX_LISTNER; i++) {
-      sprintf(buf, "get info for cq[%s]:", cqNames[i]);
-      LOG(buf);
-      auto cqy = qs->getCq(cqNames[i]);
-      // auto cqStats = cqy->getStatistics();
-    }
-
-    if ((durableCq && !logicalCacheKeepAlive && !closeLogicalCache) ||
-        (durableCq && logicalCacheKeepAlive && closeLogicalCache)) {
-      // if key port1-4 then only query 3 and 4 will satisfied
-      auto cqy = qs->getCq(cqNames[3]);
-      auto cqAttr = cqy->getCqAttributes();
-      auto vl = cqAttr->getCqListeners();
-
-      auto cqListener_3 = static_cast<MyCqListener *>(vl[0].get());
-      printf(" cqListener_3 should have one update event = %d \n",
-             cqListener_3->getNumUpdates());
-      ASSERT(cqListener_3->getNumUpdates() == 1,
-             "incorrect number of events got listener 3");
-
-      cqy = qs->getCq(cqNames[4]);
-      cqAttr = cqy->getCqAttributes();
-      vl = cqAttr->getCqListeners();
-
-      MyCqListener *cqListener_4 = static_cast<MyCqListener *>(vl[0].get());
-      printf(" cqListener_4 should have one update event = %d \n",
-             cqListener_4->getNumUpdates());
-      ASSERT(cqListener_4->getNumUpdates() == 1,
-             "incorrect number of events got listener 4");
-    }
-
-    if ((!durableCq && !logicalCacheKeepAlive && !closeLogicalCache) ||
-        (durableCq && !logicalCacheKeepAlive && closeLogicalCache)) {
-      // if key port1-4 then only query 3 and 4 will satisfied
-      auto cqy = qs->getCq(cqNames[3]);
-      auto cqAttr = cqy->getCqAttributes();
-      auto vl = cqAttr->getCqListeners();
-
-      auto cqListener_3 = static_cast<MyCqListener *>(vl[0].get());
-      printf(" cqListener_3 should have zero update event = %d \n",
-             cqListener_3->getNumUpdates());
-      ASSERT(cqListener_3->getNumUpdates() == 0,
-             "incorrect number of events got listener 3");
-
-      cqy = qs->getCq(cqNames[4]);
-      cqAttr = cqy->getCqAttributes();
-      vl = cqAttr->getCqListeners();
-
-      auto cqListener_4 = static_cast<MyCqListener *>(vl[0].get());
-      printf(" cqListener_4 should have zero update event = %d \n",
-             cqListener_4->getNumUpdates());
-      ASSERT(cqListener_4->getNumUpdates() == 0,
-             "incorrect number of events got listener 4");
-    }
-
-    /*for(i=0; i < MAX_LISTNER; i++)
-    {
-      sprintf(buf, "get info for cq[%s]:", cqNames[i]);
-      LOG(buf);
-     auto cqy = qs->getCq(cqNames[i]);
-      cqy->stop();
-      cqy->close();
-     //auto cqStats = cqy->getStatistics();
-    }*/
-
-    if (closeLogicalCache) {
-      authenticatedView.close();
-    }
-    LOG("StepFour2 complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, CloseCache1)
-  {
-    LOG("cleanProc 1...");
-    cleanProc();
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT2, CloseCache2)
-  {
-    LOG("cleanProc 2...");
-    cleanProc();
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER1, CloseServer1)
-  {
-    LOG("closing Server1...");
-    if (isLocalServer) {
-      CacheHelper::closeServer(1);
-      LOG("SERVER1 stopped");
-    }
-    SLEEP(5000);
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER1, CloseServer2)
-  {
-    LOG("closing Server2...");
-    if (isLocalServer) {
-      CacheHelper::closeServer(2);
-      LOG("SERVER2 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, durableCQ)
-  {
-    closeLogicalCache = false;
-    logicalCacheKeepAlive = false;
-    durableCq = true;
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, NodurableCQ)
-  {
-    closeLogicalCache = false;
-    logicalCacheKeepAlive = false;
-    durableCq = false;
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, LogicalCacheTrueAnddurableCQ)
-  {
-    closeLogicalCache = true;
-    logicalCacheKeepAlive = true;
-    durableCq = true;
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, LogicalCacheFalseAnddurableCQ)
-  {
-    closeLogicalCache = true;
-    logicalCacheKeepAlive = false;
-    durableCq = true;
-  }
-END_TASK_DEFINITION
-
-void doThinClientCq(bool poolConfig = false, bool poolLocators = false) {
-  for (int i = 0; i < 4; i++) {
-    if (i == 0)  // realCache.close(true)
-    {
-      CALL_TASK(durableCQ);  // this should get events
-    } else if (i == 1)       // no durable CQ
-    {
-      CALL_TASK(NodurableCQ);  // this should not get events
-    } else if (i == 2)         // AuthenticatedView.close(true)
-    {
-      CALL_TASK(LogicalCacheTrueAnddurableCQ);  // this should get events
-    } else if (i == 3)  // AuthenticatedView.close(false)
-    {
-      CALL_TASK(LogicalCacheFalseAnddurableCQ);  // this should not get events
-    }
-
-    if (poolConfig && poolLocators) {
-      // CALL_TASK(CreateLocator);
-      // CALL_TASK(CreateServer1_Locator);
-    } else {
-      CALL_TASK(CreateServer1);
-    }
-    if (poolConfig) {
-      if (poolLocators) {
-        //  CALL_TASK(StepOne_PoolLocator);
-        // CALL_TASK(StepOne2_PoolLocator);
-      } else {
-        CALL_TASK(StepOne_PoolEP);
-        CALL_TASK(StepOne2_PoolEP);
-      }
-    }
-    CALL_TASK(ReadyForEvents);
-    CALL_TASK(StepTwo);
-    CALL_TASK(StepThree);
-    CALL_TASK(StepTwo2);  // another client put data
-    CALL_TASK(StepFour);  // validates listener events
-    // CALL_TASK(CreateServer2);
-    CALL_TASK(CloseCache1Down);
-    CALL_TASK(StepTwo2);  // again put data
-    CALL_TASK(StepOne_PoolEP);
-    CALL_TASK(StepTwo);
-    CALL_TASK(StepThree);
-    CALL_TASK(ReadyForEvents);
-    CALL_TASK(StepFour2);  // validates listener events After client become up
-    CALL_TASK(CloseCache1);
-    CALL_TASK(CloseCache2);
-    CALL_TASK(CloseServer1);
-
-    if (poolConfig && poolLocators) {
-      // CALL_TASK(CloseLocator);
-    }
-  }
-}
-
-DUNIT_MAIN
-  {
-    doThinClientCq(
-        true);  // pool-with-endpoints case: pool == true, locators == false
-
-    // doThinClientCq(true, true); // pool-with-locator case: pool == true,
-    // locators == true
-  }
-END_MAIN
diff --git a/cppcache/integration-test/testThinClientSecurityPostAuthorization.cpp b/cppcache/integration-test/testThinClientSecurityPostAuthorization.cpp
index d151bdd..4dc6d05 100644
--- a/cppcache/integration-test/testThinClientSecurityPostAuthorization.cpp
+++ b/cppcache/integration-test/testThinClientSecurityPostAuthorization.cpp
@@ -26,7 +26,7 @@
 #include "fw_dunit.hpp"
 #include "CacheHelper.hpp"
 #include "ThinClientHelper.hpp"
-#include <ace/Process.h>
+
 #include <string>
 
 #include "ThinClientSecurity.hpp"
@@ -36,7 +36,7 @@
 using apache::geode::client::HashMapOfException;
 using apache::geode::client::NotAuthorizedException;
 
-const char *locHostPort =
+const std::string locHostPort =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 
 #define HANDLE_NO_NOT_AUTHORIZED_EXCEPTION                 \
@@ -79,8 +79,7 @@
       break;
     }
     case 'R': {
-      char clientStr[32];
-      sprintf(clientStr, "geode%d", clientNum);
+      auto clientStr = std::string("geode") + std::to_string(clientNum);
       config->insert("security-username", clientStr);
       config->insert("security-password", clientStr);
       break;
@@ -90,7 +89,9 @@
       config->insert("security-password", "geode1");
       break;
     }
-    default: { break; }
+    default: {
+      break;
+    }
   }
   initClient(true, config);
 }
@@ -108,17 +109,17 @@
         "org.apache.geode.internal.security.FilterPostAuthorization.create "
         "log-level=fine security-log-level=finest";
 
-    char *ldapSrv = ACE_OS::getenv("LDAP_SERVER");
+    char *ldapSrv = std::getenv("LDAP_SERVER");
     serverSecurityParams += std::string(" security-ldap-server=") +
                             (ldapSrv != nullptr ? ldapSrv : "ldap");
 
-    char *ldapRoot = ACE_OS::getenv("LDAP_BASEDN");
+    char *ldapRoot = std::getenv("LDAP_BASEDN");
     serverSecurityParams +=
         std::string(" security-ldap-basedn=") +
         (ldapRoot != nullptr ? ldapRoot
                              : "ou=ldapTesting,dc=ldap,dc=apache,dc=org");
 
-    char *ldapSSL = ACE_OS::getenv("LDAP_USESSL");
+    char *ldapSSL = std::getenv("LDAP_USESSL");
     serverSecurityParams += std::string(" security-ldap-usessl=") +
                             (ldapSSL != nullptr ? ldapSSL : "false");
   }
@@ -146,8 +147,8 @@
     expectedVal = CacheableString::create(nvals[index]);
     ASSERT(*val == *expectedVal, "unexpected value in values map");
   }
-  printf("Expected number of values: %zd; got values: %zd", expectedNum,
-         values.size());
+  std::cout << "Expected number of values: " << expectedNum
+            << "; got values: " << values.size() << "\n";
   ASSERT(values.size() == expectedNum, "unexpected number of values");
 }
 
@@ -164,11 +165,12 @@
       ASSERT(std::dynamic_pointer_cast<std::shared_ptr<NotAuthorizedException>>(
                  iter->second),
              "unexpected exception type in exception map");
-      printf("Got expected NotAuthorizedException: %s", iter->second->what());
+      std::cout << "Got expected NotAuthorizedException: "
+                << iter->second->what() << "\n";
     }
   }
-  printf("Expected number of exceptions: %zd; got exceptions: %zd", expectedNum,
-         exceptions.size());
+  std::cout << "Expected number of exceptions: " << expectedNum
+            << "; got exceptions: " << exceptions.size() << "\n";
   ASSERT(exceptions.size() == expectedNum, "unexpected number of exceptions");
 }
 
diff --git a/cppcache/integration-test/testThinClientTicket303.cpp b/cppcache/integration-test/testThinClientTicket303.cpp
deleted file mode 100644
index b156db6..0000000
--- a/cppcache/integration-test/testThinClientTicket303.cpp
+++ /dev/null
@@ -1,122 +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.
- */
-
-#define ROOT_NAME "testThinClientTicket303"
-
-#include "ThinClientSecurityHelper.hpp"
-
-#define SERVER s1p1
-#define CLIENT1 s1p2
-
-// Test for Rollback mechanism for put. Ticket #303
-
-void createAuthzRegion() {
-  initCredentialGenerator();
-  initClientAuth('A');
-  auto regPtr = createOverflowRegion(regionNamesAuth[0], false, 1);
-  ASSERT(regPtr != nullptr, "Failed to create region.");
-  LOG("Region created.");
-}
-DUNIT_TASK_DEFINITION(SERVER, StartServer1)
-  {
-    initCredentialGenerator();
-    std::string cmdServerAuthenticator;
-
-    if (isLocalServer) {
-      cmdServerAuthenticator = credentialGeneratorHandler->getServerCmdParams(
-          "authenticator:dummy", getXmlPath());
-      printf("string %s", cmdServerAuthenticator.c_str());
-      CacheHelper::initServer(
-          1, "cacheserver_notify_subscription.xml", locHostPort,
-          const_cast<char*>(cmdServerAuthenticator.c_str()));
-      LOG("Server1 started");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER, StartLocator)
-  {
-    if (isLocator) {
-      CacheHelper::initLocator(1);
-      LOG("Locator1 started");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StartClient1)
-  {
-    createAuthzRegion();
-    LOG("CLIENT1 started");
-  }
-END_TASK_DEFINITION
-// check that tracking work correctly with put.
-DUNIT_TASK_DEFINITION(CLIENT1, PutAndVerification)
-  {
-    auto rptr = getHelper()->getRegion(regionNamesAuth[0]);
-    rptr->put("key-1", "client1-value1");
-    rptr->put("key-2", "client1-value2");
-    rptr->put("key-3", "client1-value3");
-    try {
-      rptr->put("invalidkey-1", "client1-Invalidvalue1");
-      LOG(" Put Operation Successful");
-      FAIL("Should have got NotAuthorizedException during put");
-    }
-    HANDLE_NOT_AUTHORIZED_EXCEPTION
-    ASSERT(rptr->containsKey("invalidkey-1") == false,
-           "Key should not be found in region.");
-    ASSERT(rptr->containsKey("key-1") == true,
-           "Key key-1 should be found in region.");
-    ASSERT(rptr->containsKey("key-2") == true,
-           "Key key-2 should be found in region.");
-    ASSERT(rptr->containsKey("key-3") == true,
-           "Key key-3 should be found in region.");
-    LOG("PutAndVerification completed");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(SERVER, CloseServer1)
-  {
-    SLEEP(2000);
-    if (isLocalServer) {
-      CacheHelper::closeServer(1);
-      LOG("SERVER1 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER, CloseLocator)
-  {
-    if (isLocator) {
-      CacheHelper::closeLocator(1);
-      LOG("Locator1 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, CloseClient1)
-  { cleanProc(); }
-END_TASK_DEFINITION
-DUNIT_MAIN
-  {
-    CALL_TASK(StartLocator);
-    CALL_TASK(StartServer1);
-    CALL_TASK(StartClient1);
-    CALL_TASK(PutAndVerification);
-    CALL_TASK(CloseClient1);
-    CALL_TASK(CloseServer1);
-    CALL_TASK(CloseLocator);
-  }
-END_MAIN
diff --git a/cppcache/integration-test/testThinClientTicket304.cpp b/cppcache/integration-test/testThinClientTicket304.cpp
deleted file mode 100644
index 6953116..0000000
--- a/cppcache/integration-test/testThinClientTicket304.cpp
+++ /dev/null
@@ -1,211 +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.
- */
-
-#define ROOT_NAME "testThinClientTicket304"
-
-#include "ThinClientSecurityHelper.hpp"
-
-#define SERVER s1p1
-#define CLIENT1 s1p2
-#define CLIENT2 s2p1
-
-// This is the test for tracking work. bug#304
-
-putThread *thread1 = nullptr;
-
-void createAuthzRegion() {
-  initCredentialGenerator();
-  initClientAuth('A');
-  createRegion(regionNamesAuth[0], false, true);
-}
-DUNIT_TASK_DEFINITION(SERVER, StartServer1)
-  {
-    initCredentialGenerator();
-    std::string cmdServerAuthenticator;
-
-    if (isLocalServer) {
-      cmdServerAuthenticator = credentialGeneratorHandler->getServerCmdParams(
-          "authenticator", getXmlPath());
-      printf("string %s", cmdServerAuthenticator.c_str());
-      cmdServerAuthenticator += std::string(
-          " --J=-Dgemfire.security-client-accessor-pp=javaobject."
-          "DummyAuthorization.create");
-      CacheHelper::initServer(
-          1, "cacheserver_notify_subscription.xml", locHostPort,
-          const_cast<char *>(cmdServerAuthenticator.c_str()));
-      LOG("Server1 started");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER, StartLocator)
-  {
-    if (isLocator) {
-      CacheHelper::initLocator(1);
-      LOG("Locator1 started");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StartClient1)
-  {
-    createAuthzRegion();
-    LOG("CLIENT1 started");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT2, StartClient2)
-  {
-    createAuthzRegion();
-    LOG("CLIENT2 started");
-  }
-END_TASK_DEFINITION
-// check that tracking works correctly with put.
-DUNIT_TASK_DEFINITION(CLIENT1, PutOnClient1)
-  {
-    auto rptr = getHelper()->getRegion(regionNamesAuth[0]);
-    rptr->put("key-1", "client1-value1");
-    rptr->put("key-2", "client1-value2");
-    rptr->put("key-3", "client1-value3");
-    LOG("PutOnClient1 completed");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT2, RegisterInterestAllOnClient2)
-  {
-    auto rptr = getHelper()->getRegion(regionNamesAuth[0]);
-    thread1 = new putThread(rptr, true);
-    thread1->start();
-    LOG("RegisterInterest started on client 2");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT1, DestroyEntryOnClient1)
-  {
-    auto rptr = getHelper()->getRegion(regionNamesAuth[0]);
-    rptr->destroy("key-3");
-    LOG("DestroyEntryOnClient1 completed");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT1, VerifyOnClient1)
-  {
-    verifyEntry(regionNamesAuth[0], "key-1", "client1-value1");
-    verifyEntry(regionNamesAuth[0], "key-2", "client1-value2");
-    verifyDestroyed(regionNamesAuth[0], "key-3");
-    LOG("VerifyOnClient1 completed");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT2, VerifyOnClient2)
-  {
-    thread1->stop();
-    delete thread1;
-    SLEEP(5000);
-    verifyEntry(regionNamesAuth[0], "key-1", "client1-value1");
-    verifyEntry(regionNamesAuth[0], "key-2", "client1-value2");
-    verifyDestroyed(regionNamesAuth[0], "key-3");
-    auto rptr = getHelper()->getRegion(regionNamesAuth[0]);
-    rptr->localDestroyRegion();
-    LOG("VerifyOnClient2 completed");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT2, RegisterInterestKeysOnClient2)
-  {
-    auto rptr = getHelper()->getRegion(regionNamesAuth[0]);
-    thread1 = new putThread(rptr);
-    thread1->setParams(5, 3, 1);
-    thread1->start();
-    LOG("RegisterInterestKeys started on client 2");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT2, RegisterRegexClient2)
-  {
-    auto rptr = getHelper()->getRegion(regionNamesAuth[0]);
-    thread1 = new putThread(rptr);
-    thread1->setParams(6, 3, 1);
-    thread1->start();
-    LOG("RegisterRegex started on client 2");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT1, CreateRegionOnClient1)
-  ;
-  {
-    auto rptr = getHelper()->getRegion(regionNamesAuth[0]);
-    rptr->localDestroyRegion();
-    SLEEP(10000);
-    createRegion(regionNamesAuth[0], false, true);
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT2, CreateRegionOnClient2)
-  ;
-  {
-    SLEEP(10000);
-    createRegion(regionNamesAuth[0], false, true);
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(SERVER, CloseServer1)
-  {
-    SLEEP(2000);
-    if (isLocalServer) {
-      CacheHelper::closeServer(1);
-      LOG("SERVER1 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER, CloseLocator)
-  {
-    if (isLocator) {
-      CacheHelper::closeLocator(1);
-      LOG("Locator1 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, CloseClient1)
-  { cleanProc(); }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT2, CloseClient2)
-  { cleanProc(); }
-END_TASK_DEFINITION
-DUNIT_MAIN
-  {
-    CALL_TASK(StartLocator);
-    CALL_TASK(StartServer1);
-    CALL_TASK(StartClient1);
-    CALL_TASK(StartClient2);
-    CALL_TASK(PutOnClient1);
-    CALL_TASK(RegisterInterestAllOnClient2);
-    CALL_TASK(DestroyEntryOnClient1);
-    CALL_TASK(VerifyOnClient1);
-    CALL_TASK(VerifyOnClient2);
-    CALL_TASK(CreateRegionOnClient1);
-    CALL_TASK(CreateRegionOnClient2);
-    CALL_TASK(PutOnClient1);
-    CALL_TASK(RegisterInterestKeysOnClient2);
-    CALL_TASK(DestroyEntryOnClient1);
-    CALL_TASK(VerifyOnClient1);
-    CALL_TASK(VerifyOnClient2);
-    CALL_TASK(CreateRegionOnClient1);
-    CALL_TASK(CreateRegionOnClient2);
-    CALL_TASK(PutOnClient1);
-    CALL_TASK(RegisterRegexClient2);
-    CALL_TASK(DestroyEntryOnClient1);
-    CALL_TASK(VerifyOnClient1);
-    CALL_TASK(VerifyOnClient2);
-    CALL_TASK(CloseClient1);
-    CALL_TASK(CloseClient2);
-    CALL_TASK(CloseServer1);
-    CALL_TASK(CloseLocator);
-  }
-END_MAIN
diff --git a/cppcache/integration-test/testThinClientTracking.cpp b/cppcache/integration-test/testThinClientTracking.cpp
deleted file mode 100644
index 0bd61fd..0000000
--- a/cppcache/integration-test/testThinClientTracking.cpp
+++ /dev/null
@@ -1,270 +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.
- */
-
-#define ROOT_NAME "testThinClientTracking"
-
-#include "ThinClientSecurityHelper.hpp"
-
-#define SERVER s1p1
-#define CLIENT1 s1p2
-#define CLIENT2 s2p1
-
-// This is the test for tracking work.
-
-putThread *thread1 = nullptr;
-putThread *thread2 = nullptr;
-
-void createAuthzRegion() {
-  initCredentialGenerator();
-  initClientAuth('A');
-  std::shared_ptr<Region> rptr;
-  createRegion(regionNamesAuth[0], false, true);
-  rptr = getHelper()->getRegion(regionNamesAuth[0]);
-  rptr->registerAllKeys();
-}
-void verifyEntry(const char *value) {
-  auto rptr = getHelper()->getRegion(regionNamesAuth[0]);
-  auto entry = rptr->getEntry("key-1");
-  ASSERT(entry != nullptr, "Key should have been found in region.");
-  auto valuePtr = std::dynamic_pointer_cast<CacheableString>(entry->getValue());
-  char buf1[1024];
-
-  if (valuePtr == nullptr) {
-    FAIL("Value was null.");
-  }
-  sprintf(buf1, "value for key-1 is %s", valuePtr->value().c_str());
-  LOG(buf1);
-  ASSERT(strcmp(valuePtr->value().c_str(), value) == 0,
-         "Updated value not found in region.");
-}
-DUNIT_TASK_DEFINITION(SERVER, StartServer1)
-  {
-    initCredentialGenerator();
-    std::string cmdServerAuthenticator;
-
-    if (isLocalServer) {
-      cmdServerAuthenticator = credentialGeneratorHandler->getServerCmdParams(
-          "authenticator:dummy", getXmlPath());
-      printf("string %s", cmdServerAuthenticator.c_str());
-      CacheHelper::initServer(
-          1, "cacheserver_notify_subscription.xml", locHostPort,
-          const_cast<char *>(cmdServerAuthenticator.c_str()));
-      LOG("Server1 started");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER, StartLocator)
-  {
-    if (isLocator) {
-      CacheHelper::initLocator(1);
-      LOG("Locator1 started");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StartClient1)
-  {
-    createAuthzRegion();
-    LOG("CLIENT1 started");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT2, StartClient2)
-  {
-    createAuthzRegion();
-    LOG("CLIENT2 started");
-  }
-END_TASK_DEFINITION
-// check that tracking work correctly with put.
-DUNIT_TASK_DEFINITION(CLIENT1, PutOnClient1)
-  {
-    auto rptr = getHelper()->getRegion(regionNamesAuth[0]);
-    thread1 = new putThread(rptr);
-    thread1->setParams(0, 1, 1, true);
-    thread1->start();
-    LOG("PutOnClient1 completed");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT2, PutOnClient2)
-  {
-    auto rptr = getHelper()->getRegion(regionNamesAuth[0]);
-    thread2 = new putThread(rptr);
-    thread2->setParams(0, 1, 1);
-    thread2->start();
-    thread2->stop();
-    delete thread2;
-    LOG("PutOnClient2 completed");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT1, VerifyOnClient1)
-  {
-    verifyEntry("client2-value1");
-    LOG("VerifyOnClient1 completed");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT2, VerifyOnClient2)
-  {
-    SLEEP(5000);
-    verifyEntry("client2-value1");
-    LOG("VerifyOnClient2 completed");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT1, VerifyOnClient12)
-  {
-    thread1->stop();
-    delete thread1;
-    verifyEntry("client2-value1");
-
-    LOG("VerifyOnClient12 completed");
-  }
-END_TASK_DEFINITION
-// check that tracking work correctly with destroy.
-DUNIT_TASK_DEFINITION(CLIENT1, DestroyOnClient1)
-  {
-    auto rptr = getHelper()->getRegion(regionNamesAuth[0]);
-    thread1 = new putThread(rptr);
-    thread1->setParams(0, 1, 1, true);
-    thread1->start();
-    LOG("DestroyOnClient1 completed");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT2, DestroyOnClient2)
-  {
-    auto rptr = getHelper()->getRegion(regionNamesAuth[0]);
-    thread2 = new putThread(rptr);
-    thread2->setParams(2, 1, 1);
-    thread2->start();
-    thread2->stop();
-    delete thread2;
-    LOG("DestroyOnClient2 completed");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT1, VerifyDestroyOnClient1)
-  {
-    verifyDestroyed(regionNamesAuth[0], "key-1");
-    LOG("VerifyDestroyOnClient1 completed");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT2, VerifyDestroyOnClient2)
-  {
-    SLEEP(5000);
-    verifyDestroyed(regionNamesAuth[0], "key-1");
-    LOG("VerifyDestroyOnClient2 completed");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT1, VerifyDestroyOnClient12)
-  {
-    thread1->stop();
-    delete thread1;
-    verifyDestroyed(regionNamesAuth[0], "key-1");
-    LOG("VerifyDestroyOnClient12 completed");
-  }
-END_TASK_DEFINITION
-// check that Conversion from Tracked Map Entry and back work correctly
-DUNIT_TASK_DEFINITION(CLIENT1, PutTrackedMapOnClient1)
-  {
-    auto rptr = getHelper()->getRegion(regionNamesAuth[0]);
-    thread1 = new putThread(rptr);
-    thread1->setParams(0, 1, 1, true);
-    thread1->start();
-    LOG("PutTrackedMapOnClient1 completed");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT2, PutTrackedMapOnClient2)
-  {
-    auto rptr = getHelper()->getRegion(regionNamesAuth[0]);
-    thread2 = new putThread(rptr);
-    thread2->setParams(0, 10, 1, false, true);
-    thread2->start();
-    thread2->stop();
-    delete thread2;
-    verifyEntry("client2-value10");
-    LOG("PutTrackedMapOnClient2 completed");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT1, VerifyTrackedMapOnClient1)
-  {
-    verifyEntry("client2-value10");
-    LOG("VerifyTrackedMapOnClient1 completed");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT2, VerifyTrackedMapOnClient2)
-  {
-    verifyEntry("client2-value10");
-    LOG("VerifyTrackedMapOnClient2 completed");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT1, VerifyTrackedMapOnClient12)
-  {
-    thread1->stop();
-    delete thread1;
-    verifyEntry("client2-value10");
-    LOG("VerifyTrackedMapOnClient12 completed");
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(SERVER, CloseServer1)
-  {
-    SLEEP(2000);
-    if (isLocalServer) {
-      CacheHelper::closeServer(1);
-      LOG("SERVER1 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(SERVER, CloseLocator)
-  {
-    if (isLocator) {
-      CacheHelper::closeLocator(1);
-      LOG("Locator1 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, CloseClient1)
-  { cleanProc(); }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT2, CloseClient2)
-  { cleanProc(); }
-END_TASK_DEFINITION
-DUNIT_MAIN
-  {
-    CALL_TASK(StartLocator);
-    CALL_TASK(StartServer1);
-    CALL_TASK(StartClient1);
-    CALL_TASK(StartClient2);
-    CALL_TASK(PutOnClient1);
-    CALL_TASK(PutOnClient2);
-    CALL_TASK(VerifyOnClient1);
-    CALL_TASK(VerifyOnClient2);
-    CALL_TASK(VerifyOnClient12);
-    CALL_TASK(DestroyOnClient1);
-    CALL_TASK(DestroyOnClient2);
-    CALL_TASK(VerifyDestroyOnClient1);
-    CALL_TASK(VerifyDestroyOnClient2);
-    CALL_TASK(VerifyDestroyOnClient12);
-    CALL_TASK(PutTrackedMapOnClient1);
-    CALL_TASK(PutTrackedMapOnClient2);
-    CALL_TASK(VerifyTrackedMapOnClient1);
-    CALL_TASK(VerifyTrackedMapOnClient2);
-    CALL_TASK(VerifyTrackedMapOnClient12);
-    CALL_TASK(CloseClient1);
-    CALL_TASK(CloseClient2);
-    CALL_TASK(CloseServer1);
-    CALL_TASK(CloseLocator);
-  }
-END_MAIN
diff --git a/cppcache/integration-test/testThinClientTransactionsXA.cpp b/cppcache/integration-test/testThinClientTransactionsXA.cpp
index 547ed3a..9fa71eb 100644
--- a/cppcache/integration-test/testThinClientTransactionsXA.cpp
+++ b/cppcache/integration-test/testThinClientTransactionsXA.cpp
@@ -18,8 +18,5 @@
 #include "ThinClientTransactionsXA.hpp"
 
 DUNIT_MAIN
-  {
-    runTransactionOps(false);
-    runTransactionOps(true);
-  }
+  { runTransactionOps(); }
 END_MAIN
diff --git a/cppcache/integration-test/testThinClientWriterException.cpp b/cppcache/integration-test/testThinClientWriterException.cpp
deleted file mode 100644
index 95277ed..0000000
--- a/cppcache/integration-test/testThinClientWriterException.cpp
+++ /dev/null
@@ -1,261 +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.
- */
-#include "fw_dunit.hpp"
-#include "ThinClientHelper.hpp"
-#include <ace/Process.h>
-#include "TallyListener.hpp"
-#include "TallyWriter.hpp"
-
-#include "ThinClientSecurity.hpp"
-
-/*
-   1. Using client with security enable.
-   2. Check that writer is invoked and listener is not invoked on the client and
-   no data in local region after the failure.
-   3. Check if writer fails for any key the cache writer exception is beimg
-   thrown and no data in local region.
-   4. test also check the localput operation.
-*/
-
-using apache::geode::client::testframework::security::CredentialGenerator;
-using apache::geode::client::testframework::security::OP_CONTAINS_KEY;
-using apache::geode::client::testframework::security::OP_GET;
-using apache::geode::client::testframework::security::OP_KEY_SET;
-using apache::geode::client::testframework::security::OP_REGISTER_INTEREST;
-using apache::geode::client::testframework::security::OP_UNREGISTER_INTEREST;
-using apache::geode::client::testframework::security::opCodeList;
-
-using apache::geode::client::testing::TallyListener;
-using apache::geode::client::testing::TallyWriter;
-
-std::shared_ptr<TallyListener> regListener;
-std::shared_ptr<TallyWriter> regWriter;
-
-const char *locHostPort =
-    CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
-
-const char *regionNamesAuth[] = {"DistRegionAck"};
-std::shared_ptr<CredentialGenerator> credentialGeneratorHandler;
-
-std::string getXmlPath() {
-  char xmlPath[1000] = {'\0'};
-  const char *path = ACE_OS::getenv("TESTSRC");
-  ASSERT(path != nullptr,
-         "Environment variable TESTSRC for test source directory is not set.");
-  strncpy(xmlPath, path, strlen(path) - strlen("cppcache"));
-  strncat(xmlPath, "xml/Security/", sizeof(xmlPath) - strlen(xmlPath) - 1);
-  return std::string(xmlPath);
-}
-
-void initCredentialGenerator() {
-  static int loopNum = 1;
-
-  switch (loopNum) {
-    case 1: {
-      credentialGeneratorHandler = CredentialGenerator::create("DUMMY");
-      break;
-    }
-    case 2: {
-      credentialGeneratorHandler = CredentialGenerator::create("LDAP");
-      break;
-    }
-    default:
-    case 3: {
-      credentialGeneratorHandler = CredentialGenerator::create("PKCS");
-      break;
-    }
-  }
-
-  if (credentialGeneratorHandler == nullptr) {
-    FAIL("credentialGeneratorHandler is nullptr");
-  }
-
-  loopNum++;
-  if (loopNum > 2) loopNum = 1;
-}
-
-opCodeList::value_type tmpRArr[] = {OP_GET, OP_REGISTER_INTEREST,
-                                    OP_UNREGISTER_INTEREST, OP_KEY_SET,
-                                    OP_CONTAINS_KEY};
-
-#define HANDLE_NOT_AUTHORIZED_EXCEPTION                           \
-  catch (const apache::geode::client::NotAuthorizedException &) { \
-    LOG("NotAuthorizedException Caught");                         \
-    LOG("Success");                                               \
-  }                                                               \
-  catch (const apache::geode::client::Exception &other) {         \
-    LOG(other.getStackTrace());                                   \
-    FAIL(other.what());                                           \
-  }
-
-#define HANDLE_CACHEWRITER_EXCEPTION                            \
-  catch (const apache::geode::client::CacheWriterException &) { \
-    LOG("CacheWriterException  Caught");                        \
-    LOG("Success");                                             \
-  }
-
-#define ADMIN_CLIENT s1p1
-#define READER_CLIENT s2p1
-
-void initClientAuth() {
-  auto config = Properties::create();
-  opCodeList rt(tmpRArr, tmpRArr + sizeof tmpRArr / sizeof *tmpRArr);
-  credentialGeneratorHandler->getAuthInit(config);
-  credentialGeneratorHandler->getAllowedCredentialsForOps(rt, config, nullptr);
-  printf("User is %s Pass is %s ",
-         config->find("security-username")->value().c_str(),
-         (config->find("security-password") != nullptr
-              ? config->find("security-password")->value().c_str()
-              : " not set"));
-  try {
-    initClient(true, config);
-  } catch (...) {
-    throw;
-  }
-}
-
-void setCacheWriter(const char *regName,
-                    std::shared_ptr<TallyWriter> tallyWriter) {
-  auto reg = getHelper()->getRegion(regName);
-  auto attrMutator = reg->getAttributesMutator();
-  attrMutator->setCacheWriter(tallyWriter);
-}
-
-DUNIT_TASK_DEFINITION(ADMIN_CLIENT, StartServer1)
-  {
-    initCredentialGenerator();
-    std::string cmdServerAuthenticator;
-
-    if (isLocalServer) {
-      cmdServerAuthenticator = credentialGeneratorHandler->getServerCmdParams(
-          "authenticator:authorizer", getXmlPath());
-      printf("string %s", cmdServerAuthenticator.c_str());
-      CacheHelper::initServer(
-          1, "cacheserver_notify_subscription.xml", locHostPort,
-          const_cast<char *>(cmdServerAuthenticator.c_str()));
-      LOG("Server1 started");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(ADMIN_CLIENT, StartLocator)
-  {
-    if (isLocator) {
-      CacheHelper::initLocator(1);
-      LOG("Locator1 started");
-    }
-  }
-END_TASK_DEFINITION
-
-void startClient() {
-  initCredentialGenerator();
-  initClientAuth();
-  std::shared_ptr<Region> rptr;
-  char buf[100];
-  int i = 102;
-  LOG("Creating region in READER_CLIENT , no-ack, no-cache, with-listener and "
-      "writer");
-  regListener = std::make_shared<TallyListener>();
-  createRegionForSecurity(regionNamesAuth[0], false, true, regListener);
-  regWriter = std::make_shared<TallyWriter>();
-  setCacheWriter(regionNamesAuth[0], regWriter);
-  rptr = getHelper()->getRegion(regionNamesAuth[0]);
-  rptr->registerAllKeys();
-  sprintf(buf, "%s: %d", rptr->getName().c_str(), i);
-  auto key = CacheableKey::create(buf);
-  sprintf(buf, "testUpdate::%s: value of %d", rptr->getName().c_str(), i);
-  auto valuePtr = buf;
-  try {
-    LOG("Trying put Operation");
-    rptr->put(key, valuePtr);
-    LOG(" Put Operation Successful");
-    FAIL("Should have got NotAuthorizedException during put");
-  }
-  HANDLE_NOT_AUTHORIZED_EXCEPTION
-  ASSERT(regWriter->isWriterInvoked() == true, "Writer Should be invoked");
-  ASSERT(regListener->isListenerInvoked() == false,
-         "Listener Should not be invoked");
-  ASSERT(!rptr->containsKey(key),
-         "Key should not have been found in the region");
-  rptr->localPut(keys[2], vals[2]);
-  ASSERT(rptr->containsKey(keys[2]),
-         "Key should have been found in the region");
-  ASSERT(regWriter->isWriterInvoked() == true, "Writer Should be invoked");
-  ASSERT(regListener->isListenerInvoked() == true,
-         "Listener Should be invoked");
-  try {
-    LOG("Trying updateEntry");
-    regListener->resetListnerInvokation();
-    updateEntry(regionNamesAuth[0], keys[2], nvals[2], false, false);
-    FAIL("Should have got NotAuthorizedException during updateEntry");
-  }
-  HANDLE_NOT_AUTHORIZED_EXCEPTION
-  ASSERT(regWriter->isWriterInvoked() == true, "Writer Should be invoked");
-  ASSERT(regListener->isListenerInvoked() == false,
-         "Listener Should not be invoked");
-  ASSERT(rptr->containsKey(keys[2]),
-         "Key should have been found in the region");
-  verifyEntry(regionNamesAuth[0], keys[2], vals[2]);
-  regWriter->setWriterFailed();
-  try {
-    LOG("Testing CacheWriterException");
-    updateEntry(regionNamesAuth[0], keys[2], nvals[2], false, false);
-    FAIL("Should have got NotAuthorizedException during updateEntry");
-  }
-  HANDLE_CACHEWRITER_EXCEPTION
-  LOG("StepThree complete.");
-}
-
-DUNIT_TASK_DEFINITION(READER_CLIENT, StartClientPoolLocator)
-  { startClient(); }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(ADMIN_CLIENT, CloseServer1)
-  {
-    SLEEP(9000);
-    if (isLocalServer) {
-      CacheHelper::closeServer(1);
-      LOG("SERVER1 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(ADMIN_CLIENT, CloseLocator)
-  {
-    if (isLocator) {
-      CacheHelper::closeLocator(1);
-      LOG("Locator1 stopped");
-    }
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(READER_CLIENT, CloseCacheReader)
-  { cleanProc(); }
-END_TASK_DEFINITION
-
-void doThinClientWriterException() {
-  CALL_TASK(StartLocator);
-  CALL_TASK(StartServer1);
-  CALL_TASK(StartClientPoolLocator);
-  CALL_TASK(CloseCacheReader);
-  CALL_TASK(CloseServer1);
-  CALL_TASK(CloseLocator);
-}
-
-DUNIT_MAIN
-  { doThinClientWriterException(); }
-END_MAIN
diff --git a/cppcache/integration-test/testTimedSemaphore.cpp b/cppcache/integration-test/testTimedSemaphore.cpp
deleted file mode 100644
index f559e59..0000000
--- a/cppcache/integration-test/testTimedSemaphore.cpp
+++ /dev/null
@@ -1,140 +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.
- */
-
-#include "fw_helper.hpp"
-#include <ace/Synch.h>
-
-class ThreadAcquire : public ACE_Task_Base {
- public:
-  ThreadAcquire(ACE_Thread_Semaphore &sema, int acquireSecs)
-      : ACE_Task_Base(),
-        m_sema(sema),
-        m_acquireSecs(acquireSecs),
-        m_status(0) {}
-
-  int svc() {
-    ACE_Time_Value start = ACE_OS::gettimeofday();
-    ACE_Time_Value interval(m_acquireSecs, 0);  // 10 seconds
-    ACE_Time_Value expireAt = start + interval;
-
-    printf("Thread acquiring lock at %ld msecs.\n", start.msec());
-    if (m_sema.acquire(expireAt) == 0) {
-      interval = ACE_OS::gettimeofday() - start;
-      printf("Thread acquired lock after %ld msecs.\n", interval.msec());
-      m_status = 0;
-    } else {
-      interval = ACE_OS::gettimeofday() - start;
-      printf("Thread failed to acquire lock after %ld msecs.\n",
-             interval.msec());
-      m_status = -1;
-    }
-    return m_status;
-  }
-
-  int getStatus() { return m_status; }
-
- private:
-  ACE_Thread_Semaphore &m_sema;
-  int m_acquireSecs;
-  int m_status;
-};
-
-BEGIN_TEST(CheckTimedAcquire)
-  {
-    ACE_Thread_Semaphore sema(1);
-    ThreadAcquire *thread = new ThreadAcquire(sema, 10);
-
-    sema.acquire();
-    thread->activate();
-
-    LOG("Sleeping for 8 secs.");
-    ACE_OS::sleep(8);
-    ASSERT(thread->thr_count() == 1, "Expected thread to be running.");
-    sema.release();
-    SLEEP(50);  // Sleep for a few millis for the thread to end.
-    ASSERT(thread->thr_count() == 0, "Expected no thread to be running.");
-    ASSERT(thread->wait() == 0, "Expected successful end of thread.");
-    ASSERT(thread->getStatus() == 0, "Expected zero exit status from thread.");
-
-    delete thread;
-  }
-END_TEST(CheckTimedAcquire)
-
-BEGIN_TEST(CheckTimedAcquireFail)
-  {
-    ACE_Thread_Semaphore sema(0);
-    ThreadAcquire *thread = new ThreadAcquire(sema, 10);
-
-    thread->activate();
-
-    LOG("Sleeping for 8 secs.");
-    ACE_OS::sleep(8);
-    ASSERT(thread->thr_count() == 1, "Expected thread to be running.");
-    ACE_OS::sleep(3);
-    ASSERT(thread->thr_count() == 0, "Expected no thread to be running.");
-    ASSERT(thread->wait() == 0, "Expected successful end of thread.");
-    ASSERT(thread->getStatus() == -1,
-           "Expected non-zero exit status from thread.");
-
-    delete thread;
-  }
-END_TEST(CheckTimedAcquireFail)
-
-BEGIN_TEST(CheckNoWait)
-  {
-    ACE_Thread_Semaphore sema(0);
-    ThreadAcquire *thread = new ThreadAcquire(sema, 10);
-
-    sema.release();
-    thread->activate();
-
-    ACE_OS::sleep(1);
-    ASSERT(thread->thr_count() == 0, "Expected no thread to be running.");
-    ASSERT(thread->wait() == 0, "Expected successful end of thread.");
-    ASSERT(thread->getStatus() == 0, "Expected zero exit status from thread.");
-
-    delete thread;
-  }
-END_TEST(CheckNoWait)
-
-BEGIN_TEST(CheckResetAndTimedAcquire)
-  {
-    ACE_Thread_Semaphore sema(1);
-    ThreadAcquire *thread = new ThreadAcquire(sema, 10);
-
-    sema.acquire();
-    ACE_OS::sleep(1);
-    sema.release();
-    sema.release();
-    sema.release();
-    while (sema.tryacquire() != -1) {
-      ;
-    }
-    thread->activate();
-
-    LOG("Sleeping for 8 secs.");
-    ACE_OS::sleep(8);
-    ASSERT(thread->thr_count() == 1, "Expected thread to be running.");
-    sema.release();
-    SLEEP(50);  // Sleep for a few millis for the thread to end.
-    ASSERT(thread->thr_count() == 0, "Expected no thread to be running.");
-    ASSERT(thread->wait() == 0, "Expected successful end of thread.");
-    ASSERT(thread->getStatus() == 0, "Expected zero exit status from thread.");
-
-    delete thread;
-  }
-END_TEST(CheckResetAndTimedAcquire)
diff --git a/cppcache/integration-test/testUtils.hpp b/cppcache/integration-test/testUtils.hpp
index 90d3b58..432dc11 100644
--- a/cppcache/integration-test/testUtils.hpp
+++ b/cppcache/integration-test/testUtils.hpp
@@ -20,10 +20,14 @@
 #ifndef GEODE_INTEGRATION_TEST_TESTUTILS_H_
 #define GEODE_INTEGRATION_TEST_TESTUTILS_H_
 
+#include <sstream>
+#include <iomanip>
+
 /* use CacheHelper to gain the impl pointer from cache or region object
  */
 
 #include <CacheRegionHelper.hpp>
+#include <geode/CacheableBuiltins.hpp>
 
 #ifdef _WIN32
 // ???
@@ -40,11 +44,12 @@
 #include <DistributedSystemImpl.hpp>
 #include <CacheImpl.hpp>
 
-namespace { // NOLINT(google-build-namespaces)
+namespace {  // NOLINT(google-build-namespaces)
 
 using apache::geode::client::Cache;
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
+using apache::geode::client::CacheableVector;
 using apache::geode::client::CacheImpl;
 using apache::geode::client::CacheRegionHelper;
 using apache::geode::client::Region;
@@ -126,65 +131,71 @@
     } while ((val != expected) && (tries < maxTry));
     return val;
   }
+
   static void showKeys(std::shared_ptr<Region>& rptr) {
-    char buf[2048];
-    if (rptr == nullptr) {
-      sprintf(buf, "this region does not exist!\n");
-      LOG(buf);
-      return;
+    if (!rptr) {
+      LOG("this region does not exist!\n");
     }
     std::vector<std::shared_ptr<CacheableKey>> v = rptr->keys();
     auto len = v.size();
-    sprintf(buf, "Total keys in region %s : %zu\n", rptr->getName().c_str(),
-            len);
-    LOG(buf);
+    LOG(std::string("Total keys in region ") + rptr->getName() + " : " +
+        std::to_string(len));
     for (uint32_t i = 0; i < len; i++) {
-      sprintf(buf, "key[%u] = '%s'\n", i,
-              (v[i] == nullptr) ? "nullptr KEY" : v[i]->toString().c_str());
-      LOG(buf);
+      LOG(std::string("key[") + std::to_string(i) + "] = '" +
+          (v[i] == nullptr ? "nullptr KEY" : v[i]->toString()) + "'");
     }
   }
+
   static void showKeyValues(std::shared_ptr<Region>& rptr) {
-    char buf[2048];
-    if (rptr == nullptr) {
-      sprintf(buf, "this region does not exist!\n");
-      LOG(buf);
-      return;
+    if (!rptr) {
+      LOG("this region does not exist!\n");
     }
     std::vector<std::shared_ptr<CacheableKey>> v = rptr->keys();
     auto len = v.size();
-    sprintf(buf, "Total keys in region %s : %zu\n", rptr->getName().c_str(),
-            len);
-    LOG(buf);
+    LOG(std::string("Total keys in region ") + rptr->getName() + " : " +
+        std::to_string(len));
     for (uint32_t i = 0; i < len; i++) {
+      std::stringstream strm;
       auto keyPtr = v[i];
       auto valPtr =
           std::dynamic_pointer_cast<CacheableString>(rptr->get(keyPtr));
-      sprintf(buf, "key[%u] = '%s', value[%u]='%s'\n", i,
-              (keyPtr == nullptr) ? "nullptr KEY" : keyPtr->toString().c_str(),
-              i, (valPtr == nullptr) ? "NULL_VALUE" : valPtr->value().c_str());
-      LOG(buf);
+      strm << "key[" << i << "]='"
+           << (keyPtr == nullptr ? "nullptr KEY" : keyPtr->toString())
+           << "', value[" << i << "]='"
+           << (valPtr == nullptr ? "NULL_VALUE" : valPtr->value()) << "'";
+      LOG(strm.str());
     }
   }
   static void showValues(std::shared_ptr<Region>& rptr) {
-    char buf[2048];
-    if (rptr == nullptr) {
-      sprintf(buf, "this region does not exist!\n");
-      LOG(buf);
-      return;
+    if (!rptr) {
+      LOG("this region does not exist!\n");
     }
     auto v = rptr->values();
     auto len = v.size();
-    sprintf(buf, "Total values in region %s : %zu\n", rptr->getName().c_str(),
-            len);
-    LOG(buf);
+    LOG(std::string("Total values in region ") + rptr->getName() + " : " +
+        std::to_string(len));
     for (size_t i = 0; i < len; i++) {
       auto value = std::dynamic_pointer_cast<CacheableString>(v[i]);
-      sprintf(buf, "value[%zu] = '%s'\n", i,
-              (value == nullptr) ? "nullptr VALUE" : value->value().c_str());
-      LOG(buf);
+      LOG(std::string("value[") + std::to_string(i) + "] = '" +
+          (v[i] == nullptr ? "nullptr VALUE" : value->value()) + "'");
     }
   }
+
+  static std::string zeroPaddedStringFromInt(int32_t number, uint16_t width) {
+    std::ostringstream strm;
+    strm << std::setw(width) << std::setfill('0') << number;
+    return strm.str();
+  }
+
+  static void verifyGetResults(const CacheableVector* resultList, int index) {
+    auto expected = std::string("VALUE--") + std::to_string((index * 2) + 1);
+    auto actual = std::dynamic_pointer_cast<CacheableString>(
+                      resultList->operator[](index))
+                      ->value();
+    auto msg = std::string("Failed to find the value 'VALUE--") +
+               +"' in the result list.";
+    ASSERT(expected == actual, msg);
+  }
 };
 }  // namespace unitTests
 
diff --git a/cppcache/integration-test/testXmlCacheCreationWithOverFlow.cpp b/cppcache/integration-test/testXmlCacheCreationWithOverFlow.cpp
index ea9a1b9..d4e0c46 100644
--- a/cppcache/integration-test/testXmlCacheCreationWithOverFlow.cpp
+++ b/cppcache/integration-test/testXmlCacheCreationWithOverFlow.cpp
@@ -36,7 +36,7 @@
   const uint32_t totalSubRegionsRoot1 = 2;
   const uint32_t totalRootRegions = 2;
 
-  char *path = ACE_OS::getenv("TESTSRC");
+  char *path = std::getenv("TESTSRC");
   std::string directory(path);
 
   std::cout << "create DistributedSytem with name=XML_CACHE_CREATION_TEST"
diff --git a/cppcache/integration-test/testXmlCacheCreationWithPools.cpp b/cppcache/integration-test/testXmlCacheCreationWithPools.cpp
index 6a779e6..a5cd921 100644
--- a/cppcache/integration-test/testXmlCacheCreationWithPools.cpp
+++ b/cppcache/integration-test/testXmlCacheCreationWithPools.cpp
@@ -26,8 +26,6 @@
 #include "fw_dunit.hpp"
 
 #define CLIENT1 s1p1
-#define SERVER1 s2p1
-#define SERVER2 s2p2
 
 #include "CacheHelper.hpp"
 
@@ -41,12 +39,9 @@
 static bool isLocalServer = false;
 static bool isLocator = false;
 static int numberOfLocators = 1;
-const char *endPoints = nullptr;
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 
-#include "LocatorHelper.hpp"
-
 using std::string;
 using std::vector;
 
@@ -93,8 +88,6 @@
                       int updateLocatorListInterval) {
   using apache::geode::internal::chrono::duration::to_string;
 
-  char logmsg[500] = {0};
-
   if (pool == nullptr) {
     LOG("checkPoolAttribs: std::shared_ptr<Pool> is nullptr");
     return false;
@@ -103,9 +96,8 @@
   std::cout << "Checking pool " << pool->getName() << std::endl;
 
   if (pool->getName() != name) {
-    sprintf(logmsg, "checkPoolAttribs: Pool name expected [%s], actual [%s]",
-            name.c_str(), pool->getName().c_str());
-    LOG(logmsg);
+    LOG(std::string("checkPoolAttribs: Pool name expected [") + name +
+        "], actual[" + pool->getName() + "]");
     return false;
   }
   if (!checkStringArray(locators, pool->getLocators())) {
@@ -118,149 +110,115 @@
   }
   if (std::chrono::milliseconds(freeConnectionTimeout) !=
       pool->getFreeConnectionTimeout()) {
-    sprintf(logmsg,
-            "checkPoolAttribs: Pool freeConnectionTimeout expected [%d], "
-            "actual [%" PRId64 "]",
-            freeConnectionTimeout,
-            static_cast<int64_t>(pool->getFreeConnectionTimeout().count()));
-    LOG(logmsg);
+    LOG(std::string("checkPoolAttribs: Pool freeConnectionTimeout expected [") +
+        std::to_string(freeConnectionTimeout) + ", actual[" +
+        std::to_string(pool->getFreeConnectionTimeout().count()) + "]");
     return false;
   }
   if (std::chrono::milliseconds(loadConditioningInterval) !=
       pool->getLoadConditioningInterval()) {
-    sprintf(logmsg,
-            "checkPoolAttribs: Pool loadConditioningInterval expected [%d], "
-            "actual [%" PRId64 "]",
-            loadConditioningInterval,
-            static_cast<int64_t>(pool->getLoadConditioningInterval().count()));
-    LOG(logmsg);
+    LOG(std::string(
+            "checkPoolAttribs: Pool loadConditioningInterval expected [") +
+        std::to_string(loadConditioningInterval) + ", actual[" +
+        std::to_string(pool->getLoadConditioningInterval().count()) + "]");
     return false;
   }
   if (minConnections != pool->getMinConnections()) {
-    sprintf(logmsg,
-            "checkPoolAttribs: Pool minConnections expected [%d], actual [%d]",
-            minConnections, pool->getMinConnections());
-    LOG(logmsg);
+    LOG(std::string("checkPoolAttribs: Pool minConnections expected [") +
+        std::to_string(minConnections) + ", actual[" +
+        std::to_string(pool->getMinConnections()) + "]");
     return false;
   }
   if (maxConnections != pool->getMaxConnections()) {
-    sprintf(logmsg,
-            "checkPoolAttribs: Pool maxConnections expected [%d], actual [%d]",
-            maxConnections, pool->getMaxConnections());
-    LOG(logmsg);
+    LOG(std::string("checkPoolAttribs: Pool maxConnections expected [") +
+        std::to_string(maxConnections) + ", actual[" +
+        std::to_string(pool->getMaxConnections()) + "]");
     return false;
   }
   if (retryAttempts != pool->getRetryAttempts()) {
-    sprintf(logmsg,
-            "checkPoolAttribs: Pool retryAttempts expected [%d], actual [%d]",
-            retryAttempts, pool->getRetryAttempts());
-    LOG(logmsg);
+    LOG(std::string("checkPoolAttribs: Pool retryAttempts expected [") +
+        std::to_string(retryAttempts) + ", actual[" +
+        std::to_string(pool->getRetryAttempts()) + "]");
     return false;
   }
   if (idleTimeout != pool->getIdleTimeout()) {
-    sprintf(logmsg,
-            "checkPoolAttribs: Pool idleTimeout expected [%s], actual [%s]",
-            to_string(idleTimeout).c_str(),
-            to_string(pool->getIdleTimeout()).c_str());
-    LOG(logmsg);
+    LOG(std::string("checkPoolAttribs: Pool idleTimeout expected [") +
+        std::to_string(idleTimeout.count()) + ", actual[" +
+        std::to_string(pool->getIdleTimeout().count()) + "]");
     return false;
   }
   if (std::chrono::milliseconds(pingInterval) != pool->getPingInterval()) {
-    sprintf(
-        logmsg,
-        "checkPoolAttribs: Pool pingInterval expected [%d], actual [%" PRId64
-        "]",
-        pingInterval, static_cast<int64_t>(pool->getPingInterval().count()));
-    LOG(logmsg);
+    LOG(std::string("checkPoolAttribs: Pool pingInterval expected [") +
+        std::to_string(pingInterval) + ", actual[" +
+        std::to_string(pool->getPingInterval().count()) + "]");
     return false;
   }
   if (std::chrono::milliseconds(readTimeout) != pool->getReadTimeout()) {
-    sprintf(logmsg,
-            "checkPoolAttribs: Pool readTimeout expected [%d], actual [%" PRId64
-            "]",
-            readTimeout, static_cast<int64_t>(pool->getReadTimeout().count()));
-    LOG(logmsg);
+    LOG(std::string("checkPoolAttribs: Pool readTimeout expected [") +
+        std::to_string(readTimeout) + ", actual[" +
+        std::to_string(pool->getReadTimeout().count()) + "]");
     return false;
   }
   if (serverGroup != pool->getServerGroup()) {
-    sprintf(logmsg,
-            "checkPoolAttribs: Pool serverGroup expected [%s], actual [%s]",
-            serverGroup.c_str(), pool->getServerGroup().c_str());
-    LOG(logmsg);
+    LOG(std::string("checkPoolAttribs: Pool serverGroup expected [") +
+        serverGroup + ", actual[" + pool->getServerGroup() + "]");
     return false;
   }
   if (socketBufferSize != pool->getSocketBufferSize()) {
-    sprintf(
-        logmsg,
-        "checkPoolAttribs: Pool socketBufferSize expected [%d], actual [%d]",
-        socketBufferSize, pool->getSocketBufferSize());
-    LOG(logmsg);
+    LOG(std::string("checkPoolAttribs: Pool socketBufferSize expected [") +
+        std::to_string(socketBufferSize) + ", actual[" +
+        std::to_string(pool->getSocketBufferSize()) + "]");
     return false;
   }
   if (subscriptionEnabled != pool->getSubscriptionEnabled()) {
-    sprintf(
-        logmsg,
-        "checkPoolAttribs: Pool subscriptionEnabled expected [%s], actual [%s]",
-        subscriptionEnabled ? "true" : "false",
-        pool->getSubscriptionEnabled() ? "true" : "false");
-    LOG(logmsg);
+    LOG(std::string("checkPoolAttribs: Pool subscriptionEnabled expected [") +
+        (subscriptionEnabled ? "true" : "false") +
+        (pool->getSubscriptionEnabled() ? "true" : "false") + "]");
     return false;
   }
   if (std::chrono::milliseconds(subscriptionMessageTrackingTimeout) !=
       pool->getSubscriptionMessageTrackingTimeout()) {
-    sprintf(logmsg,
-            "checkPoolAttribs: Pool subscriptionMessageTrackingTimeout "
-            "expected [%d], actual [%" PRId64 "]",
-            subscriptionMessageTrackingTimeout,
-            static_cast<int64_t>(
-                pool->getSubscriptionMessageTrackingTimeout().count()));
-    LOG(logmsg);
+    LOG(std::string("checkPoolAttribs: Pool subscriptionMessageTrackingTimeout "
+                    "expected [") +
+        std::to_string(subscriptionMessageTrackingTimeout) + ", actual[" +
+        std::to_string(pool->getSubscriptionMessageTrackingTimeout().count()) +
+        "]");
     return false;
   }
   if (std::chrono::milliseconds(subscriptionAckInterval) !=
       pool->getSubscriptionAckInterval()) {
-    sprintf(logmsg,
-            "checkPoolAttribs: Pool subscriptionAckInterval expected [%d], "
-            "actual [%" PRId64 "]",
-            subscriptionAckInterval,
-            static_cast<int64_t>(pool->getSubscriptionAckInterval().count()));
-    LOG(logmsg);
+    LOG(std::string(
+            "checkPoolAttribs: Pool subscriptionAckInterval expected [") +
+        std::to_string(subscriptionAckInterval) + ", actual[" +
+        std::to_string(pool->getSubscriptionAckInterval().count()) + "]");
     return false;
   }
   if (subscriptionRedundancy != pool->getSubscriptionRedundancy()) {
-    sprintf(logmsg,
-            "checkPoolAttribs: Pool subscriptionRedundancy expected [%d], "
-            "actual [%d]",
-            subscriptionRedundancy, pool->getSubscriptionRedundancy());
-    LOG(logmsg);
+    LOG(std::string(
+            "checkPoolAttribs: Pool subscriptionRedundancy expected [") +
+        std::to_string(subscriptionRedundancy) + ", actual[" +
+        std::to_string(pool->getSubscriptionRedundancy()) + "]");
     return false;
   }
   if (std::chrono::milliseconds(statisticInterval) !=
       pool->getStatisticInterval()) {
-    sprintf(logmsg,
-            "checkPoolAttribs: Pool statisticInterval expected [%d], actual "
-            "[%" PRId64 "]",
-            statisticInterval,
-            static_cast<int64_t>(pool->getStatisticInterval().count()));
-    LOG(logmsg);
+    LOG(std::string("checkPoolAttribs: Pool statisticInterval expected [") +
+        std::to_string(statisticInterval) + ", actual[" +
+        std::to_string(pool->getStatisticInterval().count()) + "]");
     return false;
   }
   if (prSingleHopEnabled != pool->getPRSingleHopEnabled()) {
-    sprintf(
-        logmsg,
-        "checkPoolAttribs: Pool prSingleHopEnabled expected [%d], actual [%d]",
-        prSingleHopEnabled, pool->getPRSingleHopEnabled());
-    LOG(logmsg);
+    LOG(std::string("checkPoolAttribs: Pool subscriptionEnabled expected [") +
+        (prSingleHopEnabled ? "true" : "false") +
+        (pool->getPRSingleHopEnabled() ? "true" : "false") + "]");
     return false;
   }
   if (std::chrono::milliseconds(updateLocatorListInterval) !=
       pool->getUpdateLocatorListInterval()) {
-    sprintf(logmsg,
-            "checkPoolAttribs: Pool updateLocatorListInterval expected [%d], "
-            "actual [%" PRId64 "]",
-            updateLocatorListInterval,
-            static_cast<int64_t>(pool->getUpdateLocatorListInterval().count()));
-    LOG(logmsg);
+    LOG(std::string(
+            "checkPoolAttribs: Pool updateLocatorListInterval expected [") +
+        std::to_string(updateLocatorListInterval) + ", actual[" +
+        std::to_string(pool->getUpdateLocatorListInterval().count()) + "]");
     return false;
   }
   return true;
@@ -277,12 +235,11 @@
       << std::endl;
 
   try {
-    std::string filePath = "valid_cache_pool.xml";
-    std::string duplicateFile;
-    CacheHelper::createDuplicateXMLFile(duplicateFile, filePath);
+    auto duplicateFile =
+        CacheHelper::createDuplicateXMLFile("valid_cache_pool.xml");
     cptr = std::make_shared<Cache>(
         cacheFactory.set("cache-xml-file", duplicateFile).create());
-    if (cptr->getPdxIgnoreUnreadFields() != true) {
+    if (!cptr->getPdxIgnoreUnreadFields()) {
       std::cout << "getPdxIgnoreUnreadFields should return true." << std::endl;
       return -1;
     } else {
@@ -379,14 +336,13 @@
   locators.clear();
   servers.clear();
   emptylist.clear();
-  char tmp[128];
-  sprintf(tmp, "localhost:%d", CacheHelper::staticLocatorHostPort1);
 
-  locators.push_back(string(tmp));
-  sprintf(tmp, "localhost:%d", CacheHelper::staticHostPort1);
-  servers.push_back(string(tmp));
-  sprintf(tmp, "localhost:%d", CacheHelper::staticHostPort2);
-  servers.push_back(string(tmp));
+  locators.push_back(std::string("localhost:") +
+                     std::to_string(CacheHelper::staticLocatorHostPort1));
+  servers.push_back(std::string("localhost:") +
+                    std::to_string(CacheHelper::staticHostPort1));
+  servers.push_back(std::string("localhost:") +
+                    std::to_string(CacheHelper::staticHostPort2));
 
   // THIS MUST MATCH WITH THE CLIENT CACHE XML LOADED
 
@@ -406,7 +362,11 @@
 
   if (!cptr->isClosed()) {
     cptr->close();
-    cptr = nullptr;
+    // Do not set it to null because the destructor will be invoked here and
+    // the regions and pools previously obtained, that will be deleted when the
+    // function returns, will make use of the their reference to the deleted
+    // cache and thus make the process crash.
+    // cptr = nullptr;
   }
 
   if (!check1 || !check2 || !check3) {
@@ -417,11 +377,9 @@
 
   try {
     std::cout << "Testing invalid pool xml 1" << std::endl;
-    std::string filePath = "invalid_cache_pool.xml";
-    std::string duplicateFile;
-    CacheHelper::createDuplicateXMLFile(duplicateFile, filePath);
-    cptr = std::make_shared<Cache>(
-        cacheFactory.set("cache-xml-file", duplicateFile).create());
+    auto duplicateFile =
+        CacheHelper::createDuplicateXMLFile("invalid_cache_pool.xml");
+    Cache cache = cacheFactory.set("cache-xml-file", duplicateFile).create();
     return -1;
   } catch (Exception &ex) {
     std::cout << "EXPECTED EXCEPTION" << std::endl;
@@ -431,11 +389,9 @@
 
   try {
     std::cout << "Testing invalid pool xml 2" << std::endl;
-    std::string filePath = "invalid_cache_pool2.xml";
-    std::string duplicateFile;
-    CacheHelper::createDuplicateXMLFile(duplicateFile, filePath);
-    cptr = std::make_shared<Cache>(
-        cacheFactory.set("cache-xml-file", duplicateFile).create());
+    auto duplicateFile =
+        CacheHelper::createDuplicateXMLFile("invalid_cache_pool2.xml");
+    Cache cache = cacheFactory.set("cache-xml-file", duplicateFile).create();
     return -1;
   } catch (Exception &ex) {
     std::cout << "EXPECTED EXCEPTION" << std::endl;
@@ -445,11 +401,9 @@
 
   try {
     std::cout << "Testing invalid pool xml 3" << std::endl;
-    std::string filePath = "invalid_cache_pool3.xml";
-    std::string duplicateFile;
-    CacheHelper::createDuplicateXMLFile(duplicateFile, filePath);
-    cptr = std::make_shared<Cache>(
-        cacheFactory.set("cache-xml-file", duplicateFile).create());
+    auto duplicateFile =
+        CacheHelper::createDuplicateXMLFile("invalid_cache_pool3.xml");
+    Cache cache = cacheFactory.set("cache-xml-file", duplicateFile).create();
     return -1;
   } catch (Exception &ex) {
     std::cout << "EXPECTED EXCEPTION" << std::endl;
@@ -459,11 +413,9 @@
 
   try {
     std::cout << "Testing invalid pool xml 4" << std::endl;
-    std::string filePath = "invalid_cache_pool4.xml";
-    std::string duplicateFile;
-    CacheHelper::createDuplicateXMLFile(duplicateFile, filePath);
-    cptr = std::make_shared<Cache>(
-        cacheFactory.set("cache-xml-file", duplicateFile).create());
+    auto duplicateFile =
+        CacheHelper::createDuplicateXMLFile("invalid_cache_pool4.xml");
+    Cache cache = cacheFactory.set("cache-xml-file", duplicateFile).create();
     return -1;
   } catch (Exception &ex) {
     std::cout << "EXPECTED EXCEPTION" << std::endl;
@@ -471,15 +423,6 @@
     LOG(ex.getStackTrace());
   }
 
-  std::cout << "disconnecting..." << std::endl;
-  try {
-    std::cout << "just before disconnecting..." << std::endl;
-    if (cptr != nullptr) cptr->close();
-  } catch (Exception &ex) {
-    std::cout << "Exception: msg = " << ex.what() << std::endl;
-    LOG(ex.getStackTrace());
-    return -1;
-  }
   std::cout << "done with test" << std::endl;
   std::cout << "Test successful!" << std::endl;
   return 0;
@@ -488,8 +431,8 @@
 DUNIT_TASK_DEFINITION(CLIENT1, ValidXmlTestPools)
   {
     CacheHelper::initLocator(1);
-    char tmp[128];
-    sprintf(tmp, "localhost:%d", CacheHelper::staticLocatorHostPort1);
+    auto tmp = std::string("localhost:%d") +
+               std::to_string(CacheHelper::staticLocatorHostPort1);
     CacheHelper::initServer(1, "cacheserver1_pool.xml", tmp);
     CacheHelper::initServer(2, "cacheserver2_pool.xml", tmp);
 
diff --git a/cppcache/integration-test/testXmlCacheCreationWithRefid.cpp b/cppcache/integration-test/testXmlCacheCreationWithRefid.cpp
index 5d12af4..01e3448 100644
--- a/cppcache/integration-test/testXmlCacheCreationWithRefid.cpp
+++ b/cppcache/integration-test/testXmlCacheCreationWithRefid.cpp
@@ -34,7 +34,7 @@
   auto cacheFactory = CacheFactory();
   std::shared_ptr<Cache> cptr;
 
-  char *path = ACE_OS::getenv("TESTSRC");
+  char *path = std::getenv("TESTSRC");
   std::string directory(path);
 
   std::cout << "create DistributedSytem with name=XML_CACHE_CREATION_TEST"
diff --git a/cppcache/integration-test/testXmlCacheInitialization.cpp b/cppcache/integration-test/testXmlCacheInitialization.cpp
index 21b3030..726b462 100644
--- a/cppcache/integration-test/testXmlCacheInitialization.cpp
+++ b/cppcache/integration-test/testXmlCacheInitialization.cpp
@@ -38,7 +38,7 @@
 static bool isLocator = false;
 static int numberOfLocators = 1;
 const char *endPoints = nullptr;
-const char *locatorsG =
+const std::string locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 
 #include "LocatorHelper.hpp"
@@ -47,7 +47,7 @@
   auto cacheFactory = CacheFactory();
   std::shared_ptr<Cache> cptr;
 
-  std::string directory(ACE_OS::getenv("TESTSRC"));
+  std::string directory(std::getenv("TESTSRC"));
 
   std::cout
       << "create DistributedSytem with name=XML_DECLARATIVE_CACHE_CREATION_TEST"
@@ -122,9 +122,8 @@
       << std::endl;
 
   try {
-    std::string filePath = "valid_cache_pool.xml";
-    std::string duplicateFile;
-    CacheHelper::createDuplicateXMLFile(duplicateFile, filePath);
+    auto duplicateFile =
+        CacheHelper::createDuplicateXMLFile("valid_cache_pool.xml");
 
     cptr = std::make_shared<Cache>(
         cacheFactory.set("enable-time-statistics", "false")
@@ -164,8 +163,8 @@
   {
     // Reusing server setup from ValidXmlTestPools for simplicity
     CacheHelper::initLocator(1);
-    char tmp[128];
-    sprintf(tmp, "localhost:%d", CacheHelper::staticLocatorHostPort1);
+    auto tmp = std::string("localhost:") +
+               std::to_string(CacheHelper::staticHostPort1);
     CacheHelper::initServer(1, "cacheserver1_pool.xml", tmp);
     CacheHelper::initServer(2, "cacheserver2_pool.xml", tmp);
 
diff --git a/cppcache/integration/benchmark/CMakeLists.txt b/cppcache/integration/benchmark/CMakeLists.txt
index 88254d2..0702ae4 100644
--- a/cppcache/integration/benchmark/CMakeLists.txt
+++ b/cppcache/integration/benchmark/CMakeLists.txt
@@ -16,7 +16,9 @@
 add_executable(cpp-integration-benchmark
   main.cpp
   RegionBM.cpp
-  PdxTypeBM.cpp)
+  PdxTypeBM.cpp
+  RegisterInterestBM.cpp
+)
 
 target_link_libraries(cpp-integration-benchmark
   PUBLIC
diff --git a/cppcache/integration/benchmark/RegionBM.cpp b/cppcache/integration/benchmark/RegionBM.cpp
index 8ca972f..da1b910 100644
--- a/cppcache/integration/benchmark/RegionBM.cpp
+++ b/cppcache/integration/benchmark/RegionBM.cpp
@@ -19,9 +19,16 @@
 #include <framework/Cluster.h>
 #include <framework/Gfsh.h>
 
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable : 4596)
+#endif
 #include <boost/log/core.hpp>
 #include <boost/log/expressions.hpp>
 #include <boost/log/trivial.hpp>
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
 
 #include <geode/Cache.hpp>
 #include <geode/CacheableString.hpp>
@@ -48,7 +55,7 @@
   void SetUp(benchmark::State&) override {
     if (!cluster) {
       cluster = std::unique_ptr<Cluster>(
-          new Cluster(Name{name_}, LocatorCount{1}, ServerCount{1}));
+          new Cluster(::Name{name_}, LocatorCount{1}, ServerCount{1}));
       cluster->getGfsh()
           .create()
           .region()
diff --git a/cppcache/integration/benchmark/RegisterInterestBM.cpp b/cppcache/integration/benchmark/RegisterInterestBM.cpp
new file mode 100644
index 0000000..7f6154b
--- /dev/null
+++ b/cppcache/integration/benchmark/RegisterInterestBM.cpp
@@ -0,0 +1,156 @@
+/*
+ * 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.
+ */
+
+#include <benchmark/benchmark.h>
+#include <framework/Cluster.h>
+#include <framework/Gfsh.h>
+
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable : 4596)
+#endif
+#include <boost/log/core.hpp>
+#include <boost/log/expressions.hpp>
+#include <boost/log/trivial.hpp>
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
+#include <geode/Cache.hpp>
+#include <geode/CacheableString.hpp>
+#include <geode/PoolManager.hpp>
+#include <geode/RegionFactory.hpp>
+#include <geode/RegionShortcut.hpp>
+
+namespace {
+
+using apache::geode::client::Cache;
+using apache::geode::client::CacheableString;
+using apache::geode::client::HashMapOfCacheable;
+using apache::geode::client::Region;
+using apache::geode::client::RegionShortcut;
+
+class RegisterInterestBM : public benchmark::Fixture {
+ public:
+  RegisterInterestBM() {
+    boost::log::core::get()->set_filter(boost::log::trivial::severity >=
+                                        boost::log::trivial::warning);
+
+    BOOST_LOG_TRIVIAL(info) << "constructed";
+  }
+
+  ~RegisterInterestBM() noexcept override {
+    BOOST_LOG_TRIVIAL(info) << "destructed";
+  }
+
+  using benchmark::Fixture::SetUp;
+  void SetUp(benchmark::State& state) override {
+    BOOST_LOG_TRIVIAL(info) << "starting cluster";
+    cluster = std::unique_ptr<Cluster>(
+        new Cluster(::Name{name_}, LocatorCount{1}, ServerCount{4}));
+    cluster->start();
+    cluster->getGfsh()
+        .create()
+        .region()
+        .withName("region")
+        .withType("PARTITION")
+        .execute();
+
+    cache = std::unique_ptr<Cache>(new Cache(cluster->createCache(
+        {{"log-level", "finer"}}, Cluster::SubscriptionState::Enabled)));
+    region = cache->createRegionFactory(RegionShortcut::PROXY)
+                 .setPoolName("default")
+                 .setCachingEnabled(true)
+                 .create("region");
+
+    BOOST_LOG_TRIVIAL(info)
+        << "filling region with " << state.range(0) << " keys";
+    HashMapOfCacheable map;
+    const auto batchSize = 10000;
+    map.reserve(batchSize);
+    for (auto i = 0; i < state.range(0); ++i) {
+      map.emplace(
+          std::make_shared<CacheableString>("key" + std::to_string(i)),
+          std::make_shared<CacheableString>("value" + std::to_string(i)));
+      if (0 == i % batchSize) {
+        region->putAll(map);
+        map.clear();
+      }
+    }
+    if (!map.empty()) {
+      region->putAll(map);
+      map.clear();
+    }
+    BOOST_LOG_TRIVIAL(info) << "region ready";
+  }
+
+  using benchmark::Fixture::TearDown;
+  void TearDown(benchmark::State&) override {
+    BOOST_LOG_TRIVIAL(info) << "stopping cluster";
+    region = nullptr;
+    cache = nullptr;
+    cluster = nullptr;
+  }
+
+ protected:
+  void SetName(const char* name) {
+    name_ = name;
+
+    Benchmark::SetName(name);
+  }
+
+  void unregisterInterestAllKeys(benchmark::State& state) {
+    state.PauseTiming();
+    region->unregisterAllKeys();
+    state.ResumeTiming();
+  }
+
+  std::unique_ptr<Cluster> cluster;
+  std::unique_ptr<Cache> cache;
+  std::shared_ptr<Region> region;
+
+ private:
+  std::string name_;
+};
+
+BENCHMARK_DEFINE_F(RegisterInterestBM, registerInterestAllKeys)
+(benchmark::State& state) {
+  for (auto _ : state) {
+    region->registerAllKeys();
+    unregisterInterestAllKeys(state);
+  }
+}
+BENCHMARK_REGISTER_F(RegisterInterestBM, registerInterestAllKeys)
+    ->Unit(benchmark::kMillisecond)
+    ->Repetitions(1)
+    ->Iterations(10)
+    ->Arg(1000000);
+
+BENCHMARK_DEFINE_F(RegisterInterestBM, registerInterestAllKeysInitialValues)
+(benchmark::State& state) {
+  for (auto _ : state) {
+    region->registerAllKeys(false, true);
+    unregisterInterestAllKeys(state);
+  }
+}
+BENCHMARK_REGISTER_F(RegisterInterestBM, registerInterestAllKeysInitialValues)
+    ->Unit(benchmark::kMillisecond)
+    ->Repetitions(1)
+    ->Iterations(10)
+    ->Arg(1000000);
+
+}  // namespace
diff --git a/cppcache/integration/framework/.clang-tidy b/cppcache/integration/framework/.clang-tidy
deleted file mode 100644
index 7346c59..0000000
--- a/cppcache/integration/framework/.clang-tidy
+++ /dev/null
@@ -1,15 +0,0 @@
----
-Checks:          '-*,clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-alpha*,google-*,-google-readability-todo,-google-runtime-references,-google-default-arguments,-clang-analyzer-unix.cstring.NullArg,-clang-analyzer-optin.cplusplus.VirtualCall'
-WarningsAsErrors: '*'
-HeaderFilterRegex: '.*'
-FormatStyle:     file
-...
-
-# Disable Checks
-# google-runtime-references - We have diverged from this rule due to both legacy and disagreement with the rule.
-# google-readability-todo - Adds current user name when fix applied.
-
-# TODO - Fix these checks
-# google-default-arguments
-# clang-analyzer-unix.cstring.NullArg - Generates errors in Boost, how do we ignore?
-# clang-analyzer-optin.cplusplus.VirtualCall - Boost.Process
diff --git a/cppcache/integration/framework/CMakeLists.txt b/cppcache/integration/framework/CMakeLists.txt
index 5c7476b..ae69e8b 100644
--- a/cppcache/integration/framework/CMakeLists.txt
+++ b/cppcache/integration/framework/CMakeLists.txt
@@ -51,7 +51,10 @@
     Boost::filesystem
     Boost::process
     Boost::asio
+    Boost::regex
   PRIVATE
     _WarningsAsError
     internal
 )
+
+add_clangformat(integration-framework)
diff --git a/cppcache/integration/framework/Cluster.cpp b/cppcache/integration/framework/Cluster.cpp
index f5105c8..7a69b7b 100644
--- a/cppcache/integration/framework/Cluster.cpp
+++ b/cppcache/integration/framework/Cluster.cpp
@@ -17,45 +17,38 @@
 
 #include "Cluster.h"
 
-#include <signal.h>
-
+#include <algorithm>
 #include <future>
 
 #include <boost/filesystem.hpp>
 
 Locator::Locator(Cluster &cluster, std::vector<Locator> &locators,
-                 std::string name, uint16_t jmxManagerPort, bool useIPv6)
+                 std::string name, uint16_t jmxManagerPort)
     : cluster_(cluster),
       name_(std::move(name)),
       locators_(locators),
       jmxManagerPort_(jmxManagerPort) {
-  auto hostname = "localhost";
-  if (useIPv6) {
-    hostname = "ip6-localhost";
-  }
-
-  auto port = Framework::getAvailablePort();
-
-  locatorAddress_ = LocatorAddress{hostname, port};
+  locatorAddress_ = LocatorAddress{"localhost", Framework::getAvailablePort()};
 }
 
 Locator::Locator(Cluster &cluster, std::vector<Locator> &locators,
-                 std::string name, uint16_t jmxManagerPort, bool useIPv6,
-                 uint16_t port, std::vector<uint16_t> &remotePorts,
-                 uint16_t distributedSystemId)
+                 std::string name, uint16_t jmxManagerPort,
+                 LocatorAddress locatorAddress,
+                 std::vector<LocatorAddress> remoteLocators,
+                 int16_t distributedSystemId)
     : cluster_(cluster),
       name_(std::move(name)),
       locators_(locators),
       jmxManagerPort_(jmxManagerPort),
-      distributedSystemId_(distributedSystemId){
-  auto hostname = "localhost";
-  if (useIPv6) {
-    hostname = "ip6-localhost";
+      locatorAddress_(locatorAddress),
+      remoteLocators_(remoteLocators),
+      distributedSystemId_(distributedSystemId) {
+  if (locatorAddress_.address.empty()) {
+    locatorAddress_.address = "localhost";
   }
-  locatorAddress_ = LocatorAddress{hostname, port};
 
-  for (uint16_t remotePort : remotePorts){
-    remoteLocatorsPorts_.push_back(remotePort);
+  if (0 == locatorAddress_.port) {
+    locatorAddress_.port = Framework::getAvailablePort();
   }
 }
 
@@ -72,17 +65,15 @@
     : cluster_(move.cluster_),
       name_(move.name_),
       locators_(move.locators_),
-      locatorAddress_(move.locatorAddress_),
-      remoteLocatorsPorts_(move.remoteLocatorsPorts_),
       jmxManagerPort_(move.jmxManagerPort_),
-      started_(move.started_),
-      distributedSystemId_(move.distributedSystemId_){
-  move.started_ = false;
-}
+      locatorAddress_(move.locatorAddress_),
+      remoteLocators_(move.remoteLocators_),
+      started_(false),
+      distributedSystemId_(move.distributedSystemId_) {}
 
 const LocatorAddress &Locator::getAddress() const { return locatorAddress_; }
 
-void Locator::start() {
+void Locator::start(bool startJmxManager) {
   if (started_) return;
 
   auto safeName = name_;
@@ -92,6 +83,16 @@
     cluster_.getGfsh().stop().locator().withDir(name_).execute();
   }
 
+  std::vector<std::string> remoteLocators;
+  std::transform(remoteLocators_.begin(), remoteLocators_.end(),
+                 std::back_inserter(remoteLocators),
+                 [](const LocatorAddress &locatorAddress) {
+                   return locatorAddress.address.empty()
+                              ? "localhost"
+                              : locatorAddress.address + "[" +
+                                    std::to_string(locatorAddress.port) + "]";
+                 });
+
   auto locator = cluster_.getGfsh()
                      .start()
                      .locator()
@@ -100,7 +101,7 @@
                      .withName(safeName)
                      .withBindAddress(locatorAddress_.address)
                      .withPort(locatorAddress_.port)
-                     .withRemoteLocators(remoteLocatorsPorts_)
+                     .withRemoteLocators(remoteLocators)
                      .withDistributedSystemId(distributedSystemId_)
                      .withMaxHeap("256m")
                      .withJmxManagerPort(jmxManagerPort_)
@@ -108,7 +109,7 @@
                      .withClasspath(cluster_.getClasspath())
                      .withSecurityManager(cluster_.getSecurityManager())
                      .withPreferIPv6(cluster_.getUseIPv6())
-                     .withJmxManagerStart(true);
+                     .withJmxManagerStart(startJmxManager);
 
   if (cluster_.useSsl()) {
     locator.withConnect(false)
@@ -150,19 +151,19 @@
   started_ = false;
 }
 
+const ServerAddress &Server::getAddress() const { return serverAddress_; }
+
 Server::Server(Cluster &cluster, std::vector<Locator> &locators,
-               std::string name, std::string xmlFile, bool useIPv6)
+               std::string name, std::string xmlFile,
+               ServerAddress serverAddress)
     : cluster_(cluster),
       locators_(locators),
+      serverAddress_(std::move(serverAddress)),
       name_(std::move(name)),
       xmlFile_(xmlFile) {
-  auto hostname = "localhost";
-  if (useIPv6) {
-    hostname = "ip6-localhost";
+  if (serverAddress_.address.empty()) {
+    serverAddress_.address = "localhost";
   }
-
-  auto port = static_cast<uint16_t>(0);
-  serverAddress_ = ServerAddress{hostname, port};
 }
 
 std::string Server::getCacheXMLFile() { return xmlFile_; }
@@ -205,6 +206,7 @@
           .withClasspath(cluster_.getClasspath())
           .withSecurityManager(cluster_.getSecurityManager())
           .withCacheXMLFile(getCacheXMLFile())
+          .withConserveSockets(cluster_.getConserveSockets())
           .withPreferIPv6(cluster_.getUseIPv6());
 
   if (!cluster_.getUser().empty()) {
@@ -231,62 +233,62 @@
   started_ = false;
 }
 
-Cluster::Cluster(LocatorCount initialLocators, ServerCount initialServers,
-                 std::vector<uint16_t> &locatorPorts, std::vector<uint16_t> &remoteLocatorPort,
-                 uint16_t distributedSystemId) : Cluster(
-    Name(std::string(::testing::UnitTest::GetInstance()
-                         ->current_test_info()
-                         ->test_case_name()) +
-         "/DS" + std::to_string(distributedSystemId) + "/" +
-         ::testing::UnitTest::GetInstance()->current_test_info()->name()), Classpath(""),
-         SecurityManager(""), User(""), Password(""), initialLocators, initialServers,
-         CacheXMLFiles({}), locatorPorts, remoteLocatorPort, distributedSystemId) {}
+Cluster::Cluster(InitialLocators initialLocators, InitialServers initialServers,
+                 RemoteLocators remoteLocators,
+                 DistributedSystemId distributedSystemId)
+    : Cluster(
+          Name(std::string(::testing::UnitTest::GetInstance()
+                               ->current_test_info()
+                               ->test_suite_name()) +
+               "/DS" + std::to_string(distributedSystemId.get()) + "/" +
+               ::testing::UnitTest::GetInstance()->current_test_info()->name()),
+          Classpath(""), SecurityManager(""), User(""), Password(""),
+          initialLocators, initialServers, CacheXMLFiles(), remoteLocators,
+          distributedSystemId) {}
 
 Cluster::Cluster(Name name, Classpath classpath,
                  SecurityManager securityManager, User user, Password password,
-                 LocatorCount initialLocators, ServerCount initialServers,
-                 CacheXMLFiles cacheXMLFiles, std::vector<uint16_t> &locatorPorts,
-                 std::vector<uint16_t> &remoteLocatorPort, uint16_t distributedSystemId)
+                 InitialLocators initialLocators, InitialServers initialServers,
+                 CacheXMLFiles cacheXMLFiles, RemoteLocators remoteLocators,
+                 DistributedSystemId distributedSystemId)
     : name_(name.get()),
       classpath_(classpath.get()),
       securityManager_(securityManager.get()),
       user_(user.get()),
       password_(password.get()),
+      cacheXMLFiles_(cacheXMLFiles.get()),
       initialLocators_(initialLocators.get()),
+      remoteLocators_(remoteLocators.get()),
       initialServers_(initialServers.get()),
       jmxManagerPort_(Framework::getAvailablePort()),
-      distributedSystemId_(distributedSystemId)
-      {
-  cacheXMLFiles_ = cacheXMLFiles.get();
-  useIPv6_ = false;
-
-  for(uint16_t port : locatorPorts){
-    locatorsPorts_.push_back(port);
-  }
-  for(uint16_t port : remoteLocatorPort){
-    remoteLocatorsPorts_.push_back(port);
-  }
+      distributedSystemId_(distributedSystemId.get()) {
   removeServerDirectory();
 }
 
-Cluster::Cluster(LocatorCount initialLocators, ServerCount initialServers,
-                 UseIpv6 useIPv6)
-    : Cluster(
-          Name(std::string(::testing::UnitTest::GetInstance()
-                               ->current_test_info()
-                               ->test_case_name()) +
-               "/" +
-               ::testing::UnitTest::GetInstance()->current_test_info()->name()),
-          initialLocators, initialServers, useIPv6) {}
+Cluster::Cluster(InitialLocators initialLocators, InitialServers initialServers,
+                 UseIpv6 useIpv6)
+    : name_(std::string(::testing::UnitTest::GetInstance()
+                            ->current_test_info()
+                            ->test_suite_name()) +
+            "/" +
+            ::testing::UnitTest::GetInstance()->current_test_info()->name()),
+      initialLocators_(initialLocators.get()),
+      initialServers_(initialServers.get()),
+      jmxManagerPort_(Framework::getAvailablePort()),
+      useIPv6_(useIpv6.get()) {
+  removeServerDirectory();
+}
 
 Cluster::Cluster(LocatorCount initialLocators, ServerCount initialServers)
-    : Cluster(initialLocators, initialServers, UseIpv6(false)) {}
+    : Cluster(
+          InitialLocators{std::vector<LocatorAddress>(initialLocators.get())},
+          InitialServers{std::vector<ServerAddress>(initialServers.get())}) {}
 
 Cluster::Cluster(LocatorCount initialLocators, ServerCount initialServers,
                  CacheXMLFiles cacheXMLFiles)
     : name_(std::string(::testing::UnitTest::GetInstance()
                             ->current_test_info()
-                            ->test_case_name()) +
+                            ->test_suite_name()) +
             "/" +
             ::testing::UnitTest::GetInstance()->current_test_info()->name()),
       initialLocators_(initialLocators.get()),
@@ -296,22 +298,29 @@
   cacheXMLFiles_ = cacheXMLFiles.get();
 }
 
-Cluster::Cluster(Name name, LocatorCount initialLocators,
-                 ServerCount initialServers, UseIpv6 useIPv6)
-    : Cluster(Name(name.get()), Classpath(""), SecurityManager(""), User(""),
-              Password(""), initialLocators, initialServers, CacheXMLFiles({}),
-              useIPv6) {}
+Cluster::Cluster(LocatorCount initialLocators, ServerCount initialServers,
+                 ConserveSockets conserveSockets, CacheXMLFiles cacheXMLFiles)
+    : name_(std::string(::testing::UnitTest::GetInstance()
+                            ->current_test_info()
+                            ->test_suite_name()) +
+            "/" +
+            ::testing::UnitTest::GetInstance()->current_test_info()->name()),
+      initialLocators_(initialLocators.get()),
+      initialServers_(initialServers.get()) {
+  jmxManagerPort_ = Framework::getAvailablePort();
+  cacheXMLFiles_ = cacheXMLFiles.get();
+  conserveSockets_ = conserveSockets.get();
+}
 
 Cluster::Cluster(Name name, LocatorCount initialLocators,
                  ServerCount initialServers)
     : Cluster(Name(name.get()), Classpath(""), SecurityManager(""), User(""),
-              Password(""), initialLocators, initialServers, CacheXMLFiles({}),
-              UseIpv6(false)) {}
+              Password(""), initialLocators, initialServers, CacheXMLFiles()) {}
 
 Cluster::Cluster(Name name, Classpath classpath,
                  SecurityManager securityManager, User user, Password password,
                  LocatorCount initialLocators, ServerCount initialServers,
-                 CacheXMLFiles cacheXMLFiles, UseIpv6 useIPv6)
+                 CacheXMLFiles cacheXMLFiles)
     : name_(name.get()),
       classpath_(classpath.get()),
       securityManager_(securityManager.get()),
@@ -321,7 +330,6 @@
       initialServers_(initialServers.get()) {
   jmxManagerPort_ = Framework::getAvailablePort();
   cacheXMLFiles_ = cacheXMLFiles.get();
-  useIPv6_ = useIPv6.get();
 
   removeServerDirectory();
 }
@@ -359,27 +367,28 @@
 
 apache::geode::client::Cache Cluster::createCache(
     const std::unordered_map<std::string, std::string> &properties) {
-  return createCache(properties, false);
+  return createCache(properties, SubscriptionState::Disabled);
 }
 
 apache::geode::client::Cache Cluster::createCache(
     const std::unordered_map<std::string, std::string> &properties,
-    bool subscriptionEnabled) {
+    SubscriptionState state) {
   using apache::geode::client::CacheFactory;
 
   CacheFactory cacheFactory;
 
+  cacheFactory.set("log-level", "none")
+      .set("statistic-sampling-enabled", "false");
+
   for (auto &&property : properties) {
     cacheFactory.set(property.first, property.second);
   }
 
-  auto cache = cacheFactory.set("log-level", "none")
-                   .set("statistic-sampling-enabled", "false")
-                   .create();
+  auto cache = cacheFactory.create();
 
   auto poolFactory =
       cache.getPoolManager().createFactory().setSubscriptionEnabled(
-          subscriptionEnabled);
+          state == SubscriptionState::Enabled);
   applyLocators(poolFactory);
   poolFactory.create("default");
 
@@ -393,6 +402,11 @@
   }
 }
 
+void Cluster::applyServer(apache::geode::client::PoolFactory &poolFactory,
+                          ServerAddress oneServer) {
+  poolFactory.addServer(oneServer.address, oneServer.port);
+}
+
 Gfsh &Cluster::getGfsh() { return gfsh_; }
 
 std::vector<Server> &Cluster::getServers() { return servers_; }
@@ -411,35 +425,29 @@
 
 bool Cluster::getUseIPv6() { return useIPv6_; }
 
+bool Cluster::getConserveSockets() { return conserveSockets_; }
+
 void Cluster::start() { start(std::function<void()>()); }
 
 void Cluster::start(std::function<void()> extraGfshCommands) {
-  locators_.reserve(initialLocators_);
-  for (size_t i = 0; i < initialLocators_; i++) {
-    uint16_t port;
-    if(locatorsPorts_.empty()){
-      port=Framework::getAvailablePort();
-    }else{
-      port=locatorsPorts_.at(i);
-    }
-
+  locators_.reserve(initialLocators_.size());
+  for (size_t i = 0; i < initialLocators_.size(); i++) {
     locators_.push_back({*this, locators_,
                          name_ + "/locator/" + std::to_string(i),
-                         jmxManagerPort_, getUseIPv6(), port,
-                         remoteLocatorsPorts_, distributedSystemId_});
+                         jmxManagerPort_, initialLocators_[i], remoteLocators_,
+                         distributedSystemId_});
   }
 
-  servers_.reserve(initialServers_);
+  servers_.reserve(initialServers_.size());
   std::string xmlFile;
-  for (size_t i = 0; i < initialServers_; i++) {
-    xmlFile = (cacheXMLFiles_.size() == 0)
-                  ? ""
-                  : cacheXMLFiles_.size() == 1 ? cacheXMLFiles_[0]
-                                               : cacheXMLFiles_[i];
+  for (size_t i = 0; i < initialServers_.size(); i++) {
+    xmlFile = (cacheXMLFiles_.size() == 0) ? ""
+              : cacheXMLFiles_.size() == 1 ? cacheXMLFiles_[0]
+                                           : cacheXMLFiles_[i];
 
     servers_.push_back({*this, locators_,
                         name_ + "/server/" + std::to_string(i), xmlFile,
-                        getUseIPv6()});
+                        initialServers_[i]});
   }
 
   startLocators();
@@ -477,8 +485,12 @@
 void Cluster::startLocators() {
   std::vector<std::future<void>> futures;
 
+  bool startJmxManager = true;
   for (auto &locator : locators_) {
-    futures.push_back(std::async(std::launch::async, [&] { locator.start(); }));
+    futures.push_back(std::async(std::launch::async, [&, startJmxManager] {
+      locator.start(startJmxManager);
+    }));
+    startJmxManager = false;
   }
 
   // TODO hack until there is a way to either tell servers to retry or wait
@@ -524,13 +536,13 @@
   propertiesFile_ = propertiesFile;
 }
 
-void Cluster::useSecurityPropertiesFile(const std::string securityPropertiesFile) {
+void Cluster::useSecurityPropertiesFile(
+    const std::string securityPropertiesFile) {
   useSecurityPropertiesFile_ = true;
   securityPropertiesFile_ = securityPropertiesFile;
 }
 
-void Cluster::useHostNameForClients(
-    const std::string hostName) {
+void Cluster::useHostNameForClients(const std::string hostName) {
   usePropertiesFile_ = true;
   hostName_ = hostName;
 }
diff --git a/cppcache/integration/framework/Cluster.h b/cppcache/integration/framework/Cluster.h
index c9155d0..333297d 100644
--- a/cppcache/integration/framework/Cluster.h
+++ b/cppcache/integration/framework/Cluster.h
@@ -41,11 +41,12 @@
 class Locator {
  public:
   Locator(Cluster &cluster, std::vector<Locator> &locators, std::string name,
-          uint16_t jmxManagerPort, bool useIPv6);
+          uint16_t jmxManagerPort);
 
   Locator(Cluster &cluster, std::vector<Locator> &locators, std::string name,
-          uint16_t jmxManagerPort, bool useIPv6, uint16_t port,
-          std::vector<uint16_t> &remotePorts, uint16_t distributedSystemId);
+          uint16_t jmxManagerPort, LocatorAddress locatorAddress,
+          std::vector<LocatorAddress> remoteLocators,
+          int16_t distributedSystemId);
 
   ~Locator();
 
@@ -55,7 +56,7 @@
 
   const LocatorAddress &getAddress() const;
 
-  void start();
+  void start(bool startJmxManager);
 
   void stop();
 
@@ -66,15 +67,15 @@
 
   std::vector<Locator> &locators_;
 
+  uint16_t jmxManagerPort_;
+
   LocatorAddress locatorAddress_;
 
-  std::vector<uint16_t> remoteLocatorsPorts_;
-
-  uint16_t jmxManagerPort_;
+  std::vector<LocatorAddress> remoteLocators_;
 
   bool started_ = false;
 
-  uint16_t distributedSystemId_ = 0;
+  int16_t distributedSystemId_ = 0;
 };
 
 struct ServerAddress {
@@ -85,7 +86,7 @@
 class Server {
  public:
   Server(Cluster &cluster, std::vector<Locator> &locators, std::string name,
-         std::string xmlFile, bool useIPv6);
+         std::string xmlFile, ServerAddress serverAddress);
 
   std::string getCacheXMLFile();
 
@@ -99,6 +100,8 @@
 
   void stop();
 
+  const ServerAddress &getAddress() const;
+
  private:
   Cluster &cluster_;
   std::vector<Locator> &locators_;
@@ -121,36 +124,46 @@
 using CacheXMLFiles =
     NamedType<std::vector<std::string>, struct CacheXMLFilesParameter>;
 using UseIpv6 = NamedType<bool, struct UseIpv6Parameter>;
+using ConserveSockets = NamedType<bool, struct ConserveSocketsParameter>;
+using InitialLocators =
+    NamedType<std::vector<LocatorAddress>, struct InitialLocatorsParameter>;
+using RemoteLocators =
+    NamedType<std::vector<LocatorAddress>, struct RemoteLocatorsParameter>;
+using DistributedSystemId =
+    NamedType<int16_t, struct DistributedSystemIdParameter>;
+using InitialServers =
+    NamedType<std::vector<ServerAddress>, struct InitialServerParameter>;
 
 class Cluster {
  public:
-  Cluster(LocatorCount initialLocators, ServerCount initialServers,
-          UseIpv6 useIPv6);
+  enum class SubscriptionState { Enabled, Disabled };
 
-  Cluster(LocatorCount initialLocators, ServerCount initialServers,
-          std::vector<uint16_t> &locatorPorts, std::vector<uint16_t> &remoteLocatorPort,
-          uint16_t distributedSystemId);
+  Cluster(InitialLocators initialLocators, InitialServers initialServers,
+          UseIpv6 useIpv6 = UseIpv6{false});
+
+  Cluster(InitialLocators initialLocators, InitialServers initialServers,
+          RemoteLocators remoteLocators,
+          DistributedSystemId distributedSystemId);
 
   Cluster(Name name, Classpath classpath, SecurityManager securityManager,
-          User user, Password password, LocatorCount initialLocators,
-          ServerCount initialServers, CacheXMLFiles cacheXMLFiles,
-          std::vector<uint16_t> &locatorPorts, std::vector<uint16_t> &remoteLocatorPort,
-          uint16_t distributedSystemId);
+          User user, Password password, InitialLocators initialLocators,
+          InitialServers initialServers, CacheXMLFiles cacheXMLFiles,
+          RemoteLocators remoteLocators,
+          DistributedSystemId distributedSystemId);
 
   Cluster(LocatorCount initialLocators, ServerCount initialServers);
 
   Cluster(LocatorCount initialLocators, ServerCount initialServers,
           CacheXMLFiles cacheXMLFiles);
 
-  Cluster(Name name, LocatorCount initialLocators, ServerCount initialServers,
-          UseIpv6 useIPv6);
+  Cluster(LocatorCount initialLocators, ServerCount initialServers,
+          ConserveSockets conserveSockets, CacheXMLFiles cacheXMLFiles);
 
   Cluster(Name name, LocatorCount initialLocators, ServerCount initialServers);
 
   Cluster(Name name, Classpath classpath, SecurityManager securityManager,
           User user, Password password, LocatorCount initialLocators,
-          ServerCount initialServers, CacheXMLFiles cacheXMLFiles,
-          UseIpv6 useIPv6);
+          ServerCount initialServers, CacheXMLFiles cacheXMLFiles);
 
   Cluster(Name name, Classpath classpath, SecurityManager securityManager,
           User user, Password password, LocatorCount initialLocators,
@@ -181,10 +194,13 @@
 
   apache::geode::client::Cache createCache(
       const std::unordered_map<std::string, std::string> &properties,
-      bool subscriptionEnabled);
+      SubscriptionState);
 
   void applyLocators(apache::geode::client::PoolFactory &poolFactory);
 
+  void applyServer(apache::geode::client::PoolFactory &poolFactory,
+                   ServerAddress server);
+
   void useSsl(const bool requireSslAuthentication, const std::string keystore,
               const std::string truststore, const std::string keystorePassword,
               const std::string truststorePassword);
@@ -222,8 +238,9 @@
 
   bool getUseIPv6();
 
- private:
+  bool getConserveSockets();
 
+ private:
   std::string name_;
   std::string classpath_;
   std::string securityManager_;
@@ -231,12 +248,11 @@
   std::string password_;
   std::vector<std::string> cacheXMLFiles_;
 
-  size_t initialLocators_;
+  std::vector<LocatorAddress> initialLocators_;
   std::vector<Locator> locators_;
-  std::vector<uint16_t> locatorsPorts_;
-  std::vector<uint16_t> remoteLocatorsPorts_;
+  std::vector<LocatorAddress> remoteLocators_;
 
-  size_t initialServers_;
+  std::vector<ServerAddress> initialServers_;
   std::vector<Server> servers_;
 
   bool started_ = false;
@@ -258,8 +274,9 @@
   std::string hostName_;
 
   bool useIPv6_ = false;
+  bool conserveSockets_ = false;
 
-  uint16_t distributedSystemId_ = 0;
+  int16_t distributedSystemId_ = 0;
 
   GfshExecute gfsh_;
 
diff --git a/cppcache/integration/framework/Framework.cpp b/cppcache/integration/framework/Framework.cpp
index 4454ffc..6c6bfce 100644
--- a/cppcache/integration/framework/Framework.cpp
+++ b/cppcache/integration/framework/Framework.cpp
@@ -32,3 +32,10 @@
 
   return port;
 }
+
+const std::string& Framework::getHostname() {
+  static const auto hostname = initHostname();
+  return hostname;
+}
+
+std::string Framework::initHostname() { return boost::asio::ip::host_name(); }
diff --git a/cppcache/integration/framework/Framework.h b/cppcache/integration/framework/Framework.h
index aaaca36..f7dd5e9 100644
--- a/cppcache/integration/framework/Framework.h
+++ b/cppcache/integration/framework/Framework.h
@@ -21,10 +21,16 @@
 #define INTEGRATION_TEST_FRAMEWORK_FRAMEWORK_H
 
 #include <chrono>
+#include <string>
 
 class Framework {
  public:
   static uint16_t getAvailablePort();
+
+  static const std::string& getHostname();
+
+ private:
+  static std::string initHostname();
 };
 
 template <class _Rep, class _Period>
diff --git a/cppcache/integration/framework/Gfsh.cpp b/cppcache/integration/framework/Gfsh.cpp
index 1001c15..4d1280e 100644
--- a/cppcache/integration/framework/Gfsh.cpp
+++ b/cppcache/integration/framework/Gfsh.cpp
@@ -17,18 +17,27 @@
 
 #include "Gfsh.h"
 
+#include <iterator>
+#include <sstream>
+
 Gfsh::Start Gfsh::start() { return Start{*this}; }
 
 Gfsh::Stop Gfsh::stop() { return Stop{*this}; }
 
 Gfsh::Create Gfsh::create() { return Create{*this}; }
 
+Gfsh::Destroy Gfsh::destroy() { return Destroy(*this); }
+
 Gfsh::Connect Gfsh::connect() { return Connect{*this}; }
 
 Gfsh::Shutdown Gfsh::shutdown() { return Shutdown{*this}; }
 
 Gfsh::Deploy Gfsh::deploy() { return Deploy(*this); }
 
+Gfsh::Rebalance Gfsh::rebalance() { return Rebalance(*this); }
+
+Gfsh::ExecuteFunction Gfsh::executeFunction() { return ExecuteFunction(*this); }
+
 Gfsh::Verb::Verb(Gfsh &gfsh) : gfsh_(gfsh) {}
 
 Gfsh::Start::Start(Gfsh &gfsh) : gfsh_(gfsh) {}
@@ -60,27 +69,24 @@
   return *this;
 }
 
-Gfsh::Start::Locator &Gfsh::Start::Locator::withRemoteLocators(const std::vector<uint16_t> &locatorPorts) {
+Gfsh::Start::Locator &Gfsh::Start::Locator::withRemoteLocators(
+    const std::vector<std::string> &remoteLocators) {
   // Example: --J='-Dgemfire.remote-locators=localhost[9009],localhost[9010]'
-  if ( !locatorPorts.empty() ) {
-    command_ += " --J='-Dgemfire.remote-locators=";
-    bool firstLocator=true;
-    for (uint16_t locatorPort : locatorPorts) {
-      if (firstLocator){
-        command_ += "localhost[" + std::to_string(locatorPort) + "]";
-        firstLocator=false;
-      }else{
-        command_ += ",localhost[" + std::to_string(locatorPort) + "]";
-      }
-    }
-    command_ += "'";
+  if (!remoteLocators.empty()) {
+    std::ostringstream command;
+    command << " --J='-Dgemfire.remote-locators=";
+    std::copy(remoteLocators.begin(), remoteLocators.end(),
+              std::ostream_iterator<std::string>(command, ","));
+    command << "'";
+    command_ += command.str();
   }
   return *this;
 }
 
-Gfsh::Start::Locator &Gfsh::Start::Locator::withDistributedSystemId(const uint16_t &dsId) {
-  if ( dsId != 0 ){
-    command_ += " --J=-Dgemfire.distributed-system-id="+std::to_string(dsId);
+Gfsh::Start::Locator &Gfsh::Start::Locator::withDistributedSystemId(
+    const uint16_t &dsId) {
+  if (dsId != 0) {
+    command_ += " --J=-Dgemfire.distributed-system-id=" + std::to_string(dsId);
   }
   return *this;
 }
@@ -126,12 +132,6 @@
   return *this;
 }
 
-Gfsh::Start::Locator &Gfsh::Start::Locator::withConnect(
-    const std::string connect) {
-  command_ += " --connect=" + connect;
-  return *this;
-}
-
 Gfsh::Start::Locator &Gfsh::Start::Locator::withPreferIPv6(bool useIPv6) {
   if (useIPv6) {
     command_ += " --J=-Djava.net.preferIPv6Addresses=true";
@@ -349,6 +349,20 @@
   return *this;
 }
 
+Gfsh::Start::Server &Gfsh::Start::Server::withSystemProperty(
+    const std::string &key, const std::string &value) {
+  command_ += " --J=-D" + key + "=" + value;
+  return *this;
+}
+
+Gfsh::Start::Server &Gfsh::Start::Server::withConserveSockets(
+    bool conserveSockets) {
+  if (conserveSockets) {
+    command_ += " --J=-Dgemfire.conserve-sockets=true";
+  }
+  return *this;
+}
+
 Gfsh::Stop::Stop(Gfsh &gfsh) : gfsh_(gfsh) {}
 
 Gfsh::Stop::Server Gfsh::Stop::server() { return Server{gfsh_}; }
@@ -395,38 +409,72 @@
   return *this;
 }
 
-Gfsh::Create::Region &Gfsh::Create::Region::withRedundantCopies(const std::string &copies) {
+Gfsh::Create::Region &Gfsh::Create::Region::withRedundantCopies(
+    const std::string &copies) {
   command_ += " --redundant-copies=" + copies;
   return *this;
 }
 
-Gfsh::Create::Region &Gfsh::Create::Region::withBuckets(const std::string &totalNumBuckets) {
+Gfsh::Create::Region &Gfsh::Create::Region::withBuckets(
+    const std::string &totalNumBuckets) {
   command_ += " --total-num-buckets=" + totalNumBuckets;
   return *this;
 }
 
-Gfsh::Create::Region &Gfsh::Create::Region::withGatewaySenderId(const std::string &gatewaySenderId) {
+Gfsh::Create::Region &Gfsh::Create::Region::withGatewaySenderId(
+    const std::string &gatewaySenderId) {
   command_ += " --gateway-sender-id=" + gatewaySenderId;
   return *this;
 }
 
-Gfsh::Create::GatewaySender Gfsh::Create::gatewaySender() { return GatewaySender{gfsh_}; }
+Gfsh::Create::GatewaySender Gfsh::Create::gatewaySender() {
+  return GatewaySender{gfsh_};
+}
 
-Gfsh::Create::GatewaySender::GatewaySender(Gfsh &gfsh) : Command(gfsh, "create gateway-sender") {}
+Gfsh::Create::Region &Gfsh::Create::Region::withPartitionResolver(
+    const std::string &partitionResolver) {
+  command_ += " --partition-resolver=" + partitionResolver;
+  return *this;
+}
 
-Gfsh::Create::GatewaySender &Gfsh::Create::GatewaySender::withId(const std::string &id){
+Gfsh::Create::GatewaySender::GatewaySender(Gfsh &gfsh)
+    : Command(gfsh, "create gateway-sender") {}
+
+Gfsh::Create::GatewaySender &Gfsh::Create::GatewaySender::withId(
+    const std::string &id) {
   command_ += " --id=" + id;
   return *this;
 }
 
-Gfsh::Create::GatewaySender &Gfsh::Create::GatewaySender::withRemoteDSId(const std::string &remoteDSId){
+Gfsh::Create::GatewaySender &Gfsh::Create::GatewaySender::withRemoteDSId(
+    const std::string &remoteDSId) {
   command_ += " --remote-distributed-system-id=" + remoteDSId;
   return *this;
 }
 
-Gfsh::Create::GatewayReceiver Gfsh::Create::gatewayReceiver() { return GatewayReceiver{gfsh_}; }
+Gfsh::Create::GatewayReceiver Gfsh::Create::gatewayReceiver() {
+  return GatewayReceiver{gfsh_};
+}
 
-Gfsh::Create::GatewayReceiver::GatewayReceiver(Gfsh &gfsh) : Command(gfsh, "create gateway-receiver") {}
+Gfsh::Create::GatewayReceiver::GatewayReceiver(Gfsh &gfsh)
+    : Command(gfsh, "create gateway-receiver") {}
+
+Gfsh::Destroy::Destroy(Gfsh &gfsh) : Verb{gfsh} {}
+
+Gfsh::Destroy::Region Gfsh::Destroy::region() { return Region{gfsh_}; }
+
+Gfsh::Destroy::Region::Region(Gfsh &gfsh) : Command(gfsh, "destroy region") {}
+
+Gfsh::Destroy::Region &Gfsh::Destroy::Region::withName(
+    const std::string &name) {
+  command_ += " --name=" + name;
+  return *this;
+}
+
+Gfsh::Destroy::Region &Gfsh::Destroy::Region::ifExists() {
+  command_ += " --if-exists";
+  return *this;
+}
 
 Gfsh::Connect::Connect(Gfsh &gfsh) : Command{gfsh, "connect"} {}
 
@@ -494,6 +542,8 @@
   return *this;
 }
 
+Gfsh::Rebalance::Rebalance(Gfsh &gfsh) : Command{gfsh, "rebalance"} {}
+
 template <>
 void Gfsh::Command<void>::execute(const std::string &user,
                                   const std::string &password,
@@ -509,3 +559,20 @@
 void Gfsh::Command<void>::execute() {
   gfsh_.execute(command_, "", "", "", "", "", "");
 }
+
+Gfsh::ExecuteFunction::ExecuteFunction(Gfsh &gfsh)
+    : Command{gfsh, "execute function"} {}
+
+Gfsh::ExecuteFunction &Gfsh::ExecuteFunction::withId(
+    const std::string &functionId) {
+  command_ += " --id=" + functionId;
+
+  return *this;
+}
+
+Gfsh::ExecuteFunction &Gfsh::ExecuteFunction::withMember(
+    const std::string &memberName) {
+  command_ += " --member=" + memberName;
+
+  return *this;
+}
diff --git a/cppcache/integration/framework/Gfsh.h b/cppcache/integration/framework/Gfsh.h
index 9154a5a..0273597 100644
--- a/cppcache/integration/framework/Gfsh.h
+++ b/cppcache/integration/framework/Gfsh.h
@@ -37,6 +37,9 @@
   class Create;
   Create create();
 
+  class Destroy;
+  Destroy destroy();
+
   class Connect;
   Connect connect();
 
@@ -46,6 +49,12 @@
   class Deploy;
   Deploy deploy();
 
+  class Rebalance;
+  Rebalance rebalance();
+
+  class ExecuteFunction;
+  ExecuteFunction executeFunction();
+
   class Verb {
    public:
    protected:
@@ -56,11 +65,14 @@
   template <class Result>
   class Command {
    public:
-    virtual Result execute(const std::string &user, const std::string &password, const std::string &keyStorePath,
-                           const std::string &trustStorePath, const std::string &keyStorePassword,
+    virtual Result execute(const std::string &user, const std::string &password,
+                           const std::string &keyStorePath,
+                           const std::string &trustStorePath,
+                           const std::string &keyStorePassword,
                            const std::string &trustStorePassword) {
-      Result{gfsh_}.parse(gfsh_.execute(command_, user, password, keyStorePath, trustStorePath,
-              keyStorePassword, trustStorePassword));
+      Result{gfsh_}.parse(gfsh_.execute(command_, user, password, keyStorePath,
+                                        trustStorePath, keyStorePassword,
+                                        trustStorePassword));
     }
     virtual Result execute() {
       Result{gfsh_}.parse(gfsh_.execute(command_, "", "", "", "", "", ""));
@@ -96,7 +108,8 @@
 
       Locator &withPort(const uint16_t &port);
 
-      Locator &withRemoteLocators(const std::vector<uint16_t> &locatorPorts);
+      Locator &withRemoteLocators(
+          const std::vector<std::string> &remoteLocators);
 
       Locator &withDistributedSystemId(const uint16_t &dsId);
 
@@ -112,8 +125,6 @@
 
       Locator &withSecurityManager(const std::string securityManager);
 
-      Locator &withConnect(const std::string connect);
-
       Locator &withPreferIPv6(bool useIPv6);
 
       Locator &withSslEnabledComponents(const std::string &components);
@@ -186,6 +197,10 @@
       Server &withSecurityPropertiesFile(const std::string file);
 
       Server &withHostNameForClients(const std::string hostName);
+
+      Server &withSystemProperty(const std::string &key,
+                                 const std::string &value);
+      Server &withConserveSockets(bool conserveSockets);
     };
 
    private:
@@ -250,6 +265,8 @@
       Region &withBuckets(const std::string &totalNumBuckets);
 
       Region &withGatewaySenderId(const std::string &gatewaySenderId);
+
+      Region &withPartitionResolver(const std::string &partitionResolver);
     };
 
     class GatewaySender : public Command<void> {
@@ -267,6 +284,23 @@
     };
   };
 
+  class Destroy : public Verb {
+   public:
+    explicit Destroy(Gfsh &gfsh);
+
+    class Region;
+    Region region();
+
+    class Region : public Command<void> {
+     public:
+      explicit Region(Gfsh &gfsh);
+
+      Region &withName(const std::string &name);
+
+      Region &ifExists();
+    };
+  };
+
   class Connect : public Command<void> {
    public:
     explicit Connect(Gfsh &gfsh);
@@ -302,17 +336,35 @@
     Deploy &jar(const std::string &jarFile);
   };
 
+  class Rebalance : public Command<void> {
+   public:
+    explicit Rebalance(Gfsh &gfsh);
+  };
+
+  class ExecuteFunction : public Command<void> {
+   public:
+    explicit ExecuteFunction(Gfsh &gfsh);
+
+    ExecuteFunction &withId(const std::string &functionName);
+    ExecuteFunction &withMember(const std::string &withMember);
+  };
+
  protected:
   virtual void execute(const std::string &command, const std::string &user,
-                       const std::string &password, const std::string &keyStorePath,
-                       const std::string &trustStorePath, const std::string &keyStorePassword,
+                       const std::string &password,
+                       const std::string &keyStorePath,
+                       const std::string &trustStorePath,
+                       const std::string &keyStorePassword,
                        const std::string &trustStorePassword) = 0;
 };
 
 template <>
-void Gfsh::Command<void>::execute(const std::string &user, const std::string &password,
-                                  const std::string &keyStorePath, const std::string &trustStorePath,
-                                  const std::string &keyStorePassword, const std::string &trustStorePassword);
+void Gfsh::Command<void>::execute(const std::string &user,
+                                  const std::string &password,
+                                  const std::string &keyStorePath,
+                                  const std::string &trustStorePath,
+                                  const std::string &keyStorePassword,
+                                  const std::string &trustStorePassword);
 
 template <>
 void Gfsh::Command<void>::execute();
diff --git a/cppcache/integration/framework/GfshExecute.cpp b/cppcache/integration/framework/GfshExecute.cpp
index 4e83416..69b71b6 100644
--- a/cppcache/integration/framework/GfshExecute.cpp
+++ b/cppcache/integration/framework/GfshExecute.cpp
@@ -19,7 +19,19 @@
 
 #include <mutex>
 
+// Disable warning for "extra qualifications" here.  One of the boost log
+// headers triggers this warning.  Note: use of disable pragma here is
+// intentional - attempts to use push/pop as you ordinarily should just
+// yielded a gripe from the MS tools that "warning number '4596' is not a
+// valid compiler warning". re-enabling the warning after the include
+// fails in the same way, so just leave it disabled for the rest of the
+// file.  This is safe, since the warning can only trigger inside a class
+// declaration, of which there are none in this file.
+#ifdef WIN32
+#pragma warning(disable : 4596)
+#endif
 #include <boost/log/trivial.hpp>
+#include <boost/regex.hpp>
 
 #if defined(_WINDOWS)
 std::mutex g_child_mutex;
@@ -30,6 +42,7 @@
 using boost::process::environment;
 using boost::process::ipstream;
 using boost::process::std_err;
+using boost::process::std_in;
 using boost::process::std_out;
 
 GfshExecuteException::GfshExecuteException(std::string message, int returnCode)
@@ -44,7 +57,8 @@
 int GfshExecuteException::getGfshReturnCode() { return returnCode_; }
 
 void GfshExecute::execute(const std::string &command, const std::string &user,
-                          const std::string &password, const std::string &keyStorePath,
+                          const std::string &password,
+                          const std::string &keyStorePath,
                           const std::string &trustStorePath,
                           const std::string &keyStorePassword,
                           const std::string &trustStorePassword) {
@@ -58,14 +72,16 @@
   commands.push_back("-e");
   commands.push_back(command);
 
-  auto env = boost::this_process::environment();
-  environment _env = env;
-  // broken on windows env["JAVA_ARGS"] = "-Xmx1g -client";
+  environment env{boost::this_process::environment()};
+
+  if (!maxHeap_.empty()) {
+    env["JAVA_ARGS"] = "-Xmx" + maxHeap_ + " " + env["JAVA_ARGS"].to_string();
+  }
 
   ipstream outStream;
   ipstream errStream;
 
-  auto gfsh = executeChild(commands, _env, outStream, errStream);
+  auto gfsh = executeChild(commands, env, outStream, errStream);
 
   std::string line;
 
@@ -85,7 +101,9 @@
   if (exit_code) {
     throw GfshExecuteException("gfsh error", exit_code);
   }
-  extractConnectionCommand(command, user, password, keyStorePath, trustStorePath, keyStorePassword, trustStorePassword);
+  extractConnectionCommand(command, user, password, keyStorePath,
+                           trustStorePath, keyStorePassword,
+                           trustStorePassword);
 }
 
 child GfshExecute::executeChild(std::vector<std::string> &commands,
@@ -96,40 +114,53 @@
   std::lock_guard<std::mutex> guard(g_child_mutex);
 #endif
   return child(getFrameworkString(FrameworkVariable::GfShExecutable),
-               args = commands, env, std_out > outStream, std_err > errStream);
+               args = commands, env, std_out > outStream, std_err > errStream,
+               std_in < boost::process::null);
 }
 
-void GfshExecute::extractConnectionCommand(const std::string &command, const std::string &user,
-                                           const std::string &password, const std::string &keyStorePath,
-                                           const std::string &trustStorePath, const std::string &keyStorePassword,
-                                           const std::string &trustStorePassword) {
+void GfshExecute::extractConnectionCommand(
+    const std::string &command, const std::string &user,
+    const std::string &password, const std::string &keyStorePath,
+    const std::string &trustStorePath, const std::string &keyStorePassword,
+    const std::string &trustStorePassword) {
   if (starts_with(command, std::string("connect"))) {
     connection_ = command;
   } else if (starts_with(command, std::string("start locator"))) {
     auto jmxManagerHost = std::string("localhost");
     auto jmxManagerPort = std::string("1099");
 
-    std::regex jmxManagerHostRegex("bind-address=([^\\s]+)");
-    std::smatch jmxManagerHostMatch;
-    if (std::regex_search(command, jmxManagerHostMatch, jmxManagerHostRegex)) {
+    boost::regex jmxManagerHostRegex("bind-address=([^\\s]+)");
+    boost::smatch jmxManagerHostMatch;
+    if (boost::regex_search(command, jmxManagerHostMatch,
+                            jmxManagerHostRegex)) {
       jmxManagerHost = jmxManagerHostMatch[1];
     }
 
-    std::regex jmxManagerPortRegex("jmx-manager-port=(\\d+)");
-    std::smatch jmxManagerPortMatch;
-    if (std::regex_search(command, jmxManagerPortMatch, jmxManagerPortRegex)) {
+    boost::regex jmxManagerPortRegex("jmx-manager-port=(\\d+)");
+    boost::smatch jmxManagerPortMatch;
+    if (boost::regex_search(command, jmxManagerPortMatch,
+                            jmxManagerPortRegex)) {
       jmxManagerPort = jmxManagerPortMatch[1];
     }
 
-    connection_ = "connect --jmx-manager=" + jmxManagerHost + "[" + jmxManagerPort + "]";
+    connection_ =
+        "connect --jmx-manager=" + jmxManagerHost + "[" + jmxManagerPort + "]";
 
     if (!(user.empty() || password.empty())) {
       connection_ += " --user=" + user + " --password=" + password;
     }
 
-    if(!(keyStorePath.empty() || trustStorePath.empty() || keyStorePassword.empty() || trustStorePassword.empty())) {
-        connection_ += " --use-ssl=true --key-store=" + keyStorePath + " --trust-store=" + trustStorePath +
-                " --key-store-password=" + keyStorePassword + " --trust-store-password=" + trustStorePassword;
+    if (!(keyStorePath.empty() || trustStorePath.empty() ||
+          keyStorePassword.empty() || trustStorePassword.empty())) {
+      connection_ += " --use-ssl=true --key-store=" + keyStorePath +
+                     " --trust-store=" + trustStorePath +
+                     " --key-store-password=" + keyStorePassword +
+                     " --trust-store-password=" + trustStorePassword;
     }
   }
 }
+
+GfshExecute &GfshExecute::withMaxHeap(std::string maxHeap) {
+  maxHeap_ = std::move(maxHeap);
+  return *this;
+}
diff --git a/cppcache/integration/framework/GfshExecute.h b/cppcache/integration/framework/GfshExecute.h
index 897e77a..46b2b52 100644
--- a/cppcache/integration/framework/GfshExecute.h
+++ b/cppcache/integration/framework/GfshExecute.h
@@ -22,7 +22,6 @@
 
 #include <algorithm>
 #include <iostream>
-#include <regex>
 #include <string>
 
 #include <geode/Exception.hpp>
@@ -57,6 +56,7 @@
 
 class GfshExecute : public Gfsh {
   std::string connection_;
+  std::string maxHeap_ = "256m";
 
   void execute(const std::string &command, const std::string &user,
                const std::string &password, const std::string &keyStorePath,
@@ -80,6 +80,8 @@
  public:
   GfshExecute() = default;
   virtual ~GfshExecute() override = default;
+
+  GfshExecute &withMaxHeap(std::string maxHeap);
 };
 
 #endif  // INTEGRATION_TEST_FRAMEWORK_GFSHEXECUTE_H
diff --git a/cppcache/integration/framework/NamedType.h b/cppcache/integration/framework/NamedType.h
index 797aab7..726ff4e 100644
--- a/cppcache/integration/framework/NamedType.h
+++ b/cppcache/integration/framework/NamedType.h
@@ -26,6 +26,7 @@
 template <typename T, typename Parameter>
 class NamedType {
  public:
+  NamedType() = default;
   explicit NamedType(T const &value) : value_(value) {}
   explicit NamedType(T &&value) : value_(std::move(value)) {}
   T &get() { return value_; }
diff --git a/cppcache/integration/test/AuthInitializeTest.cpp b/cppcache/integration/test/AuthInitializeTest.cpp
index 7967571..b1c18d3 100644
--- a/cppcache/integration/test/AuthInitializeTest.cpp
+++ b/cppcache/integration/test/AuthInitializeTest.cpp
@@ -65,11 +65,11 @@
 using std::chrono::minutes;
 
 const int32_t CQ_PLUS_AUTH_TEST_REGION_ENTRY_COUNT = 100000;
+const int32_t CQ_REAUTH_TEST_REGION_ENTRY_COUNT = 5000;
 
 Cache createCache(std::shared_ptr<SimpleAuthInitialize> auth) {
   auto cache = CacheFactory()
-                   .set("log-level", "debug")
-                   .set("log-file", "geode_native.log")
+                   .set("log-level", "none")
                    .set("statistic-sampling-enabled", "false")
                    .setAuthInitialize(auth)
                    .create();
@@ -101,7 +101,7 @@
   Cluster cluster(
       Name(std::string(::testing::UnitTest::GetInstance()
                            ->current_test_info()
-                           ->test_case_name()) +
+                           ->test_suite_name()) +
            "/" +
            ::testing::UnitTest::GetInstance()->current_test_info()->name()),
       Classpath{getFrameworkString(FrameworkVariable::JavaObjectJarPath)},
@@ -133,7 +133,7 @@
   Cluster cluster(
       Name(std::string(::testing::UnitTest::GetInstance()
                            ->current_test_info()
-                           ->test_case_name()) +
+                           ->test_suite_name()) +
            "/" +
            ::testing::UnitTest::GetInstance()->current_test_info()->name()),
       Classpath{getFrameworkString(FrameworkVariable::JavaObjectJarPath)},
@@ -169,7 +169,7 @@
   Cluster cluster(
       Name(std::string(::testing::UnitTest::GetInstance()
                            ->current_test_info()
-                           ->test_case_name()) +
+                           ->test_suite_name()) +
            "/" +
            ::testing::UnitTest::GetInstance()->current_test_info()->name()),
       Classpath{getFrameworkString(FrameworkVariable::JavaObjectJarPath)},
@@ -199,7 +199,7 @@
   Cluster cluster(
       Name(std::string(::testing::UnitTest::GetInstance()
                            ->current_test_info()
-                           ->test_case_name()) +
+                           ->test_suite_name()) +
            "/" +
            ::testing::UnitTest::GetInstance()->current_test_info()->name()),
       Classpath{getFrameworkString(FrameworkVariable::JavaObjectJarPath)},
@@ -222,3 +222,71 @@
 
   ASSERT_GT(authInitialize->getGetCredentialsCallCount(), 0);
 }
+
+TEST(AuthInitializeTest, verifyReAuthAfterCredsExpire) {
+  // Start a cluster with user expiration support
+
+  Cluster cluster(
+      Name(std::string(::testing::UnitTest::GetInstance()
+                           ->current_test_info()
+                           ->test_suite_name()) +
+           "/" +
+           ::testing::UnitTest::GetInstance()->current_test_info()->name()),
+      Classpath{getFrameworkString(FrameworkVariable::JavaObjectJarPath)},
+      SecurityManager{"javaobject.SimulatedExpirationSecurityManager"},
+      User{"root"}, Password{"root-password"}, LocatorCount{1}, ServerCount{1});
+
+  cluster.start();
+
+  cluster.getGfsh()
+      .create()
+      .region()
+      .withName("region")
+      .withType("PARTITION")
+      .execute();
+
+  // Use a non-root user for reAuthentication testing.
+
+  auto authInitialize =
+      std::make_shared<SimpleAuthInitialize>("user", "user-password");
+
+  auto cache = createCache(authInitialize);
+  auto pool = createPool(cluster, cache, false);
+  auto region = setupRegion(cache, pool);
+
+  int numSuccessfulOps = 0;
+  int numFailedOps = 0;
+  std::string key;
+  std::string value;
+  for (int i = 0; i < CQ_REAUTH_TEST_REGION_ENTRY_COUNT; i++) {
+    try {
+      key = "foo" + std::to_string(i);
+      value = "bar" + std::to_string(i);
+      region->put(key, value);
+
+      auto retrievedValue = region->get(key);
+      auto retrivedValueAsString =
+          std::dynamic_pointer_cast<CacheableString>(retrievedValue)->value();
+      ASSERT_EQ(retrivedValueAsString, value);
+      numSuccessfulOps++;
+    } catch (const Exception& ex) {
+      std::cout << "Caught unexpected exception: " << ex.what() << std::endl;
+      numFailedOps++;
+    }
+  }
+
+  ASSERT_EQ(numSuccessfulOps, CQ_REAUTH_TEST_REGION_ENTRY_COUNT);
+  ASSERT_EQ(numFailedOps, 0);
+
+  // SimulatedExpirationSecurityManager is set to throw
+  // AuthenticationExpiredException for 1% of operations.
+  // If the random number generator were perfect we'd expect reauth
+  // to happen for 1% of the operations. Back it off to .5% since
+  // it's not perfect.
+  //
+  // Number of operations is 2 * CQ_REAUTH_TEST_REGION_ENTRY_COUNT
+  // since doing put and get.
+
+  EXPECT_GT(authInitialize->getGetCredentialsCallCount(),
+            2 * CQ_REAUTH_TEST_REGION_ENTRY_COUNT * .005);
+}
diff --git a/cppcache/integration/test/BasicIPv6Test.cpp b/cppcache/integration/test/BasicIPv6Test.cpp
index 856ba62..32f878f 100644
--- a/cppcache/integration/test/BasicIPv6Test.cpp
+++ b/cppcache/integration/test/BasicIPv6Test.cpp
@@ -53,8 +53,9 @@
  * Example test using 2 servers and waiting for async tasks to synchronize using
  * furtures.
  */
-TEST(BasicIPv6Test, queryResultForRange) {
-  Cluster cluster{LocatorCount{1}, ServerCount{1}, UseIpv6(true)};
+TEST(BasicIPv6Test, DISABLED_queryResultForRange) {
+  Cluster cluster{InitialLocators{{{"localhost", 0}}},
+                  InitialServers{{{"localhost", 0}}}, UseIpv6(true)};
   cluster.start();
   cluster.getGfsh()
       .create()
diff --git a/cppcache/integration/test/CMakeLists.txt b/cppcache/integration/test/CMakeLists.txt
index e7b1d4a..ab05a0a 100644
--- a/cppcache/integration/test/CMakeLists.txt
+++ b/cppcache/integration/test/CMakeLists.txt
@@ -16,6 +16,8 @@
 add_executable(cpp-integration-test
   AuthInitializeTest.cpp
   BasicIPv6Test.cpp
+  CacheWriterTest.cpp
+  CachingProxyTest.cpp
   CacheXmlTest.cpp
   CleanIdleConnections.cpp
   ClientTransactionXATest.cpp
@@ -30,12 +32,18 @@
   FunctionExecutionTest.cpp
   LRUEvictionTest.cpp
   LocatorRequestsTest.cpp
+  Order.cpp
+  Order.hpp
   PartitionRegionOpsTest.cpp
+  PdxInstanceFactoryTest.cpp
   PdxInstanceTest.cpp
   PdxJsonTypeTest.cpp
   PdxSerializerTest.cpp
-  Order.cpp
-  Order.hpp
+  PdxTypeRegistryTest.cpp
+  Position.cpp
+  Position.hpp
+  PositionKey.cpp
+  PositionKey.hpp
   RegionGetAllTest.cpp
   RegionPutAllTest.cpp
   RegionPutGetAllTest.cpp
@@ -49,11 +57,27 @@
   SslTwoWayTest.cpp
   StructTest.cpp
   TransactionCleaningTest.cpp
-  WanDeserializationTest.cpp
-  PdxInstanceFactoryTest.cpp
-  CacheWriterTest.cpp
   TransactionsTest.cpp
+  WanDeserializationTest.cpp
+  DisconnectEndPointAtException.cpp
+  ContainsKeyOnServerExceptionTest.cpp
+  HARegionCacheListenerTest.cpp
+  HARegionCacheListenerWithClusterRegionTest.cpp
+  HARegionCacheListenerARLEPDTest.cpp
+  HARegionCacheListenerARLTest.cpp
+  HARegionCacheListenerKeyValueTest.cpp
+  LocalRegionCacheListenerTest.cpp
 )
+if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+  target_compile_options(cpp-integration-test
+    PUBLIC
+      -Wno-used-but-marked-unused
+  )
+endif()
+
+include(ExecutableExportHeader)
+
+generate_exec_export_header(cpp-integration-test)
 
 target_compile_definitions(cpp-integration-test
   PUBLIC
@@ -70,7 +94,6 @@
     apache-geode
     integration-framework
     testobject
-    ACE::ACE
     GTest::gtest
     GTest::gtest_main
     GTest::gmock
@@ -105,6 +128,7 @@
 set_target_properties(cpp-integration-test PROPERTIES
   CXX_VISIBILITY_PRESET hidden
   VISIBILITY_INLINES_HIDDEN ON
+  ENABLE_EXPORTS 1
   FOLDER cpp/test/integration
 )
 
diff --git a/cppcache/integration/test/CacheXmlTest.cpp b/cppcache/integration/test/CacheXmlTest.cpp
index c70c9f9..91b74c3 100644
--- a/cppcache/integration/test/CacheXmlTest.cpp
+++ b/cppcache/integration/test/CacheXmlTest.cpp
@@ -17,26 +17,24 @@
 
 #include <framework/Cluster.h>
 #include <framework/Framework.h>
-#include <framework/Gfsh.h>
 #include <framework/TestConfig.h>
-#include <hacks/range.h>
-
-#include <iostream>
-#include <unordered_map>
 
 #include <gtest/gtest.h>
 
 #include <geode/Cache.hpp>
+#include <geode/PartitionResolver.hpp>
 #include <geode/PoolManager.hpp>
-#include <geode/QueryService.hpp>
-#include <geode/RegionFactory.hpp>
-#include <geode/RegionShortcut.hpp>
-#include <geode/Struct.hpp>
+#include <geode/Region.hpp>
+
+#include "cpp-integration-test_export.h"
 
 namespace {
 
 using apache::geode::client::Cache;
+using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheXmlException;
+using apache::geode::client::EntryEvent;
+using apache::geode::client::PartitionResolver;
 
 apache::geode::client::Cache createCacheUsingXmlConfig(
     const std::string& xmlFile) {
@@ -44,15 +42,32 @@
 
   CacheFactory cacheFactory;
 
-  auto cache = cacheFactory.set("log-level", "debug")
-                   .set("log-file", "geode_native.log")
+  auto cache = cacheFactory.set("log-level", "none")
                    .set("statistic-sampling-enabled", "false")
-                   .set("cache-xml-file", xmlFile.c_str())
+                   .set("cache-xml-file", xmlFile)
                    .create();
 
   return cache;
 }
 
+class TestAppPartitionResolver : public PartitionResolver {
+ public:
+  const std::string& getName() override {
+    static std::string name = "TestAppPartitionResolver";
+    return name;
+  }
+
+  std::shared_ptr<CacheableKey> getRoutingObject(const EntryEvent&) override {
+    return {};
+  }
+};
+}  // namespace
+
+extern "C" CPP_INTEGRATION_TEST_EXPORT PartitionResolver*
+CacheXmlTest_createAppPartitionResolver() {
+  return new TestAppPartitionResolver{};
+}
+
 /**
  * Example test using 2 servers and waiting for async tasks to synchronize using
  * furtures.
@@ -91,4 +106,27 @@
       .execute();
   EXPECT_THROW(createCacheUsingXmlConfig(cacheXml), CacheXmlException);
 }
-}  // namespace
+
+TEST(CacheXmlTest, testApplicationPartitionResolver) {
+  auto cache_xml = getFrameworkString(FrameworkVariable::NewTestResourcesDir) +
+                   std::string{"/pr_app_client_cache.xml"};
+  auto cache = createCacheUsingXmlConfig(cache_xml);
+
+  auto region = cache.getRegion("region");
+  auto pr = region->getAttributes().getPartitionResolver();
+
+  EXPECT_TRUE(pr);
+  EXPECT_EQ(pr->getName(), "TestAppPartitionResolver");
+}
+
+TEST(CacheXmlTest, testSharedLibPartitionResolver) {
+  auto cache_xml = getFrameworkString(FrameworkVariable::NewTestResourcesDir) +
+                   std::string{"/pr_lib_client_cache.xml"};
+  auto cache = createCacheUsingXmlConfig(cache_xml);
+
+  auto region = cache.getRegion("region");
+  auto pr = region->getAttributes().getPartitionResolver();
+
+  EXPECT_TRUE(pr);
+  EXPECT_EQ(pr->getName(), "TestLibPartitionResolver");
+}
diff --git a/cppcache/integration/test/CachingProxyTest.cpp b/cppcache/integration/test/CachingProxyTest.cpp
new file mode 100644
index 0000000..f6f0d83
--- /dev/null
+++ b/cppcache/integration/test/CachingProxyTest.cpp
@@ -0,0 +1,174 @@
+/*
+ * 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.
+ */
+
+#include <list>
+#include <thread>
+
+#include <gtest/gtest.h>
+
+#include <geode/Cache.hpp>
+#include <geode/CacheFactory.hpp>
+#include <geode/RegionFactory.hpp>
+#include <geode/RegionShortcut.hpp>
+#include <geode/Serializable.hpp>
+
+#include "framework/Cluster.h"
+
+using apache::geode::client::Cache;
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::Region;
+using apache::geode::client::RegionShortcut;
+using apache::geode::client::Serializable;
+
+TEST(CachingProxyTest, LocalRemoveAfterLocalInvalidate) {
+  Cluster cluster = Cluster{LocatorCount{1}, ServerCount{1}};
+  cluster.start();
+  cluster.getGfsh()
+      .create()
+      .region()
+      .withName("region")
+      .withType("PARTITION")
+      .execute();
+
+  auto cache = CacheFactory().create();
+
+  cache.getPoolManager()
+      .createFactory()
+      .addLocator("localhost", cluster.getLocatorPort())
+      .create("pool");
+
+  std::string key = std::string("scharles");
+  std::string value = std::string("Sylvia Charles");
+
+  auto region = cache.createRegionFactory(RegionShortcut::CACHING_PROXY)
+                    .setPoolName("pool")
+                    .create("region");
+
+  region->put(key, value);
+
+  auto user = region->get(key);
+
+  region->localInvalidate(key);
+
+  auto resultLocalRemove = region->localRemove(key, value);
+  ASSERT_FALSE(resultLocalRemove);
+
+  resultLocalRemove = region->localRemove(key, nullptr);
+  ASSERT_TRUE(resultLocalRemove);
+}
+
+TEST(CachingProxyTest, RemoveAfterInvalidate) {
+  Cluster cluster = Cluster{LocatorCount{1}, ServerCount{1}};
+  cluster.start();
+  cluster.getGfsh()
+      .create()
+      .region()
+      .withName("region")
+      .withType("PARTITION")
+      .execute();
+
+  auto cache = CacheFactory().create();
+
+  cache.getPoolManager()
+      .createFactory()
+      .addLocator("localhost", cluster.getLocatorPort())
+      .create("pool");
+
+  std::string key = std::string("scharles");
+  std::string value = std::string("Sylvia Charles");
+
+  auto region = cache.createRegionFactory(RegionShortcut::CACHING_PROXY)
+                    .setPoolName("pool")
+                    .create("region");
+
+  region->put(key, value);
+
+  region->invalidate(key);
+
+  auto resultRemove = region->remove(key, value);
+  ASSERT_FALSE(resultRemove);
+
+  resultRemove = region->remove(key, nullptr);
+  ASSERT_TRUE(resultRemove);
+}
+
+TEST(CachingProxyTest, RemoveAfterLocalInvalidate) {
+  Cluster cluster = Cluster{LocatorCount{1}, ServerCount{1}};
+  cluster.start();
+  cluster.getGfsh()
+      .create()
+      .region()
+      .withName("region")
+      .withType("PARTITION")
+      .execute();
+
+  auto cache = CacheFactory().create();
+
+  cache.getPoolManager()
+      .createFactory()
+      .addLocator("localhost", cluster.getLocatorPort())
+      .create("pool");
+
+  std::string key = std::string("scharles");
+  std::string value = std::string("Sylvia Charles");
+
+  auto region = cache.createRegionFactory(RegionShortcut::CACHING_PROXY)
+                    .setPoolName("pool")
+                    .create("region");
+
+  region->put(key, value);
+
+  region->localInvalidate(key);
+
+  auto resultRemove = region->remove(key, nullptr);
+  ASSERT_FALSE(resultRemove);
+
+  auto user = region->get(key);
+  ASSERT_EQ(std::dynamic_pointer_cast<CacheableString>(user)->value(), value);
+}
+
+TEST(CachingProxyTest, Remove) {
+  Cluster cluster = Cluster{LocatorCount{1}, ServerCount{1}};
+  cluster.start();
+  cluster.getGfsh()
+      .create()
+      .region()
+      .withName("region")
+      .withType("PARTITION")
+      .execute();
+
+  auto cache = CacheFactory().create();
+
+  cache.getPoolManager()
+      .createFactory()
+      .addLocator("localhost", cluster.getLocatorPort())
+      .create("pool");
+
+  std::string key = std::string("scharles");
+  std::string value = std::string("Sylvia Charles");
+
+  auto region = cache.createRegionFactory(RegionShortcut::CACHING_PROXY)
+                    .setPoolName("pool")
+                    .create("region");
+
+  region->put(key, value);
+
+  auto resultRemove = region->remove(key);
+  ASSERT_TRUE(resultRemove);
+}
diff --git a/cppcache/integration/test/ContainsKeyOnServerExceptionTest.cpp b/cppcache/integration/test/ContainsKeyOnServerExceptionTest.cpp
new file mode 100644
index 0000000..2a2dbd5
--- /dev/null
+++ b/cppcache/integration/test/ContainsKeyOnServerExceptionTest.cpp
@@ -0,0 +1,100 @@
+/*
+ * 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.
+ */
+#include <framework/Cluster.h>
+#include <framework/TestConfig.h>
+
+#include <geode/Cache.hpp>
+#include <geode/CacheFactory.hpp>
+#include <geode/CacheTransactionManager.hpp>
+#include <geode/RegionFactory.hpp>
+#include <geode/RegionShortcut.hpp>
+
+namespace {
+using apache::geode::client::Cache;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::CacheTransactionManager;
+using apache::geode::client::Pool;
+using apache::geode::client::Region;
+using apache::geode::client::RegionShortcut;
+
+std::string getClientLogName() {
+  std::string testSuiteName(::testing::UnitTest::GetInstance()
+                                ->current_test_info()
+                                ->test_suite_name());
+  std::string testCaseName(
+      ::testing::UnitTest::GetInstance()->current_test_info()->name());
+  std::string logFileName(testSuiteName + "/" + testCaseName + "/client.log");
+  return logFileName;
+}
+
+std::shared_ptr<Cache> createCache() {
+  auto cache = CacheFactory()
+                   .set("log-level", "none")
+                   .set("log-file", getClientLogName())
+                   .create();
+  return std::make_shared<Cache>(std::move(cache));
+}
+
+TEST(ContainsKeyOnServerExceptionTest, handleException) {
+  Cluster cluster{
+      LocatorCount{1}, ServerCount{3}, ConserveSockets(true),
+      CacheXMLFiles({
+          std::string(getFrameworkString(FrameworkVariable::TestCacheXmlDir)) +
+              "/cacheserver1_fpr_transaction.xml",
+          std::string(getFrameworkString(FrameworkVariable::TestCacheXmlDir)) +
+              "/cacheserver2_fpr_transaction.xml",
+          std::string(getFrameworkString(FrameworkVariable::TestCacheXmlDir)) +
+              "/cacheserver3_fpr_transaction.xml",
+      })};
+  cluster.start([&]() {
+    cluster.getGfsh()
+        .deploy()
+        .jar(getFrameworkString(FrameworkVariable::JavaObjectJarPath))
+        .execute();
+  });
+
+  auto cache = createCache();
+  auto poolFactory = cache->getPoolManager().createFactory();
+  ServerAddress serverAddress = cluster.getServers()[0].getAddress();
+  serverAddress.port = 40401;
+  cluster.applyServer(poolFactory, serverAddress);
+  auto pool = poolFactory.create("default");
+  auto region = cache->createRegionFactory(RegionShortcut::PROXY)
+                    .setPoolName("default")
+                    .create("region");
+
+  auto transactionManager = cache->getCacheTransactionManager();
+
+  // this key will be always routed towards server[1]
+  int theKey = 7;
+  std::string theValue = "theValue";
+  try {
+    transactionManager->begin();
+    region->put(theKey, theValue);
+    transactionManager->commit();
+  } catch (...) {
+    EXPECT_THROW(
+        region->containsKeyOnServer(CacheableKey::create(7)),
+        apache::geode::client::TransactionDataNodeHasDepartedException);
+  }
+
+  EXPECT_FALSE(region->containsKey(7));
+}
+
+}  // namespace
diff --git a/cppcache/integration/test/CqPlusAuthInitializeTest.cpp b/cppcache/integration/test/CqPlusAuthInitializeTest.cpp
index f29b038..be0e65c 100644
--- a/cppcache/integration/test/CqPlusAuthInitializeTest.cpp
+++ b/cppcache/integration/test/CqPlusAuthInitializeTest.cpp
@@ -61,11 +61,24 @@
 using std::chrono::minutes;
 
 const int32_t CQ_PLUS_AUTH_TEST_REGION_ENTRY_COUNT = 50000;
+const int32_t CQ_REAUTH_TEST_REGION_ENTRY_COUNT = 5000;
 
 Cache createCache(std::shared_ptr<SimpleAuthInitialize> auth) {
   auto cache = CacheFactory()
-                   .set("log-level", "debug")
-                   .set("log-file", "geode_native.log")
+                   .set("log-level", "none")
+                   .set("statistic-sampling-enabled", "false")
+                   .setAuthInitialize(auth)
+                   .create();
+
+  return cache;
+}
+
+Cache createDurableCache(std::shared_ptr<SimpleAuthInitialize> auth) {
+  auto pp = Properties::create();
+  pp->insert("durable-client-id", "DurableClient-1111");
+  pp->insert("durable-timeout", std::chrono::seconds(600));
+  auto cache = CacheFactory(pp)
+                   .set("log-level", "none")
                    .set("statistic-sampling-enabled", "false")
                    .setAuthInitialize(auth)
                    .create();
@@ -98,7 +111,7 @@
   Cluster cluster(
       Name(std::string(::testing::UnitTest::GetInstance()
                            ->current_test_info()
-                           ->test_case_name()) +
+                           ->test_suite_name()) +
            "/" +
            ::testing::UnitTest::GetInstance()->current_test_info()->name()),
       Classpath{getFrameworkString(FrameworkVariable::JavaObjectJarPath)},
@@ -203,4 +216,178 @@
   EXPECT_GT(authInitialize->getGetCredentialsCallCount(), 0);
 }
 
+TEST(CqPlusAuthInitializeTest, DISABLED_reAuthenticateWithDurable) {
+  // Start a cluster with user expiration support
+
+  Cluster cluster(
+      Name(std::string(::testing::UnitTest::GetInstance()
+                           ->current_test_info()
+                           ->test_suite_name()) +
+           "/" +
+           ::testing::UnitTest::GetInstance()->current_test_info()->name()),
+      Classpath{getFrameworkString(FrameworkVariable::JavaObjectJarPath)},
+      SecurityManager{"javaobject.SimulatedExpirationSecurityManager"},
+      User{"root"}, Password{"root-password"}, LocatorCount{1}, ServerCount{1});
+
+  cluster.start();
+
+  cluster.getGfsh()
+      .create()
+      .region()
+      .withName("region")
+      .withType("PARTITION")
+      .execute();
+
+  // Use a non-root user for reAuthentication testing.
+
+  auto authInitialize =
+      std::make_shared<SimpleAuthInitialize>("user", "user-password");
+  auto cache = createDurableCache(authInitialize);
+  auto pool = createPool(cluster, cache, true);
+  auto region = setupRegion(cache, pool);
+
+  try {
+    region->put("foo", "bar");
+  } catch (const Exception& ex) {
+    std::cerr << "Caught exception: " << ex.what() << std::endl;
+    std::cerr << "In initial region put" << std::endl;
+    std::cerr << "Callstack" << ex.getStackTrace() << std::endl;
+    FAIL();
+  }
+
+  auto queryService = cache.getQueryService();
+
+  auto createLatch =
+      std::make_shared<boost::latch>(CQ_REAUTH_TEST_REGION_ENTRY_COUNT);
+  auto updateLatch =
+      std::make_shared<boost::latch>(CQ_REAUTH_TEST_REGION_ENTRY_COUNT);
+  auto destroyLatch =
+      std::make_shared<boost::latch>(CQ_REAUTH_TEST_REGION_ENTRY_COUNT);
+  auto testListener = std::make_shared<SimpleCqListener>(
+      createLatch, updateLatch, destroyLatch);
+
+  CqAttributesFactory attributesFactory;
+  attributesFactory.addCqListener(testListener);
+  auto cqAttributes = attributesFactory.create();
+
+  auto query = queryService->newCq("SimpleCQ", "SELECT * FROM /region",
+                                   cqAttributes, true);
+
+  try {
+    query->execute();
+  } catch (const Exception& ex) {
+    std::cerr << "Caught exception: " << ex.what() << std::endl;
+    std::cerr << "While executing Cq" << std::endl;
+    std::cerr << "Callstack" << ex.getStackTrace() << std::endl;
+    FAIL();
+  }
+
+  int32_t i = 0;
+
+  cache.readyForEvents();
+
+  try {
+    for (i = 0; i < CQ_REAUTH_TEST_REGION_ENTRY_COUNT; i++) {
+      region->put("key" + std::to_string(i), "value" + std::to_string(i));
+      std::this_thread::yield();
+    }
+  } catch (const Exception& ex) {
+    std::cerr << "Caught exception: " << ex.what() << std::endl;
+    std::cerr << "In value create loop, i=" << i << std::endl;
+    std::cerr << "Callstack" << ex.getStackTrace() << std::endl;
+    FAIL();
+  }
+
+  try {
+    for (i = 0; i < CQ_REAUTH_TEST_REGION_ENTRY_COUNT; i++) {
+      region->put("key" + std::to_string(i), "value" + std::to_string(i + 1));
+      std::this_thread::yield();
+    }
+  } catch (const Exception& ex) {
+    std::cerr << "Caught exception: " << ex.what() << std::endl;
+    std::cerr << "In value update loop, i=" << i << std::endl;
+    std::cerr << "Callstack" << ex.getStackTrace() << std::endl;
+    FAIL();
+  }
+
+  try {
+    for (i = 0; i < CQ_REAUTH_TEST_REGION_ENTRY_COUNT; i++) {
+      region->destroy("key" + std::to_string(i));
+      std::this_thread::yield();
+    }
+  } catch (const Exception& ex) {
+    std::cerr << "Caught exception: " << ex.what() << std::endl;
+    std::cerr << "In value destroy loop, i=" << i << std::endl;
+    std::cerr << "Callstack" << ex.getStackTrace() << std::endl;
+    FAIL();
+  }
+
+  EXPECT_EQ(boost::cv_status::no_timeout,
+            createLatch->wait_for(boost::chrono::seconds(90)));
+  EXPECT_EQ(boost::cv_status::no_timeout,
+            updateLatch->wait_for(boost::chrono::seconds(90)));
+  EXPECT_EQ(boost::cv_status::no_timeout,
+            destroyLatch->wait_for(boost::chrono::seconds(90)));
+
+  // SimulatedExpirationSecurityManager is set to throw
+  // AuthenticationExpiredException for 1% of operations.
+  // If the random number generator were perfect we'd expect reauth
+  // to happen for 1% of the operations. Back it off to .5% since
+  // it's not perfect.
+  //
+  // Number of operations is 3 * CQ_REAUTH_TEST_REGION_ENTRY_COUNT
+  // since doing put, update, and destory.
+
+  EXPECT_GT(authInitialize->getGetCredentialsCallCount(),
+            3 * CQ_REAUTH_TEST_REGION_ENTRY_COUNT * .005);
+
+  // Keep the durable messages so we can test getting them back
+  // on reconnect.
+
+  cache.close(true);
+
+  // Create a new durable cache with the same durable-client-id and
+  // ensure we get all the events that were created.
+
+  auto cacheRecovery = createDurableCache(authInitialize);
+  auto poolRecovery = createPool(cluster, cacheRecovery, true);
+  auto regionRecovery = setupRegion(cacheRecovery, poolRecovery);
+
+  auto queryServiceRecovery = cacheRecovery.getQueryService();
+
+  auto createLatchRecovery =
+      std::make_shared<boost::latch>(CQ_REAUTH_TEST_REGION_ENTRY_COUNT);
+  auto updateLatchRecovery =
+      std::make_shared<boost::latch>(CQ_REAUTH_TEST_REGION_ENTRY_COUNT);
+  auto destroyLatchRecovery =
+      std::make_shared<boost::latch>(CQ_REAUTH_TEST_REGION_ENTRY_COUNT);
+  auto testListenerRecovery = std::make_shared<SimpleCqListener>(
+      createLatchRecovery, updateLatchRecovery, destroyLatchRecovery);
+
+  CqAttributesFactory attributesFactoryRecovery;
+  attributesFactoryRecovery.addCqListener(testListenerRecovery);
+  auto cqAttributesRecovery = attributesFactoryRecovery.create();
+
+  auto queryRecovery = queryServiceRecovery->newCq(
+      "SimpleCQ", "SELECT * FROM /region", cqAttributesRecovery, true);
+
+  try {
+    queryRecovery->execute();
+  } catch (const Exception& ex) {
+    std::cerr << "Caught exception: " << ex.what() << std::endl;
+    std::cerr << "While executing Cq" << std::endl;
+    std::cerr << "Callstack" << ex.getStackTrace() << std::endl;
+    FAIL();
+  }
+
+  cacheRecovery.readyForEvents();
+
+  EXPECT_EQ(boost::cv_status::no_timeout,
+            createLatchRecovery->wait_for(boost::chrono::seconds(90)));
+  EXPECT_EQ(boost::cv_status::no_timeout,
+            updateLatchRecovery->wait_for(boost::chrono::seconds(90)));
+  EXPECT_EQ(boost::cv_status::no_timeout,
+            destroyLatchRecovery->wait_for(boost::chrono::seconds(90)));
+}
+
 }  // namespace
diff --git a/cppcache/integration/test/DataSerializableTest.cpp b/cppcache/integration/test/DataSerializableTest.cpp
index e413369..77e514a 100644
--- a/cppcache/integration/test/DataSerializableTest.cpp
+++ b/cppcache/integration/test/DataSerializableTest.cpp
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 
+#include <list>
 #include <thread>
 
 #include <gtest/gtest.h>
@@ -22,19 +23,23 @@
 #include <geode/DataInput.hpp>
 #include <geode/DataOutput.hpp>
 #include <geode/DataSerializable.hpp>
+#include <geode/FunctionService.hpp>
 #include <geode/RegionFactory.hpp>
 #include <geode/RegionShortcut.hpp>
 #include <geode/TypeRegistry.hpp>
 
+#include "Position.hpp"
+#include "PositionKey.hpp"
 #include "framework/Cluster.h"
 
-namespace {
+namespace DataSerializableTest {
 
 using apache::geode::client::CacheableString;
 using apache::geode::client::CacheableStringArray;
 using apache::geode::client::DataInput;
 using apache::geode::client::DataOutput;
 using apache::geode::client::DataSerializable;
+using apache::geode::client::FunctionService;
 using apache::geode::client::RegionShortcut;
 
 class Simple : public DataSerializable {
@@ -162,4 +167,62 @@
               returnedArray->operator[](index)->toString());
   }
 }
-}  // namespace
+
+TEST(DataSerializableTest, ClassAsKey) {
+  Cluster cluster{LocatorCount{1}, ServerCount{1}};
+
+  cluster.start();
+
+  cluster.getGfsh()
+      .create()
+      .region()
+      .withName("region")
+      .withType("PARTITION")
+      .execute();
+
+  cluster.getGfsh()
+      .deploy()
+      .jar(getFrameworkString(FrameworkVariable::JavaObjectJarPath))
+      .execute();
+
+  cluster.getGfsh()
+      .executeFunction()
+      .withId("InstantiateDataSerializable")
+      .withMember("DataSerializableTest_ClassAsKey_server_0")
+      .execute();
+
+  auto cache = cluster.createCache();
+  auto region = cache.createRegionFactory(RegionShortcut::PROXY)
+                    .setPoolName("default")
+                    .create("region");
+
+  cache.getTypeRegistry().registerType(PositionKey::createDeserializable, 21);
+  cache.getTypeRegistry().registerType(Position::createDeserializable, 22);
+
+  auto key1 = std::make_shared<PositionKey>(1000);
+  auto key2 = std::make_shared<PositionKey>(1000000);
+  auto key3 = std::make_shared<PositionKey>(1000000000);
+
+  auto pos1 = std::make_shared<Position>("GOOG", 23);
+  auto pos2 = std::make_shared<Position>("IBM", 37);
+  auto pos3 = std::make_shared<Position>("PVTL", 101);
+
+  region->put(key1, pos1);
+  region->put(key2, pos2);
+  region->put(key3, pos3);
+
+  auto res1 = std::dynamic_pointer_cast<Position>(region->get(key1));
+  auto res2 = std::dynamic_pointer_cast<Position>(region->get(key2));
+  auto res3 = std::dynamic_pointer_cast<Position>(region->get(key3));
+
+  EXPECT_EQ(res1->getSecurityId(), pos1->getSecurityId());
+  EXPECT_EQ(res1->getSharesOutstanding(), pos1->getSharesOutstanding());
+
+  EXPECT_EQ(res2->getSecurityId(), pos2->getSecurityId());
+  EXPECT_EQ(res2->getSharesOutstanding(), pos2->getSharesOutstanding());
+
+  EXPECT_EQ(res3->getSecurityId(), pos3->getSecurityId());
+  EXPECT_EQ(res3->getSharesOutstanding(), pos3->getSharesOutstanding());
+}
+
+}  // namespace DataSerializableTest
diff --git a/cppcache/integration/test/DisconnectEndPointAtException.cpp b/cppcache/integration/test/DisconnectEndPointAtException.cpp
new file mode 100644
index 0000000..b38969c
--- /dev/null
+++ b/cppcache/integration/test/DisconnectEndPointAtException.cpp
@@ -0,0 +1,178 @@
+/*
+ * 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.
+ */
+#include <framework/Cluster.h>
+#include <framework/Gfsh.h>
+#include <framework/TestConfig.h>
+
+#include <CacheImpl.hpp>
+#include <CacheRegionHelper.hpp>
+#include <TcrConnectionManager.hpp>
+#include <TcrEndpoint.hpp>
+#include <thread>
+
+#include <geode/Cache.hpp>
+#include <geode/CacheFactory.hpp>
+#include <geode/CacheTransactionManager.hpp>
+#include <geode/Region.hpp>
+#include <geode/RegionFactory.hpp>
+#include <geode/RegionShortcut.hpp>
+
+namespace {
+using apache::geode::client::Cache;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::CacheImpl;
+using apache::geode::client::CacheRegionHelper;
+using apache::geode::client::CacheTransactionManager;
+using apache::geode::client::Pool;
+using apache::geode::client::Region;
+using apache::geode::client::RegionShortcut;
+using apache::geode::client::TcrConnectionManager;
+using apache::geode::client::TcrEndpoint;
+
+std::shared_ptr<Cache> createCache() {
+  auto cache = CacheFactory().create();
+  return std::make_shared<Cache>(std::move(cache));
+}
+
+std::shared_ptr<Pool> createPool(Cluster& cluster, std::shared_ptr<Cache> cache,
+                                 bool useSingleHop) {
+  auto poolFactory = cache->getPoolManager().createFactory();
+  cluster.applyLocators(poolFactory);
+  poolFactory.setPRSingleHopEnabled(useSingleHop);
+  return poolFactory.create("default");
+}
+
+std::string addKeyPrefix(int key) {
+  return std::to_string(key) + "|" + std::to_string(key);
+}
+
+void runOperationsUntilServerDisconnects(std::shared_ptr<Cache> cache,
+                                         std::shared_ptr<Region> region,
+                                         int minEntryKey, int maxEntryKey,
+                                         bool usingPartitionResolver,
+                                         CacheImpl* cacheImpl,
+                                         std::string epShutDownHostname) {
+  auto transactionManager = cache->getCacheTransactionManager();
+
+  auto end = std::chrono::system_clock::now() + std::chrono::minutes(2);
+  bool isTimeoutUpdated = false;
+  do {
+    auto theKey = (rand() % (maxEntryKey - minEntryKey)) + minEntryKey;
+    std::string theValue = "theValue";
+    try {
+      transactionManager->begin();
+      if (usingPartitionResolver) {
+        region->put(addKeyPrefix(theKey), theValue);
+      } else {
+        region->put(theKey, theValue);
+      }
+      transactionManager->commit();
+    } catch (...) {
+      if (transactionManager->exists()) {
+        transactionManager->rollback();
+      }
+    }
+
+    int isShutDown = cacheImpl->getNumberOfTimeEndpointDisconnected(
+        epShutDownHostname, "default");
+
+    // After server disconnects then send traffic for 15 more seconds
+    if (isShutDown != 0 && !isTimeoutUpdated) {
+      end = std::chrono::system_clock::now() + std::chrono::seconds(15);
+      isTimeoutUpdated = true;
+    }
+  } while (std::chrono::system_clock::now() < end);
+}
+
+std::string getConcatHostName(ServerAddress address) {
+  std::string hostname;
+  return hostname.append(address.address)
+      .append(":")
+      .append(std::to_string(address.port));
+}
+
+void executeTestCase(bool useSingleHopAndPR) {
+  int NUM_THREADS = 4;
+  int MAX_ENTRY_KEY = 1000000;
+  auto keyRangeSize = (MAX_ENTRY_KEY / NUM_THREADS);
+
+  Cluster cluster{
+      InitialLocators{{{"localhost", Framework::getAvailablePort()}}},
+      InitialServers{{{"localhost", Framework::getAvailablePort()},
+                      {"localhost", Framework::getAvailablePort()}}}};
+  cluster.start();
+  auto region_cmd =
+      cluster.getGfsh().create().region().withName("region").withType(
+          "PARTITION");
+  if (useSingleHopAndPR) {
+    region_cmd
+        .withPartitionResolver(
+            "org.apache.geode.cache.util.StringPrefixPartitionResolver")
+        .execute();
+  } else {
+    region_cmd.execute();
+  }
+
+  auto cache = createCache();
+  auto pool = createPool(cluster, cache, useSingleHopAndPR);
+  auto region = cache->createRegionFactory(RegionShortcut::PROXY)
+                    .setPoolName("default")
+                    .create("region");
+
+  // Get address of server that will remain running
+  auto epRunning = cluster.getServers()[0].getAddress();
+  auto epRunningHostname = getConcatHostName(epRunning);
+
+  // Get address of server that will be shutdown
+  auto epShutDown = cluster.getServers()[1].getAddress();
+  auto epShutDownHostname = getConcatHostName(epShutDown);
+
+  auto cacheImpl = CacheRegionHelper::getCacheImpl(cache.get());
+
+  std::vector<std::thread> clientThreads;
+  for (int i = 0; i < NUM_THREADS; i++) {
+    auto minKey = (i * keyRangeSize);
+    auto maxKey = minKey + keyRangeSize - 1;
+    std::thread th(runOperationsUntilServerDisconnects, cache, region, minKey,
+                   maxKey, useSingleHopAndPR, cacheImpl, epShutDownHostname);
+    clientThreads.push_back(std::move(th));
+  }
+  // Shut down the server
+  cluster.getServers()[1].stop();
+
+  for (std::thread& th : clientThreads) {
+    if (th.joinable()) {
+      th.join();
+    }
+  }
+  ASSERT_EQ(cacheImpl->getNumberOfTimeEndpointDisconnected(epRunningHostname,
+                                                           "default"),
+            0);
+  ASSERT_EQ(cacheImpl->getNumberOfTimeEndpointDisconnected(epShutDownHostname,
+                                                           "default"),
+            1);
+}  // executeTestCase
+
+TEST(DisconnectEndPointAtException, useSingleHopAndPR) {
+  executeTestCase(true);
+}
+
+TEST(DisconnectEndPointAtException, doNotUseSingleHopAndPR) {
+  executeTestCase(false);
+}
+}  // namespace
diff --git a/cppcache/integration/test/FunctionExecutionTest.cpp b/cppcache/integration/test/FunctionExecutionTest.cpp
index f1cc760..bc509b8 100644
--- a/cppcache/integration/test/FunctionExecutionTest.cpp
+++ b/cppcache/integration/test/FunctionExecutionTest.cpp
@@ -14,6 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include <CacheImpl.hpp>
+#include <chrono>
+#include <thread>
+
 #include <gtest/gtest.h>
 
 #include <geode/Cache.hpp>
@@ -25,6 +29,7 @@
 #include <geode/RegionFactory.hpp>
 #include <geode/RegionShortcut.hpp>
 
+#include "CacheRegionHelper.hpp"
 #include "framework/Cluster.h"
 #include "framework/Gfsh.h"
 #include "framework/TestConfig.h"
@@ -32,9 +37,13 @@
 using apache::geode::client::Cache;
 using apache::geode::client::Cacheable;
 using apache::geode::client::CacheableArrayList;
+using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
 using apache::geode::client::CacheableVector;
 using apache::geode::client::CacheFactory;
+using apache::geode::client::CacheImpl;
+using apache::geode::client::CacheRegionHelper;
+using apache::geode::client::Exception;
 using apache::geode::client::FunctionExecutionException;
 using apache::geode::client::FunctionService;
 using apache::geode::client::NotConnectedException;
@@ -42,6 +51,7 @@
 using apache::geode::client::RegionShortcut;
 using apache::geode::client::ResultCollector;
 const int ON_SERVERS_TEST_REGION_ENTRIES_SIZE = 34;
+const int PARTITION_REGION_ENTRIES_SIZE = 113;
 
 std::shared_ptr<Region> setupRegion(Cache &cache) {
   auto region = cache.createRegionFactory(RegionShortcut::PROXY)
@@ -52,16 +62,28 @@
 }
 
 class TestResultCollector : public ResultCollector {
+ private:
+  std::shared_ptr<CacheableVector> resultList;
+
+ public:
+  TestResultCollector() : resultList(CacheableVector::create()) {}
+
   virtual std::shared_ptr<CacheableVector> getResult(
       std::chrono::milliseconds) override {
-    return std::shared_ptr<CacheableVector>();
+    return resultList;
   }
 
-  virtual void addResult(const std::shared_ptr<Cacheable> &) override {}
+  virtual void addResult(const std::shared_ptr<Cacheable> &result) override {
+    resultList->push_back(result);
+  }
 
   virtual void endResults() override {}
 
-  virtual void clearResults() override {}
+  // Do not clear in order to detect duplicate results
+  virtual void clearResults() override {
+    throw Exception(
+        "Clear should not be triggered when Function.isHa is set to false");
+  }
 };
 
 TEST(FunctionExecutionTest, UnknownFunctionOnServer) {
@@ -175,6 +197,95 @@
   cache.close();
 }
 
+void populateRegion(const std::shared_ptr<Region> &region) {
+  for (int i = 0; i < PARTITION_REGION_ENTRIES_SIZE; i++) {
+    region->put("KEY--" + std::to_string(i), "VALUE--" + std::to_string(i));
+  }
+}
+
+void waitUntilPRMetadataIsRefreshed(CacheImpl *cacheImpl) {
+  auto end = std::chrono::system_clock::now() + std::chrono::minutes(2);
+  while (!cacheImpl->getAndResetPrMetadataUpdatedFlag()) {
+    std::this_thread::sleep_for(std::chrono::milliseconds(200));
+    ASSERT_FALSE(std::chrono::system_clock::now() > end);
+  }
+}
+
+TEST(FunctionExecutionTest, FunctionExecutionWithIncompleteBucketLocations) {
+  Cluster cluster{
+      InitialLocators{{{"localhost", Framework::getAvailablePort()}}},
+      InitialServers{{{"localhost", Framework::getAvailablePort()},
+                      {"localhost", Framework::getAvailablePort()},
+                      {"localhost", Framework::getAvailablePort()}}}};
+
+  cluster.start([&]() {
+    cluster.getGfsh()
+        .deploy()
+        .jar(getFrameworkString(FrameworkVariable::JavaObjectJarPath))
+        .execute();
+  });
+
+  cluster.getGfsh()
+      .create()
+      .region()
+      .withName("partition_region")
+      .withType("PARTITION")
+      .execute();
+
+  auto cache = CacheFactory().create();
+  auto poolFactory = cache.getPoolManager().createFactory();
+
+  ServerAddress serverAddress = cluster.getServers()[2].getAddress();
+  cluster.applyServer(poolFactory, serverAddress);
+
+  auto pool =
+      poolFactory.setPRSingleHopEnabled(true).setRetryAttempts(0).create(
+          "pool");
+
+  auto region = cache.createRegionFactory(RegionShortcut::PROXY)
+                    .setPoolName("pool")
+                    .create("partition_region");
+
+  // Populate region in a way that not all buckets are created.
+  // Servers in this case will create 88 of possible 113 buckets.
+  populateRegion(region);
+
+  // Check that PR metadata is updated. This is done to be sure
+  // that client will execute function in a non single hop manner
+  // because metadata doesn't contain all bucket locations.
+  // After metadata is refreshed, it will contain at least one
+  // bucket location.
+  CacheImpl *cacheImpl = CacheRegionHelper::getCacheImpl(&cache);
+  waitUntilPRMetadataIsRefreshed(cacheImpl);
+
+  auto functionService = FunctionService::onRegion(region);
+  auto rc =
+      functionService.withCollector(std::make_shared<TestResultCollector>())
+          .execute("MultiGetAllFunctionNonHA");
+
+  std::shared_ptr<TestResultCollector> resultCollector =
+      std::dynamic_pointer_cast<TestResultCollector>(rc);
+
+  // check that PR metadata is updated after function is executed
+  waitUntilPRMetadataIsRefreshed(cacheImpl);
+
+  // check that correct nubmer of events is received in function result
+  auto result = rc->getResult(std::chrono::milliseconds(0));
+  ASSERT_EQ(result->size(), PARTITION_REGION_ENTRIES_SIZE);
+
+  cache.close();
+}
+
+std::shared_ptr<CacheableVector> populateRegionReturnFilter(
+    const std::shared_ptr<Region> &region, const int numberOfPuts) {
+  auto routingObj = CacheableVector::create();
+  for (int i = 0; i < numberOfPuts; i++) {
+    region->put("KEY--" + std::to_string(i), "VALUE--" + std::to_string(i));
+    routingObj->push_back(CacheableKey::create("KEY--" + std::to_string(i)));
+  }
+  return routingObj;
+}
+
 const std::vector<std::string> serverResultsToStrings(
     std::shared_ptr<CacheableVector> serverResults) {
   std::vector<std::string> resultList;
@@ -191,6 +302,123 @@
 
   return resultList;
 }
+
+TEST(FunctionExecutionTest, testThatFunctionExecutionThrowsExceptionNonHA) {
+  Cluster cluster{
+      InitialLocators{{{"localhost", Framework::getAvailablePort()}}},
+      InitialServers{{{"localhost", Framework::getAvailablePort()},
+                      {"localhost", Framework::getAvailablePort()},
+                      {"localhost", Framework::getAvailablePort()}}}};
+
+  cluster.start([&]() {
+    cluster.getGfsh()
+        .deploy()
+        .jar(getFrameworkString(FrameworkVariable::JavaObjectJarPath))
+        .execute();
+  });
+
+  cluster.getGfsh()
+      .create()
+      .region()
+      .withName("partition_region")
+      .withType("PARTITION")
+      .execute();
+
+  cluster.getServers()[2].stop();
+
+  auto cache = CacheFactory().create();
+  auto poolFactory = cache.getPoolManager().createFactory();
+
+  ServerAddress serverAddress = cluster.getServers()[1].getAddress();
+  cluster.applyServer(poolFactory, serverAddress);
+
+  auto pool = poolFactory.setPRSingleHopEnabled(true).create("pool");
+
+  auto region = cache.createRegionFactory(RegionShortcut::PROXY)
+                    .setPoolName("pool")
+                    .create("partition_region");
+
+  populateRegionReturnFilter(region, 1000);
+  //  Start the the server
+  cluster.getServers()[2].start();
+
+  // Do the rebalance, so that primary buckets
+  // are transferred to the newly added server
+  cluster.getGfsh().rebalance().execute();
+
+  // InternalFunctionInvocationTargetException will happen
+  // on servers, because client will try to execute the single-hop function
+  // using old PR metadata (PR metadata before rebalance operation)
+  // Client in this case should throw exception. Also client should not trigger
+  // ResultCollector::clear results. If this happens then TestResultCollector
+  // will throw the exception (Exception) and case will fail.
+  bool isExceptionTriggered = false;
+  auto functionService = FunctionService::onRegion(region);
+  auto execute =
+      functionService.withCollector(std::make_shared<TestResultCollector>());
+  ASSERT_THROW(execute.execute("MultiGetAllFunctionNonHA"),
+               FunctionExecutionException);
+}
+
+TEST(FunctionExecutionTest,
+     testThatFunctionExecutionThrowsExceptionNonHAWithFilter) {
+  Cluster cluster{
+      InitialLocators{{{"localhost", Framework::getAvailablePort()}}},
+      InitialServers{{{"localhost", Framework::getAvailablePort()},
+                      {"localhost", Framework::getAvailablePort()},
+                      {"localhost", Framework::getAvailablePort()}}}};
+
+  cluster.start([&]() {
+    cluster.getGfsh()
+        .deploy()
+        .jar(getFrameworkString(FrameworkVariable::JavaObjectJarPath))
+        .execute();
+  });
+
+  cluster.getGfsh()
+      .create()
+      .region()
+      .withName("partition_region")
+      .withType("PARTITION")
+      .execute();
+
+  cluster.getServers()[2].stop();
+
+  auto cache = CacheFactory().create();
+  auto poolFactory = cache.getPoolManager().createFactory();
+
+  ServerAddress serverAddress = cluster.getServers()[1].getAddress();
+  cluster.applyServer(poolFactory, serverAddress);
+
+  auto pool = poolFactory.setPRSingleHopEnabled(true).create("pool");
+
+  auto region = cache.createRegionFactory(RegionShortcut::PROXY)
+                    .setPoolName("pool")
+                    .create("partition_region");
+
+  auto filter = populateRegionReturnFilter(region, 1000);
+
+  //  Start the the server
+  cluster.getServers()[2].start();
+
+  // Do the rebalance, so that primary buckets
+  // are transferred to the newly added server
+  cluster.getGfsh().rebalance().execute();
+
+  // InternalFunctionInvocationTargetException will happen
+  // on servers, because client will try to execute the single-hop function
+  // using old PR metadata (PR metadata before rebalance operation)
+  // Client in this case should throw exception. Also client should not trigger
+  // ResultCollector::clear results. If this happens then TestResultCollector
+  // will throw the exception (Exception) and test case will fail.
+  auto functionService = FunctionService::onRegion(region);
+  auto execute =
+      functionService.withCollector(std::make_shared<TestResultCollector>())
+          .withFilter(filter);
+  ASSERT_THROW(execute.execute("MultiGetAllFunctionNonHA"),
+               FunctionExecutionException);
+}
+
 TEST(FunctionExecutionTest, OnServersWithReplicatedRegionsInPool) {
   Cluster cluster{
       LocatorCount{1}, ServerCount{2},
@@ -247,8 +475,9 @@
 
   for (decltype(resultList.size()) i = 0;
        i < ON_SERVERS_TEST_REGION_ENTRIES_SIZE / 2; i++) {
-    // Each entry in the first result set (first half of this vector) should be
-    // equal to its corresponding entry in the second set (2nd half of vector)
+    // Each entry in the first result set (first half of this vector) should
+    // be equal to its corresponding entry in the second set (2nd half of
+    // vector)
     ASSERT_EQ(resultList[i],
               resultList[i + ON_SERVERS_TEST_REGION_ENTRIES_SIZE / 2]);
   }
@@ -301,7 +530,7 @@
         .execute();
   });
 
-  auto cache = CacheFactory().set("log-level", "debug").create();
+  auto cache = CacheFactory().set("log-level", "none").create();
   auto poolFactory = cache.getPoolManager().createFactory();
 
   cluster.applyLocators(poolFactory);
diff --git a/cppcache/integration/test/HARegionCacheListenerARLEPDTest.cpp b/cppcache/integration/test/HARegionCacheListenerARLEPDTest.cpp
new file mode 100644
index 0000000..799b81d
--- /dev/null
+++ b/cppcache/integration/test/HARegionCacheListenerARLEPDTest.cpp
@@ -0,0 +1,221 @@
+/*
+ * 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.
+ */
+
+#include <framework/Cluster.h>
+#include <framework/Framework.h>
+#include <framework/Gfsh.h>
+#include <gmock/gmock.h>
+
+#include <future>
+#include <iostream>
+#include <random>
+#include <thread>
+
+#include <boost/log/core.hpp>
+
+#include <gtest/gtest.h>
+
+#include <geode/AttributesMutator.hpp>
+#include <geode/Cache.hpp>
+#include <geode/CacheListener.hpp>
+#include <geode/EntryEvent.hpp>
+#include <geode/PoolManager.hpp>
+#include <geode/RegionEvent.hpp>
+#include <geode/RegionFactory.hpp>
+#include <geode/RegionShortcut.hpp>
+
+#include "mock/CacheListenerMock.hpp"
+#include "utility/make_unique.hpp"
+
+namespace {
+class HARegionCacheListenerARLEPDTest : public ::testing::Test {
+ protected:
+  static ::std::unique_ptr<::Cluster> cluster_;
+  /* Cache listener mocks make a circular reference to the region, and the
+   * region retains a circular reference back to the cache. The reference is
+   * established when a callback is called and is resolved when the mock is
+   * verified and cleared. The circular reference prevents the cache from
+   * falling out of scope and shutting down, and it prevents the mock instance
+   * from verifying and clearing itself. You have to manually verify and clear
+   * the mock at the end of every test. */
+  static ::std::shared_ptr<::apache::geode::client::Nice_MockListener>
+      listener_;
+  static ::std::unique_ptr<::apache::geode::client::Cache> cache_;
+  static ::std::shared_ptr<::apache::geode::client::Region> region_;
+
+  /* Surprise! There are different code paths for event callbacks. Some are
+  sequential, the result of a server response; Some of them are concurrent - the
+  result of a server message.
+
+  TODO: Build out both sequential and concurrent listener events. */
+  ::std::mutex cv_m_;
+  ::std::condition_variable cv_;
+  bool verified_;
+  std::function<void(const apache::geode::client::RegionEvent &)>
+      verify_the_regionevent_callback;
+  std::function<void(const apache::geode::client::EntryEvent &)>
+      verify_the_entryevent_callback;
+  std::function<bool()> the_verification_condition;
+
+  /* SetUp and TearDown happen after test fixture construction and before test
+   * fixture destruction to avoid superious noise in the mock. */
+  void SetUp() override {
+    ::apache::geode::client::AttributesMutator(region_).setCacheListener(
+        listener_);
+  }
+
+  void TearDown() override {
+    ::apache::geode::client::AttributesMutator(region_).setCacheListener({});
+
+    ::testing::Mock::VerifyAndClearExpectations(
+        listener_.get());  // Just to make sure it's clean for the next test.
+  }
+
+  HARegionCacheListenerARLEPDTest()
+      : verified_{false},
+        verify_the_regionevent_callback{::testing::Invoke(
+            this,
+            &HARegionCacheListenerARLEPDTest::verify_regionevent_callback)},
+        verify_the_entryevent_callback{::testing::Invoke(
+            this,
+            &HARegionCacheListenerARLEPDTest::verify_entryevent_callback)},
+        the_verification_condition{
+            std::bind(&HARegionCacheListenerARLEPDTest::is_verified, this)} {
+    create_the_test_region();
+
+    // Assure we've already received an afterRegionLive event by creating the
+    // region. Then destroy it for the test.
+    cluster_->getGfsh().destroy().region().withName("region").execute();
+
+    // Cycle the endpoint to flush the client-internal process marker.
+    // We should be able to get a second afterRegionLive after this.
+    clear_marker_processed_flag();
+  }
+
+  ~HARegionCacheListenerARLEPDTest() override { destroy_any_test_region(); }
+
+  void clear_marker_processed_flag() {
+    /* As of this writing, you typically only get afterRegionLive once. This
+     * means, if almost any any prior test runs, you'll likely have already
+     * processed this event. But there is an exception: the state is reset if
+     * the endpoint disconnects.
+     */
+    cluster_->getServers()[0].stop();
+    cluster_->getServers()[0].start();
+  }
+
+  void create_the_test_region() {
+    cluster_->getGfsh()
+        .create()
+        .region()
+        .withName(get_the_test_region_name())
+        .withType("PARTITION")
+        .execute();
+  }
+
+  void destroy_any_test_region() {
+    cluster_->getGfsh()
+        .destroy()
+        .region()
+        .ifExists()
+        .withName(get_the_test_region_name())
+        .execute();
+  }
+
+  static const std::string &get_the_test_region_name() {
+    static const std::string test_region_name{"region"};
+
+    return test_region_name;
+  }
+
+  void verify_regionevent_callback(
+      const ::apache::geode::client::RegionEvent &) {
+    auto lk = std::unique_lock<std::mutex>(cv_m_);
+    verified_ = true;
+    cv_.notify_one();
+  }
+
+  void verify_entryevent_callback(const ::apache::geode::client::EntryEvent &) {
+    auto lk = std::unique_lock<std::mutex>(cv_m_);
+    verified_ = true;
+    cv_.notify_one();
+  }
+
+  bool is_verified() { return verified_; }
+
+ public:
+  static void SetUpTestSuite() {
+    listener_ =
+        ::std::make_shared<::apache::geode::client::Nice_MockListener>();
+
+    cluster_ = ::make_unique<::Cluster>(Name{"HARegionCacheListenerARLEPDTest"},
+                                        LocatorCount{1}, ServerCount{1});
+
+    cluster_->start();
+
+    cache_ = ::make_unique<::apache::geode::client::Cache>(
+        cluster_->createCache({}, ::Cluster::SubscriptionState::Enabled));
+
+    region_ = cache_
+                  ->createRegionFactory(
+                      ::apache::geode::client::RegionShortcut::PROXY)
+                  .setPoolName("default")
+                  .create(get_the_test_region_name());
+  }
+
+  static void TearDownTestSuite() {
+    region_.reset();
+    cache_.reset();
+    cluster_.reset();
+    listener_.reset();
+  }
+};
+
+::std::unique_ptr<::Cluster> HARegionCacheListenerARLEPDTest::cluster_{};
+
+::std::shared_ptr<::apache::geode::client::Nice_MockListener>
+    HARegionCacheListenerARLEPDTest::listener_{};
+
+::std::unique_ptr<::apache::geode::client::Cache>
+    HARegionCacheListenerARLEPDTest::cache_{};
+::std::shared_ptr<::apache::geode::client::Region>
+    HARegionCacheListenerARLEPDTest::region_{};
+}  // namespace
+
+using ::testing::AllOf;
+using ::testing::Eq;
+using ::testing::Property;
+
+using ::apache::geode::client::CacheableString;
+using ::apache::geode::client::EntryEvent;
+using ::apache::geode::client::RegionEvent;
+
+TEST_F(HARegionCacheListenerARLEPDTest,
+       DISABLED_afterRegionLiveAfterEPDisconnect) {
+  auto with_these_properties = Property(&RegionEvent::getRegion, Eq(region_));
+
+  EXPECT_CALL(*listener_, afterRegionLive(with_these_properties))
+      .WillOnce(verify_the_regionevent_callback);
+
+  auto lk = std::unique_lock<std::mutex>(cv_m_);
+
+  create_the_test_region();
+
+  cv_.wait_for(lk, ::std::chrono::seconds{5}, the_verification_condition);
+
+  ::testing::Mock::VerifyAndClearExpectations(listener_.get());
+}
diff --git a/cppcache/integration/test/HARegionCacheListenerARLTest.cpp b/cppcache/integration/test/HARegionCacheListenerARLTest.cpp
new file mode 100644
index 0000000..64f3044
--- /dev/null
+++ b/cppcache/integration/test/HARegionCacheListenerARLTest.cpp
@@ -0,0 +1,212 @@
+/*
+ * 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.
+ */
+
+#include <framework/Cluster.h>
+#include <framework/Framework.h>
+#include <framework/Gfsh.h>
+#include <gmock/gmock.h>
+
+#include <future>
+#include <iostream>
+#include <random>
+#include <thread>
+
+#include <boost/log/core.hpp>
+
+#include <gtest/gtest.h>
+
+#include <geode/AttributesMutator.hpp>
+#include <geode/Cache.hpp>
+#include <geode/CacheListener.hpp>
+#include <geode/EntryEvent.hpp>
+#include <geode/PoolManager.hpp>
+#include <geode/RegionEvent.hpp>
+#include <geode/RegionFactory.hpp>
+#include <geode/RegionShortcut.hpp>
+
+#include "mock/CacheListenerMock.hpp"
+#include "utility/make_unique.hpp"
+
+namespace {
+class HARegionCacheListenerARLTest : public ::testing::Test {
+ protected:
+  static ::std::unique_ptr<::Cluster> cluster_;
+  /* Cache listener mocks make a circular reference to the region, and the
+   * region retains a circular reference back to the cache. The reference is
+   * established when a callback is called and is resolved when the mock is
+   * verified and cleared. The circular reference prevents the cache from
+   * falling out of scope and shutting down, and it prevents the mock instance
+   * from verifying and clearing itself. You have to manually verify and clear
+   * the mock at the end of every test. */
+  static ::std::shared_ptr<::apache::geode::client::Nice_MockListener>
+      listener_;
+  static ::std::unique_ptr<::apache::geode::client::Cache> cache_;
+  static ::std::shared_ptr<::apache::geode::client::Region> region_;
+
+  /* Surprise! There are different code paths for event callbacks. Some are
+  sequential, the result of a server response; Some of them are concurrent - the
+  result of a server message.
+
+  TODO: Build out both sequential and concurrent listener events. */
+  ::std::mutex cv_m_;
+  ::std::condition_variable cv_;
+  bool verified_;
+  std::function<void(const apache::geode::client::RegionEvent &)>
+      verify_the_regionevent_callback;
+  std::function<void(const apache::geode::client::EntryEvent &)>
+      verify_the_entryevent_callback;
+  std::function<bool()> the_verification_condition;
+
+  /* SetUp and TearDown happen after test fixture construction and before test
+   * fixture destruction to avoid superious noise in the mock. */
+  void SetUp() override {
+    ::apache::geode::client::AttributesMutator(region_).setCacheListener(
+        listener_);
+  }
+
+  void TearDown() override {
+    ::apache::geode::client::AttributesMutator(region_).setCacheListener({});
+
+    ::testing::Mock::VerifyAndClearExpectations(
+        listener_.get());  // Just to make sure it's clean for the next test.
+  }
+
+  HARegionCacheListenerARLTest()
+      : verified_{false},
+        verify_the_regionevent_callback{::testing::Invoke(
+            this, &HARegionCacheListenerARLTest::verify_regionevent_callback)},
+        verify_the_entryevent_callback{::testing::Invoke(
+            this, &HARegionCacheListenerARLTest::verify_entryevent_callback)},
+        the_verification_condition{
+            std::bind(&HARegionCacheListenerARLTest::is_verified, this)} {
+    // Cycle the endpoint to flush the client-internal process marker.
+    // We should be able to get a second afterRegionLive after this.
+    clear_marker_processed_flag();
+  }
+
+  ~HARegionCacheListenerARLTest() override { destroy_any_test_region(); }
+
+  void clear_marker_processed_flag() {
+    /* As of this writing, you typically only get afterRegionLive once. This
+     * means, if almost any any prior test runs, you'll likely have already
+     * processed this event. But there is an exception: the state is reset if
+     * the endpoint disconnects.
+     */
+    cluster_->getServers()[0].stop();
+    cluster_->getServers()[0].start();
+  }
+
+  void create_the_test_region() {
+    cluster_->getGfsh()
+        .create()
+        .region()
+        .withName(get_the_test_region_name())
+        .withType("PARTITION")
+        .execute();
+  }
+
+  void destroy_any_test_region() {
+    cluster_->getGfsh()
+        .destroy()
+        .region()
+        .ifExists()
+        .withName(get_the_test_region_name())
+        .execute();
+  }
+
+  static const std::string &get_the_test_region_name() {
+    static const std::string test_region_name{"region"};
+
+    return test_region_name;
+  }
+
+  void verify_regionevent_callback(
+      const ::apache::geode::client::RegionEvent &) {
+    auto lk = std::unique_lock<std::mutex>(cv_m_);
+    verified_ = true;
+    cv_.notify_one();
+  }
+
+  void verify_entryevent_callback(const ::apache::geode::client::EntryEvent &) {
+    auto lk = std::unique_lock<std::mutex>(cv_m_);
+    verified_ = true;
+    cv_.notify_one();
+  }
+
+  bool is_verified() { return verified_; }
+
+ public:
+  static void SetUpTestSuite() {
+    listener_ =
+        ::std::make_shared<::apache::geode::client::Nice_MockListener>();
+
+    cluster_ = ::make_unique<::Cluster>(Name{"HARegionCacheListenerARLTest"},
+                                        LocatorCount{1}, ServerCount{1});
+
+    cluster_->start();
+
+    cache_ = make_unique<::apache::geode::client::Cache>(
+        cluster_->createCache({}, ::Cluster::SubscriptionState::Enabled));
+
+    region_ = cache_
+                  ->createRegionFactory(
+                      ::apache::geode::client::RegionShortcut::PROXY)
+                  .setPoolName("default")
+                  .create(get_the_test_region_name());
+  }
+
+  static void TearDownTestSuite() {
+    region_.reset();
+    cache_.reset();
+    cluster_.reset();
+    listener_.reset();
+  }
+};
+
+::std::unique_ptr<::Cluster> HARegionCacheListenerARLTest::cluster_{};
+
+::std::shared_ptr<::apache::geode::client::Nice_MockListener>
+    HARegionCacheListenerARLTest::listener_{};
+
+::std::unique_ptr<::apache::geode::client::Cache>
+    HARegionCacheListenerARLTest::cache_{};
+::std::shared_ptr<::apache::geode::client::Region>
+    HARegionCacheListenerARLTest::region_{};
+}  // namespace
+
+using ::testing::AllOf;
+using ::testing::Eq;
+using ::testing::Property;
+
+using ::apache::geode::client::CacheableString;
+using ::apache::geode::client::EntryEvent;
+using ::apache::geode::client::RegionEvent;
+
+TEST_F(HARegionCacheListenerARLTest, afterRegionLive) {
+  auto with_these_properties = Property(&RegionEvent::getRegion, Eq(region_));
+
+  EXPECT_CALL(*listener_, afterRegionLive(with_these_properties))
+      .WillOnce(verify_the_regionevent_callback);
+
+  auto lk = std::unique_lock<std::mutex>(cv_m_);
+
+  create_the_test_region();
+
+  cv_.wait_for(lk, ::std::chrono::seconds{5}, the_verification_condition);
+
+  ::testing::Mock::VerifyAndClearExpectations(listener_.get());
+}
diff --git a/cppcache/integration/test/HARegionCacheListenerKeyValueTest.cpp b/cppcache/integration/test/HARegionCacheListenerKeyValueTest.cpp
new file mode 100644
index 0000000..8c01b36
--- /dev/null
+++ b/cppcache/integration/test/HARegionCacheListenerKeyValueTest.cpp
@@ -0,0 +1,253 @@
+/*
+ * 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.
+ */
+
+#include <framework/Cluster.h>
+#include <framework/Framework.h>
+#include <framework/Gfsh.h>
+#include <gmock/gmock.h>
+
+#include <future>
+#include <iostream>
+#include <random>
+#include <thread>
+
+#include <boost/log/core.hpp>
+
+#include <gtest/gtest.h>
+
+#include <geode/AttributesMutator.hpp>
+#include <geode/Cache.hpp>
+#include <geode/CacheListener.hpp>
+#include <geode/EntryEvent.hpp>
+#include <geode/PoolManager.hpp>
+#include <geode/RegionEvent.hpp>
+#include <geode/RegionFactory.hpp>
+#include <geode/RegionShortcut.hpp>
+
+#include "mock/CacheListenerMock.hpp"
+#include "utility/make_unique.hpp"
+
+namespace {
+// A simple comparator for cachables wrapped in shared pointers.
+MATCHER_P(CashableEq, value, "") {
+  return arg->toString() == value->toString();
+}
+
+class HARegionCacheListenerKeyValueTest : public ::testing::Test {
+ protected:
+  static ::std::unique_ptr<::Cluster> cluster_;
+  /* Cache listener mocks make a circular reference to the region, and the
+   * region retains a circular reference back to the cache. The reference is
+   * established when a callback is called and is resolved when the mock is
+   * verified and cleared. The circular reference prevents the cache from
+   * falling out of scope and shutting down, and it prevents the mock instance
+   * from verifying and clearing itself. You have to manually verify and clear
+   * the mock at the end of every test. */
+  static ::std::shared_ptr<::apache::geode::client::Nice_MockListener>
+      listener_;
+  static ::std::unique_ptr<::apache::geode::client::Cache> cache_;
+  static ::std::shared_ptr<::apache::geode::client::Region> region_;
+
+  /* Surprise! There are different code paths for event callbacks. Some are
+  sequential, the result of a server response; Some of them are concurrent - the
+  result of a server message.
+
+  TODO: Build out both sequential and concurrent listener events. */
+  ::std::mutex cv_m_;
+  ::std::condition_variable cv_;
+  bool verified_;
+  std::function<void(const apache::geode::client::RegionEvent &)>
+      verify_the_regionevent_callback;
+  std::function<void(const apache::geode::client::EntryEvent &)>
+      verify_the_entryevent_callback;
+  std::function<bool()> the_verification_condition;
+
+  std::shared_ptr<::apache::geode::client::CacheableString> key_, value_;
+
+  /* SetUp and TearDown happen after test fixture construction and before test
+   * fixture destruction to avoid superious noise in the mock. */
+  void SetUp() override {
+    ::apache::geode::client::AttributesMutator(region_).setCacheListener(
+        listener_);
+  }
+
+  void TearDown() override {
+    ::apache::geode::client::AttributesMutator(region_).setCacheListener({});
+
+    ::testing::Mock::VerifyAndClearExpectations(
+        listener_.get());  // Just to make sure it's clean for the next test.
+  }
+
+  HARegionCacheListenerKeyValueTest()
+      : verified_{false},
+        verify_the_regionevent_callback{::testing::Invoke(
+            this,
+            &HARegionCacheListenerKeyValueTest::verify_regionevent_callback)},
+        verify_the_entryevent_callback{::testing::Invoke(
+            this,
+            &HARegionCacheListenerKeyValueTest::verify_entryevent_callback)},
+        the_verification_condition{
+            std::bind(&HARegionCacheListenerKeyValueTest::is_verified, this)},
+        key_{std::make_shared<::apache::geode::client::CacheableString>("key")},
+        value_{std::make_shared<::apache::geode::client::CacheableString>(
+            "value")} {
+    create_the_test_region();
+    region_->put(key_, value_);
+  }
+
+  ~HARegionCacheListenerKeyValueTest() override { destroy_any_test_region(); }
+
+  // void clear_marker_processed_flag() {
+  //   /* As of this writing, you typically only get afterRegionLive once. This
+  //    * means, if almost any any prior test runs, you'll likely have already
+  //    * processed this event. But there is an exception: the state is reset if
+  //    * the endpoint disconnects.
+  //    */
+  //   cluster_->getServers()[0].stop();
+  //   cluster_->getServers()[0].start();
+  // }
+
+  void create_the_test_region() {
+    cluster_->getGfsh()
+        .create()
+        .region()
+        .withName(get_the_test_region_name())
+        .withType("PARTITION")
+        .execute();
+  }
+
+  void destroy_any_test_region() {
+    cluster_->getGfsh()
+        .destroy()
+        .region()
+        .ifExists()
+        .withName(get_the_test_region_name())
+        .execute();
+  }
+
+  static const std::string &get_the_test_region_name() {
+    static const std::string test_region_name{"region"};
+
+    return test_region_name;
+  }
+
+  void verify_regionevent_callback(
+      const ::apache::geode::client::RegionEvent &) {
+    auto lk = std::unique_lock<std::mutex>(cv_m_);
+    verified_ = true;
+    cv_.notify_one();
+  }
+
+  void verify_entryevent_callback(const ::apache::geode::client::EntryEvent &) {
+    auto lk = std::unique_lock<std::mutex>(cv_m_);
+    verified_ = true;
+    cv_.notify_one();
+  }
+
+  bool is_verified() { return verified_; }
+
+ public:
+  static void SetUpTestSuite() {
+    listener_ =
+        ::std::make_shared<::apache::geode::client::Nice_MockListener>();
+
+    cluster_ =
+        ::make_unique<::Cluster>(Name{"HARegionCacheListenerKeyValueTest"},
+                                 LocatorCount{1}, ServerCount{1});
+
+    cluster_->start();
+
+    cache_ = make_unique<::apache::geode::client::Cache>(
+        cluster_->createCache({}, ::Cluster::SubscriptionState::Enabled));
+
+    region_ = cache_
+                  ->createRegionFactory(
+                      ::apache::geode::client::RegionShortcut::PROXY)
+                  .setPoolName("default")
+                  .create(get_the_test_region_name());
+  }
+
+  static void TearDownTestSuite() {
+    region_.reset();
+    cache_.reset();
+    cluster_.reset();
+    listener_.reset();
+  }
+};
+
+::std::unique_ptr<::Cluster> HARegionCacheListenerKeyValueTest::cluster_{};
+
+::std::shared_ptr<::apache::geode::client::Nice_MockListener>
+    HARegionCacheListenerKeyValueTest::listener_{};
+
+::std::unique_ptr<::apache::geode::client::Cache>
+    HARegionCacheListenerKeyValueTest::cache_{};
+::std::shared_ptr<::apache::geode::client::Region>
+    HARegionCacheListenerKeyValueTest::region_{};
+}  // namespace
+
+using ::testing::AllOf;
+using ::testing::Eq;
+using ::testing::Property;
+
+using ::apache::geode::client::CacheableString;
+using ::apache::geode::client::EntryEvent;
+using ::apache::geode::client::RegionEvent;
+
+TEST_F(HARegionCacheListenerKeyValueTest, DISABLED_afterUpdate) {
+  auto new_value = std::make_shared<CacheableString>("new_value");
+  auto with_these_properties =
+      AllOf(Property(&EntryEvent::getRegion, Eq(region_)),
+            Property(&EntryEvent::getKey, CashableEq(key_)),
+            Property(&EntryEvent::getOldValue, CashableEq(value_)),
+            Property(&EntryEvent::getNewValue, CashableEq(new_value)));
+
+  EXPECT_CALL(*listener_, afterUpdate(with_these_properties))
+      .WillOnce(verify_the_entryevent_callback);
+
+  auto lk = std::unique_lock<std::mutex>(cv_m_);
+
+  region_->put(key_, new_value);
+
+  cv_.wait_for(lk, ::std::chrono::seconds{5}, the_verification_condition);
+
+  ::testing::Mock::VerifyAndClearExpectations(listener_.get());
+}
+
+TEST_F(HARegionCacheListenerKeyValueTest, afterInvalidateSingleThreaded) {
+  auto with_these_properties =
+      AllOf(Property(&EntryEvent::getRegion, Eq(region_)),
+            Property(&EntryEvent::getKey, CashableEq(key_)));
+
+  EXPECT_CALL(*listener_, afterInvalidate(with_these_properties));
+
+  region_->invalidate(key_);
+
+  ::testing::Mock::VerifyAndClearExpectations(listener_.get());
+}
+
+TEST_F(HARegionCacheListenerKeyValueTest, afterDestroySingleThreaded) {
+  auto with_these_properties =
+      AllOf(Property(&EntryEvent::getRegion, Eq(region_)),
+            Property(&EntryEvent::getKey, CashableEq(key_)));
+
+  EXPECT_CALL(*listener_, afterDestroy(with_these_properties));
+
+  region_->destroy(key_);
+
+  ::testing::Mock::VerifyAndClearExpectations(listener_.get());
+}
diff --git a/cppcache/integration/test/HARegionCacheListenerTest.cpp b/cppcache/integration/test/HARegionCacheListenerTest.cpp
new file mode 100644
index 0000000..aaffb06
--- /dev/null
+++ b/cppcache/integration/test/HARegionCacheListenerTest.cpp
@@ -0,0 +1,250 @@
+/*
+ * 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.
+ */
+
+#include <framework/Cluster.h>
+#include <framework/Framework.h>
+#include <framework/Gfsh.h>
+#include <gmock/gmock.h>
+
+#include <future>
+#include <iostream>
+#include <random>
+#include <thread>
+
+#include <boost/log/core.hpp>
+
+#include <gtest/gtest.h>
+
+#include <geode/AttributesMutator.hpp>
+#include <geode/Cache.hpp>
+#include <geode/CacheListener.hpp>
+#include <geode/EntryEvent.hpp>
+#include <geode/PoolManager.hpp>
+#include <geode/RegionEvent.hpp>
+#include <geode/RegionFactory.hpp>
+#include <geode/RegionShortcut.hpp>
+
+#include "mock/CacheListenerMock.hpp"
+#include "utility/make_unique.hpp"
+
+namespace {
+class HARegionCacheListenerTest : public ::testing::Test {
+ protected:
+  static ::std::unique_ptr<::Cluster> cluster_;
+  /* Cache listener mocks make a circular reference to the region, and the
+   * region retains a circular reference back to the cache. The reference is
+   * established when a callback is called and is resolved when the mock is
+   * verified and cleared. The circular reference prevents the cache from
+   * falling out of scope and shutting down, and it prevents the mock instance
+   * from verifying and clearing itself. You have to manually verify and clear
+   * the mock at the end of every test. */
+  static ::std::shared_ptr<::apache::geode::client::Nice_MockListener>
+      listener_;
+  static ::std::unique_ptr<::apache::geode::client::Cache> cache_;
+  static ::std::shared_ptr<::apache::geode::client::Region> region_;
+
+  /* Surprise! There are different code paths for event callbacks. Some are
+  sequential, the result of a server response; Some of them are concurrent - the
+  result of a server message.
+
+  TODO: Build out both sequential and concurrent listener events. */
+  ::std::mutex cv_m_;
+  ::std::condition_variable cv_;
+  bool verified_;
+  std::function<void(const apache::geode::client::RegionEvent &)>
+      verify_the_regionevent_callback;
+  std::function<void(const apache::geode::client::EntryEvent &)>
+      verify_the_entryevent_callback;
+  std::function<bool()> the_verification_condition;
+
+  /* SetUp and TearDown happen after test fixture construction and before test
+   * fixture destruction to avoid superious noise in the mock. */
+  void SetUp() override {
+    ::apache::geode::client::AttributesMutator(region_).setCacheListener(
+        listener_);
+  }
+
+  void TearDown() override {
+    ::apache::geode::client::AttributesMutator(region_).setCacheListener({});
+
+    ::testing::Mock::VerifyAndClearExpectations(
+        listener_.get());  // Just to make sure it's clean for the next test.
+  }
+
+  HARegionCacheListenerTest()
+      : verified_{false},
+        verify_the_regionevent_callback{::testing::Invoke(
+            this, &HARegionCacheListenerTest::verify_regionevent_callback)},
+        verify_the_entryevent_callback{::testing::Invoke(
+            this, &HARegionCacheListenerTest::verify_entryevent_callback)},
+        the_verification_condition{
+            std::bind(&HARegionCacheListenerTest::is_verified, this)} {}
+
+  ~HARegionCacheListenerTest() override = default;
+
+  // void clear_marker_processed_flag() {
+  //   /* As of this writing, you typically only get afterRegionLive once. This
+  //    * means, if almost any any prior test runs, you'll likely have already
+  //    * processed this event. But there is an exception: the state is reset if
+  //    * the endpoint disconnects.
+  //    */
+  //   cluster_->getServers()[0].stop();
+  //   cluster_->getServers()[0].start();
+  // }
+
+  // void create_the_test_region() {
+  //   cluster_->getGfsh()
+  //       .create()
+  //       .region()
+  //       .withName(get_the_test_region_name())
+  //       .withType("PARTITION")
+  //       .execute();
+  // }
+
+  // void destroy_any_test_region() {
+  //   cluster_->getGfsh()
+  //       .destroy()
+  //       .region()
+  //       .ifExists()
+  //       .withName(get_the_test_region_name())
+  //       .execute();
+  // }
+
+  static const std::string &get_the_test_region_name() {
+    static const std::string test_region_name{"region"};
+
+    return test_region_name;
+  }
+
+  void verify_regionevent_callback(
+      const ::apache::geode::client::RegionEvent &) {
+    auto lk = std::unique_lock<std::mutex>(cv_m_);
+    verified_ = true;
+    cv_.notify_one();
+  }
+
+  void verify_entryevent_callback(const ::apache::geode::client::EntryEvent &) {
+    auto lk = std::unique_lock<std::mutex>(cv_m_);
+    verified_ = true;
+    cv_.notify_one();
+  }
+
+  bool is_verified() { return verified_; }
+
+ public:
+  static void SetUpTestSuite() {
+    // We need to make this switchable from the command line.
+    //::boost::log::core::get()->set_logging_enabled(false);
+
+    listener_ =
+        ::std::make_shared<::apache::geode::client::Nice_MockListener>();
+
+    /* Until this test suite is complete, leave this. It's useful for
+     * development.
+     */
+    /*
+    ON_CALL(*listener_, afterCreate)
+        .WillByDefault([](const apache::geode::client::EntryEvent &) {
+          std::cout << "afterCreate callback.\n";
+        });
+    ON_CALL(*listener_, afterUpdate)
+        .WillByDefault([](const apache::geode::client::EntryEvent &) {
+          std::cout << "afterUpdate callback.\n";
+        });
+    ON_CALL(*listener_, afterInvalidate)
+        .WillByDefault([](const apache::geode::client::EntryEvent &) {
+          std::cout << "afterInvalidate callback.\n";
+        });
+    ON_CALL(*listener_, afterDestroy)
+        .WillByDefault([](const apache::geode::client::EntryEvent &) {
+          std::cout << "afterDestroy callback.\n";
+        });
+    ON_CALL(*listener_, afterRegionInvalidate)
+        .WillByDefault([](const apache::geode::client::RegionEvent &) {
+          std::cout << "afterRegionInvalidate callback.\n";
+        });
+    ON_CALL(*listener_, afterRegionDestroy)
+        .WillByDefault([](const apache::geode::client::RegionEvent &) {
+          std::cout << "afterRegionDestroy callback.\n";
+        });
+    ON_CALL(*listener_, afterRegionClear)
+        .WillByDefault([](const apache::geode::client::RegionEvent &) {
+          std::cout << "afterRegionClear callback.\n";
+        });
+    ON_CALL(*listener_, afterRegionLive)
+        .WillByDefault([](const apache::geode::client::RegionEvent &) {
+          std::cout << "afterRegionLive callback.\n";
+        });
+    ON_CALL(*listener_, close)
+        .WillByDefault([](const apache::geode::client::Region &) {
+          std::cout << "close callback.\n";
+        });
+    ON_CALL(*listener_, afterRegionDisconnected)
+        .WillByDefault([](const apache::geode::client::Region &) {
+          std::cout << "afterRegionDisconnected callback.\n";
+        });
+    */
+    cluster_ = ::make_unique<::Cluster>(Name{"HARegionCacheListenerTest"},
+                                        LocatorCount{1}, ServerCount{1});
+
+    cluster_->start();
+
+    cache_ = make_unique<::apache::geode::client::Cache>(
+        cluster_->createCache({}, ::Cluster::SubscriptionState::Enabled));
+
+    region_ = cache_
+                  ->createRegionFactory(
+                      ::apache::geode::client::RegionShortcut::PROXY)
+                  .setPoolName("default")
+                  .create(get_the_test_region_name());
+  }
+
+  static void TearDownTestSuite() {
+    region_.reset();
+    cache_.reset();
+    cluster_.reset();
+    listener_.reset();
+    //::boost::log::core::get()->set_logging_enabled();
+  }
+};
+
+::std::unique_ptr<::Cluster> HARegionCacheListenerTest::cluster_{};
+
+::std::shared_ptr<::apache::geode::client::Nice_MockListener>
+    HARegionCacheListenerTest::listener_{};
+
+::std::unique_ptr<::apache::geode::client::Cache>
+    HARegionCacheListenerTest::cache_{};
+::std::shared_ptr<::apache::geode::client::Region>
+    HARegionCacheListenerTest::region_{};
+}  // namespace
+
+using ::testing::AllOf;
+using ::testing::Eq;
+using ::testing::Property;
+
+using ::apache::geode::client::CacheableString;
+using ::apache::geode::client::EntryEvent;
+using ::apache::geode::client::RegionEvent;
+
+TEST_F(HARegionCacheListenerTest, DISABLED_afterRegionInvalidate) {}
+
+TEST_F(HARegionCacheListenerTest, DISABLED_afterRegionClear) {}
+
+TEST_F(HARegionCacheListenerTest, DISABLED_close) {}
+
+TEST_F(HARegionCacheListenerTest, DISABLED_afterRegionDisconnected) {}
diff --git a/cppcache/integration/test/HARegionCacheListenerWithClusterRegionTest.cpp b/cppcache/integration/test/HARegionCacheListenerWithClusterRegionTest.cpp
new file mode 100644
index 0000000..dcfcfc4
--- /dev/null
+++ b/cppcache/integration/test/HARegionCacheListenerWithClusterRegionTest.cpp
@@ -0,0 +1,239 @@
+/*
+ * 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.
+ */
+
+#include <framework/Cluster.h>
+#include <framework/Framework.h>
+#include <framework/Gfsh.h>
+#include <gmock/gmock.h>
+
+#include <future>
+#include <iostream>
+#include <random>
+#include <thread>
+
+#include <boost/log/core.hpp>
+
+#include <gtest/gtest.h>
+
+#include <geode/AttributesMutator.hpp>
+#include <geode/Cache.hpp>
+#include <geode/CacheListener.hpp>
+#include <geode/EntryEvent.hpp>
+#include <geode/PoolManager.hpp>
+#include <geode/RegionEvent.hpp>
+#include <geode/RegionFactory.hpp>
+#include <geode/RegionShortcut.hpp>
+
+#include "mock/CacheListenerMock.hpp"
+#include "utility/make_unique.hpp"
+
+namespace {
+// A simple comparator for cachables wrapped in shared pointers.
+MATCHER_P(CashableEq, value, "") {
+  return arg->toString() == value->toString();
+}
+
+class HARegionCacheListenerWithClusterRegionTest : public ::testing::Test {
+ protected:
+  static ::std::unique_ptr<::Cluster> cluster_;
+  /* Cache listener mocks make a circular reference to the region, and the
+   * region retains a circular reference back to the cache. The reference is
+   * established when a callback is called and is resolved when the mock is
+   * verified and cleared. The circular reference prevents the cache from
+   * falling out of scope and shutting down, and it prevents the mock instance
+   * from verifying and clearing itself. You have to manually verify and clear
+   * the mock at the end of every test. */
+  static ::std::shared_ptr<::apache::geode::client::Nice_MockListener>
+      listener_;
+  static ::std::unique_ptr<::apache::geode::client::Cache> cache_;
+  static ::std::shared_ptr<::apache::geode::client::Region> region_;
+
+  /* Surprise! There are different code paths for event callbacks. Some are
+  sequential, the result of a server response; Some of them are concurrent - the
+  result of a server message.
+
+  TODO: Build out both sequential and concurrent listener events. */
+  ::std::mutex cv_m_;
+  ::std::condition_variable cv_;
+  bool verified_;
+  std::function<void(const apache::geode::client::RegionEvent &)>
+      verify_the_regionevent_callback;
+  std::function<void(const apache::geode::client::EntryEvent &)>
+      verify_the_entryevent_callback;
+  std::function<bool()> the_verification_condition;
+
+  /* SetUp and TearDown happen after test fixture construction and before test
+   * fixture destruction to avoid superious noise in the mock. */
+  void SetUp() override {
+    ::apache::geode::client::AttributesMutator(region_).setCacheListener(
+        listener_);
+  }
+
+  void TearDown() override {
+    ::apache::geode::client::AttributesMutator(region_).setCacheListener({});
+
+    ::testing::Mock::VerifyAndClearExpectations(
+        listener_.get());  // Just to make sure it's clean for the next test.
+  }
+
+  HARegionCacheListenerWithClusterRegionTest()
+      : verified_{false},
+        verify_the_regionevent_callback{::testing::Invoke(
+            this, &HARegionCacheListenerWithClusterRegionTest::
+                      verify_regionevent_callback)},
+        verify_the_entryevent_callback{::testing::Invoke(
+            this, &HARegionCacheListenerWithClusterRegionTest::
+                      verify_entryevent_callback)},
+        the_verification_condition{std::bind(
+            &HARegionCacheListenerWithClusterRegionTest::is_verified, this)} {
+    create_the_test_region();
+  }
+
+  ~HARegionCacheListenerWithClusterRegionTest() override {
+    destroy_any_test_region();
+  }
+
+  //   void clear_marker_processed_flag() {
+  //     /* As of this writing, you typically only get afterRegionLive once.
+  //     This
+  //      * means, if almost any any prior test runs, you'll likely have already
+  //      * processed this event. But there is an exception: the state is reset
+  //      if
+  //      * the endpoint disconnects.
+  //      */
+  //     cluster_->getServers()[0].stop();
+  //     cluster_->getServers()[0].start();
+  //   }
+
+  void create_the_test_region() {
+    cluster_->getGfsh()
+        .create()
+        .region()
+        .withName(get_the_test_region_name())
+        .withType("PARTITION")
+        .execute();
+  }
+
+  void destroy_any_test_region() {
+    cluster_->getGfsh()
+        .destroy()
+        .region()
+        .ifExists()
+        .withName(get_the_test_region_name())
+        .execute();
+  }
+
+  static const std::string &get_the_test_region_name() {
+    static const std::string test_region_name{"region"};
+
+    return test_region_name;
+  }
+
+  void verify_regionevent_callback(
+      const ::apache::geode::client::RegionEvent &) {
+    auto lk = std::unique_lock<std::mutex>(cv_m_);
+    verified_ = true;
+    cv_.notify_one();
+  }
+
+  void verify_entryevent_callback(const ::apache::geode::client::EntryEvent &) {
+    auto lk = std::unique_lock<std::mutex>(cv_m_);
+    verified_ = true;
+    cv_.notify_one();
+  }
+
+  bool is_verified() { return verified_; }
+
+ public:
+  static void SetUpTestSuite() {
+    listener_ =
+        ::std::make_shared<::apache::geode::client::Nice_MockListener>();
+
+    cluster_ = ::make_unique<::Cluster>(
+        Name{"HARegionCacheListenerWithClusterRegionTest"}, LocatorCount{1},
+        ServerCount{1});
+
+    cluster_->start();
+
+    cache_ = ::make_unique<::apache::geode::client::Cache>(
+        cluster_->createCache({}, ::Cluster::SubscriptionState::Enabled));
+
+    region_ = cache_
+                  ->createRegionFactory(
+                      ::apache::geode::client::RegionShortcut::PROXY)
+                  .setPoolName("default")
+                  .create(get_the_test_region_name());
+  }
+
+  static void TearDownTestSuite() {
+    region_.reset();
+    cache_.reset();
+    cluster_.reset();
+    listener_.reset();
+  }
+};
+
+::std::unique_ptr<::Cluster>
+    HARegionCacheListenerWithClusterRegionTest::cluster_{};
+
+::std::shared_ptr<::apache::geode::client::Nice_MockListener>
+    HARegionCacheListenerWithClusterRegionTest::listener_{};
+
+::std::unique_ptr<::apache::geode::client::Cache>
+    HARegionCacheListenerWithClusterRegionTest::cache_{};
+::std::shared_ptr<::apache::geode::client::Region>
+    HARegionCacheListenerWithClusterRegionTest::region_{};
+}  // namespace
+
+using ::testing::AllOf;
+using ::testing::Eq;
+using ::testing::Property;
+
+using ::apache::geode::client::CacheableString;
+using ::apache::geode::client::EntryEvent;
+using ::apache::geode::client::RegionEvent;
+
+TEST_F(HARegionCacheListenerWithClusterRegionTest, afterCreateSingleThreaded) {
+  auto key = std::make_shared<CacheableString>("key");
+  auto value = std::make_shared<CacheableString>("value");
+  auto with_these_properties =
+      AllOf(Property(&EntryEvent::getRegion, Eq(region_)),
+            Property(&EntryEvent::getKey, CashableEq(key)),
+            Property(&EntryEvent::getNewValue, CashableEq(value)));
+
+  EXPECT_CALL(*listener_, afterCreate(with_these_properties));
+
+  region_->put(key, value);
+
+  ::testing::Mock::VerifyAndClearExpectations(listener_.get());
+}
+
+TEST_F(HARegionCacheListenerWithClusterRegionTest,
+       DISABLED_afterRegionDestroy) {
+  auto with_these_properties = Property(&RegionEvent::getRegion, Eq(region_));
+
+  EXPECT_CALL(*listener_, afterRegionDestroy(with_these_properties))
+      .WillOnce(verify_the_regionevent_callback);
+
+  auto lk = std::unique_lock<std::mutex>(cv_m_);
+
+  cluster_->getGfsh().destroy().region().withName("region").execute();
+
+  cv_.wait_for(lk, ::std::chrono::seconds{5}, the_verification_condition);
+
+  ::testing::Mock::VerifyAndClearExpectations(listener_.get());
+}
diff --git a/cppcache/integration/test/LocalRegionCacheListenerTest.cpp b/cppcache/integration/test/LocalRegionCacheListenerTest.cpp
new file mode 100644
index 0000000..3c0222b
--- /dev/null
+++ b/cppcache/integration/test/LocalRegionCacheListenerTest.cpp
@@ -0,0 +1,188 @@
+/*
+ * 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.
+ */
+
+#include <framework/Cluster.h>
+#include <framework/Framework.h>
+#include <framework/Gfsh.h>
+#include <gmock/gmock.h>
+
+#include <future>
+#include <iostream>
+#include <random>
+#include <thread>
+
+#include <gtest/gtest.h>
+
+#include <geode/Cache.hpp>
+#include <geode/CacheListener.hpp>
+#include <geode/EntryEvent.hpp>
+#include <geode/PoolManager.hpp>
+#include <geode/RegionEvent.hpp>
+#include <geode/RegionFactory.hpp>
+#include <geode/RegionShortcut.hpp>
+
+#include "mock/CacheListenerMock.hpp"
+
+namespace {
+MATCHER_P(CashableEq, value, "") {
+  return arg->toString() == value->toString();
+}
+
+class LocalRegionCacheListenerTest : public ::testing::Test {
+  /* It would be nice to create a listener instance per test case, and let it
+   * verify itself at the end of the test. Unfortunately, listeners - reference
+   * counted by their regions, themselves reference count their regions, so you
+   * get a circular dependency preventing it from falling out of scope and
+   * allowing the mock to do it's thing. Therefore, you must verify and clear
+   * each mock manually at the end of the test, or you'll get a false positive
+   * fail condition and memory leak. */
+ protected:
+  static ::std::shared_ptr<::apache::geode::client::Nice_MockListener>
+      listener_;
+
+ public:
+  static void SetUpTestSuite() {
+    listener_ =
+        ::std::make_shared<::apache::geode::client::Nice_MockListener>();
+  }
+
+  static void TearDownTestSuite() { listener_.reset(); }
+
+ protected:
+  ::apache::geode::client::Cache cache_;
+  ::std::shared_ptr<::apache::geode::client::Region> region_;
+
+  LocalRegionCacheListenerTest()
+      : cache_{::apache::geode::client::CacheFactory()
+                   .set("log-level", "none")
+                   .set("statistic-sampling-enabled", "false")
+                   .create()} {
+    region_ =
+        cache_
+            .createRegionFactory(::apache::geode::client::RegionShortcut::LOCAL)
+            .setCacheListener(listener_)
+            .create("region");
+  }
+
+  void TearDown() override {
+    ::testing::Mock::VerifyAndClearExpectations(
+        listener_.get());  // Just to make sure it's clean for the next test.
+  }
+
+  ~LocalRegionCacheListenerTest() override = default;
+};
+
+::std::shared_ptr<::apache::geode::client::Nice_MockListener>
+    LocalRegionCacheListenerTest::listener_{};
+}  // namespace
+
+using ::testing::_;  // Match all
+using ::testing::AllOf;
+using ::testing::Eq;
+using ::testing::IsNull;
+using ::testing::Property;
+
+using ::apache::geode::client::CacheableString;
+using ::apache::geode::client::EntryEvent;
+using ::apache::geode::client::RegionEvent;
+
+TEST_F(LocalRegionCacheListenerTest, afterCreate) {
+  auto key = std::make_shared<CacheableString>("key");
+  auto value = std::make_shared<CacheableString>("value");
+
+  EXPECT_CALL(
+      *listener_,
+      afterCreate(AllOf(Property(&EntryEvent::getRegion, Eq(region_)),
+                        Property(&EntryEvent::getKey, CashableEq(key)),
+                        Property(&EntryEvent::getNewValue, CashableEq(value)))))
+      .Times(1);
+
+  region_->put(key, value);
+
+  ::testing::Mock::VerifyAndClearExpectations(listener_.get());
+}
+
+TEST_F(LocalRegionCacheListenerTest, afterUpdate) {
+  auto key = std::make_shared<CacheableString>("key");
+  auto value_1 = std::make_shared<CacheableString>("value_1");
+  auto value_2 = std::make_shared<CacheableString>("value_2");
+
+  EXPECT_CALL(*listener_,
+              afterUpdate(AllOf(
+                  Property(&EntryEvent::getRegion, Eq(region_)),
+                  Property(&EntryEvent::getKey, CashableEq(key)),
+                  Property(&EntryEvent::getNewValue, CashableEq(value_2)),
+                  Property(&EntryEvent::getOldValue, CashableEq(value_1)))))
+      .Times(1);
+
+  region_->put(key, value_1);
+  region_->put(key, value_2);
+
+  ::testing::Mock::VerifyAndClearExpectations(listener_.get());
+}
+
+TEST_F(LocalRegionCacheListenerTest, afterInvalidate) {
+  auto key = std::make_shared<CacheableString>("key");
+  auto value = std::make_shared<CacheableString>("value");
+
+  EXPECT_CALL(*listener_, afterInvalidate(AllOf(
+                              Property(&EntryEvent::getRegion, Eq(region_)),
+                              Property(&EntryEvent::getKey, CashableEq(key)))))
+      .Times(1);
+
+  region_->put(key, value);
+  region_->invalidate(key);
+
+  ::testing::Mock::VerifyAndClearExpectations(listener_.get());
+}
+
+TEST_F(LocalRegionCacheListenerTest, afterDestroy) {
+  auto key = std::make_shared<CacheableString>("key");
+  auto value = std::make_shared<CacheableString>("value");
+
+  EXPECT_CALL(*listener_, afterDestroy(AllOf(
+                              Property(&EntryEvent::getRegion, Eq(region_)),
+                              Property(&EntryEvent::getKey, CashableEq(key)))))
+      .Times(1);
+
+  region_->put(key, value);
+  region_->destroy(key);
+
+  ::testing::Mock::VerifyAndClearExpectations(listener_.get());
+}
+
+TEST_F(LocalRegionCacheListenerTest, afterRegionInvalidate) {}
+
+TEST_F(LocalRegionCacheListenerTest, afterRegionDestroy) {
+  EXPECT_CALL(*listener_, afterRegionDestroy(
+                              Property(&RegionEvent::getRegion, Eq(region_))))
+      .Times(1);
+
+  cache_.close();
+
+  ::testing::Mock::VerifyAndClearExpectations(listener_.get());
+}
+
+TEST_F(LocalRegionCacheListenerTest, afterRegionClear) {}
+
+TEST_F(LocalRegionCacheListenerTest, DISABLED_afterRegionLive) {
+  FAIL() << "This scenario is impossible.";
+}
+
+TEST_F(LocalRegionCacheListenerTest, close) {}
+
+TEST_F(LocalRegionCacheListenerTest, afterRegionDisconnected) {}
diff --git a/cppcache/integration/test/Order.cpp b/cppcache/integration/test/Order.cpp
index 5dcbc90..6647510 100644
--- a/cppcache/integration/test/Order.cpp
+++ b/cppcache/integration/test/Order.cpp
@@ -53,6 +53,13 @@
   return std::make_shared<Order>();
 }
 
+bool Order::operator==(const Order& rhs) const {
+  return order_id_ == rhs.order_id_ && name_ == rhs.name_ &&
+         quantity_ == rhs.quantity_;
+}
+
+bool Order::operator!=(const Order& rhs) const { return !(rhs == *this); }
+
 const std::string Order::ORDER_ID_KEY_ = "order_id";
 const std::string Order::NAME_KEY_ = "name";
 const std::string Order::QUANTITY_KEY_ = "quantity";
diff --git a/cppcache/integration/test/Order.hpp b/cppcache/integration/test/Order.hpp
index 7737869..d4fcc49 100644
--- a/cppcache/integration/test/Order.hpp
+++ b/cppcache/integration/test/Order.hpp
@@ -55,6 +55,10 @@
 
   static std::shared_ptr<PdxSerializable> createDeserializable();
 
+  bool operator==(const Order& rhs) const;
+
+  bool operator!=(const Order& rhs) const;
+
  private:
   static const std::string ORDER_ID_KEY_;
   static const std::string NAME_KEY_;
diff --git a/cppcache/integration/test/PartitionRegionOpsTest.cpp b/cppcache/integration/test/PartitionRegionOpsTest.cpp
index 29989d7..d670e00 100644
--- a/cppcache/integration/test/PartitionRegionOpsTest.cpp
+++ b/cppcache/integration/test/PartitionRegionOpsTest.cpp
@@ -29,6 +29,7 @@
 #include <geode/RegionFactory.hpp>
 #include <geode/RegionShortcut.hpp>
 
+#include "CacheImpl.hpp"
 #include "CacheRegionHelper.hpp"
 #include "framework/Cluster.h"
 #include "framework/Framework.h"
@@ -40,6 +41,8 @@
 using apache::geode::client::Cacheable;
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
+using apache::geode::client::CacheImpl;
+using apache::geode::client::CacheRegionHelper;
 using apache::geode::client::HashMapOfCacheable;
 using apache::geode::client::Pool;
 using apache::geode::client::Region;
@@ -47,24 +50,14 @@
 
 using std::chrono::minutes;
 
-std::string getClientLogName() {
-  std::string testSuiteName(::testing::UnitTest::GetInstance()
-                                ->current_test_info()
-                                ->test_case_name());
-  std::string testCaseName(
-      ::testing::UnitTest::GetInstance()->current_test_info()->name());
-  std::string logFileName(testSuiteName + "/" + testCaseName + "/client.log");
-  return logFileName;
-}
+constexpr int ENTRIES = 113;
+constexpr int WARMUP_ENTRIES = 1000;
 
 Cache createCache() {
   using apache::geode::client::CacheFactory;
 
-  auto cache = CacheFactory()
-                   .set("log-level", "debug")
-                   .set("log-file", getClientLogName())
-                   .set("statistic-sampling-enabled", "false")
-                   .create();
+  auto cache =
+      CacheFactory().set("statistic-sampling-enabled", "false").create();
 
   return cache;
 }
@@ -88,70 +81,92 @@
   return region;
 }
 
-void putEntries(std::shared_ptr<Region> region, int numEntries,
-                int offsetForValue) {
+int putEntries(Cache& cache, std::shared_ptr<Region> region, int numEntries) {
+  CacheImpl* cacheImpl = CacheRegionHelper::getCacheImpl(&cache);
+
+  auto numPutsRequiringHop = 0;
   for (int i = 0; i < numEntries; i++) {
     auto key = CacheableKey::create(i);
-    region->put(key, Cacheable::create(std::to_string(i + offsetForValue)));
+    auto value = Cacheable::create(std::to_string(i));
+    region->put(key, value);
+
+    if (cacheImpl->getAndResetNetworkHopFlag()) {
+      numPutsRequiringHop++;
+    }
   }
+
+  return numPutsRequiringHop;
 }
 
-void getEntries(std::shared_ptr<Region> region, int numEntries) {
+int putAllEntries(Cache& cache, std::shared_ptr<Region> region,
+                  int numEntries) {
+  CacheImpl* cacheImpl = CacheRegionHelper::getCacheImpl(&cache);
+
+  HashMapOfCacheable map;
+  auto numPutAllsRequiringHop = 0;
+
+  for (int i = 0; i < numEntries; i++) {
+    auto key = CacheableKey::create(i);
+    auto value = Cacheable::create(std::to_string(i));
+    map.emplace(key, value);
+  }
+
+  region->putAll(map);
+
+  if (cacheImpl->getAndResetNetworkHopFlag()) {
+    numPutAllsRequiringHop++;
+  }
+
+  return numPutAllsRequiringHop;
+}
+
+int getEntries(Cache& cache, std::shared_ptr<Region> region, int numEntries) {
+  CacheImpl* cacheImpl = CacheRegionHelper::getCacheImpl(&cache);
+
+  auto numGetsRequiringHop = 0;
   for (int i = 0; i < numEntries; i++) {
     auto key = CacheableKey::create(i);
     auto value = region->get(key);
-    ASSERT_NE(nullptr, value);
-  }
-}
 
-void removeLogFromPreviousExecution() {
-  std::string logFileName(getClientLogName());
-  std::ifstream previousTestLog(logFileName.c_str());
-  if (previousTestLog.good()) {
-    std::cout << "Removing log from previous execution: " << logFileName
-              << std::endl;
-    remove(logFileName.c_str());
-  }
-}
-
-void verifyMetadataWasRemovedAtFirstError() {
-  std::ifstream testLog(getClientLogName().c_str());
-  std::string fileLine;
-  bool ioErrors = false;
-  bool timeoutErrors = false;
-  bool metadataRemovedDueToIoErr = false;
-  bool metadataRemovedDueToTimeout = false;
-  std::regex timeoutRegex(
-      "sendRequestConnWithRetry: Giving up for endpoint(.*)reason: timed out "
-      "waiting for endpoint.");
-  std::regex ioErrRegex(
-      "sendRequestConnWithRetry: Giving up for endpoint(.*)reason: IO error "
-      "for endpoint.");
-  std::regex removingMetadataDueToIoErrRegex(
-      "Removing bucketServerLocation(.*)due to GF_IOERR");
-  std::regex removingMetadataDueToTimeoutRegex(
-      "Removing bucketServerLocation(.*)due to GF_TIMEOUT");
-
-  if (testLog.is_open()) {
-    while (std::getline(testLog, fileLine)) {
-      if (std::regex_search(fileLine, timeoutRegex)) {
-        timeoutErrors = true;
-      } else if (std::regex_search(fileLine, ioErrRegex)) {
-        ioErrors = true;
-      } else if (std::regex_search(fileLine, removingMetadataDueToIoErrRegex)) {
-        metadataRemovedDueToIoErr = true;
-      } else if (std::regex_search(fileLine,
-                                   removingMetadataDueToTimeoutRegex)) {
-        metadataRemovedDueToTimeout = true;
-      }
+    if (cacheImpl->getAndResetNetworkHopFlag()) {
+      numGetsRequiringHop++;
     }
+
+    EXPECT_EQ(i, std::stoi(value->toString()));
   }
-  EXPECT_EQ(timeoutErrors, metadataRemovedDueToTimeout);
-  EXPECT_EQ(ioErrors, metadataRemovedDueToIoErr);
-  EXPECT_NE(metadataRemovedDueToTimeout, metadataRemovedDueToIoErr);
+
+  return numGetsRequiringHop;
 }
 
-void putPartitionedRegionWithRedundancyServerGoesDown(bool singleHop) {
+int getAllEntries(Cache& cache, std::shared_ptr<Region> region,
+                  int numEntries) {
+  CacheImpl* cacheImpl = CacheRegionHelper::getCacheImpl(&cache);
+
+  std::vector<std::shared_ptr<CacheableKey>> keys{};
+  HashMapOfCacheable expectedMap;
+  for (int i = 0; i < numEntries; i++) {
+    auto key = CacheableKey::create(i);
+    keys.push_back(key);
+    auto value = Cacheable::create(std::to_string(i));
+    expectedMap.emplace(key, value);
+  }
+
+  HashMapOfCacheable actualMap = region->getAll(keys);
+
+  int numGetAllsRequiringHop = 0;
+  if (cacheImpl->getAndResetNetworkHopFlag()) {
+    numGetAllsRequiringHop++;
+  }
+
+  for (int i = 0; i < numEntries; i++) {
+    auto key = CacheableKey::create(i);
+    EXPECT_EQ(expectedMap[key]->toString(), actualMap[key]->toString());
+  }
+
+  return numGetAllsRequiringHop;
+}
+
+int putget(bool useSingleHop) {
   Cluster cluster{LocatorCount{1}, ServerCount{2}};
   cluster.start();
   cluster.getGfsh()
@@ -163,23 +178,26 @@
       .execute();
 
   auto cache = createCache();
-  auto pool = createPool(cluster, cache, singleHop);
+  auto pool = createPool(cluster, cache, useSingleHop);
   auto region = setupRegion(cache, pool);
 
-  int ENTRIES = 30;
+  // Warmup to get metaData
+  putEntries(cache, region, WARMUP_ENTRIES);
 
-  putEntries(region, ENTRIES, 0);
+  auto numOpsRequiringHop = putEntries(cache, region, ENTRIES);
+  numOpsRequiringHop += getEntries(cache, region, ENTRIES);
 
   cluster.getServers()[1].stop();
 
-  putEntries(region, ENTRIES, 1);
+  numOpsRequiringHop += getEntries(cache, region, ENTRIES);
 
   cluster.getServers()[1].start();
 
-  putEntries(region, ENTRIES, 2);
+  numOpsRequiringHop += getEntries(cache, region, ENTRIES);
+  return numOpsRequiringHop;
 }
 
-void getPartitionedRegionWithRedundancyServerGoesDown(bool singleHop) {
+int putAllgetAll(bool useSingleHop) {
   Cluster cluster{LocatorCount{1}, ServerCount{2}};
   cluster.start();
   cluster.getGfsh()
@@ -191,74 +209,73 @@
       .execute();
 
   auto cache = createCache();
-  auto pool = createPool(cluster, cache, singleHop);
+  auto pool = createPool(cluster, cache, useSingleHop);
   auto region = setupRegion(cache, pool);
 
-  int ENTRIES = 30;
+  // Warmup to get metaData
+  putAllEntries(cache, region, WARMUP_ENTRIES);
 
-  putEntries(region, ENTRIES, 0);
-
-  getEntries(region, ENTRIES);
+  auto numOpsRequiringHop = putAllEntries(cache, region, ENTRIES);
+  numOpsRequiringHop += getAllEntries(cache, region, ENTRIES);
 
   cluster.getServers()[1].stop();
 
-  getEntries(region, ENTRIES);
+  numOpsRequiringHop += getAllEntries(cache, region, ENTRIES);
 
   cluster.getServers()[1].start();
 
-  getEntries(region, ENTRIES);
+  numOpsRequiringHop += getAllEntries(cache, region, ENTRIES);
+  return numOpsRequiringHop;
 }
 
 /**
  * In this test case we verify that in a partition region with redundancy
- * when one server goes down, all gets are still served.
+ * when one server goes down, all puts and gets are still served.
+ *
  * Single-hop is enabled in the client.
- * It can be observed in the logs that when one of the server goes down
- * the bucketServerLocations for that server are removed from the
- * client metadata.
+ *
  */
-TEST(PartitionRegionOpsTest,
-     getPartitionedRegionWithRedundancyServerGoesDownSingleHop) {
-  removeLogFromPreviousExecution();
-  getPartitionedRegionWithRedundancyServerGoesDown(true);
-  verifyMetadataWasRemovedAtFirstError();
+TEST(PartitionRegionWithRedundancyTest, putgetWithSingleHop) {
+  auto useSingleHop = true;
+  auto numSingleHopsAfterWarmup = putget(useSingleHop);
+  EXPECT_EQ(numSingleHopsAfterWarmup, 0);
 }
 
 /**
  * In this test case we verify that in a partition region with redundancy
- * when one server goes down, all puts are still served.
+ * when one server goes down, all putAlls and getAlls are still served.
+ *
  * Single-hop is enabled in the client.
- * It can be observed in the logs that when one of the server goes down
- * the bucketServerLocations for that server are removed from the
- * client metadata.
- * When the server is brought back again, the meta data is refreshed
- * after putting again values.
+ *
  */
-TEST(PartitionRegionOpsTest,
-     putPartitionedRegionWithRedundancyServerGoesDownSingleHop) {
-  removeLogFromPreviousExecution();
-  putPartitionedRegionWithRedundancyServerGoesDown(true);
-  verifyMetadataWasRemovedAtFirstError();
+TEST(PartitionRegionWithRedundancyTest, putAllgetAllWithSingleHop) {
+  auto useSingleHop = true;
+  auto numSingleHopsAfterWarmup = putAllgetAll(useSingleHop);
+  EXPECT_EQ(numSingleHopsAfterWarmup, 0);
 }
 
 /**
  * In this test case we verify that in a partition region with redundancy
- * when one server goes down, all gets are still served.
+ * when one server goes down, all puts and gets are still served.
+ *
  * Single hop is not enabled in the client.
+ *
  */
-TEST(PartitionRegionOpsTest,
-     getPartitionedRegionWithRedundancyServerGoesDownNoSingleHop) {
-  getPartitionedRegionWithRedundancyServerGoesDown(false);
+TEST(PartitionRegionWithRedundancyTest, putgetWithoutSingleHop) {
+  auto useSingleHop = false;
+  putget(useSingleHop);
 }
 
 /**
  * In this test case we verify that in a partition region with redundancy
- * when one server goes down, all puts are still served.
- * Single-hop is not enabled in the client.
+ * when one server goes down, all putAlls and getAlls are still served.
+ *
+ * Single hop is not enabled in the client.
+ *
  */
-TEST(PartitionRegionOpsTest,
-     putPartitionedRegionWithRedundancyServerGoesDownNoSingleHop) {
-  putPartitionedRegionWithRedundancyServerGoesDown(false);
+TEST(PartitionRegionWithRedundancyTest, putAllgetAllWithoutSingleHop) {
+  auto useSingleHop = false;
+  putAllgetAll(useSingleHop);
 }
 
 }  // namespace
diff --git a/cppcache/integration/test/PdxInstanceFactoryTest.cpp b/cppcache/integration/test/PdxInstanceFactoryTest.cpp
index 348b96a..bd3168f 100644
--- a/cppcache/integration/test/PdxInstanceFactoryTest.cpp
+++ b/cppcache/integration/test/PdxInstanceFactoryTest.cpp
@@ -41,7 +41,7 @@
 
 std::shared_ptr<Cache> createCache() {
   auto cache = CacheFactory()
-                   .set("log-level", "debug")
+                   .set("log-level", "none")
                    .setPdxReadSerialized(true)
                    .create();
   return std::make_shared<Cache>(std::move(cache));
diff --git a/cppcache/integration/test/PdxInstanceTest.cpp b/cppcache/integration/test/PdxInstanceTest.cpp
index ead7f58..e62da6d 100644
--- a/cppcache/integration/test/PdxInstanceTest.cpp
+++ b/cppcache/integration/test/PdxInstanceTest.cpp
@@ -18,11 +18,7 @@
 #include <framework/Cluster.h>
 #include <framework/Gfsh.h>
 
-#include <future>
-#include <initializer_list>
-#include <iostream>
 #include <memory>
-#include <thread>
 
 #include <gtest/gtest.h>
 
@@ -31,23 +27,30 @@
 #include <geode/PoolManager.hpp>
 #include <geode/RegionFactory.hpp>
 #include <geode/RegionShortcut.hpp>
-#include <geode/TypeRegistry.hpp>
 
+#include "CacheImpl.hpp"
 #include "LocalRegion.hpp"
 #include "NestedPdxObject.hpp"
 #include "PdxType.hpp"
+#include "mock/CacheListenerMock.hpp"
 
 namespace {
 
 using apache::geode::client::Cache;
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::CacheListenerMock;
+using apache::geode::client::CacheRegionHelper;
 using apache::geode::client::IllegalStateException;
 using apache::geode::client::LocalRegion;
+using apache::geode::client::PdxInstance;
 using apache::geode::client::PdxInstanceFactory;
 using apache::geode::client::PdxSerializable;
+using apache::geode::client::PoolFactory;
 using apache::geode::client::Region;
 using apache::geode::client::RegionShortcut;
+using apache::geode::client::SelectResults;
 
 using PdxTests::Address;
 using PdxTests::PdxType;
@@ -55,8 +58,23 @@
 using testobject::ChildPdx;
 using testobject::ParentPdx;
 
+using testing::_;
+using testing::DoAll;
+using testing::InvokeWithoutArgs;
+using testing::Return;
+
 const std::string gemfireJsonClassName = "__GEMFIRE_JSON";
 
+Cache createTestCache() {
+  auto cache = CacheFactory()
+                   .set("log-level", "none")
+                   .set("on-client-disconnect-clear-pdxType-Ids", "true")
+                   .set("statistic-sampling-enabled", "false")
+                   .create();
+
+  return cache;
+}
+
 std::shared_ptr<Region> setupRegion(Cache& cache) {
   auto region = cache.createRegionFactory(RegionShortcut::PROXY)
                     .setPoolName("default")
@@ -186,12 +204,13 @@
 
   auto cache = cluster.createCache();
   auto region = setupRegion(cache);
-
   auto&& typeRegistry = cache.getTypeRegistry();
+  auto&& cachePerfStats = std::dynamic_pointer_cast<LocalRegion>(region)
+                              ->getCacheImpl()
+                              ->getCachePerfStats();
+
   typeRegistry.registerPdxType(Address::createDeserializable);
   typeRegistry.registerPdxType(PdxTests::PdxType::createDeserializable);
-  typeRegistry.registerPdxType(ChildPdx::createDeserializable);
-  typeRegistry.registerPdxType(ParentPdx::createDeserializable);
 
   PdxTests::PdxType pdxTypeOriginal;
   auto&& pdxTypeInstanceFactory =
@@ -212,15 +231,11 @@
   auto&& objectFromPdxTypeInstance = pdxTypeInstance->getObject();
   ASSERT_NE(nullptr, objectFromPdxTypeInstance);
 
-  auto&& cachePerfStats = std::dynamic_pointer_cast<LocalRegion>(region)
-                              ->getCacheImpl()
-                              ->getCachePerfStats();
-
   EXPECT_EQ(1, cachePerfStats.getPdxInstanceDeserializations())
       << "pdxInstanceDeserialization should be equal to 1.";
 
-  EXPECT_EQ(0, cachePerfStats.getPdxInstanceCreations())
-      << "pdxInstanceCreations should be equal to 0.";
+  EXPECT_EQ(1, cachePerfStats.getPdxInstanceCreations())
+      << "pdxInstanceCreations should be equal to 1";
 
   EXPECT_EQ(0, cachePerfStats.getPdxInstanceDeserializationTime())
       << "pdxInstanceDeserializationTime should be equal to 0.";
@@ -240,11 +255,11 @@
   EXPECT_EQ(1, cachePerfStats.getPdxInstanceDeserializations())
       << "pdxInstanceDeserialization should be equal to 1.";
 
-  EXPECT_EQ(0, cachePerfStats.getPdxInstanceCreations())
-      << "pdxInstanceCreations should be equal to 0.";
+  EXPECT_EQ(1, cachePerfStats.getPdxInstanceCreations())
+      << "pdxInstanceCreations should be equal to 1.";
 
   EXPECT_LT(0, cachePerfStats.getPdxInstanceDeserializationTime())
-      << "pdxInstanceDeserializationTime should be greater than 0.";
+      << "pdxInstanceDeserializationTime should be less than 0.";
 
   auto pdxTypeFromPdxTypeInstanceGet =
       std::dynamic_pointer_cast<PdxTests::PdxType>(
@@ -255,33 +270,52 @@
 
   EXPECT_EQ(-960665662, pdxTypeInstance->hashcode())
       << "Pdxhashcode hashcode not matched with java pdx hash code.";
+}
 
-  // TODO split into separate test for nested pdx object test.
-  ParentPdx pdxParentOriginal(10);
-  auto pdxParentInstanceFactory =
-      cache.createPdxInstanceFactory("testobject.ParentPdx");
-  clonePdxInstance(pdxParentOriginal, pdxParentInstanceFactory);
-  auto pdxParentInstance = pdxParentInstanceFactory.create();
-  EXPECT_EQ("testobject.ParentPdx", pdxParentInstance->getClassName())
-      << "pdxTypeInstance.getClassName should return testobject.ParentPdx.";
+TEST(PdxInstanceTest, testNestedPdxInstance) {
+  Cluster cluster{LocatorCount{1}, ServerCount{1}};
+
+  cluster.start();
+
+  cluster.getGfsh()
+      .create()
+      .region()
+      .withName("region")
+      .withType("REPLICATE")
+      .execute();
+
+  auto cache = cluster.createCache();
+  auto region = setupRegion(cache);
+  auto&& typeRegistry = cache.getTypeRegistry();
+  auto&& cachePerfStats = std::dynamic_pointer_cast<LocalRegion>(region)
+                              ->getCacheImpl()
+                              ->getCachePerfStats();
+
+  typeRegistry.registerPdxType(ChildPdx::createDeserializable);
+  typeRegistry.registerPdxType(ParentPdx::createDeserializable);
+
+  ParentPdx original{10};
+  auto factory = cache.createPdxInstanceFactory(original.getClassName());
+  clonePdxInstance(original, factory);
+  auto pdxInstance = factory.create();
 
   auto keyport = CacheableKey::create("pdxParentOriginal");
-  region->put(keyport, pdxParentInstance);
-  auto objectFromPdxParentInstanceGet =
+  region->put(keyport, pdxInstance);
+  auto object =
       std::dynamic_pointer_cast<PdxSerializable>(region->get(keyport));
+  EXPECT_TRUE(object);
 
-  EXPECT_EQ(1, cachePerfStats.getPdxInstanceDeserializations())
-      << "pdxInstanceDeserialization should be equal to 1.";
-  EXPECT_EQ(0, cachePerfStats.getPdxInstanceCreations())
-      << "pdxInstanceCreations should be equal to 0.";
+  EXPECT_EQ(0, cachePerfStats.getPdxInstanceDeserializations())
+      << "pdxInstanceDeserialization should be equal to 0";
+  EXPECT_EQ(1, cachePerfStats.getPdxInstanceCreations())
+      << "pdxInstanceCreations should be equal to 1";
   EXPECT_LT(0, cachePerfStats.getPdxInstanceDeserializationTime())
-      << "pdxInstanceDeserializationTime should be greater than 0.";
+      << "pdxInstanceDeserializationTime should be less than 0";
 
-  auto pdxParentFromPdxParentInstnaceGet =
-      std::dynamic_pointer_cast<ParentPdx>(objectFromPdxParentInstanceGet);
-  EXPECT_TRUE(
-      pdxParentOriginal.equals(*pdxParentFromPdxParentInstnaceGet, false))
-      << "ParentPdx objects should be equal.";
+  auto parentPdx = std::dynamic_pointer_cast<ParentPdx>(object);
+  EXPECT_TRUE(parentPdx);
+  EXPECT_TRUE(original.equals(*parentPdx, false))
+      << "ParentPdx objects should be equal";
 }
 
 TEST(PdxInstanceTest, testCreateJsonInstance) {
@@ -308,4 +342,96 @@
   auto retrievedValue = region->get("simpleObject");
 }
 
+TEST(PdxInstanceTest, testInstancePutAfterRestart) {
+  Cluster cluster{LocatorCount{1}, ServerCount{1}};
+  cluster.start();
+
+  auto& gfsh = cluster.getGfsh();
+  gfsh.create().region().withName("region").withType("REPLICATE").execute();
+
+  auto cache = createTestCache();
+  auto poolFactory = cache.getPoolManager()
+                         .createFactory()
+                         .setSubscriptionEnabled(true)
+                         .setPingInterval(std::chrono::seconds{2});
+  cluster.applyLocators(poolFactory);
+  poolFactory.create("default");
+
+  bool status = false;
+  std::mutex mutex_status;
+  std::condition_variable cv_status;
+  auto listener = std::make_shared<CacheListenerMock>();
+  EXPECT_CALL(*listener, afterCreate(_)).WillRepeatedly(Return());
+  EXPECT_CALL(*listener, afterRegionLive(_))
+      .WillRepeatedly(InvokeWithoutArgs([&status, &cv_status] {
+        status = true;
+        cv_status.notify_one();
+      }));
+  EXPECT_CALL(*listener, afterRegionDisconnected(_))
+      .WillRepeatedly(InvokeWithoutArgs([&status, &cv_status] {
+        status = false;
+        cv_status.notify_one();
+      }));
+
+  auto region = cache.createRegionFactory(RegionShortcut::PROXY)
+                    .setPoolName("default")
+                    .setCacheListener(listener)
+                    .create("region");
+
+  std::shared_ptr<PdxInstance> first_instance;
+  std::shared_ptr<PdxInstance> second_instance;
+
+  {
+    auto pdxInstanceFactory =
+        cache.createPdxInstanceFactory(gemfireJsonClassName, false);
+
+    pdxInstanceFactory.writeObject("foo",
+                                   CacheableString::create(std::string("bar")));
+    first_instance = pdxInstanceFactory.create();
+  }
+
+  {
+    auto pdxInstanceFactory =
+        cache.createPdxInstanceFactory(gemfireJsonClassName, false);
+
+    pdxInstanceFactory.writeObject("random",
+                                   CacheableString::create(std::string("bar")));
+
+    pdxInstanceFactory.writeInt("bar", -1);
+    second_instance = pdxInstanceFactory.create();
+  }
+
+  region->put("first_instance", first_instance);
+  region->put("second_instance", second_instance);
+
+  gfsh.shutdown().execute();
+
+  {
+    std::unique_lock<std::mutex> lock(mutex_status);
+    cv_status.wait(lock, [&status] { return !status; });
+  }
+
+  std::this_thread::sleep_for(std::chrono::seconds{30});
+
+  for (auto& server : cluster.getServers()) {
+    server.start();
+  }
+
+  {
+    std::unique_lock<std::mutex> lock(mutex_status);
+    cv_status.wait(lock, [&status] { return status; });
+  }
+
+  EXPECT_NO_THROW(region->put("first_instance", first_instance));
+  EXPECT_NO_THROW(region->put("second_instance", second_instance));
+
+  auto qs = cache.getQueryService();
+  auto q = qs->newQuery("SELECT * FROM /region WHERE bar = -1");
+
+  decltype(q->execute()) result;
+  EXPECT_NO_THROW(result = q->execute());
+  EXPECT_TRUE(result);
+  EXPECT_EQ(result->size(), 1UL);
+}
+
 }  // namespace
diff --git a/cppcache/integration/test/PdxJsonTypeTest.cpp b/cppcache/integration/test/PdxJsonTypeTest.cpp
index d7e2601..9c79178 100644
--- a/cppcache/integration/test/PdxJsonTypeTest.cpp
+++ b/cppcache/integration/test/PdxJsonTypeTest.cpp
@@ -101,8 +101,7 @@
               cache.createPdxInstanceFactory(gemfireJsonClassName)
                   .writeString("entryName", "java-domain-class-entry")
                   .create());
-  ASSERT_THROW(execution.withArgs(query).execute("QueryFunction"),
-               CacheServerException);
+  ASSERT_NO_THROW(execution.withArgs(query).execute("QueryFunction"));
 }
 
 TEST(PdxJsonTypeTest, testCreateTwoJsonInstances) {
diff --git a/cppcache/integration/test/PdxSerializerTest.cpp b/cppcache/integration/test/PdxSerializerTest.cpp
index 837bfb4..ef2266f 100644
--- a/cppcache/integration/test/PdxSerializerTest.cpp
+++ b/cppcache/integration/test/PdxSerializerTest.cpp
@@ -56,9 +56,7 @@
   bool operator==(const NonPdxType& rhs) const {
     return longValue == rhs.longValue;
   }
-  //  bool operator!=(const NonPdxType& rhs) const { return !(rhs == *this); }
 
-  int64_t getLongValue() { return longValue; }
   void setLongValue(int64_t value) { this->longValue = value; }
 
   friend TestPdxSerializer;
@@ -115,18 +113,19 @@
   return region;
 }
 
-void assertNonPdxType(const std::shared_ptr<NonPdxType>& expected,
-                      const std::shared_ptr<Cacheable>& actual) {
-  ASSERT_NE(nullptr, actual);
-  auto pdxWrapper = std::dynamic_pointer_cast<PdxWrapper>(actual);
-  ASSERT_NE(nullptr, pdxWrapper);
-  auto object = pdxWrapper->getObject();
-  ASSERT_NE(nullptr, object);
-  auto nonPdxType = std::static_pointer_cast<NonPdxType>(object);
-  ASSERT_NE(nullptr, nonPdxType);
-  EXPECT_EQ(2, nonPdxType->getLongValue());
+void expectNonPdxTypeEquals(const std::shared_ptr<NonPdxType>& expected,
+                            const std::shared_ptr<Cacheable>& actual) {
+  EXPECT_TRUE(actual);
 
-  EXPECT_NE(expected, nonPdxType);
+  auto wrapper = std::dynamic_pointer_cast<PdxWrapper>(actual);
+  EXPECT_TRUE(wrapper);
+
+  auto object = wrapper->getObject();
+  EXPECT_TRUE(object);
+
+  auto nonPdxType = std::static_pointer_cast<NonPdxType>(object);
+  EXPECT_TRUE(nonPdxType);
+
   EXPECT_EQ(*expected, *nonPdxType);
 }
 
@@ -150,7 +149,7 @@
         std::make_shared<TestPdxSerializer>());
 
     region->put("2", std::make_shared<PdxWrapper>(nonPdxType, CLASSNAME1));
-    assertNonPdxType(nonPdxType, region->get("2"));
+    expectNonPdxTypeEquals(nonPdxType, region->get("2"));
   }
 
   {
@@ -159,7 +158,7 @@
     cache.getTypeRegistry().registerPdxSerializer(
         std::make_shared<TestPdxSerializer>());
 
-    assertNonPdxType(nonPdxType, region->get("2"));
+    expectNonPdxTypeEquals(nonPdxType, region->get("2"));
   }
 }
 
diff --git a/cppcache/integration/test/PdxTypeRegistryTest.cpp b/cppcache/integration/test/PdxTypeRegistryTest.cpp
new file mode 100644
index 0000000..f87fbd6
--- /dev/null
+++ b/cppcache/integration/test/PdxTypeRegistryTest.cpp
@@ -0,0 +1,285 @@
+/* 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.
+ */
+
+#include <gtest/gtest.h>
+
+#include <geode/Cache.hpp>
+#include <geode/CacheFactory.hpp>
+#include <geode/CacheListener.hpp>
+#include <geode/PoolManager.hpp>
+#include <geode/QueryService.hpp>
+#include <geode/RegionFactory.hpp>
+#include <geode/RegionShortcut.hpp>
+
+#include "framework/Cluster.h"
+#include "framework/Framework.h"
+#include "gmock_actions.hpp"
+#include "mock/CacheListenerMock.hpp"
+#include "util/concurrent/binary_semaphore.hpp"
+
+namespace {
+
+using apache::geode::client::binary_semaphore;
+
+using apache::geode::client::Cache;
+using apache::geode::client::CacheableInt16;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::CacheListener;
+using apache::geode::client::CacheListenerMock;
+using apache::geode::client::NotConnectedException;
+using apache::geode::client::PdxFieldTypes;
+using apache::geode::client::PdxInstance;
+using apache::geode::client::Region;
+using apache::geode::client::RegionEvent;
+using apache::geode::client::RegionShortcut;
+using apache::geode::client::SelectResults;
+
+using ::testing::_;
+using ::testing::DoAll;
+using ::testing::InvokeWithoutArgs;
+using ::testing::Return;
+
+Cache createTestCache() {
+  CacheFactory cacheFactory;
+  return cacheFactory.set("log-level", "none")
+      .set("connect-timeout", "2s")
+      .set("statistic-sampling-enabled", "false")
+      .set("on-client-disconnect-clear-pdxType-Ids", "true")
+      .setPdxReadSerialized(true)
+      .create();
+}
+
+void createTestPool(Cluster& cluster, Cache& cache) {
+  auto poolFactory = cache.getPoolManager()
+                         .createFactory()
+                         .setReadTimeout(std::chrono::seconds{1})
+                         .setPingInterval(std::chrono::seconds{5})
+                         .setSubscriptionEnabled(true);
+
+  cluster.applyLocators(poolFactory);
+  poolFactory.create("pool");
+}
+
+std::shared_ptr<Region> createTestRegion(
+    Cache& cache, std::shared_ptr<CacheListener> listener) {
+  auto regionFactory = cache.createRegionFactory(RegionShortcut::PROXY);
+  return regionFactory.setPoolName("pool").setCacheListener(listener).create(
+      "region");
+}
+
+std::shared_ptr<PdxInstance> createTestPdxInstance(Cache& cache,
+                                                   const std::string& entry) {
+  auto factory = cache.createPdxInstanceFactory("__GEMFIRE_JSON", false);
+  return factory.writeString("entryName", entry)
+      .writeInt("int_value", -1)
+      .create();
+}
+
+/**
+ * The purpose of this test case is to verify that PdxTypeRegistry is cleaned up
+ * under the following scenario:
+ *  1 - Spin up a cluster and create a PARTITION region called 'region'. Note
+ *      that this region won't be persisting any data.
+ *  2 - A cache with is on-client-disconnect-clear-pdxType-Ids=true, meaning
+ *      it should cleanup the PdxTypeRegistry upon cluster disconnection.
+ *  3 - A PdxInstance with is put into key 'entry' and region 'region'
+ *      Before inserting the entry, its PdxType will be created on the cluster,
+ *      as it should not be present.
+ *  4 - Restart the cluster. Region 'region' should be empty as it was
+ *      persisting no data.
+ *  5 - Cache should automatically cleanup PdxTypeRegistry, containing the
+ *      cache of PdxType's handled by this cache.
+ *  6 - Insert again the entry inserted in step 3. If the registry was correctly
+ *      cleaned up as stated in state 5, PdxType will be inserted again before
+ *      inserting the entry. If PdxTypeRegistry clean up did not happen, the old
+ *      PdxTypeId will be used when inserting this entry.
+ *  7 - Fetch all of the 'region' entries using an OQL query, hence, forcing the
+ *      members to deserialize the entries contained on the region. The query
+ *      should not throw any exception and return exactly one entry, inserted on
+ *      step 6. If PdxTypeRegistry cleanup fails, then the old PdxTypeId will be
+ *      used when inserting the entry on step 6 and consequently members will
+ *      fail to deserialize the entry as there will be no PdxType matching the
+ *      given PdxTypeId, consequently leading to an UnknownPdxException being
+ *      thrown.
+ */
+TEST(PdxTypeRegistryTest, cleanupOnClusterRestartAndPut) {
+  Cluster cluster{LocatorCount{1}, ServerCount{2}};
+  cluster.start();
+
+  auto& gfsh = cluster.getGfsh();
+  gfsh.create().region().withName("region").withType("PARTITION").execute();
+
+  binary_semaphore live_sem{0};
+  binary_semaphore shut_sem{1};
+  auto listener = std::make_shared<CacheListenerMock>();
+  EXPECT_CALL(*listener, afterRegionLive(_))
+      .WillRepeatedly(DoAll(ReleaseSem(&live_sem), AcquireSem(&shut_sem)));
+  EXPECT_CALL(*listener, afterRegionDisconnected(_))
+      .WillRepeatedly(DoAll(ReleaseSem(&shut_sem), AcquireSem(&live_sem)));
+  EXPECT_CALL(*listener, afterCreate(_)).WillRepeatedly(Return());
+  EXPECT_CALL(*listener, afterRegionDestroy(_)).WillRepeatedly(Return());
+  EXPECT_CALL(*listener, close(_)).WillRepeatedly(Return());
+
+  auto cache = createTestCache();
+  createTestPool(cluster, cache);
+  auto qs = cache.getQueryService("pool");
+  auto region = createTestRegion(cache, listener);
+
+  std::string key = "entry";
+  auto pdx = createTestPdxInstance(cache, key);
+  region->put(key, pdx);
+
+  // Shutdown and wait for some time
+  gfsh.shutdown().execute();
+
+  shut_sem.acquire();
+  shut_sem.release();
+
+  std::this_thread::sleep_for(std::chrono::seconds{15});
+
+  for (auto& server : cluster.getServers()) {
+    server.start();
+  }
+
+  live_sem.acquire();
+  live_sem.release();
+
+  region->put(key, pdx);
+
+  std::shared_ptr<SelectResults> result;
+  auto query = qs->newQuery("SELECT * FROM /region WHERE entryName = 'entry'");
+
+  // If PdxTypeRegistry was not correctly cleaned up, this query will throw
+  // UnknownPdxTypeException. See the comment at the beginning of the test for
+  // additional info.
+  EXPECT_NO_THROW(result = query->execute());
+  EXPECT_TRUE(result);
+  EXPECT_EQ(result->size(), 1);
+}
+
+/**
+ * The purpose of this test case is to verify that there are no coredumps when
+ * calling several PdxInstance's methods due to PdxTypeRegistry cleanup under
+ * the following scenario:
+ *  1 - Spin up a cluster and create a PARTITION region called 'region'. Note
+ *      that this region won't be persisting any data.
+ *  2 - A cache with is on-client-disconnect-clear-pdxType-Ids=true, meaning
+ *      it should cleanup the PdxTypeRegistry upon cluster disconnection.
+ *  3 - Create and put PdxInstance with is put into key 'entry' and region
+ *     'region'.
+ *  4 - Restart the cluster. Region 'region' should be empty as it was
+ *      persisting no data.
+ *  5 - Cache should automatically cleanup PdxTypeRegistry, containing the
+ *      cache of PdxType's handled by this cache.
+ *  6 - If PdxInstance's PdxType object is stored inside the PdxInstance rather
+ *      than its PdxTypeId, all of the accessors could be called for the
+ *      PdxInstance even if this PdxType was not added to the PdxTypeRegistry.
+ *      If instead the PdxTypeId is stored, this will cause an coredump given
+ *      that the cache won't be able to find the PdxType for the above mentioned
+ *      PdxTypeId.
+ */
+TEST(PdxTypeRegistryTest, cleanupOnClusterRestartAndCallAccessors) {
+  Cluster cluster{LocatorCount{1}, ServerCount{2}};
+  cluster.start();
+
+  auto& gfsh = cluster.getGfsh();
+  gfsh.create().region().withName("region").withType("PARTITION").execute();
+
+  binary_semaphore live_sem{0};
+  binary_semaphore shut_sem{1};
+  auto listener = std::make_shared<CacheListenerMock>();
+  EXPECT_CALL(*listener, afterRegionLive(_))
+      .WillRepeatedly(DoAll(ReleaseSem(&live_sem), AcquireSem(&shut_sem)));
+  EXPECT_CALL(*listener, afterRegionDisconnected(_))
+      .WillRepeatedly(DoAll(ReleaseSem(&shut_sem), AcquireSem(&live_sem)));
+  EXPECT_CALL(*listener, afterCreate(_)).WillRepeatedly(Return());
+  EXPECT_CALL(*listener, afterRegionDestroy(_)).WillRepeatedly(Return());
+  EXPECT_CALL(*listener, close(_)).WillRepeatedly(Return());
+
+  auto cache = createTestCache();
+  createTestPool(cluster, cache);
+  auto qs = cache.getQueryService("pool");
+  auto region = createTestRegion(cache, listener);
+
+  std::string key = "entry";
+  region->put(key, createTestPdxInstance(cache, key));
+  auto object = region->get(key);
+  EXPECT_TRUE(object);
+
+  auto pdx = std::dynamic_pointer_cast<PdxInstance>(object);
+  EXPECT_TRUE(pdx);
+
+  // Shutdown and wait for some time
+  gfsh.shutdown().execute();
+
+  shut_sem.acquire();
+  shut_sem.release();
+
+  std::this_thread::sleep_for(std::chrono::seconds{15});
+
+  for (auto& server : cluster.getServers()) {
+    server.start();
+  }
+
+  live_sem.acquire();
+  live_sem.release();
+
+  // Checking no coredump is happening when calling isIdentityField
+  EXPECT_FALSE(pdx->isIdentityField("entryName"));
+  EXPECT_FALSE(pdx->isIdentityField("int_value"));
+
+  // Checking no coredump is happening when calling hasField
+  EXPECT_TRUE(pdx->hasField("entryName"));
+  EXPECT_TRUE(pdx->hasField("int_value"));
+
+  // Checking no coredump is happening when calling getFieldNames
+  auto fields = pdx->getFieldNames();
+  EXPECT_TRUE(fields);
+
+  std::set<std::string> fieldsSet;
+  for (auto field : fields->value()) {
+    fieldsSet.insert(field->toString());
+  }
+
+  EXPECT_EQ(fieldsSet.count("entryName"), 1);
+  EXPECT_EQ(fieldsSet.count("int_value"), 1);
+
+  // Checking no coredump is happening when calling getFieldType
+  EXPECT_EQ(pdx->getFieldType("entryName"), PdxFieldTypes::STRING);
+  EXPECT_EQ(pdx->getFieldType("int_value"), PdxFieldTypes::INT);
+
+  // Checking no coredump is happening when calling getStringField
+  EXPECT_EQ(pdx->getStringField("entryName"), key);
+
+  // Checking no coredump is happening when calling getIntField
+  EXPECT_EQ(pdx->getIntField("int_value"), -1);
+
+  // Checking no coredump is happening when calling objectSize
+  EXPECT_NE(pdx->objectSize(), 0);
+
+  // Checking no coredump is happening when calling hashcode
+  EXPECT_NE(pdx->hashcode(), 0);
+
+  // Checking no coredump is happening when calling getClassName
+  EXPECT_EQ(pdx->getClassName(), "__GEMFIRE_JSON");
+
+  // Checking no coredump is happening when calling getClassName
+  EXPECT_EQ(pdx->getClassName(), "__GEMFIRE_JSON");
+
+  // Checking no coredump is happening when calling toString
+  EXPECT_FALSE(pdx->toString().empty());
+}
+}  // namespace
diff --git a/cppcache/integration/test/Position.cpp b/cppcache/integration/test/Position.cpp
new file mode 100644
index 0000000..4cde01e
--- /dev/null
+++ b/cppcache/integration/test/Position.cpp
@@ -0,0 +1,85 @@
+/*
+ * 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.
+ */
+#include "Position.hpp"
+
+#include <geode/DataInput.hpp>
+#include <geode/DataOutput.hpp>
+
+namespace DataSerializableTest {
+
+int32_t Position::count = 0;
+
+Position::Position()
+    : volumeAverageOver20Days_(0),
+      conversionRatio_(0.0),
+      valueGain_(0.0),
+      industry_(0),
+      issuer_(0),
+      marketValue_(0.0),
+      quantity_(0.0),
+      sharesOutstanding_(0),
+      volatility_(0),
+      positionId_(0) {}
+
+Position::Position(std::string id, int32_t outstandingShares) : Position() {
+  securityId_ = std::move(id);
+  securityType_ = "a";
+  sharesOutstanding_ = outstandingShares;
+  quantity_ = outstandingShares - (count % 2 == 0 ? 1000 : 100);
+  marketValue_ = quantity_ * 1.2345998;
+  positionId_ = count++;
+}
+
+void Position::toData(apache::geode::client::DataOutput& output) const {
+  output.writeInt(volumeAverageOver20Days_);
+  output.writeString(bondRating_);
+  output.writeDouble(conversionRatio_);
+  output.writeString(country_);
+  output.writeDouble(valueGain_);
+  output.writeInt(industry_);
+  output.writeInt(issuer_);
+  output.writeDouble(marketValue_);
+  output.writeDouble(quantity_);
+  output.writeString(securityId_);
+  output.writeString(securityLinks_);
+  output.writeUTF(securityType_);
+  output.writeInt(sharesOutstanding_);
+  output.writeString(underlyingSecurity_);
+  output.writeInt(volatility_);
+  output.writeInt(positionId_);
+}
+
+void Position::fromData(apache::geode::client::DataInput& input) {
+  volumeAverageOver20Days_ = input.readInt64();
+  bondRating_ = input.readString();
+  conversionRatio_ = input.readDouble();
+  country_ = input.readString();
+  valueGain_ = input.readDouble();
+  industry_ = input.readInt64();
+  issuer_ = input.readInt64();
+  marketValue_ = input.readDouble();
+  quantity_ = input.readDouble();
+  securityId_ = input.readString();
+  securityLinks_ = input.readString();
+  securityType_ = input.readUTF();
+  sharesOutstanding_ = input.readInt32();
+  underlyingSecurity_ = input.readString();
+  volatility_ = input.readInt64();
+  positionId_ = input.readInt32();
+}
+
+}  // namespace DataSerializableTest
diff --git a/cppcache/integration/test/Position.hpp b/cppcache/integration/test/Position.hpp
new file mode 100644
index 0000000..fe188f3
--- /dev/null
+++ b/cppcache/integration/test/Position.hpp
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+#ifndef POSITION_H
+#define POSITION_H
+
+/*
+ * @brief User class for testing the put functionality for object.
+ */
+
+#include <string>
+
+#include <geode/CacheableString.hpp>
+#include <geode/DataSerializable.hpp>
+
+namespace DataSerializableTest {
+
+using apache::geode::client::CacheableString;
+using apache::geode::client::DataInput;
+using apache::geode::client::DataOutput;
+using apache::geode::client::DataSerializable;
+
+class Position : public DataSerializable {
+ private:
+  int64_t volumeAverageOver20Days_;
+  std::string bondRating_;
+  double conversionRatio_;
+  std::string country_;
+  double valueGain_;
+  int64_t industry_;
+  int64_t issuer_;
+  double marketValue_;
+  double quantity_;
+  std::string securityId_;
+  std::string securityLinks_;
+  std::string securityType_;
+  int32_t sharesOutstanding_;
+  std::string underlyingSecurity_;
+  int64_t volatility_;
+  int32_t positionId_;
+
+ public:
+  static int32_t count;
+
+  Position();
+  explicit Position(std::string id, int32_t out);
+  ~Position() override = default;
+  void toData(DataOutput& output) const override;
+  void fromData(DataInput& input) override;
+
+  static void resetCounter() { count = 0; }
+  std::string getSecurityId() { return securityId_; }
+  int32_t getPOsitionId() { return positionId_; }
+  int32_t getSharesOutstanding() { return sharesOutstanding_; }
+  static std::shared_ptr<Serializable> createDeserializable() {
+    return std::make_shared<Position>();
+  }
+};
+
+}  // namespace DataSerializableTest
+
+#endif  // POSITION_H
diff --git a/cppcache/integration/test/PositionKey.cpp b/cppcache/integration/test/PositionKey.cpp
new file mode 100644
index 0000000..67df75e
--- /dev/null
+++ b/cppcache/integration/test/PositionKey.cpp
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+#include "PositionKey.hpp"
+
+#include <geode/DataInput.hpp>
+#include <geode/DataOutput.hpp>
+
+namespace DataSerializableTest {
+
+void PositionKey::toData(DataOutput& output) const {
+  output.writeInt(positionId_);
+}
+
+void PositionKey::fromData(apache::geode::client::DataInput& input) {
+  positionId_ = input.readInt64();
+}
+
+bool PositionKey::operator==(const CacheableKey& other) const {
+  return positionId_ ==
+         (static_cast<const PositionKey&>(other)).getPositionId();
+}
+
+int PositionKey::hashcode() const {
+  int prime = 31;
+  int result = prime * static_cast<int32_t>(positionId_);
+  return result;
+}
+
+}  // namespace DataSerializableTest
diff --git a/cppcache/integration/test/PositionKey.hpp b/cppcache/integration/test/PositionKey.hpp
new file mode 100644
index 0000000..ecc932f
--- /dev/null
+++ b/cppcache/integration/test/PositionKey.hpp
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+#ifndef POSITIONKEY_H_
+#define POSITIONKEY_H_
+
+#include <string>
+
+#include <geode/CacheableString.hpp>
+#include <geode/DataSerializable.hpp>
+
+namespace DataSerializableTest {
+
+using apache::geode::client::CacheableKey;
+using apache::geode::client::DataInput;
+using apache::geode::client::DataOutput;
+using apache::geode::client::DataSerializable;
+
+class PositionKey : public DataSerializable, public CacheableKey {
+ private:
+  int64_t positionId_;
+
+ public:
+  PositionKey() = default;
+  explicit PositionKey(int64_t positionId) : positionId_(positionId) {}
+  ~PositionKey() override = default;
+
+  bool operator==(const CacheableKey& other) const override;
+  int32_t hashcode() const override;
+
+  void toData(DataOutput& output) const override;
+  void fromData(DataInput& input) override;
+
+  int64_t getPositionId() const { return positionId_; }
+  static std::shared_ptr<Serializable> createDeserializable() {
+    return std::make_shared<PositionKey>();
+  }
+};
+
+}  // namespace DataSerializableTest
+
+#endif  // POSITIONKEY_H_
diff --git a/cppcache/integration/test/RegionPutAllTest.cpp b/cppcache/integration/test/RegionPutAllTest.cpp
index c487b4e..ca40fac 100644
--- a/cppcache/integration/test/RegionPutAllTest.cpp
+++ b/cppcache/integration/test/RegionPutAllTest.cpp
@@ -50,7 +50,7 @@
   using apache::geode::client::CacheFactory;
 
   auto cache = CacheFactory()
-                   .set("log-level", "debug")
+                   .set("log-level", "none")
                    .set("statistic-sampling-enabled", "false")
                    .create();
 
@@ -102,4 +102,39 @@
   }
 }
 
+//
+// verifies that putall works when not all metadata is present, i.e. not all
+// buckets exist yet on the cluster.
+//
+TEST(RegionPutAllTest, putAllAndVerifyKeysExist) {
+  Cluster cluster{LocatorCount{1}, ServerCount{3}};
+
+  cluster.start();
+
+  cluster.getGfsh()
+      .create()
+      .region()
+      .withName("region")
+      .withType("PARTITION")
+      .execute();
+
+  auto cache = createCache();
+  auto pool = createPool(cluster, cache);
+  auto region = setupRegion(cache, pool);
+
+  for (int i = 0; i < 50; i++) {
+    region->put(std::to_string(i), Cacheable::create(i));
+  }
+
+  HashMapOfCacheable all;
+  for (int i = 0; i < 113; i++) {
+    all.emplace(CacheableKey::create(std::to_string(i)), Cacheable::create(i));
+  }
+
+  std::this_thread::sleep_for(std::chrono::seconds(10));
+  region->putAll(all);
+  for (auto& key : all) {
+    ASSERT_TRUE(region->containsKeyOnServer(key.first));
+  }
+}
 }  // namespace
diff --git a/cppcache/integration/test/RegisterKeysTest.cpp b/cppcache/integration/test/RegisterKeysTest.cpp
index 0c1a6fc..42f7d7a 100644
--- a/cppcache/integration/test/RegisterKeysTest.cpp
+++ b/cppcache/integration/test/RegisterKeysTest.cpp
@@ -16,40 +16,88 @@
 
 #include <gmock/gmock.h>
 
-#include <condition_variable>
-#include <mutex>
+#include <chrono>
+#include <thread>
+
+#include <boost/thread/latch.hpp>
 
 #include <gtest/gtest.h>
 
 #include <geode/Cache.hpp>
 #include <geode/CacheFactory.hpp>
 #include <geode/EntryEvent.hpp>
+#include <geode/RegionEvent.hpp>
 #include <geode/RegionFactory.hpp>
 #include <geode/RegionShortcut.hpp>
 
 #include "framework/Cluster.h"
 #include "framework/Framework.h"
 #include "framework/Gfsh.h"
-
-class CacheListenerMock : public apache::geode::client::CacheListener {
- public:
-  MOCK_METHOD1(afterDestroy,
-               void(const apache::geode::client::EntryEvent& event));
-};
+#include "gmock_actions.hpp"
+#include "mock/CacheListenerMock.hpp"
+#include "util/concurrent/binary_semaphore.hpp"
 
 namespace {
 
+using apache::geode::client::binary_semaphore;
 using apache::geode::client::Cache;
 using apache::geode::client::CacheableInt16;
+using apache::geode::client::CacheableInt32;
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
 using apache::geode::client::CacheFactory;
+using apache::geode::client::CacheListener;
+using apache::geode::client::CacheListenerMock;
+using apache::geode::client::EntryEvent;
 using apache::geode::client::IllegalStateException;
 using apache::geode::client::Region;
+using apache::geode::client::RegionEvent;
 using apache::geode::client::RegionShortcut;
-using ::testing::_;
 
-ACTION_P(CvNotifyOne, cv) { cv->notify_one(); }
+using ::testing::_;
+using ::testing::DoAll;
+using ::testing::InvokeWithoutArgs;
+using ::testing::Return;
+
+constexpr size_t kNumKeys = 100;
+
+class CountdownCacheListener : public CacheListener {
+ private:
+  size_t expectedCount_;
+  boost::latch allKeysInvalidateLatch_;
+  boost::latch allKeysUpdatedLatch_;
+
+ public:
+  explicit CountdownCacheListener(size_t expectedCount)
+      : expectedCount_(expectedCount),
+        allKeysInvalidateLatch_(expectedCount),
+        allKeysUpdatedLatch_(expectedCount) {}
+
+  void afterUpdate(const EntryEvent&) override {
+    allKeysUpdatedLatch_.count_down();
+  }
+
+  void afterInvalidate(const EntryEvent&) override {
+    allKeysInvalidateLatch_.count_down();
+  }
+
+  void reset() {
+    allKeysInvalidateLatch_.reset(expectedCount_);
+    allKeysUpdatedLatch_.reset(expectedCount_);
+  }
+
+  template <class Rep, class Period>
+  boost::cv_status waitForUpdates(
+      const boost::chrono::duration<Rep, Period>& rel_time) {
+    return allKeysUpdatedLatch_.wait_for(rel_time);
+  }
+
+  template <class Rep, class Period>
+  boost::cv_status waitForInvalidates(
+      const boost::chrono::duration<Rep, Period>& rel_time) {
+    return allKeysInvalidateLatch_.wait_for(rel_time);
+  }
+};
 
 Cache createTestCache() {
   CacheFactory cacheFactory;
@@ -150,7 +198,14 @@
     producer_region = setupProxyRegion(producer_cache);
   }
 
+  binary_semaphore sem{0};
   auto listener = std::make_shared<CacheListenerMock>();
+
+  EXPECT_CALL(*listener, afterCreate(_)).WillRepeatedly(Return());
+  EXPECT_CALL(*listener, afterRegionLive(_)).WillRepeatedly(Return());
+  EXPECT_CALL(*listener, afterRegionDisconnected(_)).WillRepeatedly(Return());
+  EXPECT_CALL(*listener, afterDestroy(_)).Times(1).WillOnce(ReleaseSem(&sem));
+
   {
     auto poolFactory =
         listener_cache.getPoolManager().createFactory().setSubscriptionEnabled(
@@ -169,15 +224,307 @@
   producer_region->put("one", std::make_shared<CacheableInt16>(1));
   producer_region->destroy("one");
 
-  std::mutex cv_mutex;
-  std::condition_variable cv;
-  EXPECT_CALL(*listener, afterDestroy(_)).Times(1).WillOnce(CvNotifyOne(&cv));
+  EXPECT_TRUE(sem.try_acquire_for(std::chrono::minutes{1}));
+}
 
+TEST(RegisterKeysTest, RegisterAnyAndClusterRestart) {
+  auto N = 100U;
+  boost::latch create_latch{N};
+  binary_semaphore live_sem{0};
+  binary_semaphore shut_sem{1};
+
+  Cluster cluster{LocatorCount{1}, ServerCount{1}};
+  cluster.start();
+
+  auto& gfsh = cluster.getGfsh();
+  gfsh.create().region().withName("region").withType("REPLICATE").execute();
+
+  auto cache = createTestCache();
   {
-    std::unique_lock<std::mutex> lock(cv_mutex);
-    EXPECT_EQ(cv.wait_for(lock, std::chrono::seconds(5)),
-              std::cv_status::no_timeout);
+    auto poolFactory =
+        cache.getPoolManager().createFactory().setSubscriptionEnabled(true);
+    cluster.applyLocators(poolFactory);
+    poolFactory.create("default");
   }
+
+  auto listener = std::make_shared<CacheListenerMock>();
+  EXPECT_CALL(*listener, afterRegionLive(_))
+      .WillRepeatedly(DoAll(ReleaseSem(&live_sem), AcquireSem(&shut_sem)));
+  EXPECT_CALL(*listener, afterRegionDisconnected(_))
+      .WillRepeatedly(DoAll(ReleaseSem(&shut_sem), AcquireSem(&live_sem)));
+  EXPECT_CALL(*listener, afterCreate(_))
+      .Times(N)
+      .WillRepeatedly(CountDownLatch(&create_latch));
+
+  auto region = cache.createRegionFactory(RegionShortcut::CACHING_PROXY)
+                    .setPoolName("default")
+                    .setCacheListener(listener)
+                    .create("region");
+  region->registerAllKeys(false, true);
+  EXPECT_EQ(region->keys().size(), 0);
+
+  auto producer = std::thread([&region, N] {
+    for (auto i = 0U; i < N;) {
+      auto key = "entry-" + std::to_string(i++);
+      auto value = "{\"entryName\": \"" + key + "\"}";
+      region->put(key, value);
+    }
+  });
+
+  create_latch.wait();
+
+  producer.join();
+  gfsh.shutdown().execute();
+
+  shut_sem.acquire();
+  shut_sem.release();
+
+  for (auto& server : cluster.getServers()) {
+    server.start();
+  }
+
+  live_sem.acquire();
+  live_sem.release();
+  EXPECT_EQ(region->keys().size(), 0);
+}
+
+TEST(RegisterKeysTest, RegisterRegexAndClusterRestart) {
+  auto N_1 = 10U;
+  auto N_2 = 90U;
+  auto N = N_1 + N_2;
+  binary_semaphore live_sem{0};
+  binary_semaphore shut_sem{1};
+  boost::latch create_latch{N};
+
+  Cluster cluster{LocatorCount{1}, ServerCount{1}};
+  cluster.start();
+
+  auto& gfsh = cluster.getGfsh();
+  gfsh.create().region().withName("region").withType("REPLICATE").execute();
+
+  auto cache = createTestCache();
+  {
+    auto poolFactory =
+        cache.getPoolManager().createFactory().setSubscriptionEnabled(true);
+    cluster.applyLocators(poolFactory);
+    poolFactory.create("default");
+  }
+
+  auto listener = std::make_shared<CacheListenerMock>();
+  EXPECT_CALL(*listener, afterRegionLive(_))
+      .WillRepeatedly(DoAll(ReleaseSem(&live_sem), AcquireSem(&shut_sem)));
+  EXPECT_CALL(*listener, afterRegionDisconnected(_))
+      .WillRepeatedly(DoAll(ReleaseSem(&shut_sem), AcquireSem(&live_sem)));
+  EXPECT_CALL(*listener, afterCreate(_))
+      .Times(N)
+      .WillRepeatedly(CountDownLatch(&create_latch));
+
+  auto region = cache.createRegionFactory(RegionShortcut::CACHING_PROXY)
+                    .setPoolName("default")
+                    .setCacheListener(listener)
+                    .create("region");
+  region->registerRegex("interest-.*", false, true);
+  EXPECT_EQ(region->keys().size(), 0);
+
+  auto producer_non_interest = std::thread([&region, N_1] {
+    for (auto i = 0U; i < N_1;) {
+      auto key = "entry-" + std::to_string(i++);
+      auto value = "{\"entryName\": \"" + key + "\"}";
+      region->put(key, value);
+    }
+  });
+
+  auto producer_interest = std::thread([&region, N_2] {
+    for (auto i = 0U; i < N_2;) {
+      auto key = "interest-" + std::to_string(i++);
+      auto value = "{\"entryName\": \"" + key + "\"}";
+      region->put(key, value);
+    }
+  });
+
+  create_latch.wait();
+
+  producer_non_interest.join();
+  producer_interest.join();
+
+  gfsh.shutdown().execute();
+
+  shut_sem.acquire();
+  shut_sem.release();
+
+  for (auto& server : cluster.getServers()) {
+    server.start();
+  }
+
+  live_sem.acquire();
+  live_sem.release();
+  EXPECT_EQ(region->keys().size(), N_1);
+}
+
+TEST(RegisterKeysTest, RegisterKeySetAndClusterRestart) {
+  auto N_1 = 10U;
+  std::vector<std::shared_ptr<CacheableKey>> interest_keys{
+      CacheableKey::create("dolores-1"),
+      CacheableKey::create("maeve-1"),
+      CacheableKey::create("bernard-2"),
+      CacheableKey::create("theodore-3"),
+      CacheableKey::create("william-5"),
+      CacheableKey::create("clementine-8"),
+      CacheableKey::create("abernathy-13"),
+      CacheableKey::create("ford-21"),
+  };
+
+  auto N = N_1 + interest_keys.size();
+  binary_semaphore live_sem{0};
+  binary_semaphore shut_sem{1};
+  boost::latch create_latch{N};
+  Cluster cluster{LocatorCount{1}, ServerCount{1}};
+  cluster.start();
+
+  auto& gfsh = cluster.getGfsh();
+  gfsh.create().region().withName("region").withType("REPLICATE").execute();
+
+  auto cache = createTestCache();
+  {
+    auto poolFactory =
+        cache.getPoolManager().createFactory().setSubscriptionEnabled(true);
+    cluster.applyLocators(poolFactory);
+    poolFactory.create("default");
+  }
+
+  auto listener = std::make_shared<CacheListenerMock>();
+  EXPECT_CALL(*listener, afterRegionLive(_))
+      .WillRepeatedly(DoAll(ReleaseSem(&live_sem), AcquireSem(&shut_sem)));
+  EXPECT_CALL(*listener, afterRegionDisconnected(_))
+      .WillRepeatedly(DoAll(ReleaseSem(&shut_sem), AcquireSem(&live_sem)));
+  EXPECT_CALL(*listener, afterCreate(_))
+      .Times(N)
+      .WillRepeatedly(CountDownLatch(&create_latch));
+
+  auto region = cache.createRegionFactory(RegionShortcut::CACHING_PROXY)
+                    .setPoolName("default")
+                    .setCacheListener(listener)
+                    .create("region");
+
+  region->registerKeys(interest_keys, false, true);
+  EXPECT_EQ(region->keys().size(), 0);
+
+  auto producer_non_interest = std::thread([&region, N_1] {
+    for (auto i = 0U; i < N_1;) {
+      auto key = "entry-" + std::to_string(i++);
+      auto value = "{\"entryName\": \"" + key + "\"}";
+      region->put(key, value);
+    }
+  });
+
+  auto producer_interest = std::thread([&region, &interest_keys] {
+    for (auto key : interest_keys) {
+      auto value = "{\"entryName\": \"" + key->toString() + "\"}";
+      region->put(key, value);
+    }
+  });
+
+  create_latch.wait();
+
+  producer_non_interest.join();
+  producer_interest.join();
+
+  gfsh.shutdown().execute();
+
+  shut_sem.acquire();
+  shut_sem.release();
+
+  for (auto& server : cluster.getServers()) {
+    server.start();
+  }
+
+  live_sem.acquire();
+  live_sem.release();
+  EXPECT_EQ(region->keys().size(), N_1);
+}
+
+TEST(RegisterKeysTest, RegisterKeySetAndDestroyClusterRestart) {
+  auto N_1 = 10U;
+  std::vector<std::shared_ptr<CacheableKey>> interest_keys{
+      CacheableKey::create("dolores-1"),
+      CacheableKey::create("maeve-1"),
+      CacheableKey::create("bernard-2"),
+      CacheableKey::create("theodore-3"),
+      CacheableKey::create("william-5"),
+      CacheableKey::create("clementine-8"),
+      CacheableKey::create("abernathy-13"),
+      CacheableKey::create("ford-21"),
+  };
+
+  auto N = N_1 + interest_keys.size();
+  binary_semaphore live_sem{0};
+  binary_semaphore shut_sem{1};
+  boost::latch create_latch{N};
+  Cluster cluster{LocatorCount{1}, ServerCount{1}};
+  cluster.start();
+
+  auto& gfsh = cluster.getGfsh();
+  gfsh.create().region().withName("region").withType("REPLICATE").execute();
+
+  auto cache = createTestCache();
+  {
+    auto poolFactory =
+        cache.getPoolManager().createFactory().setSubscriptionEnabled(true);
+    cluster.applyLocators(poolFactory);
+    poolFactory.create("default");
+  }
+
+  auto listener = std::make_shared<CacheListenerMock>();
+  EXPECT_CALL(*listener, afterRegionLive(_))
+      .WillRepeatedly(DoAll(ReleaseSem(&live_sem), AcquireSem(&shut_sem)));
+  EXPECT_CALL(*listener, afterRegionDisconnected(_))
+      .WillRepeatedly(DoAll(ReleaseSem(&shut_sem), AcquireSem(&live_sem)));
+  EXPECT_CALL(*listener, afterCreate(_))
+      .Times(N)
+      .WillRepeatedly(CountDownLatch(&create_latch));
+  EXPECT_CALL(*listener, afterDestroy(_)).Times(1).WillOnce(Return());
+
+  auto region = cache.createRegionFactory(RegionShortcut::CACHING_PROXY)
+                    .setPoolName("default")
+                    .setCacheListener(listener)
+                    .create("region");
+
+  region->registerKeys(interest_keys, false, true);
+  EXPECT_EQ(region->keys().size(), 0);
+
+  auto producer_non_interest = std::thread([&region, N_1] {
+    for (auto i = 0U; i < N_1;) {
+      auto key = "entry-" + std::to_string(i++);
+      auto value = "{\"entryName\": \"" + key + "\"}";
+      region->put(key, value);
+    }
+  });
+
+  auto producer_interest = std::thread([&region, &interest_keys] {
+    for (auto key : interest_keys) {
+      auto value = "{\"entryName\": \"" + key->toString() + "\"}";
+      region->put(key, value);
+    }
+  });
+
+  create_latch.wait();
+
+  producer_non_interest.join();
+  producer_interest.join();
+
+  region->remove(interest_keys[0]);
+  gfsh.shutdown().execute();
+
+  shut_sem.acquire();
+  shut_sem.release();
+
+  for (auto& server : cluster.getServers()) {
+    server.start();
+  }
+
+  live_sem.acquire();
+  live_sem.release();
+  EXPECT_EQ(region->keys().size(), N_1);
 }
 
 TEST(RegisterKeysTest, RegisterAnyWithCachingRegion) {
@@ -214,7 +561,7 @@
     cluster.applyLocators(poolFactory);
     poolFactory.create("default");
     auto region2 = setupCachingProxyRegion(cache2);
-    std::vector<std::shared_ptr<CacheableKey> > keys;
+    std::vector<std::shared_ptr<CacheableKey>> keys;
     keys.push_back(std::make_shared<CacheableString>("one"));
 
     auto&& entryBefore = region2->getEntry("one");
@@ -268,11 +615,222 @@
   cluster.applyLocators(poolFactory);
   poolFactory.create("default");
   auto region = setupProxyRegion(cache);
-  std::vector<std::shared_ptr<CacheableKey> > keys;
+  std::vector<std::shared_ptr<CacheableKey>> keys;
   keys.push_back(std::make_shared<CacheableInt16>(2));
 
   EXPECT_THROW(region->registerKeys(keys, false, true), IllegalStateException);
   cache.close();
 }
 
+apache::geode::client::Cache createCache() {
+  return apache::geode::client::CacheFactory()
+      .set("log-level", "debug")
+      .set("log-file", "c:/temp/RegisterKeysTest.log")
+      .set("statistic-sampling-enabled", "false")
+      .create();
+}
+
+std::shared_ptr<apache::geode::client::Pool> createPool(
+    Cluster& cluster, apache::geode::client::Cache& cache) {
+  auto poolFactory = cache.getPoolManager().createFactory();
+  cluster.applyLocators(poolFactory);
+  poolFactory.setSubscriptionEnabled(true);  // Per the customer.
+  return poolFactory.create("default");
+}
+
+std::shared_ptr<apache::geode::client::Region> setupRegion(
+    apache::geode::client::Cache& cache,
+    const std::shared_ptr<apache::geode::client::Pool>& pool) {
+  auto region =
+      cache
+          .createRegionFactory(apache::geode::client::RegionShortcut::
+                                   CACHING_PROXY)  // Per the customer.
+          .setPoolName(pool->getName())
+          .create("region");
+
+  return region;
+}
+
+TEST(RegisterKeysTest, DontReceiveValues) {
+  Cluster cluster{LocatorCount{1}, ServerCount{1}};
+
+  cluster.start();
+
+  cluster.getGfsh()
+      .create()
+      .region()
+      .withName("region")
+      .withType("PARTITION")
+      .execute();
+
+  auto cache1 = createCache();
+  auto pool1 = createPool(cluster, cache1);
+  auto region1 = setupRegion(cache1, pool1);
+  auto attrMutator = region1->getAttributesMutator();
+
+  auto listener = std::make_shared<CountdownCacheListener>(kNumKeys);
+
+  attrMutator->setCacheListener(listener);
+
+  auto cache2 = createCache();
+  auto pool2 = createPool(cluster, cache2);
+  auto region2 = setupRegion(cache2, pool2);
+
+  for (auto i = 0U; i < kNumKeys; i++) {
+    region2->put(CacheableInt32::create(i), CacheableInt32::create(i));
+  }
+
+  region1->registerAllKeys(false, false, false);
+
+  for (auto i = 0U; i < kNumKeys; i++) {
+    auto hasKey = region1->containsKey(CacheableInt32::create(i));
+    EXPECT_FALSE(hasKey);
+  }
+
+  for (auto i = 0U; i < kNumKeys; i++) {
+    auto value = region1->get(CacheableInt32::create(i));
+  }
+
+  listener->reset();
+
+  for (auto i = 0U; i < kNumKeys; i++) {
+    region2->put(CacheableInt32::create(i), CacheableInt32::create(i + 1000));
+  }
+
+  EXPECT_EQ(boost::cv_status::no_timeout,
+            listener->waitForInvalidates(boost::chrono::seconds(60)));
+
+  for (auto i = 0U; i < kNumKeys; i++) {
+    auto hasKey = region1->containsKey(CacheableInt32::create(i));
+    EXPECT_TRUE(hasKey);
+
+    auto hasValue = region1->containsValueForKey(CacheableInt32::create(i));
+    EXPECT_FALSE(hasValue);
+  }
+}
+
+TEST(RegisterKeysTest, ReceiveValuesLocalInvalidate) {
+  Cluster cluster{LocatorCount{1}, ServerCount{1}};
+
+  cluster.start();
+
+  cluster.getGfsh()
+      .create()
+      .region()
+      .withName("region")
+      .withType("PARTITION")
+      .execute();
+
+  auto cache1 = createCache();
+  auto pool1 = createPool(cluster, cache1);
+  auto region1 = setupRegion(cache1, pool1);
+  auto attrMutator = region1->getAttributesMutator();
+
+  auto listener = std::make_shared<CountdownCacheListener>(kNumKeys);
+  attrMutator->setCacheListener(listener);
+
+  auto cache2 = createCache();
+  auto pool2 = createPool(cluster, cache2);
+  auto region2 = setupRegion(cache2, pool2);
+
+  for (auto i = 0U; i < kNumKeys; i++) {
+    region2->put(CacheableInt32::create(i), CacheableInt32::create(i));
+  }
+
+  region1->registerAllKeys(false, true, true);
+
+  for (auto i = 0U; i < kNumKeys; i++) {
+    auto hasKey = region1->containsKey(CacheableInt32::create(i));
+    EXPECT_TRUE(hasKey);
+
+    auto hasValue = region1->containsValueForKey(CacheableInt32::create(i));
+    EXPECT_TRUE(hasValue);
+  }
+
+  for (auto i = 0U; i < kNumKeys; i++) {
+    region1->localInvalidate(CacheableInt32::create(i));
+  }
+
+  for (auto i = 0U; i < kNumKeys; i++) {
+    auto hasKey = region1->containsKey(CacheableInt32::create(i));
+    EXPECT_TRUE(hasKey);
+
+    auto hasValue = region1->containsValueForKey(CacheableInt32::create(i));
+    EXPECT_FALSE(hasValue);
+  }
+
+  listener->reset();
+
+  for (auto i = 0U; i < kNumKeys; i++) {
+    region2->put(CacheableInt32::create(i), CacheableInt32::create(i + 2000));
+  }
+
+  EXPECT_EQ(boost::cv_status::no_timeout,
+            listener->waitForUpdates(boost::chrono::minutes(1)));
+
+  for (auto i = 0U; i < kNumKeys; i++) {
+    auto hasKey = region1->containsKey(CacheableInt32::create(i));
+    EXPECT_TRUE(hasKey);
+
+    auto hasValue = region1->containsValueForKey(CacheableInt32::create(i));
+    EXPECT_TRUE(hasValue);
+  }
+}
+
+TEST(RegisterKeysTest, ReceiveValues) {
+  Cluster cluster{LocatorCount{1}, ServerCount{1}};
+
+  cluster.start();
+
+  cluster.getGfsh()
+      .create()
+      .region()
+      .withName("region")
+      .withType("PARTITION")
+      .execute();
+
+  auto cache1 = createCache();
+  auto pool1 = createPool(cluster, cache1);
+  auto region1 = setupRegion(cache1, pool1);
+  auto attrMutator = region1->getAttributesMutator();
+
+  auto listener = std::make_shared<CountdownCacheListener>(kNumKeys);
+  attrMutator->setCacheListener(listener);
+
+  auto cache2 = createCache();
+  auto pool2 = createPool(cluster, cache2);
+  auto region2 = setupRegion(cache2, pool2);
+
+  for (auto i = 0U; i < kNumKeys; i++) {
+    region2->put(CacheableInt32::create(i), CacheableInt32::create(i));
+  }
+
+  region1->registerAllKeys(false, false, true);
+
+  for (auto i = 0U; i < kNumKeys; i++) {
+    auto hasKey = region1->containsKey(CacheableInt32::create(i));
+    EXPECT_FALSE(hasKey);
+
+    auto hasValue = region1->containsValueForKey(CacheableInt32::create(i));
+    EXPECT_FALSE(hasValue);
+  }
+
+  listener->reset();
+
+  for (auto i = 0U; i < kNumKeys; i++) {
+    region2->put(CacheableInt32::create(i), CacheableInt32::create(i + 2000));
+  }
+
+  EXPECT_EQ(boost::cv_status::no_timeout,
+            listener->waitForUpdates(boost::chrono::seconds(60)));
+
+  for (auto i = 0U; i < kNumKeys; i++) {
+    auto hasKey = region1->containsKey(CacheableInt32::create(i));
+    EXPECT_TRUE(hasKey);
+
+    auto hasValue = region1->containsValueForKey(CacheableInt32::create(i));
+    EXPECT_TRUE(hasValue);
+  }
+}
+
 }  // namespace
diff --git a/cppcache/integration/test/ServerDisconnectWithListener.cpp b/cppcache/integration/test/ServerDisconnectWithListener.cpp
index d54e85e..7b05452 100644
--- a/cppcache/integration/test/ServerDisconnectWithListener.cpp
+++ b/cppcache/integration/test/ServerDisconnectWithListener.cpp
@@ -14,34 +14,36 @@
  * limitations under the License.
  */
 
-#include <gtest/gtest.h>
+#include <util/concurrent/binary_semaphore.hpp>
 
 #include <geode/Cache.hpp>
 #include <geode/CacheFactory.hpp>
 #include <geode/CacheListener.hpp>
+#include <geode/EntryEvent.hpp>
 #include <geode/PoolManager.hpp>
+#include <geode/RegionEvent.hpp>
 #include <geode/RegionFactory.hpp>
 #include <geode/RegionShortcut.hpp>
 
 #include "framework/Cluster.h"
-#include "framework/Framework.h"
 #include "framework/Gfsh.h"
+#include "gmock_actions.hpp"
+#include "mock/CacheListenerMock.hpp"
 
 namespace {
 
+using apache::geode::client::binary_semaphore;
 using apache::geode::client::Cache;
 using apache::geode::client::CacheableInt16;
 using apache::geode::client::CacheFactory;
 using apache::geode::client::CacheListener;
+using apache::geode::client::CacheListenerMock;
 using apache::geode::client::NotConnectedException;
 using apache::geode::client::Region;
 using apache::geode::client::RegionShortcut;
 
-static bool isDisconnected = false;
-
-class RegionDisconnectedListener : public CacheListener {
-  void afterRegionDisconnected(Region&) override { isDisconnected = true; }
-};
+using ::testing::_;
+using ::testing::NiceMock;
 
 Cache createTestCache() {
   CacheFactory cacheFactory;
@@ -72,22 +74,25 @@
   auto pool = poolFactory.create("pool");
   auto regionFactory = cache.createRegionFactory(RegionShortcut::CACHING_PROXY);
 
-  auto regionDisconnectedListener =
-      std::make_shared<RegionDisconnectedListener>();
-  auto region = regionFactory.setPoolName("pool")
-                    .setCacheListener(regionDisconnectedListener)
-                    .create("region");
+  binary_semaphore live_sem{0};
+  binary_semaphore shut_sem{1};
+  auto listener = std::make_shared<NiceMock<CacheListenerMock>>();
+  EXPECT_CALL(*listener, afterRegionLive(_))
+      .WillRepeatedly(AcquireSem(&shut_sem));
+  EXPECT_CALL(*listener, afterRegionDisconnected(_))
+      .WillRepeatedly(ReleaseSem(&shut_sem));
+  auto region =
+      regionFactory.setPoolName("pool").setCacheListener(listener).create(
+          "region");
 
   region->put("one", std::make_shared<CacheableInt16>(1));
 
   auto& servers = cluster.getServers();
   servers[0].stop();
+  shut_sem.acquire();
+  shut_sem.release();
 
-  try {
-    region->put("two", std::make_shared<CacheableInt16>(2));
-  } catch (const NotConnectedException&) {
-  }
-
-  ASSERT_EQ(isDisconnected, true);
+  EXPECT_THROW(region->put("two", std::make_shared<CacheableInt16>(2)),
+               NotConnectedException);
 }
 }  // namespace
diff --git a/cppcache/integration/test/SslOneWayTest.cpp b/cppcache/integration/test/SslOneWayTest.cpp
index d7c10f1..97fc923 100644
--- a/cppcache/integration/test/SslOneWayTest.cpp
+++ b/cppcache/integration/test/SslOneWayTest.cpp
@@ -80,7 +80,7 @@
       (clientSslKeysDir /
        boost::filesystem::path("client_truststore_chained_root.pem"));
   auto cache = CacheFactory()
-                   .set("log-level", "DEBUG")
+                   .set("log-level", "none")
                    .set("ssl-enabled", "true")
                    .set("ssl-truststore", clientTruststore.string())
                    .create();
diff --git a/cppcache/integration/test/SslTwoWayTest.cpp b/cppcache/integration/test/SslTwoWayTest.cpp
index 4cb1b41..eec0122 100644
--- a/cppcache/integration/test/SslTwoWayTest.cpp
+++ b/cppcache/integration/test/SslTwoWayTest.cpp
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 
+#include <iostream>
 #include <thread>
 
 #include <gtest/gtest.h>
@@ -83,7 +84,7 @@
       (clientSslKeysDir /
        boost::filesystem::path("client_truststore_chained_root.pem"));
   auto cache = CacheFactory()
-                   .set("log-level", "DEBUG")
+                   .set("log-level", "none")
                    .set("ssl-enabled", "true")
                    .set("ssl-keystore", clientKeystore.string())
                    .set("ssl-keystore-password", certificatePassword)
@@ -99,8 +100,29 @@
                     .setPoolName("pool")
                     .create("region");
 
-  region->put("1", "one");
+  try {
+    region->put("1", "one");
+  } catch (Exception& ex) {
+    std::cout << ex.getStackTrace();
+  }
+  std::shared_ptr<apache::geode::client::Cacheable> value;
 
+  try {
+    value = region->get("1");
+  } catch (Exception& ex) {
+    std::cout << ex.getStackTrace();
+  }
+
+  EXPECT_TRUE(value);
+
+  auto string_value =
+      std::dynamic_pointer_cast<apache::geode::client::CacheableString>(value);
+
+  EXPECT_TRUE(string_value);
+
+  EXPECT_EQ(string_value->value(), "one");
+
+  std::cout << "Read " << string_value->value() << " from the server.";
   cache.close();
 }
 
@@ -185,7 +207,7 @@
        boost::filesystem::path("client_truststore_chained_root.pem"));
 
   auto cache = CacheFactory()
-                   .set("log-level", "DEBUG")
+                   .set("log-level", "none")
                    .set("ssl-enabled", "true")
                    .set("ssl-keystore", clientCorruptKeystore.string())
                    .set("ssl-keystore-password", certificatePassword)
diff --git a/cppcache/integration/test/TransactionCleaningTest.cpp b/cppcache/integration/test/TransactionCleaningTest.cpp
index 8630d34..0f078e5 100644
--- a/cppcache/integration/test/TransactionCleaningTest.cpp
+++ b/cppcache/integration/test/TransactionCleaningTest.cpp
@@ -17,25 +17,56 @@
 
 #include <gmock/gmock.h>
 
-#include <future>
-#include <thread>
-
 #include <gtest/gtest.h>
 
 #include <geode/CacheTransactionManager.hpp>
+#include <geode/EntryEvent.hpp>
+#include <geode/RegionEvent.hpp>
 #include <geode/RegionFactory.hpp>
 #include <geode/RegionShortcut.hpp>
 
 #include "framework/Cluster.h"
+#include "gmock_actions.hpp"
+#include "mock/CacheListenerMock.hpp"
+#include "util/concurrent/binary_semaphore.hpp"
 
 namespace {
 
+using apache::geode::client::binary_semaphore;
+
+using apache::geode::client::Cache;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::CacheListener;
+using apache::geode::client::CacheListenerMock;
+using apache::geode::client::Exception;
+
+using ::testing::_;
+using ::testing::DoAll;
+using ::testing::NiceMock;
+
+Cache createTestCache() {
+  CacheFactory cacheFactory;
+  return cacheFactory.set("log-level", "none")
+      .set("statistic-sampling-enabled", "false")
+      .create();
+}
+
+void createTestPool(Cache& cache, Cluster& cluster) {
+  auto poolFactory =
+      cache.getPoolManager().createFactory().setSubscriptionEnabled(true);
+  cluster.applyLocators(poolFactory);
+  poolFactory.create("default");
+}
+
 std::shared_ptr<apache::geode::client::Region> setupRegion(
-    apache::geode::client::Cache &cache) {
-  auto region =
-      cache.createRegionFactory(apache::geode::client::RegionShortcut::PROXY)
-          .setPoolName("default")
-          .create("region");
+    Cache& cache, const std::shared_ptr<CacheListener>& listener) {
+  auto region = cache
+                    .createRegionFactory(
+                        apache::geode::client::RegionShortcut::CACHING_PROXY)
+                    .setPoolName("default")
+                    .setCacheListener(listener)
+                    .setConcurrencyChecksEnabled(false)
+                    .create("region");
   return region;
 }
 
@@ -51,27 +82,34 @@
       .withType("PARTITION")
       .execute();
 
-  auto cache = cluster.createCache();
-  auto region = setupRegion(cache);
+  auto cache = createTestCache();
+  createTestPool(cache, cluster);
+
+  binary_semaphore live_sem{0};
+  binary_semaphore shut_sem{1};
+  auto listener = std::make_shared<NiceMock<CacheListenerMock>>();
+  EXPECT_CALL(*listener, afterRegionLive(_))
+      .WillRepeatedly(DoAll(ReleaseSem(&live_sem), AcquireSem(&shut_sem)));
+  EXPECT_CALL(*listener, afterRegionDisconnected(_))
+      .WillRepeatedly(DoAll(ReleaseSem(&shut_sem), AcquireSem(&live_sem)));
+  auto region = setupRegion(cache, listener);
 
   cache.getCacheTransactionManager()->begin();
   region->put("one", "one");
   cache.getCacheTransactionManager()->commit();
 
   cluster.getServers()[0].stop();
+  shut_sem.acquire();
+  shut_sem.release();
 
-  try {
-    cache.getCacheTransactionManager()->begin();
-    region->put("one", "two");
-  } catch (apache::geode::client::Exception &) {
-  }
+  cache.getCacheTransactionManager()->begin();
+  EXPECT_THROW(region->put("one", "two"), Exception);
 
-  try {
-    cache.getCacheTransactionManager()->rollback();
-  } catch (apache::geode::client::Exception &) {
-  }
+  cache.getCacheTransactionManager()->rollback();
 
   cluster.getServers()[0].start();
+  live_sem.acquire();
+  live_sem.release();
 
   cache.getCacheTransactionManager()->begin();
   region->put("one", "three");
diff --git a/cppcache/integration/test/TransactionsTest.cpp b/cppcache/integration/test/TransactionsTest.cpp
index f0f5b64..7fbafc4 100644
--- a/cppcache/integration/test/TransactionsTest.cpp
+++ b/cppcache/integration/test/TransactionsTest.cpp
@@ -18,6 +18,7 @@
 #include <framework/Cluster.h>
 #include <framework/Gfsh.h>
 
+#include <random>
 #include <thread>
 
 #include <geode/Cache.hpp>
@@ -32,30 +33,46 @@
 using apache::geode::client::CacheableString;
 using apache::geode::client::CacheFactory;
 using apache::geode::client::CacheTransactionManager;
+using apache::geode::client::CommitConflictException;
+using apache::geode::client::Exception;
+using apache::geode::client::IllegalStateException;
 using apache::geode::client::Pool;
 using apache::geode::client::Region;
 using apache::geode::client::RegionShortcut;
 
-std::shared_ptr<Cache> createCache() {
-  auto cache = CacheFactory().set("log-level", "debug").create();
-  return std::make_shared<Cache>(std::move(cache));
+const std::string regionName = "region";
+
+Cache createCache() {
+  return CacheFactory()
+      .set("statistic-sampling-enabled", "false")
+      .set("log-level", "none")
+      .create();
 }
 
-std::shared_ptr<Pool> createPool(Cluster& cluster,
-                                 std::shared_ptr<Cache> cache) {
-  auto poolFactory = cache->getPoolManager().createFactory();
+std::shared_ptr<Pool> createPool(Cluster& cluster, Cache& cache) {
+  auto poolFactory = cache.getPoolManager().createFactory();
   cluster.applyLocators(poolFactory);
   poolFactory.setPRSingleHopEnabled(true);
   return poolFactory.create("default");
 }
 
-void runClientOperations(std::shared_ptr<Cache> cache,
-                         std::shared_ptr<Region> region, int minEntryKey,
-                         int maxEntryKey, int numTx) {
-  auto transactionManager = cache->getCacheTransactionManager();
+std::shared_ptr<Region> setupRegion(Cache& cache) {
+  return cache.createRegionFactory(RegionShortcut::PROXY)
+      .setPoolName("default")
+      .create(regionName);
+}
+
+void runClientOperations(Cache& cache, std::shared_ptr<Region> region,
+                         int minEntryKey, int maxEntryKey, int numTx) {
+  std::random_device randomDevice;
+  std::default_random_engine randomEngine(randomDevice());
+  std::uniform_int_distribution<decltype(maxEntryKey)> distribution(
+      minEntryKey, maxEntryKey);
+
+  auto transactionManager = cache.getCacheTransactionManager();
 
   for (int i = 0; i < numTx; i++) {
-    auto theKey = (rand() % (maxEntryKey - minEntryKey)) + minEntryKey;
+    auto theKey = distribution(randomEngine);
     std::string theValue = "theValue";
     try {
       transactionManager->begin();
@@ -86,15 +103,13 @@
 
   auto cache = createCache();
   auto pool = createPool(cluster, cache);
-  auto region = cache->createRegionFactory(RegionShortcut::PROXY)
-                    .setPoolName("default")
-                    .create("region");
+  auto region = setupRegion(cache);
 
   std::vector<std::thread> clientThreads;
   for (int i = 0; i < NUM_THREADS; i++) {
     auto minKey = (i * keyRangeSize);
     auto maxKey = minKey + keyRangeSize - 1;
-    std::thread th(runClientOperations, cache, region, minKey, maxKey,
+    std::thread th(runClientOperations, std::ref(cache), region, minKey, maxKey,
                    TX_PER_CLIENT);
     clientThreads.push_back(std::move(th));
   }
@@ -109,4 +124,86 @@
 
 }  // TEST
 
+TEST(TransactionsTest, IlegalStateExceptionNoTx) {
+  Cluster cluster{LocatorCount{1}, ServerCount{1}};
+  cluster.start();
+
+  // Create regions
+  cluster.getGfsh()
+      .create()
+      .region()
+      .withName(regionName)
+      .withType("PARTITION")
+      .execute();
+
+  auto cache = createCache();
+  auto txm = cache.getCacheTransactionManager();
+  auto pool = createPool(cluster, cache);
+  auto region = setupRegion(cache);
+
+  EXPECT_THROW(txm->prepare(), IllegalStateException);
+  EXPECT_THROW(txm->commit(), IllegalStateException);
+  EXPECT_THROW(txm->rollback(), IllegalStateException);
+}  // TEST
+
+TEST(TransactionsTest, ExceptionConflictOnPrepare) {
+  Cluster cluster{LocatorCount{1}, ServerCount{1}};
+  cluster.start();
+
+  // Create regions
+  cluster.getGfsh()
+      .create()
+      .region()
+      .withName(regionName)
+      .withType("PARTITION")
+      .execute();
+
+  auto cache = createCache();
+  auto txm = cache.getCacheTransactionManager();
+  auto pool = createPool(cluster, cache);
+  auto region = setupRegion(cache);
+
+  txm->begin();
+  region->put("key", "A");
+  auto& tx_first_id = txm->suspend();
+  txm->begin();
+  region->put("key", "B");
+  txm->prepare();
+  auto& tx_second_id = txm->suspend();
+  txm->resume(tx_first_id);
+
+  EXPECT_THROW(txm->prepare(), CommitConflictException);
+  txm->resume(tx_second_id);
+  txm->rollback();
+
+}  // TEST
+
+TEST(TransactionsTest, ExceptionConflictOnCommit) {
+  Cluster cluster{LocatorCount{1}, ServerCount{1}};
+  cluster.start();
+
+  // Create regions
+  cluster.getGfsh()
+      .create()
+      .region()
+      .withName(regionName)
+      .withType("PARTITION")
+      .execute();
+
+  auto cache = createCache();
+  auto txm = cache.getCacheTransactionManager();
+  auto pool = createPool(cluster, cache);
+  auto region = setupRegion(cache);
+
+  txm->begin();
+  region->put("key", "A");
+  auto& tx_id = txm->suspend();
+  txm->begin();
+  region->put("key", "B");
+  txm->commit();
+  txm->resume(tx_id);
+
+  EXPECT_THROW(txm->commit(), CommitConflictException);
+}  // TEST
+
 }  // namespace
diff --git a/cppcache/integration/test/WanDeserializationTest.cpp b/cppcache/integration/test/WanDeserializationTest.cpp
index c34e3ca..13825f0 100644
--- a/cppcache/integration/test/WanDeserializationTest.cpp
+++ b/cppcache/integration/test/WanDeserializationTest.cpp
@@ -20,7 +20,7 @@
 #include <framework/Gfsh.h>
 
 #include <chrono>
-#include <thread>
+#include <future>
 
 #include <geode/Cache.hpp>
 #include <geode/EntryEvent.hpp>
@@ -42,34 +42,33 @@
 using apache::geode::client::Pool;
 using apache::geode::client::Region;
 using apache::geode::client::RegionShortcut;
+using apache::geode::client::Serializable;
 using std::chrono::minutes;
+using std::chrono::seconds;
 using WanDeserialization::Order;
 
 class GeodeCacheListener : public CacheListener {
+ private:
+  std::promise<
+      std::pair<std::shared_ptr<CacheableKey>, std::shared_ptr<Serializable>>>
+      promise_;
+
  public:
   void afterCreate(const EntryEvent& event) override {
-    numEvents++;
-    auto region = event.getRegion();
-    std::cout << "GeodeCacheListener::afterCreate  " << region->getName()
-              << std::endl;
+    promise_.set_value({event.getKey(), event.getNewValue()});
   }
 
-  int getNumEvents() { return numEvents; }
-
- private:
-  int numEvents = 0;
-};  // class GeodeCacheListener
+  decltype(promise_)& getPromise() { return promise_; }
+};
 
 const std::string regionName = "region";
-const std::chrono::seconds fiveSeconds(5);
 
 Cache createCache(std::string durableClientId) {
   using apache::geode::client::CacheFactory;
 
   auto cache = CacheFactory()
-                   .set("log-level", "debug")
+                   .set("log-level", "none")
                    .set("statistic-sampling-enabled", "false")
-                   .setPdxReadSerialized(true)
                    .set("durable-client-id", durableClientId)
                    .set("durable-timeout", "300s")
                    .create();
@@ -98,21 +97,20 @@
 }
 
 TEST(WanDeserializationTest, testEventsAreDeserializedCorrectly) {
-  uint16_t portSiteA = Framework::getAvailablePort();
-  uint16_t portSiteB = Framework::getAvailablePort();
+  const auto& hostname = Framework::getHostname();
+  const auto locatorAddressA =
+      LocatorAddress{hostname, Framework::getAvailablePort()};
+  const auto locatorAddressB =
+      LocatorAddress{hostname, Framework::getAvailablePort()};
 
-  std::vector<uint16_t> locatorPortsSiteA = {portSiteA};
-  std::vector<uint16_t> locatorPortsSiteB = {portSiteB};
-
-  std::vector<uint16_t> remoteLocatorPortsA = {portSiteB};
-  std::vector<uint16_t> remoteLocatorPortsB = {portSiteA};
-
-  Cluster clusterA{LocatorCount{1}, ServerCount{1}, locatorPortsSiteA,
-                   remoteLocatorPortsA, 1};
+  Cluster clusterA{InitialLocators{{locatorAddressA}},
+                   InitialServers{{{hostname, 0}}},
+                   RemoteLocators{{locatorAddressB}}, DistributedSystemId(1)};
   clusterA.start();
 
-  Cluster clusterB{LocatorCount{1}, ServerCount{1}, locatorPortsSiteB,
-                   remoteLocatorPortsB, 2};
+  Cluster clusterB{InitialLocators{{locatorAddressB}},
+                   InitialServers{{{hostname, 0}}},
+                   RemoteLocators{{locatorAddressB}}, DistributedSystemId(2)};
   clusterB.start();
 
   // Create gw receivers
@@ -167,13 +165,47 @@
   cacheB.getTypeRegistry().registerPdxType(Order::createDeserializable);
   cacheB.readyForEvents();
 
+  auto key = std::make_shared<CacheableString>("order");
   auto order = std::make_shared<Order>(2, "product y", 37);
-  regionA->put("order", order);
+  regionA->put(key, order);
 
-  std::this_thread::sleep_for(fiveSeconds);  // wait for the event to be sent
-  ASSERT_EQ(cacheListenerA->getNumEvents(), 1);
-  ASSERT_EQ(cacheListenerB->getNumEvents(), 1);
+  {
+    auto future = cacheListenerA->getPromise().get_future();
+    ASSERT_EQ(std::future_status::ready, future.wait_for(seconds(10)));
 
-}  // TEST
+    auto kv = future.get();
+    auto eventKey = kv.first;
+    auto eventValue = kv.second;
+    auto eventOrder = std::dynamic_pointer_cast<Order>(eventValue);
+
+    ASSERT_NE(eventKey, nullptr);
+    EXPECT_EQ(*eventKey, *key);
+    ASSERT_NE(eventValue, nullptr);
+    ASSERT_NE(eventOrder, nullptr);
+    EXPECT_EQ(*eventOrder, *order);
+  }
+
+  {
+    auto future = cacheListenerB->getPromise().get_future();
+    ASSERT_EQ(std::future_status::ready, future.wait_for(seconds(10)));
+
+    auto kv = future.get();
+    auto eventKey = kv.first;
+    auto eventValue = kv.second;
+    auto eventOrder = std::dynamic_pointer_cast<Order>(eventValue);
+
+    ASSERT_NE(eventKey, nullptr);
+    EXPECT_EQ(*eventKey, *key);
+    ASSERT_NE(eventValue, nullptr);
+    ASSERT_NE(eventOrder, nullptr);
+    EXPECT_EQ(*eventOrder, *order);
+  }
+
+  auto valueB = regionB->get(key);
+  ASSERT_NE(valueB, nullptr);
+  auto orderB = std::dynamic_pointer_cast<Order>(valueB);
+  ASSERT_NE(valueB, nullptr);
+  EXPECT_EQ(*order, *orderB);
+}
 
 }  // namespace
diff --git a/dependencies/ACE/config.h.in b/cppcache/integration/test/gmock_actions.hpp
old mode 100755
new mode 100644
similarity index 70%
copy from dependencies/ACE/config.h.in
copy to cppcache/integration/test/gmock_actions.hpp
index b6ee2e8..5d7f454
--- a/dependencies/ACE/config.h.in
+++ b/cppcache/integration/test/gmock_actions.hpp
@@ -14,23 +14,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
-#define ACE_LACKS_IOSTREAM_TOTALLY 1
-#define ACE_HAS_VERSIONED_NAMESPACE 1
 
-#if __cplusplus >= 201103L
+#pragma once
 
-#if defined(__SUNPRO_CC)
-#define ACE_HAS_CPP11 1
-#define _RWSTD_ALLOCATOR 1
-#endif
+#ifndef GMOCK_ACTIONS_H_
+#define GMOCK_ACTIONS_H_
 
-#endif // __cplusplus >= 201103L
+#include <gmock/gmock.h>
 
-#cmakedefine WITH_IPV6
-#ifdef WITH_IPV6
-#define ACE_HAS_IPV6 1
-#endif
+ACTION_P(ReleaseSem, sem) { sem->release(); }
+ACTION_P(AcquireSem, sem) { sem->acquire(); }
+ACTION_P(CountDownLatch, latch) { latch->count_down(); }
 
-#include "ace/config-@ACE_CONFIG@.h"
-
+#endif  // GMOCK_ACTIONS_H_
diff --git a/cppcache/integration/test/mock/CacheListenerMock.hpp b/cppcache/integration/test/mock/CacheListenerMock.hpp
new file mode 100644
index 0000000..9ed046e
--- /dev/null
+++ b/cppcache/integration/test/mock/CacheListenerMock.hpp
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+
+#ifndef GEODE_CACHELISTENERMOCK_HPP_
+#define GEODE_CACHELISTENERMOCK_HPP_
+
+#include <gmock/gmock.h>
+
+#include <geode/CacheListener.hpp>
+
+namespace apache {
+namespace geode {
+namespace client {
+/* The mock itself creates a circular reference, because the mock retains the
+   method parameters for verification. Events contain shared pointers to the
+   Region, and the Region contains a shared pointer to the mock.
+   
+   If you don't break the cycle, then none of the mock, the region, or the
+   events see destruction; you get the test framework reporting a memory leak,
+   the method calls aren't verified, and your test will pass with a false
+   positive.
+   
+   The best way to resolve the issue is to explicitly call
+   ::testing::Mock::VerifyAndClearExpectations on this mock before your intended
+   point of destruction - typically it'll be one of the last lines of your test.
+   The only other way is to use an AttributeModifier on the region to remove the
+   CacheListener, this mock.
+
+   This problem can be permenently fixed if we change the shared_pointer<Region>
+   within the event objects to a weak_pointer<Region>, but that necessitates an
+   ABI change and a point minor release.
+*/
+class CacheListenerMock : public CacheListener {
+ public:
+  MOCK_METHOD1(afterCreate, void(const EntryEvent&));
+  MOCK_METHOD1(afterUpdate, void(const EntryEvent&));
+  MOCK_METHOD1(afterInvalidate, void(const EntryEvent&));
+  MOCK_METHOD1(afterDestroy, void(const EntryEvent&));
+  MOCK_METHOD1(afterRegionInvalidate, void(const RegionEvent&));
+  MOCK_METHOD1(afterRegionDestroy, void(const RegionEvent&));
+  MOCK_METHOD1(afterRegionClear, void(const RegionEvent&));
+  MOCK_METHOD1(afterRegionLive, void(const RegionEvent&));
+  MOCK_METHOD1(close, void(Region&));
+  MOCK_METHOD1(afterRegionDisconnected, void(Region&));
+};
+
+using Nice_MockListener =
+    ::testing::NiceMock<CacheListenerMock>;  // Ignores uninteresting calls
+using Naggy_MockListener =
+    ::testing::NaggyMock<CacheListenerMock>;  // Warns on all uninteresting calls
+using Strict_MockListener =
+    ::testing::StrictMock<CacheListenerMock>;  // Uninteresting calls are test failures
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+#endif  // GEODE_CACHELISTENERMOCK_HPP_
diff --git a/cppcache/integration/test/resources/pr_app_client_cache.xml b/cppcache/integration/test/resources/pr_app_client_cache.xml
new file mode 100644
index 0000000..518d61e
--- /dev/null
+++ b/cppcache/integration/test/resources/pr_app_client_cache.xml
@@ -0,0 +1,29 @@
+<?xml version="1.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.
+-->
+<client-cache xmlns="http://geode.apache.org/schema/cpp-cache"
+			  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+			  xsi:schemaLocation="http://geode.apache.org/schema/cpp-cache http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
+			  version="1.0"
+			  copy-on-read="true">
+	<region name="region">
+		<region-attributes refid="LOCAL">
+			<partition-resolver library-function-name="CacheXmlTest_createAppPartitionResolver"/>
+		</region-attributes>
+	</region>
+</client-cache>
\ No newline at end of file
diff --git a/cppcache/integration/test/resources/pr_lib_client_cache.xml b/cppcache/integration/test/resources/pr_lib_client_cache.xml
new file mode 100644
index 0000000..0e18540
--- /dev/null
+++ b/cppcache/integration/test/resources/pr_lib_client_cache.xml
@@ -0,0 +1,30 @@
+<?xml version="1.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.
+-->
+<client-cache xmlns="http://geode.apache.org/schema/cpp-cache"
+			  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+			  xsi:schemaLocation="http://geode.apache.org/schema/cpp-cache http://geode.apache.org/schema/cpp-cache/cpp-cache-1.0.xsd"
+			  version="1.0"
+			  copy-on-read="true">
+	<region name="region">
+		<region-attributes refid="LOCAL">
+			<partition-resolver library-name="testobject"
+								library-function-name="createTestLibPartitionResolver"/>
+		</region-attributes>
+	</region>
+</client-cache>
\ No newline at end of file
diff --git a/dependencies/ACE/config.h.in b/cppcache/integration/test/utility/make_unique.hpp
old mode 100755
new mode 100644
similarity index 70%
rename from dependencies/ACE/config.h.in
rename to cppcache/integration/test/utility/make_unique.hpp
index b6ee2e8..3ebcd19
--- a/dependencies/ACE/config.h.in
+++ b/cppcache/integration/test/utility/make_unique.hpp
@@ -14,23 +14,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
-#define ACE_LACKS_IOSTREAM_TOTALLY 1
-#define ACE_HAS_VERSIONED_NAMESPACE 1
 
-#if __cplusplus >= 201103L
+#ifndef INTEGRATION_TEST_UTILITY_MAKE_UNIQUE_H
+#define INTEGRATION_TEST_UTILITY_MAKE_UNIQUE_H
 
-#if defined(__SUNPRO_CC)
-#define ACE_HAS_CPP11 1
-#define _RWSTD_ALLOCATOR 1
+#include <memory>
+#include <utility>
+
+// Until we get C++14 support...
+template <typename T, typename... Args>
+::std::unique_ptr<T> make_unique(Args &&... args) {
+  return ::std::unique_ptr<T>(new T(::std::forward<Args>(args)...));
+}
+
 #endif
-
-#endif // __cplusplus >= 201103L
-
-#cmakedefine WITH_IPV6
-#ifdef WITH_IPV6
-#define ACE_HAS_IPV6 1
-#endif
-
-#include "ace/config-@ACE_CONFIG@.h"
-
diff --git a/cppcache/shared/CMakeLists.txt b/cppcache/shared/CMakeLists.txt
index adb3db5..9c5092b 100644
--- a/cppcache/shared/CMakeLists.txt
+++ b/cppcache/shared/CMakeLists.txt
@@ -29,6 +29,10 @@
   )
 endif()
 
+if (has_linker_exclude_libs)
+  target_link_options(apache-geode PRIVATE -Wl,--exclude-libs,ALL)
+endif()
+
 generate_export_file( "apache-geode" )
 
 set_source_files_properties(${CONFIGURE_OUT_FILES} PROPERTIES GENERATED TRUE)
diff --git a/cppcache/src/AdminRegion.cpp b/cppcache/src/AdminRegion.cpp
index 7c774f4..87b7963 100644
--- a/cppcache/src/AdminRegion.cpp
+++ b/cppcache/src/AdminRegion.cpp
@@ -17,13 +17,15 @@
 
 #include "AdminRegion.hpp"
 
+#include <boost/thread/lock_types.hpp>
+
 #include <geode/SystemProperties.hpp>
 
 #include "CacheImpl.hpp"
 #include "TcrConnectionManager.hpp"
+#include "ThinClientCacheDistributionManager.hpp"
 #include "ThinClientPoolDM.hpp"
 #include "ThinClientRegion.hpp"
-#include "statistics/StatisticsManager.hpp"
 #include "util/exception.hpp"
 
 namespace apache {
@@ -51,14 +53,8 @@
 }
 
 void AdminRegion::init() {
-  /*TryWriteGuard _guard(m_rwLock, m_destroyPending);
-  if (m_destroyPending) {
-    return;
-  }
-  */
   // Init distribution manager if it is not a pool
-  ThinClientPoolDM* pool = dynamic_cast<ThinClientPoolDM*>(m_distMngr);
-  if (pool == nullptr) {
+  if (m_distMngr && !dynamic_cast<ThinClientPoolDM*>(m_distMngr)) {
     m_distMngr->init();
   }
 }
@@ -120,15 +116,17 @@
 }
 
 void AdminRegion::close() {
-  TryWriteGuard _guard(m_rwLock, m_destroyPending);
+  boost::unique_lock<decltype(m_rwMutex)> guard{m_rwMutex};
+
   if (m_destroyPending) {
     return;
   }
+
   m_destroyPending = true;
 
   // Close distribution manager if it is not a pool
-  ThinClientPoolDM* pool = dynamic_cast<ThinClientPoolDM*>(m_distMngr);
-  if (pool == nullptr) {
+  if (m_distMngr != nullptr &&
+      dynamic_cast<ThinClientPoolDM*>(m_distMngr) == nullptr) {
     m_distMngr->destroy();
     _GEODE_SAFE_DELETE(m_distMngr);
   }
@@ -142,7 +140,8 @@
 }
 
 const bool& AdminRegion::isDestroyed() { return m_destroyPending; }
-ACE_RW_Thread_Mutex& AdminRegion::getRWLock() { return m_rwLock; }
+
+boost::shared_mutex& AdminRegion::getMutex() { return m_rwMutex; }
 
 }  // namespace client
 }  // namespace geode
diff --git a/cppcache/src/AdminRegion.hpp b/cppcache/src/AdminRegion.hpp
index 6aa8903..d5e68a9 100644
--- a/cppcache/src/AdminRegion.hpp
+++ b/cppcache/src/AdminRegion.hpp
@@ -23,11 +23,11 @@
 #include <memory>
 #include <string>
 
+#include <boost/thread/shared_mutex.hpp>
+
 #include <geode/Serializable.hpp>
 
 #include "ErrType.hpp"
-#include "ReadWriteLock.hpp"
-
 namespace apache {
 namespace geode {
 
@@ -48,7 +48,7 @@
   ThinClientBaseDM* m_distMngr;
   std::string m_fullPath;
   TcrConnectionManager* m_connectionMgr;
-  ACE_RW_Thread_Mutex m_rwLock;
+  boost::shared_mutex m_rwMutex;
   bool m_destroyPending;
 
   GfErrType putNoThrow(const std::shared_ptr<CacheableKey>& keyPtr,
@@ -67,7 +67,7 @@
 
   static std::shared_ptr<AdminRegion> create(
       CacheImpl* cache, ThinClientBaseDM* distMan = nullptr);
-  ACE_RW_Thread_Mutex& getRWLock();
+  boost::shared_mutex& getMutex();
   const bool& isDestroyed();
   void close();
   void init();
diff --git a/cppcache/src/AuthenticatedView.cpp b/cppcache/src/AuthenticatedView.cpp
index 35e6a55..6880a76 100644
--- a/cppcache/src/AuthenticatedView.cpp
+++ b/cppcache/src/AuthenticatedView.cpp
@@ -22,13 +22,11 @@
 #include <geode/Cache.hpp>
 #include <geode/FunctionService.hpp>
 #include <geode/PoolManager.hpp>
-#include <geode/internal/geode_globals.hpp>
 
 #include "CacheImpl.hpp"
 #include "CacheRegionHelper.hpp"
 #include "CacheXmlParser.hpp"
 #include "DistributedSystemImpl.hpp"
-#include "FunctionServiceImpl.hpp"
 #include "ProxyRegion.hpp"
 #include "ProxyRemoteQueryService.hpp"
 #include "ThinClientPoolDM.hpp"
@@ -163,7 +161,7 @@
       m_remoteQueryService(nullptr),
       m_cacheImpl(cacheImpl) {}
 
-AuthenticatedView::~AuthenticatedView() {}
+AuthenticatedView::~AuthenticatedView() = default;
 
 PdxInstanceFactory AuthenticatedView::createPdxInstanceFactory(
     const std::string& className, bool expectDomainClass) const {
diff --git a/cppcache/src/BucketServerLocation.hpp b/cppcache/src/BucketServerLocation.hpp
index fd4e92d..c5ca16e 100644
--- a/cppcache/src/BucketServerLocation.hpp
+++ b/cppcache/src/BucketServerLocation.hpp
@@ -151,7 +151,7 @@
 
   BucketServerLocation(
       const BucketServerLocation&
-          rhs)  //:ServerLocation(rhs.getServerName(),rhs.getPort())
+          rhs)  //: ServerLocation(rhs.getServerName(),rhs.getPort())
   {
     this->m_serverName = rhs.m_serverName;
     this->m_port = rhs.m_port;
diff --git a/cppcache/src/Cache.cpp b/cppcache/src/Cache.cpp
index 50552ac..6942ca9 100644
--- a/cppcache/src/Cache.cpp
+++ b/cppcache/src/Cache.cpp
@@ -21,11 +21,10 @@
 #include <geode/FunctionService.hpp>
 #include <geode/PoolManager.hpp>
 #include <geode/RegionFactory.hpp>
-#include <geode/internal/geode_globals.hpp>
+#include <geode/SystemProperties.hpp>
 
 #include "CacheImpl.hpp"
 #include "CacheRegionHelper.hpp"
-#include "DistributedSystemImpl.hpp"
 #include "ProxyRegion.hpp"
 #include "UserAttributes.hpp"
 
diff --git a/cppcache/src/CacheImpl.cpp b/cppcache/src/CacheImpl.cpp
index 1b5e6a2..3e8d354 100644
--- a/cppcache/src/CacheImpl.cpp
+++ b/cppcache/src/CacheImpl.cpp
@@ -27,15 +27,14 @@
 #include "AdminRegion.hpp"
 #include "AutoDelete.hpp"
 #include "CacheXmlParser.hpp"
-#include "ClientProxyMembershipID.hpp"
 #include "EvictionController.hpp"
 #include "ExpiryTaskManager.hpp"
 #include "InternalCacheTransactionManager2PCImpl.hpp"
 #include "LocalRegion.hpp"
 #include "PdxTypeRegistry.hpp"
-#include "RegionExpiryHandler.hpp"
 #include "SerializationRegistry.hpp"
 #include "TcrConnectionManager.hpp"
+#include "TcrEndpoint.hpp"
 #include "TcrMessage.hpp"
 #include "ThinClientHARegion.hpp"
 #include "ThinClientPoolDM.hpp"
@@ -44,7 +43,6 @@
 #include "ThinClientRegion.hpp"
 #include "ThreadPool.hpp"
 #include "Utils.hpp"
-#include "Version.hpp"
 
 #define DEFAULT_DS_NAME "default_GeodeDS"
 
@@ -75,7 +73,8 @@
       m_serializationRegistry(std::make_shared<SerializationRegistry>()),
       m_pdxTypeRegistry(nullptr),
       m_threadPool(m_distributedSystem.getSystemProperties().threadPoolSize()),
-      m_authInitialize(authInitialize) {
+      m_authInitialize(authInitialize),
+      m_keepAlive(false) {
   using apache::geode::statistics::StatisticsManager;
 
   m_cacheTXManager = std::shared_ptr<CacheTransactionManager>(
@@ -89,7 +88,7 @@
     LOGINFO("Heap LRU eviction controller thread started");
   }
 
-  m_expiryTaskManager->begin();
+  m_expiryTaskManager->start();
 
   m_initialized = true;
   m_pdxTypeRegistry = std::make_shared<PdxTypeRegistry>(this);
@@ -161,7 +160,9 @@
 }
 
 void CacheImpl::removeRegion(const std::string& name) {
+  LOGDEBUG("recursive lock: CacheImpl::removeRegion");
   std::lock_guard<decltype(m_destroyCacheMutex)> lock(m_destroyCacheMutex);
+  LOGDEBUG("locked: CacheImpl::removeRegion");
   if (!m_destroyPending) {
     m_regions.erase(name);
   }
@@ -233,15 +234,18 @@
   }
 }
 
-void CacheImpl::close(bool keepalive) {
+void CacheImpl::close(bool keepAlive) {
   this->throwIfClosed();
 
-  TcrMessage::setKeepAlive(keepalive);
-  // bug #247 fix for durable clients missing events when recycled
+  m_keepAlive = keepAlive;
+
+  // fix for durable clients missing events when recycled
   sendNotificationCloseMsgs();
 
   {
+    LOGDEBUG("recursive lock: CacheImpl::setKeepAlive");
     std::lock_guard<decltype(m_destroyCacheMutex)> lock(m_destroyCacheMutex);
+    LOGDEBUG("locked: CacheImpl::setKeepAlive");
     if (m_destroyPending) {
       return;
     }
@@ -296,10 +300,12 @@
     m_cacheStats->close();
   }
 
-  m_poolManager->close(keepalive);
+  m_poolManager->close(keepAlive);
+
+  m_poolManager.reset();
 
   LOGFINE("Closed pool manager with keepalive %s",
-          keepalive ? "true" : "false");
+          keepAlive ? "true" : "false");
 
   // Close CachePef Stats
   if (m_cacheStats) {
@@ -316,7 +322,9 @@
   _GEODE_SAFE_DELETE(m_tcrConnectionManager);
   m_cacheTXManager = nullptr;
 
-  m_expiryTaskManager->stopExpiryTaskManager();
+  m_expiryTaskManager->stop();
+
+  m_threadPool.shutDown();
 
   try {
     getDistributedSystem().disconnect();
@@ -331,7 +339,9 @@
 }
 
 bool CacheImpl::doIfDestroyNotPending(std::function<void()> f) {
+  LOGDEBUG("recursive lock: CacheImpl::doIfDestroyNotPending");
   std::lock_guard<decltype(m_destroyCacheMutex)> lock(m_destroyCacheMutex);
+  LOGDEBUG("locked: CacheImpl::doIfDestroyNotPending");
   if (!m_destroyPending) {
     f();
   }
@@ -413,7 +423,7 @@
     }
 
     regionPtr = rpImpl;
-    rpImpl->addDisMessToQueue();
+    rpImpl->addDisconnectedMessageToQueue();
     // Instantiate a PersistenceManager object if DiskPolicy is overflow
     if (regionAttributes.getDiskPolicy() == DiskPolicyType::OVERFLOWS) {
       auto pmPtr = regionAttributes.getPersistenceManager();
@@ -466,7 +476,9 @@
   LOGDEBUG("CacheImpl::getRegion " + path);
 
   this->throwIfClosed();
+  LOGDEBUG("recursive lock: CacheImpl::getRegion");
   std::lock_guard<decltype(m_destroyCacheMutex)> lock(m_destroyCacheMutex);
+  LOGDEBUG("locked: CacheImpl::getRegion");
 
   if (m_destroyPending) {
     return nullptr;
@@ -681,8 +693,10 @@
 }
 
 void CacheImpl::processMarker() {
+  LOGDEBUG("recursive lock: CacheImpl::processMarker");
   std::lock_guard<decltype(m_destroyCacheMutex)> destroy_lock(
       m_destroyCacheMutex);
+  LOGDEBUG("locked: CacheImpl::processMarker");
   if (m_destroyPending) {
     return;
   }
@@ -693,16 +707,14 @@
     if (!kv.second->isDestroyed()) {
       if (const auto tcrHARegion =
               std::dynamic_pointer_cast<ThinClientHARegion>(kv.second)) {
-        auto regionMsg = new TcrMessageClientMarker(
-            new DataOutput(createDataOutput()), true);
-        tcrHARegion->receiveNotification(regionMsg);
+        tcrHARegion->receiveNotification(
+            TcrMessageClientMarker(new DataOutput(createDataOutput()), true));
         for (const auto& iter : tcrHARegion->subregions(true)) {
           if (!iter->isDestroyed()) {
             if (const auto subregion =
                     std::dynamic_pointer_cast<ThinClientHARegion>(iter)) {
-              regionMsg = new TcrMessageClientMarker(
-                  new DataOutput(createDataOutput()), true);
-              subregion->receiveNotification(regionMsg);
+              subregion->receiveNotification(TcrMessageClientMarker(
+                  new DataOutput(createDataOutput()), true));
             }
           }
         }
@@ -859,6 +871,37 @@
   m_tcrConnectionManager->setClientCrashTEST();
 }
 
+int CacheImpl::getNumberOfTimeEndpointDisconnected(
+    const std::string& endpoint, const std::string& poolName) {
+  this->throwIfClosed();
+  const auto& pools = getPoolManager().getAll();
+
+  if (pools.empty()) {
+    return m_tcrConnectionManager->getNumberOfTimeEndpointDisconnected(
+        endpoint);
+  }
+
+  auto pool = std::static_pointer_cast<ThinClientPoolDM>(
+      getPoolManager().find(poolName));
+
+  if (pool == nullptr) {
+    throw IllegalStateException(
+        "Either pool not found or it has been destroyed");
+  }
+
+  auto& mutex = pool->m_endpointsLock;
+  std::lock_guard<decltype(mutex)> guard(mutex);
+  for (const auto& itr : pool->m_endpoints) {
+    auto ep = itr.second;
+    if (ep->name().find(endpoint) != std::string::npos) {
+      return ep->numberOfTimesFailed();
+    }
+  }
+  throw IllegalStateException("Endpoint not found");
+}
+
+bool CacheImpl::isKeepAlive() { return m_keepAlive; }
+
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/CacheImpl.hpp b/cppcache/src/CacheImpl.hpp
index 62ddecb..98ccd27 100644
--- a/cppcache/src/CacheImpl.hpp
+++ b/cppcache/src/CacheImpl.hpp
@@ -36,6 +36,7 @@
 #include "MemberListForVersionStamp.hpp"
 #include "PdxTypeRegistry.hpp"
 #include "RemoteQueryService.hpp"
+#include "TcrEndpoint.hpp"
 #include "ThreadPool.hpp"
 #include "util/synchronized_map.hpp"
 
@@ -96,6 +97,14 @@
 
   bool getAndResetNetworkHopFlag() { return m_networkhop.exchange(false); }
 
+  void setPrMetadataUpdatedFlag(bool isPrUpdated) {
+    m_pr_metadata_updated = isPrUpdated;
+  }
+
+  bool getAndResetPrMetadataUpdatedFlag() {
+    return m_pr_metadata_updated.exchange(false);
+  }
+
   int8_t getAndResetServerGroupFlag() { return m_serverGroupFlag.exchange(0); }
 
   void setServerGroupFlag(int8_t serverGroupFlag) {
@@ -180,20 +189,14 @@
    */
   std::vector<std::shared_ptr<Region>> rootRegions();
 
-  virtual RegionFactory createRegionFactory(RegionShortcut preDefinedRegion);
+  RegionFactory createRegionFactory(RegionShortcut preDefinedRegion);
 
   void initializeDeclarativeCache(const std::string& cacheXml);
 
   std::shared_ptr<CacheTransactionManager> getCacheTransactionManager();
 
-  /**
-   * @brief destructor
-   */
-  virtual ~CacheImpl();
+  ~CacheImpl();
 
-  /**
-   * @brief constructors
-   */
   CacheImpl(Cache* c, const std::shared_ptr<Properties>& dsProps,
             bool ignorePdxUnreadFields, bool readPdxSerialized,
             const std::shared_ptr<AuthInitialize>& authInitialize);
@@ -235,6 +238,10 @@
   //  TESTING: Durable clients. Not thread safe.
   bool getEndpointStatus(const std::string& endpoint);
 
+  // TESTING: Endpoint disconnections
+  int getNumberOfTimeEndpointDisconnected(const std::string& endpoint,
+                                          const std::string& poolName);
+
   void processMarker();
 
   // Pool helpers for unit tests
@@ -289,14 +296,14 @@
     return *(m_statisticsManager.get());
   }
 
-  virtual DataOutput createDataOutput() const;
+  DataOutput createDataOutput() const;
 
-  virtual DataOutput createDataOutput(Pool* pool) const;
+  DataOutput createDataOutput(Pool* pool) const;
 
-  virtual DataInput createDataInput(const uint8_t* buffer, size_t len) const;
+  DataInput createDataInput(const uint8_t* buffer, size_t len) const;
 
-  virtual DataInput createDataInput(const uint8_t* buffer, size_t len,
-                                    Pool* pool) const;
+  DataInput createDataInput(const uint8_t* buffer, size_t len,
+                            Pool* pool) const;
 
   PdxInstanceFactory createPdxInstanceFactory(const std::string& className,
                                               bool expectDomainClass) const;
@@ -307,8 +314,11 @@
 
   bool doIfDestroyNotPending(std::function<void()>);
 
+  bool isKeepAlive();
+
  private:
   std::atomic<bool> m_networkhop;
+  std::atomic<bool> m_pr_metadata_updated;
   std::atomic<int8_t> m_serverGroupFlag;
   bool m_ignorePdxUnreadFields;
   bool m_readPdxSerialized;
@@ -371,6 +381,7 @@
   ThreadPool m_threadPool;
   const std::shared_ptr<AuthInitialize> m_authInitialize;
   std::unique_ptr<TypeRegistry> m_typeRegistry;
+  bool m_keepAlive;
 
   inline void throwIfClosed() const {
     if (m_closed) {
diff --git a/cppcache/src/CachePerfStats.hpp b/cppcache/src/CachePerfStats.hpp
index 0096562..5352fb2 100644
--- a/cppcache/src/CachePerfStats.hpp
+++ b/cppcache/src/CachePerfStats.hpp
@@ -35,7 +35,7 @@
 using statistics::StatisticsFactory;
 
 /** hold statistics for cache.. */
-class APACHE_GEODE_EXPORT CachePerfStats {
+class CachePerfStats {
  public:
   explicit CachePerfStats(StatisticsFactory* factory) {
     auto statsType = factory->findType("CachePerfStats");
diff --git a/cppcache/src/CacheStatistics.cpp b/cppcache/src/CacheStatistics.cpp
index b6a1dc3..cd055c2 100644
--- a/cppcache/src/CacheStatistics.cpp
+++ b/cppcache/src/CacheStatistics.cpp
@@ -17,26 +17,48 @@
 
 #include <geode/CacheStatistics.hpp>
 
+namespace {
+std::chrono::system_clock::time_point convert_steady_to_system_tp(
+    std::chrono::steady_clock::time_point tp) {
+  return std::chrono::system_clock::now() +
+         std::chrono::duration_cast<std::chrono::system_clock::duration>(
+             std::chrono::steady_clock::now() - tp);
+}
+}  // namespace
+
 namespace apache {
 namespace geode {
 namespace client {
 
-void CacheStatistics::setLastModifiedTime(time_point lmt) {
-  m_lastModifiedTime = lmt.time_since_epoch().count();
+CacheStatistics::CacheStatistics() : last_accessed_{0}, last_modified_{0} {}
+
+CacheStatistics::~CacheStatistics() = default;
+
+void CacheStatistics::setLastModifiedTime(time_point tp) {
+  last_modified_ = tp.time_since_epoch().count();
 }
 
-void CacheStatistics::setLastAccessedTime(time_point lat) {
-  m_lastAccessTime = lat.time_since_epoch().count();
+void CacheStatistics::setLastAccessedTime(time_point tp) {
+  last_accessed_ = tp.time_since_epoch().count();
 }
 
-CacheStatistics::time_point CacheStatistics::getLastModifiedTime() const {
-  return time_point(std::chrono::system_clock::duration(m_lastModifiedTime));
+std::chrono::system_clock::time_point CacheStatistics::getLastModifiedTime()
+    const {
+  return convert_steady_to_system_tp(getLastModifiedSteadyTime());
 }
 
-CacheStatistics::time_point CacheStatistics::getLastAccessedTime() const {
-  return time_point(std::chrono::system_clock::duration(m_lastAccessTime));
+std::chrono::system_clock::time_point CacheStatistics::getLastAccessedTime()
+    const {
+  return convert_steady_to_system_tp(getLastAccessedSteadyTime());
 }
 
+CacheStatistics::time_point CacheStatistics::getLastModifiedSteadyTime() const {
+  return time_point{time_point::duration{last_modified_}};
+}
+
+CacheStatistics::time_point CacheStatistics::getLastAccessedSteadyTime() const {
+  return time_point{time_point::duration{last_accessed_}};
+}
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/CacheTransactionManagerImpl.cpp b/cppcache/src/CacheTransactionManagerImpl.cpp
index 0467cea..d0d432d 100644
--- a/cppcache/src/CacheTransactionManagerImpl.cpp
+++ b/cppcache/src/CacheTransactionManagerImpl.cpp
@@ -18,11 +18,11 @@
 #include "CacheTransactionManagerImpl.hpp"
 
 #include <geode/ExceptionTypes.hpp>
-#include <geode/PoolManager.hpp>
 #include <geode/TransactionId.hpp>
 
 #include "CacheImpl.hpp"
 #include "CacheRegionHelper.hpp"
+#include "SuspendedTxExpiryTask.hpp"
 #include "TSSTXStateWrapper.hpp"
 #include "TXCleaner.hpp"
 #include "TcrMessage.hpp"
@@ -160,7 +160,9 @@
       case TcrMessage::EXCEPTION: {
         break;
       }
-      default: { break; }
+      default: {
+        break;
+      }
     }
   }
 
@@ -215,13 +217,13 @@
   txState->releaseStickyConnection();
 
   // set the expiry handler for the suspended transaction
-  auto suspendedTxTimeout = m_cache->getDistributedSystem()
-                                .getSystemProperties()
-                                .suspendedTxTimeout();
-  auto handler =
-      new SuspendedTxExpiryHandler(this, txState->getTransactionId());
-  auto id = m_cache->getExpiryTaskManager().scheduleExpiryTask(
-      handler, suspendedTxTimeout, std::chrono::seconds::zero(), false);
+  auto timeout = m_cache->getDistributedSystem()
+                     .getSystemProperties()
+                     .suspendedTxTimeout();
+  auto& manager = m_cache->getExpiryTaskManager();
+  auto task = std::make_shared<SuspendedTxExpiryTask>(
+      manager, *this, txState->getTransactionId());
+  auto id = manager.schedule(std::move(task), timeout);
   txState->setSuspendedExpiryTaskId(id);
 
   // add the transaction state to the list of suspended transactions
@@ -306,11 +308,7 @@
 
   if (cancelExpiryTask) {
     // cancel the expiry task for the transaction
-    m_cache->getExpiryTaskManager().cancelTask(
-        txState->getSuspendedExpiryTaskId());
-  } else {
-    m_cache->getExpiryTaskManager().resetTask(
-        txState->getSuspendedExpiryTaskId(), std::chrono::seconds::zero());
+    m_cache->getExpiryTaskManager().cancel(txState->getSuspendedExpiryTaskId());
   }
 
   // set the current state as the state of the suspended transaction
diff --git a/cppcache/src/CacheTransactionManagerImpl.hpp b/cppcache/src/CacheTransactionManagerImpl.hpp
index e82edd1..18be867 100644
--- a/cppcache/src/CacheTransactionManagerImpl.hpp
+++ b/cppcache/src/CacheTransactionManagerImpl.hpp
@@ -25,7 +25,6 @@
 
 #include <geode/CacheTransactionManager.hpp>
 
-#include "SuspendedTxExpiryHandler.hpp"
 #include "TXCommitMessage.hpp"
 #include "util/Log.hpp"
 
@@ -36,6 +35,8 @@
 enum status { STATUS_COMMITTED = 3, STATUS_ROLLEDBACK = 4 };
 enum commitOp { BEFORE_COMMIT, AFTER_COMMIT };
 
+class ThinClientPoolDM;
+
 class CacheTransactionManagerImpl : public virtual CacheTransactionManager {
  public:
   explicit CacheTransactionManagerImpl(CacheImpl* cache);
diff --git a/cppcache/src/CacheXmlCreation.hpp b/cppcache/src/CacheXmlCreation.hpp
index 773a5be..2123483 100644
--- a/cppcache/src/CacheXmlCreation.hpp
+++ b/cppcache/src/CacheXmlCreation.hpp
@@ -39,7 +39,7 @@
  * @since 1.0
  */
 
-class APACHE_GEODE_EXPORT CacheXmlCreation {
+class CacheXmlCreation {
  public:
   /**
    * Creates a new <code>CacheXmlCreation</code> with no root region
diff --git a/cppcache/src/CacheXmlParser.cpp b/cppcache/src/CacheXmlParser.cpp
index 47c2382..95612b7 100644
--- a/cppcache/src/CacheXmlParser.cpp
+++ b/cppcache/src/CacheXmlParser.cpp
@@ -242,7 +242,8 @@
   char logmsg[2048];
   va_list args;
   va_start(args, msg);
-  vsprintf(logmsg, msg, args);
+  // NOLINTNEXTLINE(clang-analyzer-valist.Uninitialized): clang-tidy bug
+  std::vsnprintf(logmsg, sizeof(logmsg), msg, args);
   va_end(args);
   LOGWARN("SAX.warning during XML declarative client initialization: %s",
           logmsg);
@@ -505,7 +506,7 @@
   }
   cacheCreation_->create(cache);
   delCacheCreation.noDelete();
-  Log::info("Declarative configuration of cache completed successfully");
+  LOGINFO("Declarative configuration of cache completed successfully");
 }
 
 std::string CacheXmlParser::getOptionalAttribute(
@@ -1049,7 +1050,7 @@
 }
 
 std::string CacheXmlParser::getLibraryName(const xercesc::Attributes &attrs) {
-  return getRequiredAttribute(attrs, LIBRARY_NAME);
+  return getOptionalAttribute(attrs, LIBRARY_NAME);
 }
 
 std::string CacheXmlParser::getLibraryFunctionName(
diff --git a/cppcache/src/CacheXmlParser.hpp b/cppcache/src/CacheXmlParser.hpp
index 439a00d..c57289d 100644
--- a/cppcache/src/CacheXmlParser.hpp
+++ b/cppcache/src/CacheXmlParser.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_CACHEXMLPARSER_H_
-#define GEODE_CACHEXMLPARSER_H_
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -20,6 +15,11 @@
  * limitations under the License.
  */
 
+#pragma once
+
+#ifndef GEODE_CACHEXMLPARSER_H_
+#define GEODE_CACHEXMLPARSER_H_
+
 #include <map>
 #include <stack>
 #include <xercesc/framework/MemBufInputSource.hpp>
@@ -53,10 +53,11 @@
 
 class CacheXmlParser : public xercesc::DefaultHandler {
   void startElement(const XMLCh* const uri, const XMLCh* const localname,
-                    const XMLCh* const qname, const xercesc::Attributes& attrs);
+                    const XMLCh* const qname,
+                    const xercesc::Attributes& attrs) override;
   void endElement(const XMLCh* const uri, const XMLCh* const localname,
-                  const XMLCh* const qname);
-  void fatalError(const xercesc::SAXParseException&);
+                  const XMLCh* const qname) override;
+  void fatalError(const xercesc::SAXParseException&) override;
 
   std::map<std::string,
            std::function<void(CacheXmlParser&, const xercesc::Attributes&)>>
@@ -80,7 +81,7 @@
 
  public:
   explicit CacheXmlParser(Cache* cache);
-  ~CacheXmlParser();
+  ~CacheXmlParser() override;
   static CacheXmlParser* parse(const char* cachexml, Cache* cache);
   void parseFile(const char* filename);
   void parseMemory(const char* buffer, int size);
@@ -170,6 +171,7 @@
     }
   }
 };
+
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/CacheableEnum.cpp b/cppcache/src/CacheableEnum.cpp
index 663ba62..e57e7f5 100644
--- a/cppcache/src/CacheableEnum.cpp
+++ b/cppcache/src/CacheableEnum.cpp
@@ -31,7 +31,7 @@
   int enumVal = PdxHelper::getEnumValue(
       m_enumClassName.c_str(), m_enumName.c_str(), m_ordinal,
       CacheRegionHelper::getCacheImpl(output.getCache())->getPdxTypeRegistry());
-  output.write(static_cast<int8_t>(DSCode::CacheableEnum));
+  output.write(static_cast<int8_t>(DSCode::PDX_ENUM));
   output.write(int8_t(enumVal >> 24));
   output.writeArrayLen(enumVal & 0xFFFFFF);
 }
diff --git a/cppcache/src/CacheableToken.hpp b/cppcache/src/CacheableToken.hpp
index 4f5d893..2f0c3a3 100644
--- a/cppcache/src/CacheableToken.hpp
+++ b/cppcache/src/CacheableToken.hpp
@@ -28,8 +28,6 @@
 namespace geode {
 namespace client {
 
-class APACHE_GEODE_EXPORT CacheableToken;
-
 /** Implement a non-mutable int64_t wrapper that can serve as a distributable
  * key object for cacheing as well as being a 64 bit value. */
 class APACHE_GEODE_EXPORT CacheableToken
diff --git a/cppcache/src/ClientHealthStats.cpp b/cppcache/src/ClientHealthStats.cpp
index e2c026c..4ff5412 100644
--- a/cppcache/src/ClientHealthStats.cpp
+++ b/cppcache/src/ClientHealthStats.cpp
@@ -14,34 +14,37 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 #include "ClientHealthStats.hpp"
 
-#include "CacheImpl.hpp"
+#include <geode/CacheableDate.hpp>
+#include <geode/DataInput.hpp>
+#include <geode/DataOutput.hpp>
 
 namespace apache {
 namespace geode {
 namespace client {
 
 void ClientHealthStats::toData(DataOutput& output) const {
-  output.writeInt(static_cast<int32_t>(m_numGets));
-  output.writeInt(static_cast<int32_t>(m_numPuts));
-  output.writeInt(static_cast<int32_t>(m_numMisses));
-  output.writeInt(static_cast<int32_t>(m_numCacheListenerCalls));
-  output.writeInt(static_cast<int32_t>(m_numThread));
-  output.writeInt(static_cast<int32_t>(m_cpus));
-  output.writeInt(static_cast<int64_t>(m_processCpuTime));
-  m_updateTime->toData(output);
+  output.writeInt(static_cast<int64_t>(gets_));
+  output.writeInt(static_cast<int64_t>(puts_));
+  output.writeInt(static_cast<int64_t>(misses_));
+  output.writeInt(static_cast<int32_t>(cacheListenerCallsCompleted_));
+  output.writeInt(static_cast<int32_t>(threads_));
+  output.writeInt(static_cast<int32_t>(cpus_));
+  output.writeInt(static_cast<int64_t>(processCpuTime_));
+  updateTime_->toData(output);
 }
 
 void ClientHealthStats::fromData(DataInput& input) {
-  m_numGets = input.readInt32();
-  m_numPuts = input.readInt32();
-  m_numMisses = input.readInt32();
-  m_numCacheListenerCalls = input.readInt32();
-  m_numThread = input.readInt32();
-  m_processCpuTime = input.readInt64();
-  m_cpus = input.readInt32();
-  m_updateTime->fromData(input);
+  gets_ = input.readInt64();
+  puts_ = input.readInt64();
+  misses_ = input.readInt64();
+  cacheListenerCallsCompleted_ = input.readInt32();
+  threads_ = input.readInt32();
+  processCpuTime_ = input.readInt64();
+  cpus_ = input.readInt32();
+  updateTime_->fromData(input);
 }
 
 std::shared_ptr<Serializable> ClientHealthStats::createDeserializable() {
@@ -49,27 +52,20 @@
 }
 
 ClientHealthStats::ClientHealthStats()
-    : m_numGets(0),
-      m_numPuts(0),
-      m_numMisses(0),
-      m_numCacheListenerCalls(0),
-      m_numThread(0),
-      m_processCpuTime(0),
-      m_cpus(0) {
-  m_updateTime = CacheableDate::create();
-}
+    : ClientHealthStats(0, 0, 0, 0, 0, 0, 0) {}
 
-ClientHealthStats::ClientHealthStats(int gets, int puts, int misses,
-                                     int listCalls, int numThreads,
-                                     int64_t cpuTime, int cpus)
-    : m_numGets(gets),
-      m_numPuts(puts),
-      m_numMisses(misses),
-      m_numCacheListenerCalls(listCalls),
-      m_numThread(numThreads),
-      m_processCpuTime(cpuTime),
-      m_cpus(cpus) {
-  m_updateTime = CacheableDate::create();
+ClientHealthStats::ClientHealthStats(int64_t gets, int64_t puts, int64_t misses,
+                                     int32_t cacheListenerCallsCompleted,
+                                     int32_t threads, int64_t processCpuTime,
+                                     int32_t cpus)
+    : gets_(gets),
+      puts_(puts),
+      misses_(misses),
+      cacheListenerCallsCompleted_(cacheListenerCallsCompleted),
+      threads_(threads),
+      processCpuTime_(processCpuTime),
+      cpus_(cpus) {
+  updateTime_ = CacheableDate::create();
 }
 
 }  // namespace client
diff --git a/cppcache/src/ClientHealthStats.hpp b/cppcache/src/ClientHealthStats.hpp
index ddd07c9..9fd61db 100644
--- a/cppcache/src/ClientHealthStats.hpp
+++ b/cppcache/src/ClientHealthStats.hpp
@@ -20,16 +20,14 @@
 #ifndef GEODE_CLIENTHEALTHSTATS_H_
 #define GEODE_CLIENTHEALTHSTATS_H_
 
-#include <geode/CacheableDate.hpp>
-#include <geode/Serializable.hpp>
 #include <geode/internal/DataSerializableFixedId.hpp>
 
-#include "util/Log.hpp"
-
 namespace apache {
 namespace geode {
 namespace client {
 
+class CacheableDate;
+
 class ClientHealthStats : public internal::DataSerializableFixedId_t<
                               internal::DSFid::ClientHealthStats> {
  public:
@@ -37,40 +35,39 @@
 
   void fromData(DataInput& input) override;
 
-  /**
-   * @brief creation function for dates.
-   */
   static std::shared_ptr<Serializable> createDeserializable();
 
-  /** @return the size of the object in bytes */
   size_t objectSize() const override { return sizeof(ClientHealthStats); }
+
   /**
    * Factory method for creating an instance of ClientHealthStats
    */
-  static std::shared_ptr<ClientHealthStats> create(int gets, int puts,
-                                                   int misses, int listCalls,
-                                                   int numThreads,
-                                                   int64_t cpuTime = 0,
-                                                   int cpus = 0) {
-    return std::shared_ptr<ClientHealthStats>(new ClientHealthStats(
-        gets, puts, misses, listCalls, numThreads, cpuTime, cpus));
+  static std::shared_ptr<ClientHealthStats> create(
+      int64_t gets, int64_t puts, int64_t misses,
+      int32_t cacheListenerCallsCompleted, int32_t threads,
+      int64_t processCpuTime = 0, int32_t cpus = 0) {
+    return std::make_shared<ClientHealthStats>(gets, puts, misses,
+                                               cacheListenerCallsCompleted,
+                                               threads, processCpuTime, cpus);
   }
-  ~ClientHealthStats() override = default;
+
+  ~ClientHealthStats() noexcept override = default;
 
   ClientHealthStats();
 
- private:
-  ClientHealthStats(int gets, int puts, int misses, int listCalls,
-                    int numThreads, int64_t cpuTime, int cpus);
+  ClientHealthStats(int64_t gets, int64_t puts, int64_t misses,
+                    int32_t cacheListenerCallsCompleted, int32_t threads,
+                    int64_t processCpuTime, int32_t cpus);
 
-  int m_numGets;                // CachePerfStats.gets
-  int m_numPuts;                // CachePerfStats.puts
-  int m_numMisses;              // CachePerfStats.misses
-  int m_numCacheListenerCalls;  // CachePerfStats.cacheListenerCallsCompleted
-  int m_numThread;              // ProcessStats.threads;
-  int64_t m_processCpuTime;     //
-  int m_cpus;
-  std::shared_ptr<CacheableDate> m_updateTime;  // Last updateTime
+ private:
+  int64_t gets_;
+  int64_t puts_;
+  int64_t misses_;
+  int32_t cacheListenerCallsCompleted_;
+  int32_t threads_;
+  int64_t processCpuTime_;
+  int32_t cpus_;
+  std::shared_ptr<CacheableDate> updateTime_;
 };
 
 }  // namespace client
diff --git a/cppcache/src/ClientMetadata.cpp b/cppcache/src/ClientMetadata.cpp
index a160af1..881ea46 100644
--- a/cppcache/src/ClientMetadata.cpp
+++ b/cppcache/src/ClientMetadata.cpp
@@ -50,10 +50,8 @@
         "%zu ",
         totalNumBuckets, fpaSet->size());
     if (!fpaSet->empty()) {
-      int totalFPABuckets = 0;
       for (int i = 0; i < static_cast<int>(fpaSet->size()); i++) {
         std::vector<int> attList;
-        totalFPABuckets += fpaSet->at(i)->getNumBuckets();
         attList.push_back(fpaSet->at(i)->getNumBuckets());
         attList.push_back(fpaSet->at(i)->getStartingBucketID());
         m_fpaMap[fpaSet->at(i)->getPartitionName()] = attList;
@@ -85,7 +83,7 @@
     : m_partitionNames(nullptr),
       m_previousOne(nullptr),
       m_totalNumBuckets(0),
-      m_colocatedWith(nullptr),
+      m_colocatedWith(),
       m_tcrdm(nullptr) {}
 
 ClientMetadata::~ClientMetadata() {}
@@ -156,15 +154,14 @@
     LOGFINER("returning random & m_bucketServerLocationsList size is: %zu",
              m_bucketServerLocationsList.size());
     RandGen randgen;
-    serverLocation = m_bucketServerLocationsList[bucketId].at(randgen(
-        static_cast<int>(m_bucketServerLocationsList[bucketId].size())));
+    serverLocation = m_bucketServerLocationsList[bucketId].at(
+        randgen(m_bucketServerLocationsList[bucketId].size()));
   }
   // return m_bucketServerLocationsList[bucketId].at(0);
 }
 
 void ClientMetadata::updateBucketServerLocations(
     int bucketId, BucketServerLocationsType bucketServerLocations) {
-  // WriteGuard guard( m_readWriteLock );
   checkBucketId(bucketId);
 
   auto&& serverGroup = m_tcrdm->getServerGroup();
@@ -219,11 +216,11 @@
     RandGen randGen;
 
     if (primaries.size() > 0) {
-      std::random_shuffle(primaries.begin(), primaries.end(), randGen);
+      std::shuffle(primaries.begin(), primaries.end(), randGen);
     }
 
     if (secondaries.size() > 0) {
-      std::random_shuffle(secondaries.begin(), secondaries.end(), randGen);
+      std::shuffle(secondaries.begin(), secondaries.end(), randGen);
     }
 
     m_bucketServerLocationsList[bucketId].clear();
@@ -260,11 +257,11 @@
     RandGen randGen;
 
     if (primaries.size() > 0) {
-      std::random_shuffle(primaries.begin(), primaries.end(), randGen);
+      std::shuffle(primaries.begin(), primaries.end(), randGen);
     }
 
     if (secondaries.size() > 0) {
-      std::random_shuffle(secondaries.begin(), secondaries.end(), randGen);
+      std::shuffle(secondaries.begin(), secondaries.end(), randGen);
     }
 
     m_bucketServerLocationsList[bucketId].clear();
diff --git a/cppcache/src/ClientMetadata.hpp b/cppcache/src/ClientMetadata.hpp
index c945032..3e2992c 100644
--- a/cppcache/src/ClientMetadata.hpp
+++ b/cppcache/src/ClientMetadata.hpp
@@ -27,7 +27,6 @@
 
 #include "BucketServerLocation.hpp"
 #include "FixedPartitionAttributesImpl.hpp"
-#include "ReadWriteLock.hpp"
 #include "ServerLocation.hpp"
 #include "util/Log.hpp"
 
@@ -47,7 +46,7 @@
 typedef std::vector<BucketServerLocationsType> BucketServerLocationsListType;
 typedef std::map<std::string, std::vector<int>> FixedMapType;
 
-class APACHE_GEODE_EXPORT ClientMetadata {
+class ClientMetadata {
  private:
   void setPartitionNames();
   std::shared_ptr<CacheableHashSet> m_partitionNames;
@@ -71,7 +70,7 @@
   void setPreviousone(std::shared_ptr<ClientMetadata> cptr) {
     m_previousOne = cptr;
   }
-  ~ClientMetadata();
+  virtual ~ClientMetadata();
   ClientMetadata();
   ClientMetadata(
       int totalNumBuckets, std::string colocatedWith, ThinClientPoolDM* tcrdm,
@@ -102,8 +101,8 @@
   }
   ClientMetadata(ClientMetadata& other);
   ClientMetadata& operator=(const ClientMetadata&) = delete;
-  std::vector<std::shared_ptr<BucketServerLocation>> adviseServerLocations(
-      int bucketId);
+  virtual std::vector<std::shared_ptr<BucketServerLocation>>
+  adviseServerLocations(int bucketId);
   std::shared_ptr<BucketServerLocation> advisePrimaryServerLocation(
       int bucketId);
   std::shared_ptr<BucketServerLocation> adviseRandomServerLocation();
diff --git a/cppcache/src/ClientMetadataService.cpp b/cppcache/src/ClientMetadataService.cpp
index d844883..5600c4b 100644
--- a/cppcache/src/ClientMetadataService.cpp
+++ b/cppcache/src/ClientMetadataService.cpp
@@ -24,6 +24,7 @@
 
 #include <geode/FixedPartitionResolver.hpp>
 
+#include "CacheImpl.hpp"
 #include "ClientMetadata.hpp"
 #include "TcrConnectionManager.hpp"
 #include "TcrMessage.hpp"
@@ -36,8 +37,6 @@
 
 const BucketStatus::clock::time_point BucketStatus::m_noTimeout{};
 
-const char* ClientMetadataService::NC_CMDSvcThread = "NC CMDSvcThread";
-
 ClientMetadataService::ClientMetadataService(ThinClientPoolDM* pool)
     : m_run(false),
       m_pool(pool),
@@ -65,7 +64,7 @@
 }
 
 void ClientMetadataService::svc() {
-  DistributedSystemImpl::setThreadName(NC_CMDSvcThread);
+  Log::setThreadName("NC CMDSvcThread");
 
   LOGINFO("ClientMetadataService started for pool " + m_pool->getName());
 
@@ -120,6 +119,14 @@
     if (err == GF_NOERR &&
         reply.getMessageType() ==
             TcrMessage::RESPONSE_CLIENT_PARTITION_ATTRIBUTES) {
+      // By convention, server returns -1 bucket count to indicate replicated
+      // region
+      if (reply.getNumBuckets() == -1) {
+        LOGDEBUG(
+            "ClientMetadataService::getClientPRMetadata: region is"
+            "replicated, not partitioned - no metadata");
+        return;
+      }
       cptr = std::make_shared<ClientMetadata>(reply.getNumBuckets(),
                                               reply.getColocatedWith(), m_pool,
                                               reply.getFpaSet());
@@ -149,6 +156,7 @@
           m_regionMetadataLock);
       m_regionMetaDataMap[path] = newCptr;
       LOGINFO("Updated client meta data");
+      m_cache->setPrMetadataUpdatedFlag(true);
     }
   } else {
     newCptr = SendClientPRMetadata(colocatedWith.c_str(), cptr);
@@ -162,6 +170,7 @@
       m_regionMetaDataMap[colocatedWith.c_str()] = newCptr;
       m_regionMetaDataMap[path] = newCptr;
       LOGINFO("Updated client meta data");
+      m_cache->setPrMetadataUpdatedFlag(true);
     }
   }
 }
@@ -172,8 +181,6 @@
       new DataOutput(m_cache->createDataOutput(m_pool)), regionPath);
   TcrMessageReply reply(true, nullptr);
   // send this message to server and get metadata from server.
-  LOGFINE("Now sending GET_CLIENT_PR_METADATA for getting from server: %s",
-          regionPath);
   std::shared_ptr<Region> region = nullptr;
   GfErrType err = m_pool->sendSyncRequest(request, reply);
   if (err == GF_NOERR &&
@@ -185,7 +192,9 @@
       }
     }
     auto metadata = reply.getMetadata();
-    if (metadata == nullptr) return nullptr;
+    if (metadata == nullptr) {
+      return nullptr;
+    }
     if (metadata->empty()) {
       delete metadata;
       return nullptr;
@@ -299,8 +308,8 @@
   if (region != nullptr) {
     auto tcrRegion = dynamic_cast<ThinClientRegion*>(region.get());
     {
-      TryWriteGuard guardRegionMetaDataRefresh(
-          tcrRegion->getMataDataMutex(), tcrRegion->getMetaDataRefreshed());
+      boost::unique_lock<boost::shared_mutex> guard{
+          tcrRegion->getMetadataMutex()};
       if (tcrRegion->getMetaDataRefreshed()) {
         return;
       }
@@ -357,8 +366,9 @@
       clientMetadata->getServerLocation(bucketId, isPrimary, serverLocation,
                                         version);
       if (!(serverLocation && serverLocation->isValid())) {
-        keysWhichLeft.push_back(key);
-        continue;
+        // If we're missing any metadata, give up.  This will cause us to revert
+        // to multi-hop, which is consistent with the Java client.
+        return nullptr;
       }
 
       buckets[bucketId] = serverLocation;
@@ -559,7 +569,6 @@
 std::shared_ptr<ClientMetadataService::ServerToBucketsMap>
 ClientMetadataService::pruneNodes(
     const std::shared_ptr<ClientMetadata>& metadata, const BucketSet& buckets) {
-  BucketSet bucketSetWithoutServer;
   ServerToBucketsMap serverToBucketsMap;
 
   auto prunedServerToBucketsMap = std::make_shared<ServerToBucketsMap>();
@@ -568,12 +577,10 @@
     const auto locations = metadata->adviseServerLocations(bucketId);
     if (locations.size() == 0) {
       LOGDEBUG(
-          "ClientMetadataService::pruneNodes Since no server location "
-          "available for bucketId = %d  putting it into "
-          "bucketSetWithoutServer ",
+          "ClientMetadataService::pruneNodes Use non single-hop path "
+          "since no server location is available for bucketId = %d",
           bucketId);
-      bucketSetWithoutServer.insert(bucketId);
-      continue;
+      return nullptr;
     }
 
     for (const auto& location : locations) {
@@ -654,11 +661,6 @@
     serverToBucketsMap.erase(server);
   }
 
-  const auto& itrRes2 = prunedServerToBucketsMap->begin();
-  for (const auto& itr : bucketSetWithoutServer) {
-    itrRes2->second->insert(itr);
-  }
-
   return prunedServerToBucketsMap;
 }
 
diff --git a/cppcache/src/ClientMetadataService.hpp b/cppcache/src/ClientMetadataService.hpp
index 478e0a3..8d2010c 100644
--- a/cppcache/src/ClientMetadataService.hpp
+++ b/cppcache/src/ClientMetadataService.hpp
@@ -153,7 +153,7 @@
       dereference_equal_to<std::shared_ptr<BucketServerLocation>>>
       ServerToBucketsMap;
 
-  std::shared_ptr<BucketServerLocation> findNextServer(
+  static std::shared_ptr<BucketServerLocation> findNextServer(
       const ServerToBucketsMap& serverToBucketsMap,
       const BucketSet& currentBucketSet);
 
@@ -181,7 +181,7 @@
   groupByServerToBuckets(const std::shared_ptr<ClientMetadata>& metadata,
                          const BucketSet& bucketSet, bool optimizeForWrite);
 
-  std::shared_ptr<ClientMetadataService::ServerToBucketsMap> pruneNodes(
+  static std::shared_ptr<ClientMetadataService::ServerToBucketsMap> pruneNodes(
       const std::shared_ptr<ClientMetadata>& metadata,
       const BucketSet& buckets);
 
diff --git a/cppcache/src/ClientProxyMembershipID.cpp b/cppcache/src/ClientProxyMembershipID.cpp
index 8779a7d..741565f 100644
--- a/cppcache/src/ClientProxyMembershipID.cpp
+++ b/cppcache/src/ClientProxyMembershipID.cpp
@@ -17,11 +17,6 @@
 
 #include "ClientProxyMembershipID.hpp"
 
-#include <ctime>
-#include <iostream>
-#include <memory>
-#include <string>
-
 #include <boost/process/environment.hpp>
 
 #include <geode/CacheableBuiltins.hpp>
@@ -29,28 +24,30 @@
 #include "DataOutputInternal.hpp"
 #include "DistributedSystem.hpp"
 #include "Version.hpp"
+#include "util/Log.hpp"
 
-#define DCPORT 12334
-#define VMKIND 13
-#define ROLEARRLENGTH 0
+namespace {
+constexpr int32_t kVersionMask = 0x8;
+constexpr int8_t kVmKindLoner = 13;
+constexpr int32_t kDcPort = 12334;
+constexpr int8_t kVmKind = kVmKindLoner;
+constexpr int32_t kRoleArrayLength = 0;
+
+static int32_t syncCounter = 2;
+}  // namespace
 
 namespace apache {
 namespace geode {
 namespace client {
 
-static int synch_counter = 2;
-
-const int ClientProxyMembershipID::VERSION_MASK = 0x8;
-const int8_t ClientProxyMembershipID::TOKEN_ORDINAL = -1;
-
 ClientProxyMembershipID::ClientProxyMembershipID()
-    : m_hostPort(0), m_vmViewId(0) {}
+    : hostPort_(0), vmViewId_(0) {}
 
 ClientProxyMembershipID::~ClientProxyMembershipID() noexcept = default;
 
 ClientProxyMembershipID::ClientProxyMembershipID(
     std::string dsName, std::string randString, const std::string& hostname,
-    const ACE_INET_Addr& address, uint32_t hostPort,
+    const boost::asio::ip::address& address, uint32_t hostPort,
     const std::string& durableClientId,
     const std::chrono::seconds durableClientTimeOut) {
   auto vmPID = boost::this_process::get_id();
@@ -58,7 +55,7 @@
   initHostAddressVector(address);
 
   initObjectVars(hostname, hostPort, durableClientId, durableClientTimeOut,
-                 DCPORT, vmPID, VMKIND, 0, dsName.c_str(), randString.c_str(),
+                 kDcPort, vmPID, kVmKind, 0, dsName.c_str(), randString.c_str(),
                  0);
 }
 
@@ -72,31 +69,23 @@
   initHostAddressVector(hostAddr, hostAddrLen);
 
   initObjectVars("localhost", hostPort, "", std::chrono::seconds::zero(),
-                 DCPORT, vmPID, VMKIND, 0, dsname, uniqueTag, vmViewId);
+                 kDcPort, vmPID, kVmKind, 0, dsname, uniqueTag, vmViewId);
 }
 
 void ClientProxyMembershipID::initHostAddressVector(
-    const ACE_INET_Addr& address) {
-  if (address.get_type() == AF_INET6) {
-    const auto socketAddress6 =
-        static_cast<const struct sockaddr_in6*>(address.get_addr());
-    auto socketAddress =
-        reinterpret_cast<const uint8_t*>(&socketAddress6->sin6_addr);
-    auto length = sizeof(socketAddress6->sin6_addr);
-    m_hostAddr.assign(socketAddress, socketAddress + length);
+    const boost::asio::ip::address& address) {
+  if (address.is_v6()) {
+    auto bytes = address.to_v6().to_bytes();
+    hostAddr_.assign(bytes.begin(), bytes.end());
   } else {
-    const auto socketAddress4 =
-        static_cast<const struct sockaddr_in*>(address.get_addr());
-    auto ipAddress =
-        reinterpret_cast<const uint8_t*>(&socketAddress4->sin_addr);
-    auto length = sizeof(socketAddress4->sin_addr);
-    m_hostAddr.assign(ipAddress, ipAddress + length);
+    auto bytes = address.to_v4().to_bytes();
+    hostAddr_.assign(bytes.begin(), bytes.end());
   }
 }
 
 void ClientProxyMembershipID::initHostAddressVector(const uint8_t* hostAddr,
                                                     uint32_t hostAddrLen) {
-  m_hostAddr.assign(hostAddr, hostAddr + hostAddrLen);
+  hostAddr_.assign(hostAddr, hostAddr + hostAddrLen);
 }
 
 void ClientProxyMembershipID::initObjectVars(
@@ -107,23 +96,23 @@
     const char* uniqueTag, uint32_t vmViewId) {
   DataOutputInternal m_memID;
   if (dsname == nullptr) {
-    m_dsname = std::string("");
+    dsName_ = std::string("");
   } else {
-    m_dsname = std::string(dsname);
+    dsName_ = std::string(dsname);
   }
-  m_hostPort = hostPort;
+  hostPort_ = hostPort;
   if (uniqueTag == nullptr) {
-    m_uniqueTag = std::string("");
+    uniqueTag_ = std::string("");
   } else {
-    m_uniqueTag = std::string(uniqueTag);
+    uniqueTag_ = std::string(uniqueTag);
   }
 
-  m_vmViewId = vmViewId;
+  vmViewId_ = vmViewId;
   m_memID.write(static_cast<int8_t>(DSCode::FixedIDByte));
-  m_memID.write(static_cast<int8_t>(DSCode::InternalDistributedMember));
-  m_memID.writeBytes(m_hostAddr.data(),
-                     static_cast<int32_t>(m_hostAddr.size()));
-  m_memID.writeInt(static_cast<int32_t>(synch_counter));
+  m_memID.write(
+      static_cast<int8_t>(internal::DSFid::InternalDistributedMember));
+  m_memID.writeBytes(hostAddr_.data(), static_cast<int32_t>(hostAddr_.size()));
+  m_memID.writeInt(static_cast<int32_t>(syncCounter));
   m_memID.writeString(hostname);
   m_memID.write(splitBrainFlag);
 
@@ -131,7 +120,7 @@
 
   m_memID.writeInt(vPID);
   m_memID.write(vmkind);
-  m_memID.writeArrayLen(ROLEARRLENGTH);
+  m_memID.writeArrayLen(kRoleArrayLength);
   m_memID.writeString(dsname);
   m_memID.writeString(uniqueTag);
 
@@ -142,49 +131,47 @@
         static_cast<int32_t>(durableClntTimeOut.count()));
     int32ptr->toData(m_memID);
   }
-  writeVersion(Version::getOrdinal(), m_memID);
+  Version::write(m_memID, Version::current());
   size_t len;
   char* buf =
       reinterpret_cast<char*>(const_cast<uint8_t*>(m_memID.getBuffer(&len)));
-  m_memIDStr.append(buf, len);
+  memIdStr_.append(buf, len);
 
-  clientID.append(hostname);
-  clientID.append("(");
-  clientID.append(std::to_string(vPID));
-  clientID.append(":loner):");
-  clientID.append(std::to_string(synch_counter));
-  clientID.append(":");
-  clientID.append(getUniqueTag());
-  clientID.append(":");
-  clientID.append(getDSName());
+  clientId_.append(hostname);
+  clientId_.append("(");
+  clientId_.append(std::to_string(vPID));
+  clientId_.append(":loner):");
+  clientId_.append(std::to_string(syncCounter));
+  clientId_.append(":");
+  clientId_.append(getUniqueTag());
+  clientId_.append(":");
+  clientId_.append(getDSName());
 
   for (uint32_t i = 0; i < getHostAddrLen(); i++) {
-    m_hashKey.append(":");
-    m_hashKey.append(std::to_string(m_hostAddr[i]));
+    hashKey_.append(":");
+    hashKey_.append(std::to_string(hostAddr_[i]));
   }
-  m_hashKey.append(":");
-  m_hashKey.append(std::to_string(getHostPort()));
-  m_hashKey.append(":");
-  m_hashKey.append(getDSName());
-  m_hashKey.append(":");
-  if (!m_uniqueTag.empty()) {
-    m_hashKey.append(getUniqueTag());
+  hashKey_.append(":");
+  hashKey_.append(std::to_string(getHostPort()));
+  hashKey_.append(":");
+  hashKey_.append(getDSName());
+  hashKey_.append(":");
+  if (!uniqueTag_.empty()) {
+    hashKey_.append(getUniqueTag());
   } else {
-    m_hashKey.append(":");
-    m_hashKey.append(std::to_string(m_vmViewId));
+    hashKey_.append(":");
+    hashKey_.append(std::to_string(vmViewId_));
   }
-  LOGDEBUG("GethashKey %s client id: %s ", m_hashKey.c_str(), clientID.c_str());
+  LOGDEBUG("GethashKey %s client id: %s ", hashKey_.c_str(), clientId_.c_str());
 }
 
 const std::string& ClientProxyMembershipID::getDSMemberId() const {
-  return m_memIDStr;
+  return memIdStr_;
 }
 
-const std::string& ClientProxyMembershipID::getDSMemberIdForThinClientUse() {
-  return clientID;
-}
+const std::string& ClientProxyMembershipID::getClientId() { return clientId_; }
 
-std::string ClientProxyMembershipID::getHashKey() { return m_hashKey; }
+std::string ClientProxyMembershipID::getHashKey() { return hashKey_; }
 
 void ClientProxyMembershipID::toData(DataOutput&) const {
   throw IllegalStateException("Member ID toData() not implemented.");
@@ -193,31 +180,31 @@
 void ClientProxyMembershipID::fromData(DataInput& input) {
   // deserialization for PR FX HA
 
-  auto length = input.readArrayLength();
-  auto hostAddress = new uint8_t[length];
-  input.readBytesOnly(hostAddress, length);
-  auto hostPort = input.readInt32();
-  auto hostname =
+  const auto length = input.readArrayLength();
+  auto hostAddress = std::vector<uint8_t>(length);
+  input.readBytesOnly(hostAddress.data(), length);
+  const auto hostPort = input.readInt32();
+  const auto hostname =
       std::dynamic_pointer_cast<CacheableString>(input.readObject());
-  auto splitbrain = input.read();
-  auto dcport = input.readInt32();
-  auto vPID = input.readInt32();
-  auto vmKind = input.read();
-  auto aStringArray = CacheableStringArray::create();
+  const auto splitbrain = input.read();
+  const auto dcport = input.readInt32();
+  const auto vPID = input.readInt32();
+  const auto vmKind = input.read();
+  const auto aStringArray = CacheableStringArray::create();
   aStringArray->fromData(input);
-  auto dsName = std::dynamic_pointer_cast<CacheableString>(input.readObject());
-  auto uniqueTag =
+  const auto dsName =
       std::dynamic_pointer_cast<CacheableString>(input.readObject());
-  auto durableClientId =
+  const auto uniqueTag =
       std::dynamic_pointer_cast<CacheableString>(input.readObject());
-  auto durableClientTimeOut = std::chrono::seconds(input.readInt32());
-  int32_t vmViewId = 0;
+  const auto durableClientId =
+      std::dynamic_pointer_cast<CacheableString>(input.readObject());
+  const auto durableClientTimeOut = std::chrono::seconds(input.readInt32());
   readVersion(splitbrain, input);
 
-  initHostAddressVector(hostAddress, length);
+  initHostAddressVector(hostAddress.data(), length);
 
-  if (vmKind != ClientProxyMembershipID::LONER_DM_TYPE) {
-    vmViewId = std::stoi(uniqueTag->value());
+  if (vmKind != kVmKindLoner) {
+    auto vmViewId = std::stoi(uniqueTag->value());
     initObjectVars(hostname->value().c_str(), hostPort,
                    durableClientId->value().c_str(), durableClientTimeOut,
                    dcport, vPID, vmKind, splitbrain, dsName->value().c_str(),
@@ -229,15 +216,14 @@
                    dcport, vPID, vmKind, splitbrain, dsName->value().c_str(),
                    uniqueTag->value().c_str(), 0);
   }
-  delete[] hostAddress;
   readAdditionalData(input);
 }
 
-Serializable* ClientProxyMembershipID::readEssentialData(DataInput& input) {
-  auto length = input.readArrayLength();
-  auto hostAddress = new uint8_t[length];
-  input.readBytesOnly(hostAddress, length);
-  auto hostPort = input.readInt32();
+void ClientProxyMembershipID::readEssentialData(DataInput& input) {
+  const auto length = input.readArrayLength();
+  auto hostAddress = std::vector<uint8_t>(length);
+  input.readBytesOnly(hostAddress.data(), length);
+  const auto hostPort = input.readInt32();
 
   // read and ignore flag
   input.read();
@@ -245,7 +231,7 @@
   const auto vmKind = input.read();
   int32_t vmViewId = 0;
   std::shared_ptr<CacheableString> uniqueTag, vmViewIdstr;
-  if (vmKind == ClientProxyMembershipID::LONER_DM_TYPE) {
+  if (vmKind == kVmKindLoner) {
     uniqueTag = std::dynamic_pointer_cast<CacheableString>(input.readObject());
   } else {
     vmViewIdstr =
@@ -255,23 +241,18 @@
 
   auto dsName = std::dynamic_pointer_cast<CacheableString>(input.readObject());
 
-  initHostAddressVector(hostAddress, length);
+  initHostAddressVector(hostAddress.data(), length);
 
-  if (vmKind != ClientProxyMembershipID::LONER_DM_TYPE) {
+  if (vmKind != kVmKindLoner) {
     // initialize the object with the values read and some dummy values
-    initObjectVars("", hostPort, "", std::chrono::seconds::zero(), DCPORT, 0,
+    initObjectVars("", hostPort, "", std::chrono::seconds::zero(), kDcPort, 0,
                    vmKind, 0, dsName->value().c_str(), nullptr, vmViewId);
   } else {
     // initialize the object with the values read and some dummy values
-    initObjectVars("", hostPort, "", std::chrono::seconds::zero(), DCPORT, 0,
+    initObjectVars("", hostPort, "", std::chrono::seconds::zero(), kDcPort, 0,
                    vmKind, 0, dsName->value().c_str(),
                    uniqueTag->value().c_str(), vmViewId);
   }
-
-  delete[] hostAddress;
-  readAdditionalData(input);
-
-  return this;
 }
 
 void ClientProxyMembershipID::readAdditionalData(DataInput& input) {
@@ -279,7 +260,7 @@
   input.advanceCursor(17);
 }
 
-void ClientProxyMembershipID::increaseSynchCounter() { ++synch_counter; }
+void ClientProxyMembershipID::increaseSyncCounter() { ++syncCounter; }
 
 // Compares two membershipIds. This is based on the compareTo function
 // of InternalDistributedMember class of Java.
@@ -321,9 +302,9 @@
   std::string myUniqueTag = getUniqueTag();
   std::string otherUniqueTag = otherMember.getUniqueTag();
   if (myUniqueTag.empty() && otherUniqueTag.empty()) {
-    if (m_vmViewId < otherMember.m_vmViewId) {
+    if (vmViewId_ < otherMember.vmViewId_) {
       return -1;
-    } else if (m_vmViewId > otherMember.m_vmViewId) {
+    } else if (vmViewId_ > otherMember.vmViewId_) {
       return 1;
     }  // else they're the same, so continue
   } else if (myUniqueTag.empty()) {
@@ -339,27 +320,23 @@
   return 0;
 }
 
-void ClientProxyMembershipID::readVersion(int flags, DataInput& input) {
-  if ((flags & ClientProxyMembershipID::VERSION_MASK) != 0) {
-    int8_t ordinal = input.read();
-    LOGDEBUG("ClientProxyMembershipID::readVersion ordinal = %d ", ordinal);
-    if (ordinal == ClientProxyMembershipID::TOKEN_ORDINAL) {
-      LOGDEBUG("ClientProxyMembershipID::readVersion ordinal = %d ",
-               input.readInt16());
-    }
+void ClientProxyMembershipID::readVersion(int32_t flags, DataInput& input) {
+  if (flags & kVersionMask) {
+    const auto version = Version::read(input);
+    LOGDEBUG("ClientProxyMembershipID::readVersion ordinal = %d ",
+             version.getOrdinal());
   }
 }
 
-void ClientProxyMembershipID::writeVersion(int16_t ordinal,
-                                           DataOutput& output) {
-  if (ordinal <= SCHAR_MAX) {
-    output.write(static_cast<int8_t>(ordinal));
-    LOGDEBUG("ClientProxyMembershipID::writeVersion ordinal = %d ", ordinal);
-  } else {
-    output.write(ClientProxyMembershipID::TOKEN_ORDINAL);
-    output.writeInt(ordinal);
-    LOGDEBUG("ClientProxyMembershipID::writeVersion ordinal = %d ", ordinal);
+int32_t ClientProxyMembershipID::hashcode() const {
+  std::stringstream hostAddressString;
+  hostAddressString << std::hex;
+  for (uint32_t i = 0; i < getHostAddrLen(); i++) {
+    hostAddressString << ":" << static_cast<int>(hostAddr_[i]);
   }
+  auto result = internal::geode_hash<std::string>{}(hostAddressString.str());
+  result += hostPort_;
+  return result;
 }
 
 }  // namespace client
diff --git a/cppcache/src/ClientProxyMembershipID.hpp b/cppcache/src/ClientProxyMembershipID.hpp
index f933587..bcf792d 100644
--- a/cppcache/src/ClientProxyMembershipID.hpp
+++ b/cppcache/src/ClientProxyMembershipID.hpp
@@ -20,13 +20,12 @@
 #ifndef GEODE_CLIENTPROXYMEMBERSHIPID_H_
 #define GEODE_CLIENTPROXYMEMBERSHIPID_H_
 
-#include <sstream>
+#include <memory>
 #include <string>
 #include <vector>
 
-#include <ace/INET_Addr.h>
+#include <boost/asio.hpp>
 
-#include <geode/DataOutput.hpp>
 #include <geode/internal/functional.hpp>
 #include <geode/internal/geode_globals.hpp>
 
@@ -36,44 +35,48 @@
 namespace geode {
 namespace client {
 
-using internal::DSFid;
-
-class ClientProxyMembershipID;
-
 class ClientProxyMembershipID : public DSMemberForVersionStamp {
  public:
   const std::string& getDSMemberId() const;
 
   ClientProxyMembershipID(std::string dsName, std::string randString,
                           const std::string& hostname,
-                          const ACE_INET_Addr& address, uint32_t hostPort,
-                          const std::string& durableClientId,
+                          const boost::asio::ip::address& address,
+                          uint32_t hostPort, const std::string& durableClientId,
                           const std::chrono::seconds durableClientTimeOut =
                               std::chrono::seconds::zero());
 
-  // This constructor is only for testing and should not be used for any
-  // other purpose. See testEntriesMapForVersioning.cpp for more details
+  /**
+   * This constructor is only for testing and should not be used for any
+   * other purpose. See testEntriesMapForVersioning.cpp for more details
+   */
   ClientProxyMembershipID(const uint8_t* hostAddr, uint32_t hostAddrLen,
                           uint32_t hostPort, const char* dsname,
                           const char* uniqueTag, uint32_t vmViewId);
-  // ClientProxyMembershipID(const char *durableClientId = nullptr, const
-  // uint32_t durableClntTimeOut = 0);
+
   ClientProxyMembershipID();
+
   ~ClientProxyMembershipID() noexcept override;
-  static void increaseSynchCounter();
+
+  static void increaseSyncCounter();
+
   static std::shared_ptr<Serializable> createDeserializable() {
     return std::make_shared<ClientProxyMembershipID>();
   }
-  // Do an empty check on the returned value. Only use after handshake is done.
-  const std::string& getDSMemberIdForThinClientUse();
 
-  // Serializable interface:
+  const std::string& getClientId();
+
   void toData(DataOutput& output) const override;
+
   void fromData(DataInput& input) override;
-  DSFid getDSFID() const override { return DSFid::InternalDistributedMember; }
+
+  internal::DSFid getDSFID() const override {
+    return internal::DSFid::InternalDistributedMember;
+  }
+
   size_t objectSize() const override { return 0; }
 
-  void initHostAddressVector(const ACE_INET_Addr& address);
+  void initHostAddressVector(const boost::asio::ip::address& address);
 
   void initHostAddressVector(const uint8_t* hostAddr, uint32_t hostAddrLen);
 
@@ -84,53 +87,44 @@
                       int8_t splitBrainFlag, const char* dsname,
                       const char* uniqueTag, uint32_t vmViewId);
 
-  std::string getDSName() const { return m_dsname; }
-  std::string getUniqueTag() const { return m_uniqueTag; }
-  const std::vector<uint8_t>& getHostAddr() const { return m_hostAddr; }
+  std::string getDSName() const { return dsName_; }
+
+  std::string getUniqueTag() const { return uniqueTag_; }
+
+  const std::vector<uint8_t>& getHostAddr() const { return hostAddr_; }
+
   uint32_t getHostAddrLen() const {
-    return static_cast<uint32_t>(m_hostAddr.size());
+    return static_cast<uint32_t>(hostAddr_.size());
   }
-  uint32_t getHostPort() const { return m_hostPort; }
+
+  uint32_t getHostPort() const { return hostPort_; }
+
   std::string getHashKey() override;
+
   int16_t compareTo(const DSMemberForVersionStamp&) const override;
-  int32_t hashcode() const override {
-    uint32_t result = 0;
-    std::stringstream hostAddressString;
-    hostAddressString << std::hex;
-    for (uint32_t i = 0; i < getHostAddrLen(); i++) {
-      hostAddressString << ":" << static_cast<int>(m_hostAddr[i]);
-    }
-    result += internal::geode_hash<std::string>{}(hostAddressString.str());
-    result += m_hostPort;
-    return result;
-  }
+
+  int32_t hashcode() const override;
 
   bool operator==(const CacheableKey& other) const override {
     return (this->compareTo(
                 dynamic_cast<const DSMemberForVersionStamp&>(other)) == 0);
   }
 
-  Serializable* readEssentialData(DataInput& input);
+  void readEssentialData(DataInput& input);
 
  private:
-  std::string m_memIDStr;
-  std::string m_dsmemIDStr;
-  std::string clientID;
+  std::string memIdStr_;
+  std::string clientId_;
 
-  std::string m_dsname;
-  uint32_t m_hostPort;
-  std::vector<uint8_t> m_hostAddr;
+  std::string dsName_;
+  uint32_t hostPort_;
+  std::vector<uint8_t> hostAddr_;
 
-  std::string m_uniqueTag;
-  std::string m_hashKey;
-  uint32_t m_vmViewId;
-  static const uint8_t LONER_DM_TYPE = 13;
-  static const int VERSION_MASK;
-  static const int8_t TOKEN_ORDINAL;
+  std::string uniqueTag_;
+  std::string hashKey_;
+  uint32_t vmViewId_;
 
-  void readVersion(int flags, DataInput& input);
-  void writeVersion(int16_t ordinal, DataOutput& output);
-
+  void readVersion(int32_t flags, DataInput& input);
   void readAdditionalData(DataInput& input);
 };
 
diff --git a/cppcache/src/ClientProxyMembershipIDFactory.cpp b/cppcache/src/ClientProxyMembershipIDFactory.cpp
index 43f41cb..2840355 100644
--- a/cppcache/src/ClientProxyMembershipIDFactory.cpp
+++ b/cppcache/src/ClientProxyMembershipIDFactory.cpp
@@ -18,14 +18,16 @@
 #include "ClientProxyMembershipIDFactory.hpp"
 
 #include <algorithm>
-#include <iterator>
 #include <random>
 
-#include <boost/asio/ip/host_name.hpp>
+#include <boost/asio.hpp>
 #include <boost/process/environment.hpp>
 
+#include "ClientProxyMembershipID.hpp"
 #include "util/Log.hpp"
 
+namespace bip = boost::asio::ip;
+
 namespace apache {
 namespace geode {
 namespace client {
@@ -56,8 +58,13 @@
 std::unique_ptr<ClientProxyMembershipID> ClientProxyMembershipIDFactory::create(
     const std::string& durableClientId,
     const std::chrono::seconds durableClntTimeOut) {
-  const auto hostname = boost::asio::ip::host_name();
-  const ACE_INET_Addr address("", hostname.c_str(), "tcp");
+  auto hostname = bip::host_name();
+
+  boost::asio::io_service svc;
+  bip::tcp::resolver resolver{svc};
+  auto results = resolver.resolve(hostname, "0");
+  auto address = results->endpoint().address();
+
   return std::unique_ptr<ClientProxyMembershipID>(
       new ClientProxyMembershipID(dsName_, randString_, hostname, address, 0,
                                   durableClientId, durableClntTimeOut));
diff --git a/cppcache/src/ClientProxyMembershipIDFactory.hpp b/cppcache/src/ClientProxyMembershipIDFactory.hpp
index e97251d..26adbb9 100644
--- a/cppcache/src/ClientProxyMembershipIDFactory.hpp
+++ b/cppcache/src/ClientProxyMembershipIDFactory.hpp
@@ -20,14 +20,16 @@
 #ifndef GEODE_CLIENTPROXYMEMBERSHIPIDFACTORY_H_
 #define GEODE_CLIENTPROXYMEMBERSHIPIDFACTORY_H_
 
+#include <chrono>
+#include <memory>
 #include <string>
 
-#include "ClientProxyMembershipID.hpp"
-
 namespace apache {
 namespace geode {
 namespace client {
 
+class ClientProxyMembershipID;
+
 class ClientProxyMembershipIDFactory {
  public:
   explicit ClientProxyMembershipIDFactory(std::string dsName);
diff --git a/cppcache/src/ConcurrentEntriesMap.cpp b/cppcache/src/ConcurrentEntriesMap.cpp
index b1983f4..a9b17f8 100644
--- a/cppcache/src/ConcurrentEntriesMap.cpp
+++ b/cppcache/src/ConcurrentEntriesMap.cpp
@@ -14,6 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 #include "ConcurrentEntriesMap.hpp"
 
 #include <algorithm>
@@ -69,7 +70,7 @@
   m_size = 0;
 }
 
-ConcurrentEntriesMap::~ConcurrentEntriesMap() { delete[] m_segments; }
+ConcurrentEntriesMap::~ConcurrentEntriesMap() noexcept { delete[] m_segments; }
 
 GfErrType ConcurrentEntriesMap::create(
     const std::shared_ptr<CacheableKey>& key,
@@ -176,6 +177,8 @@
   }
 }
 
+bool ConcurrentEntriesMap::empty() const { return m_size == 0; }
+
 uint32_t ConcurrentEntriesMap::size() const { return m_size; }
 
 int ConcurrentEntriesMap::addTrackerForEntry(
diff --git a/cppcache/src/ConcurrentEntriesMap.hpp b/cppcache/src/ConcurrentEntriesMap.hpp
index 353d92e..18f09dd 100644
--- a/cppcache/src/ConcurrentEntriesMap.hpp
+++ b/cppcache/src/ConcurrentEntriesMap.hpp
@@ -19,6 +19,7 @@
 
 #ifndef GEODE_CONCURRENTENTRIESMAP_H_
 #define GEODE_CONCURRENTENTRIESMAP_H_
+
 #include <atomic>
 
 #include <geode/RegionEntry.hpp>
@@ -31,12 +32,13 @@
 namespace apache {
 namespace geode {
 namespace client {
+
 class RegionInternal;
 
 /**
  * @brief Concurrent entries map.
  */
-class APACHE_GEODE_EXPORT ConcurrentEntriesMap : public EntriesMap {
+class ConcurrentEntriesMap : public EntriesMap {
  protected:
   ExpiryTaskManager* m_expiryTaskManager;
   uint8_t m_concurrency;
@@ -45,14 +47,13 @@
   RegionInternal* m_region;
   std::atomic<int32_t> m_numDestroyTrackers;
   bool m_concurrencyChecksEnabled;
-  // TODO:  hashcode() is invoked 3-4 times -- need a better
-  // implementation (STLport hash_map?) that will invoke it only once
+
   /**
    * Return a reference to the segment for which the given key would
    * be stored.
    */
-  virtual MapSegment* segmentFor(
-      const std::shared_ptr<CacheableKey>& key) const {
+  MapSegment* segmentFor(
+      const std::shared_ptr<CacheableKey>& key) const override {
     return &(m_segments[segmentIdx(key)]);
   }
 
@@ -80,101 +81,105 @@
   /**
    * Initialize segments with proper EntryFactory.
    */
-  virtual void open(uint32_t initialCapacity);
+  void open(uint32_t initialCapacity) override;
 
-  virtual void close();
+  void close() override;
 
-  virtual ~ConcurrentEntriesMap();
+  ~ConcurrentEntriesMap() noexcept override;
 
-  virtual void clear();
+  void clear() override;
 
-  virtual GfErrType put(const std::shared_ptr<CacheableKey>& key,
-                        const std::shared_ptr<Cacheable>& newValue,
-                        std::shared_ptr<MapEntryImpl>& me,
-                        std::shared_ptr<Cacheable>& oldValue, int updateCount,
-                        int destroyTracker,
-                        std::shared_ptr<VersionTag> versionTag,
-                        bool& isUpdate = EntriesMap::boolVal,
-                        DataInput* delta = nullptr);
-  virtual GfErrType invalidate(const std::shared_ptr<CacheableKey>& key,
-                               std::shared_ptr<MapEntryImpl>& me,
-                               std::shared_ptr<Cacheable>& oldValue,
-                               std::shared_ptr<VersionTag> versionTag);
-  virtual GfErrType create(const std::shared_ptr<CacheableKey>& key,
-                           const std::shared_ptr<Cacheable>& newValue,
-                           std::shared_ptr<MapEntryImpl>& me,
-                           std::shared_ptr<Cacheable>& oldValue,
-                           int updateCount, int destroyTracker,
-                           std::shared_ptr<VersionTag> versionTag);
-  virtual bool get(const std::shared_ptr<CacheableKey>& key,
-                   std::shared_ptr<Cacheable>& value,
-                   std::shared_ptr<MapEntryImpl>& me);
+  GfErrType put(const std::shared_ptr<CacheableKey>& key,
+                const std::shared_ptr<Cacheable>& newValue,
+                std::shared_ptr<MapEntryImpl>& me,
+                std::shared_ptr<Cacheable>& oldValue, int updateCount,
+                int destroyTracker, std::shared_ptr<VersionTag> versionTag,
+                bool& isUpdate = EntriesMap::boolVal,
+                DataInput* delta = nullptr) override;
+  GfErrType invalidate(const std::shared_ptr<CacheableKey>& key,
+                       std::shared_ptr<MapEntryImpl>& me,
+                       std::shared_ptr<Cacheable>& oldValue,
+                       std::shared_ptr<VersionTag> versionTag) override;
+  GfErrType create(const std::shared_ptr<CacheableKey>& key,
+                   const std::shared_ptr<Cacheable>& newValue,
+                   std::shared_ptr<MapEntryImpl>& me,
+                   std::shared_ptr<Cacheable>& oldValue, int updateCount,
+                   int destroyTracker,
+                   std::shared_ptr<VersionTag> versionTag) override;
+  bool get(const std::shared_ptr<CacheableKey>& key,
+           std::shared_ptr<Cacheable>& value,
+           std::shared_ptr<MapEntryImpl>& me) override;
 
   /**
    * @brief get MapEntry for key.
    * TODO: return GfErrType like other methods
    */
-  virtual void getEntry(const std::shared_ptr<CacheableKey>& key,
-                        std::shared_ptr<MapEntryImpl>& result,
-                        std::shared_ptr<Cacheable>& value) const;
+  void getEntry(const std::shared_ptr<CacheableKey>& key,
+                std::shared_ptr<MapEntryImpl>& result,
+                std::shared_ptr<Cacheable>& value) const override;
 
   /**
    * @brief remove the entry for key from the map.
    */
-  virtual GfErrType remove(const std::shared_ptr<CacheableKey>& key,
-                           std::shared_ptr<Cacheable>& result,
-                           std::shared_ptr<MapEntryImpl>& me, int updateCount,
-                           std::shared_ptr<VersionTag> versionTag,
-                           bool afterRemote);
+  GfErrType remove(const std::shared_ptr<CacheableKey>& key,
+                   std::shared_ptr<Cacheable>& result,
+                   std::shared_ptr<MapEntryImpl>& me, int updateCount,
+                   std::shared_ptr<VersionTag> versionTag,
+                   bool afterRemote) override;
 
   /**
    * @brief return true if there exists an entry for the key.
    */
-  virtual bool containsKey(const std::shared_ptr<CacheableKey>& key) const;
+  bool containsKey(const std::shared_ptr<CacheableKey>& key) const override;
 
   /**
    * @brief return the all the keys in a list.
    */
-  virtual void getKeys(
-      std::vector<std::shared_ptr<CacheableKey>>& result) const;
+  void getKeys(
+      std::vector<std::shared_ptr<CacheableKey>>& result) const override;
 
   /**
    * @brief return all the entries in a list.
    */
-  virtual void getEntries(
-      std::vector<std::shared_ptr<RegionEntry>>& result) const;
+  void getEntries(
+      std::vector<std::shared_ptr<RegionEntry>>& result) const override;
 
   /**
    * @brief return all values in a list.
    */
-  virtual void getValues(std::vector<std::shared_ptr<Cacheable>>& result) const;
+  void getValues(
+      std::vector<std::shared_ptr<Cacheable>>& result) const override;
+
+  /**
+   * @brief return whether there are no entries.
+   */
+  bool empty() const override;
 
   /**
    * @brief return the number of entries in the map.
    */
-  virtual uint32_t size() const;
+  uint32_t size() const override;
 
-  virtual int addTrackerForEntry(const std::shared_ptr<CacheableKey>& key,
-                                 std::shared_ptr<Cacheable>& oldValue,
-                                 bool addIfAbsent, bool failIfPresent,
-                                 bool incUpdateCount);
+  int addTrackerForEntry(const std::shared_ptr<CacheableKey>& key,
+                         std::shared_ptr<Cacheable>& oldValue, bool addIfAbsent,
+                         bool failIfPresent, bool incUpdateCount) override;
 
-  virtual void removeTrackerForEntry(const std::shared_ptr<CacheableKey>& key);
+  void removeTrackerForEntry(const std::shared_ptr<CacheableKey>& key) override;
 
-  virtual int addTrackerForAllEntries(MapOfUpdateCounters& updateCounterMap,
-                                      bool addDestroyTracking);
+  int addTrackerForAllEntries(MapOfUpdateCounters& updateCounterMap,
+                              bool addDestroyTracking) override;
 
-  virtual void removeDestroyTracking();
-  virtual void reapTombstones(std::map<uint16_t, int64_t>& gcVersions);
+  void removeDestroyTracking() override;
+  void reapTombstones(std::map<uint16_t, int64_t>& gcVersions) override;
 
-  virtual void reapTombstones(std::shared_ptr<CacheableHashSet> removedKeys);
+  void reapTombstones(std::shared_ptr<CacheableHashSet> removedKeys) override;
 
   /**
    * for internal testing, returns if an entry is a tombstone
    */
-  virtual GfErrType isTombstone(std::shared_ptr<CacheableKey>& key,
-                                std::shared_ptr<MapEntryImpl>& me,
-                                bool& result);
+  GfErrType isTombstone(std::shared_ptr<CacheableKey>& key,
+                        std::shared_ptr<MapEntryImpl>& me,
+                        bool& result) override;
 
   /**
    * for internal testing, return the number of times any segment
@@ -182,6 +187,7 @@
    */
   uint32_t totalSegmentRehashes() const;
 };  // class EntriesMap
+
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/ConnectCounter.hpp b/cppcache/src/ConnectCounter.hpp
index 8925c0e..5d86800 100644
--- a/cppcache/src/ConnectCounter.hpp
+++ b/cppcache/src/ConnectCounter.hpp
@@ -26,7 +26,7 @@
 namespace geode {
 namespace client {
 
-class APACHE_GEODE_EXPORT ConnectCounter {
+class ConnectCounter {
  public:
   ConnectCounter();
 
diff --git a/cppcache/src/ConnectionQueue.hpp b/cppcache/src/ConnectionQueue.hpp
index 66a6efa..1467a0e 100644
--- a/cppcache/src/ConnectionQueue.hpp
+++ b/cppcache/src/ConnectionQueue.hpp
@@ -68,7 +68,7 @@
       }
       condition_.notify_one();
     }
-    if (delMp) {
+    if (delMp && mp) {
       mp->close();
       delete mp;
     }
diff --git a/cppcache/src/Connector.hpp b/cppcache/src/Connector.hpp
index b34285d..98ce3d4 100644
--- a/cppcache/src/Connector.hpp
+++ b/cppcache/src/Connector.hpp
@@ -39,8 +39,9 @@
 
 class Connector {
  public:
-  Connector() {}
-  virtual ~Connector() {}
+  Connector() = default;
+  virtual ~Connector() = default;
+
   Connector(const Connector &) = delete;
   Connector &operator=(const Connector &) = delete;
 
@@ -48,13 +49,16 @@
    * Reads <code>len</code> bytes of data and stores them into the buffer
    * array <code>b</code>. The number of bytes actually read is returned as an
    * integer.  This method blocks until <code>len</code> bytes of data is
-   * read, or an exception is thrown.
+   * read, the timer expires or an exception is thrown.
    *
    * <p> If <code>b</code> is <code>null</code>, or <code>len</code> is
    * less than or equal to <code>0</code> an
    * <code>IllegalArgumentException</code>
    * is thrown.
    *
+   * <p> If <code>len</code> bytes have not been read when the timeout
+   * expires a <code>TimeoutException</code> is thrown.
+   *
    * <p> If <code>len</code> bytes cannot be read for any reason, then an
    * <code>GeodeIOException</code> is thrown.
    *
@@ -63,45 +67,88 @@
    *
    * @param      b   the buffer into which the data is read.
    * @param      len   the number of bytes to read.
-   * @param      waitSeconds   the number of seconds to allow the read to
-   * complete.
+   * @param      timeout time to allow the read to complete.
    * @return     the total number of bytes read into the buffer, or
    *             <code>-1</code> if an error was encountered.
    * @exception  GeodeIOException, TimeoutException, IllegalArgumentException,
    * OutOfMemoryException.
    */
   virtual size_t receive(char *b, size_t len,
-                         std::chrono::microseconds waitSeconds) = 0;
+                         std::chrono::milliseconds timeout) = 0;
 
   /**
+   * Reads an undetermined number of bytes of data and stores them into the
+   * buffer array <code>b</code>. The number of bytes actually read is returned
+   * as an integer.  This method blocks until <code>len</code> bytes of data is
+   * read, the timeout expires or an exception is thrown.
+   *
+   * <p> If <code>b</code> is <code>null</code> an
+   * <code>IllegalArgumentException</code>
+   * is thrown.
+   *
+   * <p> The <code>read(b)</code> method for class <code>InputStream</code>
+   * has the same effect as: <pre><code> read(b, 0, b.length) </code></pre>
+   *
+   * @param      b   the buffer into which the data is read.
+   * @param      timeout time to allow the read to complete.
+   * @return     the total number of bytes read into the buffer, or
+   *             <code>-1</code> if an error was encountered.
+   * @exception  GeodeIOException, IllegalArgumentException,
+   * OutOfMemoryException.
+   */
+  virtual size_t receive_nothrowiftimeout(
+      char *b, size_t len, std::chrono::milliseconds timeout) = 0;
+  /**
    * Writes <code>len</code> bytes from the specified byte array
    * to the underlying output stream.
    *
    * @param      b     the data.
    * @param      len   the number of bytes to write.
-   * @param      waitSeconds   the number of seconds to allow the write to
-   * complete.
+   * @param      timeout time to allow the write to complete.
    * @return     the actual number of bytes written.
    * @exception  GeodeIOException, TimeoutException, IllegalArgumentException.
    */
   virtual size_t send(const char *b, size_t len,
-                      std::chrono::microseconds waitSeconds) = 0;
-
-  /**
-   * Initialises the connection.
-   */
-  virtual void init() = 0;
-
-  /**
-   * Closes the connection.
-   */
-  virtual void close() = 0;
+                      std::chrono::milliseconds timeout) = 0;
 
   /**
    * Returns local port for this TCP connection
    */
   virtual uint16_t getPort() = 0;
+
+  /**
+   * Writes an array of a known size to the underlying output stream.
+   *
+   * @param   array A C-style stack array. Be weary of arrays that have been
+   * decayed into pointers, they won't compile.
+   * @return  The number of bytes written. Don't get confused: this is not the
+   * number of elements in the array written.
+   * @exception GeodeIOException, TimeoutException
+   */
+  template <typename T, size_t size>
+  size_t send(const T (&array)[size], std::chrono::milliseconds timeout) {
+    return send(reinterpret_cast<const char *>(array), sizeof(T) * size,
+                timeout);
+  }
+
+  /**
+   * Reads an array of a known size from the underlying input stream. If the
+   * number of bytes read is not equal to the size of the array, no exception
+   * will be thrown.
+   *
+   * @param   array A C-style stack array. Be weary of arrays that have been
+   * decayed into pointers, they won't compile.
+   * @return  The number of bytes written. Don't get confused: this is not the
+   * number of elements in the array written.
+   * @exception GeodeIOException
+   */
+  template <typename T, size_t size>
+  size_t receive(T (&array)[size], std::chrono::milliseconds timeout) {
+    return receive_nothrowiftimeout(reinterpret_cast<char *>(array),
+                                    sizeof(T) * size, timeout);
+  }
 };
+
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/CppCacheLibrary.cpp b/cppcache/src/CppCacheLibrary.cpp
index 23ec0eb..58743a9 100644
--- a/cppcache/src/CppCacheLibrary.cpp
+++ b/cppcache/src/CppCacheLibrary.cpp
@@ -17,8 +17,7 @@
 
 #include "CppCacheLibrary.hpp"
 
-#include <ace/ACE.h>
-#include <ace/Init_ACE.h>
+#include <iostream>
 
 #include "Utils.hpp"
 
@@ -34,18 +33,15 @@
 namespace geode {
 namespace client {
 
-void CppCacheLibrary::initLib(void) { ACE::init(); }
+void CppCacheLibrary::initLib(void) {}
 
-void CppCacheLibrary::closeLib(void) {
-  // DO NOT CALL ACE::fini() HERE!
-  // Things might be using ace beyond the life of Geode.
-}
+void CppCacheLibrary::closeLib(void) {}
 
 std::string CppCacheLibrary::initProductLibDir() {
   // otherwise... get the DLL path, and work backwards from it.
-  char buffer[PATH_MAX + 1];
+  char buffer[4097];
   buffer[0] = '\0';
-  DllMainGetPath(buffer, PATH_MAX);
+  DllMainGetPath(buffer, 4096);
 
   std::string path(buffer);
 
@@ -76,10 +72,9 @@
   // otherwise... get the DLL path, and work backwards from it.
   auto productLibraryDirectoryName = getProductLibDir();
   if (productLibraryDirectoryName.empty()) {
-    fprintf(stderr,
-            "Cannot determine location of product directory.\n"
-            "Please set GEODE_NATIVE_HOME environment variable.\n");
-    fflush(stderr);
+    std::cerr << "Cannot determine location of product directory.\n"
+              << "Please set GEODE_NATIVE_HOME environment variable.\n"
+              << std::flush;
     throw apache::geode::client::IllegalStateException(
         "Product installation directory not found. Please set "
         "GEODE_NATIVE_HOME environment variable.");
diff --git a/cppcache/src/CqAttributesImpl.hpp b/cppcache/src/CqAttributesImpl.hpp
index 26e80f9..2a6743c 100644
--- a/cppcache/src/CqAttributesImpl.hpp
+++ b/cppcache/src/CqAttributesImpl.hpp
@@ -40,7 +40,7 @@
  *
  * For compatibility rules and default values, see {@link CqAttributesFactory}.
  */
-class APACHE_GEODE_EXPORT CqAttributesImpl : public CqAttributes {
+class CqAttributesImpl : public CqAttributes {
  public:
   ~CqAttributesImpl() noexcept override {}
 
diff --git a/cppcache/src/CqEventImpl.cpp b/cppcache/src/CqEventImpl.cpp
index ada5619..a7c1f23 100644
--- a/cppcache/src/CqEventImpl.cpp
+++ b/cppcache/src/CqEventImpl.cpp
@@ -19,6 +19,7 @@
 
 #include <geode/CacheableString.hpp>
 
+#include "CacheImpl.hpp"
 #include "TcrConnectionManager.hpp"
 #include "TcrMessage.hpp"
 #include "ThinClientCacheDistributionManager.hpp"
@@ -93,15 +94,12 @@
 bool CqEventImpl::getError() { return m_error; }
 
 std::string CqEventImpl::toString() {
-  char buffer[1024];
-  std::snprintf(
-      buffer, 1024,
-      "CqEvent CqName=%s; base operation=%d; cq operation= %d;key=%s;value=%s",
-      m_cQuery->getName().c_str(), static_cast<int>(m_baseOp),
-      static_cast<int>(m_queryOp), m_key->toString().c_str(),
-      m_newValue->toString().c_str());
-  return buffer;
+  return std::string("CqEvent CqName=") + m_cQuery->getName() +
+         "; base operation=" + std::to_string(static_cast<int>(m_baseOp)) +
+         "; cq operation=" + std::to_string(static_cast<int>(m_queryOp)) +
+         "; key=" + m_key->toString() + "; value=" + m_newValue->toString();
 }
+
 std::shared_ptr<CacheableBytes> CqEventImpl::getDeltaValue() const {
   return m_deltaValue;
 }
diff --git a/cppcache/src/CqEventImpl.hpp b/cppcache/src/CqEventImpl.hpp
index 2303ebd..571f4f8 100644
--- a/cppcache/src/CqEventImpl.hpp
+++ b/cppcache/src/CqEventImpl.hpp
@@ -45,46 +45,47 @@
 class EventId;
 class CqEventImpl : public CqEvent {
  public:
+  CqEventImpl() = delete;
   CqEventImpl(std::shared_ptr<CqQuery>& cQuery, CqOperation baseOp,
               CqOperation cqOp, std::shared_ptr<CacheableKey>& key,
               std::shared_ptr<Cacheable>& value, ThinClientBaseDM* tcrdm,
               std::shared_ptr<CacheableBytes> deltaBytes,
               std::shared_ptr<EventId> eventId);
+  ~CqEventImpl() override = default;
 
-  std::shared_ptr<CqQuery> getCq() const;
+  std::shared_ptr<CqQuery> getCq() const override;
 
   /**
    * Get the operation on the base region that triggered this event.
    */
-  CqOperation getBaseOperation() const;
+  CqOperation getBaseOperation() const override;
 
   /**
    * Get the the operation on the query results. Supported operations include
    * update, create, and destroy.
    */
-  CqOperation getQueryOperation() const;
+  CqOperation getQueryOperation() const override;
 
   /**
    * Get the key relating to the event.
    * @return Object key.
    */
-  std::shared_ptr<CacheableKey> getKey() const;
+  std::shared_ptr<CacheableKey> getKey() const override;
 
   /**
    * Get the new value of the modification.
    *  If there is no new value because this is a delete, then
    *  return null.
    */
-  std::shared_ptr<Cacheable> getNewValue() const;
+  std::shared_ptr<Cacheable> getNewValue() const override;
 
   bool getError();
 
   std::string toString();
 
-  std::shared_ptr<CacheableBytes> getDeltaValue() const;
+  std::shared_ptr<CacheableBytes> getDeltaValue() const override;
 
  private:
-  CqEventImpl();
   std::shared_ptr<CqQuery> m_cQuery;
   CqOperation m_baseOp;
   CqOperation m_queryOp;
diff --git a/cppcache/src/CqQueryImpl.cpp b/cppcache/src/CqQueryImpl.cpp
index eec3da4..89e1e9e 100644
--- a/cppcache/src/CqQueryImpl.cpp
+++ b/cppcache/src/CqQueryImpl.cpp
@@ -21,9 +21,11 @@
 #include <geode/CqAttributesMutator.hpp>
 #include <geode/ExceptionTypes.hpp>
 
+#include "CacheImpl.hpp"
 #include "ResultSetImpl.hpp"
 #include "StructSetImpl.hpp"
 #include "TcrConnectionManager.hpp"
+#include "ThinClientBaseDM.hpp"
 #include "ThinClientRegion.hpp"
 #include "UserAttributes.hpp"
 #include "util/Log.hpp"
@@ -38,7 +40,7 @@
     const std::shared_ptr<CqService>& cqService, const std::string& cqName,
     const std::string& queryString,
     const std::shared_ptr<CqAttributes>& cqAttributes,
-    StatisticsFactory* factory, const bool isDurable,
+    statistics::StatisticsFactory* factory, const bool isDurable,
     const std::shared_ptr<UserAttributes>& userAttributesPtr)
     : m_cqName(cqName),
       m_queryString(queryString),
@@ -123,14 +125,7 @@
 
   // Stat update.
   auto& stats = m_cqService->getCqServiceVsdStats();
-  /*
-  if (isRunning()) {
-      stats.decNumCqsActive();
-  }
-  else if (isStopped()) {
-      stats.decNumCqsStopped();
-  }
-  */
+
   setCqState(CqState::CLOSING);
   if (sendRequestToServer == true) {
     try {
diff --git a/cppcache/src/CqQueryVsdStats.cpp b/cppcache/src/CqQueryVsdStats.cpp
index 54840ab..b7bdfe6 100644
--- a/cppcache/src/CqQueryVsdStats.cpp
+++ b/cppcache/src/CqQueryVsdStats.cpp
@@ -62,7 +62,7 @@
   m_cqQueryVsdStats->setInt(m_numEventsId, 0);
 }
 
-CqQueryVsdStats::~CqQueryVsdStats() {
+CqQueryVsdStats::~CqQueryVsdStats() noexcept {
   if (m_cqQueryVsdStats != nullptr) {
     // Don't Delete, Already closed, Just set nullptr
     // delete m_CqQueryVsdStats;
diff --git a/cppcache/src/CqQueryVsdStats.hpp b/cppcache/src/CqQueryVsdStats.hpp
index 715862d..3dda95e 100644
--- a/cppcache/src/CqQueryVsdStats.hpp
+++ b/cppcache/src/CqQueryVsdStats.hpp
@@ -36,14 +36,14 @@
 using statistics::Statistics;
 using statistics::StatisticsType;
 
-class APACHE_GEODE_EXPORT CqQueryVsdStats : public CqStatistics {
+class CqQueryVsdStats : public CqStatistics {
  public:
   /** hold statistics for a cq. */
   CqQueryVsdStats(statistics::StatisticsFactory* factory,
                   const std::string& cqqueryName);
 
   /** disable stat collection for this item. */
-  virtual ~CqQueryVsdStats();
+  virtual ~CqQueryVsdStats() noexcept;
 
   void close() { m_cqQueryVsdStats->close(); }
 
@@ -55,16 +55,16 @@
 
   inline void incNumEvents() { m_cqQueryVsdStats->incInt(m_numEventsId, 1); }
 
-  inline uint32_t numInserts() const {
+  uint32_t numInserts() const override {
     return m_cqQueryVsdStats->getInt(m_numInsertsId);
   }
-  inline uint32_t numUpdates() const {
+  uint32_t numUpdates() const override {
     return m_cqQueryVsdStats->getInt(m_numUpdatesId);
   }
-  inline uint32_t numDeletes() const {
+  uint32_t numDeletes() const override {
     return m_cqQueryVsdStats->getInt(m_numDeletesId);
   }
-  inline uint32_t numEvents() const {
+  uint32_t numEvents() const override {
     return m_cqQueryVsdStats->getInt(m_numEventsId);
   }
 
diff --git a/cppcache/src/CqService.cpp b/cppcache/src/CqService.cpp
index 57403e9..af81045 100644
--- a/cppcache/src/CqService.cpp
+++ b/cppcache/src/CqService.cpp
@@ -24,10 +24,9 @@
 #include <geode/ExceptionTypes.hpp>
 #include <geode/SystemProperties.hpp>
 
+#include "CacheImpl.hpp"
 #include "CqEventImpl.hpp"
 #include "CqQueryImpl.hpp"
-#include "DistributedSystem.hpp"
-#include "ReadWriteLock.hpp"
 #include "TcrConnectionManager.hpp"
 #include "ThinClientPoolDM.hpp"
 #include "util/exception.hpp"
@@ -40,8 +39,10 @@
                      StatisticsFactory* statisticsFactory)
     : m_tccdm(tccdm),
       m_statisticsFactory(statisticsFactory),
-      m_notificationSema(1),
+      notification_semaphore_{1},
       m_stats(std::make_shared<CqServiceVsdStats>(m_statisticsFactory)) {
+  assert(nullptr != m_tccdm);
+
   m_running = true;
   LOGDEBUG("CqService Started");
 }
@@ -78,9 +79,9 @@
 
 bool CqService::checkAndAcquireLock() {
   if (m_running) {
-    m_notificationSema.acquire();
+    notification_semaphore_.acquire();
     if (m_running == false) {
-      m_notificationSema.release();
+      notification_semaphore_.release();
       return false;
     }
     return true;
@@ -99,7 +100,7 @@
 
   // Check if the subscription is enabled on the pool
   auto pool = dynamic_cast<ThinClientPoolDM*>(m_tccdm);
-  if (pool != nullptr && !pool->getSubscriptionEnabled()) {
+  if (pool && !pool->getSubscriptionEnabled()) {
     LOGERROR(
         "Cannot create CQ because subscription is not enabled on the pool.");
     throw IllegalStateException(
@@ -107,7 +108,7 @@
   }
 
   // check for durable client
-  if (isDurable) {
+  if (isDurable && m_tccdm) {
     auto&& durableID = m_tccdm->getConnectionManager()
                            .getCacheImpl()
                            ->getDistributedSystem()
@@ -174,7 +175,7 @@
  * Clears the CQ Query Map.
  */
 void CqService::clearCqQueryMap() {
-  Log::fine("Cleaning clearCqQueryMap.");
+  LOGFINE("Cleaning clearCqQueryMap.");
   m_cqQueryMap.clear();
 }
 
@@ -287,21 +288,22 @@
         cqName = cq->getName();
         cq->stop();
       } catch (QueryException& qe) {
-        Log::fine(("Failed to stop the CQ, CqName : " + cqName +
-                   " Error : " + qe.what())
-                      .c_str());
+        LOGFINE(("Failed to stop the CQ, CqName : " + cqName +
+                 " Error : " + qe.what())
+                    .c_str());
       } catch (CqClosedException& cce) {
-        Log::fine(("Failed to stop the CQ, CqName : " + cqName +
-                   " Error : " + cce.what())
-                      .c_str());
+        LOGFINE(("Failed to stop the CQ, CqName : " + cqName +
+                 " Error : " + cce.what())
+                    .c_str());
       }
     }
   }
 }
 
 void CqService::closeCqs(query_container_type& cqs) {
-  LOGDEBUG("closeCqs() TcrMessage::isKeepAlive() = %d ",
-           TcrMessage::isKeepAlive());
+  const auto keepAlive =
+      m_tccdm->getConnectionManager().getCacheImpl()->isKeepAlive();
+  LOGDEBUG("closeCqs() keepAlive = %d ", keepAlive);
   if (!cqs.empty()) {
     std::string cqName;
     for (auto& cq : cqs) {
@@ -310,19 +312,19 @@
         cqName = cqi->getName();
         LOGDEBUG("closeCqs() cqname = %s isDurable = %d ", cqName.c_str(),
                  cqi->isDurable());
-        if (!(cqi->isDurable() && TcrMessage::isKeepAlive())) {
+        if (!(cqi->isDurable() && keepAlive)) {
           cqi->close(true);
         } else {
           cqi->close(false);
         }
       } catch (QueryException& qe) {
-        Log::fine(("Failed to close the CQ, CqName : " + cqName +
-                   " Error : " + qe.what())
-                      .c_str());
+        LOGFINE(("Failed to close the CQ, CqName : " + cqName +
+                 " Error : " + qe.what())
+                    .c_str());
       } catch (CqClosedException& cce) {
-        Log::fine(("Failed to close the CQ, CqName : " + cqName +
-                   " Error : " + cce.what())
-                      .c_str());
+        LOGFINE(("Failed to close the CQ, CqName : " + cqName +
+                 " Error : " + cce.what())
+                    .c_str());
       }
     }
   }
@@ -343,17 +345,17 @@
 void CqService::closeCqService() {
   if (m_running) {
     m_running = false;
-    m_notificationSema.acquire();
+    notification_semaphore_.acquire();
     cleanup();
-    m_notificationSema.release();
+    notification_semaphore_.release();
   }
 }
 void CqService::closeAllCqs() {
-  Log::fine("closeAllCqs()");
+  LOGFINE("closeAllCqs()");
   query_container_type cqVec = getAllCqs();
-  Log::fine("closeAllCqs() 1");
+  LOGFINE("closeAllCqs() 1");
   auto&& lock = m_cqQueryMap.make_lock();
-  Log::fine("closeAllCqs() 2");
+  LOGFINE("closeAllCqs() 2");
   closeCqs(cqVec);
 }
 
@@ -361,7 +363,7 @@
  * Cleans up the CqService.
  */
 void CqService::cleanup() {
-  Log::fine("Cleaning up CqService.");
+  LOGFINE("Cleaning up CqService.");
 
   // Close All the CQs.
   // Need to take care when Clients are still connected...
@@ -381,11 +383,10 @@
 
   return m_cqQueryMap.find(cqName) != m_cqQueryMap.end();
 }
-void CqService::receiveNotification(TcrMessage* msg) {
-  invokeCqListeners(msg->getCqs(), msg->getMessageTypeForCq(), msg->getKey(),
-                    msg->getValue(), msg->getDeltaBytes(), msg->getEventId());
-  _GEODE_SAFE_DELETE(msg);
-  m_notificationSema.release();
+void CqService::receiveNotification(TcrMessage& msg) {
+  invokeCqListeners(msg.getCqs(), msg.getMessageTypeForCq(), msg.getKey(),
+                    msg.getValue(), msg.getDeltaBytes(), msg.getEventId());
+  notification_semaphore_.release();
 }
 
 /**
diff --git a/cppcache/src/CqService.hpp b/cppcache/src/CqService.hpp
index 5c243f9..a29a726 100644
--- a/cppcache/src/CqService.hpp
+++ b/cppcache/src/CqService.hpp
@@ -34,6 +34,7 @@
 #include "ErrType.hpp"
 #include "Queue.hpp"
 #include "TcrMessage.hpp"
+#include "util/concurrent/binary_semaphore.hpp"
 #include "util/synchronized_map.hpp"
 
 namespace apache {
@@ -49,11 +50,10 @@
  * Implements the CqService functionality.
  *
  */
-class APACHE_GEODE_EXPORT CqService
-    : public std::enable_shared_from_this<CqService> {
+class CqService : public std::enable_shared_from_this<CqService> {
   ThinClientBaseDM* m_tccdm;
   statistics::StatisticsFactory* m_statisticsFactory;
-  ACE_Semaphore m_notificationSema;
+  binary_semaphore notification_semaphore_;
 
   bool m_running;
   synchronized_map<std::unordered_map<std::string, std::shared_ptr<CqQuery>>,
@@ -75,7 +75,7 @@
 
   ThinClientBaseDM* getDM() { return m_tccdm; }
 
-  void receiveNotification(TcrMessage* msg);
+  void receiveNotification(TcrMessage& msg);
 
   /**
    * Returns the state of the cqService.
diff --git a/cppcache/src/CqServiceVsdStats.cpp b/cppcache/src/CqServiceVsdStats.cpp
index 397434b..6a623a2 100644
--- a/cppcache/src/CqServiceVsdStats.cpp
+++ b/cppcache/src/CqServiceVsdStats.cpp
@@ -68,7 +68,7 @@
   m_cqServiceVsdStats->setInt(m_numCqsStoppedId, 0);
 }
 
-CqServiceVsdStats::~CqServiceVsdStats() {
+CqServiceVsdStats::~CqServiceVsdStats() noexcept {
   if (m_cqServiceVsdStats != nullptr) {
     // Don't Delete, Already closed, Just set nullptr
     // delete m_CqServiceVsdStats;
diff --git a/cppcache/src/CqServiceVsdStats.hpp b/cppcache/src/CqServiceVsdStats.hpp
index 5272ff1..3b324c4 100644
--- a/cppcache/src/CqServiceVsdStats.hpp
+++ b/cppcache/src/CqServiceVsdStats.hpp
@@ -36,52 +36,47 @@
 using statistics::Statistics;
 using statistics::StatisticsType;
 
-class APACHE_GEODE_EXPORT CqServiceVsdStats : public CqServiceStatistics {
+class CqServiceVsdStats : public CqServiceStatistics {
  public:
   /** hold statistics for a cq. */
   explicit CqServiceVsdStats(statistics::StatisticsFactory* factory,
                              const std::string& cqName = "CqServiceVsdStats");
 
   /** disable stat collection for this item. */
-  virtual ~CqServiceVsdStats();
+  ~CqServiceVsdStats() noexcept override;
 
   void close() { m_cqServiceVsdStats->close(); }
-  inline void decNumCqsActive() {
-    m_cqServiceVsdStats->incInt(m_numCqsActiveId, -1);
-  }
 
   inline void incNumCqsActive() const {
     m_cqServiceVsdStats->incInt(m_numCqsActiveId, 1);
   }
-  inline uint32_t numCqsActive() const {
+  inline uint32_t numCqsActive() const override {
     return m_cqServiceVsdStats->getInt(m_numCqsActiveId);
   }
 
   inline void incNumCqsCreated() {
     m_cqServiceVsdStats->incInt(m_numCqsCreatedId, 1);
   }
-  inline uint32_t numCqsCreated() const {
+  inline uint32_t numCqsCreated() const override {
     return m_cqServiceVsdStats->getInt(m_numCqsCreatedId);
   }
 
-  inline uint32_t numCqsOnClient() const {
+  inline uint32_t numCqsOnClient() const override {
     return m_cqServiceVsdStats->getInt(m_numCqsOnClientId);
   }
 
   inline void incNumCqsClosed() {
     m_cqServiceVsdStats->incInt(m_numCqsClosedId, 1);
   }
-  inline uint32_t numCqsClosed() const {
+  inline uint32_t numCqsClosed() const override {
     return m_cqServiceVsdStats->getInt(m_numCqsClosedId);
   }
 
   inline void incNumCqsStopped() {
     m_cqServiceVsdStats->incInt(m_numCqsStoppedId, 1);
   }
-  inline void decNumCqsStopped() {
-    m_cqServiceVsdStats->incInt(m_numCqsStoppedId, -1);
-  }
-  inline uint32_t numCqsStopped() const {
+
+  inline uint32_t numCqsStopped() const override {
     return m_cqServiceVsdStats->getInt(m_numCqsStoppedId);
   }
 
@@ -93,10 +88,6 @@
     m_cqServiceVsdStats->setInt(m_numCqsOnClientId, value);
   }
 
-  inline void setNumCqsClosed(uint32_t value) {
-    m_cqServiceVsdStats->setInt(m_numCqsClosedId, value);
-  }
-
   inline void setNumCqsStopped(uint32_t value) {
     m_cqServiceVsdStats->setInt(m_numCqsStoppedId, value);
   }
diff --git a/cppcache/src/DataOutput.cpp b/cppcache/src/DataOutput.cpp
index 6b234ce..ea6a071 100644
--- a/cppcache/src/DataOutput.cpp
+++ b/cppcache/src/DataOutput.cpp
@@ -92,10 +92,7 @@
   static thread_local TSSDataOutput threadLocalBufferPool;
 };
 
-TSSDataOutput::TSSDataOutput() : m_buffers() {
-  m_buffers.reserve(10);
-  LOGDEBUG("DATAOUTPUT poolsize is %zu", m_buffers.size());
-}
+TSSDataOutput::TSSDataOutput() : m_buffers() { m_buffers.reserve(10); }
 
 TSSDataOutput::~TSSDataOutput() {
   while (!m_buffers.empty()) {
diff --git a/cppcache/src/DataOutputInternal.hpp b/cppcache/src/DataOutputInternal.hpp
index 35794a3..0ea0341 100644
--- a/cppcache/src/DataOutputInternal.hpp
+++ b/cppcache/src/DataOutputInternal.hpp
@@ -23,8 +23,6 @@
 #include <geode/DataOutput.hpp>
 #include <geode/PoolManager.hpp>  // TODO remove
 
-#include "CacheImpl.hpp"  // TODO remove
-
 namespace apache {
 namespace geode {
 namespace client {
diff --git a/cppcache/src/DistributedSystem.hpp b/cppcache/src/DistributedSystem.hpp
index a03ea6c..56d836c 100644
--- a/cppcache/src/DistributedSystem.hpp
+++ b/cppcache/src/DistributedSystem.hpp
@@ -48,9 +48,8 @@
 class SystemProperties;
 class DistributedSystemImpl;
 class CacheRegionHelper;
-class TcrConnection;
 
-class APACHE_GEODE_EXPORT DistributedSystem {
+class DistributedSystem {
   /**
    * @brief public methods
    */
@@ -108,7 +107,6 @@
 
   friend class CacheRegionHelper;
   friend class DistributedSystemImpl;
-  friend class TcrConnection;
 };
 }  // namespace client
 }  // namespace geode
diff --git a/cppcache/src/DistributedSystemImpl.cpp b/cppcache/src/DistributedSystemImpl.cpp
index ef9ebb8..a7338ed 100644
--- a/cppcache/src/DistributedSystemImpl.cpp
+++ b/cppcache/src/DistributedSystemImpl.cpp
@@ -17,6 +17,8 @@
 
 #include "DistributedSystemImpl.hpp"
 
+#include "Utils.hpp"
+
 #if defined(HAVE_PTHREAD_H)
 #include <pthread.h>
 #elif defined(_WIN32)
@@ -79,11 +81,8 @@
   LOGCONFIG("Source revision: %s", PRODUCT_SOURCE_REVISION);
   LOGCONFIG("Source repository: %s", PRODUCT_SOURCE_REPOSITORY);
 
-  ACE_utsname u;
-  ACE_OS::uname(&u);
-  LOGCONFIG(
-      "Running on: SystemName=%s Machine=%s Host=%s Release=%s Version=%s",
-      u.sysname, u.machine, u.nodename, u.release, u.version);
+  auto sysinfo = Utils::getSystemInfo();
+  LOGCONFIG("Running on: %s", sysinfo.c_str());
   LOGCONFIG("Current directory: %s",
             boost::filesystem::current_path().string().c_str());
   LOGCONFIG("Current value of PATH: %s", Utils::getEnv("PATH").c_str());
@@ -144,43 +143,6 @@
   }
 }
 
-void DistributedSystemImpl::setThreadName(const std::string& threadName) {
-  if (threadName.empty()) {
-    throw IllegalArgumentException("Thread name is empty.");
-  }
-
-#if defined(HAVE_pthread_setname_np)
-
-  pthread_setname_np(threadName.c_str());
-
-#elif defined(_WIN32)
-
-  const DWORD MS_VC_EXCEPTION = 0x406D1388;
-
-#pragma pack(push, 8)
-  typedef struct tagTHREADNAME_INFO {
-    DWORD dwType;      // Must be 0x1000.
-    LPCSTR szName;     // Pointer to name (in user addr space).
-    DWORD dwThreadID;  // Thread ID (-1=caller thread).
-    DWORD dwFlags;     // Reserved for future use, must be zero.
-  } THREADNAME_INFO;
-#pragma pack(pop)
-
-  THREADNAME_INFO info;
-  info.dwType = 0x1000;
-  info.szName = threadName.c_str();
-  info.dwThreadID = -1;
-  info.dwFlags = 0;
-
-  __try {
-    RaiseException(MS_VC_EXCEPTION, 0, sizeof(info) / sizeof(ULONG_PTR),
-                   (ULONG_PTR*)&info);
-  } __except (EXCEPTION_EXECUTE_HANDLER) {
-  }
-
-#endif
-}
-
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/DistributedSystemImpl.hpp b/cppcache/src/DistributedSystemImpl.hpp
index 457c9ea..88b661b 100644
--- a/cppcache/src/DistributedSystemImpl.hpp
+++ b/cppcache/src/DistributedSystemImpl.hpp
@@ -45,10 +45,8 @@
  * A "connection" to a Geode distributed system.
  * The connection will be through a (host, port) pair.
  */
-class APACHE_GEODE_EXPORT DistributedSystemImpl {
+class DistributedSystemImpl {
  public:
-  static void setThreadName(const std::string& threadName);
-
   /**
    * @brief destructor
    */
diff --git a/cppcache/src/EntriesMap.hpp b/cppcache/src/EntriesMap.hpp
index ee9500a..32fc39d 100644
--- a/cppcache/src/EntriesMap.hpp
+++ b/cppcache/src/EntriesMap.hpp
@@ -41,7 +41,7 @@
 /**
  * @brief Concurrent entries map. Not designed for subclassing...
  */
-class APACHE_GEODE_EXPORT EntriesMap {
+class EntriesMap {
  public:
   explicit EntriesMap(std::unique_ptr<EntryFactory> entryFactory)
       : m_entryFactory(std::move(entryFactory)) {}
@@ -126,6 +126,9 @@
   virtual void getValues(
       std::vector<std::shared_ptr<Cacheable>>& result) const = 0;
 
+  /** @brief return whether there are no entryies. */
+  virtual bool empty() const = 0;
+
   /** @brief return the number of entries in the map. */
   virtual uint32_t size() const = 0;
 
diff --git a/cppcache/src/EntriesMapFactory.cpp b/cppcache/src/EntriesMapFactory.cpp
index bd9edbe..6ff8165 100644
--- a/cppcache/src/EntriesMapFactory.cpp
+++ b/cppcache/src/EntriesMapFactory.cpp
@@ -17,14 +17,13 @@
 
 #include "EntriesMapFactory.hpp"
 
-#include <geode/Cache.hpp>
 #include <geode/DiskPolicyType.hpp>
+#include <geode/SystemProperties.hpp>
 
+#include "CacheImpl.hpp"
 #include "ExpMapEntry.hpp"
 #include "LRUEntriesMap.hpp"
 #include "LRUExpMapEntry.hpp"
-//#include <geode/ExpirationAction.hpp>
-#include <geode/SystemProperties.hpp>
 
 namespace apache {
 namespace geode {
diff --git a/cppcache/src/EntriesMapFactory.hpp b/cppcache/src/EntriesMapFactory.hpp
index 1f8893e..a3f86d9 100644
--- a/cppcache/src/EntriesMapFactory.hpp
+++ b/cppcache/src/EntriesMapFactory.hpp
@@ -29,7 +29,7 @@
 namespace geode {
 namespace client {
 
-class APACHE_GEODE_EXPORT EntriesMapFactory {
+class EntriesMapFactory {
  public:
   /** @brief used internally by Region implementation to create the appropriate
    * type of entries map.
diff --git a/cppcache/src/EntryExpiryHandler.cpp b/cppcache/src/EntryExpiryHandler.cpp
deleted file mode 100644
index 7b82dc6..0000000
--- a/cppcache/src/EntryExpiryHandler.cpp
+++ /dev/null
@@ -1,150 +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.
- */
-
-#include "EntryExpiryHandler.hpp"
-
-#include "CacheImpl.hpp"
-#include "ExpiryTaskManager.hpp"
-#include "RegionInternal.hpp"
-
-namespace apache {
-namespace geode {
-namespace client {
-
-EntryExpiryHandler::EntryExpiryHandler(std::shared_ptr<RegionInternal>& rptr,
-                                       std::shared_ptr<MapEntryImpl>& entryPtr,
-                                       ExpirationAction action,
-                                       std::chrono::seconds duration)
-    : m_regionPtr(rptr),
-      m_entryPtr(entryPtr),
-      m_action(action),
-      m_duration(duration) {}
-
-int EntryExpiryHandler::handle_timeout(const ACE_Time_Value& current_time,
-                                       const void*) {
-  std::shared_ptr<CacheableKey> key;
-  m_entryPtr->getKeyI(key);
-  ExpEntryProperties& expProps = m_entryPtr->getExpProperties();
-  try {
-    auto curr_time = std::chrono::system_clock::from_time_t(current_time.sec());
-
-    auto lastTimeForExp = expProps.getLastAccessTime();
-    if (m_regionPtr->getAttributes().getEntryTimeToLive() >
-        std::chrono::seconds::zero()) {
-      lastTimeForExp = expProps.getLastModifiedTime();
-    }
-
-    auto elapsed = curr_time - lastTimeForExp;
-
-    LOGDEBUG("Entered entry expiry task handler for key [%s] of region [%s]",
-             Utils::nullSafeToString(key).c_str(),
-             m_regionPtr->getFullPath().c_str());
-    if (elapsed >= m_duration) {
-      DoTheExpirationAction(key);
-    } else {
-      // reset the task after
-      // (lastAccessTime + entryExpiryDuration - curr_time) in seconds
-      auto remaining = m_duration - elapsed;
-      LOGDEBUG("Resetting expiry task for key [%s] of region [%s]",
-               Utils::nullSafeToString(key).c_str(),
-               m_regionPtr->getFullPath().c_str());
-      m_regionPtr->getCacheImpl()->getExpiryTaskManager().resetTask(
-          expProps.getExpiryTaskId(), remaining);
-      return 0;
-    }
-  } catch (...) {
-    // Ignore whatever exception comes
-  }
-  LOGDEBUG("Removing expiry task for key [%s] of region [%s]",
-           Utils::nullSafeToString(key).c_str(),
-           m_regionPtr->getFullPath().c_str());
-  m_regionPtr->getCacheImpl()->getExpiryTaskManager().resetTask(
-      expProps.getExpiryTaskId(), std::chrono::seconds::zero());
-  //  we now delete the handler in GF_Timer_Heap_ImmediateReset_T
-  // and always return success.
-
-  // set the invalid taskid as we have removed the expiry task
-  expProps.setExpiryTaskId(-1);
-  return 0;
-}
-
-int EntryExpiryHandler::handle_close(ACE_HANDLE, ACE_Reactor_Mask) {
-  delete this;
-  return 0;
-}
-
-inline void EntryExpiryHandler::DoTheExpirationAction(
-    const std::shared_ptr<CacheableKey>& key) {
-  // Pass a blank version tag.
-  std::shared_ptr<VersionTag> versionTag;
-  switch (m_action) {
-    case ExpirationAction::INVALIDATE: {
-      LOGDEBUG(
-          "EntryExpiryHandler::DoTheExpirationAction INVALIDATE "
-          "for region %s entry with key %s",
-          m_regionPtr->getFullPath().c_str(),
-          Utils::nullSafeToString(key).c_str());
-      m_regionPtr->invalidateNoThrow(key, nullptr, -1,
-                                     CacheEventFlags::EXPIRATION, versionTag);
-      break;
-    }
-    case ExpirationAction::LOCAL_INVALIDATE: {
-      LOGDEBUG(
-          "EntryExpiryHandler::DoTheExpirationAction LOCAL_INVALIDATE "
-          "for region %s entry with key %s",
-          m_regionPtr->getFullPath().c_str(),
-          Utils::nullSafeToString(key).c_str());
-      m_regionPtr->invalidateNoThrow(
-          key, nullptr, -1,
-          CacheEventFlags::EXPIRATION | CacheEventFlags::LOCAL, versionTag);
-      break;
-    }
-    case ExpirationAction::DESTROY: {
-      LOGDEBUG(
-          "EntryExpiryHandler::DoTheExpirationAction DESTROY "
-          "for region %s entry with key %s",
-          m_regionPtr->getFullPath().c_str(),
-          Utils::nullSafeToString(key).c_str());
-      m_regionPtr->destroyNoThrow(key, nullptr, -1, CacheEventFlags::EXPIRATION,
-                                  versionTag);
-      break;
-    }
-    case ExpirationAction::LOCAL_DESTROY: {
-      LOGDEBUG(
-          "EntryExpiryHandler::DoTheExpirationAction LOCAL_DESTROY "
-          "for region %s entry with key %s",
-          m_regionPtr->getFullPath().c_str(),
-          Utils::nullSafeToString(key).c_str());
-      m_regionPtr->destroyNoThrow(
-          key, nullptr, -1,
-          CacheEventFlags::EXPIRATION | CacheEventFlags::LOCAL, versionTag);
-      break;
-    }
-    case ExpirationAction::INVALID_ACTION: {
-      LOGERROR(
-          "Unknown expiration action "
-          "%d for region %s for key %s",
-          m_action, m_regionPtr->getFullPath().c_str(),
-          Utils::nullSafeToString(key).c_str());
-      break;
-    }
-  }
-}
-
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
diff --git a/cppcache/src/EntryExpiryHandler.hpp b/cppcache/src/EntryExpiryHandler.hpp
deleted file mode 100644
index 5af8a86..0000000
--- a/cppcache/src/EntryExpiryHandler.hpp
+++ /dev/null
@@ -1,82 +0,0 @@
-#pragma once
-
-#ifndef GEODE_ENTRYEXPIRYHANDLER_H_
-#define GEODE_ENTRYEXPIRYHANDLER_H_
-
-/*
- * 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.
- */
-
-#include <geode/Cache.hpp>
-#include <geode/ExpirationAction.hpp>
-#include <geode/Region.hpp>
-#include <geode/internal/geode_globals.hpp>
-
-#include "ExpMapEntry.hpp"
-#include "RegionInternal.hpp"
-
-/**
- * @file
- */
-
-namespace apache {
-namespace geode {
-namespace client {
-/**
- * @class EntryExpiryTask EntryExpiryTask.hpp
- *
- * The task object which contains the handler which gets triggered
- * when an entry expires.
- *
- * TODO: TODO: cleanup region entry nodes and handlers from expiry task
- * manager when region is destroyed
- */
-class APACHE_GEODE_EXPORT EntryExpiryHandler : public ACE_Event_Handler {
- public:
-  /**
-   * Constructor
-   */
-  EntryExpiryHandler(std::shared_ptr<RegionInternal>& rptr,
-                     std::shared_ptr<MapEntryImpl>& entryPtr,
-                     ExpirationAction action, std::chrono::seconds duration);
-
-  /** This task object will be registered with the Timer Queue.
-   *  When the timer expires the handle_timeout is invoked.
-   */
-  int handle_timeout(const ACE_Time_Value& current_time, const void* arg);
-  /**
-   * This is called when the task object needs to be cleaned up..
-   */
-  int handle_close(ACE_HANDLE handle, ACE_Reactor_Mask close_mask);
-
- private:
-  // The region which contains the entry
-  std::shared_ptr<RegionInternal> m_regionPtr;
-  // The ExpMapEntry contained in the ConcurrentMap against the key.
-  std::shared_ptr<MapEntryImpl> m_entryPtr;
-  // Action to be taken on expiry
-  ExpirationAction m_action;
-  // Duration after which the task should be reset in case of
-  // modification.
-  std::chrono::seconds m_duration;
-  // perform the actual expiration action
-  void DoTheExpirationAction(const std::shared_ptr<CacheableKey>& key);
-};
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_ENTRYEXPIRYHANDLER_H_
diff --git a/cppcache/src/EntryExpiryTask.cpp b/cppcache/src/EntryExpiryTask.cpp
new file mode 100644
index 0000000..f824cbd
--- /dev/null
+++ b/cppcache/src/EntryExpiryTask.cpp
@@ -0,0 +1,124 @@
+/*
+ * 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.
+ */
+
+#include "EntryExpiryTask.hpp"
+
+#include "CacheImpl.hpp"
+#include "RegionInternal.hpp"
+#include "Utils.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
+EntryExpiryTask::EntryExpiryTask(ExpiryTaskManager& manager,
+                                 std::shared_ptr<RegionInternal> region,
+                                 std::shared_ptr<MapEntryImpl> entry,
+                                 ExpirationAction action,
+                                 const duration_t& duration)
+    : ExpiryTask(manager),
+      duration_(duration),
+      action_(action),
+      entry_(entry),
+      region_(region) {}
+
+EntryExpiryTask::time_point_t EntryExpiryTask::expire_at() const {
+  auto& properties = entry_->getExpProperties();
+  auto last_time = properties.last_accessed();
+  if (region_->getAttributes().getEntryTimeToLive() >
+      std::chrono::seconds::zero()) {
+    last_time = properties.last_modified();
+  }
+
+  return last_time + duration_;
+}
+
+bool EntryExpiryTask::on_expire() {
+  auto tp = expire_at();
+  if (tp > ExpiryTask::clock_t::now()) {
+    // Entry expiration needs to be re-scheduled as it was accessed/modified
+    // since the last time the expiration task was (re-)scheduled.
+    // This is the best approach, rather than re-scheduling the task each time
+    // the entry is accessed/modified, as access/modify is a more frequent
+    // event than expiration.
+    reset(tp);
+    return false;
+  }
+
+  // Pass a blank version tag.
+  std::shared_ptr<CacheableKey> key;
+  std::shared_ptr<VersionTag> versionTag;
+
+  entry_->getKeyI(key);
+
+  const auto& full_path = region_->getFullPath();
+  auto key_str = Utils::nullSafeToString(key);
+
+  switch (action_) {
+    case ExpirationAction::INVALIDATE: {
+      LOGDEBUG(
+          "EntryExpiryTask::DoTheExpirationAction INVALIDATE "
+          "for region " +
+          full_path + " entry with key " + key_str);
+      region_->invalidateNoThrow(key, nullptr, -1, CacheEventFlags::EXPIRATION,
+                                 versionTag);
+      break;
+    }
+    case ExpirationAction::LOCAL_INVALIDATE: {
+      LOGDEBUG(
+          "EntryExpiryTask::DoTheExpirationAction LOCAL_INVALIDATE "
+          "for region " +
+          full_path + " entry with key " + key_str);
+      region_->invalidateNoThrow(
+          key, nullptr, -1,
+          CacheEventFlags::EXPIRATION | CacheEventFlags::LOCAL, versionTag);
+      break;
+    }
+    case ExpirationAction::DESTROY: {
+      LOGDEBUG(
+          "EntryExpiryTask::DoTheExpirationAction DESTROY "
+          "for region " +
+          full_path + " entry with key " + key_str);
+      region_->destroyNoThrow(key, nullptr, -1, CacheEventFlags::EXPIRATION,
+                              versionTag);
+      break;
+    }
+    case ExpirationAction::LOCAL_DESTROY: {
+      LOGDEBUG(
+          "EntryExpiryTask::DoTheExpirationAction LOCAL_DESTROY "
+          "for region " +
+          full_path + " entry with key " + key_str);
+      region_->destroyNoThrow(
+          key, nullptr, -1,
+          CacheEventFlags::EXPIRATION | CacheEventFlags::LOCAL, versionTag);
+      break;
+    }
+    case ExpirationAction::INVALID_ACTION: {
+      LOGERROR(
+          "Unknown expiration action "
+          "%d for region %s for key %s",
+          action_, full_path.c_str(), key_str.c_str());
+      break;
+    }
+  }
+
+  return true;
+}
+
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
diff --git a/cppcache/src/EntryExpiryTask.hpp b/cppcache/src/EntryExpiryTask.hpp
new file mode 100644
index 0000000..8d2bbc4
--- /dev/null
+++ b/cppcache/src/EntryExpiryTask.hpp
@@ -0,0 +1,69 @@
+#pragma once
+
+#ifndef GEODE_ENTRYEXPIRYTASK_H_
+#define GEODE_ENTRYEXPIRYTASK_H_
+
+/*
+ * 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.
+ */
+
+#include <geode/Cache.hpp>
+#include <geode/ExpirationAction.hpp>
+#include <geode/Region.hpp>
+#include <geode/internal/geode_globals.hpp>
+
+#include "ExpMapEntry.hpp"
+#include "ExpiryTask.hpp"
+#include "RegionInternal.hpp"
+
+/**
+ * @file
+ */
+
+namespace apache {
+namespace geode {
+namespace client {
+/**
+ * @class EntryExpiryTask EntryExpiryTask.hpp
+ *
+ * The task object which contains the handler which gets triggered
+ * when an entry expires.
+ */
+class EntryExpiryTask : public ExpiryTask {
+ public:
+  /**
+   * Constructor
+   */
+  EntryExpiryTask(ExpiryTaskManager& manager,
+                  std::shared_ptr<RegionInternal> region,
+                  std::shared_ptr<MapEntryImpl> entry, ExpirationAction action,
+                  const duration_t& duration);
+
+ protected:
+  bool on_expire() override;
+  time_point_t expire_at() const;
+
+ private:
+  duration_t duration_;
+  ExpirationAction action_;
+  std::shared_ptr<MapEntryImpl> entry_;
+  std::shared_ptr<RegionInternal> region_;
+};
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+#endif  // GEODE_ENTRYEXPIRYTASK_H_
diff --git a/cppcache/src/EnumInfo.hpp b/cppcache/src/EnumInfo.hpp
index dd7f17b..340619d 100644
--- a/cppcache/src/EnumInfo.hpp
+++ b/cppcache/src/EnumInfo.hpp
@@ -32,9 +32,8 @@
 using internal::DataSerializableFixedId_t;
 using internal::DSFid;
 
-class APACHE_GEODE_EXPORT EnumInfo
-    : public DataSerializableFixedId_t<DSFid::EnumInfo>,
-      public CacheableKey {
+class EnumInfo : public DataSerializableFixedId_t<DSFid::EnumInfo>,
+                 public CacheableKey {
  private:
   std::shared_ptr<CacheableString> m_enumClassName;
   std::shared_ptr<CacheableString> m_enumName;
diff --git a/cppcache/src/EventId.cpp b/cppcache/src/EventId.cpp
index a6db548..b0a0844 100644
--- a/cppcache/src/EventId.cpp
+++ b/cppcache/src/EventId.cpp
@@ -17,82 +17,97 @@
 #include "EventId.hpp"
 
 #include <atomic>
+#include <cstdint>
 #include <cstring>
 
 #include <geode/DataInput.hpp>
 
-#include "ClientProxyMembershipID.hpp"
+#include "Utils.hpp"
+#include "util/Log.hpp"
 
 namespace apache {
 namespace geode {
 namespace client {
 
-class EventIdTSS {
- private:
-  static std::atomic<int64_t> s_eidThrId;
-
-  int64_t m_eidThrTSS;
-  int64_t m_eidSeqTSS;
-
-  ~EventIdTSS() = default;
-  EventIdTSS(const EventIdTSS&) = delete;
-  EventIdTSS& operator=(const EventIdTSS&) = delete;
-
+class ThreadIdCounter {
  public:
-  // this should get called just once per thread due to first access to TSS
-  EventIdTSS() {
-    m_eidThrTSS = ++s_eidThrId;
-    m_eidSeqTSS = 0;
+  static std::atomic<int64_t>& instance() {
+    static std::atomic<int64_t> threadId_(0);
+    return threadId_;
   }
 
-  inline int64_t getEidThr() { return m_eidThrTSS; }
+  static int64_t next() { return ++instance(); }
+};
 
-  inline int64_t getAndIncEidSeq() { return m_eidSeqTSS++; }
+class EventIdTSS {
+ public:
+  static EventIdTSS& instance() {
+    thread_local EventIdTSS eventId_;
+    return eventId_;
+  }
 
-  inline int64_t getSeqNum() { return m_eidSeqTSS - 1; }
+  int64_t nextSequenceId() {
+    sequenceId_++;
+    return sequenceId_;
+  }
 
-  static thread_local EventIdTSS s_eventId;
+  int64_t currentSequenceId() { return sequenceId_; }
 
-};  // class EventIdTSS
+  int64_t threadId() { return threadId_; }
 
-std::atomic<int64_t> EventIdTSS::s_eidThrId;
-thread_local EventIdTSS EventIdTSS::s_eventId;
+ private:
+  EventIdTSS();
+
+  int64_t threadId_;
+  int64_t sequenceId_;
+};
+
+EventIdTSS::EventIdTSS() : threadId_(ThreadIdCounter::next()), sequenceId_(0) {
+  LOGDEBUG("EventIdTSS::EventIdTSS(%p): threadId_=%" PRId64
+           ", sequenceId_=%" PRId64,
+           this, threadId_, sequenceId_);
+}
 
 void EventId::toData(DataOutput& output) const {
   //  This method is always expected to write out nonstatic distributed
-  //  memberid.
-  output.writeBytes(reinterpret_cast<const int8_t*>(m_eidMem), m_eidMemLen);
+  //  memberid.  Note that binary representation of EventId is NOT THE
+  //  SAME here as when serialized into part of a message (via the writeIdsData
+  //  method).
+  LOGDEBUG("EventId::toData(%p) - called", this);
+  output.writeBytes(reinterpret_cast<const int8_t*>(clientId_),
+                    clientIdLength_);
   output.writeArrayLen(18);
   char longCode = 3;
   output.write(static_cast<uint8_t>(longCode));
-  output.writeInt(m_eidThr);
+  output.writeInt(threadId_);
   output.write(static_cast<uint8_t>(longCode));
-  output.writeInt(m_eidSeq);
-  output.writeInt(m_bucketId);
-  output.write(m_breadcrumbCounter);
+  output.writeInt(sequenceId_);
+  output.writeInt(bucketId_);
+  output.write(breadcrumbCounter_);
 }
 
 void EventId::fromData(DataInput& input) {
-  // TODO: statics being assigned; not thread-safe??
-  m_eidMemLen = input.readArrayLength();
-  input.readBytesOnly(reinterpret_cast<int8_t*>(m_eidMem), m_eidMemLen);
-  input.readArrayLength();  // ignore arrayLen
-  m_eidThr = getEventIdData(input, input.read());
-  m_eidSeq = getEventIdData(input, input.read());
-  m_bucketId = input.readInt32();
-  m_breadcrumbCounter = input.read();
+  LOGDEBUG("EventId::fromData(%p) - called", this);
+  clientIdLength_ = input.readArrayLength();
+  input.readBytesOnly(reinterpret_cast<int8_t*>(clientId_), clientIdLength_);
+  input.readArrayLength();
+  threadId_ = getEventIdData(input, input.read());
+  sequenceId_ = getEventIdData(input, input.read());
+  bucketId_ = input.readInt32();
+  breadcrumbCounter_ = input.read();
 }
 
-const char* EventId::getMemId() const { return m_eidMem; }
+const char* EventId::clientId() const { return clientId_; }
 
-int32_t EventId::getMemIdLen() const { return m_eidMemLen; }
+int32_t EventId::clientIdLength() const { return clientIdLength_; }
 
-int64_t EventId::getThrId() const { return m_eidThr; }
+int64_t EventId::threadId() const { return threadId_; }
 
-int64_t EventId::getSeqNum() const { return m_eidSeq; }
+int64_t EventId::sequenceNumber() const { return sequenceId_; }
 
 int64_t EventId::getEventIdData(DataInput& input, char numberCode) {
   int64_t retVal = 0;
+  LOGDEBUG("EventId::getEventIdData(%p) - called", this);
 
   //  Read number based on numeric code written by java server.
   if (numberCode == 0) {
@@ -113,19 +128,24 @@
 }
 
 std::shared_ptr<Serializable> EventId::createDeserializable() {
-  return std::make_shared<EventId>(false);
+  LOGDEBUG("EventId::createDeserializable - called");
   // use false since we dont want to inc sequence
   // (for de-serialization)
+  return std::make_shared<EventId>(false);
 }
 
 EventId::EventId(char* memId, uint32_t memIdLen, int64_t thr, int64_t seq) {
+  LOGDEBUG("EventId::EventId(%p) - memId=%s, memIdLen=%d, thr=%" PRId64
+           ", seq=%" PRId64,
+           this, Utils::convertBytesToString(memId, memIdLen).c_str(), memIdLen,
+           thr, seq);
   // TODO: statics being assigned; not thread-safe??
-  std::memcpy(m_eidMem, memId, memIdLen);
-  m_eidMemLen = memIdLen;
-  m_eidThr = thr;
-  m_eidSeq = seq;
-  m_bucketId = -1;
-  m_breadcrumbCounter = 0;
+  std::memcpy(clientId_, memId, memIdLen);
+  clientIdLength_ = memIdLen;
+  threadId_ = thr;
+  sequenceId_ = seq;
+  bucketId_ = -1;
+  breadcrumbCounter_ = 0;
 }
 
 EventId::EventId(bool doInit, uint32_t reserveSize,
@@ -133,11 +153,16 @@
     : /* adongre
        * CID 28934: Uninitialized scalar field (UNINIT_CTOR)
        */
-      m_eidMemLen(0),
-      m_eidThr(0),
-      m_eidSeq(0),
-      m_bucketId(-1),
-      m_breadcrumbCounter(0) {
+      clientIdLength_(0),
+      threadId_(0),
+      sequenceId_(0),
+      bucketId_(-1),
+      breadcrumbCounter_(0) {
+  LOGDEBUG(
+      "EventId::EventId(%p) - doInit=%s, reserveSize=%d, "
+      "fullValueAfterDeltaFail=%s",
+      this, doInit ? "true" : "false", reserveSize,
+      fullValueAfterDeltaFail ? "true" : "false");
   if (!doInit) return;
 
   if (fullValueAfterDeltaFail) {
@@ -148,18 +173,24 @@
   }
 
   for (uint32_t i = 0; i < reserveSize; i++) {
-    EventIdTSS::s_eventId.getAndIncEidSeq();
+    EventIdTSS::instance().nextSequenceId();
   }
 }
 
 void EventId::initFromTSS() {
-  m_eidThr = EventIdTSS::s_eventId.getEidThr();
-  m_eidSeq = EventIdTSS::s_eventId.getAndIncEidSeq();
+  threadId_ = EventIdTSS::instance().threadId();
+  sequenceId_ = EventIdTSS::instance().nextSequenceId();
+  LOGDEBUG("EventId::initFromTSS(%p) - called, tid=%" PRId64 ", seqid=%" PRId64,
+           this, threadId_, sequenceId_);
 }
 
 void EventId::initFromTSS_SameThreadIdAndSameSequenceId() {
-  m_eidThr = EventIdTSS::s_eventId.getEidThr();
-  m_eidSeq = EventIdTSS::s_eventId.getSeqNum();
+  threadId_ = EventIdTSS::instance().threadId();
+  sequenceId_ = EventIdTSS::instance().currentSequenceId();
+  LOGDEBUG(
+      "EventId::initFromTSS_SameThreadIdAndSameSequenceId(%p) - called, "
+      "tid=%" PRId64 ", seqid=%" PRId64,
+      this, threadId_, sequenceId_);
 }
 
 }  // namespace client
diff --git a/cppcache/src/EventId.hpp b/cppcache/src/EventId.hpp
index 19828e7..9042424 100644
--- a/cppcache/src/EventId.hpp
+++ b/cppcache/src/EventId.hpp
@@ -20,12 +20,16 @@
 #ifndef GEODE_EVENTID_H_
 #define GEODE_EVENTID_H_
 
+#include <inttypes.h>
+
 #include <string>
 
 #include <geode/DataOutput.hpp>
 #include <geode/internal/DataSerializableFixedId.hpp>
 #include <geode/internal/geode_globals.hpp>
 
+#include "util/Log.hpp"
+
 /** @file
  */
 
@@ -39,24 +43,23 @@
  * EventID "token" with a Distributed Member ID, Thread ID and per-thread
  * Sequence ID
  */
-class APACHE_GEODE_EXPORT EventId
-    : public internal::DataSerializableFixedId_t<DSFid::EventId> {
+class EventId : public internal::DataSerializableFixedId_t<DSFid::EventId> {
  private:
-  char m_eidMem[512];
-  int32_t m_eidMemLen;
-  int64_t m_eidThr;
-  int64_t m_eidSeq;
-  int32_t m_bucketId;
-  int8_t m_breadcrumbCounter;
+  char clientId_[512];
+  int32_t clientIdLength_;
+  int64_t threadId_;
+  int64_t sequenceId_;
+  int32_t bucketId_;
+  int8_t breadcrumbCounter_;
 
  public:
   /**
    *@brief Accessor methods
    **/
-  const char* getMemId() const;
-  int32_t getMemIdLen() const;
-  int64_t getThrId() const;
-  int64_t getSeqNum() const;
+  const char* clientId() const;
+  int32_t clientIdLength() const;
+  int64_t threadId() const;
+  int64_t sequenceNumber() const;
 
   void toData(DataOutput& output) const override;
 
@@ -96,9 +99,11 @@
     output.write(static_cast<uint8_t>(0));
     char longCode = 3;
     output.write(static_cast<uint8_t>(longCode));
-    output.writeInt(m_eidThr);
+    output.writeInt(threadId_);
     output.write(static_cast<uint8_t>(longCode));
-    output.writeInt(m_eidSeq);
+    output.writeInt(sequenceId_);
+    LOGDEBUG("%s(%p): Wrote tid=%" PRId64 ", seqid=%" PRId64, __FUNCTION__,
+             this, threadId_, sequenceId_);
   }
 
   /** Constructor, given the values. */
diff --git a/cppcache/src/EventIdMap.cpp b/cppcache/src/EventIdMap.cpp
index 6fe069e..ec83b84 100644
--- a/cppcache/src/EventIdMap.cpp
+++ b/cppcache/src/EventIdMap.cpp
@@ -35,8 +35,8 @@
 
 EventIdMapEntry EventIdMap::make(std::shared_ptr<EventId> eventid) {
   auto sid = std::make_shared<EventSource>(
-      eventid->getMemId(), eventid->getMemIdLen(), eventid->getThrId());
-  auto seq = std::make_shared<EventSequence>(eventid->getSeqNum());
+      eventid->clientId(), eventid->clientIdLength(), eventid->threadId());
+  auto seq = std::make_shared<EventSequence>(eventid->sequenceNumber());
   return std::make_pair(sid, seq);
 }
 
diff --git a/cppcache/src/EventIdMap.hpp b/cppcache/src/EventIdMap.hpp
index ed9b848..0d83dbc 100644
--- a/cppcache/src/EventIdMap.hpp
+++ b/cppcache/src/EventIdMap.hpp
@@ -50,7 +50,7 @@
  * provides the operations for duplicate checking and
  * expiry of idle event IDs from notifications.
  */
-class APACHE_GEODE_EXPORT EventIdMap {
+class EventIdMap {
  private:
   typedef std::unordered_map<std::shared_ptr<EventSource>,
                              std::shared_ptr<EventSequence>,
@@ -127,7 +127,7 @@
  * EventSequence is the combination of SequenceNum from EventId, a timestamp and
  * a flag indicating whether or not it is ACKed
  */
-class APACHE_GEODE_EXPORT EventSequence {
+class EventSequence {
  public:
   using clock = std::chrono::steady_clock;
   using time_point = clock::time_point;
diff --git a/cppcache/src/EventSource.hpp b/cppcache/src/EventSource.hpp
index 6fffe15..7cddd6b 100644
--- a/cppcache/src/EventSource.hpp
+++ b/cppcache/src/EventSource.hpp
@@ -31,7 +31,7 @@
  *
  * EventSource is the combination of MembershipId and ThreadId from the EventId
  */
-class APACHE_GEODE_EXPORT EventSource {
+class EventSource {
   char *m_srcId;
   int32_t m_srcIdLen;
   int64_t m_thrId;
diff --git a/cppcache/src/EvictionController.cpp b/cppcache/src/EvictionController.cpp
index 60c6646..6d9158c 100644
--- a/cppcache/src/EvictionController.cpp
+++ b/cppcache/src/EvictionController.cpp
@@ -28,7 +28,6 @@
 #include "util/Log.hpp"
 
 namespace {
-const char* const NC_EC_Thread = "NC EC Thread";
 const std::chrono::seconds EVICTION_TIMEOUT{1};
 }  // namespace
 
@@ -65,7 +64,7 @@
 
 void EvictionController::svc() {
   std::mutex mutex;
-  DistributedSystemImpl::setThreadName(NC_EC_Thread);
+  Log::setThreadName("NC EC Thread");
 
   while (running_) {
     {
diff --git a/cppcache/src/ExceptionTypes.cpp b/cppcache/src/ExceptionTypes.cpp
index 213e2f5..252a0ee 100644
--- a/cppcache/src/ExceptionTypes.cpp
+++ b/cppcache/src/ExceptionTypes.cpp
@@ -73,8 +73,8 @@
   throw NotConnectedException{message};
 }
 
-    [[noreturn]] void messageException(std::string message, std::string& exMsg,
-                                       GfErrType, std::string) {
+[[noreturn]] void messageException(std::string message, std::string& exMsg,
+                                   GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg
                                 : ": message from server could not be handled");
   throw MessageException{message};
@@ -93,8 +93,8 @@
   throw CacheServerException{message};
 }
 
-    [[noreturn]] void notOwnerException(std::string message, std::string& exMsg,
-                                        GfErrType, std::string) {
+[[noreturn]] void notOwnerException(std::string message, std::string& exMsg,
+                                    GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg : ": not own the lock");
   throw NotOwnerException{message};
 }
@@ -110,9 +110,9 @@
   throw IllegalStateException{message};
 }
 
-    [[noreturn]] void illegalArgumentException(std::string message,
-                                               std::string& exMsg,
-                                               GfErrType err, std::string) {
+[[noreturn]] void illegalArgumentException(std::string message,
+                                           std::string& exMsg, GfErrType err,
+                                           std::string) {
   if (err == GF_CACHE_ILLEGAL_ARGUMENT_EXCEPTION) {
     message.append(!exMsg.empty() ? exMsg : ": illegal argument");
   }
@@ -140,9 +140,8 @@
   throw CacheWriterException{message};
 }
 
-    [[noreturn]] void cacheLoaderException(std::string message,
-                                           std::string& exMsg, GfErrType,
-                                           std::string) {
+[[noreturn]] void cacheLoaderException(std::string message, std::string& exMsg,
+                                       GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg : ": exception in CacheLoader");
   throw CacheLoaderException{message};
 }
@@ -154,9 +153,9 @@
   throw CacheListenerException{message};
 }
 
-    [[noreturn]] void regionDestroyedException(std::string message,
-                                               std::string& exMsg,
-                                               GfErrType err, std::string) {
+[[noreturn]] void regionDestroyedException(std::string message,
+                                           std::string& exMsg, GfErrType err,
+                                           std::string) {
   if (err == GF_CACHE_REGION_INVALID) {
     message.append(!exMsg.empty() ? exMsg : ": region not valid");
   }
@@ -172,8 +171,8 @@
   throw CacheProxyException{message};
 }
 
-    [[noreturn]] void geodeIOException(std::string message, std::string& exMsg,
-                                       GfErrType, std::string) {
+[[noreturn]] void geodeIOException(std::string message, std::string& exMsg,
+                                   GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg : ": Input/Output error in operation");
   throw GeodeIOException{message};
 }
@@ -184,8 +183,8 @@
   throw NoSystemException{message};
 }
 
-    [[noreturn]] void timeoutException(std::string message, std::string& exMsg,
-                                       GfErrType err, std::string) {
+[[noreturn]] void timeoutException(std::string message, std::string& exMsg,
+                                   GfErrType err, std::string) {
   if (err == GF_CLIENT_WAIT_TIMEOUT) {
     message.append(!exMsg.empty()
                        ? exMsg
@@ -202,9 +201,9 @@
   throw OutOfMemoryException{message};
 }
 
-    [[noreturn]] void bufferSizeExceededException(std::string message,
-                                                  std::string& exMsg, GfErrType,
-                                                  std::string) {
+[[noreturn]] void bufferSizeExceededException(std::string message,
+                                              std::string& exMsg, GfErrType,
+                                              std::string) {
   message.append(!exMsg.empty() ? exMsg : ": Buffer Size Exceeded");
   throw BufferSizeExceededException{message};
 }
@@ -215,9 +214,8 @@
   throw LeaseExpiredException{message};
 }
 
-    [[noreturn]] void regionExistsException(std::string message,
-                                            std::string& exMsg, GfErrType,
-                                            std::string) {
+[[noreturn]] void regionExistsException(std::string message, std::string& exMsg,
+                                        GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg : ": Named Region Exists");
   throw RegionExistsException{message};
 }
@@ -229,9 +227,8 @@
   throw EntryNotFoundException{message};
 }
 
-    [[noreturn]] void entryExistsException(std::string message,
-                                           std::string& exMsg, GfErrType,
-                                           std::string) {
+[[noreturn]] void entryExistsException(std::string message, std::string& exMsg,
+                                       GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg
                                 : ": Entry already exists in the region");
   throw EntryExistsException{message};
@@ -244,9 +241,8 @@
   throw EntryDestroyedException{message};
 }
 
-    [[noreturn]] void cacheClosedException(std::string message,
-                                           std::string& exMsg, GfErrType,
-                                           std::string) {
+[[noreturn]] void cacheClosedException(std::string message, std::string& exMsg,
+                                       GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg : ": Cache has been closed");
   throw CacheClosedException{message};
 }
@@ -260,9 +256,9 @@
   throw StatisticsDisabledException{message};
 }
 
-    [[noreturn]] void concurrentModificationException(std::string message,
-                                                      std::string& exMsg,
-                                                      GfErrType, std::string) {
+[[noreturn]] void concurrentModificationException(std::string message,
+                                                  std::string& exMsg, GfErrType,
+                                                  std::string) {
   message.append(!exMsg.empty() ? exMsg
                                 : ": Concurrent modification in the cache");
   throw ConcurrentModificationException{message};
@@ -275,9 +271,9 @@
   throw NotAuthorizedException{message};
 }
 
-    [[noreturn]] void authenticationFailedException(std::string message,
-                                                    std::string& exMsg,
-                                                    GfErrType, std::string) {
+[[noreturn]] void authenticationFailedException(std::string message,
+                                                std::string& exMsg, GfErrType,
+                                                std::string) {
   message.append(!exMsg.empty() ? exMsg : ": authentication failed");
   throw AuthenticationFailedException{message};
 }
@@ -289,9 +285,9 @@
   throw AuthenticationRequiredException{message};
 }
 
-    [[noreturn]] void duplicateDurableClientException(std::string message,
-                                                      std::string& exMsg,
-                                                      GfErrType, std::string) {
+[[noreturn]] void duplicateDurableClientException(std::string message,
+                                                  std::string& exMsg, GfErrType,
+                                                  std::string) {
   message.append(!exMsg.empty() ? exMsg : ": Duplicate Durable Client Id");
   throw DuplicateDurableClientException{message};
 }
@@ -302,10 +298,8 @@
   throw QueryException{message};
 }
 
-    [[noreturn]] void noAvailableLocatorsException(std::string,
-                                                   std::string& exMsg,
-                                                   GfErrType,
-                                                   std::string func) {
+[[noreturn]] void noAvailableLocatorsException(std::string, std::string& exMsg,
+                                               GfErrType, std::string func) {
   try {
     throw NoAvailableLocatorsException{
         func + (!exMsg.empty() ? exMsg : ": No locators available")};
@@ -322,9 +316,9 @@
   throw AllConnectionsInUseException{message};
 }
 
-    [[noreturn]] void functionExecutionException(std::string message,
-                                                 std::string& exMsg, GfErrType,
-                                                 std::string) {
+[[noreturn]] void functionExecutionException(std::string message,
+                                             std::string& exMsg, GfErrType,
+                                             std::string) {
   message.append(!exMsg.empty() ? exMsg : ": Function execution failed");
   throw FunctionExecutionException{message};
 }
@@ -335,8 +329,8 @@
   throw DiskFailureException{message};
 }
 
-    [[noreturn]] void rollbackException(std::string message, std::string& exMsg,
-                                        GfErrType, std::string) {
+[[noreturn]] void rollbackException(std::string message, std::string& exMsg,
+                                    GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg : ": Transaction rolled back");
   throw RollbackException{message};
 }
@@ -348,10 +342,9 @@
   throw CommitConflictException{message};
 }
 
-    [[noreturn]] void transactionDataRebalancedException(std::string message,
-                                                         std::string& exMsg,
-                                                         GfErrType,
-                                                         std::string) {
+[[noreturn]] void transactionDataRebalancedException(std::string message,
+                                                     std::string& exMsg,
+                                                     GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg
                                 : ": Transaction data rebalanced exception");
   throw TransactionDataRebalancedException{message};
@@ -367,9 +360,9 @@
   throw TransactionDataNodeHasDepartedException{message};
 }
 
-    [[noreturn]] void putAllPartialResultException(std::string message,
-                                                   std::string& exMsg,
-                                                   GfErrType, std::string) {
+[[noreturn]] void putAllPartialResultException(std::string message,
+                                               std::string& exMsg, GfErrType,
+                                               std::string) {
   message.append(!exMsg.empty() ? exMsg : ": PutAll Partial exception");
   throw PutAllPartialResultException{message};
 }
@@ -380,9 +373,9 @@
   throw LowMemoryException{message};
 }
 
-    [[noreturn]] void queryLowMemoryException(std::string message,
-                                              std::string& exMsg, GfErrType,
-                                              std::string) {
+[[noreturn]] void queryLowMemoryException(std::string message,
+                                          std::string& exMsg, GfErrType,
+                                          std::string) {
   message.append(!exMsg.empty() ? exMsg
                                 : ": Query execution low memory exception");
   throw QueryExecutionLowMemoryException{message};
diff --git a/cppcache/src/ExecutionImpl.cpp b/cppcache/src/ExecutionImpl.cpp
index cda2658..c35fb19 100644
--- a/cppcache/src/ExecutionImpl.cpp
+++ b/cppcache/src/ExecutionImpl.cpp
@@ -23,6 +23,7 @@
 #include <geode/ExceptionTypes.hpp>
 #include <geode/internal/geode_globals.hpp>
 
+#include "CacheImpl.hpp"
 #include "NoResult.hpp"
 #include "TcrConnectionManager.hpp"
 #include "ThinClientPoolDM.hpp"
@@ -196,6 +197,8 @@
                   func, m_args, m_routingObj, isHAHasResultOptimizeForWrite,
                   m_rc, (isHAHasResultOptimizeForWrite & 1) ? retryAttempts : 0,
                   timeout);
+          dynamic_cast<ThinClientRegion*>(m_region.get())
+              ->setMetaDataRefreshed(false);
           cms->enqueueForMetadataRefresh(m_region->getFullPath(), 0);
         } else {
           // convert server to bucket map to server to key map where bucket id
@@ -230,14 +233,6 @@
                                               ? retryAttempts
                                               : 0,
                                           failedNodes, timeout);
-            } else {  // isHA = false
-              m_rc->clearResults();
-              dynamic_cast<ThinClientRegion*>(m_region.get())
-                  ->executeFunction(
-                      func, m_args, m_routingObj, isHAHasResultOptimizeForWrite,
-                      m_rc,
-                      (isHAHasResultOptimizeForWrite & 1) ? retryAttempts : 0,
-                      timeout);
             }
           }
         }
@@ -285,14 +280,6 @@
                                                 ? retryAttempts
                                                 : 0,
                                             failedNodes, timeout);
-              } else {  // isHA = false
-                m_rc->clearResults();
-                dynamic_cast<ThinClientRegion*>(m_region.get())
-                    ->executeFunction(
-                        func, m_args, m_routingObj,
-                        isHAHasResultOptimizeForWrite, m_rc,
-                        (isHAHasResultOptimizeForWrite & 1) ? retryAttempts : 0,
-                        timeout);
               }
             }
           }
diff --git a/cppcache/src/ExpEntryProperties.hpp b/cppcache/src/ExpEntryProperties.hpp
new file mode 100644
index 0000000..5270593
--- /dev/null
+++ b/cppcache/src/ExpEntryProperties.hpp
@@ -0,0 +1,95 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+#ifndef GEODE_EXPENTRYPROPERTIES_H_
+#define GEODE_EXPENTRYPROPERTIES_H_
+
+#include <atomic>
+#include <memory>
+
+#include <geode/CacheableKey.hpp>
+#include <geode/internal/geode_globals.hpp>
+
+#include "ExpiryTaskManager.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+/**
+ * @brief This class encapsulates expiration specific properties for
+ *        a MapEntry.
+ */
+class APACHE_GEODE_EXPORT ExpEntryProperties {
+ public:
+  using time_point = std::chrono::steady_clock::time_point;
+
+  explicit ExpEntryProperties(ExpiryTaskManager* manager) : manager_{manager} {}
+
+  time_point last_accessed() const {
+    return time_point{time_point::duration{last_accessed_}};
+  }
+
+  time_point last_modified() const {
+    return time_point{time_point::duration{last_modified_}};
+  }
+
+  void last_accessed(const time_point& tp) {
+    last_accessed_ = tp.time_since_epoch().count();
+  }
+
+  void last_modified(const time_point& tp) {
+    last_modified_ = tp.time_since_epoch().count();
+  }
+
+  void task_id(ExpiryTask::id_t task_id) { task_id_ = task_id; }
+
+  bool task_scheduled() const { return task_id_ != ExpiryTask::invalid(); }
+
+  void cancel_task() const { manager_->cancel(task_id_); }
+
+ protected:
+  // this constructor deliberately skips initializing any fields
+  inline explicit ExpEntryProperties(bool) {}
+
+ private:
+  /**
+   * Las time the entry was accessed
+   */
+  std::atomic<time_point::duration::rep> last_accessed_{0};
+
+  /**
+   * Last time the entry was modified
+   */
+  std::atomic<time_point::duration::rep> last_modified_{0};
+
+  /**
+   * Pointer to the ExpiryTaskManager
+   */
+  ExpiryTaskManager* manager_{nullptr};
+
+  /**
+   * ID of the expiry task
+   */
+  ExpiryTask::id_t task_id_{ExpiryTask::invalid()};
+};
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+#endif  // GEODE_EXPENTRYPROPERTIES_H_
diff --git a/cppcache/src/ExpMapEntry.hpp b/cppcache/src/ExpMapEntry.hpp
index f58a33f..3dda03e 100644
--- a/cppcache/src/ExpMapEntry.hpp
+++ b/cppcache/src/ExpMapEntry.hpp
@@ -22,7 +22,8 @@
 
 #include <geode/internal/geode_globals.hpp>
 
-#include "MapEntry.hpp"
+#include "ExpEntryProperties.hpp"
+#include "MapEntryImpl.hpp"
 #include "VersionStamp.hpp"
 
 namespace apache {
@@ -32,16 +33,18 @@
  * @brief Hold region mapped entry value.
  * This subclass adds expiration times.
  */
-class APACHE_GEODE_EXPORT ExpMapEntry : public MapEntryImpl,
-                                        public ExpEntryProperties {
+class ExpMapEntry : public MapEntryImpl, public ExpEntryProperties {
  public:
-  virtual ~ExpMapEntry() {}
+  ~ExpMapEntry() noexcept override = default;
 
-  virtual ExpEntryProperties& getExpProperties() { return *this; }
+  ExpMapEntry(const ExpMapEntry&) = delete;
+  ExpMapEntry& operator=(const ExpMapEntry&) = delete;
 
-  virtual void cleanup(const CacheEventFlags eventFlags) {
+  ExpEntryProperties& getExpProperties() override { return *this; }
+
+  virtual void cleanup(const CacheEventFlags eventFlags) override {
     if (!eventFlags.isExpiration()) {
-      cancelExpiryTaskId(m_key);
+      cancel_task();
     }
   }
 
@@ -52,15 +55,9 @@
   inline ExpMapEntry(ExpiryTaskManager* expiryTaskManager,
                      const std::shared_ptr<CacheableKey>& key)
       : MapEntryImpl(key), ExpEntryProperties(expiryTaskManager) {}
-
- private:
-  // disabled
-  ExpMapEntry(const ExpMapEntry&);
-  ExpMapEntry& operator=(const ExpMapEntry&);
 };
 
-class APACHE_GEODE_EXPORT VersionedExpMapEntry : public ExpMapEntry,
-                                                 public VersionStamp {
+class VersionedExpMapEntry : public ExpMapEntry, public VersionStamp {
  public:
   inline VersionedExpMapEntry(ExpiryTaskManager* expiryTaskManager,
                               const std::shared_ptr<CacheableKey>& key)
@@ -68,25 +65,23 @@
 
   inline explicit VersionedExpMapEntry(bool) : ExpMapEntry(true) {}
 
-  virtual ~VersionedExpMapEntry() {}
+  ~VersionedExpMapEntry() noexcept override {}
 
-  virtual VersionStamp& getVersionStamp() { return *this; }
+  VersionedExpMapEntry(const VersionedExpMapEntry&) = delete;
+  VersionedExpMapEntry& operator=(const VersionedExpMapEntry&) = delete;
 
- private:
-  // disabled
-  VersionedExpMapEntry(const VersionedExpMapEntry&);
-  VersionedExpMapEntry& operator=(const VersionedExpMapEntry&);
+  VersionStamp& getVersionStamp() override { return *this; }
 };
 
-class APACHE_GEODE_EXPORT ExpEntryFactory : public EntryFactory {
+class ExpEntryFactory : public EntryFactory {
  public:
   using EntryFactory::EntryFactory;
 
-  virtual ~ExpEntryFactory() {}
+  ~ExpEntryFactory() noexcept override {}
 
-  virtual void newMapEntry(ExpiryTaskManager* expiryTaskManager,
-                           const std::shared_ptr<CacheableKey>& key,
-                           std::shared_ptr<MapEntryImpl>& result) const;
+  void newMapEntry(ExpiryTaskManager* expiryTaskManager,
+                   const std::shared_ptr<CacheableKey>& key,
+                   std::shared_ptr<MapEntryImpl>& result) const override;
 };
 }  // namespace client
 }  // namespace geode
diff --git a/cppcache/src/ExpiryHandler_T.hpp b/cppcache/src/ExpiryHandler_T.hpp
deleted file mode 100644
index 1157cf5..0000000
--- a/cppcache/src/ExpiryHandler_T.hpp
+++ /dev/null
@@ -1,77 +0,0 @@
-#pragma once
-
-#ifndef GEODE_EXPIRYHANDLER_T_H_
-#define GEODE_EXPIRYHANDLER_T_H_
-
-/*
- * 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.
- */
-/**
- *@file ExpiryHandler_T.hpp
- *@since   1.0
- *@version 1.0
- */
-
-#include <ace/Event_Handler.h>
-
-#include "StackTrace.hpp"
-#include "util/Log.hpp"
-namespace apache {
-namespace geode {
-namespace client {
-/**
- * This class manages deletion of the handler so this class should only be
- * used for cases that are cancelled explicitly and never expire otherwise,
- * since GF_Timer_Heap_ImmediateReset_T also deletes handlers that expire
- */
-template <class T>
-class APACHE_GEODE_EXPORT ExpiryHandler_T : public ACE_Event_Handler {
- public:
-  /// Handle timeout events.
-  typedef int (T::*TO_HANDLER)(const ACE_Time_Value &, const void *);
-
-  // op_handler is the receiver of the timeout event. timeout is the method
-  // to be executed by op_handler_
-  ExpiryHandler_T(T *op_handler, TO_HANDLER timeout)
-      : op_handler_(op_handler), to_handler_(timeout) {}
-
-  ~ExpiryHandler_T() override = default;
-
-  int handle_timeout(const ACE_Time_Value &tv, const void *arg) override {
-    return (this->to_handler_ == nullptr
-                ? 0
-                : (this->op_handler_->*to_handler_)(tv, arg));
-  }
-
-  int handle_close(ACE_HANDLE, ACE_Reactor_Mask) override {
-    //  delete the handler so this class can only be used for cases
-    // that do not handle deletion themselves and those that never expire
-    // otherwise, since GF_Timer_Heap_ImmediateReset_T also deletes handlers
-    // that fall out of the queue
-    delete this;
-    return 0;
-  }
-
- private:
-  T *op_handler_;
-  /// Handle timeout events.
-  TO_HANDLER to_handler_;
-};
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_EXPIRYHANDLER_T_H_
diff --git a/cppcache/src/ExpiryTask.cpp b/cppcache/src/ExpiryTask.cpp
new file mode 100644
index 0000000..0ef562e
--- /dev/null
+++ b/cppcache/src/ExpiryTask.cpp
@@ -0,0 +1,69 @@
+/*
+ * 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.
+ */
+
+#include "ExpiryTask.hpp"
+
+#include "ExpiryTaskManager.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
+ExpiryTask::ExpiryTask(ExpiryTaskManager& manager)
+    : id_{invalid()}, timer_{manager.io_context()}, manager_{manager} {}
+
+int32_t ExpiryTask::reset(const std::chrono::nanoseconds& ns) {
+  return reset(timer_t::clock_type::now() + ns);
+}
+
+int32_t ExpiryTask::reset(const time_point_t& at) {
+  std::unique_lock<decltype(mutex_)> lock{mutex_};
+  if (cancelled_) {
+    return -1;
+  }
+
+  auto self = shared_from_this();
+  auto n = timer_.expires_at(at);
+  timer_.async_wait(
+      [self](const boost::system::error_code& e) { self->on_callback(e); });
+  return static_cast<int32_t>(n);
+}
+
+void ExpiryTask::on_callback(const boost::system::error_code& err) {
+  if (cancelled_ || err) {
+    return;
+  }
+
+  if (on_expire()) {
+    if (periodic()) {
+      reset(timer_.expiry() + interval_);
+    } else {
+      manager_.remove(id_);
+    }
+  }
+}
+
+int32_t ExpiryTask::cancel() {
+  std::unique_lock<decltype(mutex_)> lock{mutex_};
+
+  cancelled_ = true;
+  return static_cast<int32_t>(timer_.cancel());
+}
+
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
diff --git a/cppcache/src/ExpiryTask.hpp b/cppcache/src/ExpiryTask.hpp
new file mode 100644
index 0000000..0a6a11c
--- /dev/null
+++ b/cppcache/src/ExpiryTask.hpp
@@ -0,0 +1,203 @@
+
+/*
+ * 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.
+ */
+
+#pragma once
+
+#ifndef GEODE_EXPIRYTASK_H_
+#define GEODE_EXPIRYTASK_H_
+
+#include <chrono>
+#include <functional>
+#include <limits>
+#include <memory>
+#include <mutex>
+
+#include <boost/asio/io_context.hpp>
+#include <boost/asio/steady_timer.hpp>
+
+namespace apache {
+namespace geode {
+namespace client {
+
+class ExpiryTaskManager;
+
+/**
+ * @class ExpiryTask ExpiryTask.hpp
+ *
+ * This is the base class for all expiry tasks.
+ */
+class ExpiryTask : public std::enable_shared_from_this<ExpiryTask> {
+ public:
+  using id_t = uint64_t;
+
+ public:
+  /// Class constructors
+
+  /**
+   * Class constructor
+   * @param manager A reference to the ExpiryTaskManager
+   */
+  explicit ExpiryTask(ExpiryTaskManager& manager);
+
+  /**
+   * Class destructor
+   */
+  virtual ~ExpiryTask() = default;
+
+  /**
+   * Returns the task ID
+   */
+  id_t id() const { return id_; }
+
+  /**
+   * Returns whether the task is periodic
+   */
+  bool periodic() const {
+    return interval_ != std::chrono::nanoseconds::zero();
+  }
+
+  /**
+   * Returns an ID which represents an invalid task
+   */
+  static constexpr id_t invalid() { return (std::numeric_limits<id_t>::max)(); }
+
+ protected:
+  using timer_t = boost::asio::steady_timer;
+  using clock_t = timer_t::clock_type;
+  using time_point_t = timer_t::time_point;
+  using duration_t = time_point_t::duration;
+
+ protected:
+  friend class ExpiryTaskManager;
+
+  /**
+   * Callback called upon task expiration
+   * @return Returns true if the task can normally complete and false if it has
+   *         been reset. Specifically if false is returned it will mean:<br>
+   *          - For periodic tasks. They won't re-trigger, as the task was
+   *            re-scheduled.
+   *          - For non-periodic tasks. They won't be removed from the manager,
+   *            as the task was re-scheduled.
+   * @note Note that as this is an abstract method, each implementer of
+   * ExpiryTask should write its own version
+   */
+  virtual bool on_expire() = 0;
+
+  /**
+   * Sets task ID
+   * @param id Task ID
+   * @return A reference to itself
+   */
+  ExpiryTask& id(id_t id) {
+    id_ = id;
+    return *this;
+  }
+
+  /**
+   * Sets the task execution interval
+   * @param interval Task execution interval
+   * @return A reference to itself
+   */
+  ExpiryTask& interval(const duration_t& interval) {
+    interval_ = interval;
+    return *this;
+  }
+
+  /**
+   * Cancels the task
+   * @return Returns the number of pending executions. Take into account
+   *         that if 0 is returned it means the task was being executed
+   *         while cancel was called.
+   */
+  int32_t cancel();
+
+  /**
+   * Resets the task timer
+   * @param at Time point at which the task is to be re-triggered.
+   * @return Returns -1 if the task was cancelled, and otherwise it
+   *         returns the number of pending executions. Take into account
+   *         that if 0 is returned it means the task was being executed
+   *         while reset was called.
+   */
+  int32_t reset(const time_point_t& at);
+
+  /**
+   * Resets the task timer
+   * @param delay Amount of nano-seconds until the task is triggered.
+   * @return Returns -1 if the task was cancelled, and otherwise it
+   *         returns the number of pending executions. Take into account
+   *         that if 0 is returned it means the task was being executed
+   *         while reset was called.
+   */
+  int32_t reset(const duration_t& delay);
+
+  /**
+   * Function triggered by the timer implementation.
+   * @param err Boost error passed by the timer.
+   */
+  void on_callback(const boost::system::error_code& err);
+
+ protected:
+  /// Member attributes
+
+  /**
+   * Unique identifier of the task
+   */
+  id_t id_;
+
+  /**
+   * Specific timer implementation instance
+   */
+  timer_t timer_;
+
+  /**
+   * Reference to the expiry manager
+   */
+  ExpiryTaskManager& manager_;
+
+  /**
+   * Re-triggering interval
+   * @note This is used in order to define periodic tasks
+   */
+  duration_t interval_;
+
+  /**
+   * Exclusive mutex used to avoid race conditions for the following member
+   * functions:<br>
+   *  - cancel
+   *  - reset
+   */
+  std::mutex mutex_;
+
+  /**
+   * Flag indicating whether or not the task has been cancelled
+   * @note This is necessary in order to guarantee that whenever the task is
+   *       reset the task won't be removed from the ExpiryTaskManager.
+   *       The reason why is because reset cancels the execution of all the
+   *       functions to be called by the timer and given they all share the
+   *       same ExpiryTask instance there was no way to tell whether the
+   *       task was cancelled or reset.
+   */
+  bool cancelled_{false};
+};
+
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+#endif  // GEODE_EXPIRYTASKMANAGER_H_
diff --git a/cppcache/src/ExpiryTaskManager.cpp b/cppcache/src/ExpiryTaskManager.cpp
index 1e1cb59..920c5f0 100644
--- a/cppcache/src/ExpiryTaskManager.cpp
+++ b/cppcache/src/ExpiryTaskManager.cpp
@@ -14,89 +14,130 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 #include "ExpiryTaskManager.hpp"
 
-#include "DistributedSystem.hpp"
-#include "DistributedSystemImpl.hpp"
-#include "config.h"
-#include "util/Log.hpp"
+#include <future>
 
-#if defined(_WIN32)
-#include <ace/WFMO_Reactor.h>
-#endif
-#if defined(WITH_ACE_Select_Reactor)
-#include <ace/Select_Reactor.h>
-#else
-#include <ace/Dev_Poll_Reactor.h>
-#endif
+#include "DistributedSystemImpl.hpp"
+#include "util/Log.hpp"
 
 namespace apache {
 namespace geode {
 namespace client {
 
-const char* ExpiryTaskManager::NC_ETM_Thread = "NC ETM Thread";
+ExpiryTaskManager::ExpiryTaskManager()
+    : running_(false),
+      work_guard_(boost::asio::make_work_guard(io_context_)),
+      last_task_id_(0) {}
 
-ExpiryTaskManager::ExpiryTaskManager() : m_reactorEventLoopRunning(false) {
-  auto timer = new GF_Timer_Heap_ImmediateReset();
-  m_timer = std::unique_ptr<GF_Timer_Heap_ImmediateReset>(timer);
-#if defined(_WIN32)
-  m_reactor = new ACE_Reactor(new ACE_WFMO_Reactor(nullptr, m_timer.get()), 1);
-#elif defined(WITH_ACE_Select_Reactor)
-  m_reactor =
-      new ACE_Reactor(new ACE_Select_Reactor(nullptr, m_timer.get()), 1);
-#else
-  m_reactor =
-      new ACE_Reactor(new ACE_Dev_Poll_Reactor(nullptr, m_timer.get()) 1);
-#endif
+ExpiryTaskManager::~ExpiryTaskManager() noexcept {
+  if (running_) {
+    stop();
+  }
 }
 
-int ExpiryTaskManager::resetTask(ExpiryTaskManager::id_type id, uint32_t sec) {
-  ACE_Time_Value interval(sec);
-  return m_reactor->reset_timer_interval(id, interval);
+void ExpiryTaskManager::start() {
+  if (running_) {
+    throw IllegalStateException(
+        "Tried to start ExpiryTaskManager when it was already running");
+  }
+
+  std::promise<bool> start_promise;
+  auto start_future = start_promise.get_future();
+  runner_ = std::thread{[this, &start_promise] {
+    start_promise.set_value(true);
+    Log::setThreadName("NC ETM Thread");
+
+    LOGFINE("ExpiryTaskManager thread is running.");
+    io_context_.run();
+    LOGFINE("ExpiryTaskManager thread has stopped.");
+  }};
+
+  running_ = start_future.get();
 }
 
-int ExpiryTaskManager::cancelTask(ExpiryTaskManager::id_type id) {
-  return m_reactor->cancel_timer(id, nullptr, 0);
-}
-
-int ExpiryTaskManager::svc() {
-  DistributedSystemImpl::setThreadName(NC_ETM_Thread);
-  LOGFINE("ExpiryTaskManager thread is running.");
+void ExpiryTaskManager::stop() {
   {
-    std::unique_lock<std::mutex> lock(m_mutex);
-    m_reactorEventLoopRunning = true;
-    m_condition.notify_all();
+    std::unique_lock<std::mutex> lock(mutex_);
+
+    if (!running_) {
+      throw IllegalStateException(
+          "Tried to stop ExpiryTaskManager when it was not running");
+    }
+
+    LOGDEBUG("Stopping ExpiryTaskManager...");
+
+    work_guard_.reset();
+    running_ = false;
+
+    cancel_all();
   }
-  m_reactor->owner(ACE_OS::thr_self());
-  m_reactor->run_reactor_event_loop();
-  LOGFINE("ExpiryTaskManager thread has stopped.");
-  return 0;
+
+  runner_.join();
 }
 
-void ExpiryTaskManager::stopExpiryTaskManager() {
-  std::unique_lock<std::mutex> lock(m_mutex);
+ExpiryTask::id_t ExpiryTaskManager::schedule(
+    std::shared_ptr<ExpiryTask> task, const ExpiryTask::duration_t &delay,
+    const ExpiryTask::duration_t &interval) {
+  std::unique_lock<std::mutex> lock(mutex_);
 
-  if (m_reactorEventLoopRunning) {
-    m_reactor->end_reactor_event_loop();
-    this->wait();
-    m_reactorEventLoopRunning = false;
-    m_condition.notify_all();
+  if (!running_) {
+    LOGDEBUG("Tried to add a task while ExpiryTaskManager is not running");
+    return ExpiryTask::invalid();
   }
+
+  auto task_id = last_task_id_++;
+  if (task_id == ExpiryTask::invalid()) {
+    last_task_id_ = 0;
+    task_id = 0;
+  }
+
+  task->id(task_id).interval(interval);
+  task_map_.emplace(task_id, std::move(task)).first->second->reset(delay);
+
+  using apache::geode::internal::chrono::duration::to_string;
+  LOGDEBUG("Task %zu has been scheduled in %s with an interval of %s", task_id,
+           to_string(delay).c_str(), to_string(interval).c_str());
+  return task_id;
 }
 
-void ExpiryTaskManager::begin() {
-  this->activate();
-  std::unique_lock<std::mutex> lock(m_mutex);
-  m_condition.wait(lock, [this] { return m_reactorEventLoopRunning; });
+int32_t ExpiryTaskManager::reset(ExpiryTask::id_t task_id,
+                                 const ExpiryTask::duration_t &delay) {
+  std::unique_lock<std::mutex> lock(mutex_);
+  auto &&iter = task_map_.find(task_id);
+  if (iter == task_map_.end()) {
+    return -1;
+  }
+
+  auto n = iter->second->reset(delay);
+  return static_cast<int32_t>(n);
 }
 
-ExpiryTaskManager::~ExpiryTaskManager() {
-  stopExpiryTaskManager();
+int32_t ExpiryTaskManager::cancel(ExpiryTask::id_t task_id) {
+  std::unique_lock<std::mutex> lock(mutex_);
+  auto &&iter = task_map_.find(task_id);
+  if (iter == task_map_.end()) {
+    return -1;
+  }
 
-  delete m_reactor;
-  m_reactor = nullptr;
+  auto n = iter->second->cancel();
+  task_map_.erase(iter);
+  return static_cast<int32_t>(n);
 }
 
+void ExpiryTaskManager::cancel_all() {
+  for (auto &&iter : task_map_) {
+    iter.second->cancel();
+  }
+
+  task_map_.clear();
+}
+
+void ExpiryTaskManager::remove(ExpiryTask::id_t task_id) {
+  std::unique_lock<std::mutex> lock(mutex_);
+  task_map_.erase(task_id);
+}
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/ExpiryTaskManager.hpp b/cppcache/src/ExpiryTaskManager.hpp
index ca99032..10d2c96 100644
--- a/cppcache/src/ExpiryTaskManager.hpp
+++ b/cppcache/src/ExpiryTaskManager.hpp
@@ -22,19 +22,14 @@
 
 #include <chrono>
 #include <condition_variable>
-#include <memory>
+#include <map>
 #include <mutex>
-#include <type_traits>
+#include <thread>
 
-#include <ace/Reactor.h>
-#include <ace/Task.h>
-#include <ace/Timer_Heap.h>
+#include <boost/asio/executor_work_guard.hpp>
+#include <boost/asio/io_context.hpp>
 
-#include <geode/internal/chrono/duration.hpp>
-#include <geode/internal/geode_globals.hpp>
-
-#include "ReadWriteLock.hpp"
-#include "util/Log.hpp"
+#include "ExpiryTask.hpp"
 
 namespace apache {
 namespace geode {
@@ -43,269 +38,164 @@
 /**
  * @class ExpiryTaskManager ExpiryTaskManager.hpp
  *
- * This class starts a reactor's event loop for taking care of expiry
- * tasks. The scheduling of event also happens through this manager.
+ * This class manages all the ExpiryTaskManagers
+ * It uses Boost.Asio and Boost timers to schedule ExpiryTasks
  */
-class APACHE_GEODE_EXPORT ExpiryTaskManager : public ACE_Task_Base {
+class ExpiryTaskManager {
  public:
-  typedef decltype(std::declval<ACE_Reactor>().schedule_timer(
-      nullptr, nullptr, std::declval<ACE_Time_Value>())) id_type;
-
   /**
-   * This class allows resetting of the timer to take immediate effect when
-   * done from inside ACE_Event_Handler::handle_timeout(). With the default
-   * implementation in ACE_Timer_Heap, the reset takes affect after the next
-   * timeout so expiry does not work correctly with it where we need to
-   * reset timer everytime an entry/region is accessed/modified. It also
-   * avoids alternative methods like rescheduling eveytime which is
-   * expensive in terms of object (ASCE_Timer_Node_T) creation,deletion.
-   *
-   * Here is the sequence as in ACE_Timer_Heap:
-   *
-   * 1) expire() is invoked by reactor to remove all expired entries
-   *
-   * 2) expire() invokes dispatch_info_i() that checks the first element
-   *    in the heap and removes it, if required.
-   *
-   * 3) If the element is a recurring timer then the elemant is reinserted
-   *    into the heap bu dispatch_info_i()
-   *
-   * 4) expire() then invokes ACE_Event_Handler::handle_timeout() on the
-   *    element returned (this->upcall calls handle_timeout) by
-   *    dispatch_info_t(), if any
-   *
-   * So when reset_timer_interval() is called from inside handle_timeout()
-   * the it does not take effect immediately. This implementation reverses
-   * the order of steps 3 and 4, so that resetting timer interval from
-   * within handle_timeout() works as expected.
-   *
-   *
-   */
-  template <typename TYPE, typename FUNCTOR, typename ACE_LOCK>
-  class GF_Timer_Heap_ImmediateReset_T
-      : public ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK> {
-   public:
-    virtual int expire_single(ACE_Command_Base& pre_dispatch_command) {
-      ACE_TRACE("GF_Timer_Heap_ImmediateReset_T::expire_single");
-      ACE_Timer_Node_Dispatch_Info_T<TYPE> info;
-      ACE_Time_Value cur_time;
-      ACE_Timer_Node_T<TYPE>* expired = nullptr;
-
-      // Create a scope for the lock ...
-      {
-        ACE_MT(ACE_GUARD_RETURN(ACE_LOCK, ace_mon, this->mutex_, -1));
-
-        if (this->is_empty()) return 0;
-
-        // Get the current time
-        cur_time = this->gettimeofday_static() + this->timer_skew();
-
-        expired = this->getFirstNode(cur_time, info);
-
-        if (expired == nullptr) return 0;
-      }
-
-      const void* upcall_act = nullptr;
-
-      // Preinvoke (handles refcount if needed, etc.)
-      this->preinvoke(info, cur_time, upcall_act);
-
-      // Release the token before expiration upcall.
-      pre_dispatch_command.execute();
-
-      // call the functor
-      this->upcall(info, cur_time);
-
-      // Postinvoke (undo refcount if needed, etc.)
-      this->postinvoke(info, cur_time, upcall_act);
-
-      // Create a scope for the lock ...
-      {
-        ACE_MT(ACE_GUARD_RETURN(ACE_LOCK, ace_mon, this->mutex_, -1));
-
-        // Reschedule after doing the upcall in expire method
-        // to let updated expiry interval, if any, take effect correctly
-        expired = this->remove_first();
-
-        // Check if this is an interval timer.
-        if (expired->get_interval() > ACE_Time_Value::zero) {
-          // Make sure that we skip past values that have already
-          // "expired".
-          this->recompute_next_abs_interval_time(expired, cur_time);
-          // Since this is an interval timer, we need to reschedule
-          // it.
-          this->reschedule(expired);
-        } else {
-          // Delete the underlying object
-          delete expired->get_type();
-          // Call the factory method to free up the node.
-          this->free_node(expired);
-        }
-      }
-
-      // We have dispatched a timer
-      return 1;
-    }
-
-    virtual int expire() {
-      return ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>::expire();
-    }
-
-    virtual int expire(const ACE_Time_Value& cur_time) {
-      ACE_TRACE("GF_Timer_Heap_ImmediateReset_T::expire");
-      ACE_MT(ACE_GUARD_RETURN(ACE_LOCK, ace_mon, this->mutex_, -1));
-
-      // Keep looping while there are timers remaining and the earliest
-      // timer is <= the <cur_time> passed in to the method.
-      if (this->is_empty()) {
-        return 0;
-      }
-      int number_of_timers_expired = 0;
-      ACE_Timer_Node_T<TYPE>* expired = nullptr;
-      ACE_Timer_Node_Dispatch_Info_T<TYPE> info;
-      while ((expired = this->getFirstNode(cur_time, info)) != nullptr) {
-        const void* upcall_act = nullptr;
-        this->preinvoke(info, cur_time, upcall_act);
-
-        this->upcall(info, cur_time);
-
-        this->postinvoke(info, cur_time, upcall_act);
-
-        //  reschedule after doing the upcall in expire method
-        // to let updated expiry interval, if any, take affect correctly
-        expired = this->remove_first();
-        // Check if this is an interval timer.
-        if (expired->get_interval() > ACE_Time_Value::zero) {
-          // Make sure that we skip past values that have already
-          // "expired".
-          do {
-            expired->set_timer_value(expired->get_timer_value() +
-                                     expired->get_interval());
-          } while (expired->get_timer_value() <= cur_time);
-          // Since this is an interval timer, we need to reschedule
-          // it.
-          this->reschedule(expired);
-        } else {
-          // Delete the underlying object
-          delete expired->get_type();
-          // Call the factory method to free up the node.
-          this->free_node(expired);
-        }
-
-        ++number_of_timers_expired;
-      }
-      return number_of_timers_expired;
-    }
-
-    ACE_Timer_Node_T<TYPE>* getFirstNode(
-        const ACE_Time_Value& cur_time,
-        ACE_Timer_Node_Dispatch_Info_T<TYPE>& info) {
-      ACE_TRACE("GF_Timer_Heap_ImmediateReset_T::getFirstNode");
-
-      if (this->is_empty()) {
-        return nullptr;
-      }
-      ACE_Timer_Node_T<TYPE>* expired = nullptr;
-      if (this->earliest_time() <= cur_time) {
-        expired = this->get_first();
-        // Get the dispatch info
-        expired->get_dispatch_info(info);
-        return expired;
-      }
-      return nullptr;
-    }
-  };
-
-  typedef GF_Timer_Heap_ImmediateReset_T<
-      ACE_Event_Handler*, ACE_Event_Handler_Handle_Timeout_Upcall,
-      ACE_SYNCH_RECURSIVE_MUTEX>
-      GF_Timer_Heap_ImmediateReset;
-
-  /**
-   * Constructor
+   * Default class constructor
    */
   ExpiryTaskManager();
 
   /**
-   * Destructor. Stops the reactors event loop if it is not running
-   * and then exits.
+   * Class destructor
    */
-  ~ExpiryTaskManager();
+  virtual ~ExpiryTaskManager() noexcept;
 
   /**
-   * For scheduling a task for expiration.
+   * Starts the manager
+   * @throw IllegalStateException An exception is thrown if the manager is
+   *                              already started.
    */
-  template <class ExpRep, class ExpPeriod, class IntRep, class IntPeriod>
-  ExpiryTaskManager::id_type scheduleExpiryTask(
-      ACE_Event_Handler* handler,
-      std::chrono::duration<ExpRep, ExpPeriod> expTime,
-      std::chrono::duration<IntRep, IntPeriod> interval,
-      bool cancelExistingTask = false) {
-    using ::apache::geode::internal::chrono::duration::to_string;
+  void start();
 
-    LOGFINER(
-        "ExpiryTaskManager: expTime %s, interval %s, cancelExistingTask %d",
-        to_string(expTime).c_str(), to_string(interval).c_str(),
-        cancelExistingTask);
-    if (cancelExistingTask) {
-      m_reactor->cancel_timer(handler, 1);
-    }
+  /**
+   * Stops the manager
+   * @throw IllegalStateException An exception is thrown if the manager is
+   *                              already stopped.
+   */
+  void stop();
 
-    ACE_Time_Value expTimeValue(expTime);
-    ACE_Time_Value intervalValue(interval);
-    LOGFINER("Scheduled expiration ... in " + to_string(expTime));
-    return m_reactor->schedule_timer(handler, nullptr, expTimeValue,
-                                     intervalValue);
+  /**
+   * Returns whether or not the manager is running.
+   */
+  bool running() const { return running_; }
+
+  /**
+   * Returns the number of scheduled tasks.
+   */
+  std::size_t count() const { return task_map_.size(); }
+
+  /**
+   * Schedules a new expiry task.
+   * @param task Reference to the task.
+   * @param delay Amount of nano-seconds in which the task expires.
+   * @param interval Amount of nano-seconds in which the task is executed again.
+   *                 If this parameter is set to zero, the task will only
+   *                 execute once and finish, otherwise it will execute
+   *                 continuously every interval nano-seconds until cancelled.
+   * @return ID of the created task. If there was any error during the
+   *         task creation ExpiryTask::invalid() is returned as ID.
+   * @note Possible errors are:<br>
+   *        - Manager is not running
+   */
+  ExpiryTask::id_t schedule(std::shared_ptr<ExpiryTask> task,
+                            const ExpiryTask::duration_t &delay,
+                            const ExpiryTask::duration_t &interval);
+
+  /**
+   * Schedules a new expiry task.
+   * @param task Task reference.
+   * @param delay Amount of nano-seconds in which the task expires.
+   * @return ID of the created task. If there was any error during the
+   *         task creation ExpiryTask::invalid() is returned as ID.
+   * @note Possible errors are:<br>
+   *        - Manager is not running
+   */
+  ExpiryTask::id_t schedule(std::shared_ptr<ExpiryTask> task,
+                            const ExpiryTask::duration_t &delay) {
+    return schedule(std::move(task), delay, ExpiryTask::duration_t::zero());
   }
 
   /**
-   * for resetting the interval an already registered task.
-   * returns '0' if successful '-1' on failure.
-   * id - the id assigned to the expiry task initially.
-   * millisec - The time after which you would like it to get
-   * invoked from the current time.
+   * Re-triggers a task to run in the given delay.
+   * @param task_id ID of the task to be re-triggered.
+   * @param delay Amount of nano-seconds in which the task expires.
+   * @return Returns -1 if the task did not existed, and otherwise it
+   *         returns the number of pending executions. Take into account
+   *         that if 0 is returned it means the task was being executed
+   *         while reset was called.
    */
-  int resetTask(id_type id, uint32_t sec);
-
-  template <class Rep, class Period>
-  int resetTask(id_type id, std::chrono::duration<Rep, Period> duration) {
-    ACE_Time_Value interval(duration);
-    return m_reactor->reset_timer_interval(id, interval);
-  }
+  int32_t reset(ExpiryTask::id_t task_id, const ExpiryTask::duration_t &delay);
 
   /**
-   * for cancelling an already registered task.
-   * returns '0' if successful '-1' on failure.
-   * id - the id assigned to the expiry task initially.
+   * Cancels an already scheduled expiry task
+   * @param task_id ID of the task to be cancelled.
+   * @return Returns -1 if the task did not existed, and otherwise it
+   *         returns the number of pending executions. Take into account
+   *         that if 0 is returned it means the task was being executed
+   *         while cancel was called.
    */
-  int cancelTask(id_type id);
+  int32_t cancel(ExpiryTask::id_t task_id);
+
+ protected:
+  /// Internal types
+
+  using duration_t = std::chrono::nanoseconds;
+  using task_map_t = std::map<ExpiryTask::id_t, std::shared_ptr<ExpiryTask>>;
+
+ protected:
+  friend class ExpiryTask;
 
   /**
-   * A separate thread is started in which the reactor event loop
-   * is kept running unless explicitly stopped or when this object
-   * goes out of scope.
+   * Cancels all scheduled tasks
    */
-  int svc();
+  void cancel_all();
 
   /**
-   * For explicitly stopping the reactor's event loop.
+   * Removes the reference to the task matching the given ID
+   * @param task_id ID of the task
    */
-  void stopExpiryTaskManager();
+  void remove(ExpiryTask::id_t task_id);
 
-  /** activate the thread and wait for it to be running. */
-  void begin();
+  /**
+   * Returns Boost IO context
+   */
+  boost::asio::io_context &io_context() { return io_context_; }
 
- private:
-  ACE_Reactor* m_reactor;
+ protected:
+  /// Class member attributes
 
-  bool m_reactorEventLoopRunning;  // flag to indicate if the reactor event
-                                   // loop is running or not.
-  static const char* NC_ETM_Thread;
+  /**
+   * Flag indicating whether or not the manager is running.
+   */
+  bool running_;
 
-  std::mutex m_mutex;
-  std::condition_variable m_condition;
+  /**
+   * Thread running the io_context.
+   */
+  std::thread runner_;
 
-  std::unique_ptr<GF_Timer_Heap_ImmediateReset> m_timer;
+  /*
+   * Boost IO context processing expiry tasks events.
+   */
+  boost::asio::io_context io_context_;
+
+  /**
+   * Executor guard. It keeps the IO context running even when there are
+   * no task scheduled.
+   */
+  boost::asio::executor_work_guard<boost::asio::io_context::executor_type>
+      work_guard_;
+
+  /**
+   * Manager mutex. It has the following uses:<br>
+   *  - Avoids race conditions involving the task container.
+   *  - Avoids creation of new task while the expiry task is being stopped.
+   *  - Avoids concurrent modification of the task counter.
+   */
+  std::mutex mutex_;
+
+  /**
+   * Task container
+   */
+  task_map_t task_map_;
+
+  /**
+   * Task counter. It's used to assign tasks an UID.
+   */
+  ExpiryTask::id_t last_task_id_;
 };
 }  // namespace client
 }  // namespace geode
diff --git a/cppcache/src/FarSideEntryOp.cpp b/cppcache/src/FarSideEntryOp.cpp
index 794e79f..d2cdf73 100644
--- a/cppcache/src/FarSideEntryOp.cpp
+++ b/cppcache/src/FarSideEntryOp.cpp
@@ -19,7 +19,7 @@
 
 #include "ClientProxyMembershipID.hpp"
 #include "DiskVersionTag.hpp"
-#include "RegionCommit.hpp"
+#include "TcrMessage.hpp"
 #include "util/exception.hpp"
 
 namespace apache {
@@ -28,7 +28,7 @@
 
 FarSideEntryOp::FarSideEntryOp(
     MemberListForVersionStamp& memberListForVersionStamp)
-    : m_op(0),
+    : m_op(Operation::MARKER),
       m_modSerialNum(0),
       m_eventOffset(0),
       m_didDestroy(false),
@@ -36,20 +36,22 @@
 
 {}
 
-bool FarSideEntryOp::isDestroy(int8_t op) {
-  return op == DESTROY || op == LOCAL_DESTROY || op == EVICT_DESTROY ||
-         op == EXPIRE_DESTROY || op == EXPIRE_LOCAL_DESTROY || op == REMOVE;
+bool FarSideEntryOp::isDestroy(Operation op) {
+  return op == Operation::DESTROY || op == Operation::LOCAL_DESTROY ||
+         op == Operation::EVICT_DESTROY || op == Operation::EXPIRE_DESTROY ||
+         op == Operation::EXPIRE_LOCAL_DESTROY || op == Operation::REMOVE;
 }
 
-bool FarSideEntryOp::isInvalidate(int8_t op) {
-  return op == INVALIDATE || op == LOCAL_INVALIDATE ||
-         op == EXPIRE_INVALIDATE || op == EXPIRE_LOCAL_INVALIDATE;
+bool FarSideEntryOp::isInvalidate(Operation op) {
+  return op == Operation::INVALIDATE || op == Operation::LOCAL_INVALIDATE ||
+         op == Operation::EXPIRE_INVALIDATE ||
+         op == Operation::EXPIRE_LOCAL_INVALIDATE;
 }
 
 void FarSideEntryOp::fromData(DataInput& input, bool largeModCount,
                               uint16_t memId) {
   m_key = std::dynamic_pointer_cast<CacheableKey>(input.readObject());
-  m_op = input.read();
+  m_op = static_cast<Operation>(input.read());
   if (largeModCount) {
     m_modSerialNum = input.readInt32();
   } else {
diff --git a/cppcache/src/FarSideEntryOp.hpp b/cppcache/src/FarSideEntryOp.hpp
index a7316a3..4d7426c 100644
--- a/cppcache/src/FarSideEntryOp.hpp
+++ b/cppcache/src/FarSideEntryOp.hpp
@@ -31,60 +31,61 @@
 namespace geode {
 namespace client {
 
-enum OPERATION {
-  MARKER = 0,
-  CREATE,
-  PUTALL_CREATE,
-  GET,
-  GET_ENTRY,
-  CONTAINS_KEY,
-  CONTAINS_VALUE,
-  CONTAINS_VALUE_FOR_KEY,
-  FUNCTION_EXECUTION,
-  SEARCH_CREATE,
-  LOCAL_LOAD_CREATE,
-  NET_LOAD_CREATE,
-  UPDATE,
-  PUTALL_UPDATE,
-  SEARCH_UPDATE,
-  LOCAL_LOAD_UPDATE,
-  NET_LOAD_UPDATE,
-  INVALIDATE,
-  LOCAL_INVALIDATE,
-  DESTROY,
-  LOCAL_DESTROY,
-  EVICT_DESTROY,
-  REGION_LOAD_SNAPSHOT,
-  REGION_LOCAL_DESTROY,
-  REGION_CREATE,
-  REGION_CLOSE,
-  REGION_DESTROY,
-  EXPIRE_DESTROY,
-  EXPIRE_LOCAL_DESTROY,
-  EXPIRE_INVALIDATE,
-  EXPIRE_LOCAL_INVALIDATE,
-  REGION_EXPIRE_DESTROY,
-  REGION_EXPIRE_LOCAL_DESTROY,
-  REGION_EXPIRE_INVALIDATE,
-  REGION_EXPIRE_LOCAL_INVALIDATE,
-  REGION_LOCAL_INVALIDATE,
-  REGION_INVALIDATE,
-  REGION_CLEAR,
-  REGION_LOCAL_CLEAR,
-  CACHE_CREATE,
-  CACHE_CLOSE,
-  FORCED_DISCONNECT,
-  REGION_REINITIALIZE,
-  CACHE_RECONNECT,
-  PUT_IF_ABSENT,
-  REPLACE,
-  REMOVE
-};
-
 class RegionCommit;
 
 class FarSideEntryOp {
  public:
+  enum class Operation : int8_t {
+    MARKER = 0,
+    CREATE,
+    PUTALL_CREATE,
+    GET,
+    GET_ENTRY,
+    CONTAINS_KEY,
+    CONTAINS_VALUE,
+    CONTAINS_VALUE_FOR_KEY,
+    FUNCTION_EXECUTION,
+    SEARCH_CREATE,
+    LOCAL_LOAD_CREATE,
+    NET_LOAD_CREATE,
+    UPDATE,
+    PUTALL_UPDATE,
+    SEARCH_UPDATE,
+    LOCAL_LOAD_UPDATE,
+    NET_LOAD_UPDATE,
+    INVALIDATE,
+    LOCAL_INVALIDATE,
+    DESTROY,
+    LOCAL_DESTROY,
+    EVICT_DESTROY,
+    REGION_LOAD_SNAPSHOT,
+    REGION_LOCAL_DESTROY,
+    REGION_CREATE,
+    REGION_CLOSE,
+    REGION_DESTROY,
+    EXPIRE_DESTROY,
+    EXPIRE_LOCAL_DESTROY,
+    EXPIRE_INVALIDATE,
+    EXPIRE_LOCAL_INVALIDATE,
+    REGION_EXPIRE_DESTROY,
+    REGION_EXPIRE_LOCAL_DESTROY,
+    REGION_EXPIRE_INVALIDATE,
+    REGION_EXPIRE_LOCAL_INVALIDATE,
+    REGION_LOCAL_INVALIDATE,
+    REGION_INVALIDATE,
+    REGION_CLEAR,
+    REGION_LOCAL_CLEAR,
+    CACHE_CREATE,
+    CACHE_CLOSE,
+    FORCED_DISCONNECT,
+    REGION_REINITIALIZE,
+    CACHE_RECONNECT,
+    PUT_IF_ABSENT,
+    REPLACE,
+    REMOVE
+  };
+
+ public:
   explicit FarSideEntryOp(MemberListForVersionStamp& memberListForVersionStamp);
   virtual ~FarSideEntryOp() = default;
 
@@ -96,7 +97,7 @@
   }
 
  private:
-  int8_t m_op;
+  Operation m_op;
   int32_t m_modSerialNum;
   int32_t m_eventOffset;
   std::shared_ptr<CacheableKey> m_key;
@@ -105,8 +106,8 @@
   std::shared_ptr<Serializable> m_callbackArg;
   std::shared_ptr<VersionTag> m_versionTag;
   MemberListForVersionStamp& m_memberListForVersionStamp;
-  bool isDestroy(int8_t op);
-  bool isInvalidate(int8_t op);
+  bool isDestroy(Operation op);
+  bool isInvalidate(Operation op);
   void skipFilterRoutingInfo(DataInput& input);
 };
 
diff --git a/cppcache/src/FixedPartitionAttributesImpl.hpp b/cppcache/src/FixedPartitionAttributesImpl.hpp
index 4ff0386..2a8a9f1 100644
--- a/cppcache/src/FixedPartitionAttributesImpl.hpp
+++ b/cppcache/src/FixedPartitionAttributesImpl.hpp
@@ -24,7 +24,7 @@
 #include <geode/CacheableString.hpp>
 #include <geode/DataInput.hpp>
 #include <geode/DataOutput.hpp>
-#include <geode/Serializable.hpp>
+#include <geode/internal/DataSerializableInternal.hpp>
 
 namespace apache {
 namespace geode {
@@ -39,8 +39,7 @@
 
  public:
   FixedPartitionAttributesImpl()
-      : Serializable(),
-        m_partitionName(nullptr),
+      : m_partitionName(),
         m_isPrimary(false),
         m_numBuckets(1),
         m_startingBucketId(-1) {}
diff --git a/cppcache/src/FunctionExpiryTask.hpp b/cppcache/src/FunctionExpiryTask.hpp
new file mode 100644
index 0000000..cff467d
--- /dev/null
+++ b/cppcache/src/FunctionExpiryTask.hpp
@@ -0,0 +1,69 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+#ifndef GEODE_FUNCTIONEXPIRYTASK_H_
+#define GEODE_FUNCTIONEXPIRYTASK_H_
+
+#include "ExpiryTask.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
+/**
+ * @class FunctionExpiryTask FunctionExpiryTask.hpp
+ *
+ * This class is a placeholder for generic expiry tasks
+ * It runs the given callback upon expiration.
+ * Given that the callback is a std::function, it can take anything ranging
+ * from a classical function, a bound function, a lambda, or a instance of a
+ * class implementing operator()
+ */
+class FunctionExpiryTask : public ExpiryTask {
+ public:
+  using callback_t = std::function<void()>;
+
+ public:
+  /// Class constructors
+
+  /**
+   * Class constructor
+   * @param manager A reference to the ExpiryTaskManager
+   * @param callback Callback to be executed by the task
+   * @see ExpiryTask::on_expire for more info about the return value of the
+   *      callback.
+   */
+  FunctionExpiryTask(ExpiryTaskManager& manager, callback_t callback)
+      : ExpiryTask(manager), on_expire_(callback) {}
+
+ protected:
+  bool on_expire() override {
+    on_expire_();
+    return true;
+  }
+
+ protected:
+  callback_t on_expire_;
+};
+
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+#endif  // GEODE_FUNCTIONEXPIRYTASK_H_
diff --git a/dependencies/ACE/config.h.in b/cppcache/src/FunctionMacros.hpp
old mode 100755
new mode 100644
similarity index 70%
copy from dependencies/ACE/config.h.in
copy to cppcache/src/FunctionMacros.hpp
index b6ee2e8..03d426b
--- a/dependencies/ACE/config.h.in
+++ b/cppcache/src/FunctionMacros.hpp
@@ -14,23 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
-#define ACE_LACKS_IOSTREAM_TOTALLY 1
-#define ACE_HAS_VERSIONED_NAMESPACE 1
+#pragma once
+#ifndef __INC_FUNCTIONMACROS__
+#define __INC_FUNCTIONMACROS__
 
-#if __cplusplus >= 201103L
+#define INIT_GNFN(this_class)                     \
+  namespace {                                     \
+  const auto classname = std::string(this_class); \
+  }
 
-#if defined(__SUNPRO_CC)
-#define ACE_HAS_CPP11 1
-#define _RWSTD_ALLOCATOR 1
-#endif
+#define __GNFN__ (classname + "::" + __func__).c_str()
 
-#endif // __cplusplus >= 201103L
-
-#cmakedefine WITH_IPV6
-#ifdef WITH_IPV6
-#define ACE_HAS_IPV6 1
-#endif
-
-#include "ace/config-@ACE_CONFIG@.h"
-
+#endif  // __INC_FUNCTIONMACROS__
diff --git a/cppcache/src/FunctionServiceImpl.hpp b/cppcache/src/FunctionServiceImpl.hpp
deleted file mode 100644
index 8c6e51a..0000000
--- a/cppcache/src/FunctionServiceImpl.hpp
+++ /dev/null
@@ -1,60 +0,0 @@
-#pragma once
-
-#ifndef GEODE_FUNCTIONSERVICEIMPL_H_
-#define GEODE_FUNCTIONSERVICEIMPL_H_
-
-/*
- * 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.
- */
-
-#include <geode/AuthenticatedView.hpp>
-#include <geode/FunctionService.hpp>
-#include <geode/internal/geode_globals.hpp>
-/**
- * @file
- */
-
-namespace apache {
-namespace geode {
-namespace client {
-/**
- * @class FunctionService FunctionService.hpp
- * entry point for function execution
- * @see Execution
- */
-
-class APACHE_GEODE_EXPORT FunctionServiceImpl : public FunctionService {
- public:
-  explicit FunctionServiceImpl(AuthenticatedView* authenticatedView);
-
-  virtual ~FunctionServiceImpl() {}
-
- private:
-  explicit FunctionServiceImpl(const FunctionService&);
-  FunctionServiceImpl& operator=(const FunctionService&);
-
-  static std::shared_ptr<FunctionService> getFunctionService(
-      AuthenticatedView* authenticatedView);
-
-  AuthenticatedView* m_authenticatedView;
-
-  friend class AuthenticatedView;
-};
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_FUNCTIONSERVICEIMPL_H_
diff --git a/cppcache/src/InterestResultPolicy.cpp b/cppcache/src/GeodeCache.cpp
similarity index 79%
copy from cppcache/src/InterestResultPolicy.cpp
copy to cppcache/src/GeodeCache.cpp
index b043896..c8b2b04 100644
--- a/cppcache/src/InterestResultPolicy.cpp
+++ b/cppcache/src/GeodeCache.cpp
@@ -15,16 +15,13 @@
  * limitations under the License.
  */
 
-#include "InterestResultPolicy.hpp"
+#include <geode/GeodeCache.hpp>
 
 namespace apache {
 namespace geode {
 namespace client {
 
-char InterestResultPolicy::nextOrdinal = 0;
-InterestResultPolicy InterestResultPolicy::NONE;
-InterestResultPolicy InterestResultPolicy::KEYS;
-InterestResultPolicy InterestResultPolicy::KEYS_VALUES;
+GeodeCache::~GeodeCache() = default;
 
 }  // namespace client
 }  // namespace geode
diff --git a/cppcache/src/InterestResultPolicy.hpp b/cppcache/src/InterestResultPolicy.hpp
index 4bd16d5..f066a13 100644
--- a/cppcache/src/InterestResultPolicy.hpp
+++ b/cppcache/src/InterestResultPolicy.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_INTERESTRESULTPOLICY_H_
-#define GEODE_INTERESTRESULTPOLICY_H_
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -20,34 +15,28 @@
  * limitations under the License.
  */
 
-/**
- * @file
- */
-#include <geode/internal/geode_globals.hpp>
+#pragma once
+
+#ifndef GEODE_INTERESTRESULTPOLICY_H_
+#define GEODE_INTERESTRESULTPOLICY_H_
+
+#include <cstdint>
 
 namespace apache {
 namespace geode {
 namespace client {
+
 /**
- * @class InterestResultPolicy InterestResultPolicy.hpp
  * Policy class for interest result.
+ *
+ * Note: Special DataSeralizableFixedId(37) type.
  */
-class APACHE_GEODE_EXPORT InterestResultPolicy {
-  // public static methods
- public:
-  static char nextOrdinal;
-
-  static InterestResultPolicy NONE;
-  static InterestResultPolicy KEYS;
-  static InterestResultPolicy KEYS_VALUES;
-
-  char ordinal;
-
-  char getOrdinal() { return ordinal; }
-
- private:
-  InterestResultPolicy() { ordinal = nextOrdinal++; }
+enum class InterestResultPolicy : int8_t {
+  NONE = 0,
+  KEYS = 1,
+  KEYS_VALUES = 2
 };
+
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/InternalCacheTransactionManager2PCImpl.cpp b/cppcache/src/InternalCacheTransactionManager2PCImpl.cpp
index 0df0512..0d54b4c 100644
--- a/cppcache/src/InternalCacheTransactionManager2PCImpl.cpp
+++ b/cppcache/src/InternalCacheTransactionManager2PCImpl.cpp
@@ -18,9 +18,9 @@
 #include "InternalCacheTransactionManager2PCImpl.hpp"
 
 #include <geode/ExceptionTypes.hpp>
-#include <geode/PoolManager.hpp>
 #include <geode/TransactionId.hpp>
 
+#include "CacheImpl.hpp"
 #include "CacheRegionHelper.hpp"
 #include "CacheTransactionManagerImpl.hpp"
 #include "TXCleaner.hpp"
@@ -101,7 +101,7 @@
     }
   } catch (const Exception& ex) {
     LOGERROR("Unexpected exception during commit in prepare %s", ex.what());
-    throw ex;
+    throw;
   }
 }
 
@@ -200,7 +200,7 @@
   } catch (const Exception& ex) {
     LOGERROR("Unexpected exception during completing transaction %s",
              ex.what());
-    throw ex;
+    throw;
   }
 }
 }  // namespace client
diff --git a/cppcache/src/LRUAction.hpp b/cppcache/src/LRUAction.hpp
index 24142c4..24d4f02 100644
--- a/cppcache/src/LRUAction.hpp
+++ b/cppcache/src/LRUAction.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_LRUACTION_H_
-#define GEODE_LRUACTION_H_
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -20,12 +15,17 @@
  * limitations under the License.
  */
 
+#pragma once
+
+#ifndef GEODE_LRUACTION_H_
+#define GEODE_LRUACTION_H_
+
 #include <geode/Cache.hpp>
 #include <geode/PersistenceManager.hpp>
 #include <geode/internal/geode_globals.hpp>
 
 #include "CacheableToken.hpp"
-#include "MapEntry.hpp"
+#include "MapEntryImpl.hpp"
 #include "RegionInternal.hpp"
 #include "Utils.hpp"
 
@@ -37,7 +37,7 @@
  * @brief abstract behavior for different eviction actions.
  */
 class LRUEntriesMap;
-class APACHE_GEODE_EXPORT LRUAction {
+class LRUAction {
  protected:
   bool m_invalidates;
   bool m_destroys;
@@ -77,7 +77,7 @@
                                  RegionInternal* regionPtr,
                                  LRUEntriesMap* entriesMapPtr);
 
-  virtual ~LRUAction() {}
+  virtual ~LRUAction() noexcept = default;
 
   virtual bool evict(const std::shared_ptr<MapEntryImpl>& mePtr) = 0;
 
@@ -95,7 +95,7 @@
 /**
  * @brief LRUAction for destroy (distributed)
  */
-class APACHE_GEODE_EXPORT LRUDestroyAction : public virtual LRUAction {
+class LRUDestroyAction : public virtual LRUAction {
  private:
   RegionInternal* m_regionPtr;
 
@@ -106,9 +106,9 @@
   }
 
  public:
-  virtual ~LRUDestroyAction() = default;
+  ~LRUDestroyAction() noexcept override = default;
 
-  virtual bool evict(const std::shared_ptr<MapEntryImpl>& mePtr) {
+  bool evict(const std::shared_ptr<MapEntryImpl>& mePtr) override {
     std::shared_ptr<CacheableKey> keyPtr;
     mePtr->getKeyI(keyPtr);
     std::shared_ptr<VersionTag> versionTag;
@@ -124,7 +124,7 @@
     return (err == GF_NOERR);
   }
 
-  virtual LRUAction::Action getType() { return LRUAction::DESTROY; }
+  LRUAction::Action getType() override { return LRUAction::DESTROY; }
 
   friend class LRUAction;
 };
@@ -132,7 +132,7 @@
 /**
  * @brief LRUAction for invalidate.
  */
-class APACHE_GEODE_EXPORT LRULocalInvalidateAction : public virtual LRUAction {
+class LRULocalInvalidateAction : public virtual LRUAction {
  private:
   RegionInternal* m_regionPtr;
 
@@ -142,11 +142,11 @@
   }
 
  public:
-  virtual ~LRULocalInvalidateAction() = default;
+  ~LRULocalInvalidateAction() noexcept override = default;
 
-  virtual bool evict(const std::shared_ptr<MapEntryImpl>& mePtr);
+  bool evict(const std::shared_ptr<MapEntryImpl>& mePtr) override;
 
-  virtual LRUAction::Action getType() { return LRUAction::LOCAL_INVALIDATE; }
+  LRUAction::Action getType() override { return LRUAction::LOCAL_INVALIDATE; }
 
   friend class LRUAction;
 };
@@ -154,7 +154,7 @@
 /**
  * @brief LRUAction for invalidate.
  */
-class APACHE_GEODE_EXPORT LRUOverFlowToDiskAction : public virtual LRUAction {
+class LRUOverFlowToDiskAction : public virtual LRUAction {
  private:
   RegionInternal* m_regionPtr;
   LRUEntriesMap* m_entriesMapPtr;
@@ -166,11 +166,11 @@
   }
 
  public:
-  virtual ~LRUOverFlowToDiskAction() {}
+  ~LRUOverFlowToDiskAction() noexcept override {}
 
-  virtual bool evict(const std::shared_ptr<MapEntryImpl>& mePtr);
+  bool evict(const std::shared_ptr<MapEntryImpl>& mePtr) override;
 
-  virtual LRUAction::Action getType() { return LRUAction::OVERFLOW_TO_DISK; }
+  LRUAction::Action getType() override { return LRUAction::OVERFLOW_TO_DISK; }
 
   friend class LRUAction;
 };
diff --git a/cppcache/src/LRUEntriesMap.cpp b/cppcache/src/LRUEntriesMap.cpp
index 6b25985..59209ce 100644
--- a/cppcache/src/LRUEntriesMap.cpp
+++ b/cppcache/src/LRUEntriesMap.cpp
@@ -33,16 +33,16 @@
 /**
  * @brief LRUAction for testing map outside of a region....
  */
-class APACHE_GEODE_EXPORT TestMapAction : public virtual LRUAction {
+class TestMapAction : public virtual LRUAction {
  private:
   EntriesMap* m_eMap;
 
  public:
   explicit TestMapAction(EntriesMap* eMap) : m_eMap(eMap) { m_destroys = true; }
 
-  virtual ~TestMapAction() {}
+  ~TestMapAction() noexcept override = default;
 
-  virtual bool evict(const std::shared_ptr<MapEntryImpl>& mePtr) {
+  bool evict(const std::shared_ptr<MapEntryImpl>& mePtr) override {
     std::shared_ptr<CacheableKey> keyPtr;
     mePtr->getKeyI(keyPtr);
     /** @TODO try catch.... return true or false. */
@@ -52,7 +52,7 @@
     return (m_eMap->remove(keyPtr, cPtr, me, 0, versionTag, false) == GF_NOERR);
   }
 
-  virtual LRUAction::Action getType() { return LRUAction::LOCAL_DESTROY; }
+  LRUAction::Action getType() override { return LRUAction::LOCAL_DESTROY; }
   friend class LRUAction;
 };
 
@@ -104,7 +104,7 @@
   ConcurrentEntriesMap::clear();
 }
 
-LRUEntriesMap::~LRUEntriesMap() { delete m_action; }
+LRUEntriesMap::~LRUEntriesMap() noexcept { delete m_action; }
 
 /**
  * @brief put an item in the map... if it is a new entry, then the LRU may
@@ -201,7 +201,6 @@
                                     std::shared_ptr<MapEntryImpl>& me,
                                     std::shared_ptr<Cacheable>& oldValue,
                                     std::shared_ptr<VersionTag> versionTag) {
-  int64_t newSize = 0;
   MapSegment* segmentRPtr = segmentFor(key);
   bool isTokenAdded = false;
   GfErrType err =
@@ -236,7 +235,7 @@
   if (!isOldValueToken) {
     --m_validEntries;
     lru_queue_.remove(me);
-    newSize = CacheableToken::invalid()->objectSize();
+    auto newSize = CacheableToken::invalid()->objectSize();
     if (oldValue != nullptr) {
       newSize -= oldValue->objectSize();
     } else {
@@ -441,7 +440,6 @@
   GfErrType err;
   if ((err = segmentRPtr->remove(key, result, me, updateCount, versionTag,
                                  afterRemote, isEntryFound)) == GF_NOERR) {
-    // ACE_Guard<MapSegment> _guard(*segmentRPtr);
     if (result != nullptr && me != nullptr) {
       lru_queue_.remove(me);
       LRUEntryProperties& lru_prop = me->getLRUProperties();
diff --git a/cppcache/src/LRUEntriesMap.hpp b/cppcache/src/LRUEntriesMap.hpp
index 2c7f0e9..ab94c75 100644
--- a/cppcache/src/LRUEntriesMap.hpp
+++ b/cppcache/src/LRUEntriesMap.hpp
@@ -35,28 +35,14 @@
 namespace apache {
 namespace geode {
 namespace client {
+
 class EvictionController;
 
 /**
  * @brief Concurrent entries map with LRU behavior.
  * Not designed for subclassing...
  */
-
-/* adongre
- * CID 28728: Other violation (MISSING_COPY)
- * Class "apache::geode::client::LRUEntriesMap" owns resources that are managed
- * in its
- * constructor and destructor but has no user-written copy constructor.
- *
- * FIX : Make the class non copyable
- *
- * CID 28714: Other violation (MISSING_ASSIGN)
- * Class "apache::geode::client::LRUEntriesMap" owns resources that are managed
- * in
- * its constructor and destructor but has no user-written assignment operator.
- * Fix : Make the class Non Assinable
- */
-class APACHE_GEODE_EXPORT LRUEntriesMap : public ConcurrentEntriesMap {
+class LRUEntriesMap : public ConcurrentEntriesMap {
  protected:
   using spinlock_mutex = ::apache::geode::util::concurrent::spinlock_mutex;
 
@@ -80,32 +66,31 @@
                 const uint32_t limit, bool concurrencyChecksEnabled,
                 const uint8_t concurrency = 16, bool heapLRUEnabled = false);
 
-  virtual ~LRUEntriesMap();
+  ~LRUEntriesMap() noexcept override;
 
-  virtual GfErrType put(const std::shared_ptr<CacheableKey>& key,
-                        const std::shared_ptr<Cacheable>& newValue,
-                        std::shared_ptr<MapEntryImpl>& me,
-                        std::shared_ptr<Cacheable>& oldValue, int updateCount,
-                        int destroyTracker,
-                        std::shared_ptr<VersionTag> versionTag,
-                        bool& isUpdate = EntriesMap::boolVal,
-                        DataInput* delta = nullptr);
-  virtual GfErrType invalidate(const std::shared_ptr<CacheableKey>& key,
-                               std::shared_ptr<MapEntryImpl>& me,
-                               std::shared_ptr<Cacheable>& oldValue,
-                               std::shared_ptr<VersionTag> versionTag);
-  virtual GfErrType create(const std::shared_ptr<CacheableKey>& key,
-                           const std::shared_ptr<Cacheable>& newValue,
-                           std::shared_ptr<MapEntryImpl>& me,
-                           std::shared_ptr<Cacheable>& oldValue,
-                           int updateCount, int destroyTracker,
-                           std::shared_ptr<VersionTag> versionTag);
-  virtual bool get(const std::shared_ptr<CacheableKey>& key,
-                   std::shared_ptr<Cacheable>& value,
-                   std::shared_ptr<MapEntryImpl>& me);
-  virtual std::shared_ptr<Cacheable> getFromDisk(
+  GfErrType put(const std::shared_ptr<CacheableKey>& key,
+                const std::shared_ptr<Cacheable>& newValue,
+                std::shared_ptr<MapEntryImpl>& me,
+                std::shared_ptr<Cacheable>& oldValue, int updateCount,
+                int destroyTracker, std::shared_ptr<VersionTag> versionTag,
+                bool& isUpdate = EntriesMap::boolVal,
+                DataInput* delta = nullptr) override;
+  GfErrType invalidate(const std::shared_ptr<CacheableKey>& key,
+                       std::shared_ptr<MapEntryImpl>& me,
+                       std::shared_ptr<Cacheable>& oldValue,
+                       std::shared_ptr<VersionTag> versionTag) override;
+  GfErrType create(const std::shared_ptr<CacheableKey>& key,
+                   const std::shared_ptr<Cacheable>& newValue,
+                   std::shared_ptr<MapEntryImpl>& me,
+                   std::shared_ptr<Cacheable>& oldValue, int updateCount,
+                   int destroyTracker,
+                   std::shared_ptr<VersionTag> versionTag) override;
+  bool get(const std::shared_ptr<CacheableKey>& key,
+           std::shared_ptr<Cacheable>& value,
+           std::shared_ptr<MapEntryImpl>& me) override;
+  std::shared_ptr<Cacheable> getFromDisk(
       const std::shared_ptr<CacheableKey>& key,
-      std::shared_ptr<MapEntryImpl>& me) const;
+      std::shared_ptr<MapEntryImpl>& me) const override;
   GfErrType processLRU();
   void processLRU(int32_t numEntriesToEvict);
   GfErrType evictionHelper();
@@ -115,16 +100,12 @@
     m_pmPtr = pmPtr;
   }
 
-  /**
-   * @brief remove an entry, marking it evicted for LRUList maintainance.
-   */
-  virtual GfErrType remove(const std::shared_ptr<CacheableKey>& key,
-                           std::shared_ptr<Cacheable>& result,
-                           std::shared_ptr<MapEntryImpl>& me, int updateCount,
-                           std::shared_ptr<VersionTag> versionTag,
-                           bool afterRemote);
-
-  virtual void close();
+  GfErrType remove(const std::shared_ptr<CacheableKey>& key,
+                   std::shared_ptr<Cacheable>& result,
+                   std::shared_ptr<MapEntryImpl>& me, int updateCount,
+                   std::shared_ptr<VersionTag> versionTag,
+                   bool afterRemote) override;
+  void close() override;
 
   inline bool mustEvict() const {
     if (m_action == nullptr) {
@@ -144,9 +125,10 @@
 
   inline void adjustLimit(uint32_t limit) { m_limit = limit; }
 
-  virtual void clear();
+  void clear() override;
 
 };  // class LRUEntriesMap
+
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/LRUExpMapEntry.hpp b/cppcache/src/LRUExpMapEntry.hpp
index d462bc7..6d25d68 100644
--- a/cppcache/src/LRUExpMapEntry.hpp
+++ b/cppcache/src/LRUExpMapEntry.hpp
@@ -22,8 +22,9 @@
 
 #include <geode/internal/geode_globals.hpp>
 
+#include "ExpEntryProperties.hpp"
 #include "LRUEntryProperties.hpp"
-#include "MapEntry.hpp"
+#include "MapEntryImpl.hpp"
 #include "VersionStamp.hpp"
 
 namespace apache {
@@ -32,19 +33,22 @@
 /**
  * @brief Hold region mapped entry value and lru information.
  */
-class APACHE_GEODE_EXPORT LRUExpMapEntry : public MapEntryImpl,
-                                           public LRUEntryProperties,
-                                           public ExpEntryProperties {
+class LRUExpMapEntry : public MapEntryImpl,
+                       public LRUEntryProperties,
+                       public ExpEntryProperties {
  public:
-  virtual ~LRUExpMapEntry() {}
+  LRUExpMapEntry(const LRUExpMapEntry&) = delete;
+  LRUExpMapEntry& operator=(const LRUExpMapEntry&) = delete;
 
-  virtual LRUEntryProperties& getLRUProperties() { return *this; }
+  ~LRUExpMapEntry() noexcept override = default;
 
-  virtual ExpEntryProperties& getExpProperties() { return *this; }
+  LRUEntryProperties& getLRUProperties() override { return *this; }
 
-  virtual void cleanup(const CacheEventFlags eventFlags) {
+  ExpEntryProperties& getExpProperties() override { return *this; }
+
+  void cleanup(const CacheEventFlags eventFlags) override {
     if (!eventFlags.isExpiration()) {
-      cancelExpiryTaskId(m_key);
+      cancel_task();
     }
   }
 
@@ -57,19 +61,16 @@
   inline LRUExpMapEntry(ExpiryTaskManager* expiryTaskManager,
                         const std::shared_ptr<CacheableKey>& key)
       : MapEntryImpl(key), ExpEntryProperties(expiryTaskManager) {}
-
- private:
-  // disabled
-  LRUExpMapEntry(const LRUExpMapEntry&);
-  LRUExpMapEntry& operator=(const LRUExpMapEntry&);
 };
 
-class APACHE_GEODE_EXPORT VersionedLRUExpMapEntry : public LRUExpMapEntry,
-                                                    public VersionStamp {
+class VersionedLRUExpMapEntry : public LRUExpMapEntry, public VersionStamp {
  public:
-  virtual ~VersionedLRUExpMapEntry() {}
+  VersionedLRUExpMapEntry(const VersionedLRUExpMapEntry&) = delete;
+  VersionedLRUExpMapEntry& operator=(const VersionedLRUExpMapEntry&) = delete;
 
-  virtual VersionStamp& getVersionStamp() { return *this; }
+  ~VersionedLRUExpMapEntry() noexcept override = default;
+
+  VersionStamp& getVersionStamp() override { return *this; }
 
  protected:
   inline explicit VersionedLRUExpMapEntry(bool) : LRUExpMapEntry(true) {}
@@ -77,22 +78,17 @@
   inline VersionedLRUExpMapEntry(ExpiryTaskManager* expiryTaskManager,
                                  const std::shared_ptr<CacheableKey>& key)
       : LRUExpMapEntry(expiryTaskManager, key) {}
-
- private:
-  // disabled
-  VersionedLRUExpMapEntry(const VersionedLRUExpMapEntry&);
-  VersionedLRUExpMapEntry& operator=(const VersionedLRUExpMapEntry&);
 };
 
-class APACHE_GEODE_EXPORT LRUExpEntryFactory : public EntryFactory {
+class LRUExpEntryFactory : public EntryFactory {
  public:
   using EntryFactory::EntryFactory;
 
-  virtual ~LRUExpEntryFactory() {}
+  ~LRUExpEntryFactory() noexcept override = default;
 
-  virtual void newMapEntry(ExpiryTaskManager* expiryTaskManager,
-                           const std::shared_ptr<CacheableKey>& key,
-                           std::shared_ptr<MapEntryImpl>& result) const;
+  void newMapEntry(ExpiryTaskManager* expiryTaskManager,
+                   const std::shared_ptr<CacheableKey>& key,
+                   std::shared_ptr<MapEntryImpl>& result) const override;
 };
 }  // namespace client
 }  // namespace geode
diff --git a/cppcache/src/LRULocalDestroyAction.hpp b/cppcache/src/LRULocalDestroyAction.hpp
index 4ce209d..2e90339 100644
--- a/cppcache/src/LRULocalDestroyAction.hpp
+++ b/cppcache/src/LRULocalDestroyAction.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_LRULOCALDESTROYACTION_H_
-#define GEODE_LRULOCALDESTROYACTION_H_
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -20,6 +15,11 @@
  * limitations under the License.
  */
 
+#pragma once
+
+#ifndef GEODE_LRULOCALDESTROYACTION_H_
+#define GEODE_LRULOCALDESTROYACTION_H_
+
 #include <atomic>
 
 #include <geode/internal/geode_globals.hpp>
@@ -35,7 +35,7 @@
 /**
  * @brief LRUAction for localDestroy.
  */
-class APACHE_GEODE_EXPORT LRULocalDestroyAction : public virtual LRUAction {
+class LRULocalDestroyAction : public virtual LRUAction {
  private:
   RegionInternal* m_regionPtr;
   LRUEntriesMap* m_entriesMapPtr;
@@ -46,13 +46,14 @@
   }
 
  public:
-  virtual ~LRULocalDestroyAction() {}
+  ~LRULocalDestroyAction() noexcept override = default;
 
-  virtual bool evict(const std::shared_ptr<MapEntryImpl>& mePtr);
+  bool evict(const std::shared_ptr<MapEntryImpl>& mePtr) override;
 
-  virtual LRUAction::Action getType() { return LRUAction::LOCAL_DESTROY; }
+  LRUAction::Action getType() override { return LRUAction::LOCAL_DESTROY; }
   friend class LRUAction;
 };
+
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/LRUMapEntry.hpp b/cppcache/src/LRUMapEntry.hpp
index bd16b56..46758d6 100644
--- a/cppcache/src/LRUMapEntry.hpp
+++ b/cppcache/src/LRUMapEntry.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_LRUMAPENTRY_H_
-#define GEODE_LRUMAPENTRY_H_
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -20,16 +15,22 @@
  * limitations under the License.
  */
 
+#pragma once
+
+#ifndef GEODE_LRUMAPENTRY_H_
+#define GEODE_LRUMAPENTRY_H_
+
 #include <geode/CacheableKey.hpp>
 #include <geode/internal/geode_globals.hpp>
 
 #include "LRUEntryProperties.hpp"
-#include "MapEntry.hpp"
+#include "MapEntryImpl.hpp"
 #include "VersionStamp.hpp"
 
 namespace apache {
 namespace geode {
 namespace client {
+
 /**
  * This template class adds the recently used, eviction bits and persistence
  * info to the MapEntry class. The earlier design looked like below:
@@ -60,14 +61,16 @@
  *
  *
  */
-class APACHE_GEODE_EXPORT LRUMapEntry : public MapEntryImpl,
-                                        public LRUEntryProperties {
+class LRUMapEntry : public MapEntryImpl, public LRUEntryProperties {
  public:
-  virtual ~LRUMapEntry() {}
+  LRUMapEntry(const LRUMapEntry&) = delete;
+  LRUMapEntry& operator=(const LRUMapEntry&) = delete;
 
-  virtual LRUEntryProperties& getLRUProperties() { return *this; }
+  ~LRUMapEntry() noexcept override = default;
 
-  virtual void cleanup(const CacheEventFlags eventFlags) {
+  LRUEntryProperties& getLRUProperties() override { return *this; }
+
+  void cleanup(const CacheEventFlags eventFlags) override {
     if (!eventFlags.isEviction()) {
       // TODO:  this needs an implementation of doubly-linked list
       // to remove from the list; also add this to LRUExpMapEntry since MI
@@ -81,42 +84,35 @@
 
   inline explicit LRUMapEntry(const std::shared_ptr<CacheableKey>& key)
       : MapEntryImpl(key) {}
-
- private:
-  // disabled
-  LRUMapEntry(const LRUMapEntry&);
-  LRUMapEntry& operator=(const LRUMapEntry&);
 };
 
-class APACHE_GEODE_EXPORT VersionedLRUMapEntry : public LRUMapEntry,
-                                                 public VersionStamp {
+class VersionedLRUMapEntry : public LRUMapEntry, public VersionStamp {
  public:
-  virtual ~VersionedLRUMapEntry() {}
+  VersionedLRUMapEntry(const VersionedLRUMapEntry&) = delete;
+  VersionedLRUMapEntry& operator=(const VersionedLRUMapEntry&) = delete;
 
-  virtual VersionStamp& getVersionStamp() { return *this; }
+  ~VersionedLRUMapEntry() noexcept override = default;
+
+  VersionStamp& getVersionStamp() override { return *this; }
 
  protected:
   inline explicit VersionedLRUMapEntry(bool) : LRUMapEntry(true) {}
 
   inline explicit VersionedLRUMapEntry(const std::shared_ptr<CacheableKey>& key)
       : LRUMapEntry(key) {}
-
- private:
-  // disabled
-  VersionedLRUMapEntry(const VersionedLRUMapEntry&);
-  VersionedLRUMapEntry& operator=(const VersionedLRUMapEntry&);
 };
 
-class APACHE_GEODE_EXPORT LRUEntryFactory : public EntryFactory {
+class LRUEntryFactory : public EntryFactory {
  public:
   using EntryFactory::EntryFactory;
 
-  virtual ~LRUEntryFactory() {}
+  ~LRUEntryFactory() noexcept override = default;
 
-  virtual void newMapEntry(ExpiryTaskManager* expiryTaskManager,
-                           const std::shared_ptr<CacheableKey>& key,
-                           std::shared_ptr<MapEntryImpl>& result) const;
+  void newMapEntry(ExpiryTaskManager* expiryTaskManager,
+                   const std::shared_ptr<CacheableKey>& key,
+                   std::shared_ptr<MapEntryImpl>& result) const override;
 };
+
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/LRUQueue.cpp b/cppcache/src/LRUQueue.cpp
index e9237ee..3b5d386 100644
--- a/cppcache/src/LRUQueue.cpp
+++ b/cppcache/src/LRUQueue.cpp
@@ -20,7 +20,7 @@
 #include <mutex>
 
 #include "LRUEntryProperties.hpp"
-#include "MapEntry.hpp"
+#include "MapEntryImpl.hpp"
 
 namespace apache {
 namespace geode {
diff --git a/cppcache/src/LocalRegion.cpp b/cppcache/src/LocalRegion.cpp
index 8ce50d8..38c2096 100644
--- a/cppcache/src/LocalRegion.cpp
+++ b/cppcache/src/LocalRegion.cpp
@@ -17,25 +17,31 @@
 
 #include "LocalRegion.hpp"
 
-#include <sstream>
 #include <vector>
 
+#include <boost/regex.hpp>
+#include <boost/thread/lock_types.hpp>
+
 #include <geode/PoolManager.hpp>
 #include <geode/SystemProperties.hpp>
+#include <geode/internal/DataSerializablePrimitive.hpp>
 
 #include "CacheImpl.hpp"
 #include "CacheRegionHelper.hpp"
 #include "CacheableToken.hpp"
-#include "EntryExpiryHandler.hpp"
+#include "EntriesMapFactory.hpp"
+#include "EntryExpiryTask.hpp"
 #include "ExpiryTaskManager.hpp"
+#include "InterestResultPolicy.hpp"
 #include "LRUEntriesMap.hpp"
-#include "RegionExpiryHandler.hpp"
+#include "RegionExpiryTask.hpp"
 #include "RegionGlobalLocks.hpp"
 #include "SerializableHelper.hpp"
 #include "TXState.hpp"
 #include "TcrConnectionManager.hpp"
 #include "Utils.hpp"
 #include "VersionTag.hpp"
+#include "VersionedCacheableObjectPartList.hpp"
 #include "util/Log.hpp"
 #include "util/bounds.hpp"
 #include "util/exception.hpp"
@@ -44,6 +50,8 @@
 namespace geode {
 namespace client {
 
+using internal::DataSerializablePrimitive;
+
 LocalRegion::LocalRegion(const std::string& name, CacheImpl* cacheImpl,
                          const std::shared_ptr<RegionInternal>& rPtr,
                          RegionAttributes attributes,
@@ -53,6 +61,7 @@
       m_name(name),
       m_parentRegion(rPtr),
       m_destroyPending(false),
+      expiry_task_id_(ExpiryTask::invalid()),
       m_listener(nullptr),
       m_writer(nullptr),
       m_loader(nullptr),
@@ -93,7 +102,7 @@
 
   m_regionStats = new RegionStats(
       cacheImpl->getStatisticsManager().getStatisticsFactory(), m_fullPath);
-  auto p = cacheImpl->getPoolManager().find(getAttributes().getPoolName());
+  auto p = cacheImpl->getPoolManager().find(m_regionAttributes.getPoolName());
   setPool(p);
 }
 
@@ -102,32 +111,35 @@
 const std::string& LocalRegion::getFullPath() const { return m_fullPath; }
 
 std::shared_ptr<Region> LocalRegion::getParentRegion() const {
-  CHECK_DESTROY_PENDING(TryReadGuard, LocalRegion::getParentRegion);
+  CHECK_DESTROY_PENDING(shared_lock, LocalRegion::getParentRegion);
   return m_parentRegion;
 }
 
 void LocalRegion::updateAccessAndModifiedTime(bool modified) {
   // locking not required since setters use atomic operations
-  if (regionExpiryEnabled()) {
-    auto now = std::chrono::system_clock::now();
-    auto timeStr = to_string(now.time_since_epoch());
-    LOGDEBUG("Setting last accessed time for region %s to %s",
+  if (!regionExpiryEnabled()) {
+    return;
+  }
+
+  auto now = std::chrono::steady_clock::now();
+  auto timeStr = to_string(now.time_since_epoch());
+  LOGDEBUG("Setting last accessed time for region %s to %s",
+           getFullPath().c_str(), timeStr.c_str());
+  m_cacheStatistics->setLastAccessedTime(now);
+  if (modified) {
+    LOGDEBUG("Setting last modified time for region %s to %s",
              getFullPath().c_str(), timeStr.c_str());
-    m_cacheStatistics->setLastAccessedTime(now);
-    if (modified) {
-      LOGDEBUG("Setting last modified time for region %s to %s",
-               getFullPath().c_str(), timeStr.c_str());
-      m_cacheStatistics->setLastModifiedTime(now);
-    }
-    // TODO:  should we really touch the parent region??
-    RegionInternal* ri = dynamic_cast<RegionInternal*>(m_parentRegion.get());
-    if (ri != nullptr) {
-      ri->updateAccessAndModifiedTime(modified);
-    }
+    m_cacheStatistics->setLastModifiedTime(now);
+  }
+  // TODO:  should we really touch the parent region??
+  RegionInternal* ri = dynamic_cast<RegionInternal*>(m_parentRegion.get());
+  if (ri != nullptr) {
+    ri->updateAccessAndModifiedTime(modified);
   }
 }
+
 std::shared_ptr<CacheStatistics> LocalRegion::getStatistics() const {
-  CHECK_DESTROY_PENDING(TryReadGuard, LocalRegion::getStatistics);
+  CHECK_DESTROY_PENDING(shared_lock, LocalRegion::getStatistics);
 
   if (!m_cacheImpl->getDistributedSystem()
            .getSystemProperties()
@@ -208,7 +220,7 @@
 }
 
 std::shared_ptr<Region> LocalRegion::getSubregion(const std::string& path) {
-  CHECK_DESTROY_PENDING(TryReadGuard, LocalRegion::getSubregion);
+  CHECK_DESTROY_PENDING(shared_lock, LocalRegion::getSubregion);
 
   static const std::string slash("/");
   if (path == slash || path.empty()) {
@@ -241,7 +253,7 @@
 
 std::shared_ptr<Region> LocalRegion::createSubregion(
     const std::string& subregionName, RegionAttributes regionAttributes) {
-  CHECK_DESTROY_PENDING(TryWriteGuard, LocalRegion::createSubregion);
+  CHECK_DESTROY_PENDING(unique_lock, LocalRegion::createSubregion);
   {
     std::string namestr = subregionName;
     if (namestr.find('/') != std::string::npos) {
@@ -272,6 +284,7 @@
     auto pmPtr = regionAttributes.getPersistenceManager();
     if (pmPtr == nullptr) {
       throw NullPointerException(
+
           "PersistenceManager could not be instantiated");
     }
     auto props = regionAttributes.getPersistenceProperties();
@@ -290,7 +303,7 @@
 
 std::vector<std::shared_ptr<Region>> LocalRegion::subregions(
     const bool recursive) {
-  CHECK_DESTROY_PENDING(TryReadGuard, LocalRegion::subregions);
+  CHECK_DESTROY_PENDING(shared_lock, LocalRegion::subregions);
   if (m_subRegions.empty()) {
     return std::vector<std::shared_ptr<Region>>();
   }
@@ -319,7 +332,7 @@
   }
 
   std::shared_ptr<MapEntryImpl> mePtr;
-  CHECK_DESTROY_PENDING(TryReadGuard, LocalRegion::getEntry);
+  CHECK_DESTROY_PENDING(shared_lock, LocalRegion::getEntry);
   if (m_regionAttributes.getCachingEnabled()) {
     m_entries->getEntry(key, mePtr, valuePtr);
   }
@@ -442,6 +455,13 @@
   throwExceptionIfError("Region::destroy", err);
 }
 
+GfErrType LocalRegion::localDestroyNoCallbacks(
+    const std::shared_ptr<CacheableKey>& key) {
+  return destroyNoThrow(key, nullptr, -1,
+                        CacheEventFlags::LOCAL | CacheEventFlags::NOCALLBACKS,
+                        nullptr);
+}
+
 void LocalRegion::localDestroy(
     const std::shared_ptr<CacheableKey>& key,
     const std::shared_ptr<Serializable>& aCallbackArgument) {
@@ -525,7 +545,7 @@
 }
 
 std::vector<std::shared_ptr<CacheableKey>> LocalRegion::keys() {
-  CHECK_DESTROY_PENDING(TryReadGuard, LocalRegion::keys);
+  CHECK_DESTROY_PENDING(shared_lock, LocalRegion::keys);
   return keys_internal();
 }
 
@@ -535,7 +555,7 @@
 }
 
 std::vector<std::shared_ptr<Cacheable>> LocalRegion::values() {
-  CHECK_DESTROY_PENDING(TryReadGuard, LocalRegion::values);
+  CHECK_DESTROY_PENDING(shared_lock, LocalRegion::values);
 
   std::vector<std::shared_ptr<Cacheable>> values;
 
@@ -548,7 +568,7 @@
 }
 
 std::vector<std::shared_ptr<RegionEntry>> LocalRegion::entries(bool recursive) {
-  CHECK_DESTROY_PENDING(TryReadGuard, LocalRegion::entries);
+  CHECK_DESTROY_PENDING(shared_lock, LocalRegion::entries);
 
   std::vector<std::shared_ptr<RegionEntry>> entries;
 
@@ -589,7 +609,7 @@
 }
 
 uint32_t LocalRegion::size_remote() {
-  CHECK_DESTROY_PENDING(TryReadGuard, LocalRegion::size);
+  CHECK_DESTROY_PENDING(shared_lock, LocalRegion::size);
   if (m_regionAttributes.getCachingEnabled()) {
     return m_entries->size();
   }
@@ -608,18 +628,18 @@
   return LocalRegion::size_remote();
 }
 RegionService& LocalRegion::getRegionService() const {
-  CHECK_DESTROY_PENDING(TryReadGuard, LocalRegion::getRegionService);
+  CHECK_DESTROY_PENDING(shared_lock, LocalRegion::getRegionService);
   return *m_cacheImpl->getCache();
 }
 
 CacheImpl* LocalRegion::getCacheImpl() const {
-  CHECK_DESTROY_PENDING(TryReadGuard, LocalRegion::getCache);
+  CHECK_DESTROY_PENDING(shared_lock, LocalRegion::getCache);
   return m_cacheImpl;
 }
 
 bool LocalRegion::containsValueForKey_remote(
     const std::shared_ptr<CacheableKey>& keyPtr) const {
-  CHECK_DESTROY_PENDING(TryReadGuard, LocalRegion::containsValueForKey);
+  CHECK_DESTROY_PENDING(shared_lock, LocalRegion::containsValueForKey);
   if (!m_regionAttributes.getCachingEnabled()) {
     return false;
   }
@@ -671,7 +691,7 @@
         "LocalRegion::containsKey: "
         "key is null");
   }
-  CHECK_DESTROY_PENDING(TryReadGuard, LocalRegion::containsKey);
+  CHECK_DESTROY_PENDING(shared_lock, LocalRegion::containsKey);
   return containsKey_internal(keyPtr);
 }
 
@@ -686,53 +706,53 @@
 }
 
 void LocalRegion::setRegionExpiryTask() {
-  if (regionExpiryEnabled()) {
-    auto rptr = std::static_pointer_cast<RegionInternal>(shared_from_this());
-    const auto& duration = getRegionExpiryDuration();
-    auto handler =
-        new RegionExpiryHandler(rptr, getRegionExpiryAction(), duration);
-    auto expiryTaskId =
-        rptr->getCacheImpl()->getExpiryTaskManager().scheduleExpiryTask(
-            handler, duration, std::chrono::seconds::zero());
-    handler->setExpiryTaskId(expiryTaskId);
-    auto durationStr = to_string(duration);
-    auto expiryTaskIdStr = std::to_string(expiryTaskId);
-    LOGFINE(
-        "expiry for region [%s], expiry task id = %s, duration = %s, "
-        "action = %d",
-        m_fullPath.c_str(), expiryTaskIdStr.c_str(), durationStr.c_str(),
-        getRegionExpiryAction());
+  if (!regionExpiryEnabled()) {
+    return;
   }
+
+  auto& manager = getCacheImpl()->getExpiryTaskManager();
+  auto rptr = std::static_pointer_cast<RegionInternal>(shared_from_this());
+  const auto& duration = getRegionExpiryDuration();
+  auto&& task = std::make_shared<RegionExpiryTask>(
+      manager, rptr, getRegionExpiryAction(), duration);
+  expiry_task_id_ = manager.schedule(task, duration);
+  LOGFINE(
+      "expiry for region [%s], expiry task id = %zu, duration = %s, "
+      "action = %d",
+      m_fullPath.c_str(), expiry_task_id_, to_string(duration).c_str(),
+      getRegionExpiryAction());
 }
 
 void LocalRegion::registerEntryExpiryTask(
     std::shared_ptr<MapEntryImpl>& entry) {
   // locking is not required here since only the thread that creates
   // the entry will register the expiry task for that entry
+
   ExpEntryProperties& expProps = entry->getExpProperties();
-  expProps.initStartTime();
-  auto rptr = std::static_pointer_cast<RegionInternal>(shared_from_this());
   const auto& duration = getEntryExpiryDuration();
-  auto handler =
-      new EntryExpiryHandler(rptr, entry, getEntryExpirationAction(), duration);
-  auto id = rptr->getCacheImpl()->getExpiryTaskManager().scheduleExpiryTask(
-      handler, duration, std::chrono::seconds::zero());
-  if (Log::finestEnabled()) {
+  auto& manager = getCacheImpl()->getExpiryTaskManager();
+  auto region = std::static_pointer_cast<RegionInternal>(shared_from_this());
+  auto task = std::make_shared<EntryExpiryTask>(
+      manager, region, entry, getEntryExpirationAction(), duration);
+  auto id = manager.schedule(std::move(task), duration);
+  expProps.task_id(id);
+
+  if (Log::enabled(LogLevel::Finest)) {
     std::shared_ptr<CacheableKey> key;
     entry->getKeyI(key);
     LOGFINEST(
-        "entry expiry in region [%s], key [%s], task id = %d, "
+        "entry expiry in region [%s], key [%s], task id = %zu, "
         "duration = %s, action = %d",
-        m_fullPath.c_str(), Utils::nullSafeToString(key).c_str(),
-        static_cast<int32_t>(id), to_string(duration).c_str(),
-        getEntryExpirationAction());
+        m_fullPath.c_str(), Utils::nullSafeToString(key).c_str(), id,
+        to_string(duration).c_str(), getEntryExpirationAction());
   }
-  expProps.setExpiryTaskId(id);
 }
 
 LocalRegion::~LocalRegion() noexcept {
-  TryWriteGuard guard(m_rwLock, m_destroyPending);
+  boost::unique_lock<decltype(mutex_)> guard{mutex_};
   if (!m_destroyPending) {
+    // TODO suspect
+    // NOLINTNEXTLINE(clang-analyzer-optin.cplusplus.VirtualCall)
     release(false);
   }
   m_listener = nullptr;
@@ -832,7 +852,7 @@
     const std::shared_ptr<CacheableKey>& keyPtr,
     std::shared_ptr<Cacheable>& value,
     const std::shared_ptr<Serializable>& aCallbackArgument) {
-  CHECK_DESTROY_PENDING_NOTHROW(TryReadGuard);
+  CHECK_DESTROY_PENDING_NOTHROW(shared_lock);
   GfErrType err = GF_NOERR;
 
   if (keyPtr == nullptr) {
@@ -1011,7 +1031,7 @@
     const std::shared_ptr<HashMapOfException>& exceptions,
     const bool addToLocalCache,
     const std::shared_ptr<Serializable>& aCallbackArgument) {
-  CHECK_DESTROY_PENDING_NOTHROW(TryReadGuard);
+  CHECK_DESTROY_PENDING_NOTHROW(shared_lock);
   GfErrType err = GF_NOERR;
   std::shared_ptr<Cacheable> value;
 
@@ -1625,7 +1645,7 @@
     return err;
   }
 
-  CHECK_DESTROY_PENDING_NOTHROW(TryReadGuard);
+  CHECK_DESTROY_PENDING_NOTHROW(shared_lock);
 
   TAction action(*this);
   TXState* txState = action.m_txState;
@@ -1745,12 +1765,16 @@
       m_entries->removeTrackerForEntry(key);
     }
   }
-  // invokeCacheListenerForEntryEvent method has the check that if oldValue
-  // is a CacheableToken then it sets it to nullptr; also determines if it
-  // should be AFTER_UPDATE or AFTER_CREATE depending on oldValue
-  err =
-      invokeCacheListenerForEntryEvent(key, oldValue, value, aCallbackArgument,
-                                       eventFlags, TAction::s_afterEventType);
+
+  if (!eventFlags.isNoCallbacks()) {
+    // invokeCacheListenerForEntryEvent method has the check that if oldValue
+    // is a CacheableToken then it sets it to nullptr; also determines if it
+    // should be AFTER_UPDATE or AFTER_CREATE depending on oldValue
+    err = invokeCacheListenerForEntryEvent(key, oldValue, value,
+                                           aCallbackArgument, eventFlags,
+                                           TAction::s_afterEventType);
+  }
+
   return err;
 }
 
@@ -1767,7 +1791,7 @@
     return err;
   }
 
-  CHECK_DESTROY_PENDING_NOTHROW(TryReadGuard);
+  CHECK_DESTROY_PENDING_NOTHROW(shared_lock);
   TAction action(*this);
 
   bool cachingEnabled = m_regionAttributes.getCachingEnabled();
@@ -1907,7 +1931,7 @@
 GfErrType LocalRegion::putAllNoThrow(
     const HashMapOfCacheable& map, std::chrono::milliseconds timeout,
     const std::shared_ptr<Serializable>& aCallbackArgument) {
-  CHECK_DESTROY_PENDING_NOTHROW(TryReadGuard);
+  CHECK_DESTROY_PENDING_NOTHROW(shared_lock);
   GfErrType err = GF_NOERR;
   // std::shared_ptr<VersionTag> versionTag;
   std::shared_ptr<VersionedCacheableObjectPartList>
@@ -2083,7 +2107,7 @@
     const std::vector<std::shared_ptr<CacheableKey>>& keys,
     const std::shared_ptr<Serializable>& aCallbackArgument) {
   // 1. check destroy pending
-  CHECK_DESTROY_PENDING_NOTHROW(TryReadGuard);
+  CHECK_DESTROY_PENDING_NOTHROW(shared_lock);
   GfErrType err = GF_NOERR;
   std::shared_ptr<VersionedCacheableObjectPartList> versionedObjPartListPtr;
 
@@ -2182,8 +2206,12 @@
   /*Update the stats for clear*/
   m_regionStats->incClears();
   GfErrType err = GF_NOERR;
-  TryReadGuard guard(m_rwLock, m_destroyPending);
-  if (m_released || m_destroyPending) return err;
+  boost::shared_lock<decltype(mutex_)> guard{mutex_};
+
+  if (m_released || m_destroyPending) {
+    return err;
+  }
+
   if (!invokeCacheWriterForRegionEvent(aCallbackArgument, eventFlags,
                                        BEFORE_REGION_CLEAR)) {
     LOGFINE("Cache writer prevented region clear");
@@ -2204,7 +2232,7 @@
   if (keyPtr == nullptr) {
     return GF_CACHE_ILLEGAL_ARGUMENT_EXCEPTION;
   }
-  CHECK_DESTROY_PENDING_NOTHROW(TryReadGuard);
+  CHECK_DESTROY_PENDING_NOTHROW(shared_lock);
 
   GfErrType err = GF_NOERR;
 
@@ -2284,7 +2312,7 @@
 GfErrType LocalRegion::invalidateRegionNoThrow(
     const std::shared_ptr<Serializable>& aCallbackArgument,
     const CacheEventFlags eventFlags) {
-  CHECK_DESTROY_PENDING_NOTHROW(TryReadGuard);
+  CHECK_DESTROY_PENDING_NOTHROW(shared_lock);
   GfErrType err = GF_NOERR;
 
   if (m_regionAttributes.getCachingEnabled()) {
@@ -2345,7 +2373,7 @@
     }
   }
 
-  TryWriteGuard guard(m_rwLock, m_destroyPending);
+  boost::unique_lock<decltype(mutex_)> guard{mutex_};
   if (m_destroyPending) {
     if (eventFlags.isCacheClose()) {
       return GF_NOERR;
@@ -2491,7 +2519,7 @@
              Utils::nullSafeToString(value).c_str());
     // entry/region expiration
     if (entryExpiryEnabled()) {
-      if (isUpdate && entry->getExpProperties().getExpiryTaskId() != -1) {
+      if (isUpdate && entry->getExpProperties().task_scheduled()) {
         updateAccessAndModifiedTimeForEntry(entry, true);
       } else {
         registerEntryExpiryTask(entry);
@@ -2810,28 +2838,28 @@
   // locking is not required since setters use atomic operations
   if (ptr != nullptr && entryExpiryEnabled()) {
     ExpEntryProperties& expProps = ptr->getExpProperties();
-    auto currTime = std::chrono::system_clock::now();
+    auto now = std::chrono::steady_clock::now();
     std::string keyStr;
-    if (Log::debugEnabled()) {
+    if (Log::enabled(LogLevel::Debug)) {
       std::shared_ptr<CacheableKey> key;
       ptr->getKeyI(key);
       keyStr = Utils::nullSafeToString(key);
     }
     LOGDEBUG("Setting last accessed time for key [%s] in region %s to %s",
              keyStr.c_str(), getFullPath().c_str(),
-             to_string(currTime.time_since_epoch()).c_str());
-    expProps.updateLastAccessTime(currTime);
+             to_string(now.time_since_epoch()).c_str());
+    expProps.last_accessed(now);
     if (modified) {
       LOGDEBUG("Setting last modified time for key [%s] in region %s to %s",
                keyStr.c_str(), getFullPath().c_str(),
-               to_string(currTime.time_since_epoch()).c_str());
-      expProps.updateLastModifiedTime(currTime);
+               to_string(now.time_since_epoch()).c_str());
+      expProps.last_modified(now);
     }
   }
 }
 
 uint32_t LocalRegion::adjustLruEntriesLimit(uint32_t limit) {
-  CHECK_DESTROY_PENDING(TryReadGuard, LocalRegion::adjustLruEntriesLimit);
+  CHECK_DESTROY_PENDING(shared_lock, LocalRegion::adjustLruEntriesLimit);
 
   auto attrs = m_regionAttributes;
   if (!attrs.getCachingEnabled()) return 0;
@@ -2854,7 +2882,7 @@
 
 ExpirationAction LocalRegion::adjustRegionExpiryAction(
     ExpirationAction action) {
-  CHECK_DESTROY_PENDING(TryReadGuard, LocalRegion::adjustRegionExpiryAction);
+  CHECK_DESTROY_PENDING(shared_lock, LocalRegion::adjustRegionExpiryAction);
 
   auto attrs = m_regionAttributes;
   bool hadExpiry = (getRegionExpiryDuration() > std::chrono::seconds::zero());
@@ -2873,7 +2901,7 @@
 }
 
 ExpirationAction LocalRegion::adjustEntryExpiryAction(ExpirationAction action) {
-  CHECK_DESTROY_PENDING(TryReadGuard, LocalRegion::adjustEntryExpiryAction);
+  CHECK_DESTROY_PENDING(shared_lock, LocalRegion::adjustEntryExpiryAction);
 
   auto attrs = m_regionAttributes;
   bool hadExpiry = (getEntryExpiryDuration() > std::chrono::seconds::zero());
@@ -2893,7 +2921,7 @@
 
 std::chrono::seconds LocalRegion::adjustRegionExpiryDuration(
     const std::chrono::seconds& duration) {
-  CHECK_DESTROY_PENDING(TryReadGuard, LocalRegion::adjustRegionExpiryDuration);
+  CHECK_DESTROY_PENDING(shared_lock, LocalRegion::adjustRegionExpiryDuration);
 
   bool hadExpiry = (getEntryExpiryDuration() > std::chrono::seconds::zero());
   if (!hadExpiry) {
@@ -2912,7 +2940,7 @@
 
 std::chrono::seconds LocalRegion::adjustEntryExpiryDuration(
     const std::chrono::seconds& duration) {
-  CHECK_DESTROY_PENDING(TryReadGuard, LocalRegion::adjustEntryExpiryDuration);
+  CHECK_DESTROY_PENDING(shared_lock, LocalRegion::adjustEntryExpiryDuration);
 
   bool hadExpiry = (getEntryExpiryDuration() > std::chrono::seconds::zero());
   if (!hadExpiry) {
@@ -3084,49 +3112,53 @@
 
 void LocalRegion::adjustCacheListener(
     const std::shared_ptr<CacheListener>& aListener) {
-  WriteGuard guard(m_rwLock);
+  boost::unique_lock<decltype(mutex_)> guard{mutex_};
   setCacheListener(aListener);
   m_listener = aListener;
 }
 
 void LocalRegion::adjustCacheListener(const std::string& lib,
                                       const std::string& func) {
-  WriteGuard guard(m_rwLock);
+  boost::unique_lock<decltype(mutex_)> guard{mutex_};
   setCacheListener(lib, func);
   m_listener = m_regionAttributes.getCacheListener();
 }
 
 void LocalRegion::adjustCacheLoader(
     const std::shared_ptr<CacheLoader>& aLoader) {
-  WriteGuard guard(m_rwLock);
+  boost::unique_lock<decltype(mutex_)> guard{mutex_};
   setCacheLoader(aLoader);
   m_loader = aLoader;
 }
 
 void LocalRegion::adjustCacheLoader(const std::string& lib,
                                     const std::string& func) {
-  WriteGuard guard(m_rwLock);
+  boost::unique_lock<decltype(mutex_)> guard{mutex_};
   setCacheLoader(lib, func);
   m_loader = m_regionAttributes.getCacheLoader();
 }
 
 void LocalRegion::adjustCacheWriter(
     const std::shared_ptr<CacheWriter>& aWriter) {
-  WriteGuard guard(m_rwLock);
+  boost::unique_lock<decltype(mutex_)> guard{mutex_};
   setCacheWriter(aWriter);
   m_writer = aWriter;
 }
 
 void LocalRegion::adjustCacheWriter(const std::string& lib,
                                     const std::string& func) {
-  WriteGuard guard(m_rwLock);
+  boost::unique_lock<decltype(mutex_)> guard{mutex_};
   setCacheWriter(lib, func);
   m_writer = m_regionAttributes.getCacheWriter();
 }
 
 void LocalRegion::evict(float percentage) {
-  TryReadGuard guard(m_rwLock, m_destroyPending);
-  if (m_released || m_destroyPending) return;
+  boost::shared_lock<decltype(mutex_)> guard{mutex_};
+
+  if (m_released || m_destroyPending) {
+    return;
+  }
+
   if (m_entries != nullptr) {
     int32_t size = m_entries->size();
     int32_t entriesToEvict = static_cast<int32_t>(percentage * size);
@@ -3197,6 +3229,57 @@
 
 void LocalRegion::releaseGlobals(bool) {}
 
+void LocalRegion::clearKeysOfInterest(
+    const std::unordered_map<std::shared_ptr<CacheableKey>,
+                             InterestResultPolicy>& interest_list) {
+  if (m_entries->empty()) {
+    return;
+  }
+
+  for (const auto& kv : interest_list) {
+    auto err = localDestroyNoCallbacks(kv.first);
+    // It could happen that interest was registered for a key for which
+    // there is not an entry right now
+    if (err != GF_CACHE_ENTRY_NOT_FOUND) {
+      throwExceptionIfError("LocalRegion::clearKeysOfInterest", err);
+    }
+  }
+}
+
+void LocalRegion::clearKeysOfInterestRegex(const std::string& pattern) {
+  if (m_entries->empty()) {
+    return;
+  }
+
+  boost::regex expression{pattern};
+  for (const auto& key : keys()) {
+    if (boost::regex_search(key->toString(), expression)) {
+      auto err = localDestroyNoCallbacks(key);
+      if (err != GF_CACHE_ENTRY_NOT_FOUND) {
+        throwExceptionIfError("LocalRegion::clearKeysOfInterest", err);
+      }
+    }
+  }
+}
+
+void LocalRegion::clearKeysOfInterestRegex(
+    const std::unordered_map<std::string, InterestResultPolicy>&
+        interest_list) {
+  if (m_entries->empty()) {
+    return;
+  }
+
+  for (const auto& kv : interest_list) {
+    const auto& regex = kv.first;
+    if (regex == kAllKeysRegex) {
+      localClear();
+      break;
+    } else {
+      clearKeysOfInterestRegex(kv.first);
+    }
+  }
+}
+
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/LocalRegion.hpp b/cppcache/src/LocalRegion.hpp
index 1076d0a..f124eff 100644
--- a/cppcache/src/LocalRegion.hpp
+++ b/cppcache/src/LocalRegion.hpp
@@ -33,19 +33,16 @@
 #include <geode/EntryEvent.hpp>
 #include <geode/ExceptionTypes.hpp>
 #include <geode/PersistenceManager.hpp>
-#include <geode/RegionAttributesFactory.hpp>
 #include <geode/RegionEntry.hpp>
 #include <geode/RegionEvent.hpp>
 #include <geode/Serializable.hpp>
 #include <geode/internal/geode_globals.hpp>
 
-#include "CacheableToken.hpp"
-#include "EntriesMapFactory.hpp"
+#include "EntriesMap.hpp"
 #include "EventType.hpp"
-#include "ExpMapEntry.hpp"
+#include "InterestResultPolicy.hpp"
 #include "RegionInternal.hpp"
 #include "RegionStats.hpp"
-#include "SerializationRegistry.hpp"
 #include "TSSTXStateWrapper.hpp"
 #include "TombstoneList.hpp"
 #include "util/synchronized_map.hpp"
@@ -55,34 +52,41 @@
 namespace client {
 
 #ifndef CHECK_DESTROY_PENDING
-#define CHECK_DESTROY_PENDING(lock, function)           \
-  lock checkGuard(m_rwLock, m_destroyPending);          \
-  if (m_destroyPending) {                               \
-    std::string err_msg = #function;                    \
-    err_msg += ": region " + m_fullPath + " destroyed"; \
-    throw RegionDestroyedException(err_msg.c_str());    \
-  }
+#define CHECK_DESTROY_PENDING(lock_type, function)        \
+  boost::lock_type<decltype(mutex_)> checkGuard{mutex_};  \
+  do {                                                    \
+    if (m_destroyPending) {                               \
+      std::string err_msg = #function;                    \
+      err_msg += ": region " + m_fullPath + " destroyed"; \
+      throw RegionDestroyedException(err_msg.c_str());    \
+    }                                                     \
+  } while (0)
 #endif
 
 #ifndef CHECK_DESTROY_PENDING_NOTHROW
-#define CHECK_DESTROY_PENDING_NOTHROW(lock)     \
-  lock checkGuard(m_rwLock, m_destroyPending);  \
-  if (m_destroyPending) {                       \
-    return GF_CACHE_REGION_DESTROYED_EXCEPTION; \
-  }
+#define CHECK_DESTROY_PENDING_NOTHROW(lock_type)         \
+  boost::lock_type<decltype(mutex_)> checkGuard{mutex_}; \
+  do {                                                   \
+    if (m_destroyPending) {                              \
+      return GF_CACHE_REGION_DESTROYED_EXCEPTION;        \
+    }                                                    \
+  } while (0)
 #endif
 
-class PutActions;
-class PutActionsTx;
 class CreateActions;
 class DestroyActions;
-class RemoveActions;
 class InvalidateActions;
+class PutActions;
+class PutActionsTx;
+class RemoveActions;
+class VersionedCacheableObjectPartList;
 
 typedef std::unordered_map<std::shared_ptr<CacheableKey>,
                            std::pair<std::shared_ptr<Cacheable>, int>>
     MapOfOldValue;
 
+static const std::string kAllKeysRegex = ".*";
+
 /**
  * @class LocalRegion LocalRegion.hpp
  *
@@ -197,6 +201,8 @@
   void localDestroy(const std::shared_ptr<CacheableKey>& key,
                     const std::shared_ptr<Serializable>& aCallbackArgument =
                         nullptr) override;
+  virtual GfErrType localDestroyNoCallbacks(
+      const std::shared_ptr<CacheableKey>& key);
   bool remove(const std::shared_ptr<CacheableKey>& key,
               const std::shared_ptr<Cacheable>& value,
               const std::shared_ptr<Serializable>& aCallbackArgument =
@@ -352,8 +358,8 @@
                             std::shared_ptr<VersionTag> versionTag);
 
   void setRegionExpiryTask() override;
-  void acquireReadLock() override { m_rwLock.acquire_read(); }
-  void releaseReadLock() override { m_rwLock.release(); }
+  void acquireReadLock() override { mutex_.lock_shared(); }
+  void releaseReadLock() override { mutex_.unlock_shared(); }
 
   // behaviors for attributes mutator
   uint32_t adjustLruEntriesLimit(uint32_t limit) override;
@@ -509,6 +515,7 @@
       m_subRegions;
   std::string m_fullPath;
   volatile bool m_destroyPending;
+  ExpiryTask::id_t expiry_task_id_;
   std::shared_ptr<CacheListener> m_listener;
   std::shared_ptr<CacheWriter> m_writer;
   std::shared_ptr<CacheLoader> m_loader;
@@ -522,7 +529,7 @@
   std::shared_ptr<Pool> m_attachedPool;
   bool m_enableTimeStatistics;
 
-  mutable ACE_RW_Thread_Mutex m_rwLock;
+  mutable boost::shared_mutex mutex_;
   std::vector<std::shared_ptr<CacheableKey>> keys_internal();
   bool containsKey_internal(const std::shared_ptr<CacheableKey>& keyPtr) const;
   void removeRegion(const std::string& name);
@@ -570,6 +577,14 @@
       std::shared_ptr<EventId> eventId, std::shared_ptr<Cacheable>& fullObject,
       std::shared_ptr<VersionTag>& versionTag);
 
+  void clearKeysOfInterest(
+      const std::unordered_map<std::shared_ptr<CacheableKey>,
+                               InterestResultPolicy>& interest_list);
+  void clearKeysOfInterestRegex(const std::string& regex);
+  void clearKeysOfInterestRegex(
+      const std::unordered_map<std::string, InterestResultPolicy>&
+          interest_list);
+
  private:
   std::shared_ptr<Region> findSubRegion(const std::string& name);
   GfErrType invalidateRegionNoThrowOnSubRegions(
diff --git a/cppcache/src/Log.cpp b/cppcache/src/Log.cpp
index 7b8c2ad..0f33b71 100644
--- a/cppcache/src/Log.cpp
+++ b/cppcache/src/Log.cpp
@@ -20,54 +20,30 @@
 #include <algorithm>
 #include <cctype>
 #include <chrono>
-#include <cinttypes>
+#include <cstdio>
 #include <ctime>
+#include <iostream>
+#include <map>
 #include <mutex>
+#include <sstream>
 #include <string>
 #include <thread>
 #include <utility>
-#include <vector>
 
-#include <ace/ACE.h>
-#include <ace/Dirent_Selector.h>
+#include <boost/asio/ip/host_name.hpp>
+#include <boost/filesystem.hpp>
 #include <boost/process/environment.hpp>
+#include <boost/regex.hpp>
 
 #include <geode/ExceptionTypes.hpp>
-#include <geode/internal/geode_globals.hpp>
 #include <geode/util/LogLevel.hpp>
 
-#include "../internal/hacks/AceThreadId.h"
 #include "geodeBanner.hpp"
 #include "util/chrono/time_point.hpp"
 
-#if defined(_WIN32)
-#include <io.h>
-#define GF_FILEEXISTS(x) _access_s(x, 00)
-#else
-#include <unistd.h>
-#define GF_FILEEXISTS(x) access(x, F_OK)
-#endif
-
-/*****************************************************************************/
-
-/**
- * The implementation of the Log class
- *
- *
- */
-
-/*****************************************************************************/
-
-namespace apache {
-namespace geode {
-namespace log {
-namespace globals {
-
-static std::string* g_logFile = nullptr;
-static std::string* g_logFileWithExt = nullptr;
+namespace {
 
 static size_t g_bytesWritten = 0;
-static bool g_isLogFileOpened = false;
 
 static size_t g_fileSizeLimit = GEODE_MAX_LOG_FILE_LIMIT;
 static size_t g_diskSpaceLimit = GEODE_MAX_LOG_DISK_LIMIT;
@@ -76,74 +52,20 @@
 
 static int g_rollIndex = 0;
 static size_t g_spaceUsed = 0;
-// Make a pair for the filename & its size
-static std::pair<std::string, int64_t> g_fileInfoPair;
-// Vector to hold the fileInformation
-typedef std::vector<std::pair<std::string, int64_t> > g_fileInfo;
+
+static boost::filesystem::path g_fullpath;
+static std::map<int32_t, boost::filesystem::path> g_rollFiles;
 
 static FILE* g_log = nullptr;
-static ACE_utsname g_uname;
-static pid_t g_pid = 0;
 
-}  // namespace globals
-}  // namespace log
-}  // namespace geode
-}  // namespace apache
+static std::string g_hostName;
 
-extern "C" {
+static thread_local std::string g_threadName;
 
-static int selector(const dirent* d) {
-  std::string inputname(d->d_name);
-  std::string filebasename =
-      ACE::basename(apache::geode::log::globals::g_logFileWithExt->c_str());
-  size_t actualHyphenPos = filebasename.find_last_of('.');
-  if (strcmp(filebasename.c_str(), d->d_name) == 0) return 1;
-  size_t fileExtPos = inputname.find_last_of('.');
-  std::string extName = inputname.substr(fileExtPos + 1, inputname.length());
-  if (strcmp(extName.c_str(), "log") != 0) return 0;
-  if (fileExtPos != std::string::npos) {
-    std::string tempname = inputname.substr(0, fileExtPos);
-    size_t fileHyphenPos = tempname.find_last_of('-');
-    if (fileHyphenPos != std::string::npos) {
-      std::string buff1 = tempname.substr(0, fileHyphenPos);
-      if (strstr(filebasename.c_str(), buff1.c_str()) == nullptr) {
-        return 0;
-      }
-      if (fileHyphenPos != actualHyphenPos) return 0;
-      std::string buff = tempname.substr(fileHyphenPos + 1,
-                                         tempname.length() - fileHyphenPos - 1);
-      for (std::string::iterator iter = buff.begin(); iter != buff.end();
-           ++iter) {
-        if (*iter < '0' || *iter > '9') {
-          return 0;
-        }
-      }
-      return 1;
-    } else {
-      return 0;
-    }
-  } else {
-    return 0;
-  }
-}
+const int __1K__ = 1024;
+const int __1M__ = (__1K__ * __1K__);
 
-static int comparator(const dirent** d1, const dirent** d2) {
-  if (strlen((*d1)->d_name) < strlen((*d2)->d_name)) {
-    return -1;
-  } else if (strlen((*d1)->d_name) > strlen((*d2)->d_name)) {
-    return 1;
-  }
-
-  int diff = std::strcmp((*d1)->d_name, (*d2)->d_name);
-  if (diff < 0) {
-    return -1;
-  } else if (diff > 0) {
-    return 1;
-  } else {
-    return 0;
-  }
-}
-}
+}  // namespace
 
 namespace apache {
 namespace geode {
@@ -151,21 +73,6 @@
 
 LogLevel Log::s_logLevel = LogLevel::Default;
 
-using apache::geode::log::globals::g_bytesWritten;
-using apache::geode::log::globals::g_diskSpaceLimit;
-using apache::geode::log::globals::g_fileInfo;
-using apache::geode::log::globals::g_fileInfoPair;
-using apache::geode::log::globals::g_fileSizeLimit;
-using apache::geode::log::globals::g_isLogFileOpened;
-using apache::geode::log::globals::g_log;
-using apache::geode::log::globals::g_logFile;
-using apache::geode::log::globals::g_logFileWithExt;
-using apache::geode::log::globals::g_logMutex;
-using apache::geode::log::globals::g_pid;
-using apache::geode::log::globals::g_rollIndex;
-using apache::geode::log::globals::g_spaceUsed;
-using apache::geode::log::globals::g_uname;
-
 /*****************************************************************************/
 
 LogLevel Log::logLevel() { return s_logLevel; }
@@ -175,8 +82,134 @@
  */
 void Log::setLogLevel(LogLevel level) { s_logLevel = level; }
 
+void Log::validateSizeLimits(int64_t fileSizeLimit, int64_t diskSpaceLimit) {
+  if (fileSizeLimit * __1M__ > GEODE_MAX_LOG_FILE_LIMIT) {
+    throw IllegalArgumentException(
+        "Specified file size limit larger than max allowed (1GB)");
+  } else if (fileSizeLimit < 0) {
+    throw IllegalArgumentException("Specified file size limit must be >= 0");
+  }
+
+  if (diskSpaceLimit * __1M__ > GEODE_MAX_LOG_DISK_LIMIT) {
+    throw IllegalArgumentException(
+        "Specified disk space limit larger than max allowed (1TB)");
+  } else if (diskSpaceLimit < 0) {
+    throw IllegalArgumentException("Specified disk space limit must be >= 0");
+  }
+
+  if (fileSizeLimit > diskSpaceLimit && diskSpaceLimit != 0) {
+    throw IllegalArgumentException(
+        "Disk space limit must be larger than file size limit");
+  }
+}
+
 void Log::init(LogLevel level, const char* logFileName, int32_t logFileLimit,
                int64_t logDiskSpaceLimit) {
+  auto logFileNameString =
+      logFileName ? std::string(logFileName) : std::string("geode-native.log");
+  init(level, logFileNameString, logFileLimit, logDiskSpaceLimit);
+}
+
+void Log::rollLogFile() {
+  if (g_log) {
+    fclose(g_log);
+    g_log = nullptr;
+  }
+
+  auto rollFileName =
+      (g_fullpath.parent_path() /
+       (g_fullpath.stem().string() + "-" + std::to_string(g_rollIndex) +
+        g_fullpath.extension().string()))
+          .string();
+  try {
+    auto rollFile = boost::filesystem::path(rollFileName);
+    boost::filesystem::rename(g_fullpath, rollFile);
+    g_rollFiles[g_rollIndex] = rollFile;
+    g_rollIndex++;
+  } catch (const boost::filesystem::filesystem_error&) {
+    throw IllegalStateException("Failed to roll log file");
+  }
+}
+
+void Log::removeOldestRolledLogFile() {
+  if (g_rollFiles.size()) {
+    auto index = g_rollFiles.begin()->first;
+    auto fileToRemove = g_rollFiles.begin()->second;
+    auto fileSize = boost::filesystem::file_size(fileToRemove);
+    boost::filesystem::remove(fileToRemove);
+    g_rollFiles.erase(index);
+    g_spaceUsed -= fileSize;
+  } else {
+    throw IllegalStateException(
+        "Failed to free sufficient disk space for logs");
+  }
+}
+
+void Log::calculateUsedDiskSpace() {
+  g_spaceUsed = 0;
+  if (boost::filesystem::exists(g_fullpath)) {
+    g_spaceUsed = boost::filesystem::file_size(g_fullpath);
+    for (auto const& item : g_rollFiles) {
+      g_spaceUsed += boost::filesystem::file_size(item.second);
+    }
+  }
+}
+
+void Log::buildRollFileMapping() {
+  const auto filterstring = g_fullpath.stem().string() + "-(\\d+)\\.log$";
+  const boost::regex my_filter(filterstring);
+
+  g_rollFiles.clear();
+
+  boost::filesystem::directory_iterator end_itr;
+  for (boost::filesystem::directory_iterator i(
+           g_fullpath.parent_path().string());
+       i != end_itr; ++i) {
+    if (boost::filesystem::is_regular_file(i->status())) {
+      std::string filename = i->path().filename().string();
+      boost::regex testPattern(filterstring);
+      boost::match_results<std::string::const_iterator> testMatches;
+      if (boost::regex_search(std::string::const_iterator(filename.begin()),
+                              filename.cend(), testMatches, testPattern)) {
+        auto index = std::atoi(
+            std::string(testMatches[1].first, testMatches[1].second).c_str());
+        g_rollFiles[index] = i->path();
+      }
+    }
+  }
+}
+
+void Log::setRollFileIndex() {
+  g_rollIndex = 0;
+  if (g_rollFiles.size()) {
+    g_rollIndex = g_rollFiles.rbegin()->first + 1;
+  }
+}
+
+void Log::setSizeLimits(int32_t logFileLimit, int64_t logDiskSpaceLimit) {
+  validateSizeLimits(logFileLimit, logDiskSpaceLimit);
+
+  // Default to 10MB file limit and 1GB disk limit
+  if (logFileLimit == 0 && logDiskSpaceLimit == 0) {
+    g_fileSizeLimit = 10 * __1M__;
+    g_diskSpaceLimit = 1000 * __1M__;
+  }
+  // disk space specified but file size is defaulted.  Just use a single
+  // log file, i.e. set file limit == disk limit
+  else if (logFileLimit == 0) {
+    g_diskSpaceLimit = logDiskSpaceLimit * __1M__;
+    g_fileSizeLimit = g_diskSpaceLimit;
+  } else if (logDiskSpaceLimit == 0) {
+    g_fileSizeLimit = logFileLimit * __1M__;
+    g_diskSpaceLimit = g_fileSizeLimit;
+  } else {
+    g_fileSizeLimit = logFileLimit * __1M__;
+    g_diskSpaceLimit = logDiskSpaceLimit * __1M__;
+  }
+}
+
+void Log::init(LogLevel level, const std::string& logFileName,
+               int32_t logFileLimit, int64_t logDiskSpaceLimit) {
   if (g_log != nullptr) {
     throw IllegalStateException(
         "The Log has already been initialized. "
@@ -184,248 +217,85 @@
   }
   s_logLevel = level;
 
-  if (logDiskSpaceLimit <
-      0 /*|| logDiskSpaceLimit > GEODE_MAX_LOG_DISK_LIMIT*/) {
-    logDiskSpaceLimit = GEODE_MAX_LOG_DISK_LIMIT;
-  }
+  try {
+    std::lock_guard<decltype(g_logMutex)> guard(g_logMutex);
 
-  if (logFileLimit < 0 || logFileLimit > GEODE_MAX_LOG_FILE_LIMIT) {
-    logFileLimit = GEODE_MAX_LOG_FILE_LIMIT;
-  }
+    g_hostName = boost::asio::ip::host_name();
 
-  std::lock_guard<decltype(g_logMutex)> guard(g_logMutex);
+    g_fullpath =
+        boost::filesystem::absolute(boost::filesystem::path(logFileName));
 
-  if (logFileName && logFileName[0]) {
-    std::string filename = logFileName;
-    if (g_logFile) {
-      *g_logFile = filename;
-    } else {
-      g_logFile = new std::string(filename);
-    }
-
-#ifdef _WIN32
-    // replace all '\' with '/' to make everything easier..
-    std::replace(g_logFile->begin(), g_logFile->end(), '\\', '/');
-#endif
-
-    // Appending a ".log" at the end if it does not exist or file has some other
-    // extension.
-    std::string filebasename = ACE::basename(g_logFile->c_str());
-    auto len = static_cast<int32_t>(filebasename.length());
-    auto fileExtPos = filebasename.find_last_of('.', len);
     // if no extension then add .log extension
-    if (fileExtPos == std::string::npos) {
-      g_logFileWithExt = new std::string(*g_logFile + ".log");
-    } else {
-      std::string extName = filebasename.substr(fileExtPos + 1);
-      // if extension other than .log change it to ext + .log
-      if (extName != "log") {
-        g_logFileWithExt = new std::string(*g_logFile + ".log");
-      }
-      // .log Extension already provided, no need to append any extension.
-      else {
-        g_logFileWithExt = new std::string(*g_logFile);
-      }
+    if (g_fullpath.extension().empty() || (g_fullpath.extension() != ".log")) {
+      g_fullpath = g_fullpath.string() + ".log";
     }
 
-    g_fileSizeLimit = logFileLimit * 1024 * 1024;
-    g_diskSpaceLimit = logDiskSpaceLimit * 1024ll * 1024ll;
-
-    // If FileSizelimit is greater than DiskSpaceLimit & diskspaceLimit is set,
-    // then set DiskSpaceLimit to FileSizelimit
-    if (g_fileSizeLimit > g_diskSpaceLimit && g_diskSpaceLimit != 0) {
-      g_fileSizeLimit = g_diskSpaceLimit;
-    }
-
-    // If only DiskSpaceLimit is specified and no FileSizeLimit specified, then
-    // set DiskSpaceLimit to FileSizelimit.
-    // This helps in getting the file handle that is exceeded the limit.
-    if (g_fileSizeLimit == 0 && g_diskSpaceLimit != 0) {
-      g_fileSizeLimit = g_diskSpaceLimit;
-    }
+    setSizeLimits(logFileLimit, logDiskSpaceLimit);
 
     g_bytesWritten = 0;
     g_spaceUsed = 0;
-    g_rollIndex = 0;
 
-    std::string dirname = ACE::dirname(g_logFile->c_str());
-
-    ACE_Dirent_Selector sds;
-    int status = sds.open(dirname.c_str(), selector, comparator);
-    if (status != -1) {
-      for (int index = 0; index < sds.length(); ++index) {
-        std::string strname = ACE::basename(sds[index]->d_name);
-        fileExtPos = strname.find_last_of('.', strname.length());
-        if (fileExtPos != std::string::npos) {
-          std::string tempname = strname.substr(0, fileExtPos);
-          size_t fileHyphenPos = tempname.find_last_of('-', tempname.length());
-          if (fileHyphenPos != std::string::npos) {
-            std::string buff =
-                tempname.substr(fileHyphenPos + 1, tempname.length());
-            g_rollIndex = std::stoi(buff) + 1;
-          }
-        }  // if loop
-      }    // for loop
+    // Ensure that directory exists for log files.  We're going to attempt
+    // to iterate through files in that folder, and if it doesn't exist boost
+    // will throw an exception.
+    const auto target_path = g_fullpath.parent_path().string();
+    if (!boost::filesystem::exists(target_path)) {
+      boost::filesystem::create_directories(target_path);
     }
-    sds.close();
 
-    FILE* existingFile = fopen(g_logFileWithExt->c_str(), "r");
-    if (existingFile != nullptr && logFileLimit > 0) {
-      char rollFile[1024] = {0};
-      std::string logsdirname;
-      std::string logsbasename;
-      std::string fnameBeforeExt;
-      std::string extName;
-      std::string newfilestr;
+    buildRollFileMapping();
+    setRollFileIndex();
+    calculateUsedDiskSpace();
+    while (g_spaceUsed > g_diskSpaceLimit) {
+      removeOldestRolledLogFile();
+    }
 
-      len = static_cast<int32_t>(g_logFileWithExt->length());
-      int32_t lastPosOfSep = static_cast<int32_t>(
-          g_logFileWithExt->find_last_of(ACE_DIRECTORY_SEPARATOR_CHAR, len));
-      if (lastPosOfSep == -1) {
-        logsdirname = ".";
-      } else {
-        logsdirname = g_logFileWithExt->substr(0, lastPosOfSep);
-      }
-      logsbasename = g_logFileWithExt->substr(lastPosOfSep + 1, len);
-      char logFileExtAfter = '.';
-      int32_t baselen = static_cast<int32_t>(logsbasename.length());
-      int32_t posOfExt = static_cast<int32_t>(
-          logsbasename.find_last_of(logFileExtAfter, baselen));
-      if (posOfExt == -1) {
-        // throw IllegalArgument;
-      } else {
-        fnameBeforeExt = logsbasename.substr(0, posOfExt);
-        extName = logsbasename.substr(posOfExt + 1, baselen);
-      }
-      std::snprintf(rollFile, 1024, "%s%c%s-%d.%s", logsdirname.c_str(),
-                    ACE_DIRECTORY_SEPARATOR_CHAR, fnameBeforeExt.c_str(),
-                    g_rollIndex++, extName.c_str());
-      bool rollFileNameGot = false;
-      while (!rollFileNameGot) {
-        FILE* checkFile = fopen(rollFile, "r");
-        if (checkFile != nullptr) {
-          fclose(checkFile);
-          checkFile = nullptr;
-          std::snprintf(rollFile, 1024, "%s%c%s-%d.%s", logsdirname.c_str(),
-                        ACE_DIRECTORY_SEPARATOR_CHAR, fnameBeforeExt.c_str(),
-                        g_rollIndex++, extName.c_str());
-        } else {
-          rollFileNameGot = true;
-        }
-        /* adongre
-         * CID 28999: Use after free (USE_AFTER_FREE)
-         */
-        if (checkFile != nullptr) fclose(existingFile);
-      }
-      // retry some number of times before giving up when file is busy etc.
-      int renameResult = -1;
-      int maxTries = 10;
-      while (maxTries-- > 0) {
-        renameResult = ACE_OS::rename(g_logFileWithExt->c_str(), rollFile);
-        if (renameResult >= 0) {
-          break;
-        }
-        // continue after some sleep
-        std::this_thread::sleep_for(std::chrono::milliseconds(200));
-      }
-      /* (don't throw exception; try appending to existing file instead)
-      if (renameResult < 0) {
-        std::string msg = "Could not rename: " +
-          *g_logFileWithExt + " to: " + rollFile;
-        throw GeodeIOException(msg.c_str());
-      }
-      */
+    if (boost::filesystem::exists(g_fullpath) && logFileLimit > 0) {
+      rollLogFile();
     }
-    if (existingFile != nullptr) {
-      fclose(existingFile);
-      existingFile = nullptr;
-    }
-  } else if (g_logFile) {
-    delete g_logFile;
-    g_logFile = nullptr;
-    g_logFileWithExt = nullptr;
+    writeBanner();
+  } catch (const boost::exception&) {
+    auto msg = std::string("Unable to log to file '") + logFileName + "'";
+    throw IllegalArgumentException(msg.c_str());
+  } catch (const std::exception& ex) {
+    auto msg = std::string("Unable to log to file '") + logFileName +
+               "': " + ex.what();
+    throw IllegalArgumentException(msg.c_str());
   }
-  writeBanner();
 }
 
 void Log::close() {
   std::lock_guard<decltype(g_logMutex)> guard(g_logMutex);
 
-  std::string oldfile;
-
-  if (g_logFile) {
-    oldfile = *g_logFile;
-    delete g_logFile;
-    g_logFile = nullptr;
-  }
-  if (g_logFileWithExt) {
-    delete g_logFileWithExt;
-    g_logFileWithExt = nullptr;
-  }
-
   if (g_log) {
     fclose(g_log);
     g_log = nullptr;
   }
+  g_fullpath = "";
 }
 
 void Log::writeBanner() {
-  if (g_logFileWithExt == nullptr) {
-    return;
-  }
-  const char* dirname = ACE::dirname(g_logFileWithExt->c_str());
-  if (GF_FILEEXISTS(dirname) != 0 && ACE_OS::mkdir(dirname) != 0) {
-    std::string msg =
-        "Error in creating directories for: " + std::string(dirname);
-    throw GeodeIOException(msg.c_str());
-  }
-  // retry some number of times before giving up when file is busy etc.
-  int maxTries = 10;
-  while (maxTries-- > 0) {
-    g_log = fopen(g_logFileWithExt->c_str(), "a");
-    if (g_log != nullptr) {
-      break;
+  if (s_logLevel != LogLevel::None) {
+    std::string bannertext = geodeBanner::getBanner();
+
+    // fullpath empty --> we're logging to stdout
+    if (g_fullpath.string().empty()) {
+      std::cout << bannertext << std::flush;
+    } else {
+      if (boost::filesystem::exists(
+              g_fullpath.parent_path().string().c_str()) ||
+          boost::filesystem::create_directories(g_fullpath.parent_path())) {
+        g_log = fopen(g_fullpath.string().c_str(), "a");
+        if (g_log) {
+          if (fwrite(bannertext.c_str(), sizeof(char), bannertext.length(),
+                     g_log) == bannertext.length()) {
+            g_bytesWritten += static_cast<int32_t>(bannertext.length());
+            fflush(g_log);
+          }
+        }
+      }
     }
-    int lastError = ACE_OS::last_error();
-    if (lastError != EACCES && lastError != EINTR && lastError != EWOULDBLOCK) {
-      break;
-    }
-    // continue after some sleep
-    std::this_thread::sleep_for(std::chrono::milliseconds(200));
   }
-  if (!g_log) {
-    g_isLogFileOpened = false;
-    return;
-  } else {
-    g_isLogFileOpened = true;
-  }
-
-  if (s_logLevel == LogLevel::None) {
-    return;
-  }
-  std::string bannertext = geodeBanner::getBanner();
-
-  if (g_logFile == nullptr) {
-    fprintf(stdout, "%s", bannertext.c_str());
-    fflush(stdout);
-    return;
-  }  // else
-
-  if (fprintf(g_log, "%s", bannertext.c_str()) == 0 || ferror(g_log)) {
-    // we should be continue,
-    return;
-  }
-
-  int numchars = 0;
-  const char* pch = nullptr;
-  pch = strchr(bannertext.c_str(), '\n');
-  while (pch != nullptr) {
-    pch = strchr(pch + 1, '\n');
-    numchars += 2;
-  }
-
-  g_bytesWritten += static_cast<int32_t>(bannertext.length() + numchars);
-  fflush(g_log);
 }
 
 const char* Log::levelToChars(LogLevel level) {
@@ -463,9 +333,8 @@
     case LogLevel::All:
       return "all";
   }
-  char buf[64] = {0};
-  std::snprintf(buf, 64, "Unexpected log level: %d", static_cast<int>(level));
-  throw IllegalArgumentException(buf);
+  throw IllegalArgumentException(std::string("Unexpected log level: ") +
+                                 std::to_string(static_cast<int>(level)));
 }
 
 LogLevel Log::charsToLevel(const std::string& chars) {
@@ -502,497 +371,135 @@
   }
 }
 
-char* Log::formatLogLine(char* buf, LogLevel level) {
-  if (g_pid == 0) {
-    g_pid = boost::this_process::get_id();
-    ACE_OS::uname(&g_uname);
+void Log::setThreadName(const std::string& threadName) {
+  if (threadName.empty()) {
+    throw IllegalArgumentException("Thread name is empty.");
   }
-  const size_t MINBUFSIZE = 128;
-  auto now = std::chrono::system_clock::now();
-  auto secs = std::chrono::system_clock::to_time_t(now);
-  auto microseconds = std::chrono::duration_cast<std::chrono::microseconds>(
-      now - std::chrono::system_clock::from_time_t(secs));
-  auto tm_val = apache::geode::util::chrono::localtime(secs);
-  auto pbuf = buf;
-  pbuf += std::snprintf(pbuf, 15, "[%s ", Log::levelToChars(level));
-  pbuf += std::strftime(pbuf, MINBUFSIZE, "%Y/%m/%d %H:%M:%S", &tm_val);
-  pbuf += std::snprintf(pbuf, 15, ".%06" PRId64 " ",
-                        static_cast<int64_t>(microseconds.count()));
-  pbuf += std::strftime(pbuf, MINBUFSIZE, "%Z ", &tm_val);
 
-  std::snprintf(pbuf, 300, "%s:%d %" PRIu64 "] ", g_uname.nodename, g_pid,
-                hacks::aceThreadId(ACE_OS::thr_self()));
+  g_threadName = threadName;
 
-  return buf;
+#if defined(HAVE_pthread_setname_np)
+
+  pthread_setname_np(threadName.c_str());
+
+#elif defined(_WIN32)
+
+  const DWORD MS_VC_EXCEPTION = 0x406D1388;
+
+#pragma pack(push, 8)
+  typedef struct tagTHREADNAME_INFO {
+    DWORD dwType;      // Must be 0x1000.
+    LPCSTR szName;     // Pointer to name (in user addr space).
+    DWORD dwThreadID;  // Thread ID (-1=caller thread).
+    DWORD dwFlags;     // Reserved for future use, must be zero.
+  } THREADNAME_INFO;
+#pragma pack(pop)
+
+  THREADNAME_INFO info;
+  info.dwType = 0x1000;
+  info.szName = threadName.c_str();
+  info.dwThreadID = -1;
+  info.dwFlags = 0;
+
+  __try {
+    RaiseException(MS_VC_EXCEPTION, 0, sizeof(info) / sizeof(ULONG_PTR),
+                   (ULONG_PTR*)&info);
+  } __except (EXCEPTION_EXECUTE_HANDLER) {
+  }
+
+#endif
 }
 
-void Log::put(LogLevel level, const std::string& msg) {
-  put(level, msg.c_str());
+std::string Log::formatLogLine(LogLevel level) {
+  std::stringstream msg;
+  const auto now = std::chrono::system_clock::now();
+  const auto secs = std::chrono::system_clock::to_time_t(now);
+  const auto microseconds =
+      std::chrono::duration_cast<std::chrono::microseconds>(
+          now - std::chrono::system_clock::from_time_t(secs));
+  const auto tm_val = apache::geode::util::chrono::localtime(secs);
+
+  msg << '[' << Log::levelToChars(level) << ' '
+      << std::put_time(&tm_val, "%Y/%m/%d %H:%M:%S") << '.' << std::setfill('0')
+      << std::setw(6) << microseconds.count() << ' '
+      << std::put_time(&tm_val, "%z  ") << g_hostName << ':'
+      << boost::this_process::get_id() << ' ' << std::this_thread::get_id()
+      << " (" << g_threadName << ")] ";
+
+  return msg.str();
 }
 
-// int g_count = 0;
-void Log::put(LogLevel level, const char* msg) {
+void Log::log(LogLevel level, const std::string& msg) {
+  Log::logInternal(level, msg);
+}
+
+void Log::logInternal(LogLevel level, const std::string& msg) {
   std::lock_guard<decltype(g_logMutex)> guard(g_logMutex);
 
-  g_fileInfo fileInfo;
-
-  char buf[256] = {0};
+  std::string buf;
   char fullpath[512] = {0};
 
-  if (!g_logFile) {
-    fprintf(stdout, "%s%s\n", formatLogLine(buf, level), msg);
-    fflush(stdout);
-    // TODO: ignoring for now; probably store the log-lines for possible
-    // future logging if log-file gets initialized properly
-
+  if (g_fullpath.string().empty()) {
+    std::cout << formatLogLine(level) << msg << "\n" << std::flush;
   } else {
-    if (!g_isLogFileOpened) {
-      g_log = fopen(g_logFileWithExt->c_str(), "a");
-      if (!g_log) {
-        g_isLogFileOpened = false;
-        return;
-      }
-      g_isLogFileOpened = true;
-    } else if (!g_log) {
-      g_log = fopen(g_logFileWithExt->c_str(), "a");
-      if (!g_log) {
-        return;
-      }
+    if (!g_log) {
+      g_log = fopen(g_fullpath.string().c_str(), "a");
     }
 
-    formatLogLine(buf, level);
-    auto numChars = static_cast<int>(std::strlen(buf) + std::strlen(msg));
-    g_bytesWritten +=
-        numChars + 2;  // bcoz we have to count trailing new line (\n)
-
-    if ((g_fileSizeLimit != 0) && (g_bytesWritten >= g_fileSizeLimit)) {
-      char rollFile[1024] = {0};
-      std::string logsdirname;
-      std::string logsbasename;
-      std::string fnameBeforeExt;
-      std::string extName;
-      std::string newfilestr;
-
-      int32_t len = static_cast<int32_t>(g_logFileWithExt->length());
-      int32_t lastPosOfSep = static_cast<int32_t>(
-          g_logFileWithExt->find_last_of(ACE_DIRECTORY_SEPARATOR_CHAR, len));
-      if (lastPosOfSep == -1) {
-        logsdirname = ".";
-      } else {
-        logsdirname = g_logFileWithExt->substr(0, lastPosOfSep);
-      }
-      logsbasename = g_logFileWithExt->substr(lastPosOfSep + 1, len);
-      char logFileExtAfter = '.';
-      int32_t baselen = static_cast<int32_t>(logsbasename.length());
-      int32_t posOfExt = static_cast<int32_t>(
-          logsbasename.find_last_of(logFileExtAfter, baselen));
-      if (posOfExt == -1) {
-        // throw IllegalArgument;
-      } else {
-        fnameBeforeExt = logsbasename.substr(0, posOfExt);
-        extName = logsbasename.substr(posOfExt + 1, baselen);
-      }
-      std::snprintf(rollFile, 1024, "%s%c%s-%d.%s", logsdirname.c_str(),
-                    ACE_DIRECTORY_SEPARATOR_CHAR, fnameBeforeExt.c_str(),
-                    g_rollIndex++, extName.c_str());
-      bool rollFileNameGot = false;
-      while (!rollFileNameGot) {
-        FILE* fp1 = fopen(rollFile, "r");
-        if (fp1 != nullptr) {
-          fclose(fp1);
-          std::snprintf(rollFile, 1024, "%s%c%s-%d.%s", logsdirname.c_str(),
-                        ACE_DIRECTORY_SEPARATOR_CHAR, fnameBeforeExt.c_str(),
-                        g_rollIndex++, extName.c_str());
-        } else {
-          rollFileNameGot = true;
-        }
-      }
-
-      fclose(g_log);
-      g_log = nullptr;
-
-      if (ACE_OS::rename(g_logFileWithExt->c_str(), rollFile) < 0) {
-        return;  // no need to throw exception try next time
-      }
-
-      g_bytesWritten =
+    if (g_log) {
+      buf = formatLogLine(level);
+      auto numChars = static_cast<int>(buf.length() + msg.length());
+      g_bytesWritten +=
           numChars + 2;  // bcoz we have to count trailing new line (\n)
-      writeBanner();
-    }
 
-    g_spaceUsed += g_bytesWritten;
-
-    if ((g_diskSpaceLimit > 0) && (g_spaceUsed >= g_diskSpaceLimit)) {
-      std::string dirname = ACE::dirname(g_logFile->c_str());
-      g_spaceUsed = 0;
-      ACE_stat statBuf = {};
-
-      ACE_Dirent_Selector sds;
-      int status = sds.open(dirname.c_str(), selector, comparator);
-      if (status != -1) {
-        for (int index = 1; index < sds.length(); ++index) {
-          std::snprintf(fullpath, 512, "%s%c%s", dirname.c_str(),
-                        ACE_DIRECTORY_SEPARATOR_CHAR, sds[index]->d_name);
-          ACE_OS::stat(fullpath, &statBuf);
-          g_fileInfoPair = std::make_pair(fullpath, statBuf.st_size);
-          fileInfo.push_back(g_fileInfoPair);
-          g_spaceUsed += fileInfo[index - 1].second;
-        }  // for loop
-        g_spaceUsed += g_bytesWritten;
-        sds.close();
-      }
-      int fileIndex = 0;
-
-      while ((g_spaceUsed > (g_diskSpaceLimit /*- g_fileSizeLimit*/))) {
-        int64_t fileSize = fileInfo[fileIndex].second;
-        if (ACE_OS::unlink(fileInfo[fileIndex].first.c_str()) == 0) {
-          g_spaceUsed -= fileSize;
-        } else {
-          char printmsg[256];
-          std::snprintf(printmsg, 256, "%s\t%s\n", "Could not delete",
-                        fileInfo[fileIndex].first.c_str());
-          numChars =
-              fprintf(g_log, "%s%s\n", formatLogLine(buf, level), printmsg);
-          g_bytesWritten +=
-              numChars + 2;  // bcoz we have to count trailing new line (\n)
-        }
-        fileIndex++;
-      }
-    }
-
-    if ((numChars = fprintf(g_log, "%s%s\n", buf, msg)) == 0 || ferror(g_log)) {
-      if ((g_diskSpaceLimit > 0)) {
-        g_spaceUsed = g_spaceUsed - (numChars + 2);
-      }
-      if (g_fileSizeLimit > 0) {
-        g_bytesWritten = g_bytesWritten - (numChars + 2);
+      if ((g_fileSizeLimit != 0) && (g_bytesWritten >= g_fileSizeLimit)) {
+        rollLogFile();
+        g_bytesWritten = numChars + 2;  // Account for trailing newline
+        writeBanner();
       }
 
-      // lets continue wothout throwing the exception; it should not cause
-      // process to terminate
-      fclose(g_log);
-      g_log = nullptr;
-    } else {
-      fflush(g_log);
+      g_spaceUsed += numChars + 2;
+
+      // Remove existing rolled log files until we're below the limit
+      while (g_spaceUsed >= g_diskSpaceLimit) {
+        removeOldestRolledLogFile();
+      }
+
+      auto logLine = buf + msg + "\n";
+      if (fwrite(logLine.c_str(), sizeof(char), logLine.length(), g_log) !=
+              logLine.length() ||
+          ferror(g_log)) {
+        // Let's continue without throwing the exception.  It should not cause
+        // process to terminate
+        fclose(g_log);
+        g_log = nullptr;
+      } else {
+        fflush(g_log);
+      }
     }
   }
 }
 
-void Log::putThrow(LogLevel level, const char* msg, const Exception& ex) {
-  std::string message = "Geode exception " + ex.getName() +
-                        " thrown: " + ex.getMessage() + "\n" + msg;
-  put(level, message);
-}
-
-void Log::putCatch(LogLevel level, const char* msg, const Exception& ex) {
-  std::string message = "Geode exception " + ex.getName() +
-                        " caught: " + ex.getMessage() + "\n" + msg;
-  put(level, message);
-}
-
-void Log::enterFn(LogLevel level, const char* functionName) {
-  enum { MAX_NAME_LENGTH = 1024 };
-  std::string fn = functionName;
-  if (fn.size() > MAX_NAME_LENGTH) {
-    fn = fn.substr(fn.size() - MAX_NAME_LENGTH, MAX_NAME_LENGTH);
-  }
-  char buf[MAX_NAME_LENGTH + 512] = {0};
-  std::snprintf(buf, 1536, "{{{===>>> Entering function %s", fn.c_str());
-  put(level, buf);
-}
-
-void Log::exitFn(LogLevel level, const char* functionName) {
-  enum { MAX_NAME_LENGTH = 1024 };
-  std::string fn = functionName;
-  if (fn.size() > MAX_NAME_LENGTH) {
-    fn = fn.substr(fn.size() - MAX_NAME_LENGTH, MAX_NAME_LENGTH);
-  }
-  char buf[MAX_NAME_LENGTH + 512] = {0};
-  std::snprintf(buf, 1536, "<<<===}}} Exiting function %s", fn.c_str());
-  put(level, buf);
-}
-
-bool Log::enabled(LogLevel level) {
-  return GEODE_HIGHEST_LOG_LEVEL >= level && s_logLevel >= level;
-}
-
-void Log::log(LogLevel level, const char* msg) {
-  if (enabled(level)) put(level, msg);
-}
-
-void Log::logThrow(LogLevel level, const char* msg, const Exception& ex) {
-  if (enabled(level)) putThrow(level, msg, ex);
+void Log::log(LogLevel level, const char* fmt, ...) {
+  char msg[_GEODE_LOG_MESSAGE_LIMIT] = {0};
+  va_list argp;
+  va_start(argp, fmt);
+  // NOLINTNEXTLINE(clang-analyzer-valist.Uninitialized): clang-tidy bug
+  std::vsnprintf(msg, sizeof(msg), fmt, argp);
+  Log::logInternal(level, std::string(msg));
+  va_end(argp);
 }
 
 void Log::logCatch(LogLevel level, const char* msg, const Exception& ex) {
-  if (enabled(level)) putCatch(level, msg, ex);
+  if (enabled(level)) {
+    std::string message = "Geode exception " + ex.getName() +
+                          " caught: " + ex.getMessage() + "\n" + msg;
+    log(level, message);
+  }
 }
 
-bool Log::errorEnabled() {
-  return GEODE_HIGHEST_LOG_LEVEL >= LogLevel::Error &&
-         s_logLevel >= LogLevel::Error;
-}
-
-void Log::error(const char* msg) {
-  if (errorEnabled()) put(LogLevel::Error, msg);
-}
-
-void Log::error(const std::string& msg) {
-  if (errorEnabled()) put(LogLevel::Error, msg.c_str());
-}
-
-void Log::errorThrow(const char* msg, const Exception& ex) {
-  if (errorEnabled()) putThrow(LogLevel::Error, msg, ex);
-}
-
-void Log::errorCatch(const char* msg, const Exception& ex) {
-  if (errorEnabled()) putCatch(LogLevel::Error, msg, ex);
-}
-
-bool Log::warningEnabled() {
-  return GEODE_HIGHEST_LOG_LEVEL >= LogLevel::Warning &&
-         s_logLevel >= LogLevel::Warning;
-}
-
-void Log::warning(const char* msg) {
-  if (warningEnabled()) put(LogLevel::Warning, msg);
-}
-
-void Log::warningThrow(const char* msg, const Exception& ex) {
-  if (warningEnabled()) putThrow(LogLevel::Warning, msg, ex);
-}
-
-void Log::warningCatch(const char* msg, const Exception& ex) {
-  if (warningEnabled()) putCatch(LogLevel::Warning, msg, ex);
-}
-
-bool Log::infoEnabled() {
-  return GEODE_HIGHEST_LOG_LEVEL >= LogLevel::Info &&
-         s_logLevel >= LogLevel::Info;
-}
-
-void Log::info(const char* msg) {
-  if (infoEnabled()) put(LogLevel::Info, msg);
-}
-
-void Log::infoThrow(const char* msg, const Exception& ex) {
-  if (infoEnabled()) putThrow(LogLevel::Info, msg, ex);
-}
-
-void Log::infoCatch(const char* msg, const Exception& ex) {
-  if (infoEnabled()) putCatch(LogLevel::Info, msg, ex);
-}
-
-bool Log::configEnabled() {
-  return GEODE_HIGHEST_LOG_LEVEL >= LogLevel::Config &&
-         s_logLevel >= LogLevel::Config;
-}
-
-void Log::config(const char* msg) {
-  if (configEnabled()) put(LogLevel::Config, msg);
-}
-
-void Log::configThrow(const char* msg, const Exception& ex) {
-  if (configEnabled()) putThrow(LogLevel::Config, msg, ex);
-}
-
-void Log::configCatch(const char* msg, const Exception& ex) {
-  if (configEnabled()) putCatch(LogLevel::Config, msg, ex);
-}
-
-bool Log::fineEnabled() {
-  return GEODE_HIGHEST_LOG_LEVEL >= LogLevel::Fine &&
-         s_logLevel >= LogLevel::Fine;
-}
-
-void Log::fine(const char* msg) {
-  if (fineEnabled()) put(LogLevel::Fine, msg);
-}
-
-void Log::fineThrow(const char* msg, const Exception& ex) {
-  if (fineEnabled()) putThrow(LogLevel::Fine, msg, ex);
-}
-
-void Log::fineCatch(const char* msg, const Exception& ex) {
-  if (fineEnabled()) putCatch(LogLevel::Fine, msg, ex);
-}
-
-bool Log::finerEnabled() {
-  return GEODE_HIGHEST_LOG_LEVEL >= LogLevel::Finer &&
-         s_logLevel >= LogLevel::Finer;
-}
-
-void Log::finer(const char* msg) {
-  if (finerEnabled()) put(LogLevel::Finer, msg);
-}
-
-void Log::finerThrow(const char* msg, const Exception& ex) {
-  if (finerEnabled()) putThrow(LogLevel::Finer, msg, ex);
-}
-
-void Log::finerCatch(const char* msg, const Exception& ex) {
-  if (finerEnabled()) putCatch(LogLevel::Finer, msg, ex);
-}
-
-bool Log::finestEnabled() {
-  return GEODE_HIGHEST_LOG_LEVEL >= LogLevel::Finest &&
-         s_logLevel >= LogLevel::Finest;
-}
-
-void Log::finest(const char* msg) {
-  if (finestEnabled()) put(LogLevel::Finest, msg);
-}
-
-void Log::finestThrow(const char* msg, const Exception& ex) {
-  if (finestEnabled()) putThrow(LogLevel::Finest, msg, ex);
-}
-
-void Log::finestCatch(const char* msg, const Exception& ex) {
-  if (finestEnabled()) putCatch(LogLevel::Finest, msg, ex);
-}
-
-bool Log::debugEnabled() {
-  return GEODE_HIGHEST_LOG_LEVEL >= LogLevel::Debug &&
-         s_logLevel >= LogLevel::Debug;
-}
-
-void Log::debug(const char* msg) {
-  if (debugEnabled()) put(LogLevel::Debug, msg);
-}
-
-void Log::debugThrow(const char* msg, const Exception& ex) {
-  if (debugEnabled()) putThrow(LogLevel::Debug, msg, ex);
-}
-
-void Log::debugCatch(const char* msg, const Exception& ex) {
-  if (debugEnabled()) putCatch(LogLevel::Debug, msg, ex);
-}
-
-LogFn::LogFn(const char* functionName, LogLevel level)
-    : m_functionName(functionName), m_level(level) {
-  if (Log::enabled(m_level)) Log::enterFn(m_level, m_functionName);
-}
-
-LogFn::~LogFn() {
-  if (Log::enabled(m_level)) Log::exitFn(m_level, m_functionName);
-}
-
-// var arg logging routines.
-
-#ifdef _WIN32
-#define vsnprintf _vsnprintf
-#endif
-
-void LogVarargs::debug(const char* fmt, ...) {
-  char msg[_GF_MSG_LIMIT] = {0};
-  va_list argp;
-  va_start(argp, fmt);
-  vsnprintf(msg, _GF_MSG_LIMIT, fmt, argp);
-  /* win doesn't guarantee termination */ msg[_GF_MSG_LIMIT - 1] = '\0';
-  Log::put(LogLevel::Debug, msg);
-  va_end(argp);
-}
-
-void LogVarargs::error(const char* fmt, ...) {
-  char msg[_GF_MSG_LIMIT] = {0};
-  va_list argp;
-  va_start(argp, fmt);
-  vsnprintf(msg, _GF_MSG_LIMIT, fmt, argp);
-  /* win doesn't guarantee termination */ msg[_GF_MSG_LIMIT - 1] = '\0';
-  Log::put(LogLevel::Error, msg);
-  va_end(argp);
-}
-
-void LogVarargs::warn(const char* fmt, ...) {
-  char msg[_GF_MSG_LIMIT] = {0};
-  va_list argp;
-  va_start(argp, fmt);
-  vsnprintf(msg, _GF_MSG_LIMIT, fmt, argp);
-  /* win doesn't guarantee termination */ msg[_GF_MSG_LIMIT - 1] = '\0';
-  Log::put(LogLevel::Warning, msg);
-  va_end(argp);
-}
-
-void LogVarargs::info(const char* fmt, ...) {
-  char msg[_GF_MSG_LIMIT] = {0};
-  va_list argp;
-  va_start(argp, fmt);
-  vsnprintf(msg, _GF_MSG_LIMIT, fmt, argp);
-  /* win doesn't guarantee termination */ msg[_GF_MSG_LIMIT - 1] = '\0';
-  Log::put(LogLevel::Info, msg);
-  va_end(argp);
-}
-
-void LogVarargs::config(const char* fmt, ...) {
-  char msg[_GF_MSG_LIMIT] = {0};
-  va_list argp;
-  va_start(argp, fmt);
-  vsnprintf(msg, _GF_MSG_LIMIT, fmt, argp);
-  /* win doesn't guarantee termination */ msg[_GF_MSG_LIMIT - 1] = '\0';
-  Log::put(LogLevel::Config, msg);
-  va_end(argp);
-}
-
-void LogVarargs::fine(const char* fmt, ...) {
-  char msg[_GF_MSG_LIMIT] = {0};
-  va_list argp;
-  va_start(argp, fmt);
-  vsnprintf(msg, _GF_MSG_LIMIT, fmt, argp);
-  /* win doesn't guarantee termination */ msg[_GF_MSG_LIMIT - 1] = '\0';
-  Log::put(LogLevel::Fine, msg);
-  va_end(argp);
-}
-
-void LogVarargs::finer(const char* fmt, ...) {
-  char msg[_GF_MSG_LIMIT] = {0};
-  va_list argp;
-  va_start(argp, fmt);
-  vsnprintf(msg, _GF_MSG_LIMIT, fmt, argp);
-  /* win doesn't guarantee termination */ msg[_GF_MSG_LIMIT - 1] = '\0';
-  Log::put(LogLevel::Finer, msg);
-  va_end(argp);
-}
-
-void LogVarargs::finest(const char* fmt, ...) {
-  char msg[_GF_MSG_LIMIT] = {0};
-  va_list argp;
-  va_start(argp, fmt);
-  vsnprintf(msg, _GF_MSG_LIMIT, fmt, argp);
-  /* win doesn't guarantee termination */ msg[_GF_MSG_LIMIT - 1] = '\0';
-  Log::put(LogLevel::Finest, msg);
-  va_end(argp);
-}
-
-void LogVarargs::debug(const std::string& message) {
-  Log::put(LogLevel::Debug, message.c_str());
-}
-
-void LogVarargs::error(const std::string& message) {
-  Log::put(LogLevel::Error, message.c_str());
-}
-
-void LogVarargs::warn(const std::string& message) {
-  Log::put(LogLevel::Warning, message.c_str());
-}
-
-void LogVarargs::info(const std::string& message) {
-  Log::put(LogLevel::Info, message.c_str());
-}
-
-void LogVarargs::config(const std::string& message) {
-  Log::put(LogLevel::Config, message.c_str());
-}
-
-void LogVarargs::fine(const std::string& message) {
-  Log::put(LogLevel::Fine, message.c_str());
-}
-
-void LogVarargs::finer(const std::string& message) {
-  Log::put(LogLevel::Finer, message.c_str());
-}
-
-void LogVarargs::finest(const std::string& message) {
-  Log::put(LogLevel::Finest, message.c_str());
+bool Log::enabled(LogLevel level) {
+  return (level != LogLevel::None && level <= logLevel());
 }
 
 }  // namespace client
diff --git a/cppcache/src/MapEntry.hpp b/cppcache/src/MapEntry.hpp
index 14bec14..6389d2a 100644
--- a/cppcache/src/MapEntry.hpp
+++ b/cppcache/src/MapEntry.hpp
@@ -29,100 +29,25 @@
 #include <geode/Serializable.hpp>
 #include <geode/internal/geode_globals.hpp>
 
-#include "CacheImpl.hpp"
-#include "CacheableToken.hpp"
-#include "ExpiryTaskManager.hpp"
 #include "RegionInternal.hpp"
-#include "VersionStamp.hpp"
 
 namespace apache {
 namespace geode {
 namespace client {
 
+class ExpEntryProperties;
+class LRUEntryProperties;
 class MapEntry;
 class MapEntryImpl;
+class VersionStamp;
 class LRUEntryProperties;
-class CacheImpl;
-
-/**
- * @brief This class encapsulates expiration specific properties for
- *   a MapEntry.
- */
-class APACHE_GEODE_EXPORT ExpEntryProperties {
- public:
-  typedef std::chrono::system_clock::time_point time_point;
-
-  inline explicit ExpEntryProperties(ExpiryTaskManager* expiryTaskManager)
-      : m_lastAccessTime(0),
-        m_lastModifiedTime(0),
-        m_expiryTaskId(-1),
-        m_expiryTaskManager(expiryTaskManager) {
-    // The reactor always gives +ve id while scheduling.
-    // -1 will indicate that an expiry task has not been scheduled
-    // for this entry. // TODO confirm
-  }
-
-  inline time_point getLastAccessTime() const {
-    return time_point(std::chrono::system_clock::duration(m_lastAccessTime));
-  }
-
-  inline time_point getLastModifiedTime() const {
-    return time_point(std::chrono::system_clock::duration(m_lastModifiedTime));
-  }
-
-  //  moved time initialization outside of constructor to avoid
-  // the costly gettimeofday call in MapSegment spinlock
-  inline void initStartTime() {
-    time_point currentTime = std::chrono::system_clock::now();
-    m_lastAccessTime = currentTime.time_since_epoch().count();
-    m_lastModifiedTime = currentTime.time_since_epoch().count();
-  }
-
-  inline void updateLastAccessTime(time_point currTime) {
-    m_lastAccessTime = currTime.time_since_epoch().count();
-  }
-
-  inline void updateLastModifiedTime(time_point currTime) {
-    m_lastModifiedTime = currTime.time_since_epoch().count();
-  }
-
-  inline void setExpiryTaskId(ExpiryTaskManager::id_type id) {
-    m_expiryTaskId = id;
-  }
-
-  inline ExpiryTaskManager::id_type getExpiryTaskId() const {
-    return m_expiryTaskId;
-  }
-
-  inline void cancelExpiryTaskId(
-      const std::shared_ptr<CacheableKey>& key) const {
-    auto taskIdStr = std::to_string(m_expiryTaskId);
-    LOGDEBUG("Cancelling expiration task for key [%s] with id [%s]",
-             Utils::nullSafeToString(key).c_str(), taskIdStr.c_str());
-    m_expiryTaskManager->cancelTask(m_expiryTaskId);
-  }
-
- protected:
-  // this constructor deliberately skips initializing any fields
-  inline explicit ExpEntryProperties(bool)
-      : m_lastAccessTime(0), m_lastModifiedTime(0) {}
-
- private:
-  /** last access time in secs, 32bit.. */
-  std::atomic<time_point::duration::rep> m_lastAccessTime;
-  /** last modified time in secs, 32bit.. */
-  std::atomic<time_point::duration::rep> m_lastModifiedTime;
-  /** The expiry task id for this particular entry.. **/
-  ExpiryTaskManager::id_type m_expiryTaskId;
-  ExpiryTaskManager* m_expiryTaskManager;
-};
 
 /**
  * @brief Interface class for region mapped entry value.
  */
-class APACHE_GEODE_EXPORT MapEntry {
+class MapEntry {
  public:
-  virtual ~MapEntry() {}
+  virtual ~MapEntry() noexcept = default;
 
   virtual void getKey(std::shared_ptr<CacheableKey>& result) const = 0;
   virtual void getValue(std::shared_ptr<Cacheable>& result) const = 0;
@@ -191,119 +116,10 @@
   virtual void cleanup(const CacheEventFlags eventFlags) = 0;
 
  protected:
-  inline MapEntry() {}
+  inline MapEntry() = default;
 
   inline explicit MapEntry(bool) {}
 };
-
-/**
- * @brief Hold region mapped entry value. subclass will hold lru flags.
- * Another holds expiration timestamps.
- */
-class MapEntryImpl : public MapEntry,
-                     public std::enable_shared_from_this<MapEntryImpl> {
- public:
-  ~MapEntryImpl() override = default;
-  MapEntryImpl(const MapEntryImpl&) = delete;
-  MapEntryImpl& operator=(const MapEntryImpl&) = delete;
-
-  inline void getKeyI(std::shared_ptr<CacheableKey>& result) const {
-    result = m_key;
-  }
-
-  inline void getValueI(std::shared_ptr<Cacheable>& result) const {
-    // If value is destroyed, then this returns nullptr
-    if (CacheableToken::isDestroyed(m_value)) {
-      result = nullptr;
-    } else {
-      result = m_value;
-    }
-  }
-
-  inline void setValueI(const std::shared_ptr<Cacheable>& value) {
-    m_value = value;
-  }
-
-  void getKey(std::shared_ptr<CacheableKey>& result) const override {
-    getKeyI(result);
-  }
-
-  void getValue(std::shared_ptr<Cacheable>& result) const override {
-    getValueI(result);
-  }
-
-  void setValue(const std::shared_ptr<Cacheable>& value) override {
-    setValueI(value);
-  }
-
-  std::shared_ptr<MapEntryImpl> getImplPtr() override {
-    return shared_from_this();
-  }
-
-  LRUEntryProperties& getLRUProperties() override {
-    throw FatalInternalException(
-        "MapEntry::getLRUProperties called for "
-        "non-LRU MapEntry");
-  }
-
-  ExpEntryProperties& getExpProperties() override {
-    throw FatalInternalException(
-        "MapEntry::getExpProperties called for "
-        "non-expiration MapEntry");
-  }
-
-  VersionStamp& getVersionStamp() override {
-    throw FatalInternalException(
-        "MapEntry::getVersionStamp called for "
-        "non-versioned MapEntry");
-  }
-
-  void cleanup(const CacheEventFlags) override {}
-
- protected:
-  inline explicit MapEntryImpl(bool) : MapEntry(true) {}
-
-  inline explicit MapEntryImpl(const std::shared_ptr<CacheableKey>& key)
-      : MapEntry(), m_key(key) {}
-
-  std::shared_ptr<Cacheable> m_value;
-  std::shared_ptr<CacheableKey> m_key;
-};
-
-class APACHE_GEODE_EXPORT VersionedMapEntryImpl : public MapEntryImpl,
-                                                  public VersionStamp {
- public:
-  virtual ~VersionedMapEntryImpl() {}
-
-  virtual VersionStamp& getVersionStamp() { return *this; }
-
- protected:
-  inline explicit VersionedMapEntryImpl(bool) : MapEntryImpl(true) {}
-
-  inline explicit VersionedMapEntryImpl(
-      const std::shared_ptr<CacheableKey>& key)
-      : MapEntryImpl(key) {}
-
- private:
-  // disabled
-  VersionedMapEntryImpl(const VersionedMapEntryImpl&);
-  VersionedMapEntryImpl& operator=(const VersionedMapEntryImpl&);
-};
-
-class APACHE_GEODE_EXPORT EntryFactory {
- public:
-  explicit EntryFactory(const bool concurrencyChecksEnabled)
-      : m_concurrencyChecksEnabled(concurrencyChecksEnabled) {}
-
-  virtual ~EntryFactory() {}
-
-  virtual void newMapEntry(ExpiryTaskManager* expiryTaskManager,
-                           const std::shared_ptr<CacheableKey>& key,
-                           std::shared_ptr<MapEntryImpl>& result) const;
-
- protected:
-  bool m_concurrencyChecksEnabled;
-};
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/MapEntry.cpp b/cppcache/src/MapEntryImpl.cpp
similarity index 70%
rename from cppcache/src/MapEntry.cpp
rename to cppcache/src/MapEntryImpl.cpp
index a6667c5..cddf117 100644
--- a/cppcache/src/MapEntry.cpp
+++ b/cppcache/src/MapEntryImpl.cpp
@@ -15,7 +15,9 @@
  * limitations under the License.
  */
 
-#include "MapEntry.hpp"
+#include "MapEntryImpl.hpp"
+
+#include <geode/ExceptionTypes.hpp>
 
 #include "MapEntryT.hpp"
 
@@ -23,6 +25,24 @@
 namespace geode {
 namespace client {
 
+LRUEntryProperties& MapEntryImpl::getLRUProperties() {
+  throw FatalInternalException(
+      "MapEntry::getLRUProperties called for "
+      "non-LRU MapEntry");
+}
+
+ExpEntryProperties& MapEntryImpl::getExpProperties() {
+  throw FatalInternalException(
+      "MapEntry::getExpProperties called for "
+      "non-expiration MapEntry");
+}
+
+VersionStamp& MapEntryImpl::getVersionStamp() {
+  throw FatalInternalException(
+      "MapEntry::getVersionStamp called for "
+      "non-versioned MapEntry");
+}
+
 void EntryFactory::newMapEntry(ExpiryTaskManager*,
                                const std::shared_ptr<CacheableKey>& key,
                                std::shared_ptr<MapEntryImpl>& result) const {
diff --git a/cppcache/src/MapEntryImpl.hpp b/cppcache/src/MapEntryImpl.hpp
new file mode 100644
index 0000000..23b00a2
--- /dev/null
+++ b/cppcache/src/MapEntryImpl.hpp
@@ -0,0 +1,145 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+#ifndef GEODE_MAPENTRYIMPL_H_
+#define GEODE_MAPENTRYIMPL_H_
+
+#include <atomic>
+#include <memory>
+#include <utility>
+
+#include <geode/CacheableKey.hpp>
+#include <geode/Serializable.hpp>
+#include <geode/internal/geode_globals.hpp>
+
+#include "CacheableToken.hpp"
+#include "MapEntry.hpp"
+#include "RegionInternal.hpp"
+#include "VersionStamp.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
+class CacheImpl;
+class ExpEntryProperties;
+class ExpiryTaskManager;
+class LRUEntryProperties;
+
+/**
+ * @brief Hold region mapped entry value. subclass will hold lru flags.
+ * Another holds expiration timestamps.
+ */
+class MapEntryImpl : public MapEntry,
+                     public std::enable_shared_from_this<MapEntryImpl> {
+ public:
+  ~MapEntryImpl() override = default;
+  MapEntryImpl(const MapEntryImpl&) = delete;
+  MapEntryImpl& operator=(const MapEntryImpl&) = delete;
+
+  inline void getKeyI(std::shared_ptr<CacheableKey>& result) const {
+    result = m_key;
+  }
+
+  inline void getValueI(std::shared_ptr<Cacheable>& result) const {
+    // If value is destroyed, then this returns nullptr
+    if (CacheableToken::isDestroyed(m_value)) {
+      result = nullptr;
+    } else {
+      result = m_value;
+    }
+  }
+
+  inline void setValueI(const std::shared_ptr<Cacheable>& value) {
+    m_value = value;
+  }
+
+  void getKey(std::shared_ptr<CacheableKey>& result) const override {
+    getKeyI(result);
+  }
+
+  void getValue(std::shared_ptr<Cacheable>& result) const override {
+    getValueI(result);
+  }
+
+  void setValue(const std::shared_ptr<Cacheable>& value) override {
+    setValueI(value);
+  }
+
+  std::shared_ptr<MapEntryImpl> getImplPtr() override {
+    return shared_from_this();
+  }
+
+  LRUEntryProperties& getLRUProperties() override;
+
+  ExpEntryProperties& getExpProperties() override;
+
+  VersionStamp& getVersionStamp() override;
+
+  void cleanup(const CacheEventFlags) override {}
+
+ protected:
+  inline explicit MapEntryImpl(bool) : MapEntry(true) {}
+
+  inline explicit MapEntryImpl(const std::shared_ptr<CacheableKey>& key)
+      : MapEntry(), m_key(key) {}
+
+  std::shared_ptr<Cacheable> m_value;
+  std::shared_ptr<CacheableKey> m_key;
+};
+
+class APACHE_GEODE_EXPORT VersionedMapEntryImpl : public MapEntryImpl,
+                                                  public VersionStamp {
+ public:
+  ~VersionedMapEntryImpl() override = default;
+
+  VersionStamp& getVersionStamp() override { return *this; }
+
+ protected:
+  inline explicit VersionedMapEntryImpl(bool) : MapEntryImpl(true) {}
+
+  inline explicit VersionedMapEntryImpl(
+      const std::shared_ptr<CacheableKey>& key)
+      : MapEntryImpl(key) {}
+
+ private:
+  // disabled
+  VersionedMapEntryImpl(const VersionedMapEntryImpl&);
+  VersionedMapEntryImpl& operator=(const VersionedMapEntryImpl&);
+};
+
+class APACHE_GEODE_EXPORT EntryFactory {
+ public:
+  explicit EntryFactory(const bool concurrencyChecksEnabled)
+      : m_concurrencyChecksEnabled(concurrencyChecksEnabled) {}
+
+  virtual ~EntryFactory() {}
+
+  virtual void newMapEntry(ExpiryTaskManager* expiryTaskManager,
+                           const std::shared_ptr<CacheableKey>& key,
+                           std::shared_ptr<MapEntryImpl>& result) const;
+
+ protected:
+  bool m_concurrencyChecksEnabled;
+};
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+#endif  // GEODE_MAPENTRYIMPL_H_
diff --git a/cppcache/src/MapSegment.cpp b/cppcache/src/MapSegment.cpp
index 36ef62f..190e005 100644
--- a/cppcache/src/MapSegment.cpp
+++ b/cppcache/src/MapSegment.cpp
@@ -24,8 +24,8 @@
 #include "TableOfPrimes.hpp"
 #include "ThinClientPoolDM.hpp"
 #include "ThinClientRegion.hpp"
-#include "TombstoneExpiryHandler.hpp"
-#include "TrackedMapEntry.hpp"
+#include "TombstoneEntry.hpp"
+#include "TombstoneExpiryTask.hpp"
 #include "Utils.hpp"
 #include "util/concurrent/spinlock_mutex.hpp"
 
@@ -34,25 +34,20 @@
 namespace client {
 
 bool MapSegment::boolVal = false;
-MapSegment::~MapSegment() {
-  delete m_map;
-  // m_entryFactory will be disposed by the containing EntriesMap impl.
-}
 
 void MapSegment::open(RegionInternal* region, const EntryFactory* entryFactory,
                       ExpiryTaskManager* expiryTaskManager, uint32_t size,
                       std::atomic<int32_t>* destroyTrackers,
                       bool concurrencyChecksEnabled) {
-  m_map = new CacheableKeyHashMap();
   uint32_t mapSize = TableOfPrimes::nextLargerPrime(size, m_primeIndex);
   LOGFINER("Initializing MapSegment with size %d (given size %d).", mapSize,
            size);
-  m_map->reserve(mapSize);
+  m_map.reserve(mapSize);
   m_entryFactory = entryFactory;
   m_region = region;
   m_tombstoneList =
-      std::make_shared<TombstoneList>(this, m_region->getCacheImpl());
-  m_expiryTaskManager = expiryTaskManager;
+      std::make_shared<TombstoneList>(*this, *m_region->getCacheImpl());
+  expiry_manager_ = expiryTaskManager;
   m_numDestroyTrackers = destroyTrackers;
   m_concurrencyChecksEnabled = concurrencyChecksEnabled;
 }
@@ -61,7 +56,7 @@
 
 void MapSegment::clear() {
   std::lock_guard<decltype(m_spinlock)> lk(m_spinlock);
-  m_map->clear();
+  m_map.clear();
 }
 
 void MapSegment::lock() { m_segmentMutex.lock(); }
@@ -74,63 +69,56 @@
                              std::shared_ptr<Cacheable>& oldValue,
                              int updateCount, int destroyTracker,
                              std::shared_ptr<VersionTag> versionTag) {
-  ExpiryTaskManager::id_type taskid = -1;
-  TombstoneExpiryHandler* handler = nullptr;
   GfErrType err = GF_NOERR;
-  {
-    std::lock_guard<decltype(m_spinlock)> lk(m_spinlock);
-    // if size is greater than 75 percent of prime, rehash
-    auto mapSize = TableOfPrimes::getPrime(m_primeIndex);
-    if (((m_map->size() * 75) / 100) > mapSize) {
-      rehash();
+  std::lock_guard<decltype(m_spinlock)> lk(m_spinlock);
+  // if size is greater than 75 percent of prime, rehash
+  auto mapSize = TableOfPrimes::getPrime(m_primeIndex);
+  if (((m_map.size() * 75) / 100) > mapSize) {
+    rehash();
+  }
+
+  const auto& find = m_map.find(key);
+  if (find == m_map.end()) {
+    if ((err = putNoEntry(key, newValue, me, updateCount, destroyTracker,
+                          versionTag)) != GF_NOERR) {
+      return err;
     }
-
-    const auto& find = m_map->find(key);
-    if (find == m_map->end()) {
-      if ((err = putNoEntry(key, newValue, me, updateCount, destroyTracker,
-                            versionTag)) != GF_NOERR) {
-        return err;
+  } else {
+    auto& entry = find->second;
+    auto entryImpl = entry->getImplPtr();
+    entryImpl->getValueI(oldValue);
+    if (oldValue == nullptr || CacheableToken::isTombstone(oldValue)) {
+      // pass the version stamp
+      VersionStamp versionStamp;
+      if (m_concurrencyChecksEnabled) {
+        versionStamp = entry->getVersionStamp();
+        if (versionTag) {
+          err =
+              versionStamp.processVersionTag(m_region, key, versionTag, false);
+          if (err != GF_NOERR) return err;
+          versionStamp.setVersions(versionTag);
+        }
       }
-    } else {
-      auto& entry = find->second;
-      auto entryImpl = entry->getImplPtr();
-      entryImpl->getValueI(oldValue);
-      if (oldValue == nullptr || CacheableToken::isTombstone(oldValue)) {
-        // pass the version stamp
-        VersionStamp versionStamp;
-        if (m_concurrencyChecksEnabled) {
-          versionStamp = entry->getVersionStamp();
-          if (versionTag) {
-            err = versionStamp.processVersionTag(m_region, key, versionTag,
-                                                 false);
-            if (err != GF_NOERR) return err;
-            versionStamp.setVersions(versionTag);
-          }
-        }
-        // good case; go ahead with the create
-        if (oldValue == nullptr) {
-          err = putForTrackedEntry(key, newValue, entry, entryImpl, updateCount,
-                                   versionStamp);
-        } else {
-          unguardedRemoveActualEntryWithoutCancelTask(key, handler, taskid);
-          err = putNoEntry(key, newValue, me, updateCount, destroyTracker,
-                           versionTag, &versionStamp);
-        }
-
-        oldValue = nullptr;
-
+      // good case; go ahead with the create
+      if (oldValue == nullptr) {
+        err = putForTrackedEntry(key, newValue, entry, entryImpl, updateCount,
+                                 versionStamp);
       } else {
-        err = GF_CACHE_ENTRY_EXISTS;
+        remove_entry(key);
+        err = putNoEntry(key, newValue, me, updateCount, destroyTracker,
+                         versionTag, &versionStamp);
       }
-      if (err == GF_NOERR) {
-        me = entryImpl;
-      }
+
+      oldValue = nullptr;
+
+    } else {
+      err = GF_CACHE_ENTRY_EXISTS;
+    }
+    if (err == GF_NOERR) {
+      me = entryImpl;
     }
   }
-  if (taskid != -1) {
-    m_expiryTaskManager->cancelTask(taskid);
-    if (handler != nullptr) delete handler;
-  }
+
   return err;
 }
 
@@ -144,67 +132,59 @@
                           int destroyTracker, bool& isUpdate,
                           std::shared_ptr<VersionTag> versionTag,
                           DataInput* delta) {
-  ExpiryTaskManager::id_type taskid = -1;
-  TombstoneExpiryHandler* handler = nullptr;
   GfErrType err = GF_NOERR;
-  {
-    std::lock_guard<decltype(m_spinlock)> lk(m_spinlock);
-    // if size is greater than 75 percent of prime, rehash
-    uint32_t mapSize = TableOfPrimes::getPrime(m_primeIndex);
-    if (((m_map->size() * 75) / 100) > mapSize) {
-      rehash();
+  std::lock_guard<decltype(m_spinlock)> lk(m_spinlock);
+  // if size is greater than 75 percent of prime, rehash
+  uint32_t mapSize = TableOfPrimes::getPrime(m_primeIndex);
+  if (((m_map.size() * 75) / 100) > mapSize) {
+    rehash();
+  }
+
+  const auto& find = m_map.find(key);
+  if (find == m_map.end()) {
+    if (delta != nullptr) {
+      return GF_INVALID_DELTA;  // You can not apply delta when there is no
     }
-
-    const auto& find = m_map->find(key);
-    if (find == m_map->end()) {
-      if (delta != nullptr) {
-        return GF_INVALID_DELTA;  // You can not apply delta when there is no
-      }
-      // entry hence ask for full object
-      isUpdate = false;
-      err = putNoEntry(key, newValue, me, updateCount, destroyTracker,
-                       versionTag);
-    } else {
-      auto& entry = find->second;
-      auto entryImpl = entry->getImplPtr();
-      std::shared_ptr<Cacheable> meOldValue;
-      entryImpl->getValueI(meOldValue);
-      // pass the version stamp
-      VersionStamp versionStamp;
-      if (m_concurrencyChecksEnabled) {
-        versionStamp = entry->getVersionStamp();
-        if (versionTag) {
-          if (delta == nullptr) {
-            err = versionStamp.processVersionTag(m_region, key, versionTag,
-                                                 false);
-          } else {
-            err =
-                versionStamp.processVersionTag(m_region, key, versionTag, true);
-          }
-
-          if (err != GF_NOERR) return err;
-          versionStamp.setVersions(versionTag);
+    // entry hence ask for full object
+    isUpdate = false;
+    err =
+        putNoEntry(key, newValue, me, updateCount, destroyTracker, versionTag);
+  } else {
+    auto& entry = find->second;
+    auto entryImpl = entry->getImplPtr();
+    std::shared_ptr<Cacheable> meOldValue;
+    entryImpl->getValueI(meOldValue);
+    // pass the version stamp
+    VersionStamp versionStamp;
+    if (m_concurrencyChecksEnabled) {
+      versionStamp = entry->getVersionStamp();
+      if (versionTag) {
+        if (delta == nullptr) {
+          err =
+              versionStamp.processVersionTag(m_region, key, versionTag, false);
+        } else {
+          err = versionStamp.processVersionTag(m_region, key, versionTag, true);
         }
-      }
-      if (CacheableToken::isTombstone(meOldValue)) {
-        unguardedRemoveActualEntryWithoutCancelTask(key, handler, taskid);
-        err = putNoEntry(key, newValue, me, updateCount, destroyTracker,
-                         versionTag, &versionStamp);
-        meOldValue = nullptr;
-        isUpdate = false;
-      } else if ((err = putForTrackedEntry(key, newValue, entry, entryImpl,
-                                           updateCount, versionStamp, delta)) ==
-                 GF_NOERR) {
-        me = entryImpl;
-        oldValue = meOldValue;
-        isUpdate = (meOldValue != nullptr);
+
+        if (err != GF_NOERR) return err;
+        versionStamp.setVersions(versionTag);
       }
     }
+    if (CacheableToken::isTombstone(meOldValue)) {
+      remove_entry(key);
+      err = putNoEntry(key, newValue, me, updateCount, destroyTracker,
+                       versionTag, &versionStamp);
+      meOldValue = nullptr;
+      isUpdate = false;
+    } else if ((err = putForTrackedEntry(key, newValue, entry, entryImpl,
+                                         updateCount, versionStamp, delta)) ==
+               GF_NOERR) {
+      me = entryImpl;
+      oldValue = meOldValue;
+      isUpdate = (meOldValue != nullptr);
+    }
   }
-  if (taskid != -1) {
-    m_expiryTaskManager->cancelTask(taskid);
-    if (handler != nullptr) delete handler;
-  }
+
   return err;
 }
 
@@ -217,8 +197,8 @@
   isTokenAdded = false;
   GfErrType err = GF_NOERR;
 
-  const auto& find = m_map->find(key);
-  if (find != m_map->end()) {
+  const auto& find = m_map.find(key);
+  if (find != m_map.end()) {
     auto entry = find->second;
     VersionStamp versionStamp;
     if (m_concurrencyChecksEnabled) {
@@ -261,13 +241,12 @@
     const std::shared_ptr<CacheableKey>& key,
     std::shared_ptr<Cacheable>& oldValue, std::shared_ptr<MapEntryImpl>& me,
     int updateCount, std::shared_ptr<VersionTag> versionTag, bool afterRemote,
-    bool& isEntryFound, ExpiryTaskManager::id_type expiryTaskID,
-    TombstoneExpiryHandler* handler, bool& expTaskSet) {
+    bool& isEntryFound) {
   GfErrType err = GF_NOERR;
   VersionStamp versionStamp;
   // If entry found, else return no entry
-  const auto& find = m_map->find(key);
-  if (find != m_map->end()) {
+  const auto& find = m_map.find(key);
+  if (find != m_map.end()) {
     auto entry = find->second;
     isEntryFound = true;
     // If the version tag is null, use the version tag of
@@ -291,8 +270,7 @@
     if ((err = putForTrackedEntry(key, CacheableToken::tombstone(), entry,
                                   entryImpl, updateCount, versionStamp)) ==
         GF_NOERR) {
-      m_tombstoneList->add(entryImpl, handler, expiryTaskID);
-      expTaskSet = true;
+      m_tombstoneList->add(entryImpl);
     }
     if (CacheableToken::isTombstone(oldValue)) {
       oldValue = nullptr;
@@ -310,8 +288,7 @@
     if (versionTag) {
       std::shared_ptr<MapEntryImpl> mapEntry;
       putNoEntry(key, CacheableToken::tombstone(), mapEntry, -1, 0, versionTag);
-      m_tombstoneList->add(mapEntry->getImplPtr(), handler, expiryTaskID);
-      expTaskSet = true;
+      m_tombstoneList->add(mapEntry->getImplPtr());
     }
     oldValue = nullptr;
     isEntryFound = false;
@@ -333,28 +310,20 @@
                              std::shared_ptr<VersionTag> versionTag,
                              bool afterRemote, bool& isEntryFound) {
   if (m_concurrencyChecksEnabled) {
-    TombstoneExpiryHandler* handler;
-    auto id = m_tombstoneList->getExpiryTask(&handler);
-    bool expTaskSet = false;
     GfErrType err;
     {
       std::lock_guard<decltype(m_spinlock)> lk(m_spinlock);
       err = removeWhenConcurrencyEnabled(key, oldValue, me, updateCount,
-                                         versionTag, afterRemote, isEntryFound,
-                                         id, handler, expTaskSet);
+                                         versionTag, afterRemote, isEntryFound);
     }
 
-    if (!expTaskSet) {
-      m_expiryTaskManager->cancelTask(id);
-      delete handler;
-    }
     return err;
   }
 
   std::lock_guard<decltype(m_spinlock)> lk(m_spinlock);
-  auto&& iter = m_map->find(key);
 
-  if (iter == m_map->end()) {
+  auto&& iter = m_map.find(key);
+  if (iter == m_map.end()) {
     // didn't unbind, probably no entry...
     oldValue = nullptr;
     volatile int destroyTrackers = *m_numDestroyTrackers;
@@ -365,7 +334,7 @@
   }
 
   auto entry = iter->second;
-  m_map->erase(iter);
+  m_map.erase(iter);
 
   if (updateCount >= 0 && updateCount != entry->getUpdateCount()) {
     // this is the case when entry has been updated while being tracked
@@ -382,31 +351,27 @@
   return GF_NOERR;
 }
 
-bool MapSegment::unguardedRemoveActualEntry(
-    const std::shared_ptr<CacheableKey>& key, bool cancelTask) {
-  m_tombstoneList->eraseEntryFromTombstoneList(key, cancelTask);
-  if (m_map->erase(key) == 0) {
-    return false;
-  }
-  return true;
+void MapSegment::remove_entry(const std::shared_ptr<CacheableKey>& key) {
+  m_tombstoneList->erase(key);
+  m_map.erase(key);
 }
 
-bool MapSegment::unguardedRemoveActualEntryWithoutCancelTask(
-    const std::shared_ptr<CacheableKey>& key, TombstoneExpiryHandler*& handler,
-    ExpiryTaskManager::id_type& taskid) {
-  std::shared_ptr<MapEntry> entry;
-  taskid = m_tombstoneList->eraseEntryFromTombstoneListWithoutCancelTask(
-      key, handler);
-  if (m_map->erase(key) == 0) {
-    return false;
-  }
-  return true;
-}
-
-bool MapSegment::removeActualEntry(const std::shared_ptr<CacheableKey>& key,
-                                   bool cancelTask) {
+bool MapSegment::remove_tomb_entry(
+    const std::shared_ptr<TombstoneEntry>& entry) {
   std::lock_guard<decltype(m_spinlock)> lk(m_spinlock);
-  return unguardedRemoveActualEntry(key, cancelTask);
+  if (!entry->valid()) {
+    return false;
+  }
+
+  std::shared_ptr<CacheableKey> key;
+  entry->entry()->getKeyI(key);
+
+  if (!m_tombstoneList->erase(key, false)) {
+    return false;
+  }
+
+  m_map.erase(key);
+  return true;
 }
 /**
  * @brief get MapEntry for key. throws NoEntryException if absent.
@@ -416,8 +381,8 @@
                           std::shared_ptr<Cacheable>& value) {
   std::lock_guard<decltype(m_spinlock)> lk(m_spinlock);
 
-  const auto& find = m_map->find(key);
-  if (find == m_map->end()) {
+  const auto& find = m_map.find(key);
+  if (find == m_map.end()) {
     result = nullptr;
     value = nullptr;
     return false;
@@ -442,8 +407,8 @@
 bool MapSegment::containsKey(const std::shared_ptr<CacheableKey>& key) {
   std::lock_guard<decltype(m_spinlock)> lk(m_spinlock);
 
-  const auto& find = m_map->find(key);
-  if (find == m_map->end()) {
+  const auto& find = m_map.find(key);
+  if (find == m_map.end()) {
     return false;
   }
   auto mePtr = find->second;
@@ -463,7 +428,7 @@
 void MapSegment::getKeys(std::vector<std::shared_ptr<CacheableKey>>& result) {
   std::lock_guard<decltype(m_spinlock)> lk(m_spinlock);
 
-  for (const auto& kv : *m_map) {
+  for (const auto& kv : m_map) {
     std::shared_ptr<Cacheable> valuePtr;
     kv.second->getImplPtr()->getValueI(valuePtr);
     if (!CacheableToken::isTombstone(valuePtr)) {
@@ -478,7 +443,7 @@
 void MapSegment::getEntries(std::vector<std::shared_ptr<RegionEntry>>& result) {
   std::lock_guard<decltype(m_spinlock)> lk(m_spinlock);
 
-  for (const auto& kv : *m_map) {
+  for (const auto& kv : m_map) {
     std::shared_ptr<CacheableKey> keyPtr;
     std::shared_ptr<Cacheable> valuePtr;
     auto me = kv.second->getImplPtr();
@@ -499,7 +464,7 @@
  */
 void MapSegment::getValues(std::vector<std::shared_ptr<Cacheable>>& result) {
   std::lock_guard<decltype(m_spinlock)> lk(m_spinlock);
-  for (const auto& kv : *m_map) {
+  for (const auto& kv : m_map) {
     auto& entry = kv.second;
     std::shared_ptr<Cacheable> value;
     entry->getValue(value);
@@ -529,13 +494,13 @@
   std::lock_guard<decltype(m_spinlock)> lk(m_spinlock);
   std::shared_ptr<MapEntry> entry;
   std::shared_ptr<MapEntry> newEntry;
-  const auto& find = m_map->find(key);
-  if (find == m_map->end()) {
+  const auto& find = m_map.find(key);
+  if (find == m_map.end()) {
     oldValue = nullptr;
     if (addIfAbsent) {
       std::shared_ptr<MapEntryImpl> entryImpl;
       // add a new entry with value as destroyed
-      m_entryFactory->newMapEntry(m_expiryTaskManager, key, entryImpl);
+      m_entryFactory->newMapEntry(expiry_manager_, key, entryImpl);
       entryImpl->setValueI(CacheableToken::destroyed());
       entry = entryImpl;
       newEntry = entryImpl;
@@ -560,8 +525,8 @@
     updateCount = entry->addTracker(newEntry);
   }
   if (newEntry) {
-    if (find == m_map->end()) {
-      m_map->emplace(key, newEntry);
+    if (find == m_map.end()) {
+      m_map.emplace(key, newEntry);
     } else {
       find->second = newEntry;
     }
@@ -577,8 +542,8 @@
   if (m_concurrencyChecksEnabled) return;
   std::lock_guard<decltype(m_spinlock)> lk(m_spinlock);
 
-  const auto& find = m_map->find(key);
-  if (find != m_map->end()) {
+  const auto& find = m_map.find(key);
+  if (find != m_map.end()) {
     auto& entry = find->second;
     auto impl = entry->getImplPtr();
     removeTrackerForEntry(key, entry, impl);
@@ -595,7 +560,7 @@
 
   std::shared_ptr<MapEntry> newEntry;
   std::shared_ptr<CacheableKey> key;
-  for (auto& kv : *m_map) {
+  for (auto& kv : m_map) {
     kv.second->getKey(key);
     int updateCount = kv.second->addTracker(newEntry);
     if (newEntry != nullptr) {
@@ -622,7 +587,7 @@
   // Only called from put, segment must already be locked...
   auto newMapSize = TableOfPrimes::getPrime(++m_primeIndex);
   LOGFINER("Rehashing MapSegment to size %d.", newMapSize);
-  m_map->reserve(newMapSize);
+  m_map.reserve(newMapSize);
   m_rehashCount++;
 }
 std::shared_ptr<Cacheable> MapSegment::getFromDisc(
@@ -706,7 +671,7 @@
     }
     if (m_concurrencyChecksEnabled) {
       // erase if the entry is in tombstone
-      m_tombstoneList->eraseEntryFromTombstoneList(key, true);
+      m_tombstoneList->erase(key, true);
       entryImpl->getVersionStamp().setVersions(versionStamp);
     }
     (void)incrementUpdateCount(key, entry);
@@ -725,11 +690,11 @@
 }
 void MapSegment::reapTombstones(std::map<uint16_t, int64_t>& gcVersions) {
   std::lock_guard<decltype(m_spinlock)> lk(m_spinlock);
-  m_tombstoneList->reapTombstones(gcVersions);
+  m_tombstoneList->reap_tombstones(gcVersions);
 }
 void MapSegment::reapTombstones(std::shared_ptr<CacheableHashSet> removedKeys) {
   std::lock_guard<decltype(m_spinlock)> lk(m_spinlock);
-  m_tombstoneList->reapTombstones(removedKeys);
+  m_tombstoneList->reap_tombstones(removedKeys);
 }
 
 GfErrType MapSegment::isTombstone(std::shared_ptr<CacheableKey> key,
@@ -737,8 +702,8 @@
                                   bool& result) {
   std::shared_ptr<Cacheable> value;
   std::shared_ptr<MapEntryImpl> mePtr;
-  const auto& find = m_map->find(key);
-  if (find == m_map->end()) {
+  const auto& find = m_map.find(key);
+  if (find == m_map.end()) {
     result = false;
     return GF_NOERR;
   }
@@ -758,8 +723,8 @@
 
   if (CacheableToken::isTombstone(value)) {
     if (m_tombstoneList->exists(key)) {
-      const auto& findInTombstoneList = m_map->find(key);
-      if (findInTombstoneList != m_map->end()) {
+      const auto& findInTombstoneList = m_map.find(key);
+      if (findInTombstoneList != m_map.end()) {
         mePtr = findInTombstoneList->second->getImplPtr();
         me = mePtr;
       }
diff --git a/cppcache/src/MapSegment.hpp b/cppcache/src/MapSegment.hpp
index 47f7b62..750ff92 100644
--- a/cppcache/src/MapSegment.hpp
+++ b/cppcache/src/MapSegment.hpp
@@ -31,7 +31,7 @@
 #include <geode/internal/geode_globals.hpp>
 
 #include "CacheableToken.hpp"
-#include "MapEntry.hpp"
+#include "MapEntryImpl.hpp"
 #include "MapWithLock.hpp"
 #include "TombstoneList.hpp"
 #include "util/concurrent/spinlock_mutex.hpp"
@@ -40,23 +40,26 @@
 namespace geode {
 namespace client {
 
+class EntryFactory;
 class RegionInternal;
-typedef std::unordered_map<std::shared_ptr<CacheableKey>,
-                           std::shared_ptr<MapEntry>,
-                           dereference_hash<std::shared_ptr<CacheableKey>>,
-                           dereference_equal_to<std::shared_ptr<CacheableKey>>>
-    CacheableKeyHashMap;
 
 /** @brief type wrapper around the std::unordered_map implementation. */
-class APACHE_GEODE_EXPORT MapSegment {
+class MapSegment {
+ private:
+  using CacheableKeyHashMap =
+      std::unordered_map<std::shared_ptr<CacheableKey>,
+                         std::shared_ptr<MapEntry>,
+                         dereference_hash<std::shared_ptr<CacheableKey>>,
+                         dereference_equal_to<std::shared_ptr<CacheableKey>>>;
+
  private:
   // contain
-  CacheableKeyHashMap* m_map;
+  CacheableKeyHashMap m_map;
   // refers to object managed by the entries map...
   // does not need deletion here.
   const EntryFactory* m_entryFactory;
   RegionInternal* m_region;
-  ExpiryTaskManager* m_expiryTaskManager;
+  ExpiryTaskManager* expiry_manager_;
 
   // index of the current prime in the primes table
   uint32_t m_primeIndex;
@@ -85,7 +88,7 @@
     std::shared_ptr<MapEntry> newEntry;
     entry->incrementUpdateCount(newEntry);
     if (newEntry != nullptr) {
-      m_map->emplace(key, newEntry);
+      m_map.emplace(key, newEntry);
       entry = newEntry;
       return true;
     }
@@ -109,13 +112,13 @@
       entryImpl->getValueI(value);
       if (value == nullptr) {
         // get rid of an entry marked as destroyed
-        m_map->erase(key);
+        m_map.erase(key);
         return;
       }
     }
     if (trackerPair.first) {
       entry = entryImpl ? entryImpl : entry->getImplPtr();
-      (*m_map)[key] = entry;
+      m_map[key] = entry;
     }
   }
 
@@ -139,7 +142,7 @@
         }
       }
     }
-    m_entryFactory->newMapEntry(m_expiryTaskManager, key, newEntry);
+    m_entryFactory->newMapEntry(expiry_manager_, key, newEntry);
     newEntry->setValueI(newValue);
     if (m_concurrencyChecksEnabled) {
       if (versionTag) {
@@ -148,7 +151,7 @@
         newEntry->getVersionStamp().setVersions(*versionStamp);
       }
     }
-    m_map->emplace(key, newEntry);
+    m_map.emplace(key, newEntry);
     return GF_NOERR;
   }
 
@@ -167,15 +170,14 @@
       const std::shared_ptr<CacheableKey>& key,
       std::shared_ptr<Cacheable>& oldValue, std::shared_ptr<MapEntryImpl>& me,
       int updateCount, std::shared_ptr<VersionTag> versionTag, bool afterRemote,
-      bool& isEntryFound, ExpiryTaskManager::id_type expiryTaskID,
-      TombstoneExpiryHandler* handler, bool& expTaskSet);
+      bool& isEntryFound);
 
  public:
   MapSegment()
-      : m_map(nullptr),
+      : m_map(),
         m_entryFactory(nullptr),
         m_region(nullptr),
-        m_expiryTaskManager(nullptr),
+        expiry_manager_(nullptr),
         m_primeIndex(0),
         m_spinlock(),
         m_segmentMutex(),
@@ -184,8 +186,6 @@
         m_rehashCount(0),
         m_tombstoneList(nullptr) {}
 
-  ~MapSegment();
-
   // methods for BasicLockable
   void lock();
   void unlock();
@@ -283,15 +283,9 @@
 
   void reapTombstones(std::shared_ptr<CacheableHashSet> removedKeys);
 
-  bool removeActualEntry(const std::shared_ptr<CacheableKey>& key,
-                         bool cancelTask = true);
+  bool remove_tomb_entry(const std::shared_ptr<TombstoneEntry>& entry);
 
-  bool unguardedRemoveActualEntryWithoutCancelTask(
-      const std::shared_ptr<CacheableKey>& key,
-      TombstoneExpiryHandler*& handler, ExpiryTaskManager::id_type& taskid);
-
-  bool unguardedRemoveActualEntry(const std::shared_ptr<CacheableKey>& key,
-                                  bool cancelTask = true);
+  void remove_entry(const std::shared_ptr<CacheableKey>& key);
 
   GfErrType isTombstone(std::shared_ptr<CacheableKey> key,
                         std::shared_ptr<MapEntryImpl>& me, bool& result);
diff --git a/cppcache/src/MemberListForVersionStamp.cpp b/cppcache/src/MemberListForVersionStamp.cpp
index 7e8c023..fb6b860 100644
--- a/cppcache/src/MemberListForVersionStamp.cpp
+++ b/cppcache/src/MemberListForVersionStamp.cpp
@@ -16,6 +16,8 @@
  */
 #include "MemberListForVersionStamp.hpp"
 
+#include <boost/thread/lock_types.hpp>
+
 #include "util/Log.hpp"
 
 namespace apache {
@@ -33,7 +35,7 @@
 // This function is protected  using readers/writer lock
 uint16_t MemberListForVersionStamp::add(
     std::shared_ptr<DSMemberForVersionStamp> member) {
-  WriteGuard guard(m_mapLock);
+  boost::unique_lock<decltype(mutex_)> guard(mutex_);
   std::unordered_map<std::string, DistributedMemberWithIntIdentifier>::iterator
       it = m_members2.find(member->getHashKey());
   if (it != m_members2.end()) return (*it).second.m_identifier;
@@ -50,7 +52,7 @@
 // This function is protected  using readers/writer lock
 std::shared_ptr<DSMemberForVersionStamp> MemberListForVersionStamp::getDSMember(
     uint16_t memberId) {
-  ReadGuard guard(m_mapLock);
+  boost::shared_lock<decltype(mutex_)> guard{mutex_};
   std::unordered_map<uint32_t,
                      std::shared_ptr<DSMemberForVersionStamp>>::iterator it =
       m_members1.find(memberId);
diff --git a/cppcache/src/MemberListForVersionStamp.hpp b/cppcache/src/MemberListForVersionStamp.hpp
index f2ab52e..be9d359 100644
--- a/cppcache/src/MemberListForVersionStamp.hpp
+++ b/cppcache/src/MemberListForVersionStamp.hpp
@@ -23,11 +23,11 @@
 #include <memory>
 #include <unordered_map>
 
+#include <boost/thread/shared_mutex.hpp>
+
 #include <geode/internal/geode_globals.hpp>
 
 #include "DSMemberForVersionStamp.hpp"
-#include "ReadWriteLock.hpp"
-
 namespace apache {
 namespace geode {
 namespace client {
@@ -56,7 +56,7 @@
   std::unordered_map<std::string, DistributedMemberWithIntIdentifier>
       m_members2;
 
-  ACE_RW_Thread_Mutex m_mapLock;
+  boost::shared_mutex mutex_;
   uint32_t m_memberCounter;
 };
 
diff --git a/cppcache/src/NoResult.hpp b/cppcache/src/NoResult.hpp
index d7ca1b2..119cc66 100644
--- a/cppcache/src/NoResult.hpp
+++ b/cppcache/src/NoResult.hpp
@@ -37,7 +37,7 @@
  *
  *
  */
-class APACHE_GEODE_EXPORT NoResult final : public ResultCollector {
+class NoResult final : public ResultCollector {
  public:
   NoResult() = default;
   ~NoResult() final = default;
diff --git a/cppcache/src/PdxFieldType.cpp b/cppcache/src/PdxFieldType.cpp
index 188ed35..1f8026c 100644
--- a/cppcache/src/PdxFieldType.cpp
+++ b/cppcache/src/PdxFieldType.cpp
@@ -32,28 +32,28 @@
 namespace client {
 
 static const int32_t kFixedTypeSizes[] = {
-    PdxTypes::BOOLEAN_SIZE,  // BOOLEAN
-    PdxTypes::BOOLEAN_SIZE,  // BYTE
-    PdxTypes::CHAR_SIZE,     // CHAR
-    PdxTypes::CHAR_SIZE,     // SHORT
-    PdxTypes::INTEGER_SIZE,  // INT
-    PdxTypes::LONG_SIZE,     // LONG
-    PdxTypes::INTEGER_SIZE,  // FLOAT
-    PdxTypes::LONG_SIZE,     // DOUBLE
-    PdxTypes::DATE_SIZE,     // DATE
-    -1,                      // STRING
-    -1,                      // OBJECT
-    -1,                      // BOOLEAN_ARRAY
-    -1,                      // CHAR_ARRAY
-    -1,                      // BYTE_ARRAY
-    -1,                      // SHORT_ARRAY
-    -1,                      // INT_ARRAY
-    -1,                      // LONG_ARRAY
-    -1,                      // FLOAT_ARRAY
-    -1,                      // DOUBLE_ARRAY
-    -1,                      // STRING_ARRAY
-    -1,                      // OBJECT_ARRAY
-    -1,                      // ARRAY_OF_BYTE_ARRAYS
+    PdxTypes::kPdxBooleanSize,  // BOOLEAN
+    PdxTypes::kPdxBooleanSize,  // BYTE
+    PdxTypes::kPdxCharSize,     // CHAR
+    PdxTypes::kPdxCharSize,     // SHORT
+    PdxTypes::kPdxIntegerSize,  // INT
+    PdxTypes::kPdxLongSize,     // LONG
+    PdxTypes::kPdxIntegerSize,  // FLOAT
+    PdxTypes::kPdxLongSize,     // DOUBLE
+    PdxTypes::kPdxDateSize,     // DATE
+    -1,                         // STRING
+    -1,                         // OBJECT
+    -1,                         // BOOLEAN_ARRAY
+    -1,                         // CHAR_ARRAY
+    -1,                         // BYTE_ARRAY
+    -1,                         // SHORT_ARRAY
+    -1,                         // INT_ARRAY
+    -1,                         // LONG_ARRAY
+    -1,                         // FLOAT_ARRAY
+    -1,                         // DOUBLE_ARRAY
+    -1,                         // STRING_ARRAY
+    -1,                         // OBJECT_ARRAY
+    -1,                         // ARRAY_OF_BYTE_ARRAYS
 };
 
 PdxFieldType::PdxFieldType()
@@ -140,12 +140,10 @@
 }
 
 std::string PdxFieldType::toString() const {
-  char stringBuf[1024];
-  std::snprintf(stringBuf, 1024,
-                " PdxFieldName=%s TypeId=%d VarLenFieldIdx=%d sequenceid=%d\n",
-                this->m_fieldName.c_str(), static_cast<int>(this->m_typeId),
-                this->m_varLenFieldIdx, this->m_sequenceId);
-  return std::string(stringBuf);
+  return std::string("PdxFieldName=") + m_fieldName +
+         " TypeId=" + std::to_string(static_cast<int>(m_typeId)) +
+         " VarLenFieldIdx=" + std::to_string(m_varLenFieldIdx) +
+         " sequenceid=" + std::to_string(m_sequenceId);
 }
 
 bool PdxFieldType::operator==(const PdxFieldType& other) const {
diff --git a/cppcache/src/PdxFieldType.hpp b/cppcache/src/PdxFieldType.hpp
index ffd24bf..0ff900f 100644
--- a/cppcache/src/PdxFieldType.hpp
+++ b/cppcache/src/PdxFieldType.hpp
@@ -34,8 +34,7 @@
 namespace geode {
 namespace client {
 
-class APACHE_GEODE_EXPORT PdxFieldType
-    : public internal::DataSerializableInternal {
+class PdxFieldType : public internal::DataSerializableInternal {
  private:
   std::string m_fieldName;
   std::string m_className;
diff --git a/cppcache/src/PdxHelper.cpp b/cppcache/src/PdxHelper.cpp
index fc2f97a..81c2f2d 100644
--- a/cppcache/src/PdxHelper.cpp
+++ b/cppcache/src/PdxHelper.cpp
@@ -37,6 +37,31 @@
 #include "ThinClientPoolDM.hpp"
 #include "Utils.hpp"
 
+namespace {
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::PdxType;
+using apache::geode::client::PdxTypeRegistry;
+using apache::geode::client::Pool;
+using apache::geode::client::SerializationRegistry;
+
+std::shared_ptr<PdxType> checkAndFetchPdxType(
+    Pool* pool, std::shared_ptr<PdxTypeRegistry>& pdxTypeRegistry,
+    const std::shared_ptr<SerializationRegistry>& serializationRegistry,
+    int32_t typeId) {
+  auto pType = pdxTypeRegistry->getPdxType(typeId);
+  if (pType != nullptr) {
+    return pType;
+  }
+
+  pType = std::dynamic_pointer_cast<PdxType>(
+      serializationRegistry->GetPDXTypeById(pool, typeId));
+  pdxTypeRegistry->addLocalPdxType(pType->getPdxClassName(), pType);
+  pdxTypeRegistry->addPdxType(pType->getTypeId(), pType);
+
+  return pType;
+}
+}  // namespace
+
 namespace apache {
 namespace geode {
 namespace client {
@@ -47,35 +72,24 @@
 
 PdxHelper::~PdxHelper() {}
 
+void PdxHelper::serializePdx(DataOutput& output, PdxInstanceImpl* instance) {
+  auto cacheImpl = CacheRegionHelper::getCacheImpl(output.getCache());
+  auto registry = cacheImpl->getPdxTypeRegistry();
+
+  auto type = instance->getPdxType(DataOutputInternal::getPool(output));
+  PdxLocalWriter plw{output, type, registry};
+  instance->toData(plw);
+  plw.endObjectWriting();  // now write typeid
+
+  instance->updatePdxStream(plw.getPdxStream());
+}
+
 void PdxHelper::serializePdx(
     DataOutput& output, const std::shared_ptr<PdxSerializable>& pdxObject) {
-  auto pdxII = std::dynamic_pointer_cast<PdxInstanceImpl>(pdxObject);
   auto cacheImpl = CacheRegionHelper::getCacheImpl(output.getCache());
   auto pdxTypeRegistry = cacheImpl->getPdxTypeRegistry();
   auto& cachePerfStats = cacheImpl->getCachePerfStats();
 
-  if (pdxII != nullptr) {
-    auto piPt = pdxII->getPdxType();
-    if (piPt != nullptr &&
-        piPt->getTypeId() ==
-            0)  // from pdxInstance factory need to get typeid from server
-    {
-      int typeId = pdxTypeRegistry->getPDXIdForType(
-          piPt, DataOutputInternal::getPool(output));
-      pdxII->setPdxId(typeId);
-    }
-    auto plw = PdxLocalWriter(output, piPt, pdxTypeRegistry);
-    pdxII->toData(plw);
-    plw.endObjectWriting();  // now write typeid
-    int len = 0;
-    uint8_t* pdxStream = plw.getPdxStream(len);
-    pdxII->updatePdxStream(pdxStream, len);
-
-    delete[] pdxStream;
-
-    return;
-  }
-
   auto&& className = pdxObject->getClassName();
   auto localPdxType = pdxTypeRegistry->getLocalPdxType(className);
 
@@ -139,8 +153,8 @@
 std::shared_ptr<PdxSerializable> PdxHelper::deserializePdx(DataInput& dataInput,
                                                            int32_t typeId,
                                                            int32_t length) {
-  std::shared_ptr<PdxSerializable> pdxObjectptr = nullptr;
-  std::shared_ptr<PdxType> pdxLocalType = nullptr;
+  std::shared_ptr<PdxSerializable> object;
+  std::shared_ptr<PdxType> localType;
 
   auto cacheImpl = CacheRegionHelper::getCacheImpl(dataInput.getCache());
   auto pdxTypeRegistry = cacheImpl->getPdxTypeRegistry();
@@ -149,37 +163,36 @@
   auto pType = pdxTypeRegistry->getPdxType(typeId);
   if (pType) {
     // this may happen with PdxInstanceFactory
-    pdxLocalType = pdxTypeRegistry->getLocalPdxType(pType->getPdxClassName());
+    localType = pdxTypeRegistry->getLocalPdxType(pType->getPdxClassName());
   }
-  if (pType && pdxLocalType) {
+  if (pType && localType) {
     // type found
     auto&& pdxClassname = pType->getPdxClassName();
     LOGDEBUG("deserializePdx ClassName = " + pdxClassname +
              ", isLocal = " + std::to_string(pType->isLocal()));
 
-    pdxObjectptr = serializationRegistry->getPdxSerializableType(pdxClassname);
+    object = serializationRegistry->getPdxSerializableType(pdxClassname);
     if (pType->isLocal())  // local type no need to read Unread data
     {
       auto plr = PdxLocalReader(dataInput, pType, length, pdxTypeRegistry);
-      pdxObjectptr->fromData(plr);
+      object->fromData(plr);
       plr.moveStream();
     } else {
       auto prr = PdxRemoteReader(dataInput, pType, length, pdxTypeRegistry);
-      pdxObjectptr->fromData(prr);
+      object->fromData(prr);
       auto mergedVersion = pdxTypeRegistry->getMergedType(pType->getTypeId());
 
-      auto preserveData = prr.getPreservedData(mergedVersion, pdxObjectptr);
+      auto preserveData = prr.getPreservedData(mergedVersion, object);
       if (preserveData != nullptr) {
         pdxTypeRegistry->setPreserveData(
-            pdxObjectptr, preserveData,
+            object, preserveData,
             cacheImpl
                 ->getExpiryTaskManager());  // it will set data in weakhashmap
       }
       prr.moveStream();
 
-      if (auto pdxWrapper =
-              std::dynamic_pointer_cast<PdxWrapper>(pdxObjectptr)) {
-        if (!pdxWrapper->getObject()) {
+      if (auto wrapper = std::dynamic_pointer_cast<PdxWrapper>(object)) {
+        if (!wrapper->getObject()) {
           // No serializer was registered to deserialize this type.
           // Fall back to PdxInstance
           return nullptr;
@@ -187,23 +200,22 @@
       }
     }
   } else {
-    // type not found; need to get from server
-    if (!pType) {
+    if (pType == nullptr) {
       pType = std::dynamic_pointer_cast<PdxType>(
           serializationRegistry->GetPDXTypeById(
               DataInputInternal::getPool(dataInput), typeId));
-      pdxLocalType = pdxTypeRegistry->getLocalPdxType(pType->getPdxClassName());
+      localType = pdxTypeRegistry->getLocalPdxType(pType->getPdxClassName());
     }
-    pdxObjectptr =
+
+    object =
         serializationRegistry->getPdxSerializableType(pType->getPdxClassName());
-    if (!pdxLocalType) {
+    if (!localType) {
       // need to know local type
-      auto pdxRealObject = pdxObjectptr;
-      auto prtc =
-          PdxReaderWithTypeCollector(dataInput, pType, length, pdxTypeRegistry);
-      pdxObjectptr->fromData(prtc);
-      if (auto pdxWrapper =
-              std::dynamic_pointer_cast<PdxWrapper>(pdxObjectptr)) {
+      auto pdxRealObject = object;
+      PdxReaderWithTypeCollector prtc{dataInput, pType, length,
+                                      pdxTypeRegistry};
+      object->fromData(prtc);
+      if (auto pdxWrapper = std::dynamic_pointer_cast<PdxWrapper>(object)) {
         if (!pdxWrapper->getObject()) {
           // No serializer was registered to deserialize this type.
           // Fall back to PdxInstance
@@ -212,35 +224,35 @@
       }
 
       // Check for the PdxWrapper
-      pdxLocalType = prtc.getLocalType();
+      localType = prtc.getLocalType();
 
-      if (*pType == *pdxLocalType) {
+      if (*pType == *localType) {
         pdxTypeRegistry->addLocalPdxType(pdxRealObject->getClassName(), pType);
         pdxTypeRegistry->addPdxType(pType->getTypeId(), pType);
         pType->setLocal(true);
       } else {
         // Need to know local type and then merge type
-        pdxLocalType->InitializeType();
-        pdxLocalType->setTypeId(pdxTypeRegistry->getPDXIdForType(
-            pdxObjectptr->getClassName(), DataInputInternal::getPool(dataInput),
-            pdxLocalType, true));
-        pdxLocalType->setLocal(true);
+        localType->InitializeType();
+        auto id = pdxTypeRegistry->getPDXIdForType(
+            object->getClassName(), DataInputInternal::getPool(dataInput),
+            localType, true);
+        localType->setTypeId(id);
+        localType->setLocal(true);
         pdxTypeRegistry->addLocalPdxType(pdxRealObject->getClassName(),
-                                         pdxLocalType);  // added local type
-        pdxTypeRegistry->addPdxType(pdxLocalType->getTypeId(), pdxLocalType);
+                                         localType);  // added local type
+        pdxTypeRegistry->addPdxType(id, localType);
 
         pType->InitializeType();
         pdxTypeRegistry->addPdxType(pType->getTypeId(),
                                     pType);  // adding remote type
 
         // create merge type
-        createMergedType(pdxLocalType, pType, dataInput);
+        createMergedType(localType, pType, dataInput);
 
         auto mergedVersion = pdxTypeRegistry->getMergedType(pType->getTypeId());
 
-        if (auto preserveData =
-                prtc.getPreservedData(mergedVersion, pdxObjectptr)) {
-          pdxTypeRegistry->setPreserveData(pdxObjectptr, preserveData,
+        if (auto preserveData = prtc.getPreservedData(mergedVersion, object)) {
+          pdxTypeRegistry->setPreserveData(object, preserveData,
                                            cacheImpl->getExpiryTaskManager());
         }
       }
@@ -250,28 +262,30 @@
       LOGDEBUG("Adding type %d ", pType->getTypeId());
       pdxTypeRegistry->addPdxType(pType->getTypeId(),
                                   pType);  // adding remote type
-      auto prr = PdxRemoteReader(dataInput, pType, length, pdxTypeRegistry);
-      pdxObjectptr->fromData(prr);
+      PdxRemoteReader prr{dataInput, pType, length, pdxTypeRegistry};
+      object->fromData(prr);
 
       // Check for PdxWrapper to getObject.
 
-      createMergedType(pdxLocalType, pType, dataInput);
+      createMergedType(localType, pType, dataInput);
 
       auto mergedVersion = pdxTypeRegistry->getMergedType(pType->getTypeId());
 
-      auto preserveData = prr.getPreservedData(mergedVersion, pdxObjectptr);
+      auto preserveData = prr.getPreservedData(mergedVersion, object);
       if (preserveData != nullptr) {
-        pdxTypeRegistry->setPreserveData(pdxObjectptr, preserveData,
+        pdxTypeRegistry->setPreserveData(object, preserveData,
                                          cacheImpl->getExpiryTaskManager());
       }
+
       prr.moveStream();
     }
   }
-  return pdxObjectptr;
+
+  return object;
 }
 
 std::shared_ptr<PdxSerializable> PdxHelper::deserializePdx(
-    DataInput& dataInput, bool forceDeserialize) {
+    DataInput& dataInput) {
   auto cacheImpl = CacheRegionHelper::getCacheImpl(dataInput.getCache());
   auto pdxTypeRegistry = cacheImpl->getPdxTypeRegistry();
   auto serializationRegistry = cacheImpl->getSerializationRegistry();
@@ -280,7 +294,7 @@
   const auto len = dataInput.readInt32();
   const auto typeId = dataInput.readInt32();
 
-  if (!pdxTypeRegistry->getPdxReadSerialized() || forceDeserialize) {
+  if (!pdxTypeRegistry->getPdxReadSerialized()) {
     const auto pos = dataInput.currentBufferPosition();
     if (auto pdxObject = PdxHelper::deserializePdx(dataInput, typeId, len)) {
       cachePerfStats.incPdxDeSerialization(len + 9);  // pdxLen + 1 + 2*4
@@ -289,32 +303,19 @@
     dataInput.rewindCursor(dataInput.currentBufferPosition() - pos);
   }
 
-  checkAndFetchPdxType(DataInputInternal::getPool(dataInput), pdxTypeRegistry,
-                       serializationRegistry, typeId);
+  auto pType =
+      checkAndFetchPdxType(DataInputInternal::getPool(dataInput),
+                           pdxTypeRegistry, serializationRegistry, typeId);
 
-  cachePerfStats.incPdxInstanceCreations();
-
-  auto pdxObject = std::make_shared<PdxInstanceImpl>(
-      const_cast<uint8_t*>(dataInput.currentBufferPosition()), len, typeId,
+  auto object = std::make_shared<PdxInstanceImpl>(
+      const_cast<uint8_t*>(dataInput.currentBufferPosition()), len, pType,
       cachePerfStats, *pdxTypeRegistry, *cacheImpl,
       cacheImpl->getDistributedSystem()
           .getSystemProperties()
           .getEnableTimeStatistics());
 
   dataInput.advanceCursor(len);
-
-  return std::move(pdxObject);
-}
-void PdxHelper::checkAndFetchPdxType(
-    Pool* pool, std::shared_ptr<PdxTypeRegistry>& pdxTypeRegistry,
-    const std::shared_ptr<SerializationRegistry>& serializationRegistry,
-    int32_t typeId) {
-  if (!pdxTypeRegistry->getPdxType(typeId)) {
-    auto pType = std::dynamic_pointer_cast<PdxType>(
-        serializationRegistry->GetPDXTypeById(pool, typeId));
-    pdxTypeRegistry->addLocalPdxType(pType->getPdxClassName(), pType);
-    pdxTypeRegistry->addPdxType(pType->getTypeId(), pType);
-  }
+  return std::move(object);
 }
 
 void PdxHelper::createMergedType(std::shared_ptr<PdxType> localType,
diff --git a/cppcache/src/PdxHelper.hpp b/cppcache/src/PdxHelper.hpp
index 8cd5aa2..add9537 100644
--- a/cppcache/src/PdxHelper.hpp
+++ b/cppcache/src/PdxHelper.hpp
@@ -30,17 +30,14 @@
 namespace geode {
 namespace client {
 
+class PdxInstanceImpl;
+
 class PdxHelper {
  private:
   static void createMergedType(std::shared_ptr<PdxType> localType,
                                std::shared_ptr<PdxType> remoteType,
                                DataInput& dataInput);
 
-  static void checkAndFetchPdxType(
-      Pool*, std::shared_ptr<PdxTypeRegistry>& pdxTypeRegistry,
-      const std::shared_ptr<SerializationRegistry>& serializationRegistry,
-      int32_t typeId);
-
  public:
   static uint8_t PdxHeader;
 
@@ -48,11 +45,12 @@
 
   virtual ~PdxHelper();
 
+  static void serializePdx(DataOutput& output, PdxInstanceImpl* instance);
+
   static void serializePdx(DataOutput& output,
                            const std::shared_ptr<PdxSerializable>& pdxObject);
 
-  static std::shared_ptr<PdxSerializable> deserializePdx(DataInput& dataInput,
-                                                         bool forceDeserialize);
+  static std::shared_ptr<PdxSerializable> deserializePdx(DataInput& dataInput);
 
   static std::shared_ptr<PdxSerializable> deserializePdx(DataInput& dataInput,
                                                          int32_t typeId,
diff --git a/cppcache/src/PdxInstanceFactory.cpp b/cppcache/src/PdxInstanceFactory.cpp
index 269a277..e67935d 100644
--- a/cppcache/src/PdxInstanceFactory.cpp
+++ b/cppcache/src/PdxInstanceFactory.cpp
@@ -45,94 +45,98 @@
     throw IllegalStateException(
         "The PdxInstanceFactory.Create() method can only be called once.");
   }
-  auto pi = std::make_shared<PdxInstanceImpl>(
-      m_FieldVsValues, m_pdxType, m_cachePerfStats, m_pdxTypeRegistry,
-      m_cacheImpl, m_enableTimeStatistics);
+
   m_created = true;
-
-  // Forces registration of PdxType
-  auto dataOutput = m_cacheImpl.createDataOutput();
-  PdxHelper::serializePdx(dataOutput, pi);
-
-  return std::move(pi);
+  return std::make_shared<PdxInstanceImpl>(m_FieldVsValues, m_pdxType,
+                                           m_cachePerfStats, m_pdxTypeRegistry,
+                                           m_cacheImpl, m_enableTimeStatistics);
 }
+
 PdxInstanceFactory& PdxInstanceFactory::writeChar(const std::string& fieldName,
                                                   char16_t value) {
   isFieldAdded(fieldName);
   m_pdxType->addFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR,
-                                     PdxTypes::CHAR_SIZE);
+                                     PdxTypes::kPdxCharSize);
   auto cacheableObject = CacheableCharacter::create(value);
   m_FieldVsValues.emplace(fieldName, cacheableObject);
   return *this;
 }
+
 PdxInstanceFactory& PdxInstanceFactory::writeChar(const std::string& fieldName,
                                                   char value) {
   isFieldAdded(fieldName);
   m_pdxType->addFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR,
-                                     PdxTypes::CHAR_SIZE);
+                                     PdxTypes::kPdxCharSize);
   auto cacheableObject = CacheableCharacter::create(value);
   m_FieldVsValues.emplace(fieldName, cacheableObject);
   return *this;
 }
+
 PdxInstanceFactory& PdxInstanceFactory::writeBoolean(
     const std::string& fieldName, bool value) {
   isFieldAdded(fieldName);
   m_pdxType->addFixedLengthTypeField(fieldName, "bool", PdxFieldTypes::BOOLEAN,
-                                     PdxTypes::BOOLEAN_SIZE);
+                                     PdxTypes::kPdxBooleanSize);
   auto cacheableObject = CacheableBoolean::create(value);
   m_FieldVsValues.emplace(fieldName, cacheableObject);
   return *this;
 }
+
 PdxInstanceFactory& PdxInstanceFactory::writeByte(const std::string& fieldName,
                                                   int8_t value) {
   isFieldAdded(fieldName);
   m_pdxType->addFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE,
-                                     PdxTypes::BYTE_SIZE);
+                                     PdxTypes::kPdxByteSize);
   auto cacheableObject = CacheableByte::create(value);
   m_FieldVsValues.emplace(fieldName, cacheableObject);
   return *this;
 }
+
 PdxInstanceFactory& PdxInstanceFactory::writeShort(const std::string& fieldName,
                                                    int16_t value) {
   isFieldAdded(fieldName);
   m_pdxType->addFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT,
-                                     PdxTypes::SHORT_SIZE);
+                                     PdxTypes::kPdxShortSize);
   auto cacheableObject = CacheableInt16::create(value);
   m_FieldVsValues.emplace(fieldName, cacheableObject);
   return *this;
 }
+
 PdxInstanceFactory& PdxInstanceFactory::writeInt(const std::string& fieldName,
                                                  int32_t value) {
   isFieldAdded(fieldName);
   m_pdxType->addFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT,
-                                     PdxTypes::INTEGER_SIZE);
+                                     PdxTypes::kPdxIntegerSize);
   auto cacheableObject = CacheableInt32::create(value);
   m_FieldVsValues.emplace(fieldName, cacheableObject);
   return *this;
 }
+
 PdxInstanceFactory& PdxInstanceFactory::writeLong(const std::string& fieldName,
                                                   int64_t value) {
   isFieldAdded(fieldName);
   m_pdxType->addFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG,
-                                     PdxTypes::LONG_SIZE);
+                                     PdxTypes::kPdxLongSize);
   auto cacheableObject = CacheableInt64::create(value);
   m_FieldVsValues.emplace(fieldName, cacheableObject);
   return *this;
 }
+
 PdxInstanceFactory& PdxInstanceFactory::writeFloat(const std::string& fieldName,
                                                    float value) {
   isFieldAdded(fieldName);
   m_pdxType->addFixedLengthTypeField(fieldName, "float", PdxFieldTypes::FLOAT,
-                                     PdxTypes::FLOAT_SIZE);
+                                     PdxTypes::kPdxFloatSize);
   auto cacheableObject = CacheableFloat::create(value);
   m_FieldVsValues.emplace(fieldName, cacheableObject);
   return *this;
 }
+
 PdxInstanceFactory& PdxInstanceFactory::writeDouble(
     const std::string& fieldName, double value) {
   isFieldAdded(fieldName);
   m_pdxType->addFixedLengthTypeField(fieldName, "double", PdxFieldTypes::DOUBLE,
-                                     PdxTypes::DOUBLE_SIZE);
+                                     PdxTypes::kPdxDoubleSize);
   auto cacheableObject = CacheableDouble::create(value);
   m_FieldVsValues.emplace(fieldName, cacheableObject);
   return *this;
@@ -166,6 +170,7 @@
   m_FieldVsValues.emplace(fieldName, value);
   return *this;
 }
+
 PdxInstanceFactory& PdxInstanceFactory::writeObjectArray(
     const std::string& fieldName, std::shared_ptr<CacheableObjectArray> value) {
   isFieldAdded(fieldName);
@@ -174,6 +179,7 @@
   m_FieldVsValues.emplace(fieldName, value);
   return *this;
 }
+
 PdxInstanceFactory& PdxInstanceFactory::writeBooleanArray(
     const std::string& fieldName, const std::vector<bool>& value) {
   isFieldAdded(fieldName);
@@ -203,6 +209,7 @@
   m_FieldVsValues.emplace(fieldName, cacheableObject);
   return *this;
 }
+
 PdxInstanceFactory& PdxInstanceFactory::writeShortArray(
     const std::string& fieldName, const std::vector<int16_t>& value) {
   isFieldAdded(fieldName);
@@ -212,6 +219,7 @@
   m_FieldVsValues.emplace(fieldName, cacheableObject);
   return *this;
 }
+
 PdxInstanceFactory& PdxInstanceFactory::writeIntArray(
     const std::string& fieldName, const std::vector<int32_t>& value) {
   isFieldAdded(fieldName);
@@ -221,6 +229,7 @@
   m_FieldVsValues.emplace(fieldName, cacheableObject);
   return *this;
 }
+
 PdxInstanceFactory& PdxInstanceFactory::writeLongArray(
     const std::string& fieldName, const std::vector<int64_t>& value) {
   isFieldAdded(fieldName);
@@ -230,6 +239,7 @@
   m_FieldVsValues.emplace(fieldName, cacheableObject);
   return *this;
 }
+
 PdxInstanceFactory& PdxInstanceFactory::writeFloatArray(
     const std::string& fieldName, const std::vector<float>& value) {
   isFieldAdded(fieldName);
@@ -239,6 +249,7 @@
   m_FieldVsValues.emplace(fieldName, cacheableObject);
   return *this;
 }
+
 PdxInstanceFactory& PdxInstanceFactory::writeDoubleArray(
     const std::string& fieldName, const std::vector<double>& value) {
   isFieldAdded(fieldName);
@@ -270,7 +281,7 @@
     const std::string& fieldName, std::shared_ptr<CacheableDate> value) {
   isFieldAdded(fieldName);
   m_pdxType->addFixedLengthTypeField(fieldName, "Date", PdxFieldTypes::DATE,
-                                     PdxTypes::DATE_SIZE /*+ 1*/);
+                                     PdxTypes::kPdxDateSize /*+ 1*/);
   m_FieldVsValues.emplace(fieldName, value);
   return *this;
 }
@@ -290,6 +301,7 @@
   m_FieldVsValues.emplace(fieldName, cacheableObject);
   return *this;
 }
+
 PdxInstanceFactory& PdxInstanceFactory::markIdentityField(
     const std::string& fieldName) {
   auto pfType = m_pdxType->getPdxField(fieldName);
diff --git a/cppcache/src/PdxInstanceImpl.cpp b/cppcache/src/PdxInstanceImpl.cpp
index 27e7fa5..30c2577 100644
--- a/cppcache/src/PdxInstanceImpl.cpp
+++ b/cppcache/src/PdxInstanceImpl.cpp
@@ -22,58 +22,59 @@
 #include <geode/Cache.hpp>
 #include <geode/PdxFieldTypes.hpp>
 #include <geode/PdxReader.hpp>
+#include <geode/internal/DataSerializablePrimitive.hpp>
 
 #include "CacheRegionHelper.hpp"
+#include "DataInputInternal.hpp"
 #include "PdxHelper.hpp"
+#include "Utils.hpp"
 #include "util/string.hpp"
 
+namespace {
+
+int8_t BOOLEAN_DEFAULT_BYTES[] = {0};
+int8_t BYTE_DEFAULT_BYTES[] = {0};
+int8_t SHORT_DEFAULT_BYTES[] = {0, 0};
+int8_t CHAR_DEFAULT_BYTES[] = {0, 0};
+int8_t INT_DEFAULT_BYTES[] = {0, 0, 0, 0};
+int8_t LONG_DEFAULT_BYTES[] = {0, 0, 0, 0, 0, 0, 0, 0};
+int8_t FLOAT_DEFAULT_BYTES[] = {0, 0, 0, 0};
+int8_t DOUBLE_DEFAULT_BYTES[] = {0, 0, 0, 0, 0, 0, 0, 0};
+int8_t DATE_DEFAULT_BYTES[] = {-1, -1, -1, -1, -1, -1, -1, -1};
+int8_t STRING_DEFAULT_BYTES[] = {
+    static_cast<int8_t>(apache::geode::client::DSCode::CacheableNullString)};
+int8_t OBJECT_DEFAULT_BYTES[] = {
+    static_cast<int8_t>(apache::geode::client::DSCode::NullObj)};
+int8_t NULL_ARRAY_DEFAULT_BYTES[] = {-1};
+std::shared_ptr<apache::geode::client::PdxFieldType> DEFAULT_PDX_FIELD_TYPE(
+    new apache::geode::client::PdxFieldType(
+        "default", "default", apache::geode::client::PdxFieldTypes::UNKNOWN,
+        -1 /*field index*/, false, 1, -1 /*var len field idx*/));
+}  // namespace
+
 namespace apache {
 namespace geode {
 namespace client {
 
-int8_t PdxInstanceImpl::m_BooleanDefaultBytes[] = {0};
-int8_t PdxInstanceImpl::m_ByteDefaultBytes[] = {0};
-int8_t PdxInstanceImpl::m_ShortDefaultBytes[] = {0, 0};
-int8_t PdxInstanceImpl::m_CharDefaultBytes[] = {0, 0};
-int8_t PdxInstanceImpl::m_IntDefaultBytes[] = {0, 0, 0, 0};
-int8_t PdxInstanceImpl::m_LongDefaultBytes[] = {0, 0, 0, 0, 0, 0, 0, 0};
-int8_t PdxInstanceImpl::m_FloatDefaultBytes[] = {0, 0, 0, 0};
-int8_t PdxInstanceImpl::m_DoubleDefaultBytes[] = {0, 0, 0, 0, 0, 0, 0, 0};
-int8_t PdxInstanceImpl::m_DateDefaultBytes[] = {-1, -1, -1, -1, -1, -1, -1, -1};
-int8_t PdxInstanceImpl::m_StringDefaultBytes[] = {
-    static_cast<int8_t>(apache::geode::client::DSCode::CacheableNullString)};
-int8_t PdxInstanceImpl::m_ObjectDefaultBytes[] = {
-    static_cast<int8_t>(apache::geode::client::DSCode::NullObj)};
-int8_t PdxInstanceImpl::m_NULLARRAYDefaultBytes[] = {-1};
-std::shared_ptr<PdxFieldType> PdxInstanceImpl::m_DefaultPdxFieldType(
-    new PdxFieldType("default", "default", PdxFieldTypes::UNKNOWN,
-                     -1 /*field index*/, false, 1, -1 /*var len field idx*/));
-
-bool sortFunc(std::shared_ptr<PdxFieldType> field1,
-              std::shared_ptr<PdxFieldType> field2) {
-  const auto diff = field1->getFieldName().compare(field2->getFieldName());
-  if (diff < 0) {
-    return true;
-  } else {
-    return false;
-  }
-}
+using internal::DataSerializablePrimitive;
 
 PdxInstanceImpl::~PdxInstanceImpl() noexcept {}
 
 PdxInstanceImpl::PdxInstanceImpl(const uint8_t* buffer, size_t length,
-                                 int typeId, CachePerfStats& cacheStats,
+                                 std::shared_ptr<PdxType> pdxType,
+                                 CachePerfStats& cacheStats,
                                  PdxTypeRegistry& pdxTypeRegistry,
                                  const CacheImpl& cacheImpl,
                                  bool enableTimeStatistics)
-    : m_buffer(buffer, buffer + length),
-      m_typeId(typeId),
-      m_pdxType(nullptr),
-      m_cacheStats(cacheStats),
-      m_pdxTypeRegistry(pdxTypeRegistry),
-      m_cacheImpl(cacheImpl),
-      m_enableTimeStatistics(enableTimeStatistics) {
-  LOGDEBUG("PdxInstanceImpl::m_bufferLength = %zu ", m_buffer.size());
+    : buffer_(buffer, buffer + length),
+      typeId_(pdxType->getTypeId()),
+      pdxType_(pdxType),
+      cacheStats_(cacheStats),
+      pdxTypeRegistry_(pdxTypeRegistry),
+      cacheImpl_(cacheImpl),
+      enableTimeStatistics_(enableTimeStatistics) {
+  cacheStats.incPdxInstanceCreations();
+  LOGDEBUG("PdxInstanceImpl::m_bufferLength = %zu ", buffer_.size());
 }
 
 PdxInstanceImpl::PdxInstanceImpl(FieldVsValues fieldVsValue,
@@ -82,120 +83,120 @@
                                  PdxTypeRegistry& pdxTypeRegistry,
                                  const CacheImpl& cacheImpl,
                                  bool enableTimeStatistics)
-    : m_typeId(0),
-      m_pdxType(pdxType),
+    : typeId_(0),
+      pdxType_(pdxType),
       m_updatedFields(fieldVsValue),
-      m_cacheStats(cacheStats),
-      m_pdxTypeRegistry(pdxTypeRegistry),
-      m_cacheImpl(cacheImpl),
-      m_enableTimeStatistics(enableTimeStatistics) {
-  m_pdxType->InitializeType();  // to generate static position map
+      cacheStats_(cacheStats),
+      pdxTypeRegistry_(pdxTypeRegistry),
+      cacheImpl_(cacheImpl),
+      enableTimeStatistics_(enableTimeStatistics) {
+  cacheStats.incPdxInstanceCreations();
+  pdxType_->InitializeType();  // to generate static position map
 }
 
-void PdxInstanceImpl::writeField(PdxWriter& writer,
-                                 const std::string& fieldName,
+void PdxInstanceImpl::writeField(PdxWriter& writer, const std::string& name,
                                  PdxFieldTypes typeId,
                                  std::shared_ptr<Cacheable> value) {
   switch (typeId) {
     case PdxFieldTypes::INT: {
       if (auto&& val = std::dynamic_pointer_cast<CacheableInt32>(value)) {
-        writer.writeInt(fieldName, val->value());
+        writer.writeInt(name, val->value());
       }
       break;
     }
     case PdxFieldTypes::STRING: {
       if (auto&& val = std::dynamic_pointer_cast<CacheableString>(value)) {
-        writer.writeString(fieldName, val->value());
+        writer.writeString(name, val->value());
       }
       break;
     }
     case PdxFieldTypes::BOOLEAN: {
       if (auto&& val = std::dynamic_pointer_cast<CacheableBoolean>(value)) {
-        writer.writeBoolean(fieldName, val->value());
+        writer.writeBoolean(name, val->value());
       }
       break;
     }
     case PdxFieldTypes::FLOAT: {
       if (auto&& val = std::dynamic_pointer_cast<CacheableFloat>(value)) {
-        writer.writeFloat(fieldName, val->value());
+        writer.writeFloat(name, val->value());
       }
       break;
     }
     case PdxFieldTypes::DOUBLE: {
       if (auto&& val = std::dynamic_pointer_cast<CacheableDouble>(value)) {
-        writer.writeDouble(fieldName, val->value());
+        writer.writeDouble(name, val->value());
       }
       break;
     }
     case PdxFieldTypes::CHAR: {
       if (auto&& val = std::dynamic_pointer_cast<CacheableCharacter>(value)) {
-        writer.writeChar(fieldName, val->value());
+        writer.writeChar(name, val->value());
       }
       break;
     }
     case PdxFieldTypes::BYTE: {
       if (auto&& val = std::dynamic_pointer_cast<CacheableByte>(value)) {
-        writer.writeByte(fieldName, val->value());
+        writer.writeByte(name, val->value());
       }
       break;
     }
     case PdxFieldTypes::SHORT: {
       if (auto&& val = std::dynamic_pointer_cast<CacheableInt16>(value)) {
-        writer.writeShort(fieldName, val->value());
+        writer.writeShort(name, val->value());
       }
       break;
     }
     case PdxFieldTypes::LONG: {
       if (auto&& val = std::dynamic_pointer_cast<CacheableInt64>(value)) {
-        writer.writeLong(fieldName, val->value());
+        writer.writeLong(name, val->value());
       }
       break;
     }
     case PdxFieldTypes::BYTE_ARRAY: {
       if (auto&& val = std::dynamic_pointer_cast<CacheableBytes>(value)) {
-        writer.writeByteArray(fieldName, val->value());
+        writer.writeByteArray(name, val->value());
       }
       break;
     }
     case PdxFieldTypes::DOUBLE_ARRAY: {
       if (auto&& val = std::dynamic_pointer_cast<CacheableDoubleArray>(value)) {
-        writer.writeDoubleArray(fieldName, val->value());
+        writer.writeDoubleArray(name, val->value());
       }
       break;
     }
     case PdxFieldTypes::FLOAT_ARRAY: {
       if (auto&& val = std::dynamic_pointer_cast<CacheableFloatArray>(value)) {
-        writer.writeFloatArray(fieldName, val->value());
+        writer.writeFloatArray(name, val->value());
       }
       break;
     }
     case PdxFieldTypes::SHORT_ARRAY: {
       if (auto&& val = std::dynamic_pointer_cast<CacheableInt16Array>(value)) {
-        writer.writeShortArray(fieldName, val->value());
+        writer.writeShortArray(name, val->value());
       }
       break;
     }
     case PdxFieldTypes::INT_ARRAY: {
       if (auto&& val = std::dynamic_pointer_cast<CacheableInt32Array>(value)) {
-        writer.writeIntArray(fieldName, val->value());
+        writer.writeIntArray(name, val->value());
       }
       break;
     }
     case PdxFieldTypes::LONG_ARRAY: {
       if (auto&& val = std::dynamic_pointer_cast<CacheableInt64Array>(value)) {
-        writer.writeLongArray(fieldName, val->value());
+        writer.writeLongArray(name, val->value());
       }
       break;
     }
     case PdxFieldTypes::BOOLEAN_ARRAY: {
       if (auto&& val = std::dynamic_pointer_cast<BooleanArray>(value)) {
-        writer.writeBooleanArray(fieldName, val->value());
+        writer.writeBooleanArray(name, val->value());
       }
       break;
     }
     case PdxFieldTypes::CHAR_ARRAY: {
       if (auto&& val = std::dynamic_pointer_cast<CharArray>(value)) {
-        writer.writeCharArray(fieldName, val->value());
+        writer.writeCharArray(name, val->value());
       }
       break;
     }
@@ -207,13 +208,13 @@
         for (int item = 0; item < size; item++) {
           strings.push_back((*val)[item]->value());
         }
-        writer.writeStringArray(fieldName, strings);
+        writer.writeStringArray(name, strings);
       }
       break;
     }
     case PdxFieldTypes::DATE: {
       if (auto&& date = std::dynamic_pointer_cast<CacheableDate>(value)) {
-        writer.writeDate(fieldName, date);
+        writer.writeDate(name, date);
       }
       break;
     }
@@ -231,7 +232,7 @@
           }
           i++;
         }
-        writer.writeArrayOfByteArrays(fieldName, values, static_cast<int>(size),
+        writer.writeArrayOfByteArrays(name, values, static_cast<int>(size),
                                       lengths);
         delete[] values;
         delete[] lengths;
@@ -240,23 +241,24 @@
     }
     case PdxFieldTypes::OBJECT_ARRAY: {
       if (auto&& val = std::dynamic_pointer_cast<CacheableObjectArray>(value)) {
-        writer.writeObjectArray(fieldName, val);
+        writer.writeObjectArray(name, val);
       }
       break;
     }
     case PdxFieldTypes::UNKNOWN:
     case PdxFieldTypes::OBJECT: {
-      writer.writeObject(fieldName, value);
+      writer.writeObject(name, value);
     }
   }
 }
 std::shared_ptr<WritablePdxInstance> PdxInstanceImpl::createWriter() {
   LOGDEBUG("PdxInstanceImpl::createWriter m_bufferLength = %zu m_typeId = %d ",
-           m_buffer.size(), m_typeId);
+           buffer_.size(), typeId_);
+  const auto& stream = getPdxStream();
   return std::make_shared<PdxInstanceImpl>(
-      m_buffer.data(), m_buffer.size(), m_typeId, m_cacheStats,
-      m_pdxTypeRegistry, m_cacheImpl,
-      m_enableTimeStatistics);  // need to create duplicate byte stream);
+      stream.data(), stream.size(), pdxType_, cacheStats_, pdxTypeRegistry_,
+      cacheImpl_,
+      enableTimeStatistics_);  // need to create duplicate byte stream);
 }
 
 bool PdxInstanceImpl::enumerateObjectArrayEquals(
@@ -492,9 +494,9 @@
       case DSCode::PdxType:
       case DSCode::BooleanArray:
       case DSCode::CharArray:
-      case DSCode::CacheableUserData4:
-      case DSCode::ClientProxyMembershipId:
       case DSCode::CacheableUserData:
+      case DSCode::CacheableUserData2:
+      case DSCode::CacheableUserData4:
       case DSCode::NullObj:
       case DSCode::Class:
       case DSCode::JavaSerializable:
@@ -519,9 +521,8 @@
       case DSCode::CacheableTimeUnit:
       case DSCode::CacheableIdentityHashMap:
       case DSCode::CacheableStack:
-      case DSCode::InternalDistributedMember:
       case DSCode::PDX:
-      case DSCode::CacheableEnum:
+      case DSCode::PDX_ENUM:
       case DSCode::CacheableString:
       case DSCode::CacheableNullString:
       case DSCode::CacheableASCIIString:
@@ -702,12 +703,11 @@
       case DSCode::CacheableASCIIString:
       case DSCode::CacheableASCIIStringHuge:
       case DSCode::CacheableStringHuge:
-      case DSCode::InternalDistributedMember:
-      case DSCode::CacheableEnum:
-      case DSCode::ClientProxyMembershipId:
       case DSCode::CacheableUserData:
+      case DSCode::CacheableUserData2:
       case DSCode::CacheableUserData4:
       case DSCode::PDX:
+      case DSCode::PDX_ENUM:
         break;
     }
   }
@@ -726,21 +726,14 @@
 }
 
 int32_t PdxInstanceImpl::hashcode() const {
+  const auto& stream = getPdxStream();
+  auto input = cacheImpl_.createDataInput(stream.data(), stream.size());
+
   int hashCode = 1;
-
-  auto pt = getPdxType();
-
-  auto pdxIdentityFieldList = getIdentityPdxFields(pt);
-
-  auto dataInput =
-      m_cacheImpl.createDataInput(m_buffer.data(), m_buffer.size());
-
-  for (uint32_t i = 0; i < pdxIdentityFieldList.size(); i++) {
-    auto pField = pdxIdentityFieldList.at(i);
-
+  for (const auto& field : getIdentityPdxFields()) {
     LOGDEBUG("hashcode for pdxfield %s  hashcode is %d ",
-             pField->getFieldName().c_str(), hashCode);
-    switch (pField->getTypeId()) {
+             field->getFieldName().c_str(), hashCode);
+    switch (field->getTypeId()) {
       case PdxFieldTypes::CHAR:
       case PdxFieldTypes::BOOLEAN:
       case PdxFieldTypes::BYTE:
@@ -761,274 +754,284 @@
       case PdxFieldTypes::DOUBLE_ARRAY:
       case PdxFieldTypes::STRING_ARRAY:
       case PdxFieldTypes::ARRAY_OF_BYTE_ARRAYS: {
-        int retH = getRawHashCode(pt, pField, dataInput);
-        if (retH != 0) hashCode = 31 * hashCode + retH;
+        int retH = getRawHashCode(input, field);
+        if (retH != 0) {
+          hashCode = 31 * hashCode + retH;
+        }
         break;
       }
       case PdxFieldTypes::OBJECT: {
-        setOffsetForObject(dataInput, pt, pField->getSequenceId());
+        setOffsetForObject(input, field->getSequenceId());
         std::shared_ptr<Cacheable> object = nullptr;
-        dataInput.readObject(object);
+        input.readObject(object);
         if (object != nullptr) {
           hashCode = 31 * hashCode + deepArrayHashCode(object);
         }
         break;
       }
       case PdxFieldTypes::OBJECT_ARRAY: {
-        setOffsetForObject(dataInput, pt, pField->getSequenceId());
+        setOffsetForObject(input, field->getSequenceId());
         auto objectArray = CacheableObjectArray::create();
-        objectArray->fromData(dataInput);
+        objectArray->fromData(input);
         hashCode =
             31 * hashCode +
             ((objectArray != nullptr) ? deepArrayHashCode(objectArray) : 0);
         break;
       }
       case PdxFieldTypes::UNKNOWN: {
-        char excpStr[256] = {0};
-        std::snprintf(excpStr, 256, "PdxInstance not found typeid %d ",
-                      static_cast<int>(pField->getTypeId()));
-        throw IllegalStateException(excpStr);
+        throw IllegalStateException(
+            "PdxInstance not found typeid " +
+            std::to_string(static_cast<int>(field->getTypeId())));
       }
     }
   }
+
   return hashCode;
 }
 
-void PdxInstanceImpl::updatePdxStream(uint8_t* newPdxStream, int len) {
-  m_buffer.resize(len);
-  memcpy(m_buffer.data(), newPdxStream, len);
-}
+int PdxInstanceImpl::getTypeId() const { return typeId_; }
 
-std::shared_ptr<PdxType> PdxInstanceImpl::getPdxType() const {
-  if (m_typeId == 0) {
-    if (m_pdxType == nullptr) {
-      throw IllegalStateException("PdxType should not be null..");
-    }
-    return m_pdxType;
+std::shared_ptr<PdxType> PdxInstanceImpl::getPdxType(Pool* pool) const {
+  auto registry = cacheImpl_.getPdxTypeRegistry();
+  auto type = registry->getPdxType(typeId_);
+  if (type != nullptr) {
+    return type;
   }
-  auto pType = getPdxTypeRegistry().getPdxType(m_typeId);
-  return pType;
+
+  auto id = registry->getPDXIdForType(pdxType_, pool);
+  pdxType_->setTypeId(id);
+  typeId_ = id;
+
+  return pdxType_;
 }
 
-bool PdxInstanceImpl::isIdentityField(const std::string& fieldname) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldname.c_str());
-  if (pft != nullptr) {
-    return pft->getIdentityField();
+void PdxInstanceImpl::updatePdxStream(std::vector<uint8_t> stream) {
+  buffer_ = std::move(stream);
+}
+
+const std::vector<uint8_t>& PdxInstanceImpl::getPdxStream() const {
+  if (buffer_.empty()) {
+    auto output = cacheImpl_.createDataOutput();
+    PdxLocalWriter plw{output, pdxType_, cacheImpl_.getPdxTypeRegistry()};
+
+    toData(plw);
+    plw.endObjectWriting();
+    buffer_ = plw.getPdxStream();
   }
-  return false;
+
+  return buffer_;
 }
 
-bool PdxInstanceImpl::hasField(const std::string& fieldname) {
-  auto pf = getPdxType();
-  auto pft = pf->getPdxField(fieldname.c_str());
-  return (pft != nullptr);
+bool PdxInstanceImpl::isIdentityField(const std::string& name) {
+  auto field = pdxType_->getPdxField(name);
+  return field != nullptr && field->getIdentityField();
 }
 
-bool PdxInstanceImpl::getBooleanField(const std::string& fieldname) const {
-  auto dataInput = getDataInputForField(fieldname);
-  return dataInput.readBoolean();
+bool PdxInstanceImpl::hasField(const std::string& name) {
+  return pdxType_->getPdxField(name) != nullptr;
 }
 
-int8_t PdxInstanceImpl::getByteField(const std::string& fieldname) const {
-  auto dataInput = getDataInputForField(fieldname);
-  return dataInput.read();
+bool PdxInstanceImpl::getBooleanField(const std::string& name) const {
+  auto input = getDataInputForField(name);
+  return input.readBoolean();
 }
 
-int16_t PdxInstanceImpl::getShortField(const std::string& fieldname) const {
-  auto dataInput = getDataInputForField(fieldname);
-  return dataInput.readInt16();
+int8_t PdxInstanceImpl::getByteField(const std::string& name) const {
+  auto input = getDataInputForField(name);
+  return input.read();
 }
 
-int32_t PdxInstanceImpl::getIntField(const std::string& fieldname) const {
-  auto dataInput = getDataInputForField(fieldname);
-  return dataInput.readInt32();
+int16_t PdxInstanceImpl::getShortField(const std::string& name) const {
+  auto input = getDataInputForField(name);
+  return input.readInt16();
 }
 
-int64_t PdxInstanceImpl::getLongField(const std::string& fieldname) const {
-  auto dataInput = getDataInputForField(fieldname);
-  return dataInput.readInt64();
+int32_t PdxInstanceImpl::getIntField(const std::string& name) const {
+  auto input = getDataInputForField(name);
+  return input.readInt32();
 }
 
-float PdxInstanceImpl::getFloatField(const std::string& fieldname) const {
-  auto dataInput = getDataInputForField(fieldname);
-  return dataInput.readFloat();
+int64_t PdxInstanceImpl::getLongField(const std::string& name) const {
+  auto input = getDataInputForField(name);
+  return input.readInt64();
 }
 
-double PdxInstanceImpl::getDoubleField(const std::string& fieldname) const {
-  auto dataInput = getDataInputForField(fieldname);
-  return dataInput.readDouble();
+float PdxInstanceImpl::getFloatField(const std::string& name) const {
+  auto input = getDataInputForField(name);
+  return input.readFloat();
 }
 
-char16_t PdxInstanceImpl::getCharField(const std::string& fieldname) const {
-  auto dataInput = getDataInputForField(fieldname);
-  return dataInput.readInt16();
+double PdxInstanceImpl::getDoubleField(const std::string& name) const {
+  auto input = getDataInputForField(name);
+  return input.readDouble();
 }
 
-std::string PdxInstanceImpl::getStringField(
-    const std::string& fieldname) const {
-  auto dataInput = getDataInputForField(fieldname);
-  return dataInput.readString();
+char16_t PdxInstanceImpl::getCharField(const std::string& name) const {
+  auto input = getDataInputForField(name);
+  return input.readInt16();
+}
+
+std::string PdxInstanceImpl::getStringField(const std::string& name) const {
+  auto input = getDataInputForField(name);
+  return input.readString();
 }
 
 std::vector<bool> PdxInstanceImpl::getBooleanArrayField(
-    const std::string& fieldname) const {
-  auto dataInput = getDataInputForField(fieldname);
-  return dataInput.readBooleanArray();
+    const std::string& name) const {
+  auto input = getDataInputForField(name);
+  return input.readBooleanArray();
 }
 
 std::vector<int8_t> PdxInstanceImpl::getByteArrayField(
-    const std::string& fieldname) const {
-  auto dataInput = getDataInputForField(fieldname);
-  return dataInput.readByteArray();
+    const std::string& name) const {
+  auto input = getDataInputForField(name);
+  return input.readByteArray();
 }
 
 std::vector<int16_t> PdxInstanceImpl::getShortArrayField(
-    const std::string& fieldname) const {
-  auto dataInput = getDataInputForField(fieldname);
-  return dataInput.readShortArray();
+    const std::string& name) const {
+  auto input = getDataInputForField(name);
+  return input.readShortArray();
 }
 
 std::vector<int32_t> PdxInstanceImpl::getIntArrayField(
-    const std::string& fieldname) const {
-  auto dataInput = getDataInputForField(fieldname);
-  return dataInput.readIntArray();
+    const std::string& name) const {
+  auto input = getDataInputForField(name);
+  return input.readIntArray();
 }
 
 std::vector<int64_t> PdxInstanceImpl::getLongArrayField(
-    const std::string& fieldname) const {
-  auto dataInput = getDataInputForField(fieldname);
-  return dataInput.readLongArray();
+    const std::string& name) const {
+  auto input = getDataInputForField(name);
+  return input.readLongArray();
 }
 
 std::vector<float> PdxInstanceImpl::getFloatArrayField(
-    const std::string& fieldname) const {
-  auto dataInput = getDataInputForField(fieldname);
-  return dataInput.readFloatArray();
+    const std::string& name) const {
+  auto input = getDataInputForField(name);
+  return input.readFloatArray();
 }
 
 std::vector<double> PdxInstanceImpl::getDoubleArrayField(
-    const std::string& fieldname) const {
-  auto dataInput = getDataInputForField(fieldname);
-  return dataInput.readDoubleArray();
+    const std::string& name) const {
+  auto input = getDataInputForField(name);
+  return input.readDoubleArray();
 }
 
 std::vector<char16_t> PdxInstanceImpl::getCharArrayField(
-    const std::string& fieldname) const {
-  auto dataInput = getDataInputForField(fieldname);
-  return dataInput.readCharArray();
+    const std::string& name) const {
+  auto input = getDataInputForField(name);
+  return input.readCharArray();
 }
 
 std::vector<std::string> PdxInstanceImpl::getStringArrayField(
-    const std::string& fieldname) const {
-  auto dataInput = getDataInputForField(fieldname);
-  return dataInput.readStringArray();
+    const std::string& name) const {
+  auto input = getDataInputForField(name);
+  return input.readStringArray();
 }
 
 std::shared_ptr<CacheableDate> PdxInstanceImpl::getCacheableDateField(
-    const std::string& fieldname) const {
-  auto dataInput = getDataInputForField(fieldname);
+    const std::string& name) const {
+  auto input = getDataInputForField(name);
   auto value = CacheableDate::create();
-  value->fromData(dataInput);
+  value->fromData(input);
   return value;
 }
 
 std::shared_ptr<Cacheable> PdxInstanceImpl::getCacheableField(
-    const std::string& fieldname) const {
-  auto dataInput = getDataInputForField(fieldname);
+    const std::string& name) const {
+  auto dataInput = getDataInputForField(name);
   std::shared_ptr<Cacheable> value;
   dataInput.readObject(value);
   return value;
 }
 std::shared_ptr<CacheableObjectArray>
-PdxInstanceImpl::getCacheableObjectArrayField(
-    const std::string& fieldname) const {
-  auto dataInput = getDataInputForField(fieldname);
+PdxInstanceImpl::getCacheableObjectArrayField(const std::string& name) const {
+  auto dataInput = getDataInputForField(name);
   auto value = CacheableObjectArray::create();
   value->fromData(dataInput);
   return value;
 }
 
-void PdxInstanceImpl::getField(const std::string& fieldname, int8_t*** value,
+void PdxInstanceImpl::getField(const std::string& name, int8_t*** value,
                                int32_t& arrayLength,
                                int32_t*& elementLength) const {
-  auto dataInput = getDataInputForField(fieldname);
+  auto dataInput = getDataInputForField(name);
   dataInput.readArrayOfByteArrays(value, arrayLength, &elementLength);
 }
 
 std::string PdxInstanceImpl::toString() const {
-  auto pt = getPdxType();
-  std::string toString = "PDX[" + std::to_string(pt->getTypeId()) + "," +
-                         pt->getPdxClassName() + "]{";
+  std::string result = "PDX[" + std::to_string(pdxType_->getTypeId()) + "," +
+                       pdxType_->getPdxClassName() + "]{";
   bool firstElement = true;
-  auto identityFields = getIdentityPdxFields(pt);
+  auto identityFields = getIdentityPdxFields();
   for (size_t i = 0; i < identityFields.size(); i++) {
     if (firstElement) {
       firstElement = false;
     } else {
-      toString += ",";
+      result += ",";
     }
-    toString += identityFields.at(i)->getFieldName();
-    toString += "=";
+    result += identityFields.at(i)->getFieldName();
+    result += "=";
 
     switch (identityFields.at(i)->getTypeId()) {
       case PdxFieldTypes::BOOLEAN: {
         auto&& value = getBooleanField(identityFields.at(i)->getFieldName());
-        toString += value ? "true" : "false";
+        result += value ? "true" : "false";
         break;
       }
       case PdxFieldTypes::BYTE: {
         auto&& value = getByteField(identityFields.at(i)->getFieldName());
-        toString += std::to_string(value);
+        result += std::to_string(value);
         break;
       }
       case PdxFieldTypes::SHORT: {
         int16_t value = getShortField(identityFields.at(i)->getFieldName());
-        toString += std::to_string(value);
+        result += std::to_string(value);
         break;
       }
       case PdxFieldTypes::INT: {
         int32_t value = getIntField(identityFields.at(i)->getFieldName());
-        toString += std::to_string(value);
+        result += std::to_string(value);
         break;
       }
       case PdxFieldTypes::LONG: {
         int64_t value = getLongField(identityFields.at(i)->getFieldName());
-        toString += std::to_string(value);
+        result += std::to_string(value);
         break;
       }
       case PdxFieldTypes::FLOAT: {
         float value = getFloatField(identityFields.at(i)->getFieldName());
-        toString += std::to_string(value);
+        result += std::to_string(value);
         break;
       }
       case PdxFieldTypes::DOUBLE: {
         double value = getDoubleField(identityFields.at(i)->getFieldName());
-        toString += std::to_string(value);
+        result += std::to_string(value);
         break;
       }
       case PdxFieldTypes::CHAR: {
         auto value = getCharField(identityFields.at(i)->getFieldName());
-        toString += to_utf8(std::u16string{value});
+        result += to_utf8(std::u16string{value});
         break;
       }
       case PdxFieldTypes::STRING: {
         auto value = getStringField(identityFields.at(i)->getFieldName());
-        toString += value;
+        result += value;
         break;
       }
       case PdxFieldTypes::CHAR_ARRAY: {
         auto value = getCharArrayField(identityFields.at(i)->getFieldName());
         auto length = value.size();
         if (length > 0) {
-          toString += to_utf8(std::u16string(value.data(), length));
+          result += to_utf8(std::u16string(value.data(), length));
         }
         break;
       }
       case PdxFieldTypes::STRING_ARRAY: {
         auto value = getStringArrayField(identityFields.at(i)->getFieldName());
         for (auto&& v : value) {
-          toString += v;
+          result += v;
         }
         break;
       }
@@ -1037,7 +1040,7 @@
         auto length = value.size();
         if (length > 0) {
           for (auto&& v : value) {
-            toString += std::to_string(v);
+            result += std::to_string(v);
           }
         }
         break;
@@ -1047,7 +1050,7 @@
         auto length = value.size();
         if (length > 0) {
           for (auto&& v : value) {
-            toString += std::to_string(v);
+            result += std::to_string(v);
           }
         }
         break;
@@ -1057,7 +1060,7 @@
         auto length = value.size();
         if (length > 0) {
           for (auto&& v : value) {
-            toString += std::to_string(v);
+            result += std::to_string(v);
           }
         }
         break;
@@ -1067,7 +1070,7 @@
         auto length = value.size();
         if (length > 0) {
           for (auto&& v : value) {
-            toString += std::to_string(v);
+            result += std::to_string(v);
           }
         }
         break;
@@ -1077,7 +1080,7 @@
         auto length = value.size();
         if (length > 0) {
           for (auto&& v : value) {
-            toString += std::to_string(v);
+            result += std::to_string(v);
           }
         }
         break;
@@ -1087,7 +1090,7 @@
         auto length = value.size();
         if (length > 0) {
           for (auto&& v : value) {
-            toString += std::to_string(v);
+            result += std::to_string(v);
           }
         }
         break;
@@ -1096,7 +1099,7 @@
         auto value =
             getCacheableDateField(identityFields.at(i)->getFieldName());
         if (value != nullptr) {
-          toString += value->toString().c_str();
+          result += value->toString().c_str();
         }
         break;
       }
@@ -1105,7 +1108,7 @@
         auto length = value.size();
         if (length > 0) {
           for (auto&& v : value) {
-            toString += v ? "true" : "false";
+            result += v ? "true" : "false";
           }
         }
         break;
@@ -1119,7 +1122,7 @@
         if (arrayLength > 0) {
           for (int j = 0; j < arrayLength; j++) {
             for (int k = 0; k < elementLength[j]; k++) {
-              toString += std::to_string(value[j][k]);
+              result += std::to_string(value[j][k]);
             }
           }
         }
@@ -1129,7 +1132,7 @@
         auto value =
             getCacheableObjectArrayField(identityFields.at(i)->getFieldName());
         if (value != nullptr) {
-          toString += value->toString().c_str();
+          result += value->toString().c_str();
         }
         break;
       }
@@ -1137,31 +1140,37 @@
       case PdxFieldTypes::UNKNOWN: {
         auto value = getCacheableField(identityFields.at(i)->getFieldName());
         if (value != nullptr) {
-          toString += value->toString().c_str();
+          result += value->toString().c_str();
         }
       }
     }
   }
-  toString += "}";
+  result += "}";
 
-  return toString;
+  return result;
 }
 
 std::shared_ptr<PdxSerializable> PdxInstanceImpl::getObject() {
-  auto dataInput =
-      m_cacheImpl.createDataInput(m_buffer.data(), m_buffer.size());
-  int64_t sampleStartNanos =
-      m_enableTimeStatistics ? Utils::startStatOpTime() : 0;
-  //[ToDo] do we have to call incPdxDeSerialization here?
-  auto ret = PdxHelper::deserializePdx(dataInput, m_typeId,
-                                       static_cast<int32_t>(m_buffer.size()));
+  const auto& stream = getPdxStream();
+  auto len = stream.size();
 
-  if (m_enableTimeStatistics) {
-    Utils::updateStatOpTime(m_cacheStats.getStat(),
-                            m_cacheStats.getPdxInstanceDeserializationTimeId(),
+  auto input = cacheImpl_.createDataInput(stream.data(), len);
+  getPdxType(DataInputInternal::getPool(input));
+
+  int64_t sampleStartNanos =
+      enableTimeStatistics_ ? Utils::startStatOpTime() : 0;
+
+  //[ToDo] do we have to call incPdxDeSerialization here?
+  auto ret =
+      PdxHelper::deserializePdx(input, typeId_, static_cast<int32_t>(len));
+
+  if (enableTimeStatistics_) {
+    Utils::updateStatOpTime(cacheStats_.getStat(),
+                            cacheStats_.getPdxInstanceDeserializationTimeId(),
                             sampleStartNanos);
   }
-  m_cacheStats.incPdxInstanceDeserializations();
+
+  cacheStats_.incPdxInstanceDeserializations();
   return ret;
 }
 
@@ -1171,7 +1180,7 @@
   int otherIdx = -1;
   for (int32_t i = 0; i < static_cast<int32_t>(my.size()); i++) {
     auto myF = my.at(i);
-    if (!myF->equals(m_DefaultPdxFieldType)) {
+    if (!myF->equals(DEFAULT_PDX_FIELD_TYPE)) {
       for (int32_t j = 0; j < static_cast<int32_t>(other.size()); j++) {
         if (myF->equals(other[j])) {
           otherIdx = j;
@@ -1185,10 +1194,10 @@
       {
         if (i < static_cast<int32_t>(other.size())) {
           auto tmp = other.at(i);
-          other.at(i) = m_DefaultPdxFieldType;
+          other.at(i) = DEFAULT_PDX_FIELD_TYPE;
           other.push_back(tmp);
         } else {
-          other.push_back(m_DefaultPdxFieldType);
+          other.push_back(DEFAULT_PDX_FIELD_TYPE);
         }
       } else if (otherIdx != i) {
         auto tmp = other.at(i);
@@ -1199,47 +1208,44 @@
   }
 }
 
-bool PdxInstanceImpl::operator==(const CacheableKey& other) const {
-  CacheableKey& temp = const_cast<CacheableKey&>(other);
-  PdxInstanceImpl* otherPdx = dynamic_cast<PdxInstanceImpl*>(&temp);
+bool PdxInstanceImpl::operator==(const CacheableKey& o) const {
+  PdxInstanceImpl* other =
+      dynamic_cast<PdxInstanceImpl*>(const_cast<CacheableKey*>(&o));
 
-  if (otherPdx == nullptr) {
+  if (other == nullptr) {
     return false;
   }
 
-  auto myPdxType = getPdxType();
-  auto otherPdxType = otherPdx->getPdxType();
-
-  auto&& myPdxClassName = myPdxType->getPdxClassName();
-  auto&& otherPdxClassName = otherPdxType->getPdxClassName();
-
-  if (otherPdxClassName != myPdxClassName) {
+  auto otherType = other->pdxType_;
+  if (pdxType_->getPdxClassName() != otherType->getPdxClassName()) {
     return false;
   }
 
-  auto myPdxIdentityFieldList = getIdentityPdxFields(myPdxType);
-  auto otherPdxIdentityFieldList = otherPdx->getIdentityPdxFields(otherPdxType);
+  auto identityFields = getIdentityPdxFields();
+  auto otherIdentityFields = other->getIdentityPdxFields();
 
-  equatePdxFields(myPdxIdentityFieldList, otherPdxIdentityFieldList);
-  equatePdxFields(otherPdxIdentityFieldList, myPdxIdentityFieldList);
+  equatePdxFields(identityFields, otherIdentityFields);
+  equatePdxFields(otherIdentityFields, identityFields);
 
-  auto myDataInput =
-      m_cacheImpl.createDataInput(m_buffer.data(), m_buffer.size());
-  auto otherDataInput = m_cacheImpl.createDataInput(otherPdx->m_buffer.data(),
-                                                    otherPdx->m_buffer.size());
+  auto stream = getPdxStream();
+  auto otherStream = other->getPdxStream();
+
+  auto input = cacheImpl_.createDataInput(stream.data(), stream.size());
+  auto otherInput =
+      cacheImpl_.createDataInput(otherStream.data(), otherStream.size());
 
   PdxFieldTypes fieldTypeId;
-  for (size_t i = 0; i < myPdxIdentityFieldList.size(); i++) {
-    auto myPFT = myPdxIdentityFieldList.at(i);
-    auto otherPFT = otherPdxIdentityFieldList.at(i);
+  for (size_t i = 0; i < identityFields.size(); i++) {
+    auto myPFT = identityFields.at(i);
+    auto otherPFT = otherIdentityFields.at(i);
 
     LOGDEBUG("pdxfield %s ",
-             ((myPFT != m_DefaultPdxFieldType) ? myPFT->getFieldName()
-                                               : otherPFT->getFieldName())
+             ((myPFT != DEFAULT_PDX_FIELD_TYPE) ? myPFT->getFieldName()
+                                                : otherPFT->getFieldName())
                  .c_str());
-    if (myPFT->equals(m_DefaultPdxFieldType)) {
+    if (myPFT->equals(DEFAULT_PDX_FIELD_TYPE)) {
       fieldTypeId = otherPFT->getTypeId();
-    } else if (otherPFT->equals(m_DefaultPdxFieldType)) {
+    } else if (otherPFT->equals(DEFAULT_PDX_FIELD_TYPE)) {
       fieldTypeId = myPFT->getTypeId();
     } else {
       fieldTypeId = myPFT->getTypeId();
@@ -1266,8 +1272,7 @@
       case PdxFieldTypes::DOUBLE_ARRAY:
       case PdxFieldTypes::STRING_ARRAY:
       case PdxFieldTypes::ARRAY_OF_BYTE_ARRAYS: {
-        if (!compareRawBytes(*otherPdx, myPdxType, myPFT, myDataInput,
-                             otherPdxType, otherPFT, otherDataInput)) {
+        if (!compareRawBytes(input, otherInput, *other, myPFT, otherPFT)) {
           return false;
         }
         break;
@@ -1275,15 +1280,14 @@
       case PdxFieldTypes::OBJECT: {
         std::shared_ptr<Cacheable> object = nullptr;
         std::shared_ptr<Cacheable> otherObject = nullptr;
-        if (!myPFT->equals(m_DefaultPdxFieldType)) {
-          setOffsetForObject(myDataInput, myPdxType, myPFT->getSequenceId());
-          myDataInput.readObject(object);
+        if (!myPFT->equals(DEFAULT_PDX_FIELD_TYPE)) {
+          setOffsetForObject(input, myPFT->getSequenceId());
+          input.readObject(object);
         }
 
-        if (!otherPFT->equals(m_DefaultPdxFieldType)) {
-          otherPdx->setOffsetForObject(otherDataInput, otherPdxType,
-                                       otherPFT->getSequenceId());
-          otherDataInput.readObject(otherObject);
+        if (!otherPFT->equals(DEFAULT_PDX_FIELD_TYPE)) {
+          other->setOffsetForObject(otherInput, otherPFT->getSequenceId());
+          otherInput.readObject(otherObject);
         }
 
         if (object != nullptr) {
@@ -1299,15 +1303,14 @@
         auto otherObjectArray = CacheableObjectArray::create();
         auto objectArray = CacheableObjectArray::create();
 
-        if (!myPFT->equals(m_DefaultPdxFieldType)) {
-          setOffsetForObject(myDataInput, myPdxType, myPFT->getSequenceId());
-          objectArray->fromData(myDataInput);
+        if (!myPFT->equals(DEFAULT_PDX_FIELD_TYPE)) {
+          setOffsetForObject(input, myPFT->getSequenceId());
+          objectArray->fromData(input);
         }
 
-        if (!otherPFT->equals(m_DefaultPdxFieldType)) {
-          otherPdx->setOffsetForObject(otherDataInput, otherPdxType,
-                                       otherPFT->getSequenceId());
-          otherObjectArray->fromData(otherDataInput);
+        if (!otherPFT->equals(DEFAULT_PDX_FIELD_TYPE)) {
+          other->setOffsetForObject(otherInput, otherPFT->getSequenceId());
+          otherObjectArray->fromData(otherInput);
         }
         if (!deepArrayEquals(objectArray, otherObjectArray)) {
           return false;
@@ -1315,72 +1318,67 @@
         break;
       }
       case PdxFieldTypes::UNKNOWN: {
-        char excpStr[256] = {0};
-        std::snprintf(excpStr, 256, "PdxInstance not found typeid  %d ",
-                      static_cast<int>(myPFT->getTypeId()));
-        throw IllegalStateException(excpStr);
+        throw IllegalStateException(
+            std::string("PdxInstance not found typeid ") +
+            std::to_string(static_cast<int>(myPFT->getTypeId())));
       }
     }
   }
+
   return true;
 }
 
-bool PdxInstanceImpl::compareRawBytes(PdxInstanceImpl& other,
-                                      std::shared_ptr<PdxType> myPT,
-                                      std::shared_ptr<PdxFieldType> myF,
-                                      DataInput& myDataInput,
-                                      std::shared_ptr<PdxType> otherPT,
-                                      std::shared_ptr<PdxFieldType> otherF,
-                                      DataInput& otherDataInput) const {
-  if (!myF->equals(m_DefaultPdxFieldType) &&
-      !otherF->equals(m_DefaultPdxFieldType)) {
-    int pos = getOffset(myDataInput, myPT, myF->getSequenceId());
-    int nextpos =
-        getNextFieldPosition(myDataInput, myF->getSequenceId() + 1, myPT);
-    myDataInput.reset();
-    myDataInput.advanceCursor(pos);
+bool PdxInstanceImpl::compareRawBytes(
+    DataInput& input, DataInput& otherInput, PdxInstanceImpl& other,
+    std::shared_ptr<PdxFieldType> field,
+    std::shared_ptr<PdxFieldType> otherField) const {
+  auto otherType = other.pdxType_;
+  if (!field->equals(DEFAULT_PDX_FIELD_TYPE) &&
+      !otherField->equals(DEFAULT_PDX_FIELD_TYPE)) {
+    auto pos = getOffset(input, field->getSequenceId());
+    auto nextpos = getNextFieldPosition(input, field->getSequenceId() + 1);
+    input.reset();
+    input.advanceCursor(pos);
 
-    int otherPos =
-        other.getOffset(otherDataInput, otherPT, otherF->getSequenceId());
-    int otherNextpos = other.getNextFieldPosition(
-        otherDataInput, otherF->getSequenceId() + 1, otherPT);
-    otherDataInput.reset();
-    otherDataInput.advanceCursor(otherPos);
+    auto otherPos = other.getOffset(otherInput, otherField->getSequenceId());
+    int otherNextpos =
+        other.getNextFieldPosition(otherInput, otherField->getSequenceId() + 1);
+    otherInput.reset();
+    otherInput.advanceCursor(otherPos);
 
     if ((nextpos - pos) != (otherNextpos - otherPos)) {
       return false;
     }
 
     for (int i = pos; i < nextpos; i++) {
-      if (myDataInput.read() != otherDataInput.read()) {
+      if (input.read() != otherInput.read()) {
         return false;
       }
     }
 
     return true;
   } else {
-    if (myF->equals(m_DefaultPdxFieldType)) {
-      int otherPos =
-          other.getOffset(otherDataInput, otherPT, otherF->getSequenceId());
+    if (field->equals(DEFAULT_PDX_FIELD_TYPE)) {
+      int otherPos = other.getOffset(otherInput, otherField->getSequenceId());
       int otherNextpos = other.getNextFieldPosition(
-          otherDataInput, otherF->getSequenceId() + 1, otherPT);
-      return hasDefaultBytes(otherF, otherDataInput, otherPos, otherNextpos);
+          otherInput, otherField->getSequenceId() + 1);
+      return hasDefaultBytes(otherField, otherInput, otherPos, otherNextpos);
     } else {
-      int pos = getOffset(myDataInput, myPT, myF->getSequenceId());
-      int nextpos =
-          getNextFieldPosition(myDataInput, myF->getSequenceId() + 1, myPT);
-      return hasDefaultBytes(myF, myDataInput, pos, nextpos);
+      int pos = getOffset(input, field->getSequenceId());
+      int nextpos = getNextFieldPosition(input, field->getSequenceId() + 1);
+      return hasDefaultBytes(field, input, pos, nextpos);
     }
   }
 }
+
 std::shared_ptr<CacheableStringArray> PdxInstanceImpl::getFieldNames() {
-  auto pt = getPdxType();
   std::vector<std::shared_ptr<PdxFieldType>>* vectorOfFieldTypes =
-      pt->getPdxFieldTypes();
+      pdxType_->getPdxFieldTypes();
   auto size = vectorOfFieldTypes->size();
   if (size == 0) {
     return nullptr;
   }
+
   std::vector<std::shared_ptr<CacheableString>> tmpFieldNames;
   tmpFieldNames.reserve(size);
   for (auto&& fieldType : *vectorOfFieldTypes) {
@@ -1390,16 +1388,14 @@
   return CacheableStringArray::create(std::move(tmpFieldNames));
 }
 
-PdxFieldTypes PdxInstanceImpl::getFieldType(
-    const std::string& fieldname) const {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldname.c_str());
+PdxFieldTypes PdxInstanceImpl::getFieldType(const std::string& name) const {
+  auto field = pdxType_->getPdxField(name);
 
-  if (!pft) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldname);
+  if (!field) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name);
   }
 
-  return pft->getTypeId();
+  return field->getTypeId();
 }
 
 void PdxInstanceImpl::writeUnmodifieldField(DataInput& dataInput, int startPos,
@@ -1416,14 +1412,12 @@
 }
 
 void PdxInstanceImpl::toDataMutable(PdxWriter& writer) {
-  auto pt = getPdxType();
   std::vector<std::shared_ptr<PdxFieldType>>* pdxFieldList =
-      pt->getPdxFieldTypes();
+      pdxType_->getPdxFieldTypes();
   int position = 0;  // ignore typeid and length
   int nextFieldPosition = 0;
-  if (m_buffer.size() != 0) {
-    auto dataInput =
-        m_cacheImpl.createDataInput(m_buffer.data(), m_buffer.size());
+  if (buffer_.size() != 0) {
+    auto dataInput = cacheImpl_.createDataInput(buffer_.data(), buffer_.size());
     for (size_t i = 0; i < pdxFieldList->size(); i++) {
       auto currPf = pdxFieldList->at(i);
       LOGDEBUG("toData fieldName = %s , isVarLengthType = %d ",
@@ -1438,7 +1432,7 @@
       }
       if (value != nullptr) {
         writeField(writer, currPf->getFieldName(), currPf->getTypeId(), value);
-        position = getNextFieldPosition(dataInput, static_cast<int>(i) + 1, pt);
+        position = getNextFieldPosition(dataInput, static_cast<int>(i) + 1);
       } else {
         if (currPf->IsVariableLengthType()) {
           // need to add offset
@@ -1446,7 +1440,7 @@
         }
         // write raw byte array...
         nextFieldPosition =
-            getNextFieldPosition(dataInput, static_cast<int>(i) + 1, pt);
+            getNextFieldPosition(dataInput, static_cast<int>(i) + 1);
         writeUnmodifieldField(dataInput, position, nextFieldPosition,
                               static_cast<PdxLocalWriter&>(writer));
         position = nextFieldPosition;  // mark next field;
@@ -1470,62 +1464,42 @@
 }
 
 const std::string& PdxInstanceImpl::getClassName() const {
-  if (m_typeId != 0) {
-    auto pdxtype = getPdxTypeRegistry().getPdxType(m_typeId);
-    if (pdxtype == nullptr) {
-      throw IllegalStateException("PdxType is not defined for PdxInstance: " +
-                                  std::to_string(m_typeId));
-    }
-    return pdxtype->getPdxClassName();
-  }
-  throw IllegalStateException(
-      "PdxInstance typeid is not defined yet, to get classname.");
-}
-
-void PdxInstanceImpl::setPdxId(int32_t typeId) {
-  if (m_typeId == 0) {
-    m_typeId = typeId;
-    m_pdxType = nullptr;
-  } else {
-    throw IllegalStateException("PdxInstance's typeId is already set.");
-  }
+  return pdxType_->getPdxClassName();
 }
 
 std::vector<std::shared_ptr<PdxFieldType>>
-PdxInstanceImpl::getIdentityPdxFields(std::shared_ptr<PdxType> pt) const {
-  std::vector<std::shared_ptr<PdxFieldType>>* pdxFieldList =
-      pt->getPdxFieldTypes();
-  std::vector<std::shared_ptr<PdxFieldType>> retList;
-  int size = static_cast<int>(pdxFieldList->size());
-  for (int i = 0; i < size; i++) {
-    auto pft = pdxFieldList->at(i);
-    if (pft->getIdentityField()) retList.push_back(pft);
+PdxInstanceImpl::getIdentityPdxFields() const {
+  std::vector<std::shared_ptr<PdxFieldType>> result;
+  const auto& fields = *pdxType_->getPdxFieldTypes();
+
+  for (const auto& field : fields) {
+    if (field->getIdentityField()) {
+      result.push_back(field);
+    }
   }
 
-  if (retList.size() > 0) {
-    std::sort(retList.begin(), retList.end(), sortFunc);
-    return retList;
+  if (result.empty()) {
+    result = fields;
   }
 
-  for (int i = 0; i < size; i++) {
-    auto pft = pdxFieldList->at(i);
-    retList.push_back(pft);
-  }
+  std::sort(result.begin(), result.end(),
+            [](std::shared_ptr<PdxFieldType> first,
+               std::shared_ptr<PdxFieldType> second) {
+              return first->getFieldName() < second->getFieldName();
+            });
 
-  std::sort(retList.begin(), retList.end(), sortFunc);
-
-  return retList;
+  return result;
 }
 
-int PdxInstanceImpl::getOffset(DataInput& dataInput,
-                               std::shared_ptr<PdxType> pt,
-                               int sequenceId) const {
-  dataInput.resetPdx(0);
+int PdxInstanceImpl::getOffset(DataInput& input, int sequenceId) const {
+  input.resetPdx(0);
 
   int offsetSize = 0;
   int serializedLength = 0;
-  int pdxSerializedLength = static_cast<int32_t>(dataInput.getPdxBytes());
+  int pdxSerializedLength = static_cast<int32_t>(input.getPdxBytes());
+
   LOGDEBUG("getOffset pdxSerializedLength = %d ", pdxSerializedLength);
+
   if (pdxSerializedLength <= 0xff) {
     offsetSize = 1;
   } else if (pdxSerializedLength <= 0xffff) {
@@ -1534,68 +1508,62 @@
     offsetSize = 4;
   }
 
-  if (pt->getNumberOfVarLenFields() > 0) {
+  if (pdxType_->getNumberOfVarLenFields() > 0) {
     serializedLength = pdxSerializedLength -
-                       ((pt->getNumberOfVarLenFields() - 1) * offsetSize);
+                       ((pdxType_->getNumberOfVarLenFields() - 1) * offsetSize);
   } else {
     serializedLength = pdxSerializedLength;
   }
 
   //[ToDo see if currentBufferPosition can correctly replace GetCursor]
   uint8_t* offsetsBuffer =
-      const_cast<uint8_t*>(dataInput.currentBufferPosition()) +
-      serializedLength;
-  return pt->getFieldPosition(sequenceId, offsetsBuffer, offsetSize,
-                              serializedLength);
+      const_cast<uint8_t*>(input.currentBufferPosition()) + serializedLength;
+  return pdxType_->getFieldPosition(sequenceId, offsetsBuffer, offsetSize,
+                                    serializedLength);
 }
 
-int PdxInstanceImpl::getRawHashCode(std::shared_ptr<PdxType> pt,
-                                    std::shared_ptr<PdxFieldType> pField,
-                                    DataInput& dataInput) const {
-  int pos = getOffset(dataInput, pt, pField->getSequenceId());
-  int nextpos =
-      getNextFieldPosition(dataInput, pField->getSequenceId() + 1, pt);
+int PdxInstanceImpl::getRawHashCode(DataInput& input,
+                                    std::shared_ptr<PdxFieldType> field) const {
+  auto pos = getOffset(input, field->getSequenceId());
+  auto nextpos = getNextFieldPosition(input, field->getSequenceId() + 1);
 
   LOGDEBUG("pos = %d nextpos = %d ", pos, nextpos);
 
-  if (hasDefaultBytes(pField, dataInput, pos, nextpos)) {
+  if (hasDefaultBytes(field, input, pos, nextpos)) {
     return 0;  // matched default bytes
   }
 
-  dataInput.reset();
-  dataInput.advanceCursor(nextpos - 1);
+  input.reset();
+  input.advanceCursor(nextpos - 1);
 
   int h = 1;
   for (int i = nextpos - 1; i >= pos; i--) {
-    h = 31 * h + static_cast<int>(dataInput.read());
-    dataInput.reset();
-    dataInput.advanceCursor(i - 1);
+    h = 31 * h + static_cast<int>(input.read());
+    input.reset();
+    input.advanceCursor(i - 1);
   }
   LOGDEBUG("getRawHashCode nbytes = %d, final hashcode = %d ", (nextpos - pos),
            h);
   return h;
 }
 
-int PdxInstanceImpl::getNextFieldPosition(DataInput& dataInput, int fieldId,
-                                          std::shared_ptr<PdxType> pt) const {
+int PdxInstanceImpl::getNextFieldPosition(DataInput& input, int fieldId) const {
   LOGDEBUG("fieldId = %d pt->getTotalFields() = %d ", fieldId,
-           pt->getTotalFields());
-  if (fieldId == pt->getTotalFields()) {
-    // return serialized length
-    return getSerializedLength(dataInput, pt);
-  } else {
-    return getOffset(dataInput, pt, fieldId);
-  }
+           pdxType_->getTotalFields());
+
+  return fieldId == pdxType_->getTotalFields() ? getSerializedLength(input)
+                                               : getOffset(input, fieldId);
 }
 
-int PdxInstanceImpl::getSerializedLength(DataInput& dataInput,
-                                         std::shared_ptr<PdxType> pt) const {
-  dataInput.resetPdx(0);
+int PdxInstanceImpl::getSerializedLength(DataInput& input) const {
+  input.resetPdx(0);
 
   int offsetSize = 0;
   int serializedLength = 0;
-  int pdxSerializedLength = static_cast<int32_t>(dataInput.getPdxBytes());
+  int pdxSerializedLength = static_cast<int32_t>(input.getPdxBytes());
+
   LOGDEBUG("pdxSerializedLength = %d ", pdxSerializedLength);
+
   if (pdxSerializedLength <= 0xff) {
     offsetSize = 1;
   } else if (pdxSerializedLength <= 0xffff) {
@@ -1604,9 +1572,9 @@
     offsetSize = 4;
   }
 
-  if (pt->getNumberOfVarLenFields() > 0) {
+  if (pdxType_->getNumberOfVarLenFields() > 0) {
     serializedLength = pdxSerializedLength -
-                       ((pt->getNumberOfVarLenFields() - 1) * offsetSize);
+                       ((pdxType_->getNumberOfVarLenFields() - 1) * offsetSize);
   } else {
     serializedLength = pdxSerializedLength;
   }
@@ -1635,34 +1603,34 @@
                                       int end) const {
   switch (pField->getTypeId()) {
     case PdxFieldTypes::INT: {
-      return compareDefaultBytes(dataInput, start, end, m_IntDefaultBytes, 4);
+      return compareDefaultBytes(dataInput, start, end, INT_DEFAULT_BYTES, 4);
     }
     case PdxFieldTypes::STRING: {
-      return compareDefaultBytes(dataInput, start, end, m_StringDefaultBytes,
+      return compareDefaultBytes(dataInput, start, end, STRING_DEFAULT_BYTES,
                                  1);
     }
     case PdxFieldTypes::BOOLEAN: {
-      return compareDefaultBytes(dataInput, start, end, m_BooleanDefaultBytes,
+      return compareDefaultBytes(dataInput, start, end, BOOLEAN_DEFAULT_BYTES,
                                  1);
     }
     case PdxFieldTypes::FLOAT: {
-      return compareDefaultBytes(dataInput, start, end, m_FloatDefaultBytes, 4);
+      return compareDefaultBytes(dataInput, start, end, FLOAT_DEFAULT_BYTES, 4);
     }
     case PdxFieldTypes::DOUBLE: {
-      return compareDefaultBytes(dataInput, start, end, m_DoubleDefaultBytes,
+      return compareDefaultBytes(dataInput, start, end, DOUBLE_DEFAULT_BYTES,
                                  8);
     }
     case PdxFieldTypes::CHAR: {
-      return compareDefaultBytes(dataInput, start, end, m_CharDefaultBytes, 2);
+      return compareDefaultBytes(dataInput, start, end, CHAR_DEFAULT_BYTES, 2);
     }
     case PdxFieldTypes::BYTE: {
-      return compareDefaultBytes(dataInput, start, end, m_ByteDefaultBytes, 1);
+      return compareDefaultBytes(dataInput, start, end, BYTE_DEFAULT_BYTES, 1);
     }
     case PdxFieldTypes::SHORT: {
-      return compareDefaultBytes(dataInput, start, end, m_ShortDefaultBytes, 2);
+      return compareDefaultBytes(dataInput, start, end, SHORT_DEFAULT_BYTES, 2);
     }
     case PdxFieldTypes::LONG: {
-      return compareDefaultBytes(dataInput, start, end, m_LongDefaultBytes, 8);
+      return compareDefaultBytes(dataInput, start, end, LONG_DEFAULT_BYTES, 8);
     }
     case PdxFieldTypes::BYTE_ARRAY:
     case PdxFieldTypes::DOUBLE_ARRAY:
@@ -1675,14 +1643,14 @@
     case PdxFieldTypes::STRING_ARRAY:
     case PdxFieldTypes::ARRAY_OF_BYTE_ARRAYS:
     case PdxFieldTypes::OBJECT_ARRAY: {
-      return compareDefaultBytes(dataInput, start, end, m_NULLARRAYDefaultBytes,
-                                 1);
+      return compareDefaultBytes(dataInput, start, end,
+                                 NULL_ARRAY_DEFAULT_BYTES, 1);
     }
     case PdxFieldTypes::DATE: {
-      return compareDefaultBytes(dataInput, start, end, m_DateDefaultBytes, 8);
+      return compareDefaultBytes(dataInput, start, end, DATE_DEFAULT_BYTES, 8);
     }
     case PdxFieldTypes::OBJECT: {
-      return compareDefaultBytes(dataInput, start, end, m_ObjectDefaultBytes,
+      return compareDefaultBytes(dataInput, start, end, OBJECT_DEFAULT_BYTES,
                                  1);
     }
     case PdxFieldTypes::UNKNOWN: {
@@ -1692,302 +1660,257 @@
   throw IllegalStateException("hasDefaultBytes unable to find typeID ");
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName, bool value) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::BOOLEAN) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
+void PdxInstanceImpl::setField(const std::string& name, bool value) {
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::BOOLEAN) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
                                 " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
+                                (field != nullptr ? field->toString() : ""));
   }
-  auto cacheableObject = CacheableBoolean::create(value);
-  m_updatedFields[fieldName] = cacheableObject;
+
+  m_updatedFields[name] = CacheableBoolean::create(value);
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName,
-                               signed char value) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
+void PdxInstanceImpl::setField(const std::string& name, signed char value) {
+  auto field = pdxType_->getPdxField(name);
 
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::BYTE) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::BYTE) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
                                 " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
+                                (field != nullptr ? field->toString() : ""));
+  }
+
+  m_updatedFields[name] = CacheableByte::create(value);
+}
+
+void PdxInstanceImpl::setField(const std::string& name, unsigned char value) {
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::BYTE) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
+                                " or type of field not matched " +
+                                (field != nullptr ? field->toString() : ""));
   }
   auto cacheableObject = CacheableByte::create(value);
-  m_updatedFields[fieldName] = cacheableObject;
+  m_updatedFields[name] = cacheableObject;
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName,
-                               unsigned char value) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::BYTE) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
+void PdxInstanceImpl::setField(const std::string& name, int16_t value) {
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::SHORT) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
                                 " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
+                                (field != nullptr ? field->toString() : ""));
   }
-  auto cacheableObject = CacheableByte::create(value);
-  m_updatedFields[fieldName] = cacheableObject;
+
+  m_updatedFields[name] = CacheableInt16::create(value);
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName, int16_t value) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::SHORT) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
+void PdxInstanceImpl::setField(const std::string& name, int32_t value) {
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::INT) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
                                 " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
+                                (field != nullptr ? field->toString() : ""));
   }
-  auto cacheableObject = CacheableInt16::create(value);
-  m_updatedFields[fieldName] = cacheableObject;
+
+  m_updatedFields[name] = CacheableInt32::create(value);
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName, int32_t value) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::INT) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
+void PdxInstanceImpl::setField(const std::string& name, int64_t value) {
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::LONG) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
                                 " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
+                                (field != nullptr ? field->toString() : ""));
   }
-  auto cacheableObject = CacheableInt32::create(value);
-  m_updatedFields[fieldName] = cacheableObject;
+
+  m_updatedFields[name] = CacheableInt64::create(value);
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName, int64_t value) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::LONG) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
-                                " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
-  }
-  auto cacheableObject = CacheableInt64::create(value);
-  m_updatedFields[fieldName] = cacheableObject;
-}
-
-void PdxInstanceImpl::setField(const std::string& fieldName, float value) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::FLOAT) {
+void PdxInstanceImpl::setField(const std::string& name, float value) {
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::FLOAT) {
     throw IllegalStateException(
-        "PdxInstance doesn't have field " + fieldName +
+        "PdxInstance doesn't have field " + name +
         " or type of field not matched " +
-        (pft != nullptr ? pft->toString().c_str() : ""));
+        (field != nullptr ? field->toString().c_str() : ""));
   }
-  auto cacheableObject = CacheableFloat::create(value);
-  m_updatedFields[fieldName] = cacheableObject;
+
+  m_updatedFields[name] = CacheableFloat::create(value);
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName, double value) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::DOUBLE) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
+void PdxInstanceImpl::setField(const std::string& name, double value) {
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::DOUBLE) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
                                 " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
+                                (field != nullptr ? field->toString() : ""));
   }
-  auto cacheableObject = CacheableDouble::create(value);
-  m_updatedFields[fieldName] = cacheableObject;
+
+  m_updatedFields[name] = CacheableDouble::create(value);
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName, char16_t value) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::CHAR) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
+void PdxInstanceImpl::setField(const std::string& name, char16_t value) {
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::CHAR) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
                                 " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
+                                (field != nullptr ? field->toString() : ""));
   }
-  auto cacheableObject = CacheableCharacter::create(value);
-  m_updatedFields[fieldName] = cacheableObject;
+
+  m_updatedFields[name] = CacheableCharacter::create(value);
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName,
+void PdxInstanceImpl::setField(const std::string& name,
                                std::shared_ptr<CacheableDate> value) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::DATE) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::DATE) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
                                 " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
+                                (field != nullptr ? field->toString() : ""));
   }
-  auto cacheableObject = value;
-  m_updatedFields[fieldName] = cacheableObject;
+
+  m_updatedFields[name] = value;
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName,
+void PdxInstanceImpl::setField(const std::string& name,
                                std::shared_ptr<Cacheable> value) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::OBJECT) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::OBJECT) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
                                 " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
+                                (field != nullptr ? field->toString() : ""));
   }
-  m_updatedFields[fieldName] = value;
+  m_updatedFields[name] = value;
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName,
+void PdxInstanceImpl::setField(const std::string& name,
                                std::shared_ptr<CacheableObjectArray> value) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::OBJECT_ARRAY) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::OBJECT_ARRAY) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
                                 " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
+                                (field != nullptr ? field->toString() : ""));
   }
-  m_updatedFields[fieldName] = value;
+  m_updatedFields[name] = value;
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName,
+void PdxInstanceImpl::setField(const std::string& name,
                                const std::vector<bool>& value) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::BOOLEAN_ARRAY) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::BOOLEAN_ARRAY) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
                                 " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
+                                (field != nullptr ? field->toString() : ""));
   }
-  auto cacheableObject = BooleanArray::create(value);
-  m_updatedFields[fieldName] = cacheableObject;
+
+  m_updatedFields[name] = BooleanArray::create(value);
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName,
+void PdxInstanceImpl::setField(const std::string& name,
                                const std::vector<int8_t>& value) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::BYTE_ARRAY) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::BYTE_ARRAY) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
                                 " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
+                                (field != nullptr ? field->toString() : ""));
   }
-  auto cacheableObject = CacheableBytes::create(value);
-  m_updatedFields[fieldName] = cacheableObject;
+
+  m_updatedFields[name] = CacheableBytes::create(value);
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName,
+void PdxInstanceImpl::setField(const std::string& name,
                                const std::vector<int16_t>& value) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::SHORT_ARRAY) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::SHORT_ARRAY) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
                                 " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
+                                (field != nullptr ? field->toString() : ""));
   }
-  auto cacheableObject = CacheableInt16Array::create(value);
-  m_updatedFields[fieldName] = cacheableObject;
+
+  m_updatedFields[name] = CacheableInt16Array::create(value);
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName,
+void PdxInstanceImpl::setField(const std::string& name,
                                const std::vector<int32_t>& value) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::INT_ARRAY) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::INT_ARRAY) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
                                 " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
+                                (field != nullptr ? field->toString() : ""));
   }
-  auto cacheableObject = CacheableInt32Array::create(value);
-  m_updatedFields[fieldName] = cacheableObject;
+
+  m_updatedFields[name] = CacheableInt32Array::create(value);
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName,
+void PdxInstanceImpl::setField(const std::string& name,
                                const std::vector<int64_t>& value) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::LONG_ARRAY) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::LONG_ARRAY) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
                                 " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
+                                (field != nullptr ? field->toString() : ""));
   }
-  auto cacheableObject = CacheableInt64Array::create(value);
-  m_updatedFields[fieldName] = cacheableObject;
+
+  m_updatedFields[name] = CacheableInt64Array::create(value);
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName,
+void PdxInstanceImpl::setField(const std::string& name,
                                const std::vector<float>& value) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::FLOAT_ARRAY) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::FLOAT_ARRAY) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
                                 " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
+                                (field != nullptr ? field->toString() : ""));
   }
-  auto cacheableObject = CacheableFloatArray::create(value);
-  m_updatedFields[fieldName] = cacheableObject;
+
+  m_updatedFields[name] = CacheableFloatArray::create(value);
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName,
+void PdxInstanceImpl::setField(const std::string& name,
                                const std::vector<double>& value) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::DOUBLE_ARRAY) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::DOUBLE_ARRAY) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
                                 " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
+                                (field != nullptr ? field->toString() : ""));
   }
-  auto cacheableObject = CacheableDoubleArray::create(value);
-  m_updatedFields[fieldName] = cacheableObject;
+
+  m_updatedFields[name] = CacheableDoubleArray::create(value);
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName,
+void PdxInstanceImpl::setField(const std::string& name,
                                const std::vector<char16_t>& value) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::CHAR_ARRAY) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::CHAR_ARRAY) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
                                 " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
+                                (field != nullptr ? field->toString() : ""));
   }
-  auto ptr = CharArray::create(value);
-  m_updatedFields[fieldName] = ptr;
+
+  m_updatedFields[name] = CharArray::create(value);
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName,
+void PdxInstanceImpl::setField(const std::string& name,
                                const std::string& value) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::STRING) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::STRING) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
                                 " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
+                                (field != nullptr ? field->toString() : ""));
   }
-  auto ptr = CacheableString::create(value);
-  m_updatedFields[fieldName] = ptr;
+
+  m_updatedFields[name] = CacheableString::create(value);
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName, int8_t** value,
+void PdxInstanceImpl::setField(const std::string& name, int8_t** value,
                                int32_t arrayLength, int32_t* elementLength) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr &&
-      pft->getTypeId() != PdxFieldTypes::ARRAY_OF_BYTE_ARRAYS) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr &&
+      field->getTypeId() != PdxFieldTypes::ARRAY_OF_BYTE_ARRAYS) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
                                 " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
+                                (field != nullptr ? field->toString() : ""));
   }
   auto cacheableObject = CacheableVector::create();
   for (int i = 0; i < arrayLength; i++) {
@@ -1995,42 +1918,41 @@
         std::vector<int8_t>(value[i], value[i] + elementLength[i]));
     cacheableObject->push_back(ptr);
   }
-  m_updatedFields[fieldName] = cacheableObject;
+
+  m_updatedFields[name] = cacheableObject;
 }
 
-void PdxInstanceImpl::setField(const std::string& fieldName, std::string* value,
+void PdxInstanceImpl::setField(const std::string& name, std::string* value,
                                int32_t length) {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldName);
-
-  if (pft != nullptr && pft->getTypeId() != PdxFieldTypes::STRING_ARRAY) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldName +
+  auto field = pdxType_->getPdxField(name);
+  if (field != nullptr && field->getTypeId() != PdxFieldTypes::STRING_ARRAY) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name +
                                 " or type of field not matched " +
-                                (pft != nullptr ? pft->toString() : ""));
+                                (field != nullptr ? field->toString() : ""));
   }
+
   if (length > 0) {
     std::vector<std::shared_ptr<CacheableString>> tmpValues;
     tmpValues.reserve(length);
     for (int32_t i = 0; i < length; ++i) {
       tmpValues.emplace_back(CacheableString::create(value[i]));
     }
-    m_updatedFields[fieldName] =
-        CacheableStringArray::create(std::move(tmpValues));
+    m_updatedFields[name] = CacheableStringArray::create(std::move(tmpValues));
   }
 }
 
-void PdxInstanceImpl::setOffsetForObject(DataInput& dataInput,
-                                         std::shared_ptr<PdxType> pt,
+void PdxInstanceImpl::setOffsetForObject(DataInput& input,
                                          int sequenceId) const {
-  int pos = getOffset(dataInput, pt, sequenceId);
-  dataInput.reset();
-  dataInput.advanceCursor(pos);
+  int pos = getOffset(input, sequenceId);
+
+  input.reset();
+  input.advanceCursor(pos);
 }
 
 size_t PdxInstanceImpl::objectSize() const {
   auto size = sizeof(PdxInstanceImpl);
-  size += m_buffer.size();
-  size += m_pdxType->objectSize();
+  size += buffer_.size();
+  size += pdxType_->objectSize();
   for (FieldVsValues::const_iterator iter = m_updatedFields.begin();
        iter != m_updatedFields.end(); ++iter) {
     size += iter->first.length();
@@ -2040,21 +1962,18 @@
 }
 
 PdxTypeRegistry& PdxInstanceImpl::getPdxTypeRegistry() const {
-  return m_pdxTypeRegistry;
+  return pdxTypeRegistry_;
 }
 
-DataInput PdxInstanceImpl::getDataInputForField(
-    const std::string& fieldname) const {
-  auto pt = getPdxType();
-  auto pft = pt->getPdxField(fieldname);
+DataInput PdxInstanceImpl::getDataInputForField(const std::string& name) const {
+  auto field = pdxType_->getPdxField(name);
 
-  if (!pft) {
-    throw IllegalStateException("PdxInstance doesn't have field " + fieldname);
+  if (!field) {
+    throw IllegalStateException("PdxInstance doesn't have field " + name);
   }
 
-  auto dataInput =
-      m_cacheImpl.createDataInput(m_buffer.data(), m_buffer.size());
-  auto pos = getOffset(dataInput, pt, pft->getSequenceId());
+  auto dataInput = cacheImpl_.createDataInput(buffer_.data(), buffer_.size());
+  auto pos = getOffset(dataInput, field->getSequenceId());
 
   dataInput.reset();
   dataInput.advanceCursor(pos);
diff --git a/cppcache/src/PdxInstanceImpl.hpp b/cppcache/src/PdxInstanceImpl.hpp
index 4f527d2..4eb0918 100644
--- a/cppcache/src/PdxInstanceImpl.hpp
+++ b/cppcache/src/PdxInstanceImpl.hpp
@@ -38,13 +38,13 @@
 
 typedef std::map<std::string, std::shared_ptr<Cacheable>> FieldVsValues;
 
-class APACHE_GEODE_EXPORT PdxInstanceImpl : public WritablePdxInstance {
+class PdxInstanceImpl : public WritablePdxInstance {
  public:
   ~PdxInstanceImpl() noexcept override;
 
   virtual std::shared_ptr<PdxSerializable> getObject() override;
 
-  virtual bool hasField(const std::string& fieldname) override;
+  virtual bool hasField(const std::string& name) override;
 
   virtual bool getBooleanField(const std::string& fieldname) const override;
 
@@ -168,7 +168,7 @@
   virtual void setField(const std::string& fieldName,
                         std::shared_ptr<CacheableObjectArray> value) override;
 
-  virtual bool isIdentityField(const std::string& fieldname) override;
+  virtual bool isIdentityField(const std::string& name) override;
 
   virtual std::shared_ptr<WritablePdxInstance> createWriter() override;
 
@@ -192,16 +192,15 @@
   virtual PdxFieldTypes getFieldType(
       const std::string& fieldname) const override;
 
-  void setPdxId(int32_t typeId);
-
  public:
   /**
    * @brief constructors
    */
 
-  PdxInstanceImpl(const uint8_t* buffer, size_t length, int typeId,
-                  CachePerfStats& cacheStats, PdxTypeRegistry& pdxTypeRegistry,
-                  const CacheImpl& cacheImpl, bool enableTimeStatistics);
+  PdxInstanceImpl(const uint8_t* buffer, size_t length,
+                  std::shared_ptr<PdxType> pdxType, CachePerfStats& cacheStats,
+                  PdxTypeRegistry& pdxTypeRegistry, const CacheImpl& cacheImpl,
+                  bool enableTimeStatistics);
 
   PdxInstanceImpl(FieldVsValues fieldVsValue, std::shared_ptr<PdxType> pdxType,
                   CachePerfStats& cacheStats, PdxTypeRegistry& pdxTypeRegistry,
@@ -211,35 +210,36 @@
 
   void operator=(const PdxInstanceImpl& other) = delete;
 
-  std::shared_ptr<PdxType> getPdxType() const;
+  std::shared_ptr<PdxType> getPdxType(Pool* pool) const;
 
-  void updatePdxStream(uint8_t* newPdxStream, int len);
+  int32_t getTypeId() const;
+
+  void updatePdxStream(std::vector<uint8_t> stream);
+
+ protected:
+  const std::vector<uint8_t>& getPdxStream() const;
 
  private:
-  std::vector<uint8_t> m_buffer;
-  int m_typeId;
-  std::shared_ptr<PdxType> m_pdxType;
+  mutable std::vector<uint8_t> buffer_;
+  mutable int32_t typeId_;
+
+  std::shared_ptr<PdxType> pdxType_;
   FieldVsValues m_updatedFields;
-  CachePerfStats& m_cacheStats;
-  PdxTypeRegistry& m_pdxTypeRegistry;
-  const CacheImpl& m_cacheImpl;
-  bool m_enableTimeStatistics;
+  CachePerfStats& cacheStats_;
+  PdxTypeRegistry& pdxTypeRegistry_;
+  const CacheImpl& cacheImpl_;
+  bool enableTimeStatistics_;
 
-  std::vector<std::shared_ptr<PdxFieldType>> getIdentityPdxFields(
-      std::shared_ptr<PdxType> pt) const;
+  std::vector<std::shared_ptr<PdxFieldType>> getIdentityPdxFields() const;
 
-  int getOffset(DataInput& dataInput, std::shared_ptr<PdxType> pt,
-                int sequenceId) const;
+  int getOffset(DataInput& input, int sequenceId) const;
 
-  int getRawHashCode(std::shared_ptr<PdxType> pt,
-                     std::shared_ptr<PdxFieldType> pField,
-                     DataInput& dataInput) const;
+  int getRawHashCode(DataInput& input,
+                     std::shared_ptr<PdxFieldType> field) const;
 
-  int getNextFieldPosition(DataInput& dataInput, int fieldId,
-                           std::shared_ptr<PdxType> pt) const;
+  int getNextFieldPosition(DataInput& input, int fieldId) const;
 
-  int getSerializedLength(DataInput& dataInput,
-                          std::shared_ptr<PdxType> pt) const;
+  int getSerializedLength(DataInput& dataInput) const;
 
   bool hasDefaultBytes(std::shared_ptr<PdxFieldType> pField,
                        DataInput& dataInput, int start, int end) const;
@@ -253,14 +253,12 @@
   void writeUnmodifieldField(DataInput& dataInput, int startPos, int endPos,
                              PdxLocalWriter& localWriter);
 
-  void setOffsetForObject(DataInput& dataInput, std::shared_ptr<PdxType> pt,
-                          int sequenceId) const;
+  void setOffsetForObject(DataInput& input, int sequenceId) const;
 
-  bool compareRawBytes(PdxInstanceImpl& other, std::shared_ptr<PdxType> myPT,
-                       std::shared_ptr<PdxFieldType> myF,
-                       DataInput& myDataInput, std::shared_ptr<PdxType> otherPT,
-                       std::shared_ptr<PdxFieldType> otherF,
-                       DataInput& otherDataInput) const;
+  bool compareRawBytes(DataInput& input, DataInput& otherInput,
+                       PdxInstanceImpl& other,
+                       std::shared_ptr<PdxFieldType> field,
+                       std::shared_ptr<PdxFieldType> otherField) const;
 
   void equatePdxFields(std::vector<std::shared_ptr<PdxFieldType>>& my,
                        std::vector<std::shared_ptr<PdxFieldType>>& other) const;
@@ -321,20 +319,6 @@
       std::shared_ptr<CacheableHashTable> OtherObj);
 
   DataInput getDataInputForField(const std::string& fieldname) const;
-
-  static int8_t m_BooleanDefaultBytes[];
-  static int8_t m_ByteDefaultBytes[];
-  static int8_t m_CharDefaultBytes[];
-  static int8_t m_ShortDefaultBytes[];
-  static int8_t m_IntDefaultBytes[];
-  static int8_t m_LongDefaultBytes[];
-  static int8_t m_FloatDefaultBytes[];
-  static int8_t m_DoubleDefaultBytes[];
-  static int8_t m_DateDefaultBytes[];
-  static int8_t m_StringDefaultBytes[];
-  static int8_t m_ObjectDefaultBytes[];
-  static int8_t m_NULLARRAYDefaultBytes[];
-  static std::shared_ptr<PdxFieldType> m_DefaultPdxFieldType;
 };
 }  // namespace client
 }  // namespace geode
diff --git a/cppcache/src/PdxLocalReader.cpp b/cppcache/src/PdxLocalReader.cpp
index 6229f9d..e391d46 100644
--- a/cppcache/src/PdxLocalReader.cpp
+++ b/cppcache/src/PdxLocalReader.cpp
@@ -22,7 +22,10 @@
 
 #include "PdxLocalReader.hpp"
 
+#include <geode/TypeRegistry.hpp>
+
 #include "PdxTypeRegistry.hpp"
+#include "util/Log.hpp"
 
 namespace apache {
 namespace geode {
diff --git a/cppcache/src/PdxLocalWriter.cpp b/cppcache/src/PdxLocalWriter.cpp
index 56a7b0d..6e565b2 100644
--- a/cppcache/src/PdxLocalWriter.cpp
+++ b/cppcache/src/PdxLocalWriter.cpp
@@ -330,13 +330,13 @@
   return *this;
 }
 
-uint8_t* PdxLocalWriter::getPdxStream(int& pdxLen) {
-  uint8_t* stPos =
+std::vector<uint8_t> PdxLocalWriter::getPdxStream() {
+  uint8_t* buffer =
       const_cast<uint8_t*>(m_dataOutput->getBuffer()) + m_startPositionOffset;
-  int len = PdxHelper::readInt32 /*readByte*/ (stPos);
-  pdxLen = len;
-  // ignore len and typeid
-  return m_dataOutput->getBufferCopyFrom(stPos + 8, len);
+  int32_t len = PdxHelper::readInt32(buffer);
+  buffer += 8;
+
+  return std::vector<uint8_t>{buffer, buffer + len};
 }
 
 void PdxLocalWriter::writeByte(int8_t byte) { m_dataOutput->write(byte); }
diff --git a/cppcache/src/PdxLocalWriter.hpp b/cppcache/src/PdxLocalWriter.hpp
index 9a86c82..af2fdc3 100644
--- a/cppcache/src/PdxLocalWriter.hpp
+++ b/cppcache/src/PdxLocalWriter.hpp
@@ -198,7 +198,7 @@
 
   // this is used to get pdx stream when WriteablePdxStream udpadates the field
   // It should be called after pdx stream has been written to output
-  uint8_t* getPdxStream(int& pdxLen);
+  std::vector<uint8_t> getPdxStream();
 
   void writeByte(int8_t byte);
 
diff --git a/cppcache/src/PdxReaderWithTypeCollector.cpp b/cppcache/src/PdxReaderWithTypeCollector.cpp
index 974c603..b21121a 100644
--- a/cppcache/src/PdxReaderWithTypeCollector.cpp
+++ b/cppcache/src/PdxReaderWithTypeCollector.cpp
@@ -58,14 +58,14 @@
 char16_t PdxReaderWithTypeCollector::readChar(const std::string& fieldName) {
   checkType(fieldName, PdxFieldTypes::CHAR, "char");
   m_newPdxType->addFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR,
-                                        PdxTypes::CHAR_SIZE);
+                                        PdxTypes::kPdxCharSize);
   int position = m_pdxType->getFieldPosition(fieldName, m_offsetsBuffer,
                                              m_offsetSize, m_serializedLength);
   LOGDEBUG("PdxReaderWithTypeCollector::readChar()position = %d", position);
   if (position != -1) {
     m_dataInput->advanceCursor(position);
     auto retVal = PdxLocalReader::readChar(fieldName);
-    m_dataInput->rewindCursor(position + PdxTypes::CHAR_SIZE);
+    m_dataInput->rewindCursor(position + PdxTypes::kPdxCharSize);
     return retVal;
   } else {
     return 0;
@@ -75,14 +75,14 @@
 bool PdxReaderWithTypeCollector::readBoolean(const std::string& fieldName) {
   checkType(fieldName, PdxFieldTypes::BOOLEAN, "boolean");
   m_newPdxType->addFixedLengthTypeField(
-      fieldName, "boolean", PdxFieldTypes::BOOLEAN, PdxTypes::BOOLEAN_SIZE);
+      fieldName, "boolean", PdxFieldTypes::BOOLEAN, PdxTypes::kPdxBooleanSize);
   int position = m_pdxType->getFieldPosition(fieldName, m_offsetsBuffer,
                                              m_offsetSize, m_serializedLength);
   LOGDEBUG("PdxReaderWithTypeCollector::readBoolean():position = %d", position);
   if (position != -1) {
     m_dataInput->advanceCursor(position);
     bool retVal = PdxLocalReader::readBoolean(fieldName);
-    m_dataInput->rewindCursor(position + PdxTypes::BOOLEAN_SIZE);
+    m_dataInput->rewindCursor(position + PdxTypes::kPdxBooleanSize);
     return retVal;
   } else {
     return 0;
@@ -92,7 +92,7 @@
 int8_t PdxReaderWithTypeCollector::readByte(const std::string& fieldName) {
   checkType(fieldName, PdxFieldTypes::BYTE, "byte");
   m_newPdxType->addFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE,
-                                        PdxTypes::BYTE_SIZE);
+                                        PdxTypes::kPdxByteSize);
   int position = m_pdxType->getFieldPosition(fieldName, m_offsetsBuffer,
                                              m_offsetSize, m_serializedLength);
   LOGDEBUG("PdxReaderWithTypeCollector::readByte(): position = %d", position);
@@ -100,7 +100,7 @@
     m_dataInput->advanceCursor(position);
     int8_t retVal;
     retVal = PdxLocalReader::readByte(fieldName);
-    m_dataInput->rewindCursor(position + PdxTypes::BYTE_SIZE);
+    m_dataInput->rewindCursor(position + PdxTypes::kPdxByteSize);
     return retVal;
   } else {
     return 0;
@@ -110,7 +110,7 @@
 int16_t PdxReaderWithTypeCollector::readShort(const std::string& fieldName) {
   checkType(fieldName, PdxFieldTypes::SHORT, "short");
   m_newPdxType->addFixedLengthTypeField(
-      fieldName, "short", PdxFieldTypes::SHORT, PdxTypes::SHORT_SIZE);
+      fieldName, "short", PdxFieldTypes::SHORT, PdxTypes::kPdxShortSize);
   int position = m_pdxType->getFieldPosition(fieldName, m_offsetsBuffer,
                                              m_offsetSize, m_serializedLength);
   LOGDEBUG("PdxReaderWithTypeCollector::readShort(): position = %d", position);
@@ -118,7 +118,7 @@
     int16_t value;
     m_dataInput->advanceCursor(position);
     value = PdxLocalReader::readShort(fieldName);
-    m_dataInput->rewindCursor(position + PdxTypes::SHORT_SIZE);
+    m_dataInput->rewindCursor(position + PdxTypes::kPdxShortSize);
     return value;
   } else {
     return 0;
@@ -128,7 +128,7 @@
 int32_t PdxReaderWithTypeCollector::readInt(const std::string& fieldName) {
   checkType(fieldName, PdxFieldTypes::INT, "int");
   m_newPdxType->addFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT,
-                                        PdxTypes::INTEGER_SIZE);
+                                        PdxTypes::kPdxIntegerSize);
   int position = m_pdxType->getFieldPosition(fieldName, m_offsetsBuffer,
                                              m_offsetSize, m_serializedLength);
   LOGDEBUG("PdxReaderWithTypeCollector::readInt():position = %d", position);
@@ -136,7 +136,7 @@
     int32_t value;
     m_dataInput->advanceCursor(position);
     value = PdxLocalReader::readInt(fieldName);
-    m_dataInput->rewindCursor(position + PdxTypes::INTEGER_SIZE);
+    m_dataInput->rewindCursor(position + PdxTypes::kPdxIntegerSize);
     return value;
   } else {
     return 0;
@@ -146,7 +146,7 @@
 int64_t PdxReaderWithTypeCollector::readLong(const std::string& fieldName) {
   checkType(fieldName, PdxFieldTypes::LONG, "long");
   m_newPdxType->addFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG,
-                                        PdxTypes::LONG_SIZE);
+                                        PdxTypes::kPdxLongSize);
   int position = m_pdxType->getFieldPosition(fieldName, m_offsetsBuffer,
                                              m_offsetSize, m_serializedLength);
   LOGDEBUG("PdxReaderWithTypeCollector::readLong(): position = %d", position);
@@ -154,7 +154,7 @@
     int64_t value;
     m_dataInput->advanceCursor(position);
     value = PdxLocalReader::readLong(fieldName);
-    m_dataInput->rewindCursor(position + PdxTypes::LONG_SIZE);
+    m_dataInput->rewindCursor(position + PdxTypes::kPdxLongSize);
     return value;
   } else {
     return 0;
@@ -164,7 +164,7 @@
 float PdxReaderWithTypeCollector::readFloat(const std::string& fieldName) {
   checkType(fieldName, PdxFieldTypes::FLOAT, "float");
   m_newPdxType->addFixedLengthTypeField(
-      fieldName, "float", PdxFieldTypes::FLOAT, PdxTypes::FLOAT_SIZE);
+      fieldName, "float", PdxFieldTypes::FLOAT, PdxTypes::kPdxFloatSize);
   int position = m_pdxType->getFieldPosition(fieldName, m_offsetsBuffer,
                                              m_offsetSize, m_serializedLength);
   LOGDEBUG("PdxReaderWithTypeCollector::readFloat():position = %d", position);
@@ -172,7 +172,7 @@
     float value;
     m_dataInput->advanceCursor(position);
     value = PdxLocalReader::readFloat(fieldName);
-    m_dataInput->rewindCursor(position + PdxTypes::FLOAT_SIZE);
+    m_dataInput->rewindCursor(position + PdxTypes::kPdxFloatSize);
     return value;
   } else {
     return 0.0f;
@@ -182,7 +182,7 @@
 double PdxReaderWithTypeCollector::readDouble(const std::string& fieldName) {
   checkType(fieldName, PdxFieldTypes::DOUBLE, "double");
   m_newPdxType->addFixedLengthTypeField(
-      fieldName, "double", PdxFieldTypes::DOUBLE, PdxTypes::DOUBLE_SIZE);
+      fieldName, "double", PdxFieldTypes::DOUBLE, PdxTypes::kPdxDoubleSize);
   int position = m_pdxType->getFieldPosition(fieldName, m_offsetsBuffer,
                                              m_offsetSize, m_serializedLength);
   LOGDEBUG("PdxReaderWithTypeCollector::readDouble():position = %d", position);
@@ -190,7 +190,7 @@
     double value;
     m_dataInput->advanceCursor(position);
     value = PdxLocalReader::readDouble(fieldName);
-    m_dataInput->rewindCursor(position + PdxTypes::DOUBLE_SIZE);
+    m_dataInput->rewindCursor(position + PdxTypes::kPdxDoubleSize);
     return value;
   } else {
     return 0.0;
@@ -486,14 +486,14 @@
     const std::string& fieldName) {
   checkType(fieldName, PdxFieldTypes::DATE, "Date");
   m_newPdxType->addFixedLengthTypeField(fieldName, "Date", PdxFieldTypes::DATE,
-                                        PdxTypes::DATE_SIZE);
+                                        PdxTypes::kPdxDateSize);
   int position = m_pdxType->getFieldPosition(fieldName, m_offsetsBuffer,
                                              m_offsetSize, m_serializedLength);
   LOGDEBUG("PdxReaderWithTypeCollector::readDate() position = %d", position);
   if (position != -1) {
     m_dataInput->advanceCursor(position);
     auto retVal = PdxLocalReader::readDate(fieldName);
-    m_dataInput->rewindCursor(position + PdxTypes::DATE_SIZE);
+    m_dataInput->rewindCursor(position + PdxTypes::kPdxDateSize);
     return retVal;
   } else {
     return nullptr;
diff --git a/cppcache/src/PdxRemotePreservedData.hpp b/cppcache/src/PdxRemotePreservedData.hpp
index 5b39819..0415a3f 100644
--- a/cppcache/src/PdxRemotePreservedData.hpp
+++ b/cppcache/src/PdxRemotePreservedData.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_PDXREMOTEPRESERVEDDATA_H_
-#define GEODE_PDXREMOTEPRESERVEDDATA_H_
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -20,6 +15,11 @@
  * limitations under the License.
  */
 
+#pragma once
+
+#ifndef GEODE_PDXREMOTEPRESERVEDDATA_H_
+#define GEODE_PDXREMOTEPRESERVEDDATA_H_
+
 #include <vector>
 
 #include <geode/PdxUnreadFields.hpp>
@@ -30,41 +30,32 @@
 namespace apache {
 namespace geode {
 namespace client {
-class PdxRemotePreservedData;
 
 class PdxRemotePreservedData : public PdxUnreadFields {
  private:
+  using time_point_t = std::chrono::steady_clock::time_point;
+
+ private:
   std::vector<std::vector<int8_t> > m_preservedData;
   int32_t m_typeId;
   int32_t m_mergedTypeId;
   int32_t m_currentIndex;
-  std::shared_ptr<Serializable> /*Object^*/ m_owner;
-  ExpiryTaskManager::id_type m_expiryTakId;
+  std::shared_ptr<Serializable> m_owner;
+  ExpiryTask::id_t expiry_task_id_;
+  time_point_t expires_at_;
 
  public:
-  PdxRemotePreservedData()
-      : /* adongre  - Coverity II
-         * CID 29283: Uninitialized scalar field (UNINIT_CTOR)
-         */
-        m_typeId(0),
-        m_mergedTypeId(0),
-        m_currentIndex(0),
-        m_expiryTakId(0) {}
+  PdxRemotePreservedData() : PdxRemotePreservedData(0, 0, nullptr) {}
 
-  virtual ~PdxRemotePreservedData() {
-    /*for(int i=0;i<numberOfFields;i++)
-            delete[] m_preservedData[i];
-
-    delete[] m_preservedData;*/
-  }
   PdxRemotePreservedData(int32_t typeId, int32_t mergedTypeId,
-                         std::shared_ptr<Serializable> owner) {
-    m_typeId = typeId;
-    m_mergedTypeId = mergedTypeId;
-    m_currentIndex = 0;
-    m_owner = owner;
-    m_expiryTakId = 0;
-  }
+                         std::shared_ptr<Serializable> owner)
+      : m_typeId(typeId),
+        m_mergedTypeId(mergedTypeId),
+        m_currentIndex(0),
+        m_owner(owner),
+        expiry_task_id_(ExpiryTask::invalid()) {}
+
+  ~PdxRemotePreservedData() noexcept override = default;
 
   void initialize(int32_t typeId, int32_t mergedTypeId,
                   std::shared_ptr<Serializable> owner) {
@@ -72,18 +63,14 @@
     m_mergedTypeId = mergedTypeId;
     m_currentIndex = 0;
     m_owner = owner;
-    m_expiryTakId = 0;
+    expiry_task_id_ = 0;
   }
 
   inline int32_t getMergedTypeId() { return m_mergedTypeId; }
 
-  inline void setPreservedDataExpiryTaskId(ExpiryTaskManager::id_type expId) {
-    m_expiryTakId = expId;
-  }
+  inline void task_id(ExpiryTask::id_t task_id) { expiry_task_id_ = task_id; }
 
-  inline ExpiryTaskManager::id_type getPreservedDataExpiryTaskId() {
-    return m_expiryTakId;
-  }
+  inline ExpiryTask::id_t task_id() { return expiry_task_id_; }
 
   std::shared_ptr<Serializable> getOwner() { return m_owner; }
 
@@ -112,6 +99,9 @@
     }
     return 0;
   }
+
+  time_point_t expires_at() const { return expires_at_; }
+  void expires_at(const time_point_t& tp) { expires_at_ = tp; }
 };
 }  // namespace client
 }  // namespace geode
diff --git a/cppcache/src/PdxRemoteWriter.cpp b/cppcache/src/PdxRemoteWriter.cpp
index 301183c..ee5c7ea 100644
--- a/cppcache/src/PdxRemoteWriter.cpp
+++ b/cppcache/src/PdxRemoteWriter.cpp
@@ -24,6 +24,7 @@
 #include "PdxRemoteWriter.hpp"
 
 #include "PdxTypeRegistry.hpp"
+#include "util/Log.hpp"
 
 namespace apache {
 namespace geode {
diff --git a/cppcache/src/PdxType.cpp b/cppcache/src/PdxType.cpp
index aa33dfe..f83eb18 100644
--- a/cppcache/src/PdxType.cpp
+++ b/cppcache/src/PdxType.cpp
@@ -23,6 +23,8 @@
 
 #include "PdxType.hpp"
 
+#include <boost/thread/lock_types.hpp>
+
 #include "PdxFieldType.hpp"
 #include "PdxHelper.hpp"
 #include "PdxTypeRegistry.hpp"
@@ -371,7 +373,6 @@
     return m_localToRemoteFieldMap;
   }
 
-  ReadGuard guard(m_lockObj);
   if (m_localToRemoteFieldMap != nullptr) {
     return m_localToRemoteFieldMap;
   }
@@ -385,7 +386,6 @@
     return m_remoteToLocalFieldMap;
   }
 
-  ReadGuard guard(m_lockObj);
   if (m_remoteToLocalFieldMap != nullptr) {
     return m_remoteToLocalFieldMap;
   }
diff --git a/cppcache/src/PdxType.hpp b/cppcache/src/PdxType.hpp
index bf4e676..bc71aa1 100644
--- a/cppcache/src/PdxType.hpp
+++ b/cppcache/src/PdxType.hpp
@@ -30,7 +30,6 @@
 #include <geode/Serializable.hpp>
 
 #include "PdxFieldType.hpp"
-#include "ReadWriteLock.hpp"
 
 namespace apache {
 namespace geode {
@@ -42,8 +41,6 @@
 
 class PdxType : public internal::DataSerializableInternal,
                 public std::enable_shared_from_this<PdxType> {
-  ACE_RW_Thread_Mutex m_lockObj;
-
   static const char* m_javaPdxClass;
 
   std::vector<std::shared_ptr<PdxFieldType>>* m_pdxFieldTypes;
diff --git a/cppcache/src/PdxTypeRegistry.cpp b/cppcache/src/PdxTypeRegistry.cpp
index 2d305fa..4a165dd 100644
--- a/cppcache/src/PdxTypeRegistry.cpp
+++ b/cppcache/src/PdxTypeRegistry.cpp
@@ -17,10 +17,14 @@
 
 #include "PdxTypeRegistry.hpp"
 
+#include <boost/thread/lock_types.hpp>
+
 #include <geode/PoolManager.hpp>
 
 #include "CacheImpl.hpp"
 #include "CacheRegionHelper.hpp"
+#include "PreservedDataExpiryTask.hpp"
+#include "SerializationRegistry.hpp"
 #include "ThinClientPoolDM.hpp"
 
 namespace apache {
@@ -39,7 +43,7 @@
 PdxTypeRegistry::~PdxTypeRegistry() {}
 
 size_t PdxTypeRegistry::testNumberOfPreservedData() const {
-  return preserveData_.size();
+  return preserved_data_.size();
 }
 
 int32_t PdxTypeRegistry::getPDXIdForType(const std::string& type, Pool* pool,
@@ -66,7 +70,7 @@
                                          Pool* pool) {
   int32_t typeId = 0;
   {
-    ReadGuard read(g_readerWriterLock_);
+    boost::shared_lock<decltype(types_mutex_)> guard{types_mutex_};
     auto&& iter = pdxTypeToTypeIdMap_.find(nType);
     if (iter != pdxTypeToTypeIdMap_.end()) {
       typeId = iter->second;
@@ -77,7 +81,7 @@
   }
 
   {
-    WriteGuard write(g_readerWriterLock_);
+    boost::unique_lock<decltype(types_mutex_)> guard{types_mutex_};
     auto&& iter = pdxTypeToTypeIdMap_.find(nType);
     if (iter != pdxTypeToTypeIdMap_.end()) {
       typeId = iter->second;
@@ -96,7 +100,7 @@
 
 void PdxTypeRegistry::clear() {
   {
-    WriteGuard guard(g_readerWriterLock_);
+    boost::unique_lock<decltype(types_mutex_)> guard{types_mutex_};
     typeIdToPdxType_.clear();
 
     remoteTypeIdToMergedPdxType_.clear();
@@ -110,19 +114,20 @@
     pdxTypeToTypeIdMap_.clear();
   }
   {
-    WriteGuard guard(getPreservedDataLock());
-    preserveData_.clear();
+    boost::unique_lock<decltype(preserved_data_mutex_)> guard{
+        preserved_data_mutex_};
+    preserved_data_.clear();
   }
 }
 
 void PdxTypeRegistry::addPdxType(int32_t typeId,
                                  std::shared_ptr<PdxType> pdxType) {
-  WriteGuard guard(g_readerWriterLock_);
+  boost::unique_lock<decltype(types_mutex_)> guard{types_mutex_};
   typeIdToPdxType_.emplace(typeId, pdxType);
 }
 
 std::shared_ptr<PdxType> PdxTypeRegistry::getPdxType(int32_t typeId) const {
-  ReadGuard guard(g_readerWriterLock_);
+  boost::shared_lock<decltype(types_mutex_)> guard{types_mutex_};
   auto&& iter = typeIdToPdxType_.find(typeId);
   if (iter != typeIdToPdxType_.end()) {
     return iter->second;
@@ -132,13 +137,13 @@
 
 void PdxTypeRegistry::addLocalPdxType(const std::string& localType,
                                       std::shared_ptr<PdxType> pdxType) {
-  WriteGuard guard(g_readerWriterLock_);
+  boost::unique_lock<decltype(types_mutex_)> guard{types_mutex_};
   localTypeToPdxType_.emplace(localType, pdxType);
 }
 
 std::shared_ptr<PdxType> PdxTypeRegistry::getLocalPdxType(
     const std::string& localType) const {
-  ReadGuard guard(g_readerWriterLock_);
+  boost::shared_lock<decltype(types_mutex_)> guard{types_mutex_};
   auto&& it = localTypeToPdxType_.find(localType);
   if (it != localTypeToPdxType_.end()) {
     return it->second;
@@ -148,7 +153,7 @@
 
 void PdxTypeRegistry::setMergedType(int32_t remoteTypeId,
                                     std::shared_ptr<PdxType> mergedType) {
-  WriteGuard guard(g_readerWriterLock_);
+  boost::unique_lock<decltype(types_mutex_)> guard{types_mutex_};
   remoteTypeIdToMergedPdxType_.emplace(remoteTypeId, mergedType);
 }
 
@@ -163,39 +168,42 @@
 
 void PdxTypeRegistry::setPreserveData(
     std::shared_ptr<PdxSerializable> obj,
-    std::shared_ptr<PdxRemotePreservedData> pData,
+    std::shared_ptr<PdxRemotePreservedData> data,
     ExpiryTaskManager& expiryTaskManager) {
-  WriteGuard guard(getPreservedDataLock());
-  pData->setOwner(obj);
-  if (preserveData_.find(obj) != preserveData_.end()) {
-    // reset expiry task
-    // TODO: check value for nullptr
-    auto expTaskId = preserveData_[obj]->getPreservedDataExpiryTaskId();
-    expiryTaskManager.resetTask(expTaskId, 5);
-    LOGDEBUG("PdxTypeRegistry::setPreserveData Reset expiry task Done");
-    pData->setPreservedDataExpiryTaskId(expTaskId);
-    preserveData_[obj] = pData;
+  boost::unique_lock<decltype(preserved_data_mutex_)> guard{
+      preserved_data_mutex_};
+  data->setOwner(obj);
+
+  auto&& iter = preserved_data_.find(obj);
+  if (iter != preserved_data_.end()) {
+    auto expires_at =
+        std::chrono::steady_clock::now() + std::chrono::seconds(5);
+    data->task_id(iter->second->task_id());
+    data->expires_at(expires_at);
+    iter->second = data;
   } else {
-    // schedule new expiry task
-    auto handler = new PreservedDataExpiryHandler(shared_from_this(), obj);
-    auto id = expiryTaskManager.scheduleExpiryTask(
-        handler, std::chrono::seconds(20), std::chrono::seconds::zero(), false);
-    pData->setPreservedDataExpiryTaskId(id);
+    auto task = std::make_shared<PreservedDataExpiryTask>(
+        expiryTaskManager, shared_from_this(), obj);
+    auto id =
+        expiryTaskManager.schedule(std::move(task), std::chrono::seconds(20));
+    data->task_id(id);
+
     LOGDEBUG(
-        "PdxTypeRegistry::setPreserveData Schedule new expirt task with id=%ld",
+        "PdxTypeRegistry::setPreserveData Schedule new expiry task with id=%zu",
         id);
-    preserveData_.emplace(obj, pData);
+    preserved_data_.emplace_hint(iter, std::move(obj), std::move(data));
   }
 
   LOGDEBUG(
       "PdxTypeRegistry::setPreserveData Successfully inserted new entry in "
       "preservedData");
 }
+
 std::shared_ptr<PdxRemotePreservedData> PdxTypeRegistry::getPreserveData(
     std::shared_ptr<PdxSerializable> pdxobj) const {
-  ReadGuard guard(getPreservedDataLock());
-  const auto& iter = preserveData_.find((pdxobj));
-  if (iter != preserveData_.end()) {
+  boost::shared_lock<decltype(types_mutex_)> guard{types_mutex_};
+  const auto& iter = preserved_data_.find((pdxobj));
+  if (iter != preserved_data_.end()) {
     return iter->second;
   }
   return nullptr;
@@ -211,7 +219,7 @@
     return val->value();
   }
 
-  WriteGuard guard(g_readerWriterLock_);
+  boost::unique_lock<decltype(types_mutex_)> guard{types_mutex_};
   tmp = enumToInt_;
   const auto& entry2 = tmp->find(ei);
   if (entry2 != tmp->end()) {
@@ -244,7 +252,7 @@
     }
   }
 
-  WriteGuard guard(g_readerWriterLock_);
+  boost::unique_lock<decltype(types_mutex_)> guard{types_mutex_};
   tmp = intToEnum_;
   {
     auto&& entry = tmp->find(enumValPtr);
diff --git a/cppcache/src/PdxTypeRegistry.hpp b/cppcache/src/PdxTypeRegistry.hpp
index af69575..01c1d30 100644
--- a/cppcache/src/PdxTypeRegistry.hpp
+++ b/cppcache/src/PdxTypeRegistry.hpp
@@ -23,6 +23,8 @@
 #include <map>
 #include <unordered_map>
 
+#include <boost/thread/shared_mutex.hpp>
+
 #include <geode/Cache.hpp>
 #include <geode/PdxSerializable.hpp>
 #include <geode/internal/functional.hpp>
@@ -31,8 +33,6 @@
 #include "ExpiryTaskManager.hpp"
 #include "PdxRemotePreservedData.hpp"
 #include "PdxType.hpp"
-#include "PreservedDataExpiryHandler.hpp"
-#include "ReadWriteLock.hpp"
 
 namespace apache {
 namespace geode {
@@ -51,6 +51,8 @@
                            dereference_equal_to<std::shared_ptr<PdxType>>>
     PdxTypeToTypeIdMap;
 
+class PreservedDataExpiryTask;
+
 class APACHE_GEODE_EXPORT PdxTypeRegistry
     : public std::enable_shared_from_this<PdxTypeRegistry> {
  private:
@@ -65,11 +67,11 @@
   PdxTypeToTypeIdMap pdxTypeToTypeIdMap_;
 
   // TODO:: preserveData need to be of type WeakHashMap
-  PreservedHashMap preserveData_;
+  PreservedHashMap preserved_data_;
 
-  mutable ACE_RW_Thread_Mutex g_readerWriterLock_;
+  mutable boost::shared_mutex types_mutex_;
 
-  mutable ACE_RW_Thread_Mutex g_preservedDataLock_;
+  mutable boost::shared_mutex preserved_data_mutex_;
 
   bool pdxIgnoreUnreadFields_;
 
@@ -103,7 +105,7 @@
   std::shared_ptr<PdxType> getMergedType(int32_t remoteTypeId) const;
 
   void setPreserveData(std::shared_ptr<PdxSerializable> obj,
-                       std::shared_ptr<PdxRemotePreservedData> preserveDataPtr,
+                       std::shared_ptr<PdxRemotePreservedData> data,
                        ExpiryTaskManager& expiryTaskManager);
 
   std::shared_ptr<PdxRemotePreservedData> getPreserveData(
@@ -122,9 +124,7 @@
 
   bool getPdxReadSerialized() const { return pdxReadSerialized_; }
 
-  inline const PreservedHashMap& getPreserveDataMap() const {
-    return preserveData_;
-  }
+  const PreservedHashMap& getPreserveDataMap() const { return preserved_data_; }
 
   int32_t getEnumValue(std::shared_ptr<EnumInfo> ei);
 
@@ -132,9 +132,14 @@
 
   int32_t getPDXIdForType(std::shared_ptr<PdxType> nType, Pool* pool);
 
-  ACE_RW_Thread_Mutex& getPreservedDataLock() const {
-    return g_preservedDataLock_;
+  boost::shared_mutex& getPreservedDataMutex() const {
+    return preserved_data_mutex_;
   }
+
+ protected:
+  friend class PreservedDataExpiryTask;
+
+  PreservedHashMap& preserved_data_map() { return preserved_data_; }
 };
 
 }  // namespace client
diff --git a/cppcache/src/PdxTypes.hpp b/cppcache/src/PdxTypes.hpp
index 75d6b4e..9d5348b 100644
--- a/cppcache/src/PdxTypes.hpp
+++ b/cppcache/src/PdxTypes.hpp
@@ -28,23 +28,23 @@
 
 class PdxTypes {
  public:
-  static const int8_t BYTE_SIZE = 1;
+  static const int8_t kPdxByteSize = 1;
 
-  static const int8_t BOOLEAN_SIZE = 1;
+  static const int8_t kPdxBooleanSize = 1;
 
-  static const int8_t CHAR_SIZE = 2;
+  static const int8_t kPdxCharSize = 2;
 
-  static const int8_t SHORT_SIZE = 2;
+  static const int8_t kPdxShortSize = 2;
 
-  static const int8_t INTEGER_SIZE = 4;
+  static const int8_t kPdxIntegerSize = 4;
 
-  static const int8_t FLOAT_SIZE = 4;
+  static const int8_t kPdxFloatSize = 4;
 
-  static const int8_t LONG_SIZE = 8;
+  static const int8_t kPdxLongSize = 8;
 
-  static const int8_t DOUBLE_SIZE = 8;
+  static const int8_t kPdxDoubleSize = 8;
 
-  static const int8_t DATE_SIZE = 8;
+  static const int8_t kPdxDateSize = 8;
 };
 
 }  // namespace client
diff --git a/cppcache/src/PdxWriterWithTypeCollector.cpp b/cppcache/src/PdxWriterWithTypeCollector.cpp
index f5add85..b656dad 100644
--- a/cppcache/src/PdxWriterWithTypeCollector.cpp
+++ b/cppcache/src/PdxWriterWithTypeCollector.cpp
@@ -106,63 +106,63 @@
 PdxWriter& PdxWriterWithTypeCollector::writeChar(const std::string& fieldName,
                                                  char16_t value) {
   m_pdxType->addFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR,
-                                     PdxTypes::CHAR_SIZE);
+                                     PdxTypes::kPdxCharSize);
   PdxLocalWriter::writeChar(fieldName, value);
   return *this;
 }
 PdxWriter& PdxWriterWithTypeCollector::writeBoolean(
     const std::string& fieldName, bool value) {
   m_pdxType->addFixedLengthTypeField(
-      fieldName, "boolean", PdxFieldTypes::BOOLEAN, PdxTypes::BOOLEAN_SIZE);
+      fieldName, "boolean", PdxFieldTypes::BOOLEAN, PdxTypes::kPdxBooleanSize);
   PdxLocalWriter::writeBoolean(fieldName, value);
   return *this;
 }
 PdxWriter& PdxWriterWithTypeCollector::writeByte(const std::string& fieldName,
                                                  int8_t value) {
   m_pdxType->addFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE,
-                                     PdxTypes::BYTE_SIZE);
+                                     PdxTypes::kPdxByteSize);
   PdxLocalWriter::writeByte(fieldName, value);
   return *this;
 }
 PdxWriter& PdxWriterWithTypeCollector::writeShort(const std::string& fieldName,
                                                   int16_t value) {
   m_pdxType->addFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT,
-                                     PdxTypes::SHORT_SIZE);
+                                     PdxTypes::kPdxShortSize);
   PdxLocalWriter::writeShort(fieldName, value);
   return *this;
 }
 PdxWriter& PdxWriterWithTypeCollector::writeInt(const std::string& fieldName,
                                                 int32_t value) {
   m_pdxType->addFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT,
-                                     PdxTypes::INTEGER_SIZE);
+                                     PdxTypes::kPdxIntegerSize);
   PdxLocalWriter::writeInt(fieldName, value);
   return *this;
 }
 PdxWriter& PdxWriterWithTypeCollector::writeLong(const std::string& fieldName,
                                                  int64_t value) {
   m_pdxType->addFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG,
-                                     PdxTypes::LONG_SIZE);
+                                     PdxTypes::kPdxLongSize);
   PdxLocalWriter::writeLong(fieldName, value);
   return *this;
 }
 PdxWriter& PdxWriterWithTypeCollector::writeFloat(const std::string& fieldName,
                                                   float value) {
   m_pdxType->addFixedLengthTypeField(fieldName, "float", PdxFieldTypes::FLOAT,
-                                     PdxTypes::FLOAT_SIZE);
+                                     PdxTypes::kPdxFloatSize);
   PdxLocalWriter::writeFloat(fieldName, value);
   return *this;
 }
 PdxWriter& PdxWriterWithTypeCollector::writeDouble(const std::string& fieldName,
                                                    double value) {
   m_pdxType->addFixedLengthTypeField(fieldName, "double", PdxFieldTypes::DOUBLE,
-                                     PdxTypes::DOUBLE_SIZE);
+                                     PdxTypes::kPdxDoubleSize);
   PdxLocalWriter::writeDouble(fieldName, value);
   return *this;
 }
 PdxWriter& PdxWriterWithTypeCollector::writeDate(
     const std::string& fieldName, std::shared_ptr<CacheableDate> date) {
   m_pdxType->addFixedLengthTypeField(fieldName, "Date", PdxFieldTypes::DATE,
-                                     PdxTypes::DATE_SIZE);
+                                     PdxTypes::kPdxDateSize);
   PdxLocalWriter::writeDate(fieldName, date);
   return *this;
 }
diff --git a/cppcache/src/Pool.cpp b/cppcache/src/Pool.cpp
index d8ad4c2..4fbf5e0 100644
--- a/cppcache/src/Pool.cpp
+++ b/cppcache/src/Pool.cpp
@@ -20,6 +20,7 @@
 #include <geode/CacheFactory.hpp>
 #include <geode/Pool.hpp>
 
+#include "CacheImpl.hpp"
 #include "PoolAttributes.hpp"
 #include "TcrConnectionManager.hpp"
 #include "ThinClientPoolHADM.hpp"
diff --git a/cppcache/src/PoolFactory.cpp b/cppcache/src/PoolFactory.cpp
index ad9038d..8a3c2e5 100644
--- a/cppcache/src/PoolFactory.cpp
+++ b/cppcache/src/PoolFactory.cpp
@@ -172,14 +172,12 @@
 }
 
 PoolFactory& PoolFactory::addLocator(const std::string& host, int port) {
-  addCheck(host, port);
   m_attrs->addLocator(host, port);
   m_addedServerOrLocator = true;
   return *this;
 }
 
 PoolFactory& PoolFactory::addServer(const std::string& host, int port) {
-  addCheck(host, port);
   m_attrs->addServer(host, port);
   m_addedServerOrLocator = true;
   return *this;
@@ -304,27 +302,6 @@
   return std::move(poolDM);
 }
 
-PoolFactory& PoolFactory::addCheck(const std::string& host, int port) {
-  if (port <= 0) {
-    throw IllegalArgumentException("port must be greater than 0 but was " +
-                                   std::to_string(port));
-  }
-
-  if (m_attrs->getSniProxyHost().empty()) {
-    ACE_INET_Addr addr(port, host.c_str());
-#ifdef WITH_IPV6
-    // check unknown host
-    // ACE will not initialize port if hostname is not resolved.
-    if (port != addr.get_port_number()) {
-#else
-    if (!(addr.get_ip_address())) {
-#endif
-      throw IllegalArgumentException("Unknown host " + host);
-    }
-  }
-  return *this;
-}
-
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/PoolManagerImpl.hpp b/cppcache/src/PoolManagerImpl.hpp
index a35eae0..763267e 100644
--- a/cppcache/src/PoolManagerImpl.hpp
+++ b/cppcache/src/PoolManagerImpl.hpp
@@ -40,7 +40,6 @@
 class PoolManagerImpl {
  public:
   explicit PoolManagerImpl(CacheImpl* cache) : m_cache(cache) {}
-  PoolManagerImpl(const PoolManagerImpl& copy) = default;
   ~PoolManagerImpl() = default;
 
   void removePool(const std::string& name);
diff --git a/cppcache/src/PoolXmlCreation.hpp b/cppcache/src/PoolXmlCreation.hpp
index ad439fd..1299d6e 100644
--- a/cppcache/src/PoolXmlCreation.hpp
+++ b/cppcache/src/PoolXmlCreation.hpp
@@ -40,7 +40,7 @@
  *
  * @since 3.0
  */
-class APACHE_GEODE_EXPORT PoolXmlCreation {
+class PoolXmlCreation {
  private:
   /** An <code>RegionAttributesFactory</code> for creating default
    * <code>PoolAttribute</code>s */
diff --git a/cppcache/src/PreservedDataExpiryHandler.cpp b/cppcache/src/PreservedDataExpiryHandler.cpp
deleted file mode 100644
index 32fd8c5..0000000
--- a/cppcache/src/PreservedDataExpiryHandler.cpp
+++ /dev/null
@@ -1,64 +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.
- */
-/*
- * PreservedDataExpiryHandler.cpp
- *
- *  Created on: Apr 5, 2012
- *      Author: npatel
- */
-#include "PreservedDataExpiryHandler.hpp"
-
-#include "PdxTypeRegistry.hpp"
-
-namespace apache {
-namespace geode {
-namespace client {
-
-PreservedDataExpiryHandler::PreservedDataExpiryHandler(
-    const std::shared_ptr<PdxTypeRegistry>& pdxTypeRegistry,
-    const std::shared_ptr<PdxSerializable>& pdxObjectPtr)
-    : m_pdxTypeRegistry(pdxTypeRegistry), m_pdxObjectPtr(pdxObjectPtr) {}
-
-int PreservedDataExpiryHandler::handle_timeout(const ACE_Time_Value&,
-                                               const void*) {
-  WriteGuard guard(m_pdxTypeRegistry->getPreservedDataLock());
-  auto map = m_pdxTypeRegistry->getPreserveDataMap();
-  LOGDEBUG(
-      "Entered PreservedDataExpiryHandler "
-      "PdxTypeRegistry::getPreserveDataMap().size() = %zu",
-      map.size());
-
-  try {
-    // remove the entry from the map
-    map.erase(m_pdxObjectPtr);
-  } catch (...) {
-    // Ignore whatever exception comes
-    LOGDEBUG(
-        "PreservedDataExpiry:: Error while Clearing PdxObject and its "
-        "preserved data. Ignoring the error");
-  }
-  return 0;
-}
-
-int PreservedDataExpiryHandler::handle_close(ACE_HANDLE, ACE_Reactor_Mask) {
-  delete this;
-  return 0;
-}
-
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
diff --git a/cppcache/src/PreservedDataExpiryHandler.hpp b/cppcache/src/PreservedDataExpiryHandler.hpp
deleted file mode 100644
index 23db998..0000000
--- a/cppcache/src/PreservedDataExpiryHandler.hpp
+++ /dev/null
@@ -1,64 +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.
- */
-
-#pragma once
-
-#ifndef GEODE_PRESERVEDDATAEXPIRYHANDLER_H_
-#define GEODE_PRESERVEDDATAEXPIRYHANDLER_H_
-
-#include <geode/Cache.hpp>
-#include <geode/PdxSerializable.hpp>
-#include <geode/internal/geode_globals.hpp>
-
-#include "CacheImpl.hpp"
-#include "ExpiryTaskManager.hpp"
-
-namespace apache {
-namespace geode {
-namespace client {
-
-/**
- * @class PreservedDataExpiryHandler
- *
- * The task object which contains the handler which gets triggered
- * when a preserved data expires.
- *
- */
-class APACHE_GEODE_EXPORT PreservedDataExpiryHandler
-    : public ACE_Event_Handler {
- public:
-  /**
-   * Constructor
-   */
-  PreservedDataExpiryHandler(
-      const std::shared_ptr<PdxTypeRegistry>& pdxTypeRegistry,
-      const std::shared_ptr<PdxSerializable>& pdxObjectPtr);
-
-  int handle_timeout(const ACE_Time_Value& current_time,
-                     const void* arg) override;
-
-  int handle_close(ACE_HANDLE handle, ACE_Reactor_Mask close_mask) override;
-
- private:
-  std::shared_ptr<PdxTypeRegistry> m_pdxTypeRegistry;
-  std::shared_ptr<PdxSerializable> m_pdxObjectPtr;
-};
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_PRESERVEDDATAEXPIRYHANDLER_H_
diff --git a/cppcache/src/PreservedDataExpiryTask.cpp b/cppcache/src/PreservedDataExpiryTask.cpp
new file mode 100644
index 0000000..3833874
--- /dev/null
+++ b/cppcache/src/PreservedDataExpiryTask.cpp
@@ -0,0 +1,69 @@
+/*
+ * 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.
+ */
+/*
+ * PreservedDataExpiryTask.cpp
+ *
+ *  Created on: Apr 5, 2012
+ *      Author: npatel
+ */
+#include "PreservedDataExpiryTask.hpp"
+
+#include <boost/thread/lock_types.hpp>
+
+#include "ExpiryTaskManager.hpp"
+#include "PdxTypeRegistry.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
+PreservedDataExpiryTask::PreservedDataExpiryTask(
+    ExpiryTaskManager& manager, decltype(type_registry_) type_registry,
+    decltype(object_) object)
+    : ExpiryTask(manager), type_registry_(type_registry), object_(object) {}
+
+bool PreservedDataExpiryTask::on_expire() {
+  auto& mutex = type_registry_->getPreservedDataMutex();
+  boost::unique_lock<std::remove_reference<decltype(mutex)>::type> guard{mutex};
+
+  auto& map = type_registry_->preserved_data_map();
+
+  LOGDEBUG(
+      "Entered PreservedDataExpiryTask "
+      "PdxTypeRegistry::getPreserveDataMap().size() = %zu",
+      map.size());
+
+  auto&& iter = map.find(object_);
+  if (iter == map.end()) {
+    return true;
+  }
+
+  auto expires_at = iter->second->expires_at();
+  if (expires_at < ExpiryTask::clock_t::now()) {
+    LOGDEBUG("Re-scheduling PreservedDataExpiryTask with ID %zu", id());
+
+    reset(expires_at);
+    return false;
+  }
+
+  map.erase(iter);
+  return true;
+}
+
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
diff --git a/cppcache/src/PreservedDataExpiryTask.hpp b/cppcache/src/PreservedDataExpiryTask.hpp
new file mode 100644
index 0000000..c14efd1
--- /dev/null
+++ b/cppcache/src/PreservedDataExpiryTask.hpp
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+#ifndef GEODE_PRESERVEDDATAEXPIRYTASK_H_
+#define GEODE_PRESERVEDDATAEXPIRYTASK_H_
+
+#include <geode/Cache.hpp>
+#include <geode/PdxSerializable.hpp>
+#include <geode/internal/geode_globals.hpp>
+
+#include "CacheImpl.hpp"
+#include "ExpiryTask.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
+/**
+ * @class PreservedDataExpiryTask
+ *
+ * The expiry task which gets triggered when a preserved data expires.
+ */
+class PreservedDataExpiryTask : public ExpiryTask {
+ public:
+  /**
+   * Constructor
+   */
+  PreservedDataExpiryTask(ExpiryTaskManager& manager,
+                          std::shared_ptr<PdxTypeRegistry> type_registry,
+                          std::shared_ptr<PdxSerializable> object);
+
+  bool on_expire() override;
+
+ private:
+  std::shared_ptr<PdxTypeRegistry> type_registry_;
+  std::shared_ptr<PdxSerializable> object_;
+};
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+#endif  // GEODE_PRESERVEDDATAEXPIRYTASK_H_
diff --git a/cppcache/src/ProxyRegion.hpp b/cppcache/src/ProxyRegion.hpp
index 91e3e18..e0a5c1b 100644
--- a/cppcache/src/ProxyRegion.hpp
+++ b/cppcache/src/ProxyRegion.hpp
@@ -51,7 +51,7 @@
  * @class ProxyRegion ProxyRegion.hpp
  * This class wrapper around real region
  */
-class APACHE_GEODE_EXPORT ProxyRegion final : public Region {
+class ProxyRegion final : public Region {
  public:
   const std::string& getName() const final { return m_realRegion->getName(); }
 
diff --git a/cppcache/src/ProxyRemoteQueryService.cpp b/cppcache/src/ProxyRemoteQueryService.cpp
index 2174a73..37c5ac0 100644
--- a/cppcache/src/ProxyRemoteQueryService.cpp
+++ b/cppcache/src/ProxyRemoteQueryService.cpp
@@ -19,6 +19,7 @@
 
 #include <geode/PoolManager.hpp>
 
+#include "CacheImpl.hpp"
 #include "CqQueryImpl.hpp"
 #include "ThinClientPoolDM.hpp"
 
diff --git a/cppcache/src/ProxyRemoteQueryService.hpp b/cppcache/src/ProxyRemoteQueryService.hpp
index 82ff468..ea1df6a 100644
--- a/cppcache/src/ProxyRemoteQueryService.hpp
+++ b/cppcache/src/ProxyRemoteQueryService.hpp
@@ -38,7 +38,7 @@
 class CacheImpl;
 class ThinClientPoolDM;
 
-class APACHE_GEODE_EXPORT ProxyRemoteQueryService : public QueryService {
+class ProxyRemoteQueryService : public QueryService {
  public:
   explicit ProxyRemoteQueryService(AuthenticatedView* cptr);
   virtual ~ProxyRemoteQueryService() = default;
diff --git a/cppcache/src/PutAllPartialResult.cpp b/cppcache/src/PutAllPartialResult.cpp
index 4a2e152..531ea52 100644
--- a/cppcache/src/PutAllPartialResult.cpp
+++ b/cppcache/src/PutAllPartialResult.cpp
@@ -16,6 +16,8 @@
  */
 #include "PutAllPartialResult.hpp"
 
+#include <boost/thread/lock_types.hpp>
+
 namespace apache {
 namespace geode {
 namespace client {
@@ -34,7 +36,7 @@
 void PutAllPartialResult::consolidate(
     std::shared_ptr<PutAllPartialResult> other) {
   {
-    WriteGuard guard(g_readerWriterLock);
+    boost::unique_lock<decltype(mutex_)> guard{mutex_};
     m_succeededKeys->addAll(other->getSucceededKeysAndVersions());
   }
   saveFailedKey(other->m_firstFailedKey, other->m_firstCauseOfFailure);
@@ -48,7 +50,7 @@
 void PutAllPartialResult::addKeys(
     std::shared_ptr<std::vector<std::shared_ptr<CacheableKey>>> m_keys) {
   {
-    WriteGuard guard(g_readerWriterLock);
+    boost::unique_lock<decltype(mutex_)> guard{mutex_};
     if (m_succeededKeys->getVersionedTagsize() > 0) {
       throw IllegalStateException(
           "attempt to store versionless keys when there are already versioned "
diff --git a/cppcache/src/PutAllPartialResult.hpp b/cppcache/src/PutAllPartialResult.hpp
index 44bef1f..675fec6 100644
--- a/cppcache/src/PutAllPartialResult.hpp
+++ b/cppcache/src/PutAllPartialResult.hpp
@@ -22,6 +22,8 @@
 
 #include <mutex>
 
+#include <boost/thread/shared_mutex.hpp>
+
 #include <geode/CacheableString.hpp>
 #include <geode/Serializable.hpp>
 
@@ -37,7 +39,7 @@
   std::shared_ptr<CacheableKey> m_firstFailedKey;
   std::shared_ptr<Exception> m_firstCauseOfFailure;
   int32_t m_totalMapSize;
-  ACE_RW_Thread_Mutex g_readerWriterLock;
+  boost::shared_mutex mutex_;
 
  public:
   PutAllPartialResult(int totalMapSize, std::recursive_mutex& responseLock);
@@ -83,33 +85,24 @@
   bool hasSucceededKeys();
 
   virtual std::string toString() const final {
-    char msgStr1[1024];
-    if (m_firstFailedKey != nullptr) {
-      std::snprintf(msgStr1, 1024, "[ Key =%s ]",
-                    m_firstFailedKey->toString().c_str());
-    }
+    auto asString = std::string("PutAllPartialResult: [ Key =") +
+                    m_firstFailedKey->toString() + "]";
 
-    char msgStr2[1024];
     if (m_totalMapSize > 0) {
       // TODO:: impl. CacheableObjectPartList.size();
       int failedKeyNum = m_totalMapSize - m_succeededKeys->size();
       if (failedKeyNum > 0) {
-        std::snprintf(
-            msgStr2, 1024,
-            "The putAll operation failed to put %d out of %d entries ",
-            failedKeyNum, m_totalMapSize);
+        asString += "The putAll operation failed to put " +
+                    std::to_string(failedKeyNum) + " out of " +
+                    std::to_string(m_totalMapSize) + " entries ";
       } else {
-        std::snprintf(
-            msgStr2, 1024,
-            "The putAll operation successfully put %d out of %d entries ",
-            m_succeededKeys->size(), m_totalMapSize);
+        asString += "The putAll operation sucessfully put " +
+                    std::to_string(m_succeededKeys->size()) + " out of " +
+                    std::to_string(m_totalMapSize) + " entries ";
       }
     }
 
-    char stringBuf[7000];
-    std::snprintf(stringBuf, 7000, "PutAllPartialResult: %s%s", msgStr1,
-                  msgStr2);
-    return std::string(stringBuf);
+    return asString;
   }
 };
 
diff --git a/cppcache/src/PutAllPartialResultServerException.hpp b/cppcache/src/PutAllPartialResultServerException.hpp
index 6883111..81e2c23 100644
--- a/cppcache/src/PutAllPartialResultServerException.hpp
+++ b/cppcache/src/PutAllPartialResultServerException.hpp
@@ -36,8 +36,7 @@
  * @brief PutAllPartialResultServerException class is used to encapsulate
  *geode PutAllPartialResultServerException in case of PutAll execution.
  **/
-class APACHE_GEODE_EXPORT PutAllPartialResultServerException
-    : public Serializable {
+class PutAllPartialResultServerException : public Serializable {
   /**
    * @brief public methods
    */
diff --git a/cppcache/src/Queue.hpp b/cppcache/src/Queue.hpp
index 715277d..ff117c5 100644
--- a/cppcache/src/Queue.hpp
+++ b/cppcache/src/Queue.hpp
@@ -30,7 +30,7 @@
 namespace client {
 
 template <class T>
-class APACHE_GEODE_EXPORT Queue {
+class Queue {
  public:
   /**
    * Constructor with parameter to specify whether the contained objects
diff --git a/cppcache/src/QueueConnectionRequest.cpp b/cppcache/src/QueueConnectionRequest.cpp
index a83b1fc..d25bd8b 100644
--- a/cppcache/src/QueueConnectionRequest.cpp
+++ b/cppcache/src/QueueConnectionRequest.cpp
@@ -19,6 +19,9 @@
 
 #include <geode/DataInput.hpp>
 #include <geode/DataOutput.hpp>
+#include <geode/internal/DSFixedId.hpp>
+
+#include "ClientProxyMembershipID.hpp"
 
 namespace apache {
 namespace geode {
@@ -27,7 +30,7 @@
 void QueueConnectionRequest::toData(DataOutput& output) const {
   output.writeString(m_serverGp);
   output.write(static_cast<int8_t>(DSCode::FixedIDByte));
-  output.write(static_cast<int8_t>(DSCode::ClientProxyMembershipId));
+  output.write(static_cast<int8_t>(internal::DSFid::ClientProxyMembershipId));
   const auto& dsMemberId = m_membershipID.getDSMemberId();
   output.writeBytes(reinterpret_cast<const uint8_t*>(dsMemberId.c_str()),
                     static_cast<int32_t>(dsMemberId.size()));
@@ -37,8 +40,8 @@
   output.writeBoolean(m_findDurable);
 }
 
-DSFid QueueConnectionRequest::getDSFID() const {
-  return DSFid::QueueConnectionRequest;
+internal::DSFid QueueConnectionRequest::getDSFID() const {
+  return internal::DSFid::QueueConnectionRequest;
 }
 
 std::set<ServerLocation> QueueConnectionRequest::getExcludedServer() const {
diff --git a/cppcache/src/QueueConnectionRequest.hpp b/cppcache/src/QueueConnectionRequest.hpp
index 635f7bc..42028d2 100644
--- a/cppcache/src/QueueConnectionRequest.hpp
+++ b/cppcache/src/QueueConnectionRequest.hpp
@@ -23,14 +23,16 @@
 #include <set>
 #include <string>
 
-#include "ClientProxyMembershipID.hpp"
 #include "ServerLocation.hpp"
 #include "ServerLocationRequest.hpp"
+#include "geode/internal/DSFixedId.hpp"
 
 namespace apache {
 namespace geode {
 namespace client {
 
+class ClientProxyMembershipID;
+
 class QueueConnectionRequest : public ServerLocationRequest {
  public:
   QueueConnectionRequest(const ClientProxyMembershipID& memId,
@@ -45,7 +47,7 @@
         m_serverGp(serverGp) {}  // No need for default constructor as creating
                                  // request with it does not make sense.
   void toData(DataOutput& output) const override;
-  DSFid getDSFID() const override;
+  internal::DSFid getDSFID() const override;
 
   virtual std::set<ServerLocation> getExcludedServer() const;
   virtual const ClientProxyMembershipID& getProxyMemberShipId() const;
diff --git a/cppcache/src/ReadWriteLock.cpp b/cppcache/src/ReadWriteLock.cpp
deleted file mode 100644
index 6502668..0000000
--- a/cppcache/src/ReadWriteLock.cpp
+++ /dev/null
@@ -1,50 +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.
- */
-
-#include "ReadWriteLock.hpp"
-
-namespace apache {
-namespace geode {
-namespace client {
-
-TryReadGuard::TryReadGuard(ACE_RW_Thread_Mutex& lock,
-                           const volatile bool& exitCondition)
-    : lock_(lock), isAcquired_(false) {
-  do {
-    if (lock_.tryacquire_read() != -1) {
-      isAcquired_ = true;
-      break;
-    }
-    ACE_OS::thr_yield();
-  } while (!exitCondition);
-}
-
-TryWriteGuard::TryWriteGuard(ACE_RW_Thread_Mutex& lock,
-                             const volatile bool& exitCondition)
-    : lock_(lock), isAcquired_(false) {
-  do {
-    if (lock_.tryacquire_write() != -1) {
-      isAcquired_ = true;
-      break;
-    }
-    ACE_OS::thr_yield();
-  } while (!exitCondition);
-}
-
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
diff --git a/cppcache/src/ReadWriteLock.hpp b/cppcache/src/ReadWriteLock.hpp
deleted file mode 100644
index ecad9b8..0000000
--- a/cppcache/src/ReadWriteLock.hpp
+++ /dev/null
@@ -1,85 +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.
- */
-
-#pragma once
-
-#ifndef GEODE_READWRITELOCK_H_
-#define GEODE_READWRITELOCK_H_
-
-#include <ace/RW_Thread_Mutex.h>
-
-#include <geode/internal/geode_globals.hpp>
-
-namespace apache {
-namespace geode {
-namespace client {
-
-class APACHE_GEODE_EXPORT ReadGuard {
- public:
-  explicit ReadGuard(ACE_RW_Thread_Mutex& lock) : lock_(lock) {
-    lock_.acquire_read();
-  }
-
-  ~ReadGuard() { lock_.release(); }
-  bool isAcquired() { return true; }
-
- private:
-  ACE_RW_Thread_Mutex& lock_;
-};
-
-class WriteGuard {
- public:
-  explicit WriteGuard(ACE_RW_Thread_Mutex& lock) : lock_(lock) {
-    lock_.acquire_write();
-  }
-
-  ~WriteGuard() { lock_.release(); }
-
- private:
-  ACE_RW_Thread_Mutex& lock_;
-};
-
-class TryReadGuard {
- public:
-  TryReadGuard(ACE_RW_Thread_Mutex& lock, const volatile bool& exitCondition);
-  ~TryReadGuard() {
-    if (isAcquired_) lock_.release();
-  }
-  bool isAcquired() const { return isAcquired_; }
-
- private:
-  ACE_RW_Thread_Mutex& lock_;
-  bool isAcquired_;
-};
-
-class TryWriteGuard {
- public:
-  TryWriteGuard(ACE_RW_Thread_Mutex& lock, const volatile bool& exitCondition);
-  ~TryWriteGuard() {
-    if (isAcquired_) lock_.release();
-  }
-  bool isAcquired() const { return isAcquired_; }
-
- private:
-  ACE_RW_Thread_Mutex& lock_;
-  bool isAcquired_;
-};
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_READWRITELOCK_H_
diff --git a/cppcache/src/RegionAttributes.cpp b/cppcache/src/RegionAttributes.cpp
index 4276d71..5e5e4e3 100644
--- a/cppcache/src/RegionAttributes.cpp
+++ b/cppcache/src/RegionAttributes.cpp
@@ -109,7 +109,8 @@
 
 std::shared_ptr<PartitionResolver> RegionAttributes::getPartitionResolver()
     const {
-  if (!m_partitionResolver && !m_partitionResolverLibrary.empty()) {
+  if (!m_partitionResolver && (!m_partitionResolverLibrary.empty() ||
+                               !m_partitionResolverFactory.empty())) {
     if (CacheXmlParser::managedPartitionResolverFn_ &&
         m_partitionResolverFactory.find('.') != std::string::npos) {
       // this is a managed library
diff --git a/cppcache/src/RegionConfig.hpp b/cppcache/src/RegionConfig.hpp
index 416066e..b1e3367 100644
--- a/cppcache/src/RegionConfig.hpp
+++ b/cppcache/src/RegionConfig.hpp
@@ -39,7 +39,7 @@
 
 class RegionConfig;
 
-class APACHE_GEODE_EXPORT RegionConfig {
+class RegionConfig {
  public:
   explicit RegionConfig(const std::string& capacity);
 
diff --git a/cppcache/src/RegionExpiryHandler.cpp b/cppcache/src/RegionExpiryHandler.cpp
deleted file mode 100644
index 8187874..0000000
--- a/cppcache/src/RegionExpiryHandler.cpp
+++ /dev/null
@@ -1,136 +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.
- */
-
-#include "RegionExpiryHandler.hpp"
-
-#include "CacheImpl.hpp"
-#include "ExpiryTaskManager.hpp"
-#include "RegionInternal.hpp"
-
-namespace apache {
-namespace geode {
-namespace client {
-
-RegionExpiryHandler::RegionExpiryHandler(std::shared_ptr<RegionInternal>& rptr,
-                                         ExpirationAction action,
-                                         std::chrono::seconds duration)
-    : m_regionPtr(rptr),
-      m_action(action),
-      m_duration(duration),
-      /* adongre
-       * CID 28941: Uninitialized scalar field (UNINIT_CTOR)
-       */
-      m_expiryTaskId(0) {}
-
-int RegionExpiryHandler::handle_timeout(const ACE_Time_Value& current_time,
-                                        const void*) {
-  auto curr_time = std::chrono::system_clock::from_time_t(current_time.sec());
-  try {
-    auto statistics = m_regionPtr->getStatistics();
-    auto lastTimeForExp = statistics->getLastAccessedTime();
-    if (m_regionPtr->getAttributes().getRegionTimeToLive() >
-        std::chrono::seconds::zero()) {
-      lastTimeForExp = statistics->getLastModifiedTime();
-    }
-
-    auto elapsed = curr_time - lastTimeForExp;
-    LOGDEBUG("Entered region expiry task handler for region [%s]: %s,%s,%s,%s",
-             m_regionPtr->getFullPath().c_str(),
-             to_string(curr_time.time_since_epoch()).c_str(),
-             to_string(lastTimeForExp.time_since_epoch()).c_str(),
-             to_string(m_duration).c_str(), to_string(elapsed).c_str());
-    if (elapsed >= m_duration) {
-      DoTheExpirationAction();
-    } else {
-      auto remaining = m_duration - elapsed;
-      // reset the task after
-      // (lastAccessTime + entryExpiryDuration - curr_time) in seconds
-      LOGDEBUG("Resetting expiry task for region [%s] after %s sec",
-               m_regionPtr->getFullPath().c_str(),
-               to_string(remaining).c_str());
-      m_regionPtr->getCacheImpl()->getExpiryTaskManager().resetTask(
-          m_expiryTaskId, remaining);
-      return 0;
-    }
-    LOGDEBUG("Removing expiry task for region [%s]",
-             m_regionPtr->getFullPath().c_str());
-    m_regionPtr->getCacheImpl()->getExpiryTaskManager().resetTask(
-        m_expiryTaskId, std::chrono::seconds::zero());
-  } catch (...) {
-    // Ignore whatever exception comes
-  }
-  //  we now delete the handler in GF_Timer_Heap_ImmediateReset_T
-  // and always return success.
-  return 0;
-}
-
-int RegionExpiryHandler::handle_close(ACE_HANDLE, ACE_Reactor_Mask) {
-  delete this;
-  return 0;
-}
-
-void RegionExpiryHandler::DoTheExpirationAction() {
-  switch (m_action) {
-    case ExpirationAction::INVALIDATE: {
-      LOGDEBUG(
-          "RegionExpiryHandler::DoTheExpirationAction INVALIDATE "
-          "region [%s]",
-          m_regionPtr->getFullPath().c_str());
-      m_regionPtr->invalidateRegionNoThrow(nullptr,
-                                           CacheEventFlags::EXPIRATION);
-      break;
-    }
-    case ExpirationAction::LOCAL_INVALIDATE: {
-      LOGDEBUG(
-          "RegionExpiryHandler::DoTheExpirationAction LOCAL_INVALIDATE "
-          "region [%s]",
-          m_regionPtr->getFullPath().c_str());
-      m_regionPtr->invalidateRegionNoThrow(
-          nullptr, CacheEventFlags::EXPIRATION | CacheEventFlags::LOCAL);
-      break;
-    }
-    case ExpirationAction::DESTROY: {
-      LOGDEBUG(
-          "RegionExpiryHandler::DoTheExpirationAction DESTROY "
-          "region [%s]",
-          m_regionPtr->getFullPath().c_str());
-      m_regionPtr->destroyRegionNoThrow(nullptr, true,
-                                        CacheEventFlags::EXPIRATION);
-      break;
-    }
-    case ExpirationAction::LOCAL_DESTROY: {
-      LOGDEBUG(
-          "RegionExpiryHandler::DoTheExpirationAction LOCAL_DESTROY "
-          "region [%s]",
-          m_regionPtr->getFullPath().c_str());
-      m_regionPtr->destroyRegionNoThrow(
-          nullptr, true, CacheEventFlags::EXPIRATION | CacheEventFlags::LOCAL);
-      break;
-    }
-    case ExpirationAction::INVALID_ACTION: {
-      LOGERROR(
-          "Unknown expiration action "
-          "%d for region [%s]",
-          m_action, m_regionPtr->getFullPath().c_str());
-      break;
-    }
-  }
-}
-
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
diff --git a/cppcache/src/RegionExpiryHandler.hpp b/cppcache/src/RegionExpiryHandler.hpp
deleted file mode 100644
index d73b2a3..0000000
--- a/cppcache/src/RegionExpiryHandler.hpp
+++ /dev/null
@@ -1,70 +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.
- */
-
-#pragma once
-
-#ifndef GEODE_REGIONEXPIRYHANDLER_H_
-#define GEODE_REGIONEXPIRYHANDLER_H_
-
-#include <geode/ExpirationAction.hpp>
-#include <geode/Region.hpp>
-#include <geode/internal/geode_globals.hpp>
-
-#include "ExpiryTaskManager.hpp"
-#include "RegionInternal.hpp"
-
-namespace apache {
-namespace geode {
-namespace client {
-
-/**
- * @class RegionExpiryHandler RegionExpiryHandler.hpp
- *
- * The task object which contains the handler which gets triggered
- * when a region expires.
- *
- * TODO: cleanup region entry node and handler from expiry task
- * manager when region is destroyed
- *
- */
-class APACHE_GEODE_EXPORT RegionExpiryHandler : public ACE_Event_Handler {
- public:
-  RegionExpiryHandler(std::shared_ptr<RegionInternal>& rptr,
-                      ExpirationAction action, std::chrono::seconds duration);
-
-  int handle_timeout(const ACE_Time_Value& current_time,
-                     const void* arg) override;
-
-  int handle_close(ACE_HANDLE handle, ACE_Reactor_Mask close_mask) override;
-
-  void setExpiryTaskId(ExpiryTaskManager::id_type expiryTaskId) {
-    m_expiryTaskId = expiryTaskId;
-  }
-
- private:
-  std::shared_ptr<RegionInternal> m_regionPtr;
-  ExpirationAction m_action;
-  std::chrono::seconds m_duration;
-  ExpiryTaskManager::id_type m_expiryTaskId;
-  // perform the actual expiration action
-  void DoTheExpirationAction();
-};
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_REGIONEXPIRYHANDLER_H_
diff --git a/cppcache/src/RegionExpiryTask.cpp b/cppcache/src/RegionExpiryTask.cpp
new file mode 100644
index 0000000..198278e
--- /dev/null
+++ b/cppcache/src/RegionExpiryTask.cpp
@@ -0,0 +1,95 @@
+/*
+ * 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.
+ */
+
+#include "RegionExpiryTask.hpp"
+
+#include "CacheImpl.hpp"
+#include "RegionInternal.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
+RegionExpiryTask::RegionExpiryTask(ExpiryTaskManager& manager,
+                                   std::shared_ptr<RegionInternal> region,
+                                   ExpirationAction action,
+                                   const duration_t& duration)
+    : ExpiryTask(manager),
+      region_(region),
+      duration_(duration),
+      action_(action) {}
+
+ExpiryTask::time_point_t RegionExpiryTask::expire_at() const {
+  auto statistics = region_->getStatistics();
+  auto last_time = statistics->getLastAccessedSteadyTime();
+  if (region_->getAttributes().getRegionTimeToLive() >
+      std::chrono::seconds::zero()) {
+    last_time = statistics->getLastModifiedSteadyTime();
+  }
+
+  return last_time + duration_;
+}
+
+bool RegionExpiryTask::on_expire() {
+  auto tp = expire_at();
+  if (tp > ExpiryTask::clock_t::now()) {
+    // Region expiration needs to be re-scheduled as it was accessed/modified
+    // since the last time the expiration task was (re-)scheduled.
+    // This is the best approach, rather than re-scheduling the task each time
+    // the region is accessed/modified, as access/modify is a more frequent
+    // event than expiration.
+    reset(tp);
+    return false;
+  }
+
+  const auto full_path = region_->getFullPath().c_str();
+  switch (action_) {
+    case ExpirationAction::INVALIDATE: {
+      LOGDEBUG("RegionExpiryTask INVALIDATE region [%s]", full_path);
+      region_->invalidateRegionNoThrow(nullptr, CacheEventFlags::EXPIRATION);
+      break;
+    }
+    case ExpirationAction::LOCAL_INVALIDATE: {
+      LOGDEBUG("RegionExpiryTask LOCAL_INVALIDATE region [%s]", full_path);
+      region_->invalidateRegionNoThrow(
+          nullptr, CacheEventFlags::EXPIRATION | CacheEventFlags::LOCAL);
+      break;
+    }
+    case ExpirationAction::DESTROY: {
+      LOGDEBUG("RegionExpiryTask DESTROY region [%s]", full_path);
+      region_->destroyRegionNoThrow(nullptr, true, CacheEventFlags::EXPIRATION);
+      break;
+    }
+    case ExpirationAction::LOCAL_DESTROY: {
+      LOGDEBUG("RegionExpiryTask LOCAL_DESTROY region [%s]", full_path);
+      region_->destroyRegionNoThrow(
+          nullptr, true, CacheEventFlags::EXPIRATION | CacheEventFlags::LOCAL);
+      break;
+    }
+    case ExpirationAction::INVALID_ACTION: {
+      LOGERROR("Unknown expiration action %d for region [%s]", action_,
+               full_path);
+      break;
+    }
+  }
+
+  return true;
+}
+
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
diff --git a/cppcache/src/RegionExpiryTask.hpp b/cppcache/src/RegionExpiryTask.hpp
new file mode 100644
index 0000000..86c3f7f
--- /dev/null
+++ b/cppcache/src/RegionExpiryTask.hpp
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+#ifndef GEODE_REGIONEXPIRYTASK_H_
+#define GEODE_REGIONEXPIRYTASK_H_
+
+#include <geode/ExpirationAction.hpp>
+#include <geode/Region.hpp>
+#include <geode/internal/geode_globals.hpp>
+
+#include "ExpiryTask.hpp"
+#include "RegionInternal.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
+/**
+ * @class RegionExpiryTask RegionExpiryTask.hpp
+ *
+ * The task object which contains the handler which gets triggered
+ * when a region expires.
+ */
+class RegionExpiryTask : public ExpiryTask {
+ public:
+  RegionExpiryTask(ExpiryTaskManager& manager,
+                   std::shared_ptr<RegionInternal> region,
+                   ExpirationAction action, const duration_t& duration);
+
+ protected:
+  bool on_expire() override;
+  time_point_t expire_at() const;
+
+ protected:
+  std::shared_ptr<RegionInternal> region_;
+  ExpiryTask::duration_t duration_;
+  ExpirationAction action_;
+};
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+#endif  // GEODE_REGIONEXPIRYTASK_H_
diff --git a/cppcache/src/RegionFactory.cpp b/cppcache/src/RegionFactory.cpp
index ffbaf57..4d0f20c 100644
--- a/cppcache/src/RegionFactory.cpp
+++ b/cppcache/src/RegionFactory.cpp
@@ -150,10 +150,8 @@
 }
 
 RegionFactory& RegionFactory::setInitialCapacity(int initialCapacity) {
-  char excpStr[256] = {0};
   if (initialCapacity < 0) {
-    std::snprintf(excpStr, 256, "initialCapacity must be >= 0 ");
-    throw IllegalArgumentException(excpStr);
+    throw IllegalArgumentException("initialCapacity must be >= 0");
   }
   m_regionAttributesFactory->setInitialCapacity(initialCapacity);
   return *this;
diff --git a/cppcache/src/RegionGlobalLocks.hpp b/cppcache/src/RegionGlobalLocks.hpp
index 5b61833..f202ea9 100644
--- a/cppcache/src/RegionGlobalLocks.hpp
+++ b/cppcache/src/RegionGlobalLocks.hpp
@@ -26,7 +26,7 @@
 namespace geode {
 namespace client {
 
-class APACHE_GEODE_EXPORT RegionGlobalLocks {
+class RegionGlobalLocks {
  public:
   explicit RegionGlobalLocks(LocalRegion* region, bool isFailover = true)
       : m_region(region), m_isFailover(isFailover) {
diff --git a/cppcache/src/RegionInternal.cpp b/cppcache/src/RegionInternal.cpp
index ea01843..e3a541c 100644
--- a/cppcache/src/RegionInternal.cpp
+++ b/cppcache/src/RegionInternal.cpp
@@ -39,6 +39,8 @@
     CacheEventFlags::GF_CACHE_CLOSE);
 const CacheEventFlags CacheEventFlags::NOCACHEWRITER(
     CacheEventFlags::GF_NOCACHEWRITER);
+const CacheEventFlags CacheEventFlags::NOCALLBACKS(
+    CacheEventFlags::GF_NOCALLBACKS);
 
 RegionInternal::RegionInternal(CacheImpl* cacheImpl,
                                RegionAttributes attributes)
diff --git a/cppcache/src/RegionInternal.hpp b/cppcache/src/RegionInternal.hpp
index 4e4358d..1e25a6f 100644
--- a/cppcache/src/RegionInternal.hpp
+++ b/cppcache/src/RegionInternal.hpp
@@ -45,17 +45,18 @@
  */
 class CacheEventFlags {
  private:
-  uint8_t m_flags;
-  static const uint8_t GF_NORMAL = 0x01;
-  static const uint8_t GF_LOCAL = 0x02;
-  static const uint8_t GF_NOTIFICATION = 0x04;
-  static const uint8_t GF_NOTIFICATION_UPDATE = 0x08;
-  static const uint8_t GF_EVICTION = 0x10;
-  static const uint8_t GF_EXPIRATION = 0x20;
-  static const uint8_t GF_CACHE_CLOSE = 0x40;
-  static const uint8_t GF_NOCACHEWRITER = 0x80;
+  uint16_t m_flags;
+  static const uint16_t GF_NORMAL = 0x01;
+  static const uint16_t GF_LOCAL = 0x02;
+  static const uint16_t GF_NOTIFICATION = 0x04;
+  static const uint16_t GF_NOTIFICATION_UPDATE = 0x08;
+  static const uint16_t GF_EVICTION = 0x10;
+  static const uint16_t GF_EXPIRATION = 0x20;
+  static const uint16_t GF_CACHE_CLOSE = 0x40;
+  static const uint16_t GF_NOCACHEWRITER = 0x80;
+  static const uint16_t GF_NOCALLBACKS = 0x100;
 
-  inline explicit CacheEventFlags(const uint8_t flags) : m_flags(flags) {}
+  inline explicit CacheEventFlags(const uint16_t flags) : m_flags(flags) {}
 
  public:
   static const CacheEventFlags NORMAL;
@@ -66,6 +67,7 @@
   static const CacheEventFlags EXPIRATION;
   static const CacheEventFlags CACHE_CLOSE;
   static const CacheEventFlags NOCACHEWRITER;
+  static const CacheEventFlags NOCALLBACKS;
 
   inline CacheEventFlags(const CacheEventFlags& flags) = default;
 
@@ -84,46 +86,36 @@
     return (m_flags == flags.m_flags);
   }
 
-  inline bool isNormal() const {
-    return (m_flags & GF_NORMAL) > 0 ? true : false;
-  }
+  inline bool isNormal() const { return (m_flags & GF_NORMAL) > 0; }
 
-  inline bool isLocal() const {
-    return (m_flags & GF_LOCAL) > 0 ? true : false;
-  }
+  inline bool isLocal() const { return (m_flags & GF_LOCAL) > 0; }
 
-  inline bool isNotification() const {
-    return (m_flags & GF_NOTIFICATION) > 0 ? true : false;
-  }
+  inline bool isNotification() const { return (m_flags & GF_NOTIFICATION) > 0; }
 
   inline bool isNotificationUpdate() const {
-    return (m_flags & GF_NOTIFICATION_UPDATE) > 0 ? true : false;
+    return (m_flags & GF_NOTIFICATION_UPDATE) > 0;
   }
 
-  inline bool isEviction() const {
-    return (m_flags & GF_EVICTION) > 0 ? true : false;
-  }
+  inline bool isEviction() const { return (m_flags & GF_EVICTION) > 0; }
 
-  inline bool isExpiration() const {
-    return (m_flags & GF_EXPIRATION) > 0 ? true : false;
-  }
+  inline bool isExpiration() const { return (m_flags & GF_EXPIRATION) > 0; }
 
-  inline bool isCacheClose() const {
-    return (m_flags & GF_CACHE_CLOSE) > 0 ? true : false;
-  }
+  inline bool isCacheClose() const { return (m_flags & GF_CACHE_CLOSE) > 0; }
 
   inline bool isNoCacheWriter() const {
-    return (m_flags & GF_NOCACHEWRITER) > 0 ? true : false;
+    return (m_flags & GF_NOCACHEWRITER) > 0;
   }
 
+  inline bool isNoCallbacks() const { return (m_flags & GF_NOCALLBACKS) > 0; }
+
   inline bool isEvictOrExpire() const {
-    return (m_flags & (GF_EVICTION | GF_EXPIRATION)) > 0 ? true : false;
+    return (m_flags & (GF_EVICTION | GF_EXPIRATION)) > 0;
   }
 
   // special optimized method for CacheWriter invocation condition
   inline bool invokeCacheWriter() const {
     return ((m_flags & (GF_NOTIFICATION | GF_EVICTION | GF_EXPIRATION |
-                        GF_NOCACHEWRITER)) == 0x0);
+                        GF_NOCACHEWRITER | GF_NOCALLBACKS)) == 0x0);
   }
 };
 
@@ -271,7 +263,7 @@
   std::shared_ptr<RegionEntry> createRegionEntry(
       const std::shared_ptr<CacheableKey>& key,
       const std::shared_ptr<Cacheable>& value);
-  virtual void addDisMessToQueue() {}
+  virtual void addDisconnectedMessageToQueue() {}
 
   virtual void txDestroy(const std::shared_ptr<CacheableKey>& key,
                          const std::shared_ptr<Serializable>& callBack,
diff --git a/cppcache/src/InterestResultPolicy.cpp b/cppcache/src/RegionService.cpp
similarity index 79%
rename from cppcache/src/InterestResultPolicy.cpp
rename to cppcache/src/RegionService.cpp
index b043896..699ee23 100644
--- a/cppcache/src/InterestResultPolicy.cpp
+++ b/cppcache/src/RegionService.cpp
@@ -15,16 +15,13 @@
  * limitations under the License.
  */
 
-#include "InterestResultPolicy.hpp"
+#include <geode/RegionService.hpp>
 
 namespace apache {
 namespace geode {
 namespace client {
 
-char InterestResultPolicy::nextOrdinal = 0;
-InterestResultPolicy InterestResultPolicy::NONE;
-InterestResultPolicy InterestResultPolicy::KEYS;
-InterestResultPolicy InterestResultPolicy::KEYS_VALUES;
+RegionService::~RegionService() = default;
 
 }  // namespace client
 }  // namespace geode
diff --git a/cppcache/src/RegionStats.hpp b/cppcache/src/RegionStats.hpp
index 06523e2..0a4cf8f 100644
--- a/cppcache/src/RegionStats.hpp
+++ b/cppcache/src/RegionStats.hpp
@@ -35,7 +35,7 @@
 using statistics::Statistics;
 using statistics::StatisticsType;
 
-class APACHE_GEODE_EXPORT RegionStats {
+class RegionStats {
  public:
   /** hold statistics for a region.. */
   RegionStats(statistics::StatisticsFactory* factory,
diff --git a/cppcache/src/RegionXmlCreation.hpp b/cppcache/src/RegionXmlCreation.hpp
index d3c9389..d190408 100644
--- a/cppcache/src/RegionXmlCreation.hpp
+++ b/cppcache/src/RegionXmlCreation.hpp
@@ -40,7 +40,7 @@
  *
  * @since 1.0
  */
-class APACHE_GEODE_EXPORT RegionXmlCreation {
+class RegionXmlCreation {
  private:
   /** An <code>RegionAttributesFactory</code> for creating default
    * <code>RegionAttribute</code>s */
diff --git a/cppcache/src/RemoteQuery.cpp b/cppcache/src/RemoteQuery.cpp
index a29f80c..3612eac 100644
--- a/cppcache/src/RemoteQuery.cpp
+++ b/cppcache/src/RemoteQuery.cpp
@@ -17,6 +17,8 @@
 
 #include "RemoteQuery.hpp"
 
+#include <boost/thread/lock_types.hpp>
+
 #include "ResultSetImpl.hpp"
 #include "StructSetImpl.hpp"
 #include "TcrConnectionManager.hpp"
@@ -70,6 +72,7 @@
     pool->getStats().incQueryExecutionId();
   }
   /*get the start time for QueryExecutionTime stat*/
+  // NOLINTNEXTLINE(clang-analyzer-core.CallAndMessage)
   bool enableTimeStatistics = tcdm->getConnectionManager()
                                   .getCacheImpl()
                                   ->getDistributedSystem()
@@ -97,12 +100,9 @@
     sr = std::make_shared<ResultSetImpl>(values);
   } else {
     if (values->size() % fieldNameVec.size() != 0) {
-      char exMsg[1024];
-      std::snprintf(exMsg, 1023,
-                    "%s: Number of values coming from "
-                    "server has to be exactly divisible by field count",
-                    func);
-      throw MessageException(exMsg);
+      throw MessageException(std::string(func) +
+                             ": Number of values coming from server has to be "
+                             "exactly divisible by field count");
     } else {
       LOGFINEST("%s: creating StructSet for query: %s", func,
                 m_queryString.c_str());
@@ -124,11 +124,11 @@
     ThinClientBaseDM* tcdm, std::shared_ptr<CacheableVector> paramList) {
   LOGFINEST("%s: executing query: %s", func, m_queryString.c_str());
 
-  TryReadGuard guard(m_queryService->getLock(), m_queryService->invalid());
-
+  boost::shared_lock<boost::shared_mutex> guard{m_queryService->getMutex()};
   if (m_queryService->invalid()) {
     return GF_CACHE_CLOSED_EXCEPTION;
   }
+
   LOGDEBUG("%s: creating QUERY TcrMessage for query: %s", func,
            m_queryString.c_str());
   if (paramList != nullptr) {
@@ -140,12 +140,11 @@
     msg.setTimeout(timeout);
     reply.setTimeout(timeout);
 
-    GfErrType err = GF_NOERR;
     LOGFINEST("%s: sending request for query: %s", func, m_queryString.c_str());
     if (tcdm == nullptr) {
       tcdm = m_tccdm;
     }
-    err = tcdm->sendSyncRequest(msg, reply);
+    auto err = tcdm->sendSyncRequest(msg, reply);
     if (err != GF_NOERR) {
       return err;
     }
@@ -164,12 +163,11 @@
     msg.setTimeout(timeout);
     reply.setTimeout(timeout);
 
-    GfErrType err = GF_NOERR;
     LOGFINEST("%s: sending request for query: %s", func, m_queryString.c_str());
     if (tcdm == nullptr) {
       tcdm = m_tccdm;
     }
-    err = tcdm->sendSyncRequest(msg, reply);
+    auto err = tcdm->sendSyncRequest(msg, reply);
     if (err != GF_NOERR) {
       return err;
     }
diff --git a/cppcache/src/RemoteQuery.hpp b/cppcache/src/RemoteQuery.hpp
index 263d2e0..3df4fc6 100644
--- a/cppcache/src/RemoteQuery.hpp
+++ b/cppcache/src/RemoteQuery.hpp
@@ -39,7 +39,7 @@
 
 class ThinClientBaseDM;
 
-class APACHE_GEODE_EXPORT RemoteQuery : public Query {
+class RemoteQuery : public Query {
   std::string m_queryString;
   std::shared_ptr<RemoteQueryService> m_queryService;
   ThinClientBaseDM* m_tccdm;
diff --git a/cppcache/src/RemoteQueryService.cpp b/cppcache/src/RemoteQueryService.cpp
index 8a3d079..851fb1f 100644
--- a/cppcache/src/RemoteQueryService.cpp
+++ b/cppcache/src/RemoteQueryService.cpp
@@ -17,10 +17,12 @@
 
 #include "RemoteQueryService.hpp"
 
+#include <boost/thread/lock_types.hpp>
+
 #include "CacheImpl.hpp"
 #include "CqServiceVsdStats.hpp"
-#include "ReadWriteLock.hpp"
 #include "RemoteQuery.hpp"
+#include "ThinClientCacheDistributionManager.hpp"
 #include "ThinClientPoolDM.hpp"
 #include "UserAttributes.hpp"
 #include "statistics/StatisticsManager.hpp"
@@ -45,50 +47,42 @@
 }
 
 void RemoteQueryService::init() {
-  TryWriteGuard guard(m_rwLock, m_invalid);
-
+  boost::unique_lock<decltype(mutex_)> guard{mutex_};
   if (m_invalid) {
     LOGFINEST("RemoteQueryService::init: initializing TCCDM");
     if (dynamic_cast<ThinClientCacheDistributionManager*>(m_tccdm)) {
       m_tccdm->init();
     }
+
     m_invalid = false;
     LOGFINEST("RemoteQueryService::init: done initialization");
   }
 }
 
 std::shared_ptr<Query> RemoteQueryService::newQuery(std::string querystring) {
+  boost::shared_lock<decltype(mutex_)> guard{mutex_};
+  if (m_invalid) {
+    throw CacheClosedException(
+        "QueryService::newQuery: Cache has been closed.");
+  }
+
   LOGDEBUG("RemoteQueryService::newQuery: multiuserMode = %d ",
            m_tccdm->isMultiUserMode());
-  if (!m_tccdm->isMultiUserMode()) {
-    TryReadGuard guard(m_rwLock, m_invalid);
+  LOGDEBUG("RemoteQueryService: creating a new query: " + querystring);
 
-    if (m_invalid) {
-      throw CacheClosedException(
-          "QueryService::newQuery: Cache has been closed.");
-    }
-
-    LOGDEBUG("RemoteQueryService: creating a new query: " + querystring);
-    return std::shared_ptr<Query>(
-        new RemoteQuery(querystring, shared_from_this(), m_tccdm));
-  } else {
-    TryReadGuard guard(m_rwLock, m_invalid);
-
-    if (m_invalid) {
-      throw CacheClosedException(
-          "QueryService::newQuery: Cache has been closed.");
-    }
-
-    LOGDEBUG("RemoteQueryService: creating a new query: " + querystring);
-    return std::shared_ptr<Query>(new RemoteQuery(
+  if (m_tccdm->isMultiUserMode()) {
+    return std::make_shared<RemoteQuery>(
         querystring, shared_from_this(), m_tccdm,
-        UserAttributes::threadLocalUserAttributes->getAuthenticatedView()));
+        UserAttributes::threadLocalUserAttributes->getAuthenticatedView());
+  } else {
+    return std::make_shared<RemoteQuery>(querystring, shared_from_this(),
+                                         m_tccdm);
   }
 }
 
 void RemoteQueryService::close() {
   LOGFINEST("RemoteQueryService::close: starting close");
-  TryWriteGuard guard(m_rwLock, m_invalid);
+  boost::unique_lock<decltype(mutex_)> guard{mutex_};
 
   if (m_cqService != nullptr) {
     LOGFINEST("RemoteQueryService::close: starting CQ service close");
@@ -117,8 +111,7 @@
  * execute all cqs on the endpoint after failover
  */
 GfErrType RemoteQueryService::executeAllCqs(TcrEndpoint* endpoint) {
-  TryReadGuard guard(m_rwLock, m_invalid);
-
+  boost::shared_lock<decltype(mutex_)> guard{mutex_};
   if (m_invalid) {
     LOGFINE("QueryService::executeAllCqs(endpoint): Not initialized.");
     return GF_NOERR;
@@ -136,8 +129,7 @@
 }
 
 void RemoteQueryService::executeAllCqs(bool failover) {
-  TryReadGuard guard(m_rwLock, m_invalid);
-
+  boost::shared_lock<decltype(mutex_)> guard{mutex_};
   if (m_invalid) {
     LOGFINE("QueryService::executeAllCqs: Not initialized.");
     return;
@@ -155,11 +147,12 @@
 std::shared_ptr<CqQuery> RemoteQueryService::newCq(
     std::string querystr, const std::shared_ptr<CqAttributes>& cqAttr,
     bool isDurable) {
-  TryReadGuard guard(m_rwLock, m_invalid);
+  boost::shared_lock<decltype(mutex_)> guard{mutex_};
 
   if (m_invalid) {
     throw CacheClosedException("QueryService::newCq: Cache has been closed.");
   }
+
   initCqService();
   // use query string as name for now
   std::string name("_default");
@@ -170,7 +163,7 @@
 std::shared_ptr<CqQuery> RemoteQueryService::newCq(
     std::string name, std::string querystr,
     const std::shared_ptr<CqAttributes>& cqAttr, bool isDurable) {
-  TryReadGuard guard(m_rwLock, m_invalid);
+  boost::shared_lock<decltype(mutex_)> guard{mutex_};
 
   if (m_invalid) {
     throw CacheClosedException("QueryService::newCq: Cache has been closed.");
@@ -181,7 +174,7 @@
 }
 
 void RemoteQueryService::closeCqs() {
-  TryReadGuard guard(m_rwLock, m_invalid);
+  boost::shared_lock<decltype(mutex_)> guard{mutex_};
 
   if (m_invalid) {
     LOGFINE("QueryService::closeCqs: Cache has been closed.");
@@ -195,7 +188,7 @@
 }
 
 CqService::query_container_type RemoteQueryService::getCqs() const {
-  TryReadGuard guard(m_rwLock, m_invalid);
+  boost::shared_lock<decltype(mutex_)> guard{mutex_};
 
   if (m_invalid) {
     throw CacheClosedException("QueryService::getCqs: Cache has been closed.");
@@ -212,7 +205,7 @@
 
 std::shared_ptr<CqQuery> RemoteQueryService::getCq(
     const std::string& name) const {
-  TryReadGuard guard(m_rwLock, m_invalid);
+  boost::shared_lock<decltype(mutex_)> guard{mutex_};
 
   if (m_invalid) {
     throw CacheClosedException("QueryService::getCq: Cache has been closed.");
@@ -227,7 +220,7 @@
 }
 
 void RemoteQueryService::executeCqs() {
-  TryReadGuard guard(m_rwLock, m_invalid);
+  boost::shared_lock<decltype(mutex_)> guard{mutex_};
 
   if (m_invalid) {
     throw CacheClosedException(
@@ -241,7 +234,7 @@
 }
 
 void RemoteQueryService::stopCqs() {
-  TryReadGuard guard(m_rwLock, m_invalid);
+  boost::shared_lock<decltype(mutex_)> guard{mutex_};
 
   if (m_invalid) {
     LOGFINE("QueryService::stopCqs: Cache has been closed.");
@@ -256,7 +249,7 @@
 
 std::shared_ptr<CqServiceStatistics>
 RemoteQueryService::getCqServiceStatistics() const {
-  TryReadGuard guard(m_rwLock, m_invalid);
+  boost::shared_lock<decltype(mutex_)> guard{mutex_};
 
   if (m_invalid) {
     throw CacheClosedException(
@@ -271,20 +264,10 @@
   return nullptr;
 }
 
-void RemoteQueryService::receiveNotification(TcrMessage* msg) {
+void RemoteQueryService::receiveNotification(TcrMessage& msg) {
   {
-    TryReadGuard guard(m_rwLock, m_invalid);
-
-    if (m_invalid) {
-      //  do we need this check?
-      return;
-    }
-    /*if cq has not been started, then  no cq exists */
-    if (!m_cqService) {
-      return;
-    }
-
-    if (!m_cqService->checkAndAcquireLock()) {
+    boost::shared_lock<decltype(mutex_)> guard{mutex_};
+    if (m_invalid || !m_cqService || !m_cqService->checkAndAcquireLock()) {
       return;
     }
   }
@@ -294,7 +277,7 @@
 
 std::shared_ptr<CacheableArrayList>
 RemoteQueryService::getAllDurableCqsFromServer() const {
-  TryReadGuard guard(m_rwLock, m_invalid);
+  boost::shared_lock<decltype(mutex_)> guard{mutex_};
 
   if (m_invalid) {
     throw CacheClosedException(
@@ -331,6 +314,8 @@
   m_cqService->invokeCqConnectedListeners(poolName, connected);
 }
 
+boost::shared_mutex& RemoteQueryService::getMutex() { return mutex_; }
+
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/RemoteQueryService.hpp b/cppcache/src/RemoteQueryService.hpp
index add9cca..8d27109 100644
--- a/cppcache/src/RemoteQueryService.hpp
+++ b/cppcache/src/RemoteQueryService.hpp
@@ -23,12 +23,12 @@
 #include <memory>
 #include <string>
 
+#include <boost/thread/shared_mutex.hpp>
+
 #include <geode/QueryService.hpp>
 #include <geode/internal/geode_globals.hpp>
 
 #include "CqService.hpp"
-#include "ThinClientCacheDistributionManager.hpp"
-#include "statistics/StatisticsManager.hpp"
 
 namespace apache {
 namespace geode {
@@ -37,7 +37,7 @@
 class CacheImpl;
 class ThinClientPoolDM;
 typedef std::map<std::string, bool> CqPoolsConnected;
-class APACHE_GEODE_EXPORT RemoteQueryService
+class RemoteQueryService
     : public QueryService,
       public std::enable_shared_from_this<RemoteQueryService> {
  public:
@@ -47,7 +47,7 @@
 
   void init();
 
-  inline ACE_RW_Thread_Mutex& getLock() { return m_rwLock; }
+  boost::shared_mutex& getMutex();
 
   inline const volatile bool& invalid() { return m_invalid; }
 
@@ -87,7 +87,7 @@
    * execute all cqs on the endpoint after failover
    */
   GfErrType executeAllCqs(TcrEndpoint* endpoint);
-  void receiveNotification(TcrMessage* msg);
+  void receiveNotification(TcrMessage& msg);
   void invokeCqConnectedListeners(ThinClientPoolDM* pool, bool connected);
   // For Lazy Cq Start-no use, no start
   inline void initCqService() {
@@ -100,7 +100,7 @@
 
  private:
   volatile bool m_invalid;
-  mutable ACE_RW_Thread_Mutex m_rwLock;
+  mutable boost::shared_mutex mutex_;
 
   ThinClientBaseDM* m_tccdm;
   std::shared_ptr<CqService> m_cqService;
diff --git a/cppcache/src/ResultSetImpl.hpp b/cppcache/src/ResultSetImpl.hpp
index ed947e5..5f07fa2 100644
--- a/cppcache/src/ResultSetImpl.hpp
+++ b/cppcache/src/ResultSetImpl.hpp
@@ -30,7 +30,7 @@
 namespace geode {
 namespace client {
 
-class APACHE_GEODE_EXPORT ResultSetImpl : public ResultSet {
+class ResultSetImpl : public ResultSet {
  public:
   explicit ResultSetImpl(const std::shared_ptr<CacheableVector>& response);
   ~ResultSetImpl() noexcept override = default;
diff --git a/cppcache/src/SerializableHelper.hpp b/cppcache/src/SerializableHelper.hpp
index 39b5565..9fe7716 100644
--- a/cppcache/src/SerializableHelper.hpp
+++ b/cppcache/src/SerializableHelper.hpp
@@ -22,11 +22,17 @@
 
 #include <geode/DataInput.hpp>
 #include <geode/DataOutput.hpp>
+#include <geode/DataSerializable.hpp>
+#include <geode/internal/DataSerializableInternal.hpp>
+#include <geode/internal/DataSerializablePrimitive.hpp>
 
 namespace apache {
 namespace geode {
 namespace client {
 
+using internal::DataSerializableInternal;
+using internal::DataSerializablePrimitive;
+
 template <class _Serializable>
 struct SerializableHelper {
   inline void serialize(DataOutput& dataOutput,
diff --git a/cppcache/src/SerializationRegistry.cpp b/cppcache/src/SerializationRegistry.cpp
index 151a643..38055f9 100644
--- a/cppcache/src/SerializationRegistry.cpp
+++ b/cppcache/src/SerializationRegistry.cpp
@@ -17,8 +17,7 @@
 
 #include "SerializationRegistry.hpp"
 
-#include <functional>
-#include <mutex>
+#include <limits>
 
 #include <geode/CacheableBuiltins.hpp>
 #include <geode/CacheableDate.hpp>
@@ -47,6 +46,7 @@
 #include "GetAllServersResponse.hpp"
 #include "LocatorListResponse.hpp"
 #include "PdxHelper.hpp"
+#include "PdxInstanceImpl.hpp"
 #include "QueueConnectionResponse.hpp"
 #include "ThinClientPoolDM.hpp"
 
@@ -140,6 +140,148 @@
   bindDataSerializableFixedId(GatewaySenderEventCallbackArgument::create);
 }
 
+void SerializationRegistry::serialize(const std::shared_ptr<Serializable>& obj,
+                                      DataOutput& output, bool isDelta) const {
+  if (obj == nullptr) {
+    output.write(static_cast<int8_t>(DSCode::NullObj));
+  } else if (auto&& pdxSerializable =
+                 std::dynamic_pointer_cast<PdxSerializable>(obj)) {
+    serialize(pdxSerializable, output);
+  } else if (const auto&& dataSerializableFixedId =
+                 std::dynamic_pointer_cast<DataSerializableFixedId>(obj)) {
+    serialize(dataSerializableFixedId, output);
+  } else if (const auto&& dataSerializablePrimitive =
+                 std::dynamic_pointer_cast<DataSerializablePrimitive>(obj)) {
+    serialize(dataSerializablePrimitive, output);
+  } else if (const auto&& dataSerializable =
+                 std::dynamic_pointer_cast<DataSerializable>(obj)) {
+    dataSerializableHandler_->serialize(dataSerializable, output, isDelta);
+  } else if (const auto&& dataSerializableInternal =
+                 std::dynamic_pointer_cast<DataSerializableInternal>(obj)) {
+    serialize(dataSerializableInternal, output);
+  } else {
+    throw UnsupportedOperationException(
+        "SerializationRegistry::serialize: Serialization type not "
+        "implemented.");
+  }
+}
+
+void SerializationRegistry::setPdxTypeHandler(PdxTypeHandler* handler) {
+  pdxTypeHandler_ = std::unique_ptr<PdxTypeHandler>(handler);
+}
+void SerializationRegistry::setDataSerializableHandler(
+    DataSerializableHandler* handler) {
+  dataSerializableHandler_ = std::unique_ptr<DataSerializableHandler>(handler);
+}
+
+TypeFactoryMethod SerializationRegistry::getDataSerializableCreationMethod(
+    int32_t objectId) {
+  TypeFactoryMethod createType;
+  theTypeMap_.findDataSerializable(objectId, createType);
+  return createType;
+}
+
+int32_t SerializationRegistry::getIdForDataSerializableType(
+    std::type_index objectType) const {
+  auto&& typeIterator = theTypeMap_.typeToClassId_.find(objectType);
+  return typeIterator->second;
+}
+
+DSCode SerializationRegistry::getSerializableDataDsCode(int32_t classId) {
+  if (classId <= std::numeric_limits<int8_t>::max() &&
+      classId >= std::numeric_limits<int8_t>::min()) {
+    return DSCode::CacheableUserData;
+  } else if (classId <= std::numeric_limits<int16_t>::max() &&
+             classId >= std::numeric_limits<int16_t>::min()) {
+    return DSCode::CacheableUserData2;
+  } else {
+    return DSCode::CacheableUserData4;
+  }
+}
+
+void SerializationRegistry::serializeWithoutHeader(
+    const std::shared_ptr<Serializable>& obj, DataOutput& output) const {
+  if (const auto&& pdxSerializable =
+          std::dynamic_pointer_cast<PdxSerializable>(obj)) {
+    serializeWithoutHeader(pdxSerializable, output);
+  } else if (const auto&& dataSerializableFixedId =
+                 std::dynamic_pointer_cast<DataSerializableFixedId>(obj)) {
+    serializeWithoutHeader(dataSerializableFixedId, output);
+  } else if (const auto&& dataSerializablePrimitive =
+                 std::dynamic_pointer_cast<DataSerializablePrimitive>(obj)) {
+    serializeWithoutHeader(dataSerializablePrimitive, output);
+  } else if (const auto&& dataSerializable =
+                 std::dynamic_pointer_cast<DataSerializable>(obj)) {
+    serializeWithoutHeader(dataSerializable, output);
+  } else if (const auto&& dataSerializableInternal =
+                 std::dynamic_pointer_cast<DataSerializableInternal>(obj)) {
+    serializeWithoutHeader(dataSerializableInternal, output);
+  } else {
+    throw UnsupportedOperationException(
+        "SerializationRegistry::serializeWithoutHeader: Serialization type "
+        "not implemented.");
+  }
+}
+
+void SerializationRegistry::serialize(
+    const std::shared_ptr<DataSerializableFixedId>& obj,
+    DataOutput& output) const {
+  auto id = static_cast<int32_t>(obj->getDSFID());
+  if (id <= std::numeric_limits<int8_t>::max() &&
+      id >= std::numeric_limits<int8_t>::min()) {
+    output.write(static_cast<int8_t>(DSCode::FixedIDByte));
+    output.write(static_cast<int8_t>(id));
+  } else if (id <= std::numeric_limits<int16_t>::max() &&
+             id >= std::numeric_limits<int16_t>::min()) {
+    output.write(static_cast<int8_t>(DSCode::FixedIDShort));
+    output.writeInt(static_cast<int16_t>(id));
+  } else {
+    output.write(static_cast<int8_t>(DSCode::FixedIDInt));
+    output.writeInt(static_cast<int32_t>(id));
+  }
+
+  serializeWithoutHeader(obj, output);
+}
+
+void SerializationRegistry::serializeWithoutHeader(
+    const std::shared_ptr<DataSerializableFixedId>& obj,
+    DataOutput& output) const {
+  obj->toData(output);
+}
+
+void SerializationRegistry::serialize(
+    const std::shared_ptr<DataSerializablePrimitive>& obj,
+    DataOutput& output) const {
+  auto id = obj->getDsCode();
+  output.write(static_cast<int8_t>(id));
+
+  serializeWithoutHeader(obj, output);
+}
+
+void SerializationRegistry::serializeWithoutHeader(
+    const std::shared_ptr<DataSerializablePrimitive>& obj,
+    DataOutput& output) const {
+  obj->toData(output);
+}
+
+void SerializationRegistry::serialize(
+    const std::shared_ptr<PdxSerializable>& obj, DataOutput& output) const {
+  output.write(static_cast<int8_t>(DSCode::PDX));
+  serializeWithoutHeader(obj, output);
+}
+
+void SerializationRegistry::serialize(
+    const std::shared_ptr<DataSerializableInternal>& obj,
+    DataOutput& output) const {
+  serializeWithoutHeader(obj, output);
+}
+
+void SerializationRegistry::serializeWithoutHeader(
+    const std::shared_ptr<DataSerializableInternal>& obj,
+    DataOutput& output) const {
+  obj->toData(output);
+}
+
 /** This starts at reading the typeid.. assumes the length has been read. */
 std::shared_ptr<Serializable> SerializationRegistry::deserialize(
     DataInput& input, int8_t typeId) const {
@@ -161,7 +303,7 @@
     case DSCode::PDX: {
       return pdxTypeHandler_->deserialize(input);
     }
-    case DSCode::CacheableEnum: {
+    case DSCode::PDX_ENUM: {
       auto enumObject = CacheableEnum::create(" ", " ", 0);
       enumObject->fromData(input);
       return std::move(enumObject);
@@ -220,7 +362,6 @@
     case DSCode::CacheableASCIIString:
     case DSCode::CacheableASCIIStringHuge:
     case DSCode::CacheableStringHuge:
-    case DSCode::InternalDistributedMember:
       break;
   }
 
@@ -299,12 +440,11 @@
     case DSCode::CacheableASCIIString:
     case DSCode::CacheableASCIIStringHuge:
     case DSCode::CacheableStringHuge:
-    case DSCode::InternalDistributedMember:
-    case DSCode::CacheableEnum:
-    case DSCode::ClientProxyMembershipId:
     case DSCode::CacheableUserData:
+    case DSCode::CacheableUserData2:
     case DSCode::CacheableUserData4:
     case DSCode::PDX:
+    case DSCode::PDX_ENUM:
       throw IllegalStateException("Invalid fixed ID");
   }
 
@@ -414,7 +554,12 @@
 std::shared_ptr<Serializable> SerializationRegistry::GetPDXTypeById(
     Pool* pool, int32_t typeId) const {
   if (auto poolDM = dynamic_cast<ThinClientPoolDM*>(pool)) {
-    return poolDM->GetPDXTypeById(typeId);
+    auto result = poolDM->GetPDXTypeById(typeId);
+    if (result == nullptr) {
+      throw IllegalStateException("Unknown pdx type=" + std::to_string(typeId));
+    }
+
+    return result;
   }
 
   throw IllegalStateException("Pool not found, Pdx operation failed");
@@ -428,6 +573,7 @@
 
   return static_cast<ThinClientPoolDM*>(pool.get())->GetEnumValue(enumInfo);
 }
+
 std::shared_ptr<Serializable> SerializationRegistry::GetEnum(
     std::shared_ptr<Pool> pool, int32_t val) const {
   if (pool == nullptr) {
@@ -592,14 +738,20 @@
 }
 
 void PdxTypeHandler::serialize(
-    const std::shared_ptr<PdxSerializable>& pdxSerializable,
+    const std::shared_ptr<PdxSerializable>& serializable,
     DataOutput& dataOutput) const {
-  PdxHelper::serializePdx(dataOutput, pdxSerializable);
+  auto instance = std::dynamic_pointer_cast<PdxInstanceImpl>(serializable);
+
+  if (instance != nullptr) {
+    PdxHelper::serializePdx(dataOutput, instance.get());
+  } else {
+    PdxHelper::serializePdx(dataOutput, serializable);
+  }
 }
 
 std::shared_ptr<PdxSerializable> PdxTypeHandler::deserialize(
     DataInput& dataInput) const {
-  return PdxHelper::deserializePdx(dataInput, false);
+  return PdxHelper::deserializePdx(dataInput);
 }
 
 void DataSerializableHandler::serialize(
@@ -669,8 +821,7 @@
     case DSCode::CacheableASCIIString:
     case DSCode::CacheableASCIIStringHuge:
     case DSCode::CacheableStringHuge:
-    case DSCode::InternalDistributedMember:
-    case DSCode::CacheableEnum:
+    case DSCode::PDX_ENUM:
     case DSCode::PDX:
       IllegalStateException("Invalid DS Code.");
   }
@@ -680,7 +831,6 @@
     ptr->toDelta(dataOutput);
   } else {
     dataSerializable->toData(dataOutput);
-    ;
   }
 }
 
@@ -746,8 +896,7 @@
     case DSCode::CacheableASCIIString:
     case DSCode::CacheableASCIIStringHuge:
     case DSCode::CacheableStringHuge:
-    case DSCode::InternalDistributedMember:
-    case DSCode::CacheableEnum:
+    case DSCode::PDX_ENUM:
     case DSCode::PDX:
       break;
   }
diff --git a/cppcache/src/SerializationRegistry.hpp b/cppcache/src/SerializationRegistry.hpp
index e8e177c..081b324 100644
--- a/cppcache/src/SerializationRegistry.hpp
+++ b/cppcache/src/SerializationRegistry.hpp
@@ -46,19 +46,21 @@
 namespace std {
 
 template <>
-struct hash<apache::geode::client::internal::DSCode>
-    : public std::unary_function<apache::geode::client::internal::DSCode,
-                                 size_t> {
-  size_t operator()(apache::geode::client::internal::DSCode val) const {
+struct hash<apache::geode::client::internal::DSCode> {
+  using argument_type = apache::geode::client::internal::DSCode;
+  using result_type = std::size_t;
+
+  result_type operator()(argument_type val) const {
     return std::hash<int32_t>{}(static_cast<int32_t>(val));
   }
 };
 
 template <>
-struct hash<apache::geode::client::internal::DSFid>
-    : public std::unary_function<apache::geode::client::internal::DSFid,
-                                 size_t> {
-  size_t operator()(apache::geode::client::internal::DSFid val) const {
+struct hash<apache::geode::client::internal::DSFid> {
+  using argument_type = apache::geode::client::internal::DSFid;
+  using result_type = std::size_t;
+
+  result_type operator()(argument_type val) const {
     return std::hash<int32_t>{}(static_cast<int32_t>(val));
   }
 };
@@ -172,55 +174,11 @@
    * then write whatever the object's toData requires. The length at the
    * front is backfilled after the serialization.
    */
-  inline void serialize(const std::shared_ptr<Serializable>& obj,
-                        DataOutput& output, bool isDelta = false) const {
-    if (obj == nullptr) {
-      output.write(static_cast<int8_t>(DSCode::NullObj));
-    } else if (auto&& pdxSerializable =
-                   std::dynamic_pointer_cast<PdxSerializable>(obj)) {
-      serialize(pdxSerializable, output);
-    } else if (const auto&& dataSerializableFixedId =
-                   std::dynamic_pointer_cast<DataSerializableFixedId>(obj)) {
-      serialize(dataSerializableFixedId, output);
-    } else if (const auto&& dataSerializablePrimitive =
-                   std::dynamic_pointer_cast<DataSerializablePrimitive>(obj)) {
-      serialize(dataSerializablePrimitive, output);
-    } else if (const auto&& dataSerializable =
-                   std::dynamic_pointer_cast<DataSerializable>(obj)) {
-      dataSerializableHandler_->serialize(dataSerializable, output, isDelta);
-    } else if (const auto&& dataSerializableInternal =
-                   std::dynamic_pointer_cast<DataSerializableInternal>(obj)) {
-      serialize(dataSerializableInternal, output);
-    } else {
-      throw UnsupportedOperationException(
-          "SerializationRegistry::serialize: Serialization type not "
-          "implemented.");
-    }
-  }
+  void serialize(const std::shared_ptr<Serializable>& obj, DataOutput& output,
+                 bool isDelta = false) const;
 
-  inline void serializeWithoutHeader(const std::shared_ptr<Serializable>& obj,
-                                     DataOutput& output) const {
-    if (const auto&& pdxSerializable =
-            std::dynamic_pointer_cast<PdxSerializable>(obj)) {
-      serializeWithoutHeader(pdxSerializable, output);
-    } else if (const auto&& dataSerializableFixedId =
-                   std::dynamic_pointer_cast<DataSerializableFixedId>(obj)) {
-      serializeWithoutHeader(dataSerializableFixedId, output);
-    } else if (const auto&& dataSerializablePrimitive =
-                   std::dynamic_pointer_cast<DataSerializablePrimitive>(obj)) {
-      serializeWithoutHeader(dataSerializablePrimitive, output);
-    } else if (const auto&& dataSerializable =
-                   std::dynamic_pointer_cast<DataSerializable>(obj)) {
-      serializeWithoutHeader(dataSerializable, output);
-    } else if (const auto&& dataSerializableInternal =
-                   std::dynamic_pointer_cast<DataSerializableInternal>(obj)) {
-      serializeWithoutHeader(dataSerializableInternal, output);
-    } else {
-      throw UnsupportedOperationException(
-          "SerializationRegistry::serializeWithoutHeader: Serialization type "
-          "not implemented.");
-    }
-  }
+  void serializeWithoutHeader(const std::shared_ptr<Serializable>& obj,
+                              DataOutput& output) const;
 
   /**
    * Read the length, typeid, and run the objs fromData. Returns the New
@@ -263,110 +221,55 @@
   std::shared_ptr<PdxSerializable> getPdxSerializableType(
       const std::string& className) const;
 
-  void setPdxTypeHandler(PdxTypeHandler* handler) {
-    this->pdxTypeHandler_ = std::unique_ptr<PdxTypeHandler>(handler);
-  }
-  void setDataSerializableHandler(DataSerializableHandler* handler) {
-    this->dataSerializableHandler_ =
-        std::unique_ptr<DataSerializableHandler>(handler);
-  }
+  void setPdxTypeHandler(PdxTypeHandler* handler);
 
-  TypeFactoryMethod getDataSerializableCreationMethod(int32_t objectId) {
-    TypeFactoryMethod createType;
-    theTypeMap_.findDataSerializable(objectId, createType);
-    return createType;
-  }
+  void setDataSerializableHandler(DataSerializableHandler* handler);
 
-  int32_t getIdForDataSerializableType(std::type_index objectType) const {
-    auto&& typeIterator = theTypeMap_.typeToClassId_.find(objectType);
-    auto&& id = typeIterator->second;
-    return id;
-  }
+  TypeFactoryMethod getDataSerializableCreationMethod(int32_t objectId);
+
+  int32_t getIdForDataSerializableType(std::type_index objectType) const;
+
+  static DSCode getSerializableDataDsCode(int32_t classId);
+
+ private:
+  std::shared_ptr<Serializable> deserializeDataSerializableFixedId(
+      DataInput& input, DSCode dsCode) const;
+
+  void serialize(const std::shared_ptr<DataSerializableFixedId>& obj,
+                 DataOutput& output) const;
+
+  void serializeWithoutHeader(
+      const std::shared_ptr<DataSerializableFixedId>& obj,
+      DataOutput& output) const;
+
+  void serialize(const std::shared_ptr<DataSerializablePrimitive>& obj,
+                 DataOutput& output) const;
+
+  void serializeWithoutHeader(
+      const std::shared_ptr<DataSerializablePrimitive>& obj,
+      DataOutput& output) const;
+
+  void serialize(const std::shared_ptr<PdxSerializable>& obj,
+                 DataOutput& output) const;
+
+  void serializeWithoutHeader(const std::shared_ptr<PdxSerializable>& obj,
+                              DataOutput& output) const;
+
+  void serialize(const std::shared_ptr<DataSerializableInternal>& obj,
+                 DataOutput& output) const;
+
+  void serializeWithoutHeader(
+      const std::shared_ptr<DataSerializableInternal>& obj,
+      DataOutput& output) const;
+
+  void deserialize(DataInput& input,
+                   const std::shared_ptr<Serializable>& obj) const;
 
  private:
   std::unique_ptr<PdxTypeHandler> pdxTypeHandler_;
   std::shared_ptr<PdxSerializer> pdxSerializer_;
   std::unique_ptr<DataSerializableHandler> dataSerializableHandler_;
   TheTypeMap theTypeMap_;
-
-  std::shared_ptr<Serializable> deserializeDataSerializableFixedId(
-      DataInput& input, DSCode dsCode) const;
-
-  inline void serialize(const std::shared_ptr<DataSerializableFixedId>& obj,
-                        DataOutput& output) const {
-    auto id = static_cast<int32_t>(obj->getDSFID());
-    if (id <= std::numeric_limits<int8_t>::max() &&
-        id >= std::numeric_limits<int8_t>::min()) {
-      output.write(static_cast<int8_t>(DSCode::FixedIDByte));
-      output.write(static_cast<int8_t>(id));
-    } else if (id <= std::numeric_limits<int16_t>::max() &&
-               id >= std::numeric_limits<int16_t>::min()) {
-      output.write(static_cast<int8_t>(DSCode::FixedIDShort));
-      output.writeInt(static_cast<int16_t>(id));
-    } else {
-      output.write(static_cast<int8_t>(DSCode::FixedIDInt));
-      output.writeInt(static_cast<int32_t>(id));
-    }
-
-    serializeWithoutHeader(obj, output);
-  }
-
-  inline void serializeWithoutHeader(
-      const std::shared_ptr<DataSerializableFixedId>& obj,
-      DataOutput& output) const {
-    obj->toData(output);
-  }
-
-  inline void serialize(const std::shared_ptr<DataSerializablePrimitive>& obj,
-                        DataOutput& output) const {
-    auto id = obj->getDsCode();
-    output.write(static_cast<int8_t>(id));
-
-    serializeWithoutHeader(obj, output);
-  }
-
-  inline void serializeWithoutHeader(
-      const std::shared_ptr<DataSerializablePrimitive>& obj,
-      DataOutput& output) const {
-    obj->toData(output);
-  }
-
-  inline void serialize(const std::shared_ptr<PdxSerializable>& obj,
-                        DataOutput& output) const {
-    output.write(static_cast<int8_t>(DSCode::PDX));
-    serializeWithoutHeader(obj, output);
-  }
-
-  void serializeWithoutHeader(const std::shared_ptr<PdxSerializable>& obj,
-                              DataOutput& output) const;
-
-  inline void serialize(const std::shared_ptr<DataSerializableInternal>& obj,
-                        DataOutput& output) const {
-    serializeWithoutHeader(obj, output);
-  }
-
-  inline void serializeWithoutHeader(
-      const std::shared_ptr<DataSerializableInternal>& obj,
-      DataOutput& output) const {
-    obj->toData(output);
-  }
-
- public:
-  static inline DSCode getSerializableDataDsCode(int32_t classId) {
-    if (classId <= std::numeric_limits<int8_t>::max() &&
-        classId >= std::numeric_limits<int8_t>::min()) {
-      return DSCode::CacheableUserData;
-    } else if (classId <= std::numeric_limits<int16_t>::max() &&
-               classId >= std::numeric_limits<int16_t>::min()) {
-      return DSCode::CacheableUserData2;
-    } else {
-      return DSCode::CacheableUserData4;
-    }
-  }
-
- private:
-  void deserialize(DataInput& input,
-                   const std::shared_ptr<Serializable>& obj) const;
 };
 
 }  // namespace client
diff --git a/cppcache/src/ServerLocation.hpp b/cppcache/src/ServerLocation.hpp
index a0ce231..fac42f9 100644
--- a/cppcache/src/ServerLocation.hpp
+++ b/cppcache/src/ServerLocation.hpp
@@ -35,14 +35,13 @@
 namespace geode {
 namespace client {
 
-class APACHE_GEODE_EXPORT ServerLocation
-    : public internal::DataSerializableInternal {
+class ServerLocation : public internal::DataSerializableInternal {
  public:
   ServerLocation(std::string serverName, int port)
       : Serializable(), m_serverName(std::move(serverName)), m_port(port) {
     LOGDEBUG(
         "ServerLocation::ServerLocation(): creating ServerLocation for %s:%d",
-        serverName.c_str(), port);
+        m_serverName.c_str(), port);
     makeEpString();
   }
 
@@ -64,11 +63,6 @@
 
   const std::string& getServerName() const { return m_serverName; }
 
-  void setServername(std::string serverName) {
-    m_serverName = std::move(serverName);
-    makeEpString();
-  }
-
   int getPort() const { return m_port; }
 
   void toData(DataOutput& output) const override {
@@ -88,8 +82,12 @@
     return size;
   }
 
+  std::string toString() const override {
+    return m_serverName + ":" + std::to_string(m_port);
+  }
+
   void printInfo() {
-    LOGDEBUG(" Got Host %s, and port %d", getServerName().c_str(), m_port);
+    LOGDEBUG(" Got Host \"%s\", and port %d", getServerName().c_str(), m_port);
   }
 
   bool operator<(const ServerLocation rhs) const {
diff --git a/cppcache/src/StringPrefixPartitionResolver.cpp b/cppcache/src/StringPrefixPartitionResolver.cpp
new file mode 100644
index 0000000..5a34883
--- /dev/null
+++ b/cppcache/src/StringPrefixPartitionResolver.cpp
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+#include <geode/CacheableKey.hpp>
+#include <geode/EntryEvent.hpp>
+#include <geode/StringPrefixPartitionResolver.hpp>
+
+namespace {
+const char* const DEFAULT_DELIMITER = "|";
+}
+
+namespace apache {
+namespace geode {
+namespace client {
+
+StringPrefixPartitionResolver::StringPrefixPartitionResolver()
+    : StringPrefixPartitionResolver(DEFAULT_DELIMITER) {}
+
+StringPrefixPartitionResolver::StringPrefixPartitionResolver(
+    std::string delimiter)
+    : PartitionResolver(), delimiter_(std::move(delimiter)) {}
+
+const std::string& StringPrefixPartitionResolver::getName() {
+  static std::string name = "StringPrefixPartitionResolver";
+  return name;
+}
+
+std::shared_ptr<CacheableKey> StringPrefixPartitionResolver::getRoutingObject(
+    const EntryEvent& event) {
+  auto&& key = event.getKey();
+  if (key == nullptr) {
+    return {};
+  }
+
+  auto key_str = key->toString();
+  auto pos = key_str.find(delimiter_);
+
+  if (pos == std::string::npos) {
+    throw IllegalArgumentException("The key \"" + key_str +
+                                   "\" does not contains the \"" + delimiter_ +
+                                   "\" delimiter.");
+  }
+
+  return CacheableKey::create(key_str.substr(0, pos));
+}
+
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
diff --git a/cppcache/src/StructSetImpl.hpp b/cppcache/src/StructSetImpl.hpp
index 70c8259..6db8042 100644
--- a/cppcache/src/StructSetImpl.hpp
+++ b/cppcache/src/StructSetImpl.hpp
@@ -33,7 +33,7 @@
 namespace geode {
 namespace client {
 
-class APACHE_GEODE_EXPORT StructSetImpl : public StructSet {
+class StructSetImpl : public StructSet {
  public:
   StructSetImpl(const std::shared_ptr<CacheableVector>& values,
                 const std::vector<std::string>& fieldNames);
diff --git a/cppcache/src/SuspendedTxExpiryHandler.hpp b/cppcache/src/SuspendedTxExpiryHandler.hpp
deleted file mode 100644
index 2e0ed8d..0000000
--- a/cppcache/src/SuspendedTxExpiryHandler.hpp
+++ /dev/null
@@ -1,62 +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.
- */
-
-#pragma once
-
-#ifndef GEODE_SUSPENDEDTXEXPIRYHANDLER_H_
-#define GEODE_SUSPENDEDTXEXPIRYHANDLER_H_
-
-#include <ace/Event_Handler.h>
-
-#include <geode/Cache.hpp>
-#include <geode/internal/geode_globals.hpp>
-
-#include "CacheTransactionManagerImpl.hpp"
-
-namespace apache {
-namespace geode {
-namespace client {
-
-class CacheTransactionManagerImpl;
-
-/**
- * @class SuspendedTxExpiryHandler
- *
- * The task object which contains the handler which gets triggered
- * when a suspended transaction expires.
- *
- */
-class APACHE_GEODE_EXPORT SuspendedTxExpiryHandler : public ACE_Event_Handler {
- public:
-  SuspendedTxExpiryHandler(CacheTransactionManagerImpl* cacheTxMgr,
-                           TransactionId& txid);
-
-  int handle_timeout(const ACE_Time_Value& current_time,
-                     const void* arg) override;
-
-  int handle_close(ACE_HANDLE, ACE_Reactor_Mask) override;
-
- private:
-  CacheTransactionManagerImpl* m_cacheTxMgr;
-  TransactionId& m_txid;
-};
-
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_SUSPENDEDTXEXPIRYHANDLER_H_
diff --git a/cppcache/src/SuspendedTxExpiryHandler.cpp b/cppcache/src/SuspendedTxExpiryTask.cpp
similarity index 66%
rename from cppcache/src/SuspendedTxExpiryHandler.cpp
rename to cppcache/src/SuspendedTxExpiryTask.cpp
index ca69364..17f6e57 100644
--- a/cppcache/src/SuspendedTxExpiryHandler.cpp
+++ b/cppcache/src/SuspendedTxExpiryTask.cpp
@@ -14,25 +14,27 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include "SuspendedTxExpiryHandler.hpp"
+#include "SuspendedTxExpiryTask.hpp"
 
 #include "CacheImpl.hpp"
-#include "ExpiryTaskManager.hpp"
+#include "CacheTransactionManagerImpl.hpp"
 
 namespace apache {
 namespace geode {
 namespace client {
 
-SuspendedTxExpiryHandler::SuspendedTxExpiryHandler(
-    CacheTransactionManagerImpl* cacheTxMgr, TransactionId& tid)
-    : m_cacheTxMgr(cacheTxMgr), m_txid(tid) {}
+SuspendedTxExpiryTask::SuspendedTxExpiryTask(
+    ExpiryTaskManager& expiry_manager, CacheTransactionManagerImpl& tx_manager,
+    TransactionId& tx_id)
+    : ExpiryTask(expiry_manager), tx_manager_(tx_manager), tx_id_(tx_id) {}
 
-int SuspendedTxExpiryHandler::handle_timeout(const ACE_Time_Value&,
-                                             const void*) {
-  LOGDEBUG("Entered SuspendedTxExpiryHandler");
+bool SuspendedTxExpiryTask::on_expire() {
+  LOGDEBUG("Entered SuspendedTxExpiryTask");
   try {
     // resume the transaction and rollback it
-    if (m_cacheTxMgr->tryResume(m_txid, false)) m_cacheTxMgr->rollback();
+    if (tx_manager_.tryResume(tx_id_, false)) {
+      tx_manager_.rollback();
+    }
   } catch (...) {
     // Ignore whatever exception comes
     LOGFINE(
@@ -42,11 +44,6 @@
   return 0;
 }
 
-int SuspendedTxExpiryHandler::handle_close(ACE_HANDLE, ACE_Reactor_Mask) {
-  delete this;
-  return 0;
-}
-
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/SuspendedTxExpiryTask.hpp b/cppcache/src/SuspendedTxExpiryTask.hpp
new file mode 100644
index 0000000..619b251
--- /dev/null
+++ b/cppcache/src/SuspendedTxExpiryTask.hpp
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+#ifndef GEODE_SUSPENDEDTXEXPIRYTASK_H_
+#define GEODE_SUSPENDEDTXEXPIRYTASK_H_
+
+#include <geode/Cache.hpp>
+#include <geode/internal/geode_globals.hpp>
+
+#include "ExpiryTask.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
+class TransactionId;
+class CacheTransactionManagerImpl;
+
+/**
+ * @class SuspendedTxExpiryTask
+ *
+ * The task gets triggered whenever a suspended transaction expires.
+ *
+ */
+class SuspendedTxExpiryTask : public ExpiryTask {
+ public:
+  SuspendedTxExpiryTask(ExpiryTaskManager& expiry_manager,
+                        CacheTransactionManagerImpl& tx_manager,
+                        TransactionId& tx_id);
+
+ protected:
+  bool on_expire() override;
+
+ protected:
+  CacheTransactionManagerImpl& tx_manager_;
+  TransactionId& tx_id_;
+};
+
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+#endif  // GEODE_SUSPENDEDTXEXPIRYTASK_H_
diff --git a/cppcache/src/SystemProperties.cpp b/cppcache/src/SystemProperties.cpp
index a3184c9..ec8e4f0 100644
--- a/cppcache/src/SystemProperties.cpp
+++ b/cppcache/src/SystemProperties.cpp
@@ -23,15 +23,12 @@
 #include <geode/ExceptionTypes.hpp>
 #include <geode/SystemProperties.hpp>
 #include <geode/internal/chrono/duration.hpp>
-#include <geode/internal/geode_globals.hpp>
 
 #include "CppCacheLibrary.hpp"
 #include "util/Log.hpp"
 
 #if defined(_WIN32)
 #include <windows.h>
-#else
-#include <dlfcn.h>
 #endif
 
 namespace {
@@ -134,12 +131,6 @@
 namespace geode {
 namespace client {
 
-namespace impl {
-
-void* getFactoryFunc(const char* lib, const char* funcName);
-
-}  // namespace impl
-
 SystemProperties::SystemProperties(
     const std::shared_ptr<Properties>& propertiesPtr,
     const std::string& configFile)
@@ -191,8 +182,10 @@
    public:
     explicit ProcessPropsVisitor(SystemProperties* sysProps)
         : m_sysProps(sysProps) {}
+    ~ProcessPropsVisitor() noexcept override = default;
+
     void visit(const std::shared_ptr<CacheableKey>& key,
-               const std::shared_ptr<Cacheable>& value) {
+               const std::shared_ptr<Cacheable>& value) override {
       auto property = key->toString();
       std::string val;
       if (value != nullptr) {
diff --git a/cppcache/src/TXCommitMessage.cpp b/cppcache/src/TXCommitMessage.cpp
index bb1716b..2d35bde 100644
--- a/cppcache/src/TXCommitMessage.cpp
+++ b/cppcache/src/TXCommitMessage.cpp
@@ -18,8 +18,8 @@
 #include "TXCommitMessage.hpp"
 
 #include <algorithm>
-#include <vector>
 
+#include <geode/DataInput.hpp>
 #include <geode/DataOutput.hpp>
 
 #include "ClientProxyMembershipID.hpp"
@@ -32,11 +32,7 @@
 
 TXCommitMessage::TXCommitMessage(
     MemberListForVersionStamp& memberListForVersionStamp)
-    : m_memberListForVersionStamp(memberListForVersionStamp)
-// UNUSED : m_processorId(0)
-{}
-
-bool TXCommitMessage::isAckRequired() { return false; }
+    : memberListForVersionStamp_(memberListForVersionStamp) {}
 
 void TXCommitMessage::fromData(DataInput& input) {
   // read and ignore pId
@@ -56,7 +52,7 @@
   input.readInt32();
 
   // ignore farsideBaseMembershipId
-  auto ignoreLength = input.readArrayLength();
+  const auto ignoreLength = input.readArrayLength();
   if (ignoreLength > 0) {
     input.advanceCursor(ignoreLength);
   }
@@ -65,18 +61,19 @@
   input.readInt64();  // ignore seqId
 
   input.readBoolean();  // ignore needsLargeModCount
+  input.readBoolean();  // ignore shadow keys flag
 
-  auto regionSize = input.readInt32();
+  const auto regionSize = input.readInt32();
   for (int32_t i = 0; i < regionSize; i++) {
-    auto rc = std::make_shared<RegionCommit>(m_memberListForVersionStamp);
+    auto rc = std::make_shared<RegionCommit>(memberListForVersionStamp_);
     rc->fromData(input);
-    m_regions.push_back(rc);
+    regions_.push_back(rc);
   }
 
-  const auto fixedId = static_cast<const DSCode>(input.read());
-  if (fixedId == DSCode::FixedIDByte) {
-    const auto dscode = static_cast<const DSCode>(input.read());
-    if (dscode == DSCode::ClientProxyMembershipId) {
+  const auto dsCode = static_cast<const DSCode>(input.read());
+  if (dsCode == DSCode::FixedIDByte) {
+    const auto fixedId = static_cast<const DSFid>(input.read());
+    if (fixedId == DSFid::ClientProxyMembershipId) {
       ClientProxyMembershipID memId1;
 
       input.advanceCursor(input.readArrayLength());
@@ -84,25 +81,23 @@
       input.readInt32();
     } else {
       LOGERROR("TXCommitMessage::fromData Unexpected type id: %" PRId8
-               "while "
-               "desirializing commit response",
-               dscode);
+               "while deserializing commit response",
+               fixedId);
       GfErrTypeThrowException(
           "TXCommitMessage::fromData Unable to handle commit response",
           GF_CACHE_ILLEGAL_STATE_EXCEPTION);
     }
-  } else if (fixedId != DSCode::NullObj) {
+  } else if (dsCode != DSCode::NullObj) {
     LOGERROR("TXCommitMessage::fromData Unexpected type id: %" PRId8
-             "while desirializing "
-             "commit response",
-             fixedId);
+             "while deserializing commit response",
+             dsCode);
     GfErrTypeThrowException(
         "TXCommitMessage::fromData Unable to handle commit response",
         GF_CACHE_ILLEGAL_STATE_EXCEPTION);
   }
 
-  int32_t len = input.readArrayLength();
-  for (int j = 0; j < len; j++) {
+  const auto len = input.readArrayLength();
+  for (int32_t j = 0; j < len; j++) {
     std::shared_ptr<Cacheable> tmp;
     input.readObject(tmp);
   }
@@ -116,11 +111,8 @@
 }
 
 void TXCommitMessage::apply(Cache* cache) {
-  for (std::vector<std::shared_ptr<RegionCommit>>::iterator iter =
-           m_regions.begin();
-       m_regions.end() != iter; iter++) {
-    auto regionCommit = std::static_pointer_cast<RegionCommit>(*iter);
-    regionCommit->apply(cache);
+  for (const auto& region : regions_) {
+    region->apply(cache);
   }
 }
 
diff --git a/cppcache/src/TXCommitMessage.hpp b/cppcache/src/TXCommitMessage.hpp
index d8dbecc..b527192 100644
--- a/cppcache/src/TXCommitMessage.hpp
+++ b/cppcache/src/TXCommitMessage.hpp
@@ -20,8 +20,10 @@
 #ifndef GEODE_TXCOMMITMESSAGE_H_
 #define GEODE_TXCOMMITMESSAGE_H_
 
-#include <geode/DataInput.hpp>
-#include <geode/internal/geode_globals.hpp>
+#include <memory>
+#include <vector>
+
+#include <geode/internal/DataSerializableFixedId.hpp>
 
 #include "RegionCommit.hpp"
 
@@ -29,27 +31,29 @@
 namespace geode {
 namespace client {
 
-class TXCommitMessage
-    : public DataSerializableFixedId_t<DSFid::TXCommitMessage> {
+class MemberListForVersionStamp;
+class DataInput;
+class DataOutput;
+class Cache;
+
+class TXCommitMessage : public internal::DataSerializableFixedId_t<
+                            internal::DSFid::TXCommitMessage> {
  public:
   explicit TXCommitMessage(
       MemberListForVersionStamp& memberListForVersionStamp);
-  ~TXCommitMessage() override = default;
+  ~TXCommitMessage() noexcept override = default;
 
   void fromData(DataInput& input) override;
   void toData(DataOutput& output) const override;
 
   static std::shared_ptr<Serializable> create(
       MemberListForVersionStamp& memberListForVersionStamp);
-  //	VectorOfEntryEvent getEvents(Cache* cache);
 
   void apply(Cache* cache);
 
  private:
-  // UNUSED int32_t m_processorId;
-  bool isAckRequired();
-  MemberListForVersionStamp& m_memberListForVersionStamp;
-  std::vector<std::shared_ptr<RegionCommit>> m_regions;
+  MemberListForVersionStamp& memberListForVersionStamp_;
+  std::vector<std::shared_ptr<RegionCommit>> regions_;
 };
 
 }  // namespace client
diff --git a/cppcache/src/TXId.cpp b/cppcache/src/TXId.cpp
index 3b8cc90..43052ce 100644
--- a/cppcache/src/TXId.cpp
+++ b/cppcache/src/TXId.cpp
@@ -14,12 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-/*
- * TXId.cpp
- *
- *  Created on: 07-Feb-2011
- *      Author: ankurs
- */
 
 #include "TXId.hpp"
 
@@ -27,16 +21,34 @@
 namespace geode {
 namespace client {
 
-std::atomic<int32_t> TXId::m_transactionId(1);
+std::atomic<int32_t> TXId::m_transactionId(0);
 
-TXId::TXId() : m_TXId(m_transactionId++) {}
+TXId::TXId() {
+  // If m_transactionId has reached maximum value, then start again
+  // from zero, and increment by one until first unused value is found.
+  // This is done to avoid overflow of m_transactionId to negative value.
+  auto current = m_transactionId.load();
+  decltype(current) next;
+  do {
+    next = std::numeric_limits<decltype(current)>::max() == current
+               ? 1
+               : current + 1;
+  } while (!m_transactionId.compare_exchange_strong(current, next));
+  m_TXId = next;
+}
 
 TXId& TXId::operator=(const TXId& other) {
   m_TXId = other.m_TXId;
   return *this;
 }
 
-TXId::~TXId() {}
+// This method is only for testing and should not be used for any
+// other purpose. See TXIdTest.cpp for more details.
+void TXId::setInitalTransactionIDValue(int32_t newTransactionID) {
+  m_transactionId.exchange(newTransactionID);
+}
+
+TXId::~TXId() noexcept = default;
 
 int32_t TXId::getId() { return m_TXId; }
 }  // namespace client
diff --git a/cppcache/src/TXId.hpp b/cppcache/src/TXId.hpp
index 2f2d280..35e06bf 100644
--- a/cppcache/src/TXId.hpp
+++ b/cppcache/src/TXId.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_TXID_H_
-#define GEODE_TXID_H_
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -19,12 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-/*
- * TXId.h
- *
- *  Created on: 07-Feb-2011
- *      Author: ankurs
- */
+
+#pragma once
+
+#ifndef GEODE_TXID_H_
+#define GEODE_TXID_H_
 
 #include <atomic>
 
@@ -41,10 +35,14 @@
 
   TXId& operator=(const TXId&);
 
-  virtual ~TXId();
+  ~TXId() noexcept override;
 
   int32_t getId();
 
+  // This method is only for testing and should not be used for any
+  // other purpose. See TXIdTest.cpp for more details.
+  static void setInitalTransactionIDValue(int32_t);
+
  private:
   int32_t m_TXId;
   static std::atomic<int32_t> m_transactionId;
diff --git a/cppcache/src/TXState.cpp b/cppcache/src/TXState.cpp
index 4ad6358..8e53e25 100644
--- a/cppcache/src/TXState.cpp
+++ b/cppcache/src/TXState.cpp
@@ -20,6 +20,7 @@
 #include <geode/Cache.hpp>
 #include <geode/CacheTransactionManager.hpp>
 
+#include "CacheImpl.hpp"
 #include "ThinClientPoolDM.hpp"
 #include "TransactionalOperation.hpp"
 #include "TssConnectionWrapper.hpp"
diff --git a/cppcache/src/TXState.hpp b/cppcache/src/TXState.hpp
index 1e51ae7..69015f2 100644
--- a/cppcache/src/TXState.hpp
+++ b/cppcache/src/TXState.hpp
@@ -53,11 +53,10 @@
 
   ThinClientPoolDM* getPoolDM() { return m_pooldm; }
   void setPoolDM(ThinClientPoolDM* dm) { m_pooldm = dm; }
-  void setSuspendedExpiryTaskId(
-      ExpiryTaskManager::id_type suspendedExpiryTaskId) {
+  void setSuspendedExpiryTaskId(ExpiryTask::id_t suspendedExpiryTaskId) {
     m_suspendedExpiryTaskId = suspendedExpiryTaskId;
   }
-  ExpiryTaskManager::id_type getSuspendedExpiryTaskId() {
+  ExpiryTask::id_t getSuspendedExpiryTaskId() {
     return m_suspendedExpiryTaskId;
   }
 
@@ -84,7 +83,7 @@
   std::vector<std::shared_ptr<TransactionalOperation>> m_operations;
   CacheImpl* m_cache;
   ThinClientPoolDM* m_pooldm;
-  ExpiryTaskManager::id_type m_suspendedExpiryTaskId;
+  ExpiryTask::id_t m_suspendedExpiryTaskId;
   class ReplayControl {
    public:
     explicit ReplayControl(TXState* txState) : m_txState(txState) {
diff --git a/cppcache/src/TableOfPrimes.hpp b/cppcache/src/TableOfPrimes.hpp
index dc6a975..6a676b8 100644
--- a/cppcache/src/TableOfPrimes.hpp
+++ b/cppcache/src/TableOfPrimes.hpp
@@ -49,7 +49,7 @@
  *  A sampling of primes are used from 0 to 1 million. Not every prime is
  *  necessary, as the map scales, little steps are usually uninteresting.
  */
-class APACHE_GEODE_EXPORT TableOfPrimes {
+class TableOfPrimes {
  public:
   inline static uint32_t getPrimeLength() { return g_primeLen; }
 
diff --git a/cppcache/src/Task.hpp b/cppcache/src/Task.hpp
index a86783d..1ff0931 100644
--- a/cppcache/src/Task.hpp
+++ b/cppcache/src/Task.hpp
@@ -26,6 +26,7 @@
 
 #include "AppDomainContext.hpp"
 #include "DistributedSystemImpl.hpp"
+#include "./util/Log.hpp"
 
 namespace apache {
 namespace geode {
@@ -68,7 +69,7 @@
   }
 
   inline void svc(void) {
-    DistributedSystemImpl::setThreadName(threadName_);
+    Log::setThreadName(threadName_);
 
     if (appDomainContext_) {
       appDomainContext_->run(
diff --git a/cppcache/src/TcpConn.cpp b/cppcache/src/TcpConn.cpp
index d6e709e..e279870 100644
--- a/cppcache/src/TcpConn.cpp
+++ b/cppcache/src/TcpConn.cpp
@@ -17,253 +17,376 @@
 
 #include "TcpConn.hpp"
 
-#include <thread>
+#include <iomanip>
+#include <iostream>
 
-#include <ace/SOCK_Connector.h>
-#include <boost/interprocess/mapped_region.hpp>
-
-#include <geode/ExceptionTypes.hpp>
-#include <geode/internal/chrono/duration.hpp>
+#include <boost/optional.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/system/system_error.hpp>
 
 #include "util/Log.hpp"
 
+namespace {
+template <int Level, int Name>
+class timeval {
+ public:
+  // This is not an instance of the template, but of the system provided type
+  // to be written to the socket API.
+#if defined(_WINDOWS)
+  using value_type = DWORD;
+#else
+  using value_type = ::timeval;
+#endif
+
+ private:
+  value_type value_{};
+
+ public:
+  timeval() {}
+
+  explicit timeval(value_type v) : value_(v) {}
+
+  timeval &operator=(value_type v) {
+    value_ = v;
+    return *this;
+  }
+
+  value_type value() const { return value_; }
+
+  template <typename Protocol>
+  int level(const Protocol &) const {
+    return Level;
+  }
+
+  template <typename Protocol>
+  int name(const Protocol &) const {
+    return Name;
+  }
+
+  template <typename Protocol>
+  value_type *data(const Protocol &) {
+    return &value_;
+  }
+
+  template <typename Protocol>
+  const value_type *data(const Protocol &) const {
+    return &value_;
+  }
+
+  template <typename Protocol>
+  std::size_t size(const Protocol &) const {
+    return sizeof(value_);
+  }
+
+  template <typename Protocol>
+  void resize(const Protocol &, std::size_t s) {
+    if (s != sizeof(value_)) {
+      throw std::length_error("timeval socket option resize");
+    }
+  }
+};
+
+// Asio doesn't support these socket options directly, but every major platform
+// does. Timeout on IO socket operations are supported by the platform directly.
+// This means We can all receive without needing to use the timeout interface -
+// and more importantly, we can send while holding to per-operation time
+// constraints and without blocking indefinitely.
+//
+// The default timeout is infinite, or by setting the socket option to null,
+// which I won't provide - just don't construct a TcpConn with send and
+// receieve timeouts.
+typedef timeval<SOL_SOCKET, SO_SNDTIMEO> send_timeout;
+typedef timeval<SOL_SOCKET, SO_RCVTIMEO> receive_timeout;
+}  // namespace
+
 namespace apache {
 namespace geode {
 namespace client {
+TcpConn::TcpConn(const std::string ipaddr,
+                 std::chrono::microseconds connect_timeout,
+                 int32_t maxBuffSizePool)
+    : TcpConn{
+          ipaddr.substr(0, ipaddr.find(':')),
+          static_cast<uint16_t>(std::stoi(ipaddr.substr(ipaddr.find(':') + 1))),
+          connect_timeout, maxBuffSizePool} {}
 
-const size_t TcpConn::kChunkSize = TcpConn::getDefaultChunkSize();
+TcpConn::TcpConn(const std::string host, uint16_t port,
+                 std::chrono::microseconds timeout, int32_t maxBuffSizePool)
+    : socket_{io_context_} {
+  auto results = resolve(host, port);
 
-void TcpConn::clearNagle(ACE_HANDLE sock) {
-  int32_t val = 1;
+  // We must connect first so we have a valid file descriptor to set options
+  // on.
+  connect(results, timeout);
 
-  if (0 != ACE_OS::setsockopt(sock, IPPROTO_TCP, 1,
-                              reinterpret_cast<const char*>(&val),
-                              sizeof(val))) {
-    int32_t lastError = ACE_OS::last_error();
-    LOGERROR("Failed to set TCP_NODELAY on socket. Errno: %d: %s", lastError,
-             ACE_OS::strerror(lastError));
-  }
+  socket_.set_option(::boost::asio::ip::tcp::no_delay{true});
+  socket_.set_option(
+      ::boost::asio::socket_base::send_buffer_size{maxBuffSizePool});
+  socket_.set_option(
+      ::boost::asio::socket_base::receive_buffer_size{maxBuffSizePool});
 }
 
-int32_t TcpConn::maxSize(ACE_HANDLE sock, int32_t flag, int32_t size) {
-  int32_t val = 0;
-
-  int32_t inc = 32120;
-  val = size - (3 * inc);
-  if (val < 0) val = 0;
-  if (size == 0) size = maxBuffSizePool_;
-  int32_t red = 0;
-  int32_t lastRed = -1;
-  while (lastRed != red) {
-    lastRed = red;
-    val += inc;
-    if (0 != ACE_OS::setsockopt(sock, SOL_SOCKET, flag,
-                                reinterpret_cast<const char*>(&val),
-                                sizeof(val))) {
-      int32_t lastError = ACE_OS::last_error();
-      LOGERROR("Failed to set socket options. Errno: %d : %s ", lastError,
-               ACE_OS::strerror(lastError));
-    }
-    int plen = sizeof(val);
-    if (0 != ACE_OS::getsockopt(sock, SOL_SOCKET, flag,
-                                reinterpret_cast<char*>(&val), &plen)) {
-      int32_t lastError = ACE_OS::last_error();
-      LOGERROR(
-          "Failed to get buffer size for flag %d on socket. Errno: %d : %s",
-          flag, lastError, ACE_OS::strerror(lastError));
-    }
-#ifdef _LINUX
-    val /= 2;
-#endif
-    if ((val >= maxBuffSizePool_) || (val >= size)) continue;
-    red = val;
-  }
-  return val;
-}
-
-void TcpConn::createSocket(ACE_HANDLE sock) {
-  LOGDEBUG("Creating plain socket stream");
-  stream_ = std::unique_ptr<ACE_SOCK_Stream>(new ACE_SOCK_Stream(sock));
-}
-
-void TcpConn::init() {
-#ifdef WITH_IPV6
-  ACE_HANDLE sock = ACE_OS::socket(inetAddress_.get_type(), SOCK_STREAM, 0);
+TcpConn::TcpConn(const std::string ipaddr,
+                 std::chrono::microseconds connect_timeout,
+                 int32_t maxBuffSizePool, std::chrono::microseconds send_time,
+                 std::chrono::microseconds receive_time)
+    : TcpConn{ipaddr, connect_timeout, maxBuffSizePool} {
+#if defined(_WINDOWS)
+  socket_.set_option(::send_timeout{static_cast<DWORD>(send_time.count())});
+  socket_.set_option(
+      ::receive_timeout{static_cast<DWORD>(receive_time.count())});
 #else
-  ACE_HANDLE sock = ACE_OS::socket(AF_INET, SOCK_STREAM, 0);
+
+  auto send_seconds =
+      std::chrono::duration_cast<std::chrono::seconds>(send_time);
+  auto send_microseconds =
+      send_time % std::chrono::duration_cast<std::chrono::microseconds>(
+                      std::chrono::seconds{1});
+  socket_.set_option(
+      ::send_timeout{{static_cast<int>(send_seconds.count()),
+                      static_cast<int>(send_microseconds.count())}});
+
+  auto receive_seconds =
+      std::chrono::duration_cast<std::chrono::seconds>(receive_time);
+  auto receive_microseconds =
+      receive_time % std::chrono::duration_cast<std::chrono::microseconds>(
+                         std::chrono::seconds{1});
+  socket_.set_option(
+      ::receive_timeout{{static_cast<int>(receive_seconds.count()),
+                         static_cast<int>(receive_microseconds.count())}});
 #endif
-  if (sock == ACE_INVALID_HANDLE) {
-    int32_t lastError = ACE_OS::last_error();
-    LOGERROR("Failed to create socket. Errno: %d: %s", lastError,
-             ACE_OS::strerror(lastError));
-    char msg[256];
-    std::snprintf(msg, 256, "TcpConn::connect failed with errno: %d: %s",
-                  lastError, ACE_OS::strerror(lastError));
-    throw GeodeIOException(msg);
-  }
-
-  clearNagle(sock);
-
-  int32_t readSize = 0;
-  int32_t writeSize = 0;
-  int32_t originalReadSize = readSize;
-  readSize = maxSize(sock, SO_SNDBUF, readSize);
-  if (originalReadSize != readSize) {
-    // This should get logged once at startup and again only if it changes
-    LOGFINEST("Using socket send buffer size of %d.", readSize);
-  }
-  int32_t originalWriteSize = writeSize;
-  writeSize = maxSize(sock, SO_RCVBUF, writeSize);
-  if (originalWriteSize != writeSize) {
-    // This should get logged once at startup and again only if it changes
-    LOGFINEST("Using socket receive buffer size of %d.", writeSize);
-  }
-
-  createSocket(sock);
-
-  connect();
 }
 
-TcpConn::TcpConn(const std::string& address,
-                 std::chrono::microseconds waitSeconds, int32_t maxBuffSizePool)
-    : stream_(nullptr),
-      maxBuffSizePool_(maxBuffSizePool),
-      inetAddress_(address.c_str()),
-      endpoint_(address),
-      timeout_(waitSeconds) {}
+TcpConn::~TcpConn() {
+  try {
+    LOGFINE("Disconnected %s:%u -> %s:%u",
+            socket_.local_endpoint().address().to_string().c_str(),
+            socket_.local_endpoint().port(),
+            socket_.remote_endpoint().address().to_string().c_str(),
+            socket_.remote_endpoint().port());
+    socket_.shutdown(boost::asio::ip::tcp::socket::shutdown_both);
 
-TcpConn::TcpConn(const std::string& hostname, uint16_t port,
-                 std::chrono::microseconds waitSeconds, int32_t maxBuffSizePool)
-    : stream_(nullptr),
-      maxBuffSizePool_(maxBuffSizePool),
-      inetAddress_(port, hostname.c_str()),
-      endpoint_(hostname + ":" + std::to_string(port)),
-      timeout_(waitSeconds) {}
+  } catch (...) {
+    LOGFINE("Closed socket %s:%u ",
+            socket_.local_endpoint().address().to_string().c_str(),
+            socket_.local_endpoint().port());
+  }
 
-void TcpConn::connect() {
-  using apache::geode::internal::chrono::duration::to_string;
+  socket_.close();
+}
 
-  ACE_OS::signal(SIGPIPE, SIG_IGN);  // Ignore broken pipe
+size_t TcpConn::receive(char *buff, const size_t len,
+                        std::chrono::milliseconds timeout) {
+  LOGDEBUG("Receiving %d bytes from %s:%u -> %s:%u", len,
+           socket_.remote_endpoint().address().to_string().c_str(),
+           socket_.remote_endpoint().port(),
+           socket_.local_endpoint().address().to_string().c_str(),
+           socket_.local_endpoint().port());
+  return receive(buff, len, timeout, true);
+}
 
-  LOGFINER("Connecting plain socket stream to " + endpoint_ + " waiting " +
-           to_string(timeout_));
+size_t TcpConn::receive_nothrowiftimeout(char *buff, const size_t len,
+                                         std::chrono::milliseconds timeout) {
+  LOGDEBUG("Receiving an unknown number of bytes from %s:%d -> %s:%d",
+           socket_.remote_endpoint().address().to_string().c_str(),
+           socket_.remote_endpoint().port(),
+           socket_.local_endpoint().address().to_string().c_str(),
+           socket_.local_endpoint().port());
+  return receive(buff, len, timeout, false);
+}
 
-  const ACE_Time_Value aceTimeout(timeout_);
-  const auto timeout =
-      (timeout_ > std::chrono::microseconds::zero()) ? &aceTimeout : nullptr;
-  if (ACE_SOCK_Connector{}.connect(*stream_, inetAddress_, timeout) == -1) {
-    const auto lastError = ACE_OS::last_error();
-    if (lastError == ETIME || lastError == ETIMEDOUT) {
-      throw TimeoutException(
-          "TcpConn::connect Attempt to connect timed out after " +
-          to_string(timeout_) + ".");
+size_t TcpConn::receive(char *buff, const size_t len,
+                        std::chrono::milliseconds timeout,
+                        bool throwTimeoutException) {
+  boost::optional<boost::system::error_code> read_result;
+  std::size_t bytes_read = 0;
+
+  auto beforeReadPoint = std::chrono::system_clock::now();
+
+  try {
+    prepareAsyncRead(buff, len, read_result, bytes_read);
+    io_context_.restart();
+    io_context_.run_for(timeout);
+  } catch (...) {
+    LOGDEBUG("Throwing an unexpected read exception");
+    throw;
+  }
+
+  if (read_result && *read_result) {
+    LOGDEBUG("Throwing a read exception: %s", read_result->message().c_str());
+    socket_.cancel();
+    // Get the abort
+    io_context_.restart();
+    io_context_.run();
+    throw boost::system::system_error{*read_result};
+  }
+
+  if (bytes_read == 0) {
+    auto elapsedTime = std::chrono::duration<double, std::micro>(
+        std::chrono::system_clock::now() - beforeReadPoint);
+    if (elapsedTime < timeout) {
+      LOGDEBUG("Throwing an IO exception");
+      socket_.cancel();
+      // Get the abort
+      io_context_.restart();
+      io_context_.run();
+      throw boost::system::system_error{boost::asio::error::broken_pipe};
+    } else {
+      LOGDEBUG("Throwing an eof exception");
+      socket_.cancel();
+      // Get the abort
+      io_context_.restart();
+      io_context_.run();
+      throw boost::system::system_error{boost::asio::error::eof};
     }
-    close();
-    throw GeodeIOException("TcpConn::connect failed with errno: " +
-                           ACE_errno_to_string(lastError));
   }
 
-  if (stream_->enable(ACE_NONBLOCK)) {
-    LOGINFO("TcpConn::NONBLOCK: " + ACE_errno_to_string(ACE_OS::last_error()));
+  if (bytes_read != len && throwTimeoutException) {
+    LOGDEBUG("Throwing a read timeout exception");
+    socket_.cancel();
+    // Get the abort
+    io_context_.restart();
+    io_context_.run();
+    throw boost::system::system_error{boost::asio::error::operation_aborted};
   }
+
+  return bytes_read;
 }
 
-void TcpConn::close() {
-  if (stream_) {
-    stream_->close();
-    stream_ = nullptr;
+size_t TcpConn::send(const char *buff, const size_t len,
+                     std::chrono::milliseconds timeout) {
+  LOGDEBUG("Sending %d bytes from %s:%u -> %s:%u", len,
+           socket_.local_endpoint().address().to_string().c_str(),
+           socket_.local_endpoint().port(),
+           socket_.remote_endpoint().address().to_string().c_str(),
+           socket_.remote_endpoint().port());
+
+  boost::optional<boost::system::error_code> write_result;
+  std::size_t bytes_written = 0;
+
+  try {
+    prepareAsyncWrite(buff, len, write_result, bytes_written);
+    io_context_.restart();
+    io_context_.run_for(timeout);
+  } catch (...) {
+    LOGDEBUG("Throwing an unexpected write exception");
+    throw;
   }
-}
 
-size_t TcpConn::receive(char* buff, size_t len,
-                        std::chrono::microseconds waitSeconds) {
-  return socketOp(SOCK_READ, buff, len, waitSeconds);
-}
-
-size_t TcpConn::send(const char* buff, size_t len,
-                     std::chrono::microseconds waitSeconds) {
-  return socketOp(SOCK_WRITE, const_cast<char*>(buff), len, waitSeconds);
-}
-
-size_t TcpConn::socketOp(TcpConn::SockOp op, char* buff, size_t len,
-                         std::chrono::microseconds waitDuration) {
-  {
-    ACE_Time_Value waitTime(waitDuration);
-    auto endTime = std::chrono::steady_clock::now() + waitDuration;
-    size_t readLen = 0;
-    ssize_t retVal;
-    bool errnoSet = false;
-
-    size_t totalsend = 0;
-    while (len > 0 && waitTime > ACE_Time_Value::zero) {
-      size_t sendlen;
-      if (len > kChunkSize) {
-        sendlen = kChunkSize;
-        len -= kChunkSize;
-      } else {
-        sendlen = len;
-        len = 0;
-      }
-      do {
-        retVal = doOperation(op, buff, sendlen, waitTime, readLen);
-        sendlen -= readLen;
-        totalsend += readLen;
-        if (retVal < 0) {
-          int32_t lastError = ACE_OS::last_error();
-          if (lastError == EAGAIN) {
-            std::this_thread::sleep_for(std::chrono::microseconds(100));
-          } else {
-            errnoSet = true;
-            break;
-          }
-        } else if (retVal == 0 && readLen == 0) {
-          ACE_OS::last_error(EPIPE);
-          errnoSet = true;
-          break;
-        }
-
-        buff += readLen;
-        if (sendlen == 0) break;
-        waitTime = endTime - std::chrono::steady_clock::now();
-        if (waitTime <= ACE_Time_Value::zero) break;
-      } while (sendlen > 0);
-      if (errnoSet) break;
-    }
-
-    if (len > 0 && !errnoSet) {
-      ACE_OS::last_error(ETIME);
-    }
-
-    return totalsend;
+  if (write_result && *write_result) {
+    LOGDEBUG("Throwing a write exception. %s", write_result->message().c_str());
+    throw boost::system::system_error{*write_result};
   }
-}
-ssize_t TcpConn::doOperation(const TcpConn::SockOp& op, void* buff,
-                             size_t sendlen, ACE_Time_Value& waitTime,
-                             size_t& readLen) const {
-  if (op == SOCK_READ) {
-    return stream_->recv_n(buff, sendlen, &waitTime, &readLen);
-  } else {
-    return stream_->send_n(buff, sendlen, &waitTime, &readLen);
+
+  if (bytes_written != len) {
+    LOGDEBUG("Throwing a write timeout exception");
+    socket_.cancel();
+    // Get the abort
+    io_context_.restart();
+    io_context_.run();
+    throw boost::system::system_error{boost::asio::error::operation_aborted};
   }
+
+  return bytes_written;
 }
 
 //  Return the local port for this TCP connection.
-uint16_t TcpConn::getPort() {
-  ACE_INET_Addr localAddr;
-  stream_->get_local_addr(localAddr);
-  return localAddr.get_port_number();
-}
+uint16_t TcpConn::getPort() { return socket_.local_endpoint().port(); }
 
-size_t TcpConn::getDefaultChunkSize() {
-  //
-  auto pageSize = boost::interprocess::mapped_region::get_page_size();
-  if (pageSize > 16000000) {
-    return 16000000;
-  } else if (pageSize > 0) {
-    return pageSize + (16000000 / pageSize) * pageSize;
+void TcpConn::connect(boost::asio::ip::tcp::resolver::results_type r,
+                      std::chrono::microseconds timeout) {
+  boost::optional<boost::system::error_code> connect_result;
+
+  try {
+    // We must connect first so we have a valid file descriptor to set
+    // options on.
+    boost::asio::async_connect(
+        socket_, r,
+        [&connect_result](const boost::system::error_code &ec,
+                          const boost::asio::ip::tcp::endpoint) {
+          connect_result = ec;
+        });
+
+    io_context_.restart();
+    io_context_.run_for(timeout);
+  } catch (...) {
+    LOGDEBUG("Throwing an unexpected connect exception");
+    throw;
   }
 
-  return 16000000;
+  if (connect_result && *connect_result) {
+    LOGDEBUG("Throwing a connect exception: %s",
+             connect_result->message().c_str());
+    throw boost::system::system_error{*connect_result};
+  }
+
+  if (!connect_result) {
+    LOGDEBUG("Throwing a connect timeout exception");
+    throw boost::system::system_error{boost::asio::error::operation_aborted};
+  }
+
+  LOGDEBUG("Connected %s:%u -> %s:%u",
+           socket_.local_endpoint().address().to_string().c_str(),
+           socket_.local_endpoint().port(),
+           socket_.remote_endpoint().address().to_string().c_str(),
+           socket_.remote_endpoint().port());
+}
+
+boost::asio::ip::tcp::resolver::results_type TcpConn::resolve(
+    const std::string host, uint16_t port) {
+  boost::system::error_code resolve_result;
+  boost::asio::ip::tcp::resolver::results_type results;
+
+  boost::asio::ip::tcp::resolver resolver(io_context_);
+  results = resolver.resolve(host, std::to_string(port), resolve_result);
+
+  if (resolve_result) {
+    LOGDEBUG("Throwing a resolve exception: %s",
+             resolve_result.message().c_str());
+    throw boost::system::system_error{resolve_result};
+  }
+
+  return results;
+}
+
+void TcpConn::prepareAsyncRead(
+    char *buff, size_t len,
+    boost::optional<boost::system::error_code> &read_result,
+    std::size_t &bytes_read) {
+  boost::asio::async_read(
+      socket_, boost::asio::buffer(buff, len),
+      [&read_result, &bytes_read](const boost::system::error_code &ec,
+                                  const size_t n) {
+        bytes_read = n;
+
+        // EOF itself occurs when there is no data available on the socket at
+        // the time of the read. It may simply imply data has yet to arrive.
+        // Do nothing. Defer to timeout rather than assume a broken
+        // connection.
+        if (ec != boost::asio::error::eof &&
+            ec != boost::asio::error::try_again) {
+          read_result = ec;
+          return;
+        }
+      });
+}
+
+void TcpConn::prepareAsyncWrite(
+    const char *buff, size_t len,
+    boost::optional<boost::system::error_code> &write_result,
+    std::size_t &bytes_written) {
+  boost::asio::async_write(
+      socket_, boost::asio::buffer(buff, len),
+      [&write_result, &bytes_written](const boost::system::error_code &ec,
+                                      const size_t n) {
+        bytes_written = n;
+
+        if (ec != boost::asio::error::eof &&
+            ec != boost::asio::error::try_again) {
+          write_result = ec;
+          return;
+        }
+      });
 }
 
 }  // namespace client
diff --git a/cppcache/src/TcpConn.hpp b/cppcache/src/TcpConn.hpp
index ed7d406..028214f 100644
--- a/cppcache/src/TcpConn.hpp
+++ b/cppcache/src/TcpConn.hpp
@@ -20,10 +20,8 @@
 #ifndef GEODE_TCPCONN_H_
 #define GEODE_TCPCONN_H_
 
-#include <chrono>
-#include <memory>
-
-#include <ace/SOCK_Stream.h>
+#include <boost/asio.hpp>
+#include <boost/optional.hpp>
 
 #include <geode/internal/geode_globals.hpp>
 
@@ -32,62 +30,49 @@
 namespace apache {
 namespace geode {
 namespace client {
-
-inline std::string ACE_errno_to_string(decltype(ACE_OS::last_error()) error) {
-  return std::to_string(error) + ": " + ACE_OS::strerror(error);
-}
-
 class TcpConn : public Connector {
- private:
-  std::unique_ptr<ACE_SOCK_Stream> stream_;
-  const int32_t maxBuffSizePool_;
+  size_t receive(char*, size_t, std::chrono::milliseconds) override;
+  size_t receive_nothrowiftimeout(char*, size_t,
+                                  std::chrono::milliseconds) override;
+  size_t send(const char*, size_t, std::chrono::milliseconds) override;
 
-  /**
-   * Attempt to set chunk size to nearest OS page size for perf improvement
-   */
-  static size_t getDefaultChunkSize();
+  uint16_t getPort() override final;
 
  protected:
-  ACE_INET_Addr inetAddress_;
-  std::string endpoint_;
-  std::chrono::microseconds timeout_;
-  static const size_t kChunkSize;
+  boost::asio::io_context io_context_;
+  boost::asio::ip::tcp::socket socket_;
 
-  enum SockOp { SOCK_READ, SOCK_WRITE };
+  boost::asio::ip::tcp::resolver::results_type resolve(
+      const std::string hostname, uint16_t port);
 
-  void clearNagle(ACE_HANDLE sock);
-  int32_t maxSize(ACE_HANDLE sock, int32_t flag, int32_t size);
+  void connect(boost::asio::ip::tcp::resolver::results_type r,
+               std::chrono::microseconds connect_timeout);
 
-  virtual size_t socketOp(SockOp op, char* buff, size_t len,
-                          std::chrono::microseconds waitDuration);
+  size_t receive(char*, size_t, std::chrono::milliseconds,
+                 bool throwTimeoutException);
 
-  virtual void createSocket(ACE_HANDLE sock);
+  virtual void prepareAsyncRead(
+      char* buff, size_t len,
+      boost::optional<boost::system::error_code>& read_result,
+      std::size_t& bytes_read);
 
-  virtual ssize_t doOperation(const SockOp& op, void* buff, size_t sendlen,
-                              ACE_Time_Value& waitTime, size_t& readLen) const;
+  virtual void prepareAsyncWrite(
+      const char* buff, size_t len,
+      boost::optional<boost::system::error_code>& write_result,
+      std::size_t& bytes_written);
 
  public:
-  TcpConn(const std::string& hostname, uint16_t port,
-          std::chrono::microseconds waitSeconds, int32_t maxBuffSizePool);
-
-  TcpConn(const std::string& address, std::chrono::microseconds waitSeconds,
+  TcpConn(const std::string ipaddr, std::chrono::microseconds connect_timeout,
           int32_t maxBuffSizePool);
 
-  ~TcpConn() override {}
+  TcpConn(const std::string hostname, uint16_t port,
+          std::chrono::microseconds connect_timeout, int32_t maxBuffSizePool);
 
-  void close() override;
+  TcpConn(const std::string ipaddr, std::chrono::microseconds connect_timeout,
+          int32_t maxBuffSizePool, std::chrono::microseconds send_timeout,
+          std::chrono::microseconds receive_timeout);
 
-  void init() override;
-
-  virtual void connect();
-
-  size_t receive(char* buff, size_t len,
-                 std::chrono::microseconds waitSeconds) override;
-
-  size_t send(const char* buff, size_t len,
-              std::chrono::microseconds waitSeconds) override;
-
-  virtual uint16_t getPort() override;
+  ~TcpConn() override;
 };
 
 }  // namespace client
diff --git a/cppcache/src/TcpSslConn.cpp b/cppcache/src/TcpSslConn.cpp
index 8ede9a3..956af7a 100644
--- a/cppcache/src/TcpSslConn.cpp
+++ b/cppcache/src/TcpSslConn.cpp
@@ -17,9 +17,15 @@
 
 #include "TcpSslConn.hpp"
 
-#include <memory>
+#include <openssl/err.h>
+#include <openssl/x509.h>
 
-#include <ace/SSL/SSL_SOCK_Connector.h>
+#include <chrono>
+#include <iostream>
+#include <thread>
+
+#include <boost/exception/diagnostic_information.hpp>
+#include <boost/optional.hpp>
 
 #include <geode/ExceptionTypes.hpp>
 #include <geode/SystemProperties.hpp>
@@ -29,105 +35,167 @@
 namespace apache {
 namespace geode {
 namespace client {
-std::atomic_flag TcpSslConn::initialized_ = ATOMIC_FLAG_INIT;
 
-void TcpSslConn::createSocket(ACE_HANDLE sock) {
-  LOGDEBUG("Creating SSL socket stream");
-  stream_ = std::unique_ptr<ACE_SSL_SOCK_Stream>(new ACE_SSL_SOCK_Stream());
-  stream_->set_handle(sock);
+TcpSslConn::TcpSslConn(const std::string& hostname, uint16_t,
+                       const std::string& sniProxyHostname,
+                       uint16_t sniProxyPort,
+                       std::chrono::microseconds connect_timeout,
+                       int32_t maxBuffSizePool, const std::string& pubkeyfile,
+                       const std::string& privkeyfile,
+                       const std::string& pemPassword)
+    : TcpConn{sniProxyHostname, sniProxyPort, connect_timeout, maxBuffSizePool},
+      ssl_context_{boost::asio::ssl::context::sslv23_client},
+      strand_(io_context_) {
+  init(pubkeyfile, privkeyfile, pemPassword, hostname);
 }
 
-void TcpSslConn::connect() {
-  using apache::geode::internal::chrono::duration::to_string;
-
-  ACE_OS::signal(SIGPIPE, SIG_IGN);  // Ignore broken pipe
-
-  LOGFINER(std::string("Connecting SSL socket stream to ") +
-           inetAddress_.get_host_name() + ":" +
-           std::to_string(inetAddress_.get_port_number()) + " waiting " +
-           to_string(timeout_));
-
-  if (!sniHostname_.empty()) {
-    SSL_set_tlsext_host_name(stream_->ssl(), sniHostname_.c_str());
-  }
-
-  ACE_SSL_SOCK_Connector conn;
-  ACE_Time_Value actTimeout(timeout_);
-  if (conn.connect(*stream_, inetAddress_,
-                   timeout_ > std::chrono::microseconds::zero()
-                       ? &actTimeout
-                       : nullptr) == -1) {
-    const auto lastError = ACE_OS::last_error();
-    if (lastError == ETIME || lastError == ETIMEDOUT) {
-      throw TimeoutException(
-          "TcpSslConn::connect Attempt to connect timed out after " +
-          to_string(timeout_) + ".");
-    }
-    close();
-    throw GeodeIOException("TcpSslConn::connect failed with errno: " +
-                           ACE_errno_to_string(lastError));
-  }
+TcpSslConn::TcpSslConn(const std::string& hostname, uint16_t port,
+                       std::chrono::microseconds connect_timeout,
+                       int32_t maxBuffSizePool, const std::string& pubkeyfile,
+                       const std::string& privkeyfile,
+                       const std::string& pemPassword)
+    : TcpConn{hostname, port, connect_timeout, maxBuffSizePool},
+      ssl_context_{boost::asio::ssl::context::sslv23_client},
+      strand_(io_context_) {
+  init(pubkeyfile, privkeyfile, pemPassword);
 }
 
-void TcpSslConn::close() {
-  if (stream_) {
-    stream_->close();
-    stream_ = nullptr;
-  }
-}
+TcpSslConn::TcpSslConn(const std::string& ipaddr,
+                       std::chrono::microseconds connect_timeout,
+                       int32_t maxBuffSizePool, const std::string& pubkeyfile,
+                       const std::string& privkeyfile,
+                       const std::string& pemPassword)
+    : TcpSslConn{
+          ipaddr.substr(0, ipaddr.find(':')),
+          static_cast<uint16_t>(std::stoi(ipaddr.substr(ipaddr.find(':') + 1))),
+          connect_timeout,
+          maxBuffSizePool,
+          pubkeyfile,
+          privkeyfile,
+          pemPassword} {}
 
-uint16_t TcpSslConn::getPort() {
-  ACE_INET_Addr localAddr;
-  stream_->get_local_addr(localAddr);
-  return localAddr.get_port_number();
-}
+TcpSslConn::TcpSslConn(const std::string& ipaddr,
+                       std::chrono::microseconds connect_timeout,
+                       int32_t maxBuffSizePool,
+                       const std::string& sniProxyHostname,
+                       uint16_t sniProxyPort, const std::string& pubkeyfile,
+                       const std::string& privkeyfile,
+                       const std::string& pemPassword)
+    : TcpSslConn{
+          ipaddr.substr(0, ipaddr.find(':')),
+          static_cast<uint16_t>(std::stoi(ipaddr.substr(ipaddr.find(':') + 1))),
+          sniProxyHostname,
+          sniProxyPort,
+          connect_timeout,
+          maxBuffSizePool,
+          pubkeyfile,
+          privkeyfile,
+          pemPassword} {}
 
-static int pem_passwd_cb(char* buf, int size, int /*rwflag*/, void* passwd) {
-  strncpy(buf, reinterpret_cast<char*>(passwd), size);
-  buf[size - 1] = '\0';
-  return static_cast<int>(strlen(buf));
-}
+void TcpSslConn::init(const std::string& pubkeyfile,
+                      const std::string& privkeyfile,
+                      const std::string& pemPassword,
+                      const std::string& sniHostname) {
+  // Most of the SSL configuration provided *through* Asio is on the context.
+  // This configuration is copied into each SSL instance upon construction.
+  // That means you need to get your configuration in order before you
+  // construct the stream and connect the socket.
+  LOGDEBUG(
+      "*** TcpSslConn init, pubkeyfile = %s, pemPassword = %s, sniHostname = "
+      "%s",
+      pubkeyfile.c_str(), pemPassword.c_str(), sniHostname.c_str());
 
-void TcpSslConn::initSsl() {
-  if (!TcpSslConn::initialized_.test_and_set()) {
-    auto sslContext = ACE_SSL_Context::instance();
+  try {
+    ssl_context_.set_verify_mode(boost::asio::ssl::verify_peer);
+    ssl_context_.load_verify_file(pubkeyfile);
 
-    SSL_CTX_set_cipher_list(sslContext->context(), "DEFAULT");
-    sslContext->set_mode(ACE_SSL_Context::SSLv23_client);
-    sslContext->set_verify_peer();
-    if (sslContext->load_trusted_ca(trustStoreFile_.c_str()) != 0) {
-      throw SslException("Failed to read SSL trust store.");
+    ssl_context_.set_password_callback(
+        [pemPassword](std::size_t /*max_length*/,
+                      boost::asio::ssl::context::password_purpose /*purpose*/) {
+          return pemPassword;
+        });
+
+    if (!privkeyfile.empty()) {
+      ssl_context_.use_certificate_chain_file(privkeyfile);
+      ssl_context_.use_private_key_file(
+          privkeyfile, boost::asio::ssl::context::file_format::pem);
     }
 
-    if (!password_.empty()) {
-      SSL_CTX_set_default_passwd_cb(sslContext->context(), pem_passwd_cb);
-      SSL_CTX_set_default_passwd_cb_userdata(
-          sslContext->context(), const_cast<char*>(password_.c_str()));
-    }
+    auto stream = std::unique_ptr<ssl_stream_type>(
+        new ssl_stream_type{socket_, ssl_context_});
 
-    if (!privateKeyFile_.empty()) {
-      if (sslContext->certificate(privateKeyFile_.c_str()) != 0) {
-        throw SslException("Failed to read SSL certificate.");
-      }
-      if (sslContext->private_key(privateKeyFile_.c_str()) != 0) {
-        throw SslException("Invalid SSL keystore password.");
-      }
-      if (SSL_CTX_use_certificate_chain_file(sslContext->context(),
-                                             privateKeyFile_.c_str()) <= 0) {
-        throw SslException("Failed to read SSL certificate chain.");
-      }
-    }
+    SSL_set_tlsext_host_name(stream->native_handle(), sniHostname.c_str());
+
+    stream->handshake(ssl_stream_type::client);
+
+    std::stringstream ss;
+    ss << "Setup SSL " << socket_.local_endpoint() << " -> "
+       << socket_.remote_endpoint();
+    LOGINFO(ss.str());
+
+    ss.clear();
+    ss << "SNI hostname: " << sniHostname;
+    LOGINFO(ss.str());
+
+    socket_stream_ = std::move(stream);
+  } catch (const boost::exception& ex) {
+    // error handling
+    std::string info = boost::diagnostic_information(ex);
+    LOGDEBUG("caught boost exception: %s", info.c_str());
+    throw apache::geode::client::SslException(info.c_str());
   }
 }
 
-ssize_t TcpSslConn::doOperation(const TcpConn::SockOp& op, void* buff,
-                                size_t sendlen, ACE_Time_Value& waitTime,
-                                size_t& readLen) const {
-  if (op == SOCK_READ) {
-    return stream_->recv_n(buff, sendlen, &waitTime, &readLen);
-  } else {
-    return stream_->send_n(buff, sendlen, &waitTime, &readLen);
+TcpSslConn::~TcpSslConn() {
+  std::stringstream ss;
+  ss << "Teardown SSL " << socket_.local_endpoint() << " -> ";
+  try {
+    ss << socket_.remote_endpoint();
+  } catch (...) {
   }
+  LOGFINE(ss.str());
+}
+
+void TcpSslConn::prepareAsyncRead(
+    char* buff, size_t len,
+    boost::optional<boost::system::error_code>& read_result,
+    std::size_t& bytes_read) {
+  boost::asio::async_read(
+      *socket_stream_, boost::asio::buffer(buff, len),
+      boost::asio::bind_executor(
+          strand_, [&read_result, &bytes_read](
+                       const boost::system::error_code& ec, const size_t n) {
+            bytes_read = n;
+
+            // EOF itself occurs when there is no data available on the socket
+            // at the time of the read. It may simply imply data has yet to
+            // arrive. Do nothing. Defer to timeout rather than assume a broken
+            // connection.
+            if (ec != boost::asio::error::eof &&
+                ec != boost::asio::error::try_again) {
+              read_result = ec;
+              return;
+            }
+          }));
+}
+
+void TcpSslConn::prepareAsyncWrite(
+    const char* buff, size_t len,
+    boost::optional<boost::system::error_code>& write_result,
+    std::size_t& bytes_written) {
+  boost::asio::async_write(
+      *socket_stream_, boost::asio::buffer(buff, len),
+      boost::asio::bind_executor(
+          strand_, [&write_result, &bytes_written](
+                       const boost::system::error_code& ec, const size_t n) {
+            bytes_written = n;
+
+            if (ec != boost::asio::error::eof &&
+                ec != boost::asio::error::try_again) {
+              write_result = ec;
+              return;
+            }
+          }));
 }
 
 }  // namespace client
diff --git a/cppcache/src/TcpSslConn.hpp b/cppcache/src/TcpSslConn.hpp
index 6a543b1..adf47f2 100644
--- a/cppcache/src/TcpSslConn.hpp
+++ b/cppcache/src/TcpSslConn.hpp
@@ -20,23 +20,7 @@
 #ifndef GEODE_TCPSSLCONN_H_
 #define GEODE_TCPSSLCONN_H_
 
-#include <atomic>
-#include <chrono>
-#include <string>
-
-#if defined(_WIN32)
-#pragma warning(push)
-#pragma warning(disable : 4311)
-#pragma warning(disable : 4302)
-#endif
-
-#pragma pack(push)
-#include <ace/SSL/SSL_SOCK_Stream.h>
-#pragma pack(pop)
-
-#if defined(_WIN32)
-#pragma warning(pop)
-#endif
+#include <boost/asio/ssl.hpp>
 
 #include "TcpConn.hpp"
 
@@ -45,63 +29,51 @@
 namespace client {
 
 class TcpSslConn : public TcpConn {
- private:
-  static std::atomic_flag initialized_;
-  const std::string trustStoreFile_;
-  const std::string privateKeyFile_;
-  const std::string password_;
-  std::string sniHostname_;
-  std::unique_ptr<ACE_SSL_SOCK_Stream> stream_;
-
  protected:
-  void createSocket(ACE_HANDLE sock) override;
+  using ssl_stream_type =
+      boost::asio::ssl::stream<boost::asio::ip::tcp::socket&>;
 
-  ssize_t doOperation(const SockOp& op, void* buff, size_t sendlen,
-                      ACE_Time_Value& waitTime, size_t& readLen) const override;
+  boost::asio::ssl::context ssl_context_;
+  std::unique_ptr<ssl_stream_type> socket_stream_;
+  boost::asio::io_context::strand strand_;
 
-  void initSsl();
+  void prepareAsyncRead(char* buff, size_t len,
+                        boost::optional<boost::system::error_code>& read_result,
+                        std::size_t& bytes_read) override;
+
+  void prepareAsyncWrite(
+      const char* buff, size_t len,
+      boost::optional<boost::system::error_code>& write_result,
+      std::size_t& bytes_written) override;
 
  public:
-  TcpSslConn(const std::string& ipaddr, std::chrono::microseconds waitSeconds,
-             int32_t maxBuffSizePool, const std::string& sniProxyHostname,
-             uint16_t sniProxyPort, std::string publicKeyFile,
-             std::string privateKeyFile, std::string password)
-      : TcpConn(sniProxyHostname, sniProxyPort, waitSeconds, maxBuffSizePool),
-        trustStoreFile_(std::move(publicKeyFile)),
-        privateKeyFile_(std::move(privateKeyFile)),
-        password_(std::move(password)),
-        sniHostname_(ipaddr.substr(0, ipaddr.find(':'))) {
-    initSsl();
-  }
+  TcpSslConn(const std::string& hostname, uint16_t port,
+             const std::string& sniProxyHostname, uint16_t sniProxyPort,
+             std::chrono::microseconds connect_timeout, int32_t maxBuffSizePool,
+             const std::string& pubkeyfile, const std::string& privkeyfile,
+             const std::string& pemPassword);
 
   TcpSslConn(const std::string& hostname, uint16_t port,
              std::chrono::microseconds connect_timeout, int32_t maxBuffSizePool,
-             const std::string& publicKeyFile,
-             const std::string& privateKeyFile, const std::string& password)
-      : TcpConn(hostname.c_str(), port, connect_timeout, maxBuffSizePool),
-        trustStoreFile_(std::move(publicKeyFile)),
-        privateKeyFile_(std::move(privateKeyFile)),
-        password_(std::move(password)) {
-    initSsl();
-  }
+             const std::string& pubkeyfile, const std::string& privkeyfile,
+             const std::string& pemPassword);
 
-  TcpSslConn(const std::string& address, std::chrono::microseconds waitSeconds,
-             int32_t maxBuffSizePool, std::string publicKeyFile,
-             std::string privateKeyFile, std::string password)
-      : TcpConn(address, waitSeconds, maxBuffSizePool),
-        trustStoreFile_(std::move(publicKeyFile)),
-        privateKeyFile_(std::move(privateKeyFile)),
-        password_(std::move(password)) {
-    initSsl();
-  }
+  TcpSslConn(const std::string& ipaddr,
+             std::chrono::microseconds connect_timeout, int32_t maxBuffSizePool,
+             const std::string& pubkeyfile, const std::string& privkeyfile,
+             const std::string& pemPassword);
 
-  virtual ~TcpSslConn() noexcept override = default;
+  TcpSslConn(const std::string& ipaddr, std::chrono::microseconds waitSeconds,
+             int32_t maxBuffSizePool, const std::string& sniProxyHostname,
+             uint16_t sniProxyPort, const std::string& publicKeyFile,
+             const std::string& privateKeyFile, const std::string& password);
 
-  void close() override;
+  ~TcpSslConn() override;
 
-  void connect() override;
-
-  uint16_t getPort() override;
+ private:
+  void init(const std::string& pubkeyfile, const std::string& privkeyfile,
+            const std::string& pemPassword,
+            const std::string& sniHostname = "");
 };
 }  // namespace client
 }  // namespace geode
diff --git a/cppcache/src/TcrChunkedContext.hpp b/cppcache/src/TcrChunkedContext.hpp
index 17b42c6..01afed6 100644
--- a/cppcache/src/TcrChunkedContext.hpp
+++ b/cppcache/src/TcrChunkedContext.hpp
@@ -23,10 +23,8 @@
 #include <memory>
 #include <string>
 
-#include <ace/Semaphore.h>
-
-#include "AppDomainContext.hpp"
 #include "Utils.hpp"
+#include "util/concurrent/binary_semaphore.hpp"
 
 namespace apache {
 namespace geode {
@@ -38,7 +36,7 @@
  */
 class TcrChunkedResult {
  private:
-  ACE_Semaphore* m_finalizeSema;
+  binary_semaphore* finalize_semaphore_;
   std::shared_ptr<Exception> m_ex;
   bool m_inSameThread;
 
@@ -52,13 +50,13 @@
 
  public:
   inline TcrChunkedResult()
-      : m_finalizeSema(nullptr),
+      : finalize_semaphore_(nullptr),
         m_ex(nullptr),
         m_inSameThread(false),
         m_dsmemId(0) {}
-  virtual ~TcrChunkedResult() {}
-  void setFinalizeSemaphore(ACE_Semaphore* finalizeSema) {
-    m_finalizeSema = finalizeSema;
+  virtual ~TcrChunkedResult() noexcept {}
+  void setFinalizeSemaphore(binary_semaphore* finalizeSema) {
+    finalize_semaphore_ = finalizeSema;
   }
   virtual void setEndpointMemId(uint16_t dsmemId) { m_dsmemId = dsmemId; }
   uint16_t getEndpointMemId() { return m_dsmemId; }
@@ -83,8 +81,8 @@
       m_inSameThread = true;
       return;
     }
-    if (m_finalizeSema != nullptr) {
-      m_finalizeSema->release();
+    if (finalize_semaphore_ != nullptr) {
+      finalize_semaphore_->release();
     } else {
       throw NullPointerException("TcrChunkedResult::finalize: null semaphore");
     }
@@ -96,8 +94,8 @@
    */
   virtual void waitFinalize() const {
     if (m_inSameThread) return;
-    if (m_finalizeSema != nullptr) {
-      m_finalizeSema->acquire();
+    if (finalize_semaphore_ != nullptr) {
+      finalize_semaphore_->acquire();
     } else {
       throw NullPointerException(
           "TcrChunkedResult::waitFinalize: null semaphore");
diff --git a/cppcache/src/TcrConnection.cpp b/cppcache/src/TcrConnection.cpp
index dc48ba3..dc09e22 100644
--- a/cppcache/src/TcrConnection.cpp
+++ b/cppcache/src/TcrConnection.cpp
@@ -22,9 +22,12 @@
 #include <geode/AuthInitialize.hpp>
 #include <geode/SystemProperties.hpp>
 
+#include "CacheImpl.hpp"
 #include "ClientProxyMembershipID.hpp"
 #include "Connector.hpp"
 #include "DistributedSystemImpl.hpp"
+#include "FunctionMacros.hpp"
+#include "TcpConn.hpp"
 #include "TcpSslConn.hpp"
 #include "TcrConnectionManager.hpp"
 #include "TcrEndpoint.hpp"
@@ -33,14 +36,7 @@
 #include "Utils.hpp"
 #include "Version.hpp"
 
-namespace apache {
-namespace geode {
-namespace client {
-
-const int HEADER_LENGTH = 17;
-const int CHUNK_HEADER_LENGTH = 5;
-const int8_t LAST_CHUNK_MASK = 0x1;
-const int64_t INITIAL_CONNECTION_ID = 26739;
+INIT_GNFN("TcrConnection")
 
 #define throwException(ex)                            \
   do {                                                \
@@ -48,62 +44,110 @@
     throw ex;                                         \
   } while (0)
 
+namespace {
+bool useReplyTimeout(const apache::geode::client::TcrMessage& request) {
+  switch (request.getMessageType()) {
+    case apache::geode::client::TcrMessage::QUERY:
+    case apache::geode::client::TcrMessage::QUERY_WITH_PARAMETERS:
+    case apache::geode::client::TcrMessage::EXECUTECQ_WITH_IR_MSG_TYPE:
+    case apache::geode::client::TcrMessage::GETDURABLECQS_MSG_TYPE:
+    case apache::geode::client::TcrMessage::EXECUTE_FUNCTION:
+    case apache::geode::client::TcrMessage::EXECUTE_REGION_FUNCTION:
+    case apache::geode::client::TcrMessage::EXECUTE_REGION_FUNCTION_SINGLE_HOP:
+      return true;
+    default:
+      break;
+  }
+
+  return false;
+}
+
+int expiryTimeVariancePercentage() {
+  auto nowTimePoint = std::chrono::steady_clock::now().time_since_epoch();
+  auto now_ms =
+      std::chrono::duration_cast<std::chrono::milliseconds>(nowTimePoint)
+          .count();
+  auto now_s =
+      std::chrono::duration_cast<std::chrono::seconds>(nowTimePoint).count();
+
+  srand(static_cast<unsigned int>((now_s * 1000) + (now_ms / 1000)));
+
+  const int numbers = 21;
+  // NOLINTNEXTLINE(clang-analyzer-security.insecureAPI.rand): TODO replace
+  int random = rand() % numbers + 1;
+
+  if (random > 10) {
+    random = random - numbers;
+  }
+  return random;
+}
+
+const int HEADER_LENGTH = 17;
+const int CHUNK_HEADER_LENGTH = 5;
+const int8_t LAST_CHUNK_MASK = 0x1;
+const int64_t INITIAL_CONNECTION_ID = 26739;
+
 struct FinalizeProcessChunk {
  private:
-  TcrMessage& m_reply;
-  uint16_t m_endpointMemId;
+  apache::geode::client::TcrMessage& reply_;
+  uint16_t endpointMemId_;
 
  public:
-  FinalizeProcessChunk(TcrMessageReply& reply, uint16_t endpointMemId)
-      : m_reply(reply), m_endpointMemId(endpointMemId) {}
+  FinalizeProcessChunk(apache::geode::client::TcrMessageReply& reply,
+                       uint16_t endpointMemId)
+      : reply_(reply), endpointMemId_(endpointMemId) {}
   ~FinalizeProcessChunk() noexcept(false) {
     // Enqueue a nullptr chunk indicating a wait for processing to complete.
-    m_reply.processChunk(std::vector<uint8_t>(), 0, m_endpointMemId);
+    reply_.processChunk(std::vector<uint8_t>(), 0, endpointMemId_);
   }
 };
+}  // namespace
+
+namespace apache {
+namespace geode {
+namespace client {
+
+TcrConnection::TcrConnection(const TcrConnectionManager& connectionManager)
+    : connectionId(0),
+      connectionManager_(connectionManager),
+      expiryTimeVariancePercentage_{expiryTimeVariancePercentage()},
+      hasServerQueue_(NON_REDUNDANT_SERVER),
+      queueSize_(0),
+      port_(0),
+      chunks_process_semaphore_(0),
+      isBeingUsed_(false),
+      isUsed_(0),
+      poolDM_(nullptr) {}
 
 bool TcrConnection::initTcrConnection(
-    TcrEndpoint* endpointObj, const char* endpoint,
+    std::shared_ptr<TcrEndpoint> endpointObj,
     synchronized_set<std::unordered_set<uint16_t>>& ports,
     bool isClientNotification, bool isSecondary,
     std::chrono::microseconds connectTimeout) {
-  m_conn = nullptr;
-  m_endpointObj = endpointObj;
-  m_poolDM = dynamic_cast<ThinClientPoolDM*>(m_endpointObj->getPoolHADM());
-  // add to the connection reference counter of the endpoint
-  m_endpointObj->addConnRefCounter(1);
-  // m_connected = isConnected;
-  m_hasServerQueue = NON_REDUNDANT_SERVER;
-  m_queueSize = 0;
-  // m_chunksProcessSema = 0;
-  m_creationTime = clock::now();
+  endpointObj_ = endpointObj;
+  poolDM_ = dynamic_cast<ThinClientPoolDM*>(endpointObj_->getPoolHADM());
+  hasServerQueue_ = NON_REDUNDANT_SERVER;
+  queueSize_ = 0;
+  lastAccessed_ = creationTime_ = std::chrono::steady_clock::now();
   connectionId = INITIAL_CONNECTION_ID;
-  m_lastAccessed = clock::now();
-  auto cacheImpl = m_poolDM->getConnectionManager().getCacheImpl();
+  auto cacheImpl = poolDM_->getConnectionManager().getCacheImpl();
   const auto& distributedSystem = cacheImpl->getDistributedSystem();
   const auto& sysProp = distributedSystem.getSystemProperties();
 
-  LOGDEBUG(
-      "Tcrconnection const isSecondary = %d and isClientNotification = %d, "
-      "this = %p,  conn ref to endopint %d",
-      isSecondary, isClientNotification, this,
-      m_endpointObj->getConnRefCounter());
   bool isPool = false;
-  m_isBeingUsed = false;
-  m_endpoint = endpoint;
+  isBeingUsed_ = false;
   // Precondition:
   // 1. isSecondary ==> isClientNotification
 
   // Create TcpConn object which manages a socket connection with the endpoint.
   if (endpointObj && endpointObj->getPoolHADM()) {
-    m_conn = createConnection(
-        m_endpoint, connectTimeout,
-        static_cast<int32_t>(
-            endpointObj->getPoolHADM()->getSocketBufferSize()));
+    createConnection(endpointObj_->name().c_str(), connectTimeout,
+                     static_cast<int32_t>(
+                         endpointObj->getPoolHADM()->getSocketBufferSize()));
     isPool = true;
   } else {
-    m_conn = createConnection(m_endpoint, connectTimeout,
-                              sysProp.maxSocketBufferSize());
+    createConnection(endpointObj_->name().c_str(), connectTimeout,
+                     sysProp.maxSocketBufferSize());
   }
 
   auto handShakeMsg = cacheImpl->createDataOutput();
@@ -121,18 +165,15 @@
     handShakeMsg.write(static_cast<int8_t>(CLIENT_TO_SERVER));
   }
 
-  // added for versioned client
-  int8_t versionOrdinal = Version::getOrdinal();
-  handShakeMsg.write(versionOrdinal);
-
-  LOGFINE("Client version ordinal is %d", versionOrdinal);
+  Version::write(handShakeMsg, Version::current());
+  LOGFINE("Client version ordinal is %d", Version::current().getOrdinal());
 
   handShakeMsg.write(static_cast<int8_t>(REPLY_OK));
 
   // Send byte REPLY_OK = (byte)58;
   if (!isClientNotification) {
-    m_port = m_conn->getPort();
-    ports.insert(m_port);
+    port_ = conn_->getPort();
+    ports.insert(port_);
   } else {
     auto&& lock = ports.make_lock();
     handShakeMsg.writeInt(static_cast<int32_t>(ports.size()));
@@ -154,7 +195,7 @@
   handShakeMsg.write(static_cast<int8_t>(DSCode::FixedIDByte));
   // Writing byte for ClientProxyMembershipID class id=38 as registered on the
   // java server.
-  handShakeMsg.write(static_cast<int8_t>(DSCode::ClientProxyMembershipId));
+  handShakeMsg.write(static_cast<int8_t>(DSFid::ClientProxyMembershipId));
   if (endpointObj->getPoolHADM()) {
     ClientProxyMembershipID* memId =
         endpointObj->getPoolHADM()->getMembershipId();
@@ -186,8 +227,8 @@
 
   bool tmpIsSecurityOn = nullptr != cacheImpl->getAuthInitialize();
 
-  if (m_endpointObj) {
-    tmpIsSecurityOn = tmpIsSecurityOn || m_endpointObj->isMultiUserMode();
+  if (endpointObj_) {
+    tmpIsSecurityOn = tmpIsSecurityOn || endpointObj_->isMultiUserMode();
   }
 
   LOGDEBUG(
@@ -195,8 +236,8 @@
       "%d ",
       tmpIsSecurityOn, isNotificationChannel);
   bool doIneedToSendCreds = true;
-  if (isNotificationChannel && m_endpointObj &&
-      this->m_endpointObj->isMultiUserMode()) {
+  if (isNotificationChannel && endpointObj_ &&
+      this->endpointObj_->isMultiUserMode()) {
     tmpIsSecurityOn = false;
     doIneedToSendCreds = false;
   }
@@ -225,7 +266,8 @@
               "invoking getCredentials");
 
           const auto& tmpAuthIniSecurityProperties =
-              authInitialize->getCredentials(tmpSecurityProperties, m_endpoint);
+              authInitialize->getCredentials(tmpSecurityProperties,
+                                             endpointObj_->name().c_str());
           LOGFINER("TcrConnection: after getCredentials ");
           credentials = tmpAuthIniSecurityProperties;
         }
@@ -252,65 +294,78 @@
   size_t msgLength;
   auto data = reinterpret_cast<char*>(
       const_cast<uint8_t*>(handShakeMsg.getBuffer(&msgLength)));
-  LOGFINE("Attempting handshake with endpoint %s for %s%s connection", endpoint,
+  LOGFINE("Attempting handshake with endpoint %s for %s%s connection",
+          endpointObj->name().c_str(),
           isClientNotification ? (isSecondary ? "secondary " : "primary ") : "",
           isClientNotification ? "subscription" : "client");
-  ConnErrType error = sendData(data, msgLength, connectTimeout, false);
+  LOGDEBUG("%s(%p): Handshake bytes: (%d): %s", __GNFN__, this, msgLength,
+           Utils::convertBytesToString(data, msgLength).c_str());
+
+  ConnErrType error = sendData(data, msgLength, connectTimeout);
 
   if (error == CONN_NOERR) {
-    auto acceptanceCode = readHandshakeData(1, connectTimeout);
+    std::vector<int8_t> recdBytes;
 
-    LOGDEBUG(" Handshake: Got Accept Code %d", acceptanceCode[0]);
-    /* adongre */
+    auto acceptanceCode = readHandshakeData(1, connectTimeout);
+    recdBytes.push_back(acceptanceCode[0]);
+
     if (acceptanceCode[0] == REPLY_SSL_ENABLED && !sysProp.sslEnabled()) {
       LOGERROR("SSL is enabled on server, enable SSL in client as well");
       AuthenticationRequiredException ex(
           "SSL is enabled on server, enable SSL in client as well");
-      GF_SAFE_DELETE_CON(m_conn);
+      conn_.reset();
       throwException(ex);
     }
 
     auto serverQueueStatus = readHandshakeData(1, connectTimeout);
+    recdBytes.push_back(serverQueueStatus[0]);
 
     //  TESTING: Durable clients - set server queue status.
     // 0 - Non-Redundant , 1- Redundant , 2- Primary
     if (serverQueueStatus[0] == 1) {
-      m_hasServerQueue = REDUNDANT_SERVER;
+      hasServerQueue_ = REDUNDANT_SERVER;
     } else if (serverQueueStatus[0] == 2) {
-      m_hasServerQueue = PRIMARY_SERVER;
+      hasServerQueue_ = PRIMARY_SERVER;
     } else {
-      m_hasServerQueue = NON_REDUNDANT_SERVER;
+      hasServerQueue_ = NON_REDUNDANT_SERVER;
     }
     auto queueSizeMsg = readHandshakeData(4, connectTimeout);
-    auto dataInput = cacheImpl->createDataInput(
-        reinterpret_cast<const uint8_t*>(queueSizeMsg.data()),
-        queueSizeMsg.size());
-    int32_t queueSize = 0;
-    queueSize = dataInput.readInt32();
-    m_queueSize = queueSize > 0 ? queueSize : 0;
+    recdBytes.insert(std::end(recdBytes), std::begin(queueSizeMsg),
+                     std::end(queueSizeMsg));
+    queueSize_ = static_cast<int32_t>(queueSizeMsg[0]) << 24 |
+                 static_cast<int32_t>(queueSizeMsg[1]) << 16 |
+                 static_cast<int32_t>(queueSizeMsg[2]) << 8 |
+                 static_cast<int32_t>(queueSizeMsg[3]);
+    queueSize_ = queueSize_ > 0 ? queueSize_ : 0;
 
-    m_endpointObj->setServerQueueStatus(m_hasServerQueue, m_queueSize);
+    endpointObj_->setServerQueueStatus(hasServerQueue_, queueSize_);
 
-    ////////////////////////// Set Pool Specific Q Size only when
+    ////////////////////////// Set Pool Specific Q Size when
     ///////////////////////////////////
-    ////////////////////////// 1. SereverQStatus = Primary or
+    ////////////////////////// 1. ServerQStatus is Primary or
     ///////////////////////////////////
-    ////////////////////////// 2. SereverQStatus = Non-Redundant and
+    ////////////////////////// 2. ServerQStatus is Non-Redundant but
     ///////////////////////////////////
-    ////////////////////////// 3. Only when handshake is for subscription
+    ////////////////////////// 3. ONLY when handshake is for subscription
     ///////////////////////////////////
-    if (m_poolDM != nullptr) {
-      if ((m_hasServerQueue == PRIMARY_SERVER ||
-           m_hasServerQueue == NON_REDUNDANT_SERVER) &&
-          isClientNotification) {
-        m_poolDM->setPrimaryServerQueueSize(queueSize);
-      }
+    if ((hasServerQueue_ == PRIMARY_SERVER ||
+         hasServerQueue_ == NON_REDUNDANT_SERVER) &&
+        isClientNotification) {
+      poolDM_->setPrimaryServerQueueSize(queueSize_);
     }
 
     if (!isClientNotification) {
       // Read the DistributedMember object
       auto recvMsgLen = readHandshakeArraySize(connectTimeout);
+      recdBytes.push_back((recvMsgLen & 0xff000000) >> 24);
+      recdBytes.push_back((recvMsgLen & 0x00ff0000) >> 16);
+      recdBytes.push_back((recvMsgLen & 0x0000ff00) >> 8);
+      recdBytes.push_back(recvMsgLen & 0x000000ff);
+
       auto recvMessage = readHandshakeData(recvMsgLen, connectTimeout);
+      recdBytes.insert(std::end(recdBytes), std::begin(recvMessage),
+                       std::end(recvMessage));
+
       // If the distributed member has not been set yet, set it.
       if (getEndpointObject()->getDistributedMemberID() == 0) {
         LOGDEBUG("Deserializing distributed member Id");
@@ -326,78 +381,87 @@
     }
 
     auto recvMsgLenBytes = readHandshakeData(2, connectTimeout);
-    auto dataInput3 = m_connectionManager->getCacheImpl()->createDataInput(
-        reinterpret_cast<const uint8_t*>(recvMsgLenBytes.data()),
-        recvMsgLenBytes.size());
-    uint16_t recvMsgLen2 = dataInput3.readInt16();
+    uint16_t recvMsgLen2 = static_cast<int16_t>(recvMsgLenBytes[0]) << 8 |
+                           static_cast<int16_t>(recvMsgLenBytes[1]);
+    recdBytes.insert(std::end(recdBytes), std::begin(recvMsgLenBytes),
+                     std::end(recvMsgLenBytes));
+
     auto recvMessage = readHandshakeData(recvMsgLen2, connectTimeout);
+    recdBytes.insert(std::end(recdBytes), std::begin(recvMessage),
+                     std::end(recvMessage));
 
     if (!isClientNotification) {
       auto deltaEnabledMsg = readHandshakeData(1, connectTimeout);
-      auto di = m_connectionManager->getCacheImpl()->createDataInput(
-          reinterpret_cast<const uint8_t*>(deltaEnabledMsg.data()), 1);
-      ThinClientBaseDM::setDeltaEnabledOnServer(di.readBoolean());
+      recdBytes.push_back(deltaEnabledMsg[0]);
+      ThinClientBaseDM::setDeltaEnabledOnServer(deltaEnabledMsg[0] ? true
+                                                                   : false);
     }
 
+    LOGDEBUG(
+        "%s(%p): isClientNotification=%s, Handshake response bytes: (%d) %s",
+        __GNFN__, this, isClientNotification ? "true" : "false",
+        recdBytes.size(),
+        Utils::convertBytesToString(recdBytes.data(), recdBytes.size())
+            .c_str());
+
     switch (acceptanceCode[0]) {
       case REPLY_OK:
       case SUCCESSFUL_SERVER_TO_CLIENT:
         LOGFINER("Handshake reply: %u,%u,%u", acceptanceCode[0],
                  serverQueueStatus[0], recvMsgLen2);
-        if (isClientNotification) readHandshakeInstantiatorMsg(connectTimeout);
+        if (isClientNotification) {
+          readHandshakeInstantiatorMsg(connectTimeout);
+        }
         break;
       case REPLY_AUTHENTICATION_FAILED: {
         AuthenticationFailedException ex(
             reinterpret_cast<char*>(recvMessage.data()));
-        GF_SAFE_DELETE_CON(m_conn);
+        conn_.reset();
         throwException(ex);
       }
       case REPLY_AUTHENTICATION_REQUIRED: {
         AuthenticationRequiredException ex(
             reinterpret_cast<char*>(recvMessage.data()));
-        GF_SAFE_DELETE_CON(m_conn);
+        conn_.reset();
         throwException(ex);
       }
       case REPLY_DUPLICATE_DURABLE_CLIENT: {
         DuplicateDurableClientException ex(
             reinterpret_cast<char*>(recvMessage.data()));
-        GF_SAFE_DELETE_CON(m_conn);
+        conn_.reset();
         throwException(ex);
       }
       case REPLY_REFUSED:
       case REPLY_INVALID:
       case UNSUCCESSFUL_SERVER_TO_CLIENT: {
         LOGERROR("Handshake rejected by server[%s]: %s",
-                 m_endpointObj->name().c_str(),
+                 endpointObj_->name().c_str(),
                  reinterpret_cast<char*>(recvMessage.data()));
         auto message = std::string("TcrConnection::TcrConnection: ") +
                        "Handshake rejected by server: " +
                        reinterpret_cast<char*>(recvMessage.data());
         CacheServerException ex(message);
-        GF_SAFE_DELETE_CON(m_conn);
+        conn_.reset();
         throw ex;
       }
       default: {
         LOGERROR(
             "Unknown error[%d] received from server [%s] in handshake: "
             "%s",
-            acceptanceCode[0], m_endpointObj->name().c_str(),
+            acceptanceCode[0], endpointObj_->name().c_str(),
             recvMessage.data());
         auto message =
             std::string("TcrConnection::TcrConnection: Unknown error") +
             " received from server in handshake: " +
             reinterpret_cast<char*>(recvMessage.data());
         MessageException ex(message);
-        GF_SAFE_DELETE_CON(m_conn);
+        conn_.reset();
         throw ex;
       }
     }
 
   } else {
-    int32_t lastError = ACE_OS::last_error();
-    LOGFINE("Handshake failed, errno: %d: %s", lastError,
-            ACE_OS::strerror(lastError));
-    GF_SAFE_DELETE_CON(m_conn);
+    conn_.reset();
     if (error & CONN_TIMEOUT) {
       throw TimeoutException(
           "TcrConnection::TcrConnection: "
@@ -415,143 +479,82 @@
   //---if pool in not in multiuser node
   //---or old endpoint case.
 
-  if (this->m_endpointObj && !isNotificationChannel && tmpIsSecurityOn &&
-      (!isPool || !this->m_endpointObj->isMultiUserMode())) {
-    // this->m_endpointObj->authenticateEndpoint(this);
+  if (this->endpointObj_ && !isNotificationChannel && tmpIsSecurityOn &&
+      (!isPool || !this->endpointObj_->isMultiUserMode())) {
+    // this->endpointObj_->authenticateEndpoint(this);
     return true;
   }
 
   return false;
 }
 
-Connector* TcrConnection::createConnection(
-    const std::string& address, std::chrono::microseconds connectTimeout,
-    int32_t maxBuffSizePool) {
+void TcrConnection::createConnection(const std::string& address,
+                                     std::chrono::microseconds connectTimeout,
+                                     int32_t maxBuffSizePool) {
   Connector* socket = nullptr;
-  auto& systemProperties = m_connectionManager->getCacheImpl()
+  auto& systemProperties = connectionManager_.getCacheImpl()
                                ->getDistributedSystem()
                                .getSystemProperties();
+
   if (systemProperties.sslEnabled()) {
-    const auto& sniHostname = m_poolDM->getSniProxyHost();
+    const auto& sniHostname = poolDM_->getSniProxyHost();
     if (sniHostname.empty()) {
-      socket = new TcpSslConn(address, connectTimeout, maxBuffSizePool,
-                              systemProperties.sslTrustStore(),
-                              systemProperties.sslKeyStore(),
-                              systemProperties.sslKeystorePassword());
+      conn_.reset(new TcpSslConn(address, connectTimeout, maxBuffSizePool,
+                                 systemProperties.sslTrustStore(),
+                                 systemProperties.sslKeyStore(),
+                                 systemProperties.sslKeystorePassword()));
     } else {
-      const auto sniPort = m_poolDM->getSniProxyPort();
-      socket = new TcpSslConn(
+      const auto sniPort = poolDM_->getSniProxyPort();
+      conn_.reset(new TcpSslConn(
           address, connectTimeout, maxBuffSizePool, sniHostname, sniPort,
           systemProperties.sslTrustStore(), systemProperties.sslKeyStore(),
-          systemProperties.sslKeystorePassword());
+          systemProperties.sslKeystorePassword()));
     }
   } else {
-    socket = new TcpConn(address, connectTimeout, maxBuffSizePool);
+    conn_.reset(new TcpConn(address, connectTimeout, maxBuffSizePool));
   }
-  // as socket.init() calls throws exception...
-  m_conn = socket;
-  socket->init();
-  return socket;
 }
 
-/* The timeout behaviour for different methods is as follows:
- * receive():
- *   Header: default timeout
- *   Body: default timeout
- * sendRequest()/sendRequestForChunkedResponse():
- *  default timeout during send; for receive:
- *   Header: default timeout * default timeout retries to handle large payload
- *           if a timeout other than default timeout is specified then
- *           that is used instead
- *   Body: default timeout
- */
-inline ConnErrType TcrConnection::receiveData(
-    char* buffer, size_t length, std::chrono::microseconds receiveTimeoutSec,
-    bool checkConnected, bool isNotificationMessage) {
-  std::chrono::microseconds defaultWaitSecs =
-      isNotificationMessage ? std::chrono::seconds(1) : std::chrono::seconds(2);
-  if (defaultWaitSecs > receiveTimeoutSec) defaultWaitSecs = receiveTimeoutSec;
+ConnErrType TcrConnection::receiveData(
+    char* buffer, const size_t length,
+    const std::chrono::microseconds timeout) {
+  try {
+    const auto readBytes = conn_->receive(
+        buffer, length,
+        std::chrono::duration_cast<std::chrono::milliseconds>(timeout));
 
-  auto startLen = length;
-
-  while (length > 0 && receiveTimeoutSec > std::chrono::microseconds::zero()) {
-    if (checkConnected && !m_connected) {
-      return CONN_IOERR;
+    poolDM_->getStats().incReceivedBytes(static_cast<int64_t>(readBytes));
+  } catch (boost::system::system_error& ex) {
+    switch (ex.code().value()) {
+      case boost::asio::error::eof:
+        return CONN_NODATA;
+      case boost::asio::error::operation_aborted:
+        return CONN_TIMEOUT;
+      default:
+        break;
     }
-    if (receiveTimeoutSec < defaultWaitSecs) {
-      defaultWaitSecs = receiveTimeoutSec;
-    }
-    auto readBytes = m_conn->receive(buffer, length, defaultWaitSecs);
-    int32_t lastError = ACE_OS::last_error();
-    length -= readBytes;
-    if (length > 0 && lastError != ETIME && lastError != ETIMEDOUT) {
-      return CONN_IOERR;
-    }
-    buffer += readBytes;
-    /*
-      Update pools byteRecieved stat here.
-      readMessageChunked, readMessage, readHandshakeData,
-      readHandshakeRawData, readHandShakeBytes, readHandShakeInt,
-      readHandshakeString, all call TcrConnection::receiveData.
-    */
-    LOGDEBUG("TcrConnection::receiveData length = %zu defaultWaitSecs = %s",
-             length, to_string(defaultWaitSecs).c_str());
-    if (m_poolDM != nullptr) {
-      LOGDEBUG("TcrConnection::receiveData readBytes = %zu", readBytes);
-      m_poolDM->getStats().incReceivedBytes(static_cast<int64_t>(readBytes));
-    }
-    receiveTimeoutSec -= defaultWaitSecs;
-    if ((length == startLen) && isNotificationMessage) {  // no data read
-      break;
-    }
-  }
-  //  Postconditions for checking bounds.
-  return (length == 0 ? CONN_NOERR
-                      : (length == startLen ? CONN_NODATA : CONN_TIMEOUT));
-}
-
-inline ConnErrType TcrConnection::sendData(
-    const char* buffer, size_t length, std::chrono::microseconds sendTimeout,
-    bool checkConnected) {
-  std::chrono::microseconds dummy{0};
-  return sendData(dummy, buffer, length, sendTimeout, checkConnected);
-}
-
-inline ConnErrType TcrConnection::sendData(
-    std::chrono::microseconds& timeSpent, const char* buffer, size_t length,
-    std::chrono::microseconds sendTimeout, bool checkConnected) {
-  std::chrono::microseconds defaultWaitSecs = std::chrono::seconds(2);
-  if (defaultWaitSecs > sendTimeout) defaultWaitSecs = sendTimeout;
-  LOGDEBUG(
-      "before send len %zu sendTimeoutSec = %s checkConnected = %d "
-      "m_connected "
-      "%d",
-      length, to_string(sendTimeout).c_str(), checkConnected, m_connected);
-  while (length > 0 && sendTimeout > std::chrono::microseconds::zero()) {
-    if (checkConnected && !m_connected) {
-      return CONN_IOERR;
-    }
-    if (sendTimeout < defaultWaitSecs) {
-      defaultWaitSecs = sendTimeout;
-    }
-    auto sentBytes = m_conn->send(buffer, length, defaultWaitSecs);
-
-    length -= sentBytes;
-    buffer += sentBytes;
-    // we don't want to decrement the remaining time for the last iteration
-    if (length == 0) {
-      break;
-    }
-    int32_t lastError = ACE_OS::last_error();
-    if (length > 0 && lastError != ETIME && lastError != ETIMEDOUT) {
-      return CONN_IOERR;
-    }
-
-    timeSpent += defaultWaitSecs;
-    sendTimeout -= defaultWaitSecs;
+    return CONN_IOERR;
   }
 
-  return (length == 0 ? CONN_NOERR : CONN_TIMEOUT);
+  return CONN_NOERR;
+}
+
+ConnErrType TcrConnection::sendData(const char* buffer, size_t length,
+                                    std::chrono::microseconds timeout) {
+  try {
+    conn_->send(buffer, length,
+                std::chrono::duration_cast<std::chrono::milliseconds>(timeout));
+  } catch (boost::system::system_error& ex) {
+    switch (ex.code().value()) {
+      case boost::asio::error::operation_aborted:
+        return CONN_TIMEOUT;
+      default:
+        break;
+    }
+    return CONN_IOERR;
+  }
+
+  return CONN_NOERR;
 }
 
 char* TcrConnection::sendRequest(const char* buffer, size_t len,
@@ -559,17 +562,17 @@
                                  std::chrono::microseconds sendTimeoutSec,
                                  std::chrono::microseconds receiveTimeoutSec,
                                  int32_t request) {
-  LOGDEBUG("TcrConnection::sendRequest");
-  std::chrono::microseconds timeSpent{0};
-
-  send(timeSpent, buffer, len, sendTimeoutSec);
+  const auto start = std::chrono::system_clock::now();
+  send(buffer, len, sendTimeoutSec);
+  const auto timeSpent = start - std::chrono::system_clock::now();
 
   if (timeSpent >= receiveTimeoutSec) {
     throwException(
         TimeoutException("TcrConnection::send: connection timed out"));
   }
 
-  receiveTimeoutSec -= timeSpent;
+  receiveTimeoutSec -=
+      std::chrono::duration_cast<decltype(receiveTimeoutSec)>(timeSpent);
   ConnErrType opErr = CONN_NOERR;
   return readMessage(recvLen, receiveTimeoutSec, true, &opErr, false, request);
 }
@@ -594,29 +597,19 @@
   }
 }
 
-bool TcrConnection::useReplyTimeout(const TcrMessage& request) const {
-  auto messageType = request.getMessageType();
-  return ((messageType == TcrMessage::QUERY) ||
-          (messageType == TcrMessage::QUERY_WITH_PARAMETERS) ||
-          (messageType == TcrMessage::EXECUTECQ_WITH_IR_MSG_TYPE) ||
-          (messageType == TcrMessage::GETDURABLECQS_MSG_TYPE) ||
-          (messageType == TcrMessage::EXECUTE_FUNCTION) ||
-          (messageType == TcrMessage::EXECUTE_REGION_FUNCTION) ||
-          (messageType == TcrMessage::EXECUTE_REGION_FUNCTION_SINGLE_HOP));
-}
-
 std::chrono::microseconds TcrConnection::sendWithTimeouts(
     const char* data, size_t len, std::chrono::microseconds sendTimeout,
     std::chrono::microseconds receiveTimeout) {
-  std::chrono::microseconds timeSpent{0};
-  send(timeSpent, data, len, sendTimeout, true);
+  const auto start = std::chrono::system_clock::now();
+  send(data, len, sendTimeout, true);
+  const auto timeSpent = start - std::chrono::system_clock::now();
 
   if (timeSpent >= receiveTimeout) {
     throwException(
         TimeoutException("TcrConnection::send: connection timed out"));
   }
 
-  return timeSpent;
+  return std::chrono::duration_cast<std::chrono::microseconds>(timeSpent);
 }
 
 bool TcrConnection::replyHasResult(const TcrMessage& request,
@@ -641,37 +634,23 @@
 }
 
 void TcrConnection::send(const char* buffer, size_t len,
-                         std::chrono::microseconds sendTimeoutSec,
-                         bool checkConnected) {
-  std::chrono::microseconds dummy;
-  send(dummy, buffer, len, sendTimeoutSec, checkConnected);
-}
-
-void TcrConnection::send(std::chrono::microseconds& timeSpent,
-                         const char* buffer, size_t len,
                          std::chrono::microseconds sendTimeoutSec, bool) {
-  // LOGINFO("TcrConnection::send: [%p] sending request to endpoint %s;",
-  //:  this, m_endpoint);
-
   LOGDEBUG(
       "TcrConnection::send: [%p] sending request to endpoint %s; bytes: %s",
-      this, m_endpoint, Utils::convertBytesToString(buffer, len).c_str());
+      this, endpointObj_->name().c_str(),
+      Utils::convertBytesToString(buffer, len).c_str());
 
-  ConnErrType error = sendData(timeSpent, buffer, len, sendTimeoutSec);
-
-  LOGFINER(
-      "TcrConnection::send: completed send request to endpoint %s "
-      "with error: %d",
-      m_endpoint, error);
-
-  if (error != CONN_NOERR) {
-    if (error == CONN_TIMEOUT) {
+  switch (sendData(buffer, len, sendTimeoutSec)) {
+    case CONN_NOERR:
+      break;
+    case CONN_TIMEOUT:
       throwException(
           TimeoutException("TcrConnection::send: connection timed out"));
-    } else {
+    case CONN_NODATA:
+    case CONN_IOERR:
+    case CONN_OTHERERR:
       throwException(
           GeodeIOException("TcrConnection::send: connection failure"));
-    }
   }
 }
 
@@ -694,12 +673,8 @@
     headerTimeout = DEFAULT_READ_TIMEOUT * DEFAULT_TIMEOUT_RETRIES;
   }
 
-  LOGDEBUG("TcrConnection::readMessage: receiving reply from endpoint %s",
-           m_endpoint);
+  error = receiveData(msg_header, HEADER_LENGTH, headerTimeout);
 
-  error = receiveData(msg_header, HEADER_LENGTH, headerTimeout, true,
-                      isNotificationMessage);
-  LOGDEBUG("TcrConnection::readMessage after recieve data");
   if (error != CONN_NOERR) {
     //  the !isNotificationMessage ensures that notification channel
     // gets the TimeoutException when no data was received and is ignored by
@@ -728,12 +703,12 @@
   }
 
   LOGDEBUG(
-      "TcrConnection::readMessage: received header from endpoint %s; "
+      "TcrConnection::readMessage(%p): received header from endpoint %s; "
       "bytes: %s",
-      m_endpoint,
+      this, endpointObj_->name().c_str(),
       Utils::convertBytesToString(msg_header, HEADER_LENGTH).c_str());
 
-  auto input = m_connectionManager->getCacheImpl()->createDataInput(
+  auto input = connectionManager_.getCacheImpl()->createDataInput(
       reinterpret_cast<uint8_t*>(msg_header), HEADER_LENGTH);
   // ignore msgType
   input.readInt32();
@@ -758,8 +733,7 @@
   if (isNotificationMessage) {
     mesgBodyTimeout = receiveTimeoutSec * DEFAULT_TIMEOUT_RETRIES;
   }
-  error = receiveData(fullMessage + HEADER_LENGTH, msgLen, mesgBodyTimeout,
-                      true, isNotificationMessage);
+  error = receiveData(fullMessage + HEADER_LENGTH, msgLen, mesgBodyTimeout);
   if (error != CONN_NOERR) {
     delete[] fullMessage;
     //  the !isNotificationMessage ensures that notification channel
@@ -785,7 +759,7 @@
   LOGDEBUG(
       "TcrConnection::readMessage: received message body from "
       "endpoint %s; bytes: %s",
-      m_endpoint,
+      endpointObj_->name().c_str(),
       Utils::convertBytesToString(fullMessage + HEADER_LENGTH, msgLen).c_str());
 
   return fullMessage;
@@ -800,7 +774,7 @@
   LOGFINER(
       "TcrConnection::readMessageChunked: receiving reply from "
       "endpoint %s",
-      m_endpoint);
+      endpointObj_->name().c_str());
 
   auto responseHeader = readResponseHeader(headerTimeout);
 
@@ -808,12 +782,12 @@
   reply.setTransId(responseHeader.transactionId);
 
   // Initialize the chunk processing
-  reply.startProcessChunk(m_chunksProcessSema);
+  reply.startProcessChunk(chunks_process_semaphore_);
 
   // indicate an end to chunk processing and wait for processing
   // to end even if reading the chunks fails in middle
   FinalizeProcessChunk endProcessChunk(reply,
-                                       m_endpointObj->getDistributedMemberID());
+                                       endpointObj_->getDistributedMemberID());
 
   auto header = responseHeader.header;
   try {
@@ -834,7 +808,7 @@
   LOGFINER(
       "TcrConnection::readMessageChunked: read full reply "
       "from endpoint %s",
-      m_endpoint);
+      endpointObj_->name().c_str());
 }
 
 std::chrono::microseconds TcrConnection::calculateHeaderTimeout(
@@ -852,7 +826,7 @@
   chunkedResponseHeader header;
 
   auto error = receiveData(reinterpret_cast<char*>(receiveBuffer),
-                           HEADER_LENGTH, timeout, true, false);
+                           HEADER_LENGTH, timeout);
   if (error != CONN_NOERR) {
     if (error & CONN_TIMEOUT) {
       throwException(TimeoutException(
@@ -866,12 +840,12 @@
   }
 
   LOGDEBUG(
-      "TcrConnection::readResponseHeader: received header from "
+      "TcrConnection::readResponseHeader(%p): received header from "
       "endpoint %s; bytes: %s",
-      m_endpoint,
+      this, endpointObj_->name().c_str(),
       Utils::convertBytesToString(receiveBuffer, HEADER_LENGTH).c_str());
 
-  auto input = m_connectionManager->getCacheImpl()->createDataInput(
+  auto input = connectionManager_.getCacheImpl()->createDataInput(
       receiveBuffer, HEADER_LENGTH);
   header.messageType = input.readInt32();
   header.numberOfParts = input.readInt32();
@@ -879,11 +853,11 @@
   header.header.chunkLength = input.readInt32();
   header.header.flags = input.read();
   LOGDEBUG(
-      "TcrConnection::readResponseHeader: "
+      "TcrConnection::readResponseHeader(%p): "
       "messageType=%" PRId32 ", numberOfParts=%" PRId32
       ", transactionId=%" PRId32 ", chunkLength=%" PRId32
       ", lastChunkAndSecurityFlags=0x%" PRIx8,
-      header.messageType, header.numberOfParts, header.transactionId,
+      this, header.messageType, header.numberOfParts, header.transactionId,
       header.header.chunkLength, header.header.flags);
 
   return header;
@@ -894,7 +868,7 @@
   chunkHeader header;
 
   auto error = receiveData(reinterpret_cast<char*>(receiveBuffer),
-                           CHUNK_HEADER_LENGTH, timeout, true, false);
+                           CHUNK_HEADER_LENGTH, timeout);
   if (error != CONN_NOERR) {
     if (error & CONN_TIMEOUT) {
       throwException(TimeoutException(
@@ -910,17 +884,17 @@
   LOGDEBUG(
       "TcrConnection::readChunkHeader: received header from "
       "endpoint %s; bytes: %s",
-      m_endpoint,
+      endpointObj_->name().c_str(),
       Utils::convertBytesToString(receiveBuffer, CHUNK_HEADER_LENGTH).c_str());
 
-  auto input = m_connectionManager->getCacheImpl()->createDataInput(
+  auto input = connectionManager_.getCacheImpl()->createDataInput(
       receiveBuffer, CHUNK_HEADER_LENGTH);
   header.chunkLength = input.readInt32();
   header.flags = input.read();
   LOGDEBUG(
-      "TcrConnection::readChunkHeader: "
+      "TcrConnection::readChunkHeader(%p): "
       ", chunkLen=%" PRId32 ", lastChunkAndSecurityFlags=0x%" PRIx8,
-      header.chunkLength, header.flags);
+      this, header.chunkLength, header.flags);
 
   return header;
 }
@@ -929,7 +903,7 @@
     std::chrono::microseconds timeout, int32_t chunkLength) {
   std::vector<uint8_t> chunkBody(chunkLength);
   auto error = receiveData(reinterpret_cast<char*>(chunkBody.data()),
-                           chunkLength, timeout, true, false);
+                           chunkLength, timeout);
   if (error != CONN_NOERR) {
     if (error & CONN_TIMEOUT) {
       throwException(
@@ -943,9 +917,9 @@
   }
 
   LOGDEBUG(
-      "TcrConnection::readChunkBody: received chunk body from endpoint "
+      "TcrConnection::readChunkBody(%p): received chunk body from endpoint "
       "%s; bytes: %s",
-      m_endpoint,
+      this, endpointObj_->name().c_str(),
       Utils::convertBytesToString(chunkBody.data(), chunkLength).c_str());
   return chunkBody;
 }
@@ -959,9 +933,9 @@
   std::vector<uint8_t> chunkBody = readChunkBody(timeout, chunkLength);
 
   // Process the chunk; the actual processing is done by a separate thread
-  // ThinClientBaseDM::m_chunkProcessor.
+  // ThinClientBaseDM::chunkProcessor_.
   reply.processChunk(chunkBody, chunkLength,
-                     m_endpointObj->getDistributedMemberID(),
+                     endpointObj_->getDistributedMemberID(),
                      lastChunkAndSecurityFlags);
   // Return boolean indicating whether or not there are more chunks, i.e.
   // the *inverse* of the flag indicating this is the last chunk.  It's a
@@ -970,12 +944,16 @@
 }
 
 void TcrConnection::close() {
-  TcrMessage* closeMsg = TcrMessage::getCloseConnMessage(
-      m_poolDM->getConnectionManager().getCacheImpl());
+  auto cache = poolDM_->getConnectionManager().getCacheImpl();
+  TcrMessageCloseConnection closeMsg{
+      std::unique_ptr<DataOutput>(
+          new DataOutput(cache->createDataOutput(poolDM_))),
+      cache->isKeepAlive() || poolDM_->isKeepAlive()};
+
   try {
     if (!TcrConnectionManager::TEST_DURABLE_CLIENT_CRASH &&
-        !m_connectionManager->isNetDown()) {
-      send(closeMsg->getMsgData(), closeMsg->getMsgLength(),
+        !connectionManager_.isNetDown()) {
+      send(closeMsg.getMsgData(), closeMsg.getMsgLength(),
            std::chrono::seconds(2), false);
     }
   } catch (Exception& e) {
@@ -988,44 +966,15 @@
 std::vector<int8_t> TcrConnection::readHandshakeData(
     int32_t msgLength, std::chrono::microseconds connectTimeout) {
   ConnErrType error = CONN_NOERR;
-  if (msgLength < 0) {
-    msgLength = 0;
+  if (msgLength <= 0) {
+    return std::vector<int8_t>();
   }
-  std::vector<int8_t> message(msgLength + 1);
-  message.data()[msgLength] = '\0';
-  if (msgLength == 0) {
-    return message;
-  }
-  if ((error = receiveData(reinterpret_cast<char*>(message.data()), msgLength,
-                           connectTimeout, false)) != CONN_NOERR) {
-    GF_SAFE_DELETE_CON(m_conn);
-    if (error & CONN_TIMEOUT) {
-      throwException(
-          TimeoutException("TcrConnection::TcrConnection: "
-                           "Timeout in handshake"));
-    } else {
-      throwException(
-          GeodeIOException("TcrConnection::TcrConnection: "
-                           "Handshake failure"));
-    }
-  } else {
-    return message;
-  }
-}
 
-std::shared_ptr<CacheableBytes> TcrConnection::readHandshakeRawData(
-    int32_t msgLength, std::chrono::microseconds connectTimeout) {
-  ConnErrType error = CONN_NOERR;
-  if (msgLength < 0) {
-    msgLength = 0;
-  }
-  if (msgLength == 0) {
-    return nullptr;
-  }
   std::vector<int8_t> message(msgLength);
+
   if ((error = receiveData(reinterpret_cast<char*>(message.data()), msgLength,
-                           connectTimeout, false)) != CONN_NOERR) {
-    GF_SAFE_DELETE_CON(m_conn);
+                           connectTimeout)) != CONN_NOERR) {
+    conn_.reset();
     if (error & CONN_TIMEOUT) {
       throwException(
           TimeoutException("TcrConnection::TcrConnection: "
@@ -1036,16 +985,10 @@
                            "Handshake failure"));
     }
   } else {
-    return CacheableBytes::create(std::move(message));
+    return message;
   }
 }
 
-std::shared_ptr<CacheableBytes> TcrConnection::readHandshakeByteArray(
-    std::chrono::microseconds connectTimeout) {
-  uint32_t arraySize = readHandshakeArraySize(connectTimeout);
-  return readHandshakeRawData(arraySize, connectTimeout);
-}
-
 // read a byte array
 int32_t TcrConnection::readHandshakeArraySize(
     std::chrono::microseconds connectTimeout) {
@@ -1054,13 +997,13 @@
   int32_t arrayLength = static_cast<uint8_t>(arrayLenHeader[0]);
   if (static_cast<int8_t>(arrayLenHeader[0]) == -2) {
     auto arrayLengthBytes = readHandshakeData(2, connectTimeout);
-    auto dataInput2 = m_connectionManager->getCacheImpl()->createDataInput(
+    auto dataInput2 = connectionManager_.getCacheImpl()->createDataInput(
         reinterpret_cast<const uint8_t*>(arrayLengthBytes.data()),
         arrayLengthBytes.size());
     arrayLength = dataInput2.readInt16();
   } else if (static_cast<int8_t>(arrayLenHeader[0]) == -3) {
     auto arrayLengthBytes = readHandshakeData(4, connectTimeout);
-    auto dataInput2 = m_connectionManager->getCacheImpl()->createDataInput(
+    auto dataInput2 = connectionManager_.getCacheImpl()->createDataInput(
         reinterpret_cast<const uint8_t*>(arrayLengthBytes.data()),
         arrayLengthBytes.size());
     arrayLength = dataInput2.readInt32();
@@ -1097,6 +1040,9 @@
       readHandshakeString(connectTimeout);
     }
   }
+
+  // Geode 1.5+ - Ignore client ping task interval
+  readHandShakeBytes(4, connectTimeout);
 }
 void TcrConnection::readHandShakeBytes(
     int numberOfBytes, std::chrono::microseconds connectTimeout) {
@@ -1105,16 +1051,16 @@
   _GEODE_NEW(recvMessage, uint8_t[numberOfBytes]);
 
   if ((error = receiveData(reinterpret_cast<char*>(recvMessage), numberOfBytes,
-                           connectTimeout, false)) != CONN_NOERR) {
+                           connectTimeout)) != CONN_NOERR) {
     if (error & CONN_TIMEOUT) {
       _GEODE_SAFE_DELETE_ARRAY(recvMessage);
-      GF_SAFE_DELETE_CON(m_conn);
+      conn_.reset();
       throwException(
           TimeoutException("TcrConnection::TcrConnection: "
                            "Timeout in handshake"));
     } else {
       _GEODE_SAFE_DELETE_ARRAY(recvMessage);
-      GF_SAFE_DELETE_CON(m_conn);
+      conn_.reset();
       throwException(
           GeodeIOException("TcrConnection::TcrConnection: "
                            "Handshake failure"));
@@ -1124,45 +1070,13 @@
   _GEODE_SAFE_DELETE_ARRAY(recvMessage);
 }
 
-int32_t TcrConnection::readHandShakeInt(
-    std::chrono::microseconds connectTimeout) {
-  ConnErrType error = CONN_NOERR;
-  uint8_t* recvMessage;
-  _GEODE_NEW(recvMessage, uint8_t[4]);
-
-  if ((error = receiveData(reinterpret_cast<char*>(recvMessage), 4,
-                           connectTimeout, false)) != CONN_NOERR) {
-    if (error & CONN_TIMEOUT) {
-      _GEODE_SAFE_DELETE_ARRAY(recvMessage);
-      GF_SAFE_DELETE_CON(m_conn);
-      throwException(
-          TimeoutException("TcrConnection::TcrConnection: "
-                           "Timeout in handshake"));
-    } else {
-      _GEODE_SAFE_DELETE_ARRAY(recvMessage);
-      GF_SAFE_DELETE_CON(m_conn);
-      throwException(
-          GeodeIOException("TcrConnection::TcrConnection: "
-                           "Handshake failure"));
-    }
-  }
-
-  auto di =
-      m_connectionManager->getCacheImpl()->createDataInput(recvMessage, 4);
-  int32_t val = di.readInt32();
-
-  _GEODE_SAFE_DELETE_ARRAY(recvMessage);
-
-  return val;
-}
-
 std::shared_ptr<CacheableString> TcrConnection::readHandshakeString(
     std::chrono::microseconds connectTimeout) {
   ConnErrType error = CONN_NOERR;
 
   char cstypeid;
-  if (receiveData(&cstypeid, 1, connectTimeout, false) != CONN_NOERR) {
-    GF_SAFE_DELETE_CON(m_conn);
+  if (receiveData(&cstypeid, 1, connectTimeout) != CONN_NOERR) {
+    conn_.reset();
     if (error & CONN_TIMEOUT) {
       LOGFINE("Timeout receiving string typeid");
       throwException(
@@ -1185,7 +1099,7 @@
     }
     case DSCode::CacheableASCIIString: {
       auto lenBytes = readHandshakeData(2, connectTimeout);
-      auto lenDI = m_connectionManager->getCacheImpl()->createDataInput(
+      auto lenDI = connectionManager_.getCacheImpl()->createDataInput(
           reinterpret_cast<const uint8_t*>(lenBytes.data()), lenBytes.size());
       length = lenDI.readInt16();
 
@@ -1235,13 +1149,12 @@
     case DSCode::CacheableStack:
     case DSCode::CacheableASCIIStringHuge:
     case DSCode::CacheableStringHuge:
-    case DSCode::InternalDistributedMember:
-    case DSCode::CacheableEnum:
-    case DSCode::ClientProxyMembershipId:
     case DSCode::CacheableUserData:
+    case DSCode::CacheableUserData2:
     case DSCode::CacheableUserData4:
-    case DSCode::PDX: {
-      GF_SAFE_DELETE_CON(m_conn);
+    case DSCode::PDX:
+    case DSCode::PDX_ENUM: {
+      conn_.reset();
       throwException(
           GeodeIOException("TcrConnection::TcrConnection: "
                            "Handshake failure: Unexpected string type ID"));
@@ -1257,16 +1170,16 @@
   std::vector<char> recvMessage(length + 1);
   recvMessage[length] = '\0';
 
-  if ((error = receiveData(recvMessage.data(), length, connectTimeout,
-                           false)) != CONN_NOERR) {
+  if ((error = receiveData(recvMessage.data(), length, connectTimeout)) !=
+      CONN_NOERR) {
     if (error & CONN_TIMEOUT) {
-      GF_SAFE_DELETE_CON(m_conn);
+      conn_.reset();
       LOGFINE("Timeout receiving string data");
       throwException(
           TimeoutException("TcrConnection::TcrConnection: "
                            "Timeout in handshake reading string bytes"));
     } else {
-      GF_SAFE_DELETE_CON(m_conn);
+      conn_.reset();
       LOGFINE("IO error receiving string data");
       throwException(
           GeodeIOException("TcrConnection::TcrConnection: "
@@ -1279,13 +1192,15 @@
     return retval;
   }
 }
+
 bool TcrConnection::hasExpired(const std::chrono::milliseconds& expiryTime) {
   if (expiryTime <= std::chrono::milliseconds::zero()) {
     return false;
   }
   auto variadicExpiryTime =
-      expiryTime + (expiryTime * m_expiryTimeVariancePercentage) / 100;
-  return (clock::now() - m_creationTime) > variadicExpiryTime;
+      expiryTime + (expiryTime * expiryTimeVariancePercentage_) / 100;
+  return (std::chrono::steady_clock::now() - creationTime_) >
+         variadicExpiryTime;
 }
 
 bool TcrConnection::isIdle(const std::chrono::milliseconds& idleTime) {
@@ -1293,13 +1208,15 @@
     return false;
   }
 
-  return (clock::now() - m_lastAccessed) > idleTime;
+  return (std::chrono::steady_clock::now() - lastAccessed_) > idleTime;
 }
 
-void TcrConnection::touch() { m_lastAccessed = clock::now(); }
+void TcrConnection::touch() {
+  lastAccessed_ = std::chrono::steady_clock::now();
+}
 
-TcrConnection::time_point TcrConnection::getLastAccessed() {
-  return m_lastAccessed;
+std::chrono::steady_clock::time_point TcrConnection::getLastAccessed() {
+  return lastAccessed_;
 }
 
 uint8_t TcrConnection::getOverrides(const SystemProperties* props) {
@@ -1316,20 +1233,11 @@
 }
 
 void TcrConnection::updateCreationTime() {
-  m_creationTime = clock::now();
+  creationTime_ = std::chrono::steady_clock::now();
   touch();
 }
 
-TcrConnection::~TcrConnection() {
-  LOGDEBUG("Tcrconnection destructor %p . conn ref to endopint %d", this,
-           m_endpointObj->getConnRefCounter());
-  m_endpointObj->addConnRefCounter(-1);
-  if (m_conn != nullptr) {
-    LOGDEBUG("closing the connection");
-    m_conn->close();
-    GF_SAFE_DELETE_CON(m_conn);
-  }
-}
+TcrConnection::~TcrConnection() {}
 
 bool TcrConnection::setAndGetBeingUsed(volatile bool isBeingUsed,
                                        bool forTransaction) {
@@ -1337,28 +1245,28 @@
 
   if (!forTransaction) {
     if (isBeingUsed) {
-      if (m_isUsed == 1 || m_isUsed == 2) return false;
-      if (m_isUsed.compare_exchange_strong(currentValue, 1)) return true;
+      if (isUsed_ == 1 || isUsed_ == 2) return false;
+      if (isUsed_.compare_exchange_strong(currentValue, 1)) return true;
       return false;
     } else {
-      m_isUsed = 0;
+      isUsed_ = 0;
       return true;
     }
   } else {
     if (isBeingUsed) {
-      if (m_isUsed == 1) {  // already used
+      if (isUsed_ == 1) {  // already used
         return false;
       }
-      if (m_isUsed == 2) {  // transaction thread has set, reused it
+      if (isUsed_ == 2) {  // transaction thread has set, reused it
         return true;
       }
-      if (m_isUsed.compare_exchange_strong(currentValue,
-                                           2 /*for transaction*/)) {
+      if (isUsed_.compare_exchange_strong(currentValue,
+                                          2 /*for transaction*/)) {
         return true;
       }
       return false;
     } else {
-      // m_isUsed = 0;//this will done by releasing the connection by
+      // isUsed_ = 0;//this will done by releasing the connection by
       // transaction at the end of transaction
       return true;
     }
diff --git a/cppcache/src/TcrConnection.hpp b/cppcache/src/TcrConnection.hpp
index c0bbaf0..bc26bc4 100644
--- a/cppcache/src/TcrConnection.hpp
+++ b/cppcache/src/TcrConnection.hpp
@@ -29,6 +29,7 @@
 
 #include "Connector.hpp"
 #include "TcrMessage.hpp"
+#include "util/concurrent/binary_semaphore.hpp"
 #include "util/synchronized_set.hpp"
 
 #define DEFAULT_TIMEOUT_RETRIES 12
@@ -49,14 +50,6 @@
 #define SECURITY_CREDENTIALS_NORMAL 1
 #define SECURITY_MULTIUSER_NOTIFICATIONCHANNEL 3
 
-/** Closes and Deletes connection only if it exists */
-#define GF_SAFE_DELETE_CON(x) \
-  do {                        \
-    x->close();               \
-    delete x;                 \
-    x = nullptr;              \
-  } while (0)
-
 namespace apache {
 namespace geode {
 namespace client {
@@ -93,9 +86,6 @@
 class TcrConnectionManager;
 class TcrConnection {
  public:
-  using clock = std::chrono::steady_clock;
-  using time_point = clock::time_point;
-
   /** Create one connection, endpoint is in format of hostname:portno
    * It will do handshake with j-server. There're 2 types of handshakes:
    * 1) handshake for request
@@ -120,43 +110,12 @@
    * @param     ports     List of local ports for connections to endpoint
    */
   bool initTcrConnection(
-      TcrEndpoint* endpointObj, const char* endpoint,
+      std::shared_ptr<TcrEndpoint> endpointObj,
       synchronized_set<std::unordered_set<uint16_t>>& ports,
       bool isClientNotification = false, bool isSecondary = false,
       std::chrono::microseconds connectTimeout = DEFAULT_CONNECT_TIMEOUT);
 
-  TcrConnection(const TcrConnectionManager& connectionManager,
-                volatile const bool& isConnected)
-      : connectionId(0),
-        m_connectionManager(&connectionManager),
-        m_endpoint(nullptr),
-        m_endpointObj(nullptr),
-        m_connected(isConnected),
-        m_conn(nullptr),
-        m_hasServerQueue(NON_REDUNDANT_SERVER),
-        m_queueSize(0),
-        m_port(0),
-        m_chunksProcessSema(0),
-        m_isBeingUsed(false),
-        m_isUsed(0),
-        m_poolDM(nullptr) {
-    auto nowTimePoint = clock::now().time_since_epoch();
-    auto now_ms =
-        std::chrono::duration_cast<std::chrono::milliseconds>(nowTimePoint)
-            .count();
-    auto now_s =
-        std::chrono::duration_cast<std::chrono::seconds>(nowTimePoint).count();
-    auto seed = (now_s * 1000) + (now_ms / 1000);
-    srand(static_cast<unsigned int>(seed));
-    int numbers = 21;
-    int random = rand() % numbers + 1;
-    if (random > 10) {
-      random = random - numbers;
-    }
-    m_expiryTimeVariancePercentage = random;
-    LOGDEBUG("m_expiryTimeVariancePercentage set to: %d",
-             m_expiryTimeVariancePercentage);
-  }
+  explicit TcrConnection(const TcrConnectionManager& connectionManager);
 
   /* destroy the connection */
   ~TcrConnection();
@@ -227,11 +186,6 @@
             std::chrono::microseconds sendTimeoutSec = DEFAULT_WRITE_TIMEOUT,
             bool checkConnected = true);
 
-  void send(std::chrono::microseconds& timeSpent, const char* buffer,
-            size_t len,
-            std::chrono::microseconds sendTimeoutSec = DEFAULT_WRITE_TIMEOUT,
-            bool checkConnected = true);
-
   /**
    * This method is for receiving client notification. It will read 2 times as
    * reading reply in sendRequest()
@@ -284,23 +238,21 @@
 
   //  Durable clients: return true if server has HA queue.
   ServerQueueStatus inline getServerQueueStatus(int32_t& queueSize) {
-    queueSize = m_queueSize;
-    return m_hasServerQueue;
+    queueSize = queueSize_;
+    return hasServerQueue_;
   }
 
-  uint16_t inline getPort() { return m_port; }
+  uint16_t inline getPort() { return port_; }
 
-  TcrEndpoint* getEndpointObject() const { return m_endpointObj; }
-  bool isBeingUsed() { return m_isBeingUsed; }
-  bool setAndGetBeingUsed(
-      volatile bool isBeingUsed,
-      bool forTransaction);  // { m_isBeingUsed = isBeingUsed ;}
+  TcrEndpoint* getEndpointObject() const { return endpointObj_.get(); }
+
+  bool setAndGetBeingUsed(volatile bool isBeingUsed, bool forTransaction);
 
   // helpers for pool connection manager
   void touch();
   bool hasExpired(const std::chrono::milliseconds& expiryTime);
   bool isIdle(const std::chrono::milliseconds& idleTime);
-  time_point getLastAccessed();
+  std::chrono::steady_clock::time_point getLastAccessed();
   void updateCreationTime();
 
   int64_t getConnectionId() {
@@ -314,13 +266,13 @@
   }
 
   const TcrConnectionManager& getConnectionManager() {
-    return *m_connectionManager;
+    return connectionManager_;
   }
 
  private:
   int64_t connectionId;
-  const TcrConnectionManager* m_connectionManager;
-  int m_expiryTimeVariancePercentage = 0;
+  const TcrConnectionManager& connectionManager_;
+  int expiryTimeVariancePercentage_ = 0;
 
   std::chrono::microseconds calculateHeaderTimeout(
       std::chrono::microseconds receiveTimeout, bool retry);
@@ -347,11 +299,6 @@
    */
   uint8_t getOverrides(const SystemProperties* props);
 
-  /**
-   * To read the from stream
-   */
-  int32_t readHandShakeInt(std::chrono::microseconds connectTimeout);
-
   /*
    * To read the arraysize
    */
@@ -364,9 +311,9 @@
                           std::chrono::microseconds connectTimeout);
 
   /** Create a normal or SSL connection */
-  Connector* createConnection(
+  void createConnection(
       const std::string& address,
-      std::chrono::microseconds waitSeconds = DEFAULT_CONNECT_TIMEOUT,
+      std::chrono::microseconds wait = DEFAULT_CONNECT_TIMEOUT,
       int32_t maxBuffSizePool = 0);
 
   /**
@@ -376,12 +323,6 @@
       int32_t msgLength, std::chrono::microseconds connectTimeout);
 
   /**
-   * Reads raw bytes (without appending nullptr terminator) from socket and
-   * handles error conditions in case of Handshake.
-   */
-  std::shared_ptr<CacheableBytes> readHandshakeRawData(
-      int32_t msgLength, std::chrono::microseconds connectTimeout);
-  /**
    * Reads a string from socket and handles error conditions in case of
    * Handshake.
    */
@@ -389,52 +330,35 @@
       std::chrono::microseconds connectTimeout);
 
   /**
-   * Reads a byte array (using initial length) from socket and handles error
-   * conditions in case of Handshake.
-   */
-  std::shared_ptr<CacheableBytes> readHandshakeByteArray(
-      std::chrono::microseconds connectTimeout);
-
-  /**
    * Send data to the connection till sendTimeout
    */
   ConnErrType sendData(const char* buffer, size_t length,
-                       std::chrono::microseconds sendTimeout,
-                       bool checkConnected = true);
-
-  ConnErrType sendData(std::chrono::microseconds& timeSpent, const char* buffer,
-                       size_t length, std::chrono::microseconds sendTimeout,
-                       bool checkConnected = true);
+                       std::chrono::microseconds sendTimeout);
 
   /**
    * Read data from the connection till receiveTimeoutSec
    */
   ConnErrType receiveData(char* buffer, size_t length,
-                          std::chrono::microseconds receiveTimeoutSec,
-                          bool checkConnected = true,
-                          bool isNotificationMessage = false);
+                          std::chrono::microseconds receiveTimeoutSec);
 
-  const char* m_endpoint;
-  TcrEndpoint* m_endpointObj;
-  volatile const bool& m_connected;
-  Connector* m_conn;
-  ServerQueueStatus m_hasServerQueue;
-  int32_t m_queueSize;
-  uint16_t m_port;
+  std::shared_ptr<TcrEndpoint> endpointObj_;
+  std::unique_ptr<Connector> conn_;
+  ServerQueueStatus hasServerQueue_;
+  int32_t queueSize_;
+  uint16_t port_;
 
   // semaphore to synchronize with the chunked response processing thread
-  ACE_Semaphore m_chunksProcessSema;
+  binary_semaphore chunks_process_semaphore_;
 
-  time_point m_creationTime;
-  time_point m_lastAccessed;
+  std::chrono::steady_clock::time_point creationTime_;
+  std::chrono::steady_clock::time_point lastAccessed_;
 
   // Disallow copy constructor and assignment operator.
   TcrConnection(const TcrConnection&);
   TcrConnection& operator=(const TcrConnection&);
-  volatile bool m_isBeingUsed;
-  std::atomic<uint32_t> m_isUsed;
-  ThinClientPoolDM* m_poolDM;
-  bool useReplyTimeout(const TcrMessage& request) const;
+  volatile bool isBeingUsed_;
+  std::atomic<uint32_t> isUsed_;
+  ThinClientPoolDM* poolDM_;
   std::chrono::microseconds sendWithTimeouts(
       const char* data, size_t len, std::chrono::microseconds sendTimeout,
       std::chrono::microseconds receiveTimeout);
diff --git a/cppcache/src/TcrConnectionManager.cpp b/cppcache/src/TcrConnectionManager.cpp
index c605f35..9157129 100644
--- a/cppcache/src/TcrConnectionManager.cpp
+++ b/cppcache/src/TcrConnectionManager.cpp
@@ -24,17 +24,12 @@
 #include <geode/SystemProperties.hpp>
 
 #include "CacheImpl.hpp"
-#include "ExpiryHandler_T.hpp"
-#include "ExpiryTaskManager.hpp"
-#include "RemoteQueryService.hpp"
-#include "ServerLocation.hpp"
+#include "FunctionExpiryTask.hpp"
 #include "TcrConnection.hpp"
 #include "TcrEndpoint.hpp"
 #include "TcrHADistributionManager.hpp"
 #include "ThinClientBaseDM.hpp"
-#include "ThinClientCacheDistributionManager.hpp"
 #include "ThinClientHARegion.hpp"
-#include "ThinClientLocatorHelper.hpp"
 #include "ThinClientRedundancyManager.hpp"
 #include "ThinClientRegion.hpp"
 #include "Utils.hpp"
@@ -46,22 +41,20 @@
 
 volatile bool TcrConnectionManager::TEST_DURABLE_CLIENT_CRASH = false;
 
-const char *TcrConnectionManager::NC_Redundancy = "NC Redundancy";
 const char *TcrConnectionManager::NC_Failover = "NC Failover";
 const char *TcrConnectionManager::NC_CleanUp = "NC CleanUp";
 
 TcrConnectionManager::TcrConnectionManager(CacheImpl *cache)
     : m_cache(cache),
       m_initGuard(false),
-      m_failoverSema(0),
+      failover_semaphore_(0),
       m_failoverTask(nullptr),
-      m_cleanupSema(0),
+      cleanup_semaphore_(0),
       m_cleanupTask(nullptr),
-      m_pingTaskId(-1),
-      m_servermonitorTaskId(-1),
+      ping_task_id_(ExpiryTask::invalid()),
       // Create the queues with flag to not delete the objects
-      m_notifyCleanupSemaList(false),
-      m_redundancySema(0),
+      notify_cleanup_semaphore_list_(false),
+      redundancy_semaphore_(0),
       m_redundancyTask(nullptr),
       m_isDurable(false),
       m_isNetDown(false) {
@@ -69,9 +62,6 @@
       new ThinClientRedundancyManager(this));
 }
 
-ExpiryTaskManager::id_type TcrConnectionManager::getPingTaskId() {
-  return m_pingTaskId;
-}
 void TcrConnectionManager::init(bool isPool) {
   if (!m_initGuard) {
     m_initGuard = true;
@@ -80,17 +70,19 @@
   }
   auto &props = m_cache->getDistributedSystem().getSystemProperties();
   m_isDurable = !props.durableClientId().empty();
-  auto pingInterval = (props.pingInterval() / 2);
+
+  auto interval = props.pingInterval();
   if (!isPool) {
-    ACE_Event_Handler *connectionChecker =
-        new ExpiryHandler_T<TcrConnectionManager>(
-            this, &TcrConnectionManager::checkConnection);
-    m_pingTaskId = m_cache->getExpiryTaskManager().scheduleExpiryTask(
-        connectionChecker, std::chrono::seconds(10), pingInterval, false);
+    auto &expiry_manager = m_cache->getExpiryTaskManager();
+    auto task = std::make_shared<FunctionExpiryTask>(
+        expiry_manager, [this]() { ping_endpoints(); });
+
+    ping_task_id_ = expiry_manager.schedule(std::move(task),
+                                            std::chrono::seconds(10), interval);
     LOGFINE(
         "TcrConnectionManager::TcrConnectionManager Registered ping "
         "task with id = %ld, interval = %ld",
-        m_pingTaskId, pingInterval.count());
+        ping_task_id_, interval.count());
   }
 
   m_redundancyManager->m_HAenabled = false;
@@ -122,13 +114,11 @@
 void TcrConnectionManager::close() {
   LOGFINE("TcrConnectionManager is closing");
 
-  if (m_pingTaskId > 0) {
-    m_cache->getExpiryTaskManager().cancelTask(m_pingTaskId);
-  }
+  m_cache->getExpiryTaskManager().cancel(ping_task_id_);
 
   if (m_failoverTask != nullptr) {
     m_failoverTask->stopNoblock();
-    m_failoverSema.release();
+    failover_semaphore_.release();
     m_failoverTask->wait();
     m_failoverTask = nullptr;
   }
@@ -143,7 +133,7 @@
 TcrConnectionManager::~TcrConnectionManager() {
   if (m_cleanupTask != nullptr) {
     m_cleanupTask->stopNoblock();
-    m_cleanupSema.release();
+    cleanup_semaphore_.release();
     m_cleanupTask->wait();
     // Clean notification lists if something remains in there; see bug #250
     cleanNotificationLists();
@@ -153,16 +143,9 @@
     //  cleanup of endpoints, when regions are destroyed via notification
     {
       auto &&guard = m_endpoints.make_lock();
-      auto numEndPoints = m_endpoints.size();
-      if (numEndPoints > 0) {
+      if (m_endpoints.size() > 0) {
         LOGFINE("TCCM: endpoints remain in destructor");
       }
-      for (const auto &iter : m_endpoints) {
-        auto ep = iter.second;
-        LOGFINE("TCCM: forcing endpoint delete for %s in destructor",
-                ep->name().c_str());
-        _GEODE_SAFE_DELETE(ep);
-      }
     }
   }
   TcrConnectionManager::TEST_DURABLE_CLIENT_CRASH = false;
@@ -189,7 +172,7 @@
             "TCCM 2: incremented region reference count for endpoint %s "
             "to %d",
             ep->name().c_str(), ep->numRegions());
-        endpoints.push_back(ep);
+        endpoints.push_back(ep.get());
       }
     } else {
       for (const auto &iter : endpointStrs) {
@@ -216,14 +199,15 @@
 
 TcrEndpoint *TcrConnectionManager::addRefToTcrEndpoint(std::string endpointName,
                                                        ThinClientBaseDM *dm) {
-  TcrEndpoint *ep = nullptr;
+  std::shared_ptr<TcrEndpoint> ep;
 
   auto &&guard = m_endpoints.make_lock();
   const auto &find = m_endpoints.find(endpointName);
   if (find == m_endpoints.end()) {
     // this endpoint does not exist
-    ep = new TcrEndpoint(endpointName, m_cache, m_failoverSema, m_cleanupSema,
-                         m_redundancySema, dm, false);
+    ep = std::make_shared<TcrEndpoint>(endpointName, m_cache,
+                                       failover_semaphore_, cleanup_semaphore_,
+                                       redundancy_semaphore_, dm, false);
     m_endpoints.emplace(endpointName, ep);
   } else {
     ep = find->second;
@@ -233,7 +217,7 @@
   LOGFINER("TCCM: incremented region reference count for endpoint %s to %d",
            ep->name().c_str(), ep->numRegions());
 
-  return ep;
+  return ep.get();
 }
 
 void TcrConnectionManager::disconnect(ThinClientBaseDM *distMng,
@@ -272,41 +256,26 @@
   return hasRemovedEndpoint;
 }
 
-int TcrConnectionManager::processEventIdMap(const ACE_Time_Value &currTime,
-                                            const void *) {
-  return m_redundancyManager->processEventIdMap(currTime, nullptr);
-}
-
-int TcrConnectionManager::checkConnection(const ACE_Time_Value &,
-                                          const void *) {
+void TcrConnectionManager::ping_endpoints() {
   auto &&guard = m_endpoints.make_lock();
   for (const auto &currItr : m_endpoints) {
     if (currItr.second->connected() && !m_isNetDown) {
       currItr.second->pingServer();
     }
   }
-  return 0;
-}
-
-int TcrConnectionManager::checkRedundancy(const ACE_Time_Value &,
-                                          const void *) {
-  m_redundancySema.release();
-  return 0;
 }
 
 void TcrConnectionManager::failover(std::atomic<bool> &isRunning) {
   LOGFINE("TcrConnectionManager: starting failover thread");
+
+  failover_semaphore_.acquire();
   while (isRunning) {
-    m_failoverSema.acquire();
-    if (isRunning && !m_isNetDown) {
+    if (!m_isNetDown) {
       try {
         std::lock_guard<decltype(m_distMngrsLock)> guard(m_distMngrsLock);
         for (const auto &it : m_distMngrs) {
           it->failover();
         }
-        while (m_failoverSema.tryacquire() != -1) {
-          ;
-        }
       } catch (const Exception &e) {
         LOGERROR(e.what());
       } catch (const std::exception &e) {
@@ -317,7 +286,10 @@
             "different endpoint");
       }
     }
+
+    failover_semaphore_.acquire();
   }
+
   LOGFINE("TcrConnectionManager: ending failover thread");
 }
 
@@ -325,7 +297,7 @@
     std::vector<TcrEndpoint *> &endpoints) {
   auto &&guard = m_endpoints.make_lock();
   for (const auto &currItr : m_endpoints) {
-    endpoints.push_back(currItr.second);
+    endpoints.push_back(currItr.second.get());
   }
 }
 
@@ -340,19 +312,13 @@
   // TcrHADistributionManagers).
 
   GfErrType err = GF_NOERR;
-  GfErrType opErr = GF_NOERR;
   std::lock_guard<decltype(m_distMngrsLock)> guard(m_distMngrsLock);
-  std::list<ThinClientBaseDM *>::iterator begin = m_distMngrs.begin();
-  std::list<ThinClientBaseDM *>::iterator end = m_distMngrs.end();
-  for (std::list<ThinClientBaseDM *>::iterator it = begin; it != end; ++it) {
-    TcrHADistributionManager *tcrHADM =
-        dynamic_cast<TcrHADistributionManager *>(*it);
-    if (tcrHADM != nullptr) {
-      if ((opErr = tcrHADM->registerInterestForRegion(ep, request, reply)) !=
-          GF_NOERR) {
-        if (err == GF_NOERR) {
-          err = opErr;
-        }
+
+  for (const auto &it : m_distMngrs) {
+    if (auto tcrHADM = dynamic_cast<TcrHADistributionManager *>(it)) {
+      auto opErr = tcrHADM->registerInterestForRegion(ep, request, reply);
+      if (err == GF_NOERR) {
+        err = opErr;
       }
     }
   }
@@ -394,7 +360,7 @@
   auto &&guard = m_endpoints.make_lock();
   auto currItr = m_endpoints.begin();
   while (currItr != m_endpoints.end()) {
-    if (removeRefToEndpoint(currItr->second)) {
+    if (removeRefToEndpoint(currItr->second.get())) {
       currItr = m_endpoints.begin();
     } else {
       currItr++;
@@ -430,44 +396,36 @@
 
 void TcrConnectionManager::redundancy(std::atomic<bool> &isRunning) {
   LOGFINE("Starting subscription maintain redundancy thread.");
+  redundancy_semaphore_.acquire();
+
   while (isRunning) {
-    m_redundancySema.acquire();
-    if (isRunning && !m_isNetDown) {
+    if (!m_isNetDown) {
       m_redundancyManager->maintainRedundancyLevel();
-      while (m_redundancySema.tryacquire() != -1) {
-        ;
-      }
     }
+
+    redundancy_semaphore_.acquire();
   }
   LOGFINE("Ending subscription maintain redundancy thread.");
 }
 
 void TcrConnectionManager::addNotificationForDeletion(
     Task<TcrEndpoint> *notifyReceiver, TcrConnection *notifyConnection,
-    ACE_Semaphore &notifyCleanupSema) {
+    binary_semaphore &notifyCleanupSema) {
   std::lock_guard<decltype(m_notificationLock)> guard(m_notificationLock);
   m_connectionReleaseList.put(notifyConnection);
   m_receiverReleaseList.put(notifyReceiver);
-  m_notifyCleanupSemaList.put(&notifyCleanupSema);
+  notify_cleanup_semaphore_list_.put(&notifyCleanupSema);
 }
 
 void TcrConnectionManager::cleanup(std::atomic<bool> &isRunning) {
   LOGFINE("TcrConnectionManager: starting cleanup thread");
-  do {
-    //  If we block on acquire, the queue must be empty (precondition).
-    if (m_receiverReleaseList.size() == 0) {
-      LOGDEBUG(
-          "TcrConnectionManager::cleanup(): waiting to acquire cleanup "
-          "semaphore.");
-      m_cleanupSema.acquire();
-    }
+
+  cleanup_semaphore_.acquire();
+
+  while (isRunning) {
     cleanNotificationLists();
-
-    while (m_cleanupSema.tryacquire() != -1) {
-      ;
-    }
-
-  } while (isRunning);
+    cleanup_semaphore_.acquire();
+  }
 
   LOGFINE("TcrConnectionManager: ending cleanup thread");
   //  Postcondition - all notification channels should be cleaned up by the end
@@ -477,7 +435,7 @@
 void TcrConnectionManager::cleanNotificationLists() {
   Task<TcrEndpoint> *notifyReceiver;
   TcrConnection *notifyConnection;
-  ACE_Semaphore *notifyCleanupSema;
+  binary_semaphore *semaphore;
 
   while (true) {
     {
@@ -485,12 +443,12 @@
       notifyReceiver = m_receiverReleaseList.get();
       if (!notifyReceiver) break;
       notifyConnection = m_connectionReleaseList.get();
-      notifyCleanupSema = m_notifyCleanupSemaList.get();
+      semaphore = notify_cleanup_semaphore_list_.get();
     }
     notifyReceiver->wait();
     //_GEODE_SAFE_DELETE(notifyReceiver);
     _GEODE_SAFE_DELETE(notifyConnection);
-    notifyCleanupSema->release();
+    semaphore->release();
   }
 }
 
@@ -508,6 +466,18 @@
   }
   return false;
 }
+// TESTING: Disconnections of endpoint - return number of times that endpoint
+// disconnected
+int TcrConnectionManager::getNumberOfTimeEndpointDisconnected(
+    const std::string &endpoint) {
+  auto &&guard = m_endpoints.make_lock();
+  for (auto &currItr : m_endpoints) {
+    auto ep = currItr.second;
+    const std::string epName = ep->name();
+    if (epName == endpoint) return ep->numberOfTimesFailed();
+  }
+  throw IllegalStateException("Endpoint not found");
+}
 
 GfErrType TcrConnectionManager::sendSyncRequestCq(
     TcrMessage &request, TcrMessageReply &reply,
diff --git a/cppcache/src/TcrConnectionManager.hpp b/cppcache/src/TcrConnectionManager.hpp
index ed8763b..2386db7 100644
--- a/cppcache/src/TcrConnectionManager.hpp
+++ b/cppcache/src/TcrConnectionManager.hpp
@@ -28,7 +28,7 @@
 
 #include <geode/internal/geode_globals.hpp>
 
-#include "ExpiryTaskManager.hpp"
+#include "ExpiryTask.hpp"
 #include "Queue.hpp"
 #include "Task.hpp"
 #include "ThinClientRedundancyManager.hpp"
@@ -50,6 +50,10 @@
  */
 class TcrConnectionManager {
  public:
+  using endpoint_map_type = synchronized_map<
+      std::unordered_map<std::string, std::shared_ptr<TcrEndpoint>>,
+      std::recursive_mutex>;
+
   explicit TcrConnectionManager(CacheImpl* cache);
   ~TcrConnectionManager();
   void init(bool isPool = false);
@@ -59,10 +63,8 @@
   void disconnect(ThinClientBaseDM* distMng,
                   std::vector<TcrEndpoint*>& endpoints,
                   bool keepEndpoints = false);
-  int checkConnection(const ACE_Time_Value&, const void*);
-  int checkRedundancy(const ACE_Time_Value&, const void*);
-  int processEventIdMap(const ACE_Time_Value&, const void*);
-  ExpiryTaskManager::id_type getPingTaskId();
+
+  void ping_endpoints();
   void close();
 
   void readyForEvents();
@@ -74,11 +76,7 @@
   void setClientCrashTEST() { TEST_DURABLE_CLIENT_CRASH = true; }
   volatile static bool TEST_DURABLE_CLIENT_CRASH;
 
-  inline synchronized_map<std::unordered_map<std::string, TcrEndpoint*>,
-                          std::recursive_mutex>&
-  getGlobalEndpoints() {
-    return m_endpoints;
-  }
+  inline endpoint_map_type& getGlobalEndpoints() { return m_endpoints; }
 
   void getAllEndpoints(std::vector<TcrEndpoint*>& endpoints);
   int getNumEndPoints();
@@ -90,15 +88,13 @@
 
   void addNotificationForDeletion(Task<TcrEndpoint>* notifyReceiver,
                                   TcrConnection* notifyConnection,
-                                  ACE_Semaphore& notifyCleanupSema);
+                                  binary_semaphore& notifyCleanupSema);
 
   void processMarker();
 
   bool getEndpointStatus(const std::string& endpoint);
 
-  void addPoolEndpoints(TcrEndpoint* endpoint) {
-    m_poolEndpointList.push_back(endpoint);
-  }
+  int getNumberOfTimeEndpointDisconnected(const std::string& endpoint);
 
   bool isDurable() { return m_isDurable; }
   bool haEnabled() { return m_redundancyManager->m_HAenabled; }
@@ -112,7 +108,7 @@
       TcrHADistributionManager* theHADM = nullptr,
       ThinClientRegion* region = nullptr);
 
-  inline void triggerRedundancyThread() { m_redundancySema.release(); }
+  inline void triggerRedundancyThread() { redundancy_semaphore_.release(); }
 
   inline void acquireRedundancyLock() {
     m_redundancyManager->acquireRedundancyLock();
@@ -141,16 +137,13 @@
  private:
   CacheImpl* m_cache;
   volatile bool m_initGuard;
-  synchronized_map<std::unordered_map<std::string, TcrEndpoint*>,
-                   std::recursive_mutex>
-      m_endpoints;
-  std::list<TcrEndpoint*> m_poolEndpointList;
+  endpoint_map_type m_endpoints;
 
   // key is hostname:port
   std::list<ThinClientBaseDM*> m_distMngrs;
   std::recursive_mutex m_distMngrsLock;
 
-  ACE_Semaphore m_failoverSema;
+  binary_semaphore failover_semaphore_;
   std::unique_ptr<Task<TcrConnectionManager>> m_failoverTask;
 
   bool removeRefToEndpoint(TcrEndpoint* ep, bool keepEndpoint = false);
@@ -160,16 +153,15 @@
   void initializeHAEndpoints(const char* endpointsStr);
   void removeHAEndpoints();
 
-  ACE_Semaphore m_cleanupSema;
+  binary_semaphore cleanup_semaphore_;
   std::unique_ptr<Task<TcrConnectionManager>> m_cleanupTask;
 
-  ExpiryTaskManager::id_type m_pingTaskId;
-  ExpiryTaskManager::id_type m_servermonitorTaskId;
+  ExpiryTask::id_t ping_task_id_;
   Queue<Task<TcrEndpoint>*> m_receiverReleaseList;
   Queue<TcrConnection*> m_connectionReleaseList;
-  Queue<ACE_Semaphore*> m_notifyCleanupSemaList;
+  Queue<binary_semaphore*> notify_cleanup_semaphore_list_;
 
-  ACE_Semaphore m_redundancySema;
+  binary_semaphore redundancy_semaphore_;
   std::unique_ptr<Task<TcrConnectionManager>> m_redundancyTask;
   std::recursive_mutex m_notificationLock;
   bool m_isDurable;
@@ -192,7 +184,6 @@
   friend class DistManagersLockGuard;
   friend class ThinClientPoolDM;
   friend class ThinClientPoolHADM;
-  static const char* NC_Redundancy;
   static const char* NC_Failover;
   static const char* NC_CleanUp;
 };
diff --git a/cppcache/src/TcrDistributionManager.hpp b/cppcache/src/TcrDistributionManager.hpp
index 2a7907d..56b525d 100644
--- a/cppcache/src/TcrDistributionManager.hpp
+++ b/cppcache/src/TcrDistributionManager.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_TCRDISTRIBUTIONMANAGER_H_
-#define GEODE_TCRDISTRIBUTIONMANAGER_H_
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -20,6 +15,11 @@
  * limitations under the License.
  */
 
+#pragma once
+
+#ifndef GEODE_TCRDISTRIBUTIONMANAGER_H_
+#define GEODE_TCRDISTRIBUTIONMANAGER_H_
+
 #include <geode/internal/geode_globals.hpp>
 
 #include "ThinClientDistributionManager.hpp"
@@ -29,6 +29,7 @@
 namespace client {
 
 class ThinClientRegion;
+
 /**
  * @brief Distribute data between caches
  */
@@ -36,23 +37,23 @@
  public:
   TcrDistributionManager(ThinClientRegion* region,
                          TcrConnectionManager& connManager);
+  TcrDistributionManager(const TcrDistributionManager&) = delete;
+  TcrDistributionManager& operator=(const TcrDistributionManager&) = delete;
+  ~TcrDistributionManager() noexcept override = default;
 
  protected:
-  virtual void getEndpointNames(std::unordered_set<std::string>& endpointNames);
+  void getEndpointNames(
+      std::unordered_set<std::string>& endpointNames) override;
 
-  virtual void postUnregisterAction();
+  void postUnregisterAction() override;
 
-  virtual bool preFailoverAction();
+  bool preFailoverAction() override;
 
-  virtual bool postFailoverAction(TcrEndpoint* endpoint);
+  bool postFailoverAction(TcrEndpoint* endpoint) override;
 
-  virtual void destroyAction();
-
- private:
-  // Disallow copy constructor and assignment operator.
-  TcrDistributionManager(const TcrDistributionManager&);
-  TcrDistributionManager& operator=(const TcrDistributionManager&);
+  void destroyAction() override;
 };
+
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/TcrEndpoint.cpp b/cppcache/src/TcrEndpoint.cpp
index 4d2a093..aab41b9 100644
--- a/cppcache/src/TcrEndpoint.cpp
+++ b/cppcache/src/TcrEndpoint.cpp
@@ -39,9 +39,9 @@
 const char* TcrEndpoint::NC_Notification = "NC Notification";
 
 TcrEndpoint::TcrEndpoint(const std::string& name, CacheImpl* cacheImpl,
-                         ACE_Semaphore& failoverSema,
-                         ACE_Semaphore& cleanupSema,
-                         ACE_Semaphore& redundancySema, ThinClientBaseDM* DM,
+                         binary_semaphore& failoverSema,
+                         binary_semaphore& cleanupSema,
+                         binary_semaphore& redundancySema, ThinClientBaseDM* DM,
                          bool isMultiUserMode)
     : m_notifyConnection(nullptr),
       m_notifyReceiver(nullptr),
@@ -53,12 +53,12 @@
       m_needToConnectInLock(false),
       m_isQueueHosted(false),
       m_uniqueId(0),
-      m_failoverSema(failoverSema),
-      m_cleanupSema(cleanupSema),
-      m_redundancySema(redundancySema),
+      failover_semaphore_(failoverSema),
+      cleanup_semaphore_(cleanupSema),
+      redundancy_semaphore_(redundancySema),
       m_baseDM(DM),
       m_name(name),
-      m_notificationCleanupSema(0),
+      notification_cleanup_semaphore_(0),
       m_numberOfTimesFailed(0),
       m_numRegions(0),
       m_pingTimeouts(0),
@@ -68,20 +68,20 @@
       m_msgSent(false),
       m_pingSent(false),
       m_isMultiUserMode(isMultiUserMode),
-      m_connected(false),
+      connected_(false),
       m_isActiveEndpoint(false),
       m_serverQueueStatus(NON_REDUNDANT_SERVER),
       m_queueSize(0),
-      m_noOfConnRefs(0),
       m_distributedMemId(0),
-      m_isServerQueueStatusSet(false) {
+      m_isServerQueueStatusSet(false),
+      m_connCreatedWhenMaxConnsIsZero(false) {
   /*
   m_name = Utils::convertHostToCanonicalForm(m_name.c_str() );
   */
 }
 
 TcrEndpoint::~TcrEndpoint() {
-  m_connected = false;
+  connected_ = false;
   m_isActiveEndpoint = false;
   closeConnections();
   {
@@ -94,13 +94,15 @@
           m_name.c_str());
       // fail in dev build to track #295 better in regressions
       m_numRegionListener = 0;
+      // TODO suspect
+      // NOLINTNEXTLINE(clang-analyzer-optin.cplusplus.VirtualCall)
       closeNotification();
     }
   }
   while (m_notifyCount > 0) {
     LOGDEBUG("TcrEndpoint::~TcrEndpoint(): reducing notify count at %d",
              m_notifyCount);
-    m_notificationCleanupSema.acquire();
+    notification_cleanup_semaphore_.acquire();
     m_notifyCount--;
   }
   LOGFINE("Connection to %s deleted", m_name.c_str());
@@ -144,9 +146,8 @@
     if (locked) {
       try {
         LOGFINE("TcrEndpoint::createNewConnectionWL got lock");
-        newConn =
-            new TcrConnection(m_cacheImpl->tcrConnectionManager(), m_connected);
-        newConn->initTcrConnection(this, m_name.c_str(), m_ports,
+        newConn = new TcrConnection(m_cacheImpl->tcrConnectionManager());
+        newConn->initTcrConnection(shared_from_this(), m_ports,
                                    isClientNotification, isSecondary,
                                    connectTimeout);
 
@@ -193,10 +194,9 @@
     try {
       if (newConn == nullptr) {
         if (!needtoTakeConnectLock() || !appThreadRequest) {
-          newConn = new TcrConnection(m_cacheImpl->tcrConnectionManager(),
-                                      m_connected);
+          newConn = new TcrConnection(m_cacheImpl->tcrConnectionManager());
           bool authenticate = newConn->initTcrConnection(
-              this, m_name.c_str(), m_ports, isClientNotification, isSecondary,
+              shared_from_this(), m_ports, isClientNotification, isSecondary,
               connectTimeout);
           if (authenticate) {
             authenticateEndpoint(newConn);
@@ -209,7 +209,6 @@
             break;
           }
         }
-        // m_connected = true;
       }
       err = GF_NOERR;
       break;
@@ -354,7 +353,7 @@
       } else {
         statusConn = newConn;
       }
-      m_connected = true;
+      setConnected(true);
       return status;
     } else {
       //  remove port from ports list (which is sent to server in notification
@@ -393,12 +392,12 @@
   } else if (!m_isActiveEndpoint) {
     int maxConnections = 0;
     if (isActiveEndpoint) {
-      if (m_connected) {
+      if (connected_) {
         maxConnections = m_maxConnections - 1;
       } else {
         maxConnections = m_maxConnections;
       }
-    } else if (!m_connected) {
+    } else if (!connected_) {
       maxConnections = 1;
     }
     if (maxConnections > 0) {
@@ -412,8 +411,8 @@
                                        m_cacheImpl->getDistributedSystem()
                                            .getSystemProperties()
                                            .connectTimeout(),
-                                       0, m_connected)) != GF_NOERR) {
-          m_connected = false;
+                                       0, connected_)) != GF_NOERR) {
+          setConnected(false);
           m_isActiveEndpoint = false;
           closeConnections();
           return err;
@@ -424,12 +423,12 @@
               (isSecondary ? "secondary server "
                            : (isActiveEndpoint ? "" : "primary server ")),
               m_name.c_str());
-      m_connected = true;
+      setConnected(true);
       m_isActiveEndpoint = isActiveEndpoint;
     }
   }
 
-  if (m_connected || connected) {
+  if (connected_ || connected) {
     if (clientNotification) {
       if (distMgr != nullptr) {
         std::lock_guard<decltype(m_distMgrsLock)> guardDistMgrs(m_distMgrsLock);
@@ -449,7 +448,7 @@
                                                .connectTimeout() *
                                            3,
                                        0)) != GF_NOERR) {
-          m_connected = false;
+          setConnected(false);
           m_isActiveEndpoint = false;
           closeConnections();
           LOGWARN("Failed to start subscription channel for endpoint %s",
@@ -464,7 +463,7 @@
       ++m_numRegionListener;
       LOGFINEST("Incremented notification region count for endpoint %s to %d",
                 m_name.c_str(), m_numRegionListener);
-      m_connected = true;
+      setConnected(true);
     }
   }
 
@@ -499,20 +498,21 @@
 
 void TcrEndpoint::pingServer(ThinClientPoolDM* poolDM) {
   LOGDEBUG("Sending ping message to endpoint %s", m_name.c_str());
-  if (!m_connected || m_noOfConnRefs == 0) {
+  if (!connected_) {
     LOGFINER("Skipping ping task for disconnected endpoint %s", m_name.c_str());
     return;
   }
 
   if (!m_msgSent && !m_pingSent) {
-    TcrMessagePing* pingMsg = TcrMessage::getPingMessage(m_cacheImpl);
+    TcrMessagePing pingMsg(std::unique_ptr<DataOutput>(
+        new DataOutput(m_cacheImpl->createDataOutput())));
     TcrMessageReply reply(true, nullptr);
     LOGFINEST("Sending ping message to endpoint %s", m_name.c_str());
     GfErrType error;
     if (poolDM != nullptr) {
-      error = poolDM->sendRequestToEP(*pingMsg, reply, this);
+      error = poolDM->sendRequestToEP(pingMsg, reply, this);
     } else {
-      error = send(*pingMsg, reply);
+      error = send(pingMsg, reply);
     }
     LOGFINEST("Sent ping message to endpoint %s with error code %d%s",
               m_name.c_str(), error, error == GF_NOERR ? " (no error)" : "");
@@ -532,7 +532,7 @@
       bool connected = (error == GF_NOERR)
                            ? (reply.getMessageType() == TcrMessage::REPLY)
                            : false;
-      if (m_connected != connected) {
+      if (connected_ != connected) {
         setConnectionStatus(connected);
       }
     }
@@ -550,7 +550,6 @@
 void TcrEndpoint::receiveNotification(std::atomic<bool>& isRunning) {
   LOGFINE("Started subscription channel for endpoint %s", m_name.c_str());
   while (isRunning) {
-    TcrMessageReply* msg = nullptr;
     try {
       size_t dataLen;
       ConnErrType opErr = CONN_NOERR;
@@ -576,34 +575,32 @@
       }
 
       if (data) {
-        msg = new TcrMessageReply(true, m_baseDM);
-        msg->initCqMap();
-        msg->setData(data, static_cast<int32_t>(dataLen),
-                     getDistributedMemberID(),
-                     *(m_cacheImpl->getSerializationRegistry()),
-                     *(m_cacheImpl->getMemberListForVersionStamp()));
+        TcrMessageReply msg(true, m_baseDM);
+        msg.initCqMap();
+        msg.setData(data, static_cast<int32_t>(dataLen),
+                    getDistributedMemberID(),
+                    *(m_cacheImpl->getSerializationRegistry()),
+                    *(m_cacheImpl->getMemberListForVersionStamp()));
         handleNotificationStats(static_cast<int64_t>(dataLen));
-        LOGDEBUG("receive notification %d", msg->getMessageType());
+        LOGDEBUG("receive notification %d", msg.getMessageType());
 
         if (!isRunning) {
-          _GEODE_SAFE_DELETE(msg);
           break;
         }
 
-        if (msg->getMessageType() == TcrMessage::SERVER_TO_CLIENT_PING) {
+        if (msg.getMessageType() == TcrMessage::SERVER_TO_CLIENT_PING) {
           LOGFINE("Received ping from server subscription channel.");
         }
 
         // ignore some message types like REGISTER_INSTANTIATORS
-        if (msg->shouldIgnore()) {
-          _GEODE_SAFE_DELETE(msg);
+        if (msg.shouldIgnore()) {
           continue;
         }
 
-        bool isMarker = (msg->getMessageType() == TcrMessage::CLIENT_MARKER);
-        if (!msg->hasCqPart()) {
-          if (msg->getMessageType() != TcrMessage::CLIENT_MARKER) {
-            const std::string& regionFullPath1 = msg->getRegionName();
+        bool isMarker = (msg.getMessageType() == TcrMessage::CLIENT_MARKER);
+        if (!msg.hasCqPart()) {
+          if (msg.getMessageType() != TcrMessage::CLIENT_MARKER) {
+            const std::string& regionFullPath1 = msg.getRegionName();
             auto region1 = m_cacheImpl->getRegion(regionFullPath1);
 
             if (region1 != nullptr &&
@@ -614,18 +611,16 @@
               // checking
               LOGFINER("Endpoint %s dropping event for region %s",
                        m_name.c_str(), regionFullPath1.c_str());
-              _GEODE_SAFE_DELETE(msg);
               continue;
             }
           }
         }
 
-        if (!checkDupAndAdd(msg->getEventId())) {
+        if (!checkDupAndAdd(msg.getEventId())) {
           m_dupCount++;
           if (m_dupCount % 100 == 1) {
             LOGFINE("Dropped %dst duplicate notification message", m_dupCount);
           }
-          _GEODE_SAFE_DELETE(msg);
           continue;
         }
 
@@ -633,11 +628,10 @@
           LOGFINE("Got a marker message on endpont %s", m_name.c_str());
           m_cacheImpl->processMarker();
           processMarker();
-          _GEODE_SAFE_DELETE(msg);
         } else {
-          if (!msg->hasCqPart())  // || msg->isInterestListPassed())
+          if (!msg.hasCqPart())  // || msg.isInterestListPassed())
           {
-            const std::string& regionFullPath = msg->getRegionName();
+            const std::string& regionFullPath = msg.getRegionName();
             auto region = m_cacheImpl->getRegion(regionFullPath);
 
             if (region != nullptr) {
@@ -650,7 +644,7 @@
                   regionFullPath.c_str());
             }
           } else {
-            LOGDEBUG("receive cq notification %d", msg->getMessageType());
+            LOGDEBUG("receive cq notification %d", msg.getMessageType());
             auto queryService = getQueryService();
             if (queryService != nullptr) {
               static_cast<RemoteQueryService*>(queryService.get())
@@ -673,7 +667,7 @@
       LOGFINER(
           "IO exception while receiving subscription event for endpoint %s: %s",
           m_name.c_str(), e.what());
-      if (m_connected) {
+      if (connected_) {
         setConnectionStatus(false);
         // close notification channel
         std::lock_guard<decltype(m_notifyReceiverLock)> guard(
@@ -685,13 +679,11 @@
       }
       break;
     } catch (const Exception& ex) {
-      _GEODE_SAFE_DELETE(msg);
       LOGERROR(
           "Exception while receiving subscription event for endpoint %s:: %s: "
           "%s",
           m_name.c_str(), ex.getName().c_str(), ex.what());
     } catch (...) {
-      _GEODE_SAFE_DELETE(msg);
       LOGERROR(
           "Unexpected exception while "
           "receiving subscription event from endpoint %s",
@@ -721,19 +713,23 @@
 
 inline bool TcrEndpoint::handleIOException(const std::string& message,
                                            TcrConnection*& conn, bool) {
-  int32_t lastError = ACE_OS::last_error();
-  if (lastError == ECONNRESET || lastError == EPIPE) {
+  auto last_error = Utils::getLastError();
+  auto last_error_val = last_error.value();
+  if (last_error_val == ECONNRESET || last_error_val == EPIPE ||
+      last_error_val == ENOTCONN) {
     _GEODE_SAFE_DELETE(conn);
   } else {
     closeConnection(conn);
   }
+
   LOGFINE(
       "IO error during send for endpoint %s "
       "[errno: %d: %s]: %s",
-      m_name.c_str(), lastError, ACE_OS::strerror(lastError), message.c_str());
+      m_name.c_str(), last_error.value(), last_error.message().c_str(),
+      message.c_str());
   // EAGAIN =11, EWOULDBLOCK = 10035L, EPIPE = 32, ECONNRESET =10054L(An
   // existing connection was forcibly closed by the remote host.)
-  if (!(lastError == EAGAIN || lastError == EWOULDBLOCK /*||
+  if (!(last_error_val == EAGAIN || last_error_val == EWOULDBLOCK /*||
         lastError == ECONNRESET */
         /*|| lastError == EPIPE*/)) {
     // break from enclosing loop without retries
@@ -741,6 +737,7 @@
     m_needToConnectInLock = true;
     return false;
   }
+
   std::this_thread::sleep_for(std::chrono::milliseconds(10));
   return true;
 }
@@ -757,42 +754,25 @@
   // TcrMessage * req = const_cast<TcrMessage *>(&request);
   LOGDEBUG("TcrEndpoint::sendRequestConn  = %p", m_baseDM);
   if (m_baseDM != nullptr) m_baseDM->beforeSendingRequest(request, conn);
-  if (((type == TcrMessage::EXECUTE_FUNCTION ||
+  if (type == TcrMessage::REGISTER_INTEREST_LIST ||
+      type == TcrMessage::REGISTER_INTEREST || type == TcrMessage::QUERY ||
+      type == TcrMessage::QUERY_WITH_PARAMETERS ||
+      type == TcrMessage::GET_ALL_70 ||
+      type == TcrMessage::GET_ALL_WITH_CALLBACK || type == TcrMessage::PUTALL ||
+      type == TcrMessage::PUT_ALL_WITH_CALLBACK ||
+      type == TcrMessage::REMOVE_ALL ||
+      ((type == TcrMessage::EXECUTE_FUNCTION ||
         type == TcrMessage::EXECUTE_REGION_FUNCTION) &&
-       (request.hasResult() & 2))) {
-    conn->sendRequestForChunkedResponse(request, request.getMsgLength(), reply,
-                                        request.getTimeout(),
-                                        reply.getTimeout());
-  } else if (type == TcrMessage::REGISTER_INTEREST_LIST ||
-             type == TcrMessage::REGISTER_INTEREST ||
-             type == TcrMessage::QUERY ||
-             type == TcrMessage::QUERY_WITH_PARAMETERS ||
-             type == TcrMessage::GET_ALL_70 ||
-             type == TcrMessage::GET_ALL_WITH_CALLBACK ||
-             type == TcrMessage::PUTALL ||
-             type == TcrMessage::PUT_ALL_WITH_CALLBACK ||
-             type == TcrMessage::REMOVE_ALL ||
-             ((type == TcrMessage::EXECUTE_FUNCTION ||
-               type == TcrMessage::EXECUTE_REGION_FUNCTION) &&
-              (request.hasResult() & 2)) ||
-             type ==
-                 TcrMessage::EXECUTE_REGION_FUNCTION_SINGLE_HOP ||  // This is
-                                                                    // kept
-                                                                    // aside as
-                                                                    // server
-                                                                    // always
-                                                                    // sends
-                                                                    // chunked
-                                                                    // response.
-             type == TcrMessage::EXECUTECQ_MSG_TYPE ||
-             type == TcrMessage::STOPCQ_MSG_TYPE ||
-             type == TcrMessage::CLOSECQ_MSG_TYPE ||
-             type == TcrMessage::KEY_SET ||
-             type == TcrMessage::CLOSECLIENTCQS_MSG_TYPE ||
-             type == TcrMessage::GETCQSTATS_MSG_TYPE ||
-             type == TcrMessage::MONITORCQ_MSG_TYPE ||
-             type == TcrMessage::EXECUTECQ_WITH_IR_MSG_TYPE ||
-             type == TcrMessage::GETDURABLECQS_MSG_TYPE) {
+       (request.hasResult() & 2)) ||
+      type == TcrMessage::EXECUTE_REGION_FUNCTION_SINGLE_HOP ||
+      type == TcrMessage::EXECUTECQ_MSG_TYPE ||
+      type == TcrMessage::STOPCQ_MSG_TYPE ||
+      type == TcrMessage::CLOSECQ_MSG_TYPE || type == TcrMessage::KEY_SET ||
+      type == TcrMessage::CLOSECLIENTCQS_MSG_TYPE ||
+      type == TcrMessage::GETCQSTATS_MSG_TYPE ||
+      type == TcrMessage::MONITORCQ_MSG_TYPE ||
+      type == TcrMessage::EXECUTECQ_WITH_IR_MSG_TYPE ||
+      type == TcrMessage::GETDURABLECQS_MSG_TYPE) {
     conn->sendRequestForChunkedResponse(request, request.getMsgLength(), reply,
                                         request.getTimeout(),
                                         reply.getTimeout());
@@ -806,7 +786,6 @@
       }
     }
     size_t dataLen;
-    LOGDEBUG("sendRequestConn: calling sendRequest");
     auto data = conn->sendRequest(request.getMsgData(), request.getMsgLength(),
                                   &dataLen, request.getTimeout(),
                                   reply.getTimeout(), request.getMessageType());
@@ -887,9 +866,9 @@
     auto timeout = requestedTimeout;
     epFailure = false;
     if (useEPPool) {
-      if (m_maxConnections == 0) {
+      if (m_maxConnections == 0 && !m_connCreatedWhenMaxConnsIsZero) {
         std::lock_guard<decltype(m_connectionLock)> guard(m_connectionLock);
-        if (m_maxConnections == 0) {
+        if (m_maxConnections == 0 && !m_connCreatedWhenMaxConnsIsZero) {
           LOGFINE(
               "Creating a new connection when connection-pool-size system "
               "property set to 0");
@@ -901,7 +880,7 @@
             epFailure = true;
             continue;
           }
-          m_maxConnections = 1;
+          m_connCreatedWhenMaxConnsIsZero = true;
         }
       }
     }
@@ -909,7 +888,7 @@
              m_name.c_str());
     if (createNewConn) {
       createNewConn = false;
-      if (!m_connected) {
+      if (!connected_) {
         return GF_NOTCON;
       } else if ((error =
                       createNewConnection(conn, false, false,
@@ -928,7 +907,7 @@
       // max wait time to get a connection
       conn = m_opConnections.getUntil(timeout);
     }
-    if (!m_connected) {
+    if (!connected_) {
       return GF_NOTCON;
     }
     if (conn != nullptr) {
@@ -996,9 +975,7 @@
                 failReason.c_str());
         if (compareTransactionIds(reqTransId, reply.getTransId(), failReason,
                                   conn)) {
-          if (Log::warningEnabled()) {
-            LOGWARN("Stack trace: %s", ex.getStackTrace().c_str());
-          }
+          LOGWARN("Stack trace: %s", ex.getStackTrace().c_str());
           error = GF_MSG;
           if (useEPPool) {
             m_opConnections.put(conn, false);
@@ -1134,6 +1111,17 @@
   return error;
 }
 
+void TcrEndpoint::setConnected(bool status) {
+  bool flag = !status;
+  if (connected_.compare_exchange_strong(flag, status)) {
+    if (status) {
+      m_baseDM->incConnectedEndpoints();
+    } else {
+      m_baseDM->decConnectedEndpoints();
+    }
+  }
+}
+
 void TcrEndpoint::setConnectionStatus(bool status) {
   // : Store the original value of m_isActiveEndpoint.
   // This is to try make failover more resilient for the case when
@@ -1147,17 +1135,18 @@
   // bool wasActive = m_isActiveEndpoint;
   // Then after taking the lock:
   // If ( !wasActive && isActiveEndpoint ) { return; }
-  std::lock_guard<decltype(m_connectionLock)> guard(m_connectionLock);
-  if (m_connected != status) {
-    bool connected = m_connected;
-    m_connected = status;
-    if (connected) {
+  bool flag = !status;
+  if (connected_.compare_exchange_strong(flag, status)) {
+    if (status) {
+      m_baseDM->incConnectedEndpoints();
+    } else {
       m_numberOfTimesFailed += 1;
       m_isAuthenticated = false;
       // disconnected
       LOGFINE("Disconnecting from endpoint %s", m_name.c_str());
       closeConnections();
       m_isActiveEndpoint = false;
+      m_baseDM->decConnectedEndpoints();
       LOGFINE("Disconnected from endpoint %s", m_name.c_str());
       triggerRedundancyThread();
     }
@@ -1165,22 +1154,23 @@
 }
 
 void TcrEndpoint::triggerRedundancyThread() {
-  m_failoverSema.release();
-  m_redundancySema.release();
+  failover_semaphore_.release();
+  redundancy_semaphore_.release();
 }
 
 void TcrEndpoint::closeConnection(TcrConnection*& conn) {
   conn->close();
   m_ports.erase(conn->getPort());
-  _GEODE_SAFE_DELETE(conn);
+  try {
+    _GEODE_SAFE_DELETE(conn);
+  } catch (...) {
+  }
 }
 
 void TcrEndpoint::closeConnections() {
   m_opConnections.close();
   m_ports.clear();
-  m_maxConnections = m_cacheImpl->getDistributedSystem()
-                         .getSystemProperties()
-                         .connectionPoolSize();
+  m_connCreatedWhenMaxConnsIsZero = false;
 }
 
 /*
@@ -1199,9 +1189,9 @@
   m_notifyReceiver->stopNoblock();
   TcrConnectionManager& tccm = m_cacheImpl->tcrConnectionManager();
   tccm.addNotificationForDeletion(m_notifyReceiver.get(), m_notifyConnection,
-                                  m_notificationCleanupSema);
+                                  notification_cleanup_semaphore_);
   m_notifyCount++;
-  m_cleanupSema.release();
+  cleanup_semaphore_.release();
   m_isQueueHosted = false;
   LOGFINEST(
       "Added susbcription channel for deletion and "
diff --git a/cppcache/src/TcrEndpoint.hpp b/cppcache/src/TcrEndpoint.hpp
index cfbd63a..9827e33 100644
--- a/cppcache/src/TcrEndpoint.hpp
+++ b/cppcache/src/TcrEndpoint.hpp
@@ -48,16 +48,19 @@
 class ThinClientPoolDM;
 class QueryService;
 
-class TcrEndpoint {
+class TcrEndpoint : public std::enable_shared_from_this<TcrEndpoint> {
  public:
   TcrEndpoint(
       const std::string& name, CacheImpl* cacheImpl,
-      ACE_Semaphore& failoverSema, ACE_Semaphore& cleanupSema,
-      ACE_Semaphore& redundancySema, ThinClientBaseDM* dm = nullptr,
+      binary_semaphore& failoverSema, binary_semaphore& cleanupSema,
+      binary_semaphore& redundancySema, ThinClientBaseDM* dm = nullptr,
       bool isMultiUserMode = false);  // TODO: need to look for endpoint case
 
   virtual ~TcrEndpoint();
 
+  TcrEndpoint(const TcrEndpoint&) = delete;
+  TcrEndpoint& operator=(const TcrEndpoint&) = delete;
+
   virtual GfErrType registerDM(bool clientNotification,
                                bool isSecondary = false,
                                bool isActiveEndpoint = false,
@@ -86,7 +89,7 @@
   void stopNotifyReceiverAndCleanup();
   void stopNoBlock();
 
-  bool inline connected() const { return m_connected; }
+  bool inline connected() const { return connected_; }
 
   int inline numRegions() const { return m_numRegions; }
 
@@ -151,7 +154,7 @@
                                   bool isClientNotification, bool isSecondary,
                                   std::chrono::microseconds connectTimeout);
 
-  void setConnected(volatile bool connected = true) { m_connected = connected; }
+  void setConnected(bool connected = true);
   virtual ThinClientPoolDM* getPoolHADM() const { return nullptr; }
   bool isQueueHosted();
   std::recursive_mutex& getQueueHostedMutex() { return m_notifyReceiverLock; }
@@ -166,9 +169,6 @@
 
   int32_t numberOfTimesFailed() { return m_numberOfTimesFailed; }
 
-  void addConnRefCounter(int count) { m_noOfConnRefs += count; }
-
-  int getConnRefCounter() { return m_noOfConnRefs; }
   virtual uint16_t getDistributedMemberID() { return m_distributedMemId; }
   virtual void setDistributedMemberID(uint16_t memId) {
     m_distributedMemId = memId;
@@ -205,16 +205,16 @@
 
  private:
   int64_t m_uniqueId;
-  ACE_Semaphore& m_failoverSema;
-  ACE_Semaphore& m_cleanupSema;
-  ACE_Semaphore& m_redundancySema;
+  binary_semaphore& failover_semaphore_;
+  binary_semaphore& cleanup_semaphore_;
+  binary_semaphore& redundancy_semaphore_;
   ThinClientBaseDM* m_baseDM;
   std::string m_name;
   std::list<ThinClientBaseDM*> m_distMgrs;
   std::recursive_mutex m_endpointAuthenticationLock;
   std::recursive_mutex m_connectionLock;
   std::recursive_mutex m_distMgrsLock;
-  ACE_Semaphore m_notificationCleanupSema;
+  binary_semaphore notification_cleanup_semaphore_;
   synchronized_set<std::unordered_set<uint16_t>> m_ports;
   int32_t m_numberOfTimesFailed;
   int m_numRegions;
@@ -225,23 +225,18 @@
   volatile bool m_msgSent;
   volatile bool m_pingSent;
   bool m_isMultiUserMode;
-  volatile bool m_connected;
+  std::atomic<bool> connected_;
   bool m_isActiveEndpoint;
   ServerQueueStatus m_serverQueueStatus;
   int32_t m_queueSize;
-  std::atomic<int32_t> m_noOfConnRefs;
   uint16_t m_distributedMemId;
   bool m_isServerQueueStatusSet;
+  volatile bool m_connCreatedWhenMaxConnsIsZero;
 
   bool compareTransactionIds(int32_t reqTransId, int32_t replyTransId,
                              std::string& failReason, TcrConnection* conn);
   void closeConnections();
   void setRetry(const TcrMessage& request, int& maxSendRetries);
-  // number of connections to this endpoint
-
-  // Disallow copy constructor and assignment operator.
-  TcrEndpoint(const TcrEndpoint&);
-  TcrEndpoint& operator=(const TcrEndpoint&);
 };
 }  // namespace client
 }  // namespace geode
diff --git a/cppcache/src/TcrHADistributionManager.hpp b/cppcache/src/TcrHADistributionManager.hpp
index 4c24d78..a6d669f 100644
--- a/cppcache/src/TcrHADistributionManager.hpp
+++ b/cppcache/src/TcrHADistributionManager.hpp
@@ -36,8 +36,7 @@
 /**
  * @brief Distribute data between caches
  */
-class APACHE_GEODE_EXPORT TcrHADistributionManager
-    : public ThinClientDistributionManager {
+class TcrHADistributionManager : public ThinClientDistributionManager {
  public:
   TcrHADistributionManager(ThinClientRegion* theRegion,
                            TcrConnectionManager& connManager);
diff --git a/cppcache/src/TcrMessage.cpp b/cppcache/src/TcrMessage.cpp
index fcf621a..0b23082 100644
--- a/cppcache/src/TcrMessage.cpp
+++ b/cppcache/src/TcrMessage.cpp
@@ -17,19 +17,22 @@
 
 #include "TcrMessage.hpp"
 
-#include <sstream>
-
 #include <geode/CacheableBuiltins.hpp>
 #include <geode/CacheableObjectArray.hpp>
 #include <geode/SystemProperties.hpp>
 
 #include "AutoDelete.hpp"
+#include "BucketServerLocation.hpp"
+#include "CacheImpl.hpp"
 #include "CacheRegionHelper.hpp"
+#include "ClientProxyMembershipID.hpp"
 #include "DataInputInternal.hpp"
 #include "DataOutputInternal.hpp"
 #include "DiskStoreId.hpp"
 #include "DiskVersionTag.hpp"
-#include "DistributedSystem.hpp"
+#include "EventId.hpp"
+#include "FixedPartitionAttributesImpl.hpp"
+#include "SerializationRegistry.hpp"
 #include "StackTrace.hpp"
 #include "TSSTXStateWrapper.hpp"
 #include "TXState.hpp"
@@ -39,6 +42,8 @@
 #include "ThinClientBaseDM.hpp"
 #include "ThinClientPoolDM.hpp"
 #include "ThinClientRegion.hpp"
+#include "VersionTag.hpp"
+#include "VersionedCacheableObjectPartList.hpp"
 #include "util/JavaModifiedUtf8.hpp"
 #include "util/string.hpp"
 
@@ -50,9 +55,16 @@
 namespace geode {
 namespace client {
 namespace {
-const uint32_t g_headerLen = 17;
-const uint32_t REGULAR_EXPRESSION =
-    1;  // come from Java InterestType.REGULAR_EXPRESSION
+
+constexpr size_t kHeaderLength = 17;
+
+/**
+ * come from Java InterestType.kREGULAR_EXPRESSION
+ */
+constexpr int32_t kREGULAR_EXPRESSION = 1;
+
+constexpr int32_t kFlagEmpty = 0x01;
+constexpr int32_t kFlagConcurrencyChecks = 0x02;
 
 inline void readInt(uint8_t* buffer, uint16_t* value) {
   uint16_t tmp = *(buffer++);
@@ -83,12 +95,6 @@
 
 extern void setThreadLocalExceptionMessage(std::string);
 
-uint8_t* TcrMessage::m_keepAlive = nullptr;
-const int TcrMessage::m_flag_empty = 0x01;
-const int TcrMessage::m_flag_concurrency_checks = 0x02;
-
-bool TcrMessage::isKeepAlive() { return (m_keepAlive && (*m_keepAlive > 0)); }
-
 bool TcrMessage::isUserInitiativeOps(const TcrMessage& msg) {
   int32_t msgType = msg.getMessageType();
 
@@ -140,20 +146,14 @@
       m_callbackArgument(nullptr),
       m_versionTag(),
       m_eventid(nullptr),
-      m_vectorPtr(),
-      m_bucketServerLocation(nullptr),
       m_tombstoneVersions(),
       m_tombstoneKeys(),
-      m_versionObjPartListptr(),
       m_exceptionMessage(),
       m_regionName("INVALID_REGION_NAME"),
       m_regex(),
-      m_bucketServerLocations(),
       m_colocatedWith(),
-      m_partitionResolverName(),
       m_securityHeaderLength(0),
       m_msgType(TcrMessage::INVALID),
-      m_msgLength(-1),
       m_msgTypeRequest(0),
       m_txId(-1),
       m_bucketCount(0),
@@ -162,12 +162,12 @@
       m_deltaBytesLen(0),
       m_entryNotFound(0),
       m_feAnotherHop(false),
-      isSecurityOn(false),
+      m_isSecurityOn(false),
       m_isLastChunkAndisSecurityHeader(0),
       m_isSecurityHeaderAdded(false),
       m_isMetaRegion(false),
       m_decodeAll(false),
-      m_interestPolicy(0),
+      m_interestPolicy(InterestResultPolicy::NONE),
       m_isDurable(false),
       m_receiveValues(false),
       m_hasCqsPart(false),
@@ -186,13 +186,7 @@
 const std::string& TcrMessage::getRegex() const { return m_regex; }
 
 InterestResultPolicy TcrMessage::getInterestResultPolicy() const {
-  if (m_interestPolicy == 2) {
-    return InterestResultPolicy::KEYS_VALUES;
-  } else if (m_interestPolicy == 1) {
-    return InterestResultPolicy::KEYS;
-  } else {
-    return InterestResultPolicy::NONE;
-  }
+  return m_interestPolicy;
 }
 
 bool TcrMessage::forPrimary() const {
@@ -229,8 +223,6 @@
 
 uint32_t TcrMessage::getMessageTypeForCq() const { return m_msgTypeForCq; }
 
-bool TcrMessage::isInterestListPassed() const { return m_isInterestListPassed; }
-
 bool TcrMessage::shouldIgnore() const { return m_shouldIgnore; }
 
 int8_t TcrMessage::getMetaDataVersion() const { return m_metaDataVersion; }
@@ -259,17 +251,7 @@
   return m_chunkedResult;
 }
 
-void TcrMessage::setVersionedObjectPartList(
-    std::shared_ptr<VersionedCacheableObjectPartList> versionObjPartListptr) {
-  m_versionObjPartListptr = versionObjPartListptr;
-}
-
-std::shared_ptr<VersionedCacheableObjectPartList>
-TcrMessage::getVersionedObjectPartList() {
-  return m_versionObjPartListptr;
-}
-
-DataInput* TcrMessage::getDelta() { return m_delta.get(); }
+DataInput* TcrMessage::getDelta() const { return m_delta.get(); }
 
 //  getDeltaBytes( ) is called *only* by CqService, returns a CacheableBytes
 //  that
@@ -284,7 +266,7 @@
   return retVal;
 }
 
-bool TcrMessage::hasDelta() { return (m_delta != nullptr); }
+bool TcrMessage::hasDelta() const { return (m_delta != nullptr); }
 
 void TcrMessage::setMetaRegion(bool isMetaRegion) {
   m_isMetaRegion = isMetaRegion;
@@ -298,10 +280,6 @@
   return m_colocatedWith;
 }
 
-const std::string& TcrMessage::getPartitionResolver() const {
-  return m_partitionResolverName;
-}
-
 std::vector<std::vector<std::shared_ptr<BucketServerLocation>>>*
 TcrMessage::getMetadata() {
   return m_metadata;
@@ -322,14 +300,12 @@
   m_isCallBackArguement = aCallBackArguement;
 }
 
-void TcrMessage::setBucketServerLocation(
-    std::shared_ptr<BucketServerLocation> serverLocation) {
-  m_bucketServerLocation = serverLocation;
-}
 void TcrMessage::setVersionTag(std::shared_ptr<VersionTag> versionTag) {
   m_versionTag = versionTag;
 }
-std::shared_ptr<VersionTag> TcrMessage::getVersionTag() { return m_versionTag; }
+std::shared_ptr<VersionTag> TcrMessage::getVersionTag() const {
+  return m_versionTag;
+}
 
 uint8_t TcrMessage::hasResult() const { return m_hasResult; }
 
@@ -341,36 +317,12 @@
   return m_tombstoneKeys;
 }
 
-TcrMessagePing* TcrMessage::getPingMessage(CacheImpl* cacheImpl) {
-  static auto pingMsg =
-      new TcrMessagePing(new DataOutput(cacheImpl->createDataOutput()), true);
-  return pingMsg;
-}
-
-TcrMessage* TcrMessage::getAllEPDisMess() {
-  static auto allEPDisconnected = new TcrMessageReply(true, nullptr);
-  return allEPDisconnected;
-}
-
-TcrMessage* TcrMessage::getCloseConnMessage(CacheImpl* cacheImpl) {
-  static auto closeConnMsg = new TcrMessageCloseConnection(
-      new DataOutput(cacheImpl->createDataOutput()), true);
-  return closeConnMsg;
-}
-
-void TcrMessage::setKeepAlive(bool keepalive) {
-  // TODO global
-  if (TcrMessage::m_keepAlive != nullptr) {
-    *TcrMessage::m_keepAlive = keepalive ? 1 : 0;
-  }
-}
-
 void TcrMessage::writeInterestResultPolicyPart(InterestResultPolicy policy) {
   m_request->writeInt(static_cast<int32_t>(3));  // size
   m_request->write(static_cast<int8_t>(1));      // isObject
   m_request->write(static_cast<int8_t>(DSCode::FixedIDByte));
-  m_request->write(static_cast<int8_t>(DSCode::InterestResultPolicy));
-  m_request->write(static_cast<int8_t>(policy.getOrdinal()));
+  m_request->write(static_cast<int8_t>(DSFid::InterestResultPolicy));
+  m_request->write(static_cast<int8_t>(policy));
 }
 
 void TcrMessage::writeIntPart(int32_t intValue) {
@@ -473,13 +425,6 @@
   *intValue = input.readInt32();
 }
 
-void TcrMessage::readLongPart(DataInput& input, uint64_t* intValue) {
-  uint32_t longLen = input.readInt32();
-  if (longLen != 8) throw Exception("long length should have been 8");
-  if (input.read()) throw Exception("Long is not an object");
-  *intValue = input.readInt64();
-}
-
 const std::string TcrMessage::readStringPart(DataInput& input) {
   auto stringLength = input.readInt32();
   if (input.read()) {
@@ -545,7 +490,8 @@
                                       bool isChunk,
                                       uint8_t isLastChunkWithSecurity) {
   LOGDEBUG(
-      "TcrMessage::readSecureObjectPart isChunk = %d isLastChunkWithSecurity = "
+      "TcrMessage::readSecureObjectPart isChunk = %d isLastChunkWithSecurity "
+      "= "
       "%d",
       isChunk, isLastChunkWithSecurity);
   if (isChunk) {
@@ -769,7 +715,8 @@
   } else {
     // TODO::
     // CacheableBytes* rawByteArray = static_cast<CacheableBytes*>(se.get());
-    // m_request->writeBytesOnly(rawByteArray->value(), rawByteArray->length());
+    // m_request->writeBytesOnly(rawByteArray->value(),
+    // rawByteArray->length());
     writeBytesOnly(se);
   }
   auto sizeAfterWritingObj = m_request->getBufferLength();
@@ -821,7 +768,7 @@
   int8_t earlyAck = 0x0;
   LOGDEBUG("TcrMessage::writeHeader m_isMetaRegion = %d", m_isMetaRegion);
   if (m_tcdm != nullptr) {
-    if ((isSecurityOn =
+    if ((m_isSecurityOn =
              (m_tcdm->isSecurityOn() &&
               TcrMessage::isUserInitiativeOps(*this) && !m_isMetaRegion))) {
       earlyAck |= 0x2;
@@ -896,17 +843,17 @@
 
 void TcrMessage::writeMessageLength() {
   auto totalLen = m_request->getBufferLength();
-  auto msgLen = totalLen - g_headerLen;
+  auto msgLen = totalLen - kHeaderLength;
   m_request->rewindCursor(
       totalLen -
       4);  // msg len is written after the msg type which is of 4 bytes ...
   m_request->writeInt(static_cast<int32_t>(msgLen));
-  m_request->advanceCursor(totalLen - 8);  // after writing 4 bytes for msg len
-                                           // you are already 8 bytes ahead from
-                                           // the beginning.
+  m_request->advanceCursor(totalLen - 8);  // after writing 4 bytes for msg
+                                           // len you are already 8 bytes
+                                           // ahead from the beginning.
 }
 
-void TcrMessage::startProcessChunk(ACE_Semaphore& finalizeSema) {
+void TcrMessage::startProcessChunk(binary_semaphore& finalizeSema) {
   if (m_msgTypeRequest == TcrMessage::EXECUTECQ_MSG_TYPE ||
       m_msgTypeRequest == TcrMessage::STOPCQ_MSG_TYPE ||
       m_msgTypeRequest == TcrMessage::CLOSECQ_MSG_TYPE ||
@@ -945,7 +892,8 @@
           "response",
           m_msgTypeRequest);
       throw IllegalStateException(
-          "Got unexpected request msg type while starting to process response");
+          "Got unexpected request msg type while starting to process "
+          "response");
     }
   }
   m_chunkedResult->setFinalizeSemaphore(&finalizeSema);
@@ -969,7 +917,8 @@
                               const uint8_t isLastChunkAndisSecurityHeader) {
   // TODO: see if security header is there
   LOGDEBUG(
-      "TcrMessage::processChunk isLastChunkAndisSecurityHeader = %d chunklen = "
+      "TcrMessage::processChunk isLastChunkAndisSecurityHeader = %d chunklen "
+      "= "
       "%d m_msgType = %d",
       isLastChunkAndisSecurityHeader, len, m_msgType);
 
@@ -1147,7 +1096,8 @@
       // TODO: how many parts what should we do here
       if (chunk.empty()) {
         LOGWARN(
-            "Got unhandled message type %d while processing response, possible "
+            "Got unhandled message type %d while processing response, "
+            "possible "
             "serialization mismatch",
             m_msgType);
         throw MessageException(
@@ -1196,9 +1146,10 @@
   m_txId = input.readInt32();
   auto earlyack = input.read();
   LOGDEBUG(
-      "handleByteArrayResponse m_msgType = %d isSecurityOn = %d requesttype "
+      "handleByteArrayResponse m_msgType = %d m_isSecurityOn = %d "
+      "requesttype "
       "=%d",
-      m_msgType, isSecurityOn, m_msgTypeRequest);
+      m_msgType, m_isSecurityOn, m_msgTypeRequest);
   LOGDEBUG(
       "Message type=%d, length=%d, parts=%d, txid=%d and eack %d with data "
       "length=%d",
@@ -1222,9 +1173,11 @@
         m_value = CacheableInt32::create(typeId);
       } else if (m_msgTypeRequest == TcrMessage::GET_PDX_TYPE_BY_ID) {
         // PdxType will come in response
-        input.advanceCursor(5);  // part header
-        m_value = serializationRegistry.deserialize(
-            input, static_cast<int8_t>(DSCode::PdxType));
+        input.advanceCursor(sizeof(int32_t));  // ignore part size
+        if (input.readBoolean()) {             // part type. If 1 is an object
+          m_value = serializationRegistry.deserialize(
+              input, static_cast<int8_t>(DSCode::PdxType));
+        }
       } else if (m_msgTypeRequest == TcrMessage::GET_PDX_ENUM_BY_ID) {
         // PdxType will come in response
         input.advanceCursor(5);  // part header
@@ -1303,7 +1256,7 @@
       uint8_t lastChunk = static_cast<uint8_t>(numparts);
       lastChunk = (lastChunk << 5);
       readExceptionPart(input, lastChunk);
-      // if (isSecurityOn)
+      // if (m_isSecurityOn)
       // readSecureObjectPart( input );
       break;
     }
@@ -1530,7 +1483,7 @@
           }
           m_metadata->push_back(bucketServerLocations);
         }
-        LOGFINER("Metadata size is %", m_metadata->size());
+        LOGFINER("Metadata size is %zu", m_metadata->size());
       }
       break;
     }
@@ -1559,7 +1512,7 @@
         input.read();                    // ignore isObj;
         if (partLength > 0) {
           // PART3 = partitionresolvername
-          m_partitionResolverName = input.readString();
+          input.readString();  // ignore
         }
 
         input.readInt32();  // ignore partlen;
@@ -1702,7 +1655,7 @@
   m_timeout = DEFAULT_TIMEOUT;
   m_messageResponseTimeout = messageResponsetimeout;
 
-  isSecurityOn = false;
+  m_isSecurityOn = false;
   m_isSecurityHeaderAdded = false;
 
   uint32_t numOfParts = 1;
@@ -1981,7 +1934,7 @@
 TcrMessageDestroy::TcrMessageDestroy(
     DataOutput* dataOutput, const Region* region,
     const std::shared_ptr<CacheableKey>& key,
-    const std::shared_ptr<Cacheable>& value,
+    const std::shared_ptr<Cacheable>& value, bool isUserNullValue,
     const std::shared_ptr<Serializable>& aCallbackArgument,
     ThinClientBaseDM* connectionDM) {
   m_request.reset(dataOutput);
@@ -2004,7 +1957,7 @@
         "key passed to the constructor can't be nullptr");
   }
 
-  if (value != nullptr) {
+  if (value != nullptr || isUserNullValue) {
     numOfParts += 2;  // for GFE Destroy65.java
     writeHeader(TcrMessage::DESTROY, numOfParts);
     writeRegionPart(m_regionName);
@@ -2085,29 +2038,24 @@
   m_decodeAll = decodeAll;
   m_tcdm = connectionDM;
 
-  if (connectionDM != nullptr) isSecurityOn = connectionDM->isSecurityOn();
+  if (connectionDM != nullptr) m_isSecurityOn = connectionDM->isSecurityOn();
 }
 
-TcrMessagePing::TcrMessagePing(DataOutput* dataOutput, bool decodeAll) {
+TcrMessagePing::TcrMessagePing(std::unique_ptr<DataOutput> dataOutput) {
   m_msgType = TcrMessage::PING;
-  m_decodeAll = decodeAll;
-  m_request.reset(dataOutput);
+  m_request = std::move(dataOutput);
   writeHeader(m_msgType, 0);
   writeMessageLength();
 }
 
-TcrMessageCloseConnection::TcrMessageCloseConnection(DataOutput* dataOutput,
-                                                     bool decodeAll) {
+TcrMessageCloseConnection::TcrMessageCloseConnection(
+    std::unique_ptr<DataOutput> dataOutput, bool keepAlive) {
   m_msgType = TcrMessage::CLOSE_CONNECTION;
-  m_decodeAll = decodeAll;
-  m_request.reset(dataOutput);
+  m_request = std::move(dataOutput);
   writeHeader(m_msgType, 1);
-  // last two parts are not used ... setting zero in both the parts.
-  m_request->writeInt(static_cast<int32_t>(1));  // len is 1
-  m_request->write(static_cast<int8_t>(0));      // is obj is '0'.
-  // cast away constness here since we want to modify this
-  TcrMessage::m_keepAlive = const_cast<uint8_t*>(m_request->getCursor());
-  m_request->write(static_cast<int8_t>(0));  // keepalive is '0'.
+  m_request->writeInt(static_cast<int32_t>(1));  // len
+  m_request->writeBoolean(false);                // is obj
+  m_request->writeBoolean(keepAlive);            // keepalive
   writeMessageLength();
 }
 
@@ -2130,9 +2078,15 @@
   m_regionName =
       region == nullptr ? "INVALID_REGION_NAME" : region->getFullPath();
   m_region = region;
-  m_timeout = DEFAULT_TIMEOUT;
   m_isDurable = isDurable;
   m_receiveValues = receiveValues;
+  m_interestPolicy = interestPolicy;
+
+  if (!(interestPolicy == InterestResultPolicy::NONE ||
+        interestPolicy == InterestResultPolicy::KEYS_VALUES)) {
+    throw IllegalArgumentException(
+        "interestPolicy must be NONE or KEYS_VALUES.");
+  }
 
   writeHeader(m_msgType, 6);
 
@@ -2147,8 +2101,8 @@
 
   // Part 4
   auto cal = CacheableArrayList::create();
-  for (auto&& key : keys) {
-    if (key == nullptr) {
+  for (const auto& key : keys) {
+    if (!key) {
       throw IllegalArgumentException(
           "keys in the interest list cannot be nullptr");
     }
@@ -2170,13 +2124,12 @@
   writeObjectPart(byteArr);
 
   writeMessageLength();
-  m_interestPolicy = interestPolicy.ordinal;
 }
 
 TcrMessageUnregisterInterestList::TcrMessageUnregisterInterestList(
     DataOutput* dataOutput, const Region* region,
     const std::vector<std::shared_ptr<CacheableKey>>& keys, bool isDurable,
-    bool receiveValues, InterestResultPolicy interestPolicy,
+
     ThinClientBaseDM* connectionDM) {
   m_request.reset(dataOutput);
   m_msgType = TcrMessage::UNREGISTER_INTEREST_LIST;
@@ -2185,24 +2138,29 @@
   m_regionName =
       region == nullptr ? "INVALID_REGION_NAME" : region->getFullPath();
   m_region = region;
-  m_timeout = DEFAULT_TIMEOUT;
   m_isDurable = isDurable;
-  m_receiveValues = receiveValues;
 
-  auto numInItrestList = keys.size();
-  assert(numInItrestList != 0);
-  uint32_t numOfParts = 2 + static_cast<uint32_t>(numInItrestList);
+  auto numberOfKeys = static_cast<uint32_t>(keys.size());
+  assert(numberOfKeys != 0);
+  auto numOfParts = 4 + numberOfKeys;
 
-  numOfParts += 2;
   writeHeader(m_msgType, numOfParts);
+
+  // part 0
   writeRegionPart(m_regionName);
-  writeBytePart(0);                  // isClosing
+
+  // part 1
+  writeBytePart(0);  // isClosing
+
+  // part 2
   writeBytePart(isDurable ? 1 : 0);  // keepalive
 
-  writeIntPart(static_cast<int32_t>(numInItrestList));
+  // part 3
+  writeIntPart(static_cast<int32_t>(numberOfKeys));
 
-  for (uint32_t i = 0; i < numInItrestList; i++) {
-    if (keys[i] == nullptr) {
+  // part N
+  for (decltype(numberOfKeys) i = 0; i < numberOfKeys; i++) {
+    if (!keys[i]) {
       throw IllegalArgumentException(
           "keys in the interest list cannot be nullptr");
     }
@@ -2210,7 +2168,6 @@
   }
 
   writeMessageLength();
-  m_interestPolicy = interestPolicy.ordinal;
 }
 
 TcrMessageCreateRegion::TcrMessageCreateRegion(
@@ -2230,64 +2187,82 @@
   m_regionName = str2;
 }
 
-TcrMessageRegisterInterest::TcrMessageRegisterInterest(
-    DataOutput* dataOutput, const std::string& str1, const std::string& str2,
-    InterestResultPolicy interestPolicy, bool isDurable, bool isCachingEnabled,
-    bool receiveValues, ThinClientBaseDM* connectionDM) {
+TcrMessageRegisterInterestRegex::TcrMessageRegisterInterestRegex(
+    DataOutput* dataOutput, const std::string& regionName,
+    const std::string& regex, InterestResultPolicy interestPolicy,
+    bool isDurable, bool isCachingEnabled, bool receiveValues,
+    ThinClientBaseDM* connectionDM) {
   m_request.reset(dataOutput);
   m_msgType = TcrMessage::REGISTER_INTEREST;
   m_tcdm = connectionDM;
   m_isDurable = isDurable;
   m_receiveValues = receiveValues;
+  m_regionName = regionName;
+  m_regex = regex;
+  m_interestPolicy = interestPolicy;
 
-  uint32_t numOfParts = 7;
+  writeHeader(m_msgType, 7);
 
-  writeHeader(m_msgType, numOfParts);
+  // part 0
+  writeRegionPart(regionName);
 
-  writeRegionPart(str1);                          // region name
-  writeIntPart(REGULAR_EXPRESSION);               // InterestType
-  writeInterestResultPolicyPart(interestPolicy);  // InterestResultPolicy
+  // part 1
+  writeIntPart(kREGULAR_EXPRESSION);  // InterestType
+
+  // part 2
+  writeInterestResultPolicyPart(interestPolicy);
+
+  // part 3
   writeBytePart(isDurable ? 1 : 0);
-  writeRegionPart(str2);  // regexp string
+
+  // part 4
+  writeRegionPart(regex);  // regexp string
 
   int8_t bytes[2];
+
+  // part 5
   std::shared_ptr<CacheableBytes> byteArr = nullptr;
   bytes[0] = receiveValues ? 0 : 1;
   byteArr = CacheableBytes::create(std::vector<int8_t>(bytes, bytes + 1));
   writeObjectPart(byteArr);
+
+  // part 6
   bytes[0] = isCachingEnabled ? 1 : 0;  // region data policy
   bytes[1] = 0;                         // serializevalues
   byteArr = CacheableBytes::create(std::vector<int8_t>(bytes, bytes + 2));
   writeObjectPart(byteArr);
 
   writeMessageLength();
-  m_regionName = str1;
-  m_regex = str2;
-  m_interestPolicy = interestPolicy.ordinal;
 }
 
-TcrMessageUnregisterInterest::TcrMessageUnregisterInterest(
-    DataOutput* dataOutput, const std::string& str1, const std::string& str2,
-    InterestResultPolicy interestPolicy, bool isDurable, bool receiveValues,
-    ThinClientBaseDM* connectionDM) {
+TcrMessageUnregisterInterestRegex::TcrMessageUnregisterInterestRegex(
+    DataOutput* dataOutput, const std::string& regionName,
+    const std::string& regex, bool isDurable, ThinClientBaseDM* connectionDM) {
   m_request.reset(dataOutput);
   m_msgType = TcrMessage::UNREGISTER_INTEREST;
   m_tcdm = connectionDM;
   m_isDurable = isDurable;
-  m_receiveValues = receiveValues;
+  m_regionName = regionName;
+  m_regex = regex;
 
-  uint32_t numOfParts = 3;
-  numOfParts += 2;
-  writeHeader(m_msgType, numOfParts);
-  writeRegionPart(str1);             // region name
-  writeIntPart(REGULAR_EXPRESSION);  // InterestType
-  writeRegionPart(str2);             // regexp string
-  writeBytePart(0);                  // isClosing
+  writeHeader(m_msgType, 5);
+
+  // part 0
+  writeRegionPart(regionName);
+
+  // part 1
+  writeIntPart(kREGULAR_EXPRESSION);
+
+  // part 2
+  writeRegionPart(regex);
+
+  // part 3
+  writeBytePart(0);  // isClosing
+
+  // part 4
   writeBytePart(isDurable ? 1 : 0);  // keepalive
+
   writeMessageLength();
-  m_regionName = str1;
-  m_regex = str2;
-  m_interestPolicy = interestPolicy.ordinal;
 }
 
 TcrMessageTxSynchronization::TcrMessageTxSynchronization(DataOutput* dataOutput,
@@ -2420,11 +2395,11 @@
   // checks are disabled.
   int flags = 0;
   if (!region->getAttributes().getCachingEnabled()) {
-    flags |= TcrMessage::m_flag_empty;
+    flags |= kFlagEmpty;
     LOGDEBUG("TcrMessage::PUTALL datapolicy empty flags = %d ", flags);
   }
   if (region->getAttributes().getConcurrencyChecksEnabled()) {
-    flags |= TcrMessage::m_flag_concurrency_checks;
+    flags |= kFlagConcurrencyChecks;
     LOGDEBUG("TcrMessage::PUTALL ConcurrencyChecksEnabled flags = %d ", flags);
   }
   writeIntPart(flags);
@@ -2474,11 +2449,11 @@
   // checks are disabled.
   int flags = 0;
   if (!region->getAttributes().getCachingEnabled()) {
-    flags |= TcrMessage::m_flag_empty;
+    flags |= kFlagEmpty;
     LOGDEBUG("TcrMessage::REMOVE_ALL datapolicy empty flags = %d ", flags);
   }
   if (region->getAttributes().getConcurrencyChecksEnabled()) {
-    flags |= TcrMessage::m_flag_concurrency_checks;
+    flags |= kFlagConcurrencyChecks;
     LOGDEBUG("TcrMessage::REMOVE_ALL ConcurrencyChecksEnabled flags = %d ",
              flags);
   }
@@ -3064,7 +3039,6 @@
 void TcrMessage::setMessageTypeRequest(int32_t msgType) {
   m_msgTypeRequest = msgType;
 }
-int32_t TcrMessage::getMessageTypeRequest() const { return m_msgTypeRequest; }
 
 const std::map<std::string, int>* TcrMessage::getCqs() const { return m_cqs; }
 std::shared_ptr<CacheableKey> TcrMessage::getKey() const { return m_key; }
@@ -3089,19 +3063,8 @@
   return reinterpret_cast<const char*>(m_request->getBuffer());
 }
 
-const char* TcrMessage::getMsgHeader() const {
-  return reinterpret_cast<const char*>(m_request->getBuffer());
-}
-
-const char* TcrMessage::getMsgBody() const {
-  return reinterpret_cast<const char*>(m_request->getBuffer() + g_headerLen);
-}
-
 size_t TcrMessage::getMsgLength() const { return m_request->getBufferLength(); }
 
-size_t TcrMessage::getMsgBodyLength() const {
-  return m_request->getBufferLength() - g_headerLen;
-}
 std::shared_ptr<EventId> TcrMessage::getEventId() const { return m_eventid; }
 
 int32_t TcrMessage::getTransId() const { return m_txId; }
@@ -3141,20 +3104,19 @@
     apache::geode::client::DataInput& input) {
   uint8_t typeidLen = input.read();
   if (typeidLen == 1) {
-    auto typeidofMember = static_cast<DSCode>(input.read());
-    if (typeidofMember != DSCode::InternalDistributedMember) {
+    auto typeidofMember = static_cast<DSFid>(input.read());
+    if (typeidofMember != DSFid::InternalDistributedMember) {
       throw Exception(
           "Reading DSMember. Expecting type id 92 for "
           "InternalDistributedMember. ");
     }
 
-    auto memId =
-        std::shared_ptr<ClientProxyMembershipID>(new ClientProxyMembershipID());
+    auto memId = std::make_shared<ClientProxyMembershipID>();
     memId->fromData(input);
     return std::shared_ptr<DSMemberForVersionStamp>(memId);
   } else if (typeidLen == 2) {
-    auto typeidofMember = input.readInt16();
-    if (typeidofMember != static_cast<int16_t>(DSFid::DiskStoreId)) {
+    auto typeidofMember = static_cast<DSFid>(input.readInt16());
+    if (typeidofMember != DSFid::DiskStoreId) {
       throw Exception(
           "Reading DSMember. Expecting type id 2133 for DiskStoreId. ");
     }
@@ -3238,12 +3200,8 @@
     return ChunkObjectType::NULL_OBJECT;
   } else if (!isObj) {
     // otherwise we're currently always expecting an object
-    char exMsg[256];
-    std::snprintf(exMsg, sizeof(exMsg),
-                  "TcrMessageHelper::readChunkPartHeader: "
-                  "%s: part is not object",
-                  methodName);
-    LOGDEBUG("%s ", exMsg);
+    LOGDEBUG(std::string("TcrMessageHelper::readChunkPartHeader: ") +
+             methodName + ": part is not object");
     return ChunkObjectType::EXCEPTION;
   }
 
@@ -3259,26 +3217,21 @@
       return ChunkObjectType::EXCEPTION;
     } else {
       char exMsg[256];
-      std::snprintf(exMsg, sizeof(exMsg),
-                    "TcrMessageHelper::readChunkPartHeader: %s: cannot handle "
-                    "java serializable object from server",
-                    methodName);
-      throw MessageException(exMsg);
+      throw MessageException(
+          std::string("TcrMessageHelper::readChunkPartHeader: ") + methodName +
+          ": cannot handle java serializable object from server");
     }
   } else if (partType == DSCode::NullObj) {
     // special null object is case for scalar query result
     return ChunkObjectType::NULL_OBJECT;
   }
 
-  // TODO enum - wtf?
   if (expectedFirstType > DSCode::FixedIDDefault) {
     if (partType != expectedFirstType) {
-      char exMsg[256];
-      std::snprintf(exMsg, sizeof(exMsg),
-                    "TcrMessageHelper::readChunkPartHeader: "
-                    "%s: got unhandled object class = %" PRId8,
-                    methodName, static_cast<int8_t>(partType));
-      throw MessageException(exMsg);
+      throw MessageException(
+          std::string("TcrMessageHelper::readChunkPartHeader: ") + methodName +
+          ": got unhandled object class = " +
+          std::to_string(static_cast<int8_t>(partType)));
     }
     // This is for GETALL
     if (expectedFirstType == DSCode::FixedIDShort) {
@@ -3289,12 +3242,11 @@
     }
   }
   if (compId != expectedPartType) {
-    char exMsg[256];
-    std::snprintf(exMsg, sizeof(exMsg),
-                  "TcrMessageHelper::readChunkPartHeader: "
-                  "%s: got unhandled object type = %d, expected = %d, raw = %d",
-                  methodName, compId, expectedPartType, rawByte);
-    throw MessageException(exMsg);
+    throw MessageException(
+        std::string("TcrMessageHelper::readChunkPartHeader: ") + methodName +
+        ": got unhandled object type = " + std::to_string(compId) +
+        ", expected = " + std::to_string(expectedPartType) +
+        ", raw = " + std::to_string(static_cast<int>(rawByte)));
   }
   return ChunkObjectType::OBJECT;
 }
@@ -3310,12 +3262,9 @@
     return ChunkObjectType::NULL_OBJECT;
   } else if (!isObj) {
     // otherwise we're currently always expecting an object
-    char exMsg[256];
-    std::snprintf(exMsg, 255,
-                  "TcrMessageHelper::readChunkPartHeader: "
-                  "%s: part is not object",
-                  methodName);
-    throw MessageException(exMsg);
+    throw MessageException(
+        std::string("TcrMessageHelper::readChunkPartHeader: ") + methodName +
+        ": part is not object");
   }
 
   const auto partType = static_cast<const DSCode>(input.read());
@@ -3326,12 +3275,9 @@
       msg.setMessageType(TcrMessage::EXCEPTION);
       return ChunkObjectType::EXCEPTION;
     } else {
-      char exMsg[256];
-      std::snprintf(exMsg, 255,
-                    "TcrMessageHelper::readChunkPartHeader: %s: cannot handle "
-                    "java serializable object from server",
-                    methodName);
-      throw MessageException(exMsg);
+      throw MessageException(
+          std::string("TcrMessageHelper::readChunkPartHeader: ") + methodName +
+          ": cannot handle java serializable object from server");
     }
   } else if (partType == DSCode::NullObj) {
     // special null object is case for scalar query result
diff --git a/cppcache/src/TcrMessage.hpp b/cppcache/src/TcrMessage.hpp
index 9230600..8d9d44c 100644
--- a/cppcache/src/TcrMessage.hpp
+++ b/cppcache/src/TcrMessage.hpp
@@ -37,22 +37,26 @@
 #include <geode/Serializable.hpp>
 #include <geode/internal/geode_globals.hpp>
 
-#include "BucketServerLocation.hpp"
-#include "EventId.hpp"
 #include "EventIdMap.hpp"
-#include "FixedPartitionAttributesImpl.hpp"
 #include "InterestResultPolicy.hpp"
-#include "SerializationRegistry.hpp"
-#include "TcrChunkedContext.hpp"
-#include "VersionTag.hpp"
-#include "VersionedCacheableObjectPartList.hpp"
+#include "util/concurrent/binary_semaphore.hpp"
 
 namespace apache {
 namespace geode {
 namespace client {
+
 class ThinClientBaseDM;
 class TcrConnection;
 class TcrMessagePing;
+class BucketServerLocation;
+class EventId;
+class FixedPartitionAttributesImpl;
+class SerializationRegistry;
+class VersionTag;
+class VersionedCacheableObjectPartList;
+class MemberListForVersionStamp;
+class TcrChunkedResult;
+class DSMemberForVersionStamp;
 
 class TcrMessage {
  public:
@@ -170,7 +174,6 @@
 
   } MsgType;
 
-  static bool isKeepAlive();
   static bool isUserInitiativeOps(const TcrMessage& msg);
 
   static std::shared_ptr<VersionTag> readVersionTagPart(
@@ -182,7 +185,7 @@
                const SerializationRegistry& serializationRegistry,
                MemberListForVersionStamp& memberListForVersionStamp);
 
-  void startProcessChunk(ACE_Semaphore& finalizeSema);
+  void startProcessChunk(binary_semaphore& finalizeSema);
   // nullptr chunk means that this is the last chunk
   void processChunk(const std::vector<uint8_t>& chunk, int32_t chunkLen,
                     uint16_t endpointmemId,
@@ -230,10 +233,11 @@
   Region* getRegion() const;
   int32_t getMessageType() const;
   void setMessageType(int32_t msgType);
-  void setMessageTypeRequest(int32_t msgType);  // the msgType of the request
-                                                // that was made if this is a
-                                                // reply
-  int32_t getMessageTypeRequest() const;
+
+  /**
+   * Set the msgType of the request that was made if this is a reply.
+   */
+  void setMessageTypeRequest(int32_t msgType);
   std::shared_ptr<CacheableKey> getKey() const;
   const std::shared_ptr<CacheableKey>& getKeyRef() const;
   std::shared_ptr<Cacheable> getValue() const;
@@ -246,10 +250,7 @@
   const std::string& getException();
 
   const char* getMsgData() const;
-  const char* getMsgHeader() const;
-  const char* getMsgBody() const;
   size_t getMsgLength() const;
-  size_t getMsgBodyLength() const;
   std::shared_ptr<EventId> getEventId() const;
 
   int32_t getTransId() const;
@@ -258,19 +259,10 @@
   std::chrono::milliseconds getTimeout() const;
   void setTimeout(std::chrono::milliseconds timeout);
 
-  /* we need a static method to generate ping */
-  /* The caller should not delete the message since it is global. */
-  static TcrMessagePing* getPingMessage(CacheImpl* cacheImpl);
-  static TcrMessage* getAllEPDisMess();
-  /* we need a static method to generate close connection message */
-  /* The caller should not delete the message since it is global. */
-  static TcrMessage* getCloseConnMessage(CacheImpl* cacheImpl);
-  static void setKeepAlive(bool keepalive);
   bool isDurable() const;
   bool receiveValues() const;
   bool hasCqPart() const;
   uint32_t getMessageTypeForCq() const;
-  bool isInterestListPassed() const;
   bool shouldIgnore() const;
   int8_t getMetaDataVersion() const;
   uint32_t getEntryNotFound() const;
@@ -283,19 +275,14 @@
   // set the chunked response handler
   void setChunkedResultHandler(TcrChunkedResult* chunkedResult);
   TcrChunkedResult* getChunkedResultHandler();
-  void setVersionedObjectPartList(
-      std::shared_ptr<VersionedCacheableObjectPartList> versionObjPartListptr);
 
-  std::shared_ptr<VersionedCacheableObjectPartList>
-  getVersionedObjectPartList();
-
-  DataInput* getDelta();
+  DataInput* getDelta() const;
   //  getDeltaBytes( ) is called *only* by CqService, returns a CacheableBytes
   //  that
   // takes ownership of delta bytes.
   std::shared_ptr<CacheableBytes> getDeltaBytes();
 
-  bool hasDelta();
+  bool hasDelta() const;
 
   void addSecurityPart(int64_t connectionId, int64_t unique_id,
                        TcrConnection* conn);
@@ -321,8 +308,6 @@
 
   const std::string& getColocatedWith() const;
 
-  const std::string& getPartitionResolver() const;
-
   std::vector<std::vector<std::shared_ptr<BucketServerLocation>>>*
   getMetadata();
 
@@ -334,10 +319,8 @@
 
   void setCallBackArguement(bool aCallBackArguement);
 
-  void setBucketServerLocation(
-      std::shared_ptr<BucketServerLocation> serverLocation);
   void setVersionTag(std::shared_ptr<VersionTag> versionTag);
-  std::shared_ptr<VersionTag> getVersionTag();
+  std::shared_ptr<VersionTag> getVersionTag() const;
   uint8_t hasResult() const;
   std::shared_ptr<CacheableHashMap> getTombstoneVersions() const;
   std::shared_ptr<CacheableHashSet> getTombstoneKeys() const;
@@ -368,7 +351,6 @@
   void readKeyPart(DataInput& input);
   void readBooleanPartAsObject(DataInput& input, bool* boolVal);
   void readIntPart(DataInput& input, uint32_t* intValue);
-  void readLongPart(DataInput& input, uint64_t* intValue);
   bool readExceptionPart(DataInput& input, uint8_t isLastChunk,
                          bool skipFirstPart = true);
   void readVersionTag(DataInput& input, uint16_t endpointMemId,
@@ -429,20 +411,14 @@
   std::shared_ptr<Cacheable> m_callbackArgument;
   std::shared_ptr<VersionTag> m_versionTag;
   std::shared_ptr<EventId> m_eventid;
-  std::shared_ptr<CacheableVector> m_vectorPtr;
-  std::shared_ptr<BucketServerLocation> m_bucketServerLocation;
   std::shared_ptr<CacheableHashMap> m_tombstoneVersions;
   std::shared_ptr<CacheableHashSet> m_tombstoneKeys;
-  std::shared_ptr<VersionedCacheableObjectPartList> m_versionObjPartListptr;
   std::string m_exceptionMessage;
   std::string m_regionName;
   std::string m_regex;
-  std::vector<std::shared_ptr<BucketServerLocation>> m_bucketServerLocations;
   std::string m_colocatedWith;
-  std::string m_partitionResolverName;
   int32_t m_securityHeaderLength;
   int32_t m_msgType;
-  int32_t m_msgLength;
   /** the msgType of the request if this TcrMessage is  a reply msg */
   int32_t m_msgTypeRequest;
   int32_t m_txId;
@@ -452,13 +428,13 @@
   int32_t m_deltaBytesLen;
   uint32_t m_entryNotFound;
   bool m_feAnotherHop;
-  bool isSecurityOn;
+  bool m_isSecurityOn;
   uint8_t m_isLastChunkAndisSecurityHeader;
   bool m_isSecurityHeaderAdded;
   bool m_isMetaRegion;
   /** used only when decoding reply message, if false, decode header only */
   bool m_decodeAll;
-  char m_interestPolicy;
+  InterestResultPolicy m_interestPolicy;
   bool m_isDurable;
   bool m_receiveValues;
   bool m_hasCqsPart;
@@ -470,11 +446,6 @@
   bool m_isCallBackArguement;
   uint8_t m_hasResult;
 
-  static std::atomic<int32_t> m_transactionId;
-  static uint8_t* m_keepAlive;
-  const static int m_flag_empty;
-  const static int m_flag_concurrency_checks;
-
   friend class TcrMessageHelper;
 };
 
@@ -581,6 +552,7 @@
   TcrMessageDestroy(DataOutput* dataOutput, const Region* region,
                     const std::shared_ptr<CacheableKey>& key,
                     const std::shared_ptr<Cacheable>& value,
+                    bool isUserNullValue,
                     const std::shared_ptr<Serializable>& aCallbackArgument,
                     ThinClientBaseDM* connectionDM = nullptr);
 
@@ -605,9 +577,7 @@
   TcrMessageUnregisterInterestList(
       DataOutput* dataOutput, const Region* region,
       const std::vector<std::shared_ptr<CacheableKey>>& keys,
-      bool isDurable = false, bool receiveValues = true,
-      InterestResultPolicy interestPolicy = InterestResultPolicy::NONE,
-      ThinClientBaseDM* connectionDM = nullptr);
+      bool isDurable = false, ThinClientBaseDM* connectionDM = nullptr);
 
   ~TcrMessageUnregisterInterestList() override = default;
 };
@@ -635,26 +605,27 @@
   ~TcrMessageCreateRegion() override = default;
 };
 
-class TcrMessageRegisterInterest : public TcrMessage {
+class TcrMessageRegisterInterestRegex : public TcrMessage {
  public:
-  TcrMessageRegisterInterest(
-      DataOutput* dataOutput, const std::string& str1, const std::string& str2,
+  TcrMessageRegisterInterestRegex(
+      DataOutput* dataOutput, const std::string& regionName,
+      const std::string& regex,
       InterestResultPolicy interestPolicy = InterestResultPolicy::NONE,
       bool isDurable = false, bool isCachingEnabled = false,
       bool receiveValues = true, ThinClientBaseDM* connectionDM = nullptr);
 
-  ~TcrMessageRegisterInterest() override = default;
+  ~TcrMessageRegisterInterestRegex() override = default;
 };
 
-class TcrMessageUnregisterInterest : public TcrMessage {
+class TcrMessageUnregisterInterestRegex : public TcrMessage {
  public:
-  TcrMessageUnregisterInterest(
-      DataOutput* dataOutput, const std::string& str1, const std::string& str2,
-      InterestResultPolicy interestPolicy = InterestResultPolicy::NONE,
-      bool isDurable = false, bool receiveValues = true,
-      ThinClientBaseDM* connectionDM = nullptr);
+  TcrMessageUnregisterInterestRegex(DataOutput* dataOutput,
+                                    const std::string& regionName,
+                                    const std::string& regex,
+                                    bool isDurable = false,
+                                    ThinClientBaseDM* connectionDM = nullptr);
 
-  ~TcrMessageUnregisterInterest() override = default;
+  ~TcrMessageUnregisterInterestRegex() override = default;
 };
 
 class TcrMessageTxSynchronization : public TcrMessage {
@@ -911,14 +882,15 @@
 
 class TcrMessagePing : public TcrMessage {
  public:
-  TcrMessagePing(DataOutput* dataOutput, bool decodeAll);
+  explicit TcrMessagePing(std::unique_ptr<DataOutput> dataOutput);
 
   ~TcrMessagePing() override = default;
 };
 
 class TcrMessageCloseConnection : public TcrMessage {
  public:
-  TcrMessageCloseConnection(DataOutput* dataOutput, bool decodeAll);
+  TcrMessageCloseConnection(std::unique_ptr<DataOutput> dataOutput,
+                            bool keepAlive);
 
   ~TcrMessageCloseConnection() override = default;
 };
@@ -937,6 +909,11 @@
   ~TcrMessageReply() override = default;
 };
 
+class TcrMessageAllEndpointsDisconnectedMarker : public TcrMessage {
+ public:
+  TcrMessageAllEndpointsDisconnectedMarker() = default;
+};
+
 /**
  * Helper class to invoke some internal methods of TcrMessage. Add any
  * methods that response processor methods require to access here.
diff --git a/cppcache/src/TcrPoolEndPoint.cpp b/cppcache/src/TcrPoolEndPoint.cpp
index 14154ad..23cbb2d 100644
--- a/cppcache/src/TcrPoolEndPoint.cpp
+++ b/cppcache/src/TcrPoolEndPoint.cpp
@@ -19,6 +19,7 @@
 
 #include <geode/SystemProperties.hpp>
 
+#include "CacheImpl.hpp"
 #include "ThinClientPoolDM.hpp"
 
 namespace apache {
@@ -26,9 +27,9 @@
 namespace client {
 
 TcrPoolEndPoint::TcrPoolEndPoint(const std::string& name, CacheImpl* cache,
-                                 ACE_Semaphore& failoverSema,
-                                 ACE_Semaphore& cleanupSema,
-                                 ACE_Semaphore& redundancySema,
+                                 binary_semaphore& failoverSema,
+                                 binary_semaphore& cleanupSema,
+                                 binary_semaphore& redundancySema,
                                  ThinClientPoolDM* dm)
     : TcrEndpoint(name, cache, failoverSema, cleanupSema, redundancySema, dm),
       m_dm(dm) {}
@@ -61,7 +62,6 @@
 GfErrType TcrPoolEndPoint::registerDM(bool, bool isSecondary, bool,
                                       ThinClientBaseDM*) {
   GfErrType err = GF_NOERR;
-  std::lock_guard<decltype(m_dm->getPoolLock())> _guard(m_dm->getPoolLock());
   std::lock_guard<decltype(getQueueHostedMutex())> guardQueueHosted(
       getQueueHostedMutex());
   auto& sysProp = m_cacheImpl->getDistributedSystem().getSystemProperties();
@@ -74,7 +74,6 @@
       return err;
     }
     m_dm->addConnection(newConn);
-    // m_connected = true;
     setConnected(true);
   }
 
diff --git a/cppcache/src/TcrPoolEndPoint.hpp b/cppcache/src/TcrPoolEndPoint.hpp
index 61b20e2..3fce7d8 100644
--- a/cppcache/src/TcrPoolEndPoint.hpp
+++ b/cppcache/src/TcrPoolEndPoint.hpp
@@ -32,8 +32,8 @@
 class TcrPoolEndPoint : public TcrEndpoint {
  public:
   TcrPoolEndPoint(const std::string& name, CacheImpl* cache,
-                  ACE_Semaphore& failoverSema, ACE_Semaphore& cleanupSema,
-                  ACE_Semaphore& redundancySema, ThinClientPoolDM* dm);
+                  binary_semaphore& failoverSema, binary_semaphore& cleanupSema,
+                  binary_semaphore& redundancySema, ThinClientPoolDM* dm);
   ThinClientPoolDM* getPoolHADM() const override;
 
   bool checkDupAndAdd(std::shared_ptr<EventId> eventid) override;
diff --git a/cppcache/src/ThinClientBaseDM.cpp b/cppcache/src/ThinClientBaseDM.cpp
index 4acc0d2..44e2349 100644
--- a/cppcache/src/ThinClientBaseDM.cpp
+++ b/cppcache/src/ThinClientBaseDM.cpp
@@ -21,6 +21,7 @@
 
 #include <geode/AuthenticatedView.hpp>
 
+#include "CacheImpl.hpp"
 #include "TcrConnectionManager.hpp"
 #include "ThinClientRegion.hpp"
 #include "UserAttributes.hpp"
@@ -41,7 +42,7 @@
       m_chunks(true),
       m_chunkProcessor(nullptr) {}
 
-ThinClientBaseDM::~ThinClientBaseDM() = default;
+ThinClientBaseDM::~ThinClientBaseDM() noexcept = default;
 
 void ThinClientBaseDM::init() {
   const auto& systemProperties = m_connManager.getCacheImpl()
@@ -72,8 +73,7 @@
 GfErrType ThinClientBaseDM::sendSyncRequestRegisterInterest(
     TcrMessage& request, TcrMessageReply& reply, bool attemptFailover,
     ThinClientRegion*, TcrEndpoint* endpoint) {
-  GfErrType err = GF_NOERR;
-
+  GfErrType err;
   if (endpoint == nullptr) {
     err = sendSyncRequest(request, reply, attemptFailover);
   } else {
@@ -130,7 +130,11 @@
       const auto& exceptStr = reply.getException();
       if (!exceptStr.empty()) {
         bool markServerDead = unrecoverableServerError(exceptStr);
-        bool doFailover = (markServerDead || nonFatalServerError(exceptStr));
+        bool cacheClosedEx =
+            (exceptStr.find("org.apache.geode.cache.CacheClosedException") !=
+             std::string::npos);
+        bool doFailover =
+            (markServerDead || cacheClosedEx || nonFatalServerError(exceptStr));
         if (doFailover) {
           LOGFINE(
               "ThinClientDistributionManager::sendRequestToEP: retrying for "
@@ -150,10 +154,9 @@
 GfErrType ThinClientBaseDM::sendRequestToEndPoint(const TcrMessage& request,
                                                   TcrMessageReply& reply,
                                                   TcrEndpoint* ep) {
-  GfErrType error = GF_NOERR;
   LOGDEBUG("ThinClientBaseDM::sendRequestToEP: invoking endpoint send for: %s",
            ep->name().c_str());
-  error = ep->send(request, reply);
+  auto error = ep->send(request, reply);
   LOGDEBUG(
       "ThinClientBaseDM::sendRequestToEP: completed endpoint send for: %s "
       "[error:%d]",
@@ -169,9 +172,7 @@
  * This method is for exceptions when server should be marked as dead.
  */
 bool ThinClientBaseDM::unrecoverableServerError(const std::string& exceptStr) {
-  return ((exceptStr.find("org.apache.geode.cache.CacheClosedException") !=
-           std::string::npos) ||
-          (exceptStr.find("org.apache.geode.distributed.ShutdownException") !=
+  return ((exceptStr.find("org.apache.geode.distributed.ShutdownException") !=
            std::string::npos) ||
           (exceptStr.find("java.lang.OutOfMemoryError") != std::string::npos));
 }
@@ -219,13 +220,23 @@
   TcrChunkedContext* chunk;
   LOGFINE("Starting chunk process thread for region %s",
           (m_region ? m_region->getFullPath().c_str() : "(null)"));
+
+  std::chrono::milliseconds wait_for_chunk{100};
+  chunk = m_chunks.getFor(wait_for_chunk);
+
   while (isRunning) {
-    chunk = m_chunks.getFor(std::chrono::microseconds(100000));
     if (chunk) {
       chunk->handleChunk(false);
       _GEODE_SAFE_DELETE(chunk);
     }
+
+    chunk = m_chunks.getFor(wait_for_chunk);
   }
+
+  if (chunk) {
+    _GEODE_SAFE_DELETE(chunk);
+  }
+
   LOGFINE("Ending chunk process thread for region %s",
           (m_region ? m_region->getFullPath().c_str() : "(null)"));
 }
@@ -262,9 +273,8 @@
       this->isSecurityOn(), this->isMultiUserMode(), request.getMessageType());
   if (!(request.isMetaRegion()) && TcrMessage::isUserInitiativeOps(request) &&
       (this->isSecurityOn() || this->isMultiUserMode())) {
-    int64_t connId = 0;
+    int64_t connId;
     int64_t uniqueId = 0;
-
     if (!this->isMultiUserMode()) {
       connId = conn->getConnectionId();
       uniqueId = conn->getEndpointObject()->getUniqueId();
diff --git a/cppcache/src/ThinClientBaseDM.hpp b/cppcache/src/ThinClientBaseDM.hpp
index 2920876..8c760e0 100644
--- a/cppcache/src/ThinClientBaseDM.hpp
+++ b/cppcache/src/ThinClientBaseDM.hpp
@@ -37,6 +37,7 @@
 class TcrMessage;
 class ThinClientRegion;
 class TcrEndpoint;
+class TcrConnection;
 class TcrConnectionManager;
 class TcrMessageReply;
 class TcrChunkedContext;
@@ -48,7 +49,7 @@
 class ThinClientBaseDM {
  public:
   ThinClientBaseDM(TcrConnectionManager& connManager, ThinClientRegion* region);
-  virtual ~ThinClientBaseDM() = 0;
+  virtual ~ThinClientBaseDM() noexcept;
 
   virtual void init();
   virtual void destroy(bool keepalive = false);
@@ -116,6 +117,9 @@
 
   virtual TcrEndpoint* getActiveEndpoint() { return nullptr; }
 
+  virtual void incConnectedEndpoints() {}
+  virtual void decConnectedEndpoints() {}
+
   virtual bool checkDupAndAdd(std::shared_ptr<EventId> eventid);
 
   virtual std::recursive_mutex& getRedundancyLock();
diff --git a/cppcache/src/ThinClientCacheDistributionManager.cpp b/cppcache/src/ThinClientCacheDistributionManager.cpp
index e33e0d7..6f75644 100644
--- a/cppcache/src/ThinClientCacheDistributionManager.cpp
+++ b/cppcache/src/ThinClientCacheDistributionManager.cpp
@@ -20,10 +20,8 @@
 #include <algorithm>
 
 #include <geode/ExceptionTypes.hpp>
-#include <geode/internal/geode_globals.hpp>
 
 #include "CacheImpl.hpp"
-#include "ReadWriteLock.hpp"
 #include "RemoteQueryService.hpp"
 #include "TcrConnectionManager.hpp"
 #include "TcrEndpoint.hpp"
diff --git a/cppcache/src/ThinClientCacheDistributionManager.hpp b/cppcache/src/ThinClientCacheDistributionManager.hpp
index 29898e8..d6edc92 100644
--- a/cppcache/src/ThinClientCacheDistributionManager.hpp
+++ b/cppcache/src/ThinClientCacheDistributionManager.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_THINCLIENTCACHEDISTRIBUTIONMANAGER_H_
-#define GEODE_THINCLIENTCACHEDISTRIBUTIONMANAGER_H_
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -20,6 +15,11 @@
  * limitations under the License.
  */
 
+#pragma once
+
+#ifndef GEODE_THINCLIENTCACHEDISTRIBUTIONMANAGER_H_
+#define GEODE_THINCLIENTCACHEDISTRIBUTIONMANAGER_H_
+
 #include <memory>
 
 #include <geode/internal/geode_globals.hpp>
@@ -29,37 +29,38 @@
 namespace apache {
 namespace geode {
 namespace client {
-/**
- * @brief Distribute data between caches
- */
+
 class TcrMessage;
 class TcrConnection;
 
+/**
+ * @brief Distribute data between caches
+ */
 class ThinClientCacheDistributionManager
     : public ThinClientDistributionManager {
  public:
   explicit ThinClientCacheDistributionManager(
       TcrConnectionManager& connManager);
-  ~ThinClientCacheDistributionManager() {}
+  ~ThinClientCacheDistributionManager() override {}
 
-  void init();
+  void init() override;
   virtual GfErrType sendSyncRequest(TcrMessage& request, TcrMessageReply& reply,
                                     bool attemptFailover = true,
-                                    bool isBGThread = false);
+                                    bool isBGThread = false) override;
 
   GfErrType sendSyncRequestCq(TcrMessage& request, TcrMessageReply& reply);
   GfErrType sendRequestToPrimary(TcrMessage& request, TcrMessageReply& reply);
 
  protected:
-  virtual bool preFailoverAction();
-  virtual bool postFailoverAction(TcrEndpoint* endpoint);
+  bool preFailoverAction() override;
+  bool postFailoverAction(TcrEndpoint* endpoint) override;
 
- private:
-  // Disallow default/copy constructor and assignment operator.
-  ThinClientCacheDistributionManager();
-  ThinClientCacheDistributionManager(const ThinClientCacheDistributionManager&);
+ public:
+  ThinClientCacheDistributionManager() = delete;
+  ThinClientCacheDistributionManager(
+      const ThinClientCacheDistributionManager&) = delete;
   ThinClientCacheDistributionManager& operator=(
-      const ThinClientCacheDistributionManager&);
+      const ThinClientCacheDistributionManager&) = delete;
 };
 
 }  // namespace client
diff --git a/cppcache/src/ThinClientDistributionManager.cpp b/cppcache/src/ThinClientDistributionManager.cpp
index a9a30e2..1147e24 100644
--- a/cppcache/src/ThinClientDistributionManager.cpp
+++ b/cppcache/src/ThinClientDistributionManager.cpp
@@ -22,6 +22,7 @@
 #include <geode/AuthInitialize.hpp>
 #include <geode/SystemProperties.hpp>
 
+#include "CacheImpl.hpp"
 #include "DistributedSystemImpl.hpp"
 #include "TcrConnectionManager.hpp"
 #include "TcrEndpoint.hpp"
@@ -46,7 +47,7 @@
     randIndex.push_back(index);
   }
   RandGen randGen;
-  std::random_shuffle(randIndex.begin(), randIndex.end(), randGen);
+  std::shuffle(randIndex.begin(), randIndex.end(), randGen);
   int index = -1;
   GfErrType err = GF_NOERR;
   while (m_activeEndpoint < 0 && ++index < numEndpoints) {
@@ -79,7 +80,7 @@
   destroyAction();
   // stop the chunk processing thread
   stopChunkProcessor();
-  if (Log::finestEnabled()) {
+  if (Log::enabled(LogLevel::Finest)) {
     std::string endpointStr;
     for (size_t index = 0; index < m_endpoints.size(); ++index) {
       if (index != 0) {
@@ -272,7 +273,7 @@
             randIndex.push_back(idx);
           }
         }
-        std::random_shuffle(randIndex.begin(), randIndex.end(), randGen);
+        std::shuffle(randIndex.begin(), randIndex.end(), randGen);
         doRand = false;
       }
       while (!randIndex.empty()) {
diff --git a/cppcache/src/ThinClientDistributionManager.hpp b/cppcache/src/ThinClientDistributionManager.hpp
index b1657e1..a00b64d 100644
--- a/cppcache/src/ThinClientDistributionManager.hpp
+++ b/cppcache/src/ThinClientDistributionManager.hpp
@@ -32,7 +32,7 @@
  public:
   ThinClientDistributionManager(TcrConnectionManager& connManager,
                                 ThinClientRegion* region);
-  ~ThinClientDistributionManager() override = default;
+  ~ThinClientDistributionManager() noexcept override = default;
 
   void init() override;
   void destroy(bool keepalive = false) override;
@@ -81,6 +81,7 @@
   std::vector<TcrEndpoint*> m_endpoints;
   std::recursive_mutex m_endpointsLock;
 };
+
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/ThinClientHARegion.cpp b/cppcache/src/ThinClientHARegion.cpp
index 1910919..e225163 100644
--- a/cppcache/src/ThinClientHARegion.cpp
+++ b/cppcache/src/ThinClientHARegion.cpp
@@ -17,13 +17,15 @@
 
 #include "ThinClientHARegion.hpp"
 
+#include <boost/thread/lock_types.hpp>
+
 #include <geode/PoolManager.hpp>
 #include <geode/SystemProperties.hpp>
 
 #include "CacheImpl.hpp"
-#include "ReadWriteLock.hpp"
 #include "TcrHADistributionManager.hpp"
 #include "ThinClientPoolHADM.hpp"
+
 namespace apache {
 namespace geode {
 namespace client {
@@ -80,7 +82,7 @@
 }
 
 void ThinClientHARegion::handleMarker() {
-  TryReadGuard guard(m_rwLock, m_destroyPending);
+  boost::shared_lock<decltype(mutex_)> guard{mutex_};
   if (m_destroyPending) {
     return;
   }
@@ -117,15 +119,14 @@
   poolDM->decRegionCount();
 }
 
-void ThinClientHARegion::addDisMessToQueue() {
+void ThinClientHARegion::addDisconnectedMessageToQueue() {
   auto poolDM = std::dynamic_pointer_cast<ThinClientPoolHADM>(m_tcrdm);
-  poolDM->addDisMessToQueue(this);
+  poolDM->addDisconnectedMessageToQueue(this);
 
-  if (poolDM->m_redundancyManager->m_globalProcessedMarker &&
+  if (poolDM->redundancyManager_->m_globalProcessedMarker &&
       !m_processedMarker) {
-    TcrMessage* regionMsg = new TcrMessageClientMarker(
-        new DataOutput(m_cacheImpl->createDataOutput()), true);
-    receiveNotification(regionMsg);
+    receiveNotification(TcrMessageClientMarker(
+        new DataOutput(m_cacheImpl->createDataOutput()), true));
   }
 }
 
diff --git a/cppcache/src/ThinClientHARegion.hpp b/cppcache/src/ThinClientHARegion.hpp
index d6fe7a5..c7c7f8d 100644
--- a/cppcache/src/ThinClientHARegion.hpp
+++ b/cppcache/src/ThinClientHARegion.hpp
@@ -37,7 +37,7 @@
  * send and invalidate methods.
  *
  */
-class APACHE_GEODE_EXPORT ThinClientHARegion : public ThinClientRegion {
+class ThinClientHARegion : public ThinClientRegion {
  public:
   ThinClientHARegion(const std::string& name, CacheImpl* cache,
                      const std::shared_ptr<RegionInternal>& rPtr,
@@ -57,7 +57,7 @@
   void setProcessedMarker(bool mark = true) override {
     m_processedMarker = mark;
   }
-  void addDisMessToQueue() override;
+  void addDisconnectedMessageToQueue() override;
 
  protected:
   GfErrType getNoThrow_FullObject(
diff --git a/cppcache/src/ThinClientLocatorHelper.cpp b/cppcache/src/ThinClientLocatorHelper.cpp
index 89cc97d..d896d65 100644
--- a/cppcache/src/ThinClientLocatorHelper.cpp
+++ b/cppcache/src/ThinClientLocatorHelper.cpp
@@ -26,16 +26,22 @@
 #include <geode/DataOutput.hpp>
 #include <geode/SystemProperties.hpp>
 
+#include "CacheImpl.hpp"
 #include "ClientConnectionRequest.hpp"
 #include "ClientConnectionResponse.hpp"
 #include "ClientReplacementRequest.hpp"
+#include "FunctionMacros.hpp"
 #include "LocatorListRequest.hpp"
 #include "LocatorListResponse.hpp"
 #include "QueueConnectionRequest.hpp"
 #include "QueueConnectionResponse.hpp"
+#include "TcpConn.hpp"
 #include "TcpSslConn.hpp"
 #include "TcrConnectionManager.hpp"
 #include "ThinClientPoolDM.hpp"
+#include "Version.hpp"
+
+INIT_GNFN("ThinClientLocatorHelper")
 
 namespace apache {
 namespace geode {
@@ -44,17 +50,12 @@
 const size_t BUFF_SIZE = 3000;
 const size_t DEFAULT_CONNECTION_RETRIES = 3;
 
-ThinClientLocatorHelper::ConnectionWrapper::~ConnectionWrapper() {
-  if (conn_ != nullptr) {
-    LOGDEBUG("Closing the locator connection");
-    conn_->close();
-    delete conn_;
-  }
-}
-
 ThinClientLocatorHelper::ThinClientLocatorHelper(
     const std::vector<std::string>& locators, const ThinClientPoolDM* poolDM)
-    : locators_(locators.begin(), locators.end()), m_poolDM(poolDM) {}
+    : locators_(locators.begin(), locators.end()),
+      m_poolDM(poolDM),
+      m_sniProxyHost(""),
+      m_sniProxyPort(0) {}
 
 ThinClientLocatorHelper::ThinClientLocatorHelper(
     const std::vector<std::string>& locators, const std::string& sniProxyHost,
@@ -81,19 +82,17 @@
   }
 
   RandGen randGen;
-  std::random_shuffle(locators.begin(), locators.end(), randGen);
+  std::shuffle(locators.begin(), locators.end(), randGen);
   return locators;
 }
 
-ThinClientLocatorHelper::ConnectionWrapper
-ThinClientLocatorHelper::createConnection(
+std::unique_ptr<Connector> ThinClientLocatorHelper::createConnection(
     const ServerLocation& location) const {
   auto& sys_prop = m_poolDM->getConnectionManager()
                        .getCacheImpl()
                        ->getDistributedSystem()
                        .getSystemProperties();
 
-  Connector* conn;
   const auto port = location.getPort();
   auto timeout = sys_prop.connectTimeout();
   const auto& hostname = location.getServerName();
@@ -101,25 +100,23 @@
 
   if (sys_prop.sslEnabled()) {
     if (m_sniProxyHost.empty()) {
-      conn = new TcpSslConn(hostname, static_cast<uint16_t>(port), timeout,
-                            buffer_size, sys_prop.sslTrustStore(),
-                            sys_prop.sslKeyStore(),
-                            sys_prop.sslKeystorePassword());
+      return std::unique_ptr<Connector>(new TcpSslConn(
+          hostname, static_cast<uint16_t>(port), timeout, buffer_size,
+          sys_prop.sslTrustStore(), sys_prop.sslKeyStore(),
+          sys_prop.sslKeystorePassword()));
     } else {
-      conn = new TcpSslConn(hostname, timeout, buffer_size, m_sniProxyHost,
-                            m_sniProxyPort, sys_prop.sslTrustStore(),
-                            sys_prop.sslKeyStore(),
-                            sys_prop.sslKeystorePassword());
+      return std::unique_ptr<Connector>(new TcpSslConn(
+          hostname, static_cast<uint16_t>(port), m_sniProxyHost, m_sniProxyPort,
+          timeout, buffer_size, sys_prop.sslTrustStore(),
+          sys_prop.sslKeyStore(), sys_prop.sslKeystorePassword()));
     }
   } else {
-    conn = new TcpConn(hostname, port, timeout, buffer_size);
+    return std::unique_ptr<Connector>(new TcpConn(
+        hostname, static_cast<uint16_t>(port), timeout, buffer_size));
   }
-
-  ConnectionWrapper cw{conn};
-  cw->init();
-  return cw;
 }
 
+static constexpr int32_t kGossipVersion = 1002;
 std::shared_ptr<Serializable> ThinClientLocatorHelper::sendRequest(
     const ServerLocation& location,
     const std::shared_ptr<Serializable>& request) const {
@@ -132,8 +129,14 @@
     auto conn = createConnection(location);
     auto data =
         m_poolDM->getConnectionManager().getCacheImpl()->createDataOutput();
-    data.writeInt(static_cast<int32_t>(1001));  // GOSSIPVERSION
+    data.writeInt(kGossipVersion);
+    data.writeInt(Version::current().getOrdinal());
     data.writeObject(request);
+    LOGDEBUG(
+        "%s(%p): sending %d bytes to locator: %s", __GNFN__, this,
+        data.getBufferLength(),
+        Utils::convertBytesToString(data.getBuffer(), data.getBufferLength())
+            .c_str());
     auto sentLength = conn->send(
         reinterpret_cast<char*>(const_cast<uint8_t*>(data.getBuffer())),
         data.getBufferLength(), m_poolDM->getReadTimeout());
@@ -141,17 +144,24 @@
       return nullptr;
     }
     char buff[BUFF_SIZE];
-    auto receivedLength =
-        conn->receive(buff, BUFF_SIZE, m_poolDM->getReadTimeout());
-    if (receivedLength <= 0) {
+    const auto receivedLength = conn->receive(buff, m_poolDM->getReadTimeout());
+    if (!receivedLength) {
       return nullptr;
     }
 
+    LOGDEBUG("%s(%p): received %d bytes from locator: %s", __GNFN__, this,
+             receivedLength,
+             Utils::convertBytesToString(reinterpret_cast<uint8_t*>(buff),
+                                         receivedLength)
+                 .c_str());
+
     auto di = m_poolDM->getConnectionManager().getCacheImpl()->createDataInput(
         reinterpret_cast<uint8_t*>(buff), receivedLength);
 
     if (di.read() == REPLY_SSL_ENABLED && !sys_prop.sslEnabled()) {
-      LOGERROR("SSL is enabled on locator, enable SSL in client as well");
+      LOGERROR(
+          "%s(%p): SSL is enabled on locator %s, enable SSL in client as well",
+          __GNFN__, this, location.toString().c_str());
       throw AuthenticationRequiredException(
           "SSL is enabled on locator, enable SSL in client as well");
     }
@@ -161,8 +171,10 @@
   } catch (const AuthenticationRequiredException& excp) {
     throw excp;
   } catch (const Exception& excp) {
-    LOGFINE("Exception while querying locator: %s: %s", excp.getName().c_str(),
-            excp.what());
+    LOGFINE("%s(%p): Exception while querying locator: %s: %s", __GNFN__, this,
+            excp.getName().c_str(), excp.what());
+  } catch (...) {
+    LOGFINE("%s(%p): Exception while querying locator", __GNFN__, this);
   }
 
   return nullptr;
@@ -172,8 +184,8 @@
     std::vector<std::shared_ptr<ServerLocation> >& servers,
     const std::string& serverGrp) const {
   for (const auto& loc : getLocators()) {
-    LOGDEBUG("getAllServers getting servers from server = %s ",
-             loc.getServerName().c_str());
+    LOGDEBUG("%s(%p): getAllServers getting servers from server = %s ",
+             __GNFN__, this, loc.getServerName().c_str());
 
     auto request = std::make_shared<GetAllServersRequest>(serverGrp);
     auto response = std::dynamic_pointer_cast<GetAllServersResponse>(
@@ -197,10 +209,7 @@
   auto locatorsSize = locators.size();
   auto maxAttempts = getConnRetries();
 
-  LOGFINER(
-      "ThinClientLocatorHelper::getEndpointForNewCallBackConn maxAttempts = "
-      "%zu",
-      maxAttempts);
+  LOGFINER("%s(%p): maxAttempts = %zu", __GNFN__, this, maxAttempts);
 
   for (auto attempt = 0ULL; attempt < maxAttempts;) {
     const auto& loc = locators[attempt++ % locatorsSize];
@@ -232,8 +241,9 @@
   auto maxAttempts = getConnRetries();
 
   LOGFINER(
-      "ThinClientLocatorHelper::getEndpointForNewFwdConn maxAttempts = %zu",
-      maxAttempts);
+      "%s(%p): ThinClientLocatorHelper::getEndpointForNewFwdConn maxAttempts = "
+      "%zu",
+      __GNFN__, this, maxAttempts);
 
   for (auto attempt = 0ULL; attempt < maxAttempts;) {
     const auto& loc = locators[attempt++ % locatorsSize];
@@ -242,11 +252,12 @@
 
     std::shared_ptr<Serializable> request;
     if (currentServer == nullptr) {
-      LOGDEBUG("Creating ClientConnectionRequest");
+      LOGDEBUG("%s(%p): Creating ClientConnectionRequest", __GNFN__, this);
       request =
           std::make_shared<ClientConnectionRequest>(exclEndPts, serverGrp);
     } else {
-      LOGDEBUG("Creating ClientReplacementRequest for connection: %s",
+      LOGDEBUG("%s(%p): Creating ClientReplacementRequest for connection: %s",
+               __GNFN__, this,
                currentServer->getEndpointObject()->name().c_str());
       request = std::make_shared<ClientReplacementRequest>(
           currentServer->getEndpointObject()->name(), exclEndPts, serverGrp);
@@ -260,14 +271,14 @@
 
     response->printInfo();
     if (!response->serverFound()) {
-      LOGFINE("Server not found");
+      LOGFINE("%s(%p): Server not found", __GNFN__, this);
       locatorFound = true;
       continue;
     }
 
     outEndpoint = response->getServerLocation();
-    LOGFINE("Server found at [%s:%d]", outEndpoint.getServerName().c_str(),
-            outEndpoint.getPort());
+    LOGFINE("%s(%p): Server found at [%s:%d]", __GNFN__, this,
+            outEndpoint.getServerName().c_str(), outEndpoint.getPort());
 
     return GF_NOERR;
   }
@@ -283,8 +294,10 @@
     const std::string& serverGrp) {
   auto locators = getLocators();
   for (const auto& loc : locators) {
-    LOGFINER("Querying locator list at: [%s:%d] for update from group [%s]",
-             loc.getServerName().c_str(), loc.getPort(), serverGrp.c_str());
+    LOGFINER(
+        "%s(%p): Querying locator list at: [%s:%d] for update from group [%s]",
+        __GNFN__, this, loc.getServerName().c_str(), loc.getPort(),
+        serverGrp.c_str());
 
     auto request = std::make_shared<LocatorListRequest>(serverGrp);
     auto response = std::dynamic_pointer_cast<LocatorListResponse>(
diff --git a/cppcache/src/ThinClientLocatorHelper.hpp b/cppcache/src/ThinClientLocatorHelper.hpp
index d59fab9..74e4986 100644
--- a/cppcache/src/ThinClientLocatorHelper.hpp
+++ b/cppcache/src/ThinClientLocatorHelper.hpp
@@ -28,7 +28,6 @@
 
 #include <geode/internal/geode_globals.hpp>
 
-#include "ClientProxyMembershipID.hpp"
 #include "ErrType.hpp"
 #include "GetAllServersRequest.hpp"
 #include "GetAllServersResponse.hpp"
@@ -40,6 +39,8 @@
 
 class ThinClientPoolDM;
 class Connector;
+class TcrConnection;
+class ClientProxyMembershipID;
 
 class ThinClientLocatorHelper {
  public:
@@ -69,28 +70,6 @@
 
  private:
   /**
-   * Auxiliary types
-   */
-
-  class ConnectionWrapper {
-   private:
-    Connector* conn_;
-
-   public:
-    ConnectionWrapper(const ConnectionWrapper&) = delete;
-    ConnectionWrapper& operator=(const ConnectionWrapper&) = delete;
-
-    explicit ConnectionWrapper(Connector* conn) : conn_(conn) {}
-    ConnectionWrapper(ConnectionWrapper&& other) : conn_(other.conn_) {
-      other.conn_ = nullptr;
-    }
-
-    ~ConnectionWrapper();
-
-    Connector* operator->() { return conn_; }
-  };
-
-  /**
    * Returns the number of connections retries per request
    * @return Number of connection retries towards locators
    */
@@ -110,9 +89,10 @@
   /**
    * Creates a connection to the given locator
    * @param location Locator ServerLocation
-   * @return A connection wrapper for the locator
+   * @return A connection for the locator
    */
-  ConnectionWrapper createConnection(const ServerLocation& location) const;
+  std::unique_ptr<Connector> createConnection(
+      const ServerLocation& location) const;
 
   /**
    * Sends a request to the given locator
diff --git a/cppcache/src/ThinClientPoolDM.cpp b/cppcache/src/ThinClientPoolDM.cpp
index d8b23b4..15e359e 100644
--- a/cppcache/src/ThinClientPoolDM.cpp
+++ b/cppcache/src/ThinClientPoolDM.cpp
@@ -20,18 +20,16 @@
 #include <algorithm>
 #include <thread>
 
-#include <ace/INET_Addr.h>
-#include <ace/OS_NS_unistd.h>
-
 #include <geode/AuthInitialize.hpp>
 #include <geode/PoolManager.hpp>
 #include <geode/ResultCollector.hpp>
 #include <geode/SystemProperties.hpp>
 
+#include "CacheImpl.hpp"
+#include "ClientProxyMembershipID.hpp"
 #include "DistributedSystemImpl.hpp"
 #include "ExecutionImpl.hpp"
-#include "ExpiryHandler_T.hpp"
-#include "ExpiryTaskManager.hpp"
+#include "FunctionExpiryTask.hpp"
 #include "TcrConnectionManager.hpp"
 #include "TcrEndpoint.hpp"
 #include "ThinClientRegion.hpp"
@@ -40,6 +38,14 @@
 #include "statistics/PoolStatsSampler.hpp"
 #include "util/exception.hpp"
 
+/** Closes and Deletes connection only if it exists */
+#define GF_SAFE_DELETE_CON(x) \
+  do {                        \
+    x->close();               \
+    delete x;                 \
+    x = nullptr;              \
+  } while (0)
+
 namespace apache {
 namespace geode {
 namespace client {
@@ -133,9 +139,8 @@
       m_poolName(name),
       m_stats(nullptr),
       m_sticky(false),
-      m_updateLocatorListSema(0),
-      m_pingSema(0),
-      m_cliCallbackSema(0),
+      update_locators_semaphore_(0),
+      ping_semaphore_(0),
       m_isDestroyed(false),
       m_destroyPending(false),
       m_destroyPendingHADM(false),
@@ -144,39 +149,36 @@
       m_poolSize(0),
       m_numRegions(0),
       m_server(0),
-      m_connSema(0),
+      conn_semaphore_(0),
       m_connManageTask(nullptr),
       m_pingTask(nullptr),
       m_updateLocatorListTask(nullptr),
-      m_cliCallbackTask(nullptr),
-      m_pingTaskId(-1),
-      m_updateLocatorListTaskId(-1),
-      m_connManageTaskId(-1),
       m_clientOps(0),
+      connected_endpoints_(0),
       m_PoolStatsSampler(nullptr),
       m_clientMetadataService(nullptr),
       m_primaryServerQueueSize(PRIMARY_QUEUE_NOT_AVAILABLE) {
   static bool firstGuard = false;
   if (firstGuard) {
-    ClientProxyMembershipID::increaseSynchCounter();
+    ClientProxyMembershipID::increaseSyncCounter();
   }
   firstGuard = true;
 
   auto cacheImpl = m_connManager.getCacheImpl();
   auto& distributedSystem = cacheImpl->getDistributedSystem();
 
-  auto& sysProp = distributedSystem.getSystemProperties();
+  auto& props = distributedSystem.getSystemProperties();
   // to set security flag at pool level
   m_isSecurityOn = cacheImpl->getAuthInitialize() != nullptr;
 
-  const auto& durableId = sysProp.durableClientId();
+  const auto& durableId = props.durableClientId();
 
   std::string clientDurableId = durableId;
   if (!m_poolName.empty()) {
     clientDurableId += "_gem_" + m_poolName;
   }
 
-  const auto durableTimeOut = sysProp.durableTimeout();
+  const auto durableTimeOut = props.durableTimeout();
   m_memId = cacheImpl->getClientProxyMembershipIDFactory().create(
       clientDurableId.c_str(), durableTimeOut);
 
@@ -194,10 +196,10 @@
       cacheImpl->getStatisticsManager().getStatisticsFactory(), m_poolName);
   cacheImpl->getStatisticsManager().forceSample();
 
-  if (!sysProp.isEndpointShufflingDisabled()) {
+  if (!props.isEndpointShufflingDisabled()) {
     if (!m_attrs->m_initServList.empty()) {
       RandGen randgen;
-      m_server = randgen(static_cast<uint32_t>(m_attrs->m_initServList.size()));
+      m_server = randgen(m_attrs->m_initServList.size());
     }
   }
   if (m_attrs->getPRSingleHopEnabled()) {
@@ -205,6 +207,8 @@
         std::unique_ptr<ClientMetadataService>(new ClientMetadataService(this));
   }
   m_manager = new ThinClientStickyManager(this);
+
+  clear_pdx_registry_ = props.onClientDisconnectClearPdxTypeIds();
 }
 
 void ThinClientPoolDM::init() {
@@ -229,6 +233,8 @@
 }
 
 ThinClientPoolDM::~ThinClientPoolDM() {
+  // TODO suspect
+  // NOLINTNEXTLINE(clang-analyzer-optin.cplusplus.VirtualCall)
   destroy();
   _GEODE_SAFE_DELETE(m_locHelper);
   _GEODE_SAFE_DELETE(m_stats);
@@ -256,43 +262,35 @@
 }
 
 void ThinClientPoolDM::startBackgroundThreads() {
+  auto& props = m_connManager.getCacheImpl()
+                    ->getDistributedSystem()
+                    .getSystemProperties();
+
   LOGDEBUG("ThinClientPoolDM::startBackgroundThreads: Starting ping thread");
   m_pingTask =
       std::unique_ptr<Task<ThinClientPoolDM>>(new Task<ThinClientPoolDM>(
           this, &ThinClientPoolDM::pingServer, NC_Ping_Thread));
   m_pingTask->start();
 
-  auto& props = m_connManager.getCacheImpl()
-                    ->getDistributedSystem()
-                    .getSystemProperties();
-
-  if (props.onClientDisconnectClearPdxTypeIds()) {
-    m_cliCallbackTask =
-        std::unique_ptr<Task<ThinClientPoolDM>>(new Task<ThinClientPoolDM>(
-            this, &ThinClientPoolDM::cliCallback, "NC_cliCallback"));
-    m_cliCallbackTask->start();
-  }
-
-  const auto& pingInterval = getPingInterval() / 2;
-  if (pingInterval > std::chrono::seconds::zero()) {
+  auto interval = getPingInterval();
+  if (interval > std::chrono::seconds::zero()) {
     LOGDEBUG(
-        "ThinClientPoolDM::startBackgroundThreads: Scheduling ping task at %ld",
-        pingInterval.count());
-    auto pingHandler =
-        new ExpiryHandler_T<ThinClientPoolDM>(this, &ThinClientPoolDM::doPing);
-    m_pingTaskId =
-        m_connManager.getCacheImpl()->getExpiryTaskManager().scheduleExpiryTask(
-            pingHandler, std::chrono::seconds(1), pingInterval, false);
+        "ThinClientPoolDM::startBackgroundThreads: Scheduling ping task at %zu",
+        interval.count());
+    auto& manager = m_connManager.getCacheImpl()->getExpiryTaskManager();
+    auto task = std::make_shared<FunctionExpiryTask>(
+        manager, [this] { ping_semaphore_.release(); });
+    ping_task_id_ =
+        manager.schedule(std::move(task), std::chrono::seconds(1), interval);
   } else {
     LOGDEBUG(
         "ThinClientPoolDM::startBackgroundThreads: Not Scheduling ping task as "
         "ping interval %ld",
-        getPingInterval().count());
+        interval.count());
   }
 
-  auto updateLocatorListInterval = getUpdateLocatorListInterval();
-
-  if (updateLocatorListInterval > std::chrono::seconds::zero()) {
+  interval = getUpdateLocatorListInterval();
+  if (interval > std::chrono::seconds::zero()) {
     m_updateLocatorListTask =
         std::unique_ptr<Task<ThinClientPoolDM>>(new Task<ThinClientPoolDM>(
             this, &ThinClientPoolDM::updateLocatorList, "NC_LocatorList"));
@@ -301,17 +299,16 @@
     LOGDEBUG(
         "ThinClientPoolDM::startBackgroundThreads: Creating updateLocatorList "
         "task");
-    auto updateLocatorListHandler = new ExpiryHandler_T<ThinClientPoolDM>(
-        this, &ThinClientPoolDM::doUpdateLocatorList);
+    auto& manager = m_connManager.getCacheImpl()->getExpiryTaskManager();
+    auto task = std::make_shared<FunctionExpiryTask>(
+        manager, [this] { update_locators_semaphore_.release(); });
 
     LOGDEBUG(
         "ThinClientPoolDM::startBackgroundThreads: Scheduling updater Locator "
         "task at %ld",
-        updateLocatorListInterval.count());
-    m_updateLocatorListTaskId =
-        m_connManager.getCacheImpl()->getExpiryTaskManager().scheduleExpiryTask(
-            updateLocatorListHandler, std::chrono::seconds(1),
-            updateLocatorListInterval, false);
+        interval.count());
+    update_locators_task_id_ =
+        manager.schedule(std::move(task), std::chrono::seconds(1), interval);
   }
 
   LOGDEBUG(
@@ -326,25 +323,24 @@
   auto idle = getIdleTimeout();
   auto load = getLoadConditioningInterval();
 
-  if (load > std::chrono::milliseconds::zero()) {
-    if (load < idle || idle <= std::chrono::milliseconds::zero()) {
-      idle = load;
-    }
+  if (load > std::chrono::milliseconds::zero() &&
+      (load < idle || idle <= std::chrono::milliseconds::zero())) {
+    idle = load;
   }
 
   if (idle > std::chrono::milliseconds::zero()) {
     LOGDEBUG(
         "ThinClientPoolDM::startBackgroundThreads: Starting manageConnections "
         "task");
-    ACE_Event_Handler* connHandler = new ExpiryHandler_T<ThinClientPoolDM>(
-        this, &ThinClientPoolDM::doManageConnections);
+    auto& manager = m_connManager.getCacheImpl()->getExpiryTaskManager();
+    auto task = std::make_shared<FunctionExpiryTask>(
+        manager, [this] { conn_semaphore_.release(); });
 
     LOGDEBUG(
         "ThinClientPoolDM::startBackgroundThreads: Scheduling "
         "manageConnections task");
-    m_connManageTaskId =
-        m_connManager.getCacheImpl()->getExpiryTaskManager().scheduleExpiryTask(
-            connHandler, std::chrono::seconds(1), idle, false);
+    conns_mgmt_task_id_ =
+        manager.schedule(std::move(task), std::chrono::seconds(1), idle);
   }
 
   LOGDEBUG(
@@ -376,13 +372,30 @@
 void ThinClientPoolDM::manageConnections(std::atomic<bool>& isRunning) {
   LOGFINE("ThinClientPoolDM: starting manageConnections thread");
 
+  conn_semaphore_.acquire();
+
   while (isRunning) {
-    m_connSema.acquire();
-    if (isRunning) {
+    try {
+      LOGFINE(
+          "ThinClientPoolDM::manageConnections: checking connections in "
+          "pool");
+
       manageConnectionsInternal(isRunning);
-      m_connSema.acquire();
+    } catch (const Exception& e) {
+      LOGERROR("ThinClientPoolDM::manageConnections: Geode Exception: \"%s\"",
+               e.what());
+      LOGERROR(e.getStackTrace());
+    } catch (const std::exception& e) {
+      LOGERROR(
+          "ThinClientPoolDM::manageConnections: Standard exception: \"%s\"",
+          e.what());
+    } catch (...) {
+      LOGERROR("ThinClientPoolDM::manageConnections: Unexpected exception");
     }
+
+    conn_semaphore_.acquire();
   }
+
   LOGFINE("ThinClientPoolDM: ending manageConnections thread");
 }
 
@@ -411,8 +424,9 @@
       removelist.push_back(conn);
     } else if (conn) {
       auto nextIdle =
-          _idle - std::chrono::duration_cast<std::chrono::milliseconds>(
-                      TcrConnection::clock::now() - conn->getLastAccessed());
+          _idle -
+          std::chrono::duration_cast<std::chrono::milliseconds>(
+              std::chrono::steady_clock::now() - conn->getLastAccessed());
       if (nextIdle > std::chrono::seconds::zero() && nextIdle < _nextIdle) {
         _nextIdle = nextIdle;
       }
@@ -431,7 +445,10 @@
        iter != removelist.end(); ++iter) {
     TcrConnection* conn = *iter;
     if (replaceCount <= 0) {
-      GF_SAFE_DELETE_CON(conn);
+      try {
+        GF_SAFE_DELETE_CON(conn);
+      } catch (...) {
+      }
       removeEPConnections(1, false);
       getStats().incLoadCondDisconnects();
       LOGDEBUG("Removed a connection");
@@ -442,21 +459,28 @@
                            /*hasExpired(conn) ? nullptr :*/ conn);
       if (newConn) {
         auto nextIdle =
-            _idle - std::chrono::duration_cast<std::chrono::milliseconds>(
-                        TcrConnection::clock::now() - conn->getLastAccessed());
+            _idle -
+            std::chrono::duration_cast<std::chrono::milliseconds>(
+                std::chrono::steady_clock::now() - conn->getLastAccessed());
         if (nextIdle > std::chrono::seconds::zero() && nextIdle < _nextIdle) {
           _nextIdle = nextIdle;
         }
         put(newConn, false);
         if (newConn != conn) {
-          GF_SAFE_DELETE_CON(conn);
+          try {
+            GF_SAFE_DELETE_CON(conn);
+          } catch (...) {
+          }
           removeEPConnections(1, false);
           getStats().incLoadCondDisconnects();
           LOGDEBUG("Removed a connection");
         }
       } else {
         if (hasExpired(conn)) {
-          GF_SAFE_DELETE_CON(conn);
+          try {
+            GF_SAFE_DELETE_CON(conn);
+          } catch (...) {
+          }
           removeEPConnections(1, false);
           getStats().incLoadCondDisconnects();
           LOGDEBUG("Removed a connection");
@@ -465,7 +489,7 @@
           auto nextIdle =
               _idle -
               std::chrono::duration_cast<std::chrono::milliseconds>(
-                  TcrConnection::clock::now() - conn->getLastAccessed());
+                  std::chrono::steady_clock::now() - conn->getLastAccessed());
           if (nextIdle > std::chrono::seconds::zero() && nextIdle < _nextIdle) {
             _nextIdle = nextIdle;
           }
@@ -477,17 +501,18 @@
     count++;
 
     if (count % 10 == 0) {
-      std::this_thread::sleep_for(std::chrono::milliseconds(1));
+      std::this_thread::yield();
     }
   }
 
-  if (m_connManageTaskId >= 0 && isRunning &&
-      m_connManager.getCacheImpl()->getExpiryTaskManager().resetTask(
-          m_connManageTaskId, _nextIdle)) {
-    LOGERROR("Failed to reschedule connection manager");
-  } else {
-    LOGFINEST("Rescheduled next connection manager run after %s",
-              to_string(_nextIdle).c_str());
+  if (isRunning) {
+    auto& manager = m_connManager.getCacheImpl()->getExpiryTaskManager();
+    if (manager.reset(conns_mgmt_task_id_, _nextIdle) < 0) {
+      LOGERROR("Failed to reschedule connection manager");
+    } else {
+      LOGFINEST("Rescheduled next connection manager run after %s",
+                to_string(_nextIdle).c_str());
+    }
   }
 
   LOGDEBUG("Pool size is %zu, pool counter is %d", size(), m_poolSize.load());
@@ -565,7 +590,7 @@
                         ->getEndpointForNewFwdConn(
                             outEndpoint, additionalLoc, excludeServers,
                             m_attrs->m_serverGrp, currentServer)) {
-      throw IllegalStateException("Locator query failed");
+      throw IllegalStateException("Locator query failed selecting an endpoint");
     }
     // Update Locator stats
     getStats().setLocators(
@@ -639,11 +664,12 @@
       ep = addEP(cs->value());
     } else if (!ep->connected()) {
       LOGFINE(
-          "ThinClientPoolDM::sendRequestToAllServers server not connected %s ",
+          "ThinClientPoolDM::sendRequestToAllServers server not connected "
+          "%s ",
           cs->value().c_str());
     }
     auto funcExe = std::make_shared<FunctionExecution>();
-    funcExe->setParameters(func, getResult, timeout, args, ep, this,
+    funcExe->setParameters(func, getResult, timeout, args, ep.get(), this,
                            resultCollectorLock, &rs, userAttr);
     fePtrList.push_back(funcExe);
     threadPool.perform(funcExe);
@@ -731,12 +757,12 @@
   if (m_pingTask) {
     LOGFINE("ThinClientPoolDM::destroy(): Closing ping thread.");
     m_pingTask->stopNoblock();
-    m_pingSema.release();
+    ping_semaphore_.release();
     m_pingTask->wait();
     m_pingTask = nullptr;
-    if (m_pingTaskId >= 0) {
-      m_connManager.getCacheImpl()->getExpiryTaskManager().cancelTask(
-          m_pingTaskId);
+    if (ping_task_id_ != ExpiryTask::invalid()) {
+      auto& manager = m_connManager.getCacheImpl()->getExpiryTaskManager();
+      manager.cancel(ping_task_id_);
     }
   }
 }
@@ -745,31 +771,23 @@
   if (m_updateLocatorListTask) {
     LOGFINE("ThinClientPoolDM::destroy(): Closing updateLocatorList thread.");
     m_updateLocatorListTask->stopNoblock();
-    m_updateLocatorListSema.release();
+    update_locators_semaphore_.release();
     m_updateLocatorListTask->wait();
     m_updateLocatorListTask = nullptr;
-    if (m_updateLocatorListTaskId >= 0) {
-      m_connManager.getCacheImpl()->getExpiryTaskManager().cancelTask(
-          m_updateLocatorListTaskId);
+    if (update_locators_task_id_ != ExpiryTask::invalid()) {
+      auto& manager = m_connManager.getCacheImpl()->getExpiryTaskManager();
+      manager.cancel(update_locators_task_id_);
     }
   }
 }
 
-void ThinClientPoolDM::stopCliCallbackThread() {
-  if (m_cliCallbackTask) {
-    LOGFINE("ThinClientPoolDM::destroy(): Closing cliCallback thread.");
-    m_cliCallbackTask->stopNoblock();
-    m_cliCallbackSema.release();
-    m_cliCallbackTask->wait();
-    m_cliCallbackTask = nullptr;
-  }
-}
-
 void ThinClientPoolDM::destroy(bool keepAlive) {
   LOGDEBUG("ThinClientPoolDM::destroy...");
   if (!m_isDestroyed && (!m_destroyPending || m_destroyPendingHADM)) {
     checkRegions();
-    TcrMessage::setKeepAlive(keepAlive);
+
+    m_keepAlive = keepAlive;
+
     if (m_remoteQueryServicePtr != nullptr) {
       m_remoteQueryServicePtr->close();
       m_remoteQueryServicePtr = nullptr;
@@ -781,21 +799,22 @@
       m_PoolStatsSampler = nullptr;
     }
     LOGDEBUG("PoolStatsSampler thread closed .");
-    stopCliCallbackThread();
     LOGDEBUG("ThinClientPoolDM::destroy( ): Closing connection manager.");
     auto cacheImpl = m_connManager.getCacheImpl();
     if (m_connManageTask) {
       m_connManageTask->stopNoblock();
-      m_connSema.release();
+      conn_semaphore_.release();
       m_connManageTask->wait();
       m_connManageTask = nullptr;
-      if (m_connManageTaskId >= 0) {
-        cacheImpl->getExpiryTaskManager().cancelTask(m_connManageTaskId);
-      }
+      cacheImpl->getExpiryTaskManager().cancel(conns_mgmt_task_id_);
     }
 
     LOGDEBUG("Closing PoolStatsSampler thread.");
+    // TODO suspect
+    // NOLINTNEXTLINE(clang-analyzer-optin.cplusplus.VirtualCall)
     stopPingThread();
+    // TODO suspect
+    // NOLINTNEXTLINE(clang-analyzer-optin.cplusplus.VirtualCall)
     stopUpdateLocatorListThread();
 
     if (m_clientMetadataService) {
@@ -811,6 +830,8 @@
     LOGDEBUG("ThinClientPoolDM::destroy( ): after close ");
 
     // Close Stats
+    // TODO suspect
+    // NOLINTNEXTLINE(clang-analyzer-optin.cplusplus.VirtualCall)
     getStats().close();
     cacheImpl->getStatisticsManager().forceSample();
 
@@ -821,13 +842,6 @@
     m_isDestroyed = true;
     LOGDEBUG("ThinClientPoolDM::destroy( ): after close m_isDestroyed = %d ",
              m_isDestroyed);
-
-    for (const auto& iter : m_endpoints) {
-      auto ep = iter.second;
-      LOGFINE("ThinClientPoolDM: forcing endpoint delete for %s in destructor",
-              ep->name().c_str());
-      _GEODE_SAFE_DELETE(ep);
-    }
   }
   if (m_poolSize != 0) {
     LOGFINE("Pool connection size is not zero %d", m_poolSize.load());
@@ -893,7 +907,8 @@
 
   TcrMessageReply reply(true, this);
 
-  throwExceptionIfError("Operation Failed", sendSyncRequest(request, reply));
+  auto err = sendSyncRequest(request, reply);
+  throwExceptionIfError("Operation Failed", err);
 
   if (reply.getMessageType() == TcrMessage::EXCEPTION) {
     LOGDEBUG("ThinClientPoolDM::GetPDXTypeById: Exception = " +
@@ -1048,7 +1063,8 @@
   }
 
   LOGDEBUG(
-      "ThinClientPoolDM::sendUserCredentials: Error after sending cred request "
+      "ThinClientPoolDM::sendUserCredentials: Error after sending cred "
+      "request "
       "= %d ",
       err);
 
@@ -1061,7 +1077,8 @@
       case TcrMessage::EXCEPTION: {
         if (err == GF_NOERR && conn) {
           putInQueue(
-              conn, isBGThread);  // connFound is only relevant for Sticky conn.
+              conn,
+              isBGThread);  // connFound is only relevant for Sticky conn.
         }
         // this will set error type if there is some server exception
         err = ThinClientRegion::handleServerException(
@@ -1073,7 +1090,8 @@
       default: {
         if (err == GF_NOERR && conn) {
           putInQueue(
-              conn, isBGThread);  // connFound is only relevant for Sticky conn.
+              conn,
+              isBGThread);  // connFound is only relevant for Sticky conn.
         }
         LOGERROR(
             "Unknown message type %d during secure response, possible "
@@ -1118,18 +1136,17 @@
 TcrEndpoint* ThinClientPoolDM::getEndPoint(
     const std::shared_ptr<BucketServerLocation>& serverLocation, int8_t&,
     std::set<ServerLocation>& excludeServers) {
-  TcrEndpoint* ep = nullptr;
+  std::shared_ptr<TcrEndpoint> ep = nullptr;
   if (serverLocation->isValid()) {
     if (excludeServer(serverLocation->getEpString(), excludeServers)) {
       LOGFINE("ThinClientPoolDM::getEndPoint Exclude Server true for %s ",
               serverLocation->getEpString().c_str());
-      return ep;
+      return ep.get();
     }
 
     ep = getEndpoint(serverLocation->getEpString());
     if (ep) {
-      LOGDEBUG("Endpoint for single hop is %s", ep->name().c_str());
-      return ep;
+      return ep.get();
     }
 
     // do for pool with endpoints. Add endpoint into m_endpoints only when we
@@ -1168,14 +1185,15 @@
     }
   }
 
-  return ep;
+  return ep.get();
 }
 
-TcrEndpoint* ThinClientPoolDM::getEndpoint(const std::string& endpointName) {
-  m_endpoints.make_lock();
+std::shared_ptr<TcrEndpoint> ThinClientPoolDM::getEndpoint(
+    const std::string& endpointName) {
+  const auto& ignored = m_endpoints.make_lock();
   const auto& find = m_endpoints.find(endpointName);
   if (find == m_endpoints.end()) {
-    return nullptr;
+    return {};
   }
   return find->second;
 }
@@ -1343,7 +1361,8 @@
 
       if (region != nullptr) {
         LOGFINE(
-            "Need to refresh pr-meta-data timeout in client only  with refresh "
+            "Need to refresh pr-meta-data timeout in client only  with "
+            "refresh "
             "metadata");
         auto* tcrRegion = dynamic_cast<ThinClientRegion*>(region.get());
         tcrRegion->setMetaDataRefreshed(false);
@@ -1357,7 +1376,8 @@
         "ThinClientPoolDM::sendSyncRequest: isUserNeedToReAuthenticate = %d ",
         isUserNeedToReAuthenticate);
     LOGDEBUG(
-        "ThinClientPoolDM::sendSyncRequest: m_isMultiUserMode = %d  conn = %p  "
+        "ThinClientPoolDM::sendSyncRequest: m_isMultiUserMode = %d  conn = "
+        "%p  "
         "type = %d",
         m_isMultiUserMode, conn, type);
 
@@ -1425,7 +1445,10 @@
                         request.getMessageType() ==
                             TcrMessage::EXECUTE_REGION_FUNCTION_SINGLE_HOP);
           if (conn) {
-            GF_SAFE_DELETE_CON(conn);
+            try {
+              GF_SAFE_DELETE_CON(conn);
+            } catch (...) {
+            }
           }
           excludeServers.insert(ServerLocation(ep->name()));
           removeEPFromMetadataIfError(error, ep);
@@ -1447,7 +1470,8 @@
               userAttr->unAuthenticateEP(ep);
             }
             LOGFINEST(
-                "After getting AuthenticationRequiredException trying again.");
+                "After getting AuthenticationRequiredException trying "
+                "again.");
             isAuthRequireExcepMaxTry--;
             isAuthRequireExcep = true;
             continue;
@@ -1471,8 +1495,8 @@
             m_connManager.getCacheImpl()->getRegion(request.getRegionName());
 
         if (region != nullptr) {
-          if (!connFound)  // max limit case then don't refresh otherwise always
-                           // refresh
+          if (!connFound)  // max limit case then don't refresh otherwise
+                           // always refresh
           {
             LOGFINE("Need to refresh pr-meta-data");
             auto* tcrRegion = dynamic_cast<ThinClientRegion*>(region.get());
@@ -1547,7 +1571,7 @@
 
   // Raise Semaphore for manage thread
   if (triggerManageConn) {
-    m_connSema.release();
+    conn_semaphore_.release();
   }
 }
 
@@ -1566,7 +1590,8 @@
   auto theEP = getEndpoint(epNameStr);
 
   LOGFINE(
-      "ThinClientPoolDM::getConnectionToAnEndPoint( ): Getting endpoint object "
+      "ThinClientPoolDM::getConnectionToAnEndPoint( ): Getting endpoint "
+      "object "
       "for %s",
       epNameStr.c_str());
   if (theEP && theEP->connected()) {
@@ -1574,7 +1599,7 @@
         "ThinClientPoolDM::getConnectionToAnEndPoint( ): Getting connection "
         "for endpoint %s",
         epNameStr.c_str());
-    conn = getFromEP(theEP);
+    conn = getFromEP(theEP.get());
     // if connection is null, possibly because there are no idle connections
     // to this endpoint, create a new pool connection to this endpoint.
     bool maxConnLimit = false;
@@ -1583,13 +1608,13 @@
           "ThinClientPoolDM::getConnectionToAnEndPoint( ): Create connection "
           "for endpoint %s",
           epNameStr.c_str());
-      error = createPoolConnectionToAEndPoint(conn, theEP, maxConnLimit);
+      error = createPoolConnectionToAEndPoint(conn, theEP.get(), maxConnLimit);
     }
   }
 
   // if connection is null, it has failed to get a connection to the specified
-  // endpoint. Get a connection to any other server and failover the transaction
-  // to that server.
+  // endpoint. Get a connection to any other server and failover the
+  // transaction to that server.
   if (!conn) {
     std::set<ServerLocation> excludeServers;
     bool maxConnLimit = false;
@@ -1609,7 +1634,8 @@
         if (failoverErr != GF_NOERR) {
           LOGFINE(
               "ThinClientPoolDM::getConnectionToAnEndPoint( ):Failed to "
-              "failover transaction to another server. From endpoint %s to %s",
+              "failover transaction to another server. From endpoint %s to "
+              "%s",
               epNameStr.c_str(), conn->getEndpointObject()->name().c_str());
           putInQueue(conn, false);
           conn = nullptr;
@@ -1620,7 +1646,8 @@
 
   if (!(conn && error == GF_NOERR)) {
     LOGFINE(
-        "ThinClientPoolDM::getConnectionToAEndPoint( ):Failed to connect to %s",
+        "ThinClientPoolDM::getConnectionToAEndPoint( ):Failed to connect to "
+        "%s",
         epNameStr.c_str());
     if (conn) {
       _GEODE_SAFE_DELETE(conn);
@@ -1630,9 +1657,9 @@
   return error;
 }
 
-// Create a pool connection to specified endpoint. First checks if the number of
-// connections has exceeded the maximum allowed. If not, create a connection to
-// the specified endpoint. Else, throws an error.
+// Create a pool connection to specified endpoint. First checks if the number
+// of connections has exceeded the maximum allowed. If not, create a
+// connection to the specified endpoint. Else, throws an error.
 GfErrType ThinClientPoolDM::createPoolConnectionToAEndPoint(
     TcrConnection*& conn, TcrEndpoint* theEP, bool& maxConnLimit,
     bool appThreadrequest) {
@@ -1652,7 +1679,8 @@
     if (m_poolSize >= max) {
       maxConnLimit = true;
       LOGFINER(
-          "ThinClientPoolDM::createPoolConnectionToAEndPoint( ): current pool "
+          "ThinClientPoolDM::createPoolConnectionToAEndPoint( ): current "
+          "pool "
           "size has reached limit %d, %d",
           m_poolSize.load(), max);
       return error;
@@ -1683,18 +1711,17 @@
     getStats().incPoolConnects();
     getStats().setCurPoolConnections(m_poolSize);
   }
-  m_connSema.release();
+
+  conn_semaphore_.release();
 
   return error;
 }
 
 void ThinClientPoolDM::reducePoolSize(int num) {
-  LOGFINE("removing connection %d ,  pool-size =%d", num, m_poolSize.load());
+  LOGFINE("Removing %d connections, pool-size=%d", num, m_poolSize.load());
   m_poolSize -= num;
-  if (m_poolSize <= 0) {
-    if (m_cliCallbackTask != nullptr) m_cliCallbackSema.release();
-  }
 }
+
 GfErrType ThinClientPoolDM::createPoolConnection(
     TcrConnection*& conn, std::set<ServerLocation>& excludeServers,
     bool& maxConnLimit, const TcrConnection* currentserver) {
@@ -1705,21 +1732,11 @@
   }
   int min = m_attrs->getMinConnections();
   max = max > min ? max : min;
-  LOGDEBUG(
-      "ThinClientPoolDM::createPoolConnection( ): current pool size has "
-      "reached limit %d, %d, %d",
-      m_poolSize.load(), max, min);
 
   conn = nullptr;
-  {
-    if (m_poolSize >= max) {
-      LOGDEBUG(
-          "ThinClientPoolDM::createPoolConnection( ): current pool size has "
-          "reached limit %d, %d",
-          m_poolSize.load(), max);
-      maxConnLimit = true;
-      return error;
-    }
+  if (m_poolSize >= max) {
+    maxConnLimit = true;
+    return error;
   }
 
   bool fatal = false;
@@ -1730,7 +1747,7 @@
     try {
       epNameStr = selectEndpoint(excludeServers, currentserver);
     } catch (const NoAvailableLocatorsException&) {
-      LOGFINE("Locator query failed");
+      LOGFINE("Locator query failed while creating pool connection");
       return GF_CACHE_LOCATOR_EXCEPTION;
     } catch (const Exception&) {
       LOGFINE("Endpoint selection failed");
@@ -1783,7 +1800,8 @@
       break;
     }
   }
-  m_connSema.release();
+
+  conn_semaphore_.release();
   // if a fatal error occurred earlier and we don't have
   // a connection then return this saved error
   if (fatal && !conn && error != GF_NOERR) {
@@ -1961,7 +1979,8 @@
               ua->unAuthenticateEP(currentEndpoint);
             }
             LOGFINEST(
-                "After getting AuthenticationRequiredException trying again.");
+                "After getting AuthenticationRequiredException trying "
+                "again.");
             isAuthRequireExcepMaxTry--;
             isAuthRequireExcep = true;
             if (isAuthRequireExcepMaxTry >= 0) error = GF_NOERR;
@@ -1975,25 +1994,27 @@
   return error;
 }
 
-TcrEndpoint* ThinClientPoolDM::addEP(ServerLocation& serverLoc) {
-  const auto endpointName =
-      serverLoc.getServerName() + ":" + std::to_string(serverLoc.getPort());
-  return addEP(endpointName);
+std::shared_ptr<TcrEndpoint> ThinClientPoolDM::addEP(
+    ServerLocation& serverLoc) {
+  return addEP(serverLoc.getServerName() + ":" +
+               std::to_string(serverLoc.getPort()));
 }
 
-TcrEndpoint* ThinClientPoolDM::addEP(const std::string& endpointName) {
+std::shared_ptr<TcrEndpoint> ThinClientPoolDM::addEP(
+    const std::string& endpointName) {
   std::lock_guard<decltype(m_endpointsLock)> guard(m_endpointsLock);
 
   auto ep = getEndpoint(endpointName);
   if (!ep) {
+    ep = createEP(endpointName.c_str());
     LOGFINE("Created new endpoint %s for pool %s", endpointName.c_str(),
             m_poolName.c_str());
-    ep = createEP(endpointName.c_str());
     if (!m_endpoints.emplace(endpointName, ep).second) {
       LOGERROR("Failed to add endpoint %s to pool %s", endpointName.c_str(),
                m_poolName.c_str());
     }
   }
+
   // Update Server Stats
   getStats().setServers(static_cast<int32_t>(m_endpoints.size()));
   return ep;
@@ -2011,8 +2032,8 @@
     if (endpoint->connected()) {
       endpoint->pingServer(this);
       if (!endpoint->connected()) {
-        removeEPConnections(endpoint);
-        removeCallbackConnection(endpoint);
+        removeEPConnections(endpoint.get());
+        removeCallbackConnection(endpoint.get());
       }
     }
   }
@@ -2020,57 +2041,56 @@
 
 void ThinClientPoolDM::updateLocatorList(std::atomic<bool>& isRunning) {
   LOGFINE("Starting updateLocatorList thread for pool %s", m_poolName.c_str());
+
   while (isRunning) {
-    m_updateLocatorListSema.acquire();
+    update_locators_semaphore_.acquire();
     if (isRunning && !m_connManager.isNetDown()) {
       (m_locHelper)->updateLocators(getServerGroup());
     }
   }
+
   LOGFINE("Ending updateLocatorList thread for pool %s", m_poolName.c_str());
 }
 
+void ThinClientPoolDM::incConnectedEndpoints() {
+  auto val = ++connected_endpoints_;
+  LOGDEBUG("Pool %s has incremented to %d the number of connected endpoints",
+           m_poolName.c_str(), val);
+}
+
+void ThinClientPoolDM::decConnectedEndpoints() {
+  auto val = --connected_endpoints_;
+  LOGDEBUG("Pool %s has decremented to %d the number of connected endpoints",
+           m_poolName.c_str(), val);
+  if (val <= 0 && clear_pdx_registry_) {
+    clearPdxTypeRegistry();
+  }
+}
+
 void ThinClientPoolDM::pingServer(std::atomic<bool>& isRunning) {
   LOGFINE("Starting ping thread for pool %s", m_poolName.c_str());
+
+  ping_semaphore_.acquire();
   while (isRunning) {
-    m_pingSema.acquire();
-    if (isRunning && !m_connManager.isNetDown()) {
+    if (!m_connManager.isNetDown()) {
       pingServerLocal();
-      m_pingSema.acquire();
     }
+
+    ping_semaphore_.acquire();
   }
+
   LOGFINE("Ending ping thread for pool %s", m_poolName.c_str());
 }
 
-void ThinClientPoolDM::cliCallback(std::atomic<bool>& isRunning) {
-  LOGFINE("Starting cliCallback thread for pool %s", m_poolName.c_str());
-  while (isRunning) {
-    m_cliCallbackSema.acquire();
-    if (isRunning) {
-      LOGFINE("Clearing Pdx Type Registry");
-      // this call for csharp client
-      DistributedSystemImpl::CallCliCallBack(
-          *(m_connManager.getCacheImpl()->getCache()));
-      // this call for cpp client
-      m_connManager.getCacheImpl()->getPdxTypeRegistry()->clear();
-      m_cliCallbackSema.acquire();
-    }
-  }
-  LOGFINE("Ending cliCallback thread for pool %s", m_poolName.c_str());
-}
+void ThinClientPoolDM::clearPdxTypeRegistry() {
+  LOGFINE("Clearing PdxTypeRegistry of pool %s", m_poolName.c_str());
+  auto cache_impl = m_connManager.getCacheImpl();
 
-int ThinClientPoolDM::doPing(const ACE_Time_Value&, const void*) {
-  m_pingSema.release();
-  return 0;
-}
+  // C# call
+  DistributedSystemImpl::CallCliCallBack(*(cache_impl->getCache()));
 
-int ThinClientPoolDM::doUpdateLocatorList(const ACE_Time_Value&, const void*) {
-  m_updateLocatorListSema.release();
-  return 0;
-}
-
-int ThinClientPoolDM::doManageConnections(const ACE_Time_Value&, const void*) {
-  m_connSema.release();
-  return 0;
+  // C++ call
+  cache_impl->getPdxTypeRegistry()->clear();
 }
 
 void ThinClientPoolDM::releaseThreadLocalConnection() {
@@ -2383,10 +2403,12 @@
   return m_connManager.checkDupAndAdd(eventid);
 }
 
-TcrEndpoint* ThinClientPoolDM::createEP(const char* endpointName) {
-  return new TcrPoolEndPoint(
-      endpointName, m_connManager.getCacheImpl(), m_connManager.m_failoverSema,
-      m_connManager.m_cleanupSema, m_connManager.m_redundancySema, this);
+std::shared_ptr<TcrEndpoint> ThinClientPoolDM::createEP(
+    const char* endpointName) {
+  return std::make_shared<TcrPoolEndPoint>(
+      endpointName, m_connManager.getCacheImpl(),
+      m_connManager.failover_semaphore_, m_connManager.cleanup_semaphore_,
+      m_connManager.redundancy_semaphore_, this);
 }
 
 GfErrType FunctionExecution::execute() {
diff --git a/cppcache/src/ThinClientPoolDM.hpp b/cppcache/src/ThinClientPoolDM.hpp
index 4021d10..b6bde20 100644
--- a/cppcache/src/ThinClientPoolDM.hpp
+++ b/cppcache/src/ThinClientPoolDM.hpp
@@ -27,9 +27,6 @@
 #include <string>
 #include <vector>
 
-#include <ace/Semaphore.h>
-#include <ace/Time_Value.h>
-
 #include <geode/Pool.hpp>
 #include <geode/ResultCollector.hpp>
 
@@ -47,6 +44,7 @@
 #include "ThinClientStickyManager.hpp"
 #include "ThreadPool.hpp"
 #include "UserAttributes.hpp"
+#include "util/concurrent/binary_semaphore.hpp"
 
 namespace apache {
 namespace geode {
@@ -102,12 +100,13 @@
                             TcrEndpoint* currentEndpoint) override;
   void addConnection(TcrConnection* conn);
 
-  TcrEndpoint* addEP(ServerLocation& serverLoc);
+  std::shared_ptr<TcrEndpoint> addEP(ServerLocation& serverLoc);
+  std::shared_ptr<TcrEndpoint> addEP(const std::string& endpointName);
 
-  TcrEndpoint* addEP(const std::string& endpointName);
+  virtual void clearPdxTypeRegistry();
+
   virtual void pingServer(std::atomic<bool>& isRunning);
   virtual void updateLocatorList(std::atomic<bool>& isRunning);
-  virtual void cliCallback(std::atomic<bool>& isRunning);
   virtual void pingServerLocal();
 
   ~ThinClientPoolDM() override;
@@ -131,6 +130,9 @@
   void incRegionCount();
   void decRegionCount();
 
+  void incConnectedEndpoints() override;
+  void decConnectedEndpoints() override;
+
   virtual void setStickyNull(bool isBGThread) {
     if (!isBGThread) m_manager->setStickyConnection(nullptr, false);
   }
@@ -180,12 +182,14 @@
     m_primaryServerQueueSize = queueSize;
   }
   int getPrimaryServerQueueSize() const { return m_primaryServerQueueSize; }
+  bool isKeepAlive() const { return m_keepAlive; }
 
  protected:
   ThinClientStickyManager* m_manager;
   std::vector<std::string> m_canonicalHosts;
-  synchronized_map<std::unordered_map<std::string, TcrEndpoint*>,
-                   std::recursive_mutex>
+  synchronized_map<
+      std::unordered_map<std::string, std::shared_ptr<TcrEndpoint>>,
+      std::recursive_mutex>
       m_endpoints;
   std::recursive_mutex m_endpointsLock;
   std::recursive_mutex m_endpointSelectionLock;
@@ -193,18 +197,18 @@
   PoolStats* m_stats;
   bool m_sticky;
   void netDown();
-  ACE_Semaphore m_updateLocatorListSema;
-  ACE_Semaphore m_pingSema;
-  ACE_Semaphore m_cliCallbackSema;
+
+  binary_semaphore update_locators_semaphore_;
+  binary_semaphore ping_semaphore_;
   volatile bool m_isDestroyed;
   volatile bool m_destroyPending;
   volatile bool m_destroyPendingHADM;
-  void checkRegions();
   std::shared_ptr<RemoteQueryService> m_remoteQueryServicePtr;
+
+  void checkRegions();
   virtual void startBackgroundThreads();
   virtual void stopPingThread();
   virtual void stopUpdateLocatorListThread();
-  virtual void stopCliCallbackThread();
   virtual void cleanStickyConnections(std::atomic<bool>& isRunning);
   virtual TcrConnection* getConnectionFromQueue(bool timeout, GfErrType* error,
                                                 std::set<ServerLocation>&,
@@ -243,8 +247,9 @@
                                 bool& isServerException);
 
   // get endpoint using the endpoint string
-  TcrEndpoint* getEndpoint(const std::string& epNameStr);
+  std::shared_ptr<TcrEndpoint> getEndpoint(const std::string& epNameStr);
 
+  bool clear_pdx_registry_{false};
   bool m_isSecurityOn;
   bool m_isMultiUserMode;
 
@@ -272,7 +277,7 @@
                              const TcrConnection* currentServer = nullptr);
   // TODO global - m_memId was volatile
   std::unique_ptr<ClientProxyMembershipID> m_memId;
-  virtual TcrEndpoint* createEP(const char* endpointName);
+  virtual std::shared_ptr<TcrEndpoint> createEP(const char* endpointName);
   virtual void removeCallbackConnection(TcrEndpoint*) {}
 
   bool excludeServer(std::string, std::set<ServerLocation>&);
@@ -283,27 +288,28 @@
   int m_numRegions;
 
   // for selectEndpoint
-  unsigned m_server;
+  std::size_t m_server;
 
   // Manage Connection thread
-  ACE_Semaphore m_connSema;
+
+  binary_semaphore conn_semaphore_;
   std::unique_ptr<Task<ThinClientPoolDM>> m_connManageTask;
   std::unique_ptr<Task<ThinClientPoolDM>> m_pingTask;
   std::unique_ptr<Task<ThinClientPoolDM>> m_updateLocatorListTask;
-  std::unique_ptr<Task<ThinClientPoolDM>> m_cliCallbackTask;
-  ExpiryTaskManager::id_type m_pingTaskId;
-  ExpiryTaskManager::id_type m_updateLocatorListTaskId;
-  ExpiryTaskManager::id_type m_connManageTaskId;
+  ExpiryTask::id_t ping_task_id_{ExpiryTask::invalid()};
+  ExpiryTask::id_t update_locators_task_id_{ExpiryTask::invalid()};
+  ExpiryTask::id_t conns_mgmt_task_id_{ExpiryTask::invalid()};
+
   void manageConnections(std::atomic<bool>& isRunning);
-  int doPing(const ACE_Time_Value&, const void*);
-  int doUpdateLocatorList(const ACE_Time_Value&, const void*);
-  int doManageConnections(const ACE_Time_Value&, const void*);
   void manageConnectionsInternal(std::atomic<bool>& isRunning);
   void cleanStaleConnections(std::atomic<bool>& isRunning);
   void restoreMinConnections(std::atomic<bool>& isRunning);
   std::atomic<int32_t> m_clientOps;  // Actual Size of Pool
+  std::atomic<int32_t> connected_endpoints_;
   std::unique_ptr<statistics::PoolStatsSampler> m_PoolStatsSampler;
   std::unique_ptr<ClientMetadataService> m_clientMetadataService;
+  bool m_keepAlive;
+
   friend class CacheImpl;
   friend class ThinClientStickyManager;
   friend class FunctionExecution;
@@ -339,7 +345,7 @@
     m_userAttr = nullptr;
   }
 
-  ~FunctionExecution() {}
+  ~FunctionExecution() noexcept override = default;
 
   std::shared_ptr<CacheableString> getException() { return exceptionPtr; }
 
@@ -363,7 +369,7 @@
     m_userAttr = userAttr;
   }
 
-  GfErrType execute(void);
+  GfErrType execute(void) override;
 };
 
 class OnRegionFunctionExecution : public PooledWork<GfErrType> {
@@ -395,7 +401,7 @@
       const std::shared_ptr<BucketServerLocation>& serverLocation,
       bool allBuckets);
 
-  ~OnRegionFunctionExecution() {
+  ~OnRegionFunctionExecution() noexcept override {
     delete m_request;
     delete m_reply;
     delete m_resultCollector;
@@ -411,7 +417,7 @@
     return static_cast<ChunkedFunctionExecutionResponse*>(m_resultCollector);
   }
 
-  GfErrType execute(void) {
+  GfErrType execute(void) override {
     GuardUserAttributes gua;
 
     if (m_userAttr) {
diff --git a/cppcache/src/ThinClientPoolHADM.cpp b/cppcache/src/ThinClientPoolHADM.cpp
index f487bb7..e3d4b6a 100644
--- a/cppcache/src/ThinClientPoolHADM.cpp
+++ b/cppcache/src/ThinClientPoolHADM.cpp
@@ -19,23 +19,25 @@
 
 #include <geode/SystemProperties.hpp>
 
-#include "ExpiryHandler_T.hpp"
+#include "CacheImpl.hpp"
+#include "FunctionExpiryTask.hpp"
 #include "TcrConnectionManager.hpp"
 #include "util/exception.hpp"
 
 namespace apache {
 namespace geode {
 namespace client {
+
 const char* ThinClientPoolHADM::NC_Redundancy = "NC Redundancy";
 ThinClientPoolHADM::ThinClientPoolHADM(const char* name,
                                        std::shared_ptr<PoolAttributes> poolAttr,
                                        TcrConnectionManager& connManager)
     : ThinClientPoolDM(name, poolAttr, connManager),
-      m_theTcrConnManager(connManager),
-      m_redundancySema(0),
-      m_redundancyTask(nullptr),
-      m_servermonitorTaskId(-1) {
-  m_redundancyManager = std::unique_ptr<ThinClientRedundancyManager>(
+      theTcrConnManager_(connManager),
+      redundancy_semaphore_(0),
+      redundancyTask_(nullptr),
+      server_monitor_task_id_(ExpiryTask::invalid()) {
+  redundancyManager_ = std::unique_ptr<ThinClientRedundancyManager>(
       new ThinClientRedundancyManager(
           &connManager, poolAttr->getSubscriptionRedundancy(), this));
 }
@@ -52,24 +54,23 @@
                     ->getDistributedSystem()
                     .getSystemProperties();
 
-  m_redundancyManager->initialize(m_attrs->getSubscriptionRedundancy());
+  redundancyManager_->initialize(m_attrs->getSubscriptionRedundancy());
   //  Call maintain redundancy level, so primary is available for notification
   //  operations.
-  GfErrType err = m_redundancyManager->maintainRedundancyLevel(true);
+  GfErrType err = redundancyManager_->maintainRedundancyLevel(true);
 
-  ACE_Event_Handler* redundancyChecker =
-      new ExpiryHandler_T<ThinClientPoolHADM>(
-          this, &ThinClientPoolHADM::checkRedundancy);
-  const auto redundancyMonitorInterval = props.redundancyMonitorInterval();
+  const auto interval = props.redundancyMonitorInterval();
+  auto& manager = m_connManager.getCacheImpl()->getExpiryTaskManager();
+  auto task = std::make_shared<FunctionExpiryTask>(
+      manager, [this]() { redundancy_semaphore_.release(); });
 
-  m_servermonitorTaskId =
-      m_connManager.getCacheImpl()->getExpiryTaskManager().scheduleExpiryTask(
-          redundancyChecker, std::chrono::seconds(1), redundancyMonitorInterval,
-          false);
+  server_monitor_task_id_ =
+      manager.schedule(std::move(task), std::chrono::seconds(1), interval);
+
   LOGFINE(
       "ThinClientPoolHADM::ThinClientPoolHADM Registered server "
       "monitor task with id = %ld, interval = %ld",
-      m_servermonitorTaskId, redundancyMonitorInterval.count());
+      server_monitor_task_id_, interval.count());
 
   if (ThinClientBaseDM::isFatalClientError(err)) {
     if (err == GF_CACHE_LOCATOR_EXCEPTION) {
@@ -81,21 +82,18 @@
     }
   }
 
-  m_redundancyManager->startPeriodicAck();
-  m_redundancyTask =
+  redundancyManager_->startPeriodicAck();
+  redundancyTask_ =
       std::unique_ptr<Task<ThinClientPoolHADM>>(new Task<ThinClientPoolHADM>(
           this, &ThinClientPoolHADM::redundancy, NC_Redundancy));
-  m_redundancyTask->start();
+  redundancyTask_->start();
 }
 
 GfErrType ThinClientPoolHADM::sendSyncRequest(TcrMessage& request,
                                               TcrMessageReply& reply,
                                               bool attemptFailover,
                                               bool isBGThread) {
-  GfErrType err = GF_NOERR;
-
   int32_t type = request.getMessageType();
-
   if ((type == TcrMessage::EXECUTECQ_MSG_TYPE ||
        type == TcrMessage::STOPCQ_MSG_TYPE ||
        type == TcrMessage::CLOSECQ_MSG_TYPE ||
@@ -106,17 +104,11 @@
        type == TcrMessage::GETDURABLECQS_MSG_TYPE)) {
     if (m_destroyPending) return GF_NOERR;
     reply.setDM(this);
-    err = sendSyncRequestCq(request, reply);
+    return sendSyncRequestCq(request, reply);
   } else {
-    err = ThinClientPoolDM::sendSyncRequest(request, reply, attemptFailover,
-                                            isBGThread);
+    return ThinClientPoolDM::sendSyncRequest(request, reply, attemptFailover,
+                                             isBGThread);
   }
-  return err;
-}
-
-bool ThinClientPoolHADM::registerInterestForHARegion(
-    TcrEndpoint* ep, const TcrMessage* request, ThinClientHARegion& region) {
-  return (region.registerKeys(ep, request) == GF_NOERR);
 }
 
 GfErrType ThinClientPoolHADM::sendSyncRequestRegisterInterestEP(
@@ -129,13 +121,13 @@
 GfErrType ThinClientPoolHADM::sendSyncRequestRegisterInterest(
     TcrMessage& request, TcrMessageReply& reply, bool attemptFailover,
     ThinClientRegion* region, TcrEndpoint* endpoint) {
-  return m_redundancyManager->sendSyncRequestRegisterInterest(
+  return redundancyManager_->sendSyncRequestRegisterInterest(
       request, reply, attemptFailover, endpoint, this, region);
 }
 
 GfErrType ThinClientPoolHADM::sendSyncRequestCq(TcrMessage& request,
                                                 TcrMessageReply& reply) {
-  return m_redundancyManager->sendSyncRequestCq(request, reply, this);
+  return redundancyManager_->sendSyncRequestCq(request, reply, this);
 }
 
 bool ThinClientPoolHADM::preFailoverAction() { return true; }
@@ -147,23 +139,18 @@
 
 void ThinClientPoolHADM::redundancy(std::atomic<bool>& isRunning) {
   LOGFINE("ThinClientPoolHADM: Starting maintain redundancy thread.");
+
+  redundancy_semaphore_.acquire();
   while (isRunning) {
-    m_redundancySema.acquire();
-    if (isRunning && !m_connManager.isNetDown()) {
-      m_redundancyManager->maintainRedundancyLevel();
-      while (m_redundancySema.tryacquire() != -1) {
-        ;
-      }
+    if (!m_connManager.isNetDown()) {
+      redundancyManager_->maintainRedundancyLevel();
     }
+
+    redundancy_semaphore_.acquire();
   }
   LOGFINE("ThinClientPoolHADM: Ending maintain redundancy thread.");
 }
 
-int ThinClientPoolHADM::checkRedundancy(const ACE_Time_Value&, const void*) {
-  m_redundancySema.release();
-  return 0;
-}
-
 void ThinClientPoolHADM::destroy(bool keepAlive) {
   LOGDEBUG("ThinClientPoolHADM::destroy");
   if (!m_isDestroyed && !m_destroyPending) {
@@ -178,7 +165,7 @@
 
     sendNotificationCloseMsgs();
 
-    m_redundancyManager->close();
+    redundancyManager_->close();
 
     m_destroyPendingHADM = true;
     ThinClientPoolDM::destroy(keepAlive);
@@ -186,82 +173,79 @@
 }
 
 void ThinClientPoolHADM::sendNotificationCloseMsgs() {
-  if (m_redundancyTask) {
-    if (m_servermonitorTaskId >= 0) {
-      m_connManager.getCacheImpl()->getExpiryTaskManager().cancelTask(
-          m_servermonitorTaskId);
-    }
-    m_redundancyTask->stopNoblock();
-    m_redundancySema.release();
-    m_redundancyTask->wait();
-    m_redundancyTask = nullptr;
-    m_redundancyManager->sendNotificationCloseMsgs();
+  if (redundancyTask_) {
+    auto& manager = m_connManager.getCacheImpl()->getExpiryTaskManager();
+    manager.cancel(server_monitor_task_id_);
+    redundancyTask_->stopNoblock();
+    redundancy_semaphore_.release();
+    redundancyTask_->wait();
+    redundancyTask_ = nullptr;
+    redundancyManager_->sendNotificationCloseMsgs();
   }
 }
 
 GfErrType ThinClientPoolHADM::registerInterestAllRegions(
     TcrEndpoint* ep, const TcrMessage* request, TcrMessageReply* reply) {
   GfErrType err = GF_NOERR;
-  GfErrType opErr = GF_NOERR;
 
-  std::lock_guard<decltype(m_regionsLock)> guard(m_regionsLock);
-  for (std::list<ThinClientRegion*>::iterator itr = m_regions.begin();
-       itr != m_regions.end(); itr++) {
-    if ((opErr = (*itr)->registerKeys(ep, request, reply)) != GF_NOERR) {
-      if (err == GF_NOERR) {
-        err = opErr;
-      }
+  std::lock_guard<decltype(regionsLock_)> guard(regionsLock_);
+  for (const auto& region : regions_) {
+    auto opErr = region->registerKeys(ep, request, reply);
+    if (err == GF_NOERR) {
+      err = opErr;
     }
   }
+
   return err;
 }
 
 bool ThinClientPoolHADM::checkDupAndAdd(std::shared_ptr<EventId> eventid) {
-  return m_redundancyManager->checkDupAndAdd(eventid);
+  return redundancyManager_->checkDupAndAdd(eventid);
 }
 
 void ThinClientPoolHADM::processMarker() {
   // also set the static bool m_processedMarker for makePrimary messages
-  m_redundancyManager->m_globalProcessedMarker = true;
+  redundancyManager_->m_globalProcessedMarker = true;
 }
 
 void ThinClientPoolHADM::acquireRedundancyLock() {
-  m_redundancyManager->acquireRedundancyLock();
+  redundancyManager_->acquireRedundancyLock();
 }
 
 void ThinClientPoolHADM::releaseRedundancyLock() {
-  m_redundancyManager->releaseRedundancyLock();
+  redundancyManager_->releaseRedundancyLock();
 }
 
 std::recursive_mutex& ThinClientPoolHADM::getRedundancyLock() {
-  return m_redundancyManager->getRedundancyLock();
+  return redundancyManager_->getRedundancyLock();
 }
 
 GfErrType ThinClientPoolHADM::sendRequestToPrimary(TcrMessage& request,
                                                    TcrMessageReply& reply) {
-  return m_redundancyManager->sendRequestToPrimary(request, reply);
+  return redundancyManager_->sendRequestToPrimary(request, reply);
 }
 
 bool ThinClientPoolHADM::isReadyForEvent() const {
-  return m_redundancyManager->isSentReadyForEvents();
+  return redundancyManager_->isSentReadyForEvents();
 }
 
 void ThinClientPoolHADM::addRegion(ThinClientRegion* theTCR) {
-  std::lock_guard<decltype(m_regionsLock)> guard(m_regionsLock);
-  m_regions.push_back(theTCR);
+  std::lock_guard<decltype(regionsLock_)> guard(regionsLock_);
+  regions_.push_back(theTCR);
 }
-void ThinClientPoolHADM::addDisMessToQueue(ThinClientRegion* theTCR) {
-  std::lock_guard<decltype(m_regionsLock)> guard(m_regionsLock);
-  if (m_redundancyManager->allEndPointDiscon()) {
-    theTCR->receiveNotification(TcrMessage::getAllEPDisMess());
+void ThinClientPoolHADM::addDisconnectedMessageToQueue(
+    ThinClientRegion* theTCR) {
+  std::lock_guard<decltype(regionsLock_)> guard(regionsLock_);
+  if (redundancyManager_->allEndPointDiscon()) {
+    theTCR->receiveNotification(TcrMessageAllEndpointsDisconnectedMarker());
   }
 }
 void ThinClientPoolHADM::removeRegion(ThinClientRegion* theTCR) {
-  std::lock_guard<decltype(m_regionsLock)> guard(m_regionsLock);
-  for (std::list<ThinClientRegion*>::iterator itr = m_regions.begin();
-       itr != m_regions.end(); itr++) {
+  std::lock_guard<decltype(regionsLock_)> guard(regionsLock_);
+  for (std::list<ThinClientRegion*>::iterator itr = regions_.begin();
+       itr != regions_.end(); itr++) {
     if (*itr == theTCR) {
-      m_regions.erase(itr);
+      regions_.erase(itr);
       return;
     }
   }
@@ -277,7 +261,7 @@
 
   auto&& durable = sysProp.durableClientId();
   if (!durable.empty()) {
-    m_redundancyManager->readyForEvents();
+    redundancyManager_->readyForEvents();
   }
 }
 
@@ -291,31 +275,39 @@
     }
   }
 
-  m_redundancyManager->netDown();
+  redundancyManager_->netDown();
 }
 
 void ThinClientPoolHADM::pingServerLocal() {
-  auto& mutex = m_redundancyManager->getRedundancyLock();
+  auto& mutex = redundancyManager_->getRedundancyLock();
   std::lock_guard<decltype(mutex)> guard(mutex);
   ThinClientPoolDM::pingServerLocal();
 }
 
 void ThinClientPoolHADM::removeCallbackConnection(TcrEndpoint* ep) {
-  m_redundancyManager->removeCallbackConnection(ep);
+  redundancyManager_->removeCallbackConnection(ep);
 }
 
-void ThinClientPoolHADM::sendNotConMesToAllregions() {
-  std::lock_guard<decltype(m_regionsLock)> guard(m_regionsLock);
-  for (std::list<ThinClientRegion*>::iterator it = m_regions.begin();
-       it != m_regions.end(); it++) {
-    (*it)->receiveNotification(TcrMessage::getAllEPDisMess());
+void ThinClientPoolHADM::sendNotConnectedMessageToAllregions() {
+  std::lock_guard<decltype(regionsLock_)> guard(regionsLock_);
+  for (auto region : regions_) {
+    region->receiveNotification(TcrMessageAllEndpointsDisconnectedMarker());
   }
 }
 
-TcrEndpoint* ThinClientPoolHADM::createEP(const char* endpointName) {
-  return new TcrPoolEndPoint(
-      endpointName, m_connManager.getCacheImpl(), m_connManager.m_failoverSema,
-      m_connManager.m_cleanupSema, m_redundancySema, this);
+void ThinClientPoolHADM::clearKeysOfInterestAllRegions() {
+  std::lock_guard<decltype(regionsLock_)> guard(regionsLock_);
+  for (auto region : regions_) {
+    region->clearKeysOfInterest();
+  }
+}
+
+std::shared_ptr<TcrEndpoint> ThinClientPoolHADM::createEP(
+    const char* endpointName) {
+  return std::make_shared<TcrPoolEndPoint>(
+      endpointName, m_connManager.getCacheImpl(),
+      m_connManager.failover_semaphore_, m_connManager.cleanup_semaphore_,
+      redundancy_semaphore_, this);
 }
 
 }  // namespace client
diff --git a/cppcache/src/ThinClientPoolHADM.hpp b/cppcache/src/ThinClientPoolHADM.hpp
index 97a332b..4fff940 100644
--- a/cppcache/src/ThinClientPoolHADM.hpp
+++ b/cppcache/src/ThinClientPoolHADM.hpp
@@ -50,9 +50,6 @@
                             bool attemptFailover = true,
                             bool isBGThread = false) override;
 
-  bool registerInterestForHARegion(TcrEndpoint* ep, const TcrMessage* request,
-                                   ThinClientHARegion& region);
-
   GfErrType sendSyncRequestRegisterInterestEP(TcrMessage& request,
                                               TcrMessageReply& reply,
                                               bool attemptFailover,
@@ -62,7 +59,7 @@
                                        const TcrMessage* request,
                                        TcrMessageReply* reply);
 
-  virtual void destroy(bool keepAlive = false) override;
+  void destroy(bool keepAlive = false) override;
 
   void readyForEvents();
 
@@ -84,7 +81,7 @@
 
   GfErrType sendRequestToPrimary(TcrMessage& request, TcrMessageReply& reply);
 
-  void triggerRedundancyThread() override { m_redundancySema.release(); }
+  void triggerRedundancyThread() override { redundancy_semaphore_.release(); }
 
   bool isReadyForEvent() const;
 
@@ -104,27 +101,27 @@
   void startBackgroundThreads() override;
 
  private:
-  std::unique_ptr<ThinClientRedundancyManager> m_redundancyManager;
+  std::unique_ptr<ThinClientRedundancyManager> redundancyManager_;
 
-  TcrConnectionManager& m_theTcrConnManager;
-  ACE_Semaphore m_redundancySema;
-  std::unique_ptr<Task<ThinClientPoolHADM>> m_redundancyTask;
+  TcrConnectionManager& theTcrConnManager_;
+  binary_semaphore redundancy_semaphore_;
+  std::unique_ptr<Task<ThinClientPoolHADM>> redundancyTask_;
 
   void redundancy(std::atomic<bool>& isRunning);
 
-  ExpiryTaskManager::id_type m_servermonitorTaskId;
-  int checkRedundancy(const ACE_Time_Value&, const void*);
+  ExpiryTask::id_t server_monitor_task_id_;
 
-  TcrEndpoint* createEP(const char* endpointName) override;
+  std::shared_ptr<TcrEndpoint> createEP(const char* endpointName) override;
 
   void removeCallbackConnection(TcrEndpoint*) override;
 
-  std::list<ThinClientRegion*> m_regions;
-  std::recursive_mutex m_regionsLock;
+  std::list<ThinClientRegion*> regions_;
+  std::recursive_mutex regionsLock_;
   void addRegion(ThinClientRegion* theTCR);
   void removeRegion(ThinClientRegion* theTCR);
-  void sendNotConMesToAllregions();
-  void addDisMessToQueue(ThinClientRegion* theTCR);
+  void sendNotConnectedMessageToAllregions();
+  void addDisconnectedMessageToQueue(ThinClientRegion* theTCR);
+  void clearKeysOfInterestAllRegions();
 
   friend class ThinClientHARegion;
   friend class TcrConnectionManager;
diff --git a/cppcache/src/ThinClientPoolStickyHADM.hpp b/cppcache/src/ThinClientPoolStickyHADM.hpp
index 3c7566b..2cbbd01 100644
--- a/cppcache/src/ThinClientPoolStickyHADM.hpp
+++ b/cppcache/src/ThinClientPoolStickyHADM.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_THINCLIENTPOOLSTICKYHADM_H_
-#define GEODE_THINCLIENTPOOLSTICKYHADM_H_
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -19,11 +14,18 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+#pragma once
+
+#ifndef GEODE_THINCLIENTPOOLSTICKYHADM_H_
+#define GEODE_THINCLIENTPOOLSTICKYHADM_H_
+
 #include "ThinClientPoolHADM.hpp"
 
 namespace apache {
 namespace geode {
 namespace client {
+
 class ThinClientPoolStickyHADM : public ThinClientPoolHADM {
  public:
   ThinClientPoolStickyHADM(const char* name,
@@ -32,8 +34,9 @@
       : ThinClientPoolHADM(name, poolAttrs, connManager) {
     m_sticky = true;
   }
-  virtual ~ThinClientPoolStickyHADM() {}
+  ~ThinClientPoolStickyHADM() override = default;
 };
+
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/ThinClientRedundancyManager.cpp b/cppcache/src/ThinClientRedundancyManager.cpp
index 8538da6..4752c9b 100644
--- a/cppcache/src/ThinClientRedundancyManager.cpp
+++ b/cppcache/src/ThinClientRedundancyManager.cpp
@@ -14,12 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-/*
- * ThinClientRedundancyManager.cpp
- *
- *  Created on: Dec 1, 2008
- *      Author: abhaware
- */
 
 #include "ThinClientRedundancyManager.hpp"
 
@@ -31,11 +25,10 @@
 
 #include "CacheImpl.hpp"
 #include "ClientProxyMembershipID.hpp"
-#include "ExpiryHandler_T.hpp"
+#include "FunctionExpiryTask.hpp"
 #include "RemoteQueryService.hpp"
 #include "ServerLocation.hpp"
 #include "TcrHADistributionManager.hpp"
-#include "ThinClientLocatorHelper.hpp"
 #include "ThinClientPoolHADM.hpp"
 #include "ThinClientRegion.hpp"
 #include "UserAttributes.hpp"
@@ -53,7 +46,7 @@
     ThinClientPoolHADM* poolHADM, bool sentReadyForEvents,
     bool globalProcessedMarker)
     : m_globalProcessedMarker(globalProcessedMarker),
-      m_IsAllEpDisCon(false),
+      m_allEndpointsDisconnected(false),
       m_server(0),
       m_sentReadyForEvents(sentReadyForEvents),
       m_redundancyLevel(redundancyLevel),
@@ -63,8 +56,7 @@
       m_locators(nullptr),
       m_servers(nullptr),
       m_periodicAckTask(nullptr),
-      m_processEventIdMapTaskId(-1),
-      m_nextAckInc(0),
+      periodic_ack_semaphore_(1),
       m_HAenabled(false) {}
 
 std::list<ServerLocation> ThinClientRedundancyManager::selectServers(
@@ -91,7 +83,8 @@
     if (howMany == -1) howMany = m_servers->length();
     for (int attempts = 0; attempts < m_servers->length() && howMany > 0;
          attempts++) {
-      if (m_server >= m_servers->length()) {
+      if (m_servers->length() < 0 ||
+          m_server >= static_cast<std::size_t>(m_servers->length())) {
         m_server = 0;
       }
       ServerLocation location(Utils::convertHostToCanonicalForm(
@@ -232,12 +225,12 @@
     outEndpoints = selectServers(howMany, exclEndPts);
     for (std::list<ServerLocation>::iterator it = outEndpoints.begin();
          it != outEndpoints.end(); it++) {
-      TcrEndpoint* ep = m_poolHADM->addEP(*it);
+      auto ep = m_poolHADM->addEP(*it);
       LOGDEBUG(
           "ThinClientRedundancyManager::maintainRedundancyLevel(): Adding "
           "endpoint %s to nonredundant list.",
           ep->name().c_str());
-      m_nonredundantEndpoints.push_back(ep);
+      m_nonredundantEndpoints.push_back(ep.get());
     }
   }
 
@@ -437,14 +430,14 @@
   }
 
   if (isRedundancySatisfied) {
-    m_IsAllEpDisCon = false;
+    m_allEndpointsDisconnected = false;
     m_loggedRedundancyWarning = false;
     return GF_NOERR;
   } else if (isPrimaryConnected) {
     if (fatal && err != GF_NOERR) {
       return fatalError;
     }
-    m_IsAllEpDisCon = false;
+    m_allEndpointsDisconnected = false;
     if (m_redundancyLevel == -1) {
       LOGINFO("Current subscription redundancy level is %zu",
               m_redundantEndpoints.size() - 1);
@@ -462,9 +455,10 @@
     // save any fatal errors that occur during maintain redundancy so
     // that we can send it back to the caller, to avoid missing out due
     // to nonfatal errors such as server not available
-    if (m_poolHADM && !m_IsAllEpDisCon) {
-      m_poolHADM->sendNotConMesToAllregions();
-      m_IsAllEpDisCon = true;
+    if (m_poolHADM && !m_allEndpointsDisconnected) {
+      m_poolHADM->clearKeysOfInterestAllRegions();
+      m_poolHADM->sendNotConnectedMessageToAllregions();
+      m_allEndpointsDisconnected = true;
     }
     if (fatal && err != GF_NOERR) {
       return fatalError;
@@ -635,7 +629,7 @@
     if (interval < std::chrono::milliseconds(100)) {
       interval = std::chrono::milliseconds(100);
     }
-    m_nextAckInc = interval;
+    next_ack_inc_ = interval;
     m_nextAck = clock::now() + interval;
   }
 
@@ -684,12 +678,11 @@
   LOGDEBUG("ThinClientRedundancyManager::close(): closing redundancy manager.");
 
   if (m_periodicAckTask) {
-    if (m_processEventIdMapTaskId >= 0) {
-      m_theTcrConnManager->getCacheImpl()->getExpiryTaskManager().cancelTask(
-          m_processEventIdMapTaskId);
-    }
+    auto& manager = m_theTcrConnManager->getCacheImpl()->getExpiryTaskManager();
+    manager.cancel(process_event_id_map_task_id_);
+
     m_periodicAckTask->stopNoblock();
-    m_periodicAckSema.release();
+    periodic_ack_semaphore_.release();
     m_periodicAckTask->wait();
     m_periodicAckTask = nullptr;
   }
@@ -894,7 +887,11 @@
     TcrEndpoint* primaryEndpoint = nullptr;
 
     if (!m_redundantEndpoints.empty()) {
-      for (auto&& redundantEndpoint : m_redundantEndpoints) {
+      primaryEndpoint = m_redundantEndpoints[0];
+      for (auto& redundantEndpoint : m_redundantEndpoints) {
+        if (redundantEndpoint == primaryEndpoint) {
+          continue;
+        }
         redundantEndpoint->setDM(request.getDM());
         opErr = theHADM->sendSyncRequestRegisterInterestEP(
             request, reply, false, redundantEndpoint);
@@ -902,7 +899,6 @@
           err = opErr;
         }
       }
-      primaryEndpoint = m_redundantEndpoints[0];
     }
 
     if ((request.getMessageType() == TcrMessage::REGISTER_INTEREST_LIST ||
@@ -949,7 +945,7 @@
   }
 }
 
-synchronized_map<std::unordered_map<std::string, TcrEndpoint*>,
+synchronized_map<std::unordered_map<std::string, std::shared_ptr<TcrEndpoint>>,
                  std::recursive_mutex>&
 ThinClientRedundancyManager::updateAndSelectEndpoints() {
   // 38196 Fix: For durable clients reconnect
@@ -983,8 +979,7 @@
 
 void ThinClientRedundancyManager::getAllEndpoints(
     std::vector<TcrEndpoint*>& endpoints) {
-  TcrEndpoint* maxQEp = nullptr;
-  TcrEndpoint* primaryEp = nullptr;
+  std::shared_ptr<TcrEndpoint> maxQEp, primaryEp;
 
   auto& selectedEndpoints = updateAndSelectEndpoints();
   for (const auto& currItr : selectedEndpoints) {
@@ -998,13 +993,13 @@
         m_poolHADM->addConnection(statusConn);
       }
       if (status == REDUNDANT_SERVER) {
-        if (maxQEp == nullptr) {
+        if (!maxQEp) {
           maxQEp = ep;
         } else if (ep->getServerQueueSize() > maxQEp->getServerQueueSize()) {
-          insertEPInQueueSizeOrder(maxQEp, endpoints);
+          insertEPInQueueSizeOrder(maxQEp.get(), endpoints);
           maxQEp = ep;
         } else {
-          insertEPInQueueSizeOrder(ep, endpoints);
+          insertEPInQueueSizeOrder(ep.get(), endpoints);
         }
         LOGDEBUG(
             "ThinClientRedundancyManager::getAllEndpoints(): sorting "
@@ -1016,33 +1011,33 @@
             "ThinClientRedundancyManager::getAllEndpoints(): sorting "
             "endpoints, found primary endpoint.");
       } else {
-        endpoints.push_back(currItr.second);
+        endpoints.push_back(currItr.second.get());
         LOGDEBUG(
             "ThinClientRedundancyManager::getAllEndpoints(): sorting "
             "endpoints, found nonredundant endpoint.");
       }
     } else {
-      endpoints.push_back(currItr.second);
+      endpoints.push_back(currItr.second.get());
     }
     //(*currItr)++;
   }
 
   // Add Endpoint with Max Queuesize at the last and Primary at first position
   if (isDurable()) {
-    if (maxQEp != nullptr) {
-      endpoints.push_back(maxQEp);
+    if (maxQEp) {
+      endpoints.push_back(maxQEp.get());
       LOGDEBUG(
           "ThinClientRedundancyManager::getAllEndpoints(): sorting endpoints, "
           "pushing max-q endpoint at back.");
     }
-    if (primaryEp != nullptr) {
-      if (m_redundancyLevel == 0 || maxQEp == nullptr) {
-        endpoints.push_back(primaryEp);
+    if (primaryEp) {
+      if (m_redundancyLevel == 0 || !maxQEp) {
+        endpoints.push_back(primaryEp.get());
         LOGDEBUG(
             "ThinClientRedundancyManager::getAllEndpoints(): sorting "
             "endpoints, pushing primary at back.");
       } else {
-        endpoints.insert(endpoints.begin(), primaryEp);
+        endpoints.insert(endpoints.begin(), primaryEp.get());
         LOGDEBUG(
             "ThinClientRedundancyManager::getAllEndpoints(): sorting "
             "endpoints, inserting primary at head.");
@@ -1050,7 +1045,7 @@
     }
   } else {
     RandGen randgen;
-    std::random_shuffle(endpoints.begin(), endpoints.end(), randgen);
+    std::shuffle(endpoints.begin(), endpoints.end(), randgen);
   }
 }
 
@@ -1122,21 +1117,12 @@
   m_sentReadyForEvents = true;
 }
 
-int ThinClientRedundancyManager::processEventIdMap(const ACE_Time_Value&,
-                                                   const void*) {
-  m_periodicAckSema.release();
-  return 0;
-}
-
 void ThinClientRedundancyManager::periodicAck(std::atomic<bool>& isRunning) {
+  periodic_ack_semaphore_.acquire();
+
   while (isRunning) {
-    m_periodicAckSema.acquire();
-    if (isRunning) {
-      doPeriodicAck();
-      while (m_periodicAckSema.tryacquire() != -1) {
-        ;
-      }
-    }
+    doPeriodicAck();
+    periodic_ack_semaphore_.acquire();
   }
 }
 
@@ -1147,7 +1133,7 @@
   // do periodic ack if HA is enabled and the time has come
   if (m_HAenabled && (m_nextAck < clock::now())) {
     LOGFINER("Doing periodic ack");
-    m_nextAck += m_nextAckInc;
+    m_nextAck += next_ack_inc_;
 
     auto entries = m_eventidmap.getUnAcked();
     auto count = entries.size();
@@ -1170,7 +1156,7 @@
           result = m_poolHADM->sendRequestToEP(request, reply, *endpoint);
         } else {
           result = (*endpoint)->send(request, reply);
-        };
+        }
 
         if (result == GF_NOERR && reply.getMessageType() == TcrMessage::REPLY) {
           LOGFINE(
@@ -1216,18 +1202,16 @@
                           ->getDistributedSystem()
                           .getSystemProperties();
   // start the periodic ACK task handler
-  auto periodicAckTask = new ExpiryHandler_T<ThinClientRedundancyManager>(
-      this, &ThinClientRedundancyManager::processEventIdMap);
-  m_processEventIdMapTaskId =
-      m_theTcrConnManager->getCacheImpl()
-          ->getExpiryTaskManager()
-          .scheduleExpiryTask(periodicAckTask, m_nextAckInc, m_nextAckInc,
-                              false);
+  auto& manager = m_theTcrConnManager->getCacheImpl()->getExpiryTaskManager();
+  auto task = std::make_shared<FunctionExpiryTask>(
+      manager, [this] { periodic_ack_semaphore_.release(); });
+  process_event_id_map_task_id_ =
+      manager.schedule(std::move(task), next_ack_inc_, next_ack_inc_);
   LOGFINE(
       "Registered subscription event "
       "periodic ack task with id = %ld, notify-ack-interval = %ld, "
       "notify-dupcheck-life = %ld, periodic ack is %sabled",
-      m_processEventIdMapTaskId,
+      process_event_id_map_task_id_,
       (m_poolHADM ? m_poolHADM->getSubscriptionAckInterval()
                   : props.notifyAckInterval())
           .count(),
diff --git a/cppcache/src/ThinClientRedundancyManager.hpp b/cppcache/src/ThinClientRedundancyManager.hpp
index cc45395..56e0cac 100644
--- a/cppcache/src/ThinClientRedundancyManager.hpp
+++ b/cppcache/src/ThinClientRedundancyManager.hpp
@@ -34,6 +34,7 @@
 #include "ServerLocation.hpp"
 #include "Task.hpp"
 #include "TcrMessage.hpp"
+#include "util/concurrent/binary_semaphore.hpp"
 #include "util/synchronized_map.hpp"
 
 namespace apache {
@@ -78,7 +79,7 @@
   void netDown();
   void acquireRedundancyLock() { m_redundantEndpointsLock.lock(); }
   void releaseRedundancyLock() { m_redundantEndpointsLock.unlock(); }
-  bool allEndPointDiscon() { return m_IsAllEpDisCon; }
+  bool allEndPointDiscon() { return m_allEndpointsDisconnected; }
   void removeCallbackConnection(TcrEndpoint*);
 
   std::recursive_mutex& getRedundancyLock() { return m_redundantEndpointsLock; }
@@ -91,8 +92,8 @@
   using time_point = clock::time_point;
 
   // for selectServers
-  volatile bool m_IsAllEpDisCon;
-  int m_server;
+  volatile bool m_allEndpointsDisconnected;
+  std::size_t m_server;
   bool m_sentReadyForEvents;
   int m_redundancyLevel;
   bool m_loggedRedundancyWarning;
@@ -118,8 +119,9 @@
   void moveEndpointToLast(std::vector<TcrEndpoint*>& epVector,
                           TcrEndpoint* targetEp);
 
-  synchronized_map<std::unordered_map<std::string, TcrEndpoint*>,
-                   std::recursive_mutex>&
+  synchronized_map<
+      std::unordered_map<std::string, std::shared_ptr<TcrEndpoint>>,
+      std::recursive_mutex>&
   updateAndSelectEndpoints();
 
   void getAllEndpoints(std::vector<TcrEndpoint*>& endpoints);
@@ -133,16 +135,15 @@
                               TcrMessageReply* reply, bool isPrimary);
 
   inline bool isDurable();
-  int processEventIdMap(const ACE_Time_Value&, const void*);
+
   std::unique_ptr<Task<ThinClientRedundancyManager>> m_periodicAckTask;
-  ACE_Semaphore m_periodicAckSema;
-  ExpiryTaskManager::id_type
-      m_processEventIdMapTaskId;  // periodic check eventid map for notify ack
-                                  // and/or expiry
+  binary_semaphore periodic_ack_semaphore_;
+  ExpiryTask::id_t process_event_id_map_task_id_{ExpiryTask::invalid()};
+
   void periodicAck(std::atomic<bool>& isRunning);
   void doPeriodicAck();
-  time_point m_nextAck;                    // next ack time
-  std::chrono::milliseconds m_nextAckInc;  // next ack time increment
+  time_point m_nextAck;                     // next ack time
+  std::chrono::milliseconds next_ack_inc_;  // next ack time increment
   volatile bool m_HAenabled;
   EventIdMap m_eventidmap;
 
diff --git a/cppcache/src/ThinClientRegion.cpp b/cppcache/src/ThinClientRegion.cpp
index d49b1ac..682e01a 100644
--- a/cppcache/src/ThinClientRegion.cpp
+++ b/cppcache/src/ThinClientRegion.cpp
@@ -18,8 +18,9 @@
 #include "ThinClientRegion.hpp"
 
 #include <algorithm>
-#include <limits>
-#include <regex>
+
+#include <boost/regex.hpp>
+#include <boost/thread/lock_types.hpp>
 
 #include <geode/PoolManager.hpp>
 #include <geode/Struct.hpp>
@@ -31,7 +32,6 @@
 #include "CacheRegionHelper.hpp"
 #include "DataInputInternal.hpp"
 #include "PutAllPartialResultServerException.hpp"
-#include "ReadWriteLock.hpp"
 #include "RegionGlobalLocks.hpp"
 #include "RemoteQuery.hpp"
 #include "TcrConnectionManager.hpp"
@@ -49,9 +49,6 @@
 namespace geode {
 namespace client {
 
-static const std::regex PREDICATE_IS_FULL_QUERY_REGEX(
-    "^\\s*(?:select|import)\\b", std::regex::icase);
-
 void setThreadLocalExceptionMessage(std::string exMsg);
 
 class PutAllWork : public PooledWork<GfErrType> {
@@ -59,19 +56,15 @@
   std::shared_ptr<BucketServerLocation> m_serverLocation;
   TcrMessage* m_request;
   TcrMessageReply* m_reply;
-  MapOfUpdateCounters m_mapOfUpdateCounters;
   bool m_attemptFailover;
   bool m_isBGThread;
   std::shared_ptr<UserAttributes> m_userAttribute;
   const std::shared_ptr<Region> m_region;
-  std::shared_ptr<std::vector<std::shared_ptr<CacheableKey>>> m_keys;
   std::shared_ptr<HashMapOfCacheable> m_map;
   std::shared_ptr<VersionedCacheableObjectPartList> m_verObjPartListPtr;
   std::chrono::milliseconds m_timeout;
   std::shared_ptr<PutAllPartialResultServerException> m_papException;
-  bool m_isPapeReceived;
   ChunkedPutAllResponse* m_resultCollector;
-  // UNUSED const std::shared_ptr<Serializable>& m_aCallbackArgument;
 
  public:
   PutAllWork(const PutAllWork&) = delete;
@@ -90,13 +83,9 @@
         m_isBGThread(isBGThread),
         m_userAttribute(nullptr),
         m_region(region),
-        m_keys(keys),
         m_map(map),
         m_timeout(timeout),
-        m_papException(nullptr),
-        m_isPapeReceived(false)
-  // UNUSED , m_aCallbackArgument(aCallbackArgument)
-  {
+        m_papException(nullptr) {
     m_request = new TcrMessagePutAll(
         new DataOutput(m_region->getCache().createDataOutput()), m_region.get(),
         *m_map, m_timeout, m_poolDM, aCallbackArgument);
@@ -118,20 +107,14 @@
     m_reply->setChunkedResultHandler(m_resultCollector);
   }
 
-  ~PutAllWork() {
+  ~PutAllWork() noexcept override {
     delete m_request;
     delete m_reply;
     delete m_resultCollector;
   }
 
-  TcrMessage* getReply() { return m_reply; }
-
   std::shared_ptr<HashMapOfCacheable> getPutAllMap() { return m_map; }
 
-  std::shared_ptr<VersionedCacheableObjectPartList> getVerObjPartList() {
-    return m_verObjPartListPtr;
-  }
-
   ChunkedPutAllResponse* getResultCollector() { return m_resultCollector; }
 
   std::shared_ptr<BucketServerLocation> getServerLocation() {
@@ -143,7 +126,7 @@
   }
 
   void init() {}
-  GfErrType execute(void) {
+  GfErrType execute(void) override {
     GuardUserAttributes gua;
 
     if (m_userAttribute != nullptr) {
@@ -175,7 +158,6 @@
         // TODO::Check for the PAPException and READ
         // PutAllPartialResultServerException and set its member for later use.
         // set m_papException and m_isPapeReceived
-        m_isPapeReceived = true;
         if (m_poolDM->isNotAuthorizedException(m_reply->getException())) {
           LOGDEBUG("received NotAuthorizedException");
           err = GF_AUTHENTICATION_FAILED_EXCEPTION;
@@ -208,16 +190,13 @@
   std::shared_ptr<BucketServerLocation> m_serverLocation;
   TcrMessage* m_request;
   TcrMessageReply* m_reply;
-  MapOfUpdateCounters m_mapOfUpdateCounters;
   bool m_attemptFailover;
   bool m_isBGThread;
   std::shared_ptr<UserAttributes> m_userAttribute;
   const std::shared_ptr<Region> m_region;
   const std::shared_ptr<Serializable>& m_aCallbackArgument;
-  std::shared_ptr<std::vector<std::shared_ptr<CacheableKey>>> m_keys;
   std::shared_ptr<VersionedCacheableObjectPartList> m_verObjPartListPtr;
   std::shared_ptr<PutAllPartialResultServerException> m_papException;
-  bool m_isPapeReceived;
   ChunkedRemoveAllResponse* m_resultCollector;
 
  public:
@@ -237,9 +216,7 @@
         m_userAttribute(nullptr),
         m_region(region),
         m_aCallbackArgument(aCallbackArgument),
-        m_keys(keys),
-        m_papException(nullptr),
-        m_isPapeReceived(false) {
+        m_papException(nullptr) {
     m_request = new TcrMessageRemoveAll(
         new DataOutput(m_region->getCache().createDataOutput()), m_region.get(),
         *keys, m_aCallbackArgument, m_poolDM);
@@ -253,23 +230,17 @@
       m_userAttribute = UserAttributes::threadLocalUserAttributes;
     }
 
-    m_resultCollector = new ChunkedRemoveAllResponse(
-        m_region, *m_reply, responseLock, m_verObjPartListPtr);
+    m_resultCollector =
+        new ChunkedRemoveAllResponse(m_region, *m_reply, m_verObjPartListPtr);
     m_reply->setChunkedResultHandler(m_resultCollector);
   }
 
-  ~RemoveAllWork() {
+  ~RemoveAllWork() noexcept override {
     delete m_request;
     delete m_reply;
     delete m_resultCollector;
   }
 
-  TcrMessage* getReply() { return m_reply; }
-
-  std::shared_ptr<VersionedCacheableObjectPartList> getVerObjPartList() {
-    return m_verObjPartListPtr;
-  }
-
   ChunkedRemoveAllResponse* getResultCollector() { return m_resultCollector; }
 
   std::shared_ptr<BucketServerLocation> getServerLocation() {
@@ -281,7 +252,7 @@
   }
 
   void init() {}
-  GfErrType execute(void) {
+  GfErrType execute(void) override {
     GuardUserAttributes gua;
 
     if (m_userAttribute != nullptr) {
@@ -313,7 +284,6 @@
         // TODO::Check for the PAPException and READ
         // PutAllPartialResultServerException and set its member for later use.
         // set m_papException and m_isPapeReceived
-        m_isPapeReceived = true;
         if (m_poolDM->isNotAuthorizedException(m_reply->getException())) {
           LOGDEBUG("received NotAuthorizedException");
           err = GF_AUTHENTICATION_FAILED_EXCEPTION;
@@ -369,10 +339,11 @@
 }
 
 void ThinClientRegion::registerKeys(
-    const std::vector<std::shared_ptr<CacheableKey>>& keys, bool isDurable,
-    bool getInitialValues, bool receiveValues) {
-  auto pool = m_cacheImpl->getPoolManager().find(getAttributes().getPoolName());
-  if (pool != nullptr) {
+    const std::vector<std::shared_ptr<CacheableKey>>& keys,
+    const bool isDurable, const bool getInitialValues,
+    const bool receiveValues) {
+  if (auto pool =
+          m_cacheImpl->getPoolManager().find(getAttributes().getPoolName())) {
     if (!pool->getSubscriptionEnabled()) {
       LOGERROR(
           "Registering keys is supported "
@@ -383,12 +354,14 @@
           "only if pool subscription-enabled attribute is true.");
     }
   }
+
   if (keys.empty()) {
     LOGERROR("Register keys list is empty");
     throw IllegalArgumentException(
         "Register keys "
         "keys vector is empty");
   }
+
   if (isDurable && !isDurableClient()) {
     LOGERROR(
         "Register keys durable flag is only applicable for durable clients");
@@ -396,6 +369,7 @@
         "Durable flag only applicable for "
         "durable clients");
   }
+
   if (getInitialValues && !m_regionAttributes.getCachingEnabled()) {
     LOGERROR(
         "Register keys getInitialValues flag is only applicable for caching"
@@ -404,16 +378,15 @@
         "getInitialValues flag only applicable for caching clients");
   }
 
-  InterestResultPolicy interestPolicy = InterestResultPolicy::NONE;
-  if (getInitialValues) {
-    interestPolicy = InterestResultPolicy::KEYS_VALUES;
-  }
+  const auto interestPolicy = getInitialValues
+                                  ? InterestResultPolicy::KEYS_VALUES
+                                  : InterestResultPolicy::NONE;
 
-  LOGDEBUG("ThinClientRegion::registerKeys : interestpolicy is %d",
-           interestPolicy.ordinal);
+  LOGDEBUG("ThinClientRegion::registerKeys : interestPolicy is %d",
+           interestPolicy);
 
-  GfErrType err = registerKeysNoThrow(keys, true, nullptr, isDurable,
-                                      interestPolicy, receiveValues);
+  const auto err = registerKeysNoThrow(keys, true, nullptr, isDurable,
+                                       interestPolicy, receiveValues);
 
   if (m_tcrdm->isFatalError(err)) {
     throwExceptionIfError("Region::registerKeys", err);
@@ -451,71 +424,22 @@
         "Unregister keys "
         "keys vector is empty");
   }
-  GfErrType err = unregisterKeysNoThrow(keys);
+  const auto err = unregisterKeysNoThrow(keys);
   throwExceptionIfError("Region::unregisterKeys", err);
 }
 
-void ThinClientRegion::registerAllKeys(bool isDurable, bool getInitialValues,
-                                       bool receiveValues) {
-  auto pool = m_cacheImpl->getPoolManager().find(getAttributes().getPoolName());
-  if (pool != nullptr) {
-    if (!pool->getSubscriptionEnabled()) {
-      LOGERROR(
-          "Register all keys is supported only "
-          "if subscription-enabled attribute is true for pool " +
-          pool->getName());
-      throw UnsupportedOperationException(
-          "Register all keys is supported only "
-          "if pool subscription-enabled attribute is true.");
-    }
-  }
-  if (isDurable && !isDurableClient()) {
-    LOGERROR(
-        "Register all keys durable flag is only applicable for durable "
-        "clients");
-    throw IllegalStateException(
-        "Durable flag only applicable for durable clients");
-  }
-
-  if (getInitialValues && !m_regionAttributes.getCachingEnabled()) {
-    LOGERROR(
-        "Register all keys getInitialValues flag is only applicable for caching"
-        "clients");
-    throw IllegalStateException(
-        "getInitialValues flag only applicable for caching clients");
-  }
-
-  InterestResultPolicy interestPolicy = InterestResultPolicy::NONE;
-  if (getInitialValues) {
-    interestPolicy = InterestResultPolicy::KEYS_VALUES;
-  } else {
-    interestPolicy = InterestResultPolicy::KEYS;
-  }
-
-  LOGDEBUG("ThinClientRegion::registerAllKeys : interestpolicy is %d",
-           interestPolicy.ordinal);
-
-  std::shared_ptr<std::vector<std::shared_ptr<CacheableKey>>> resultKeys;
-  //  if we need to fetch initial data, then we get the keys in
-  // that call itself using the special GET_ALL message and do not need
-  // to get the keys in the initial  register interest  call
-  GfErrType err =
-      registerRegexNoThrow(".*", true, nullptr, isDurable, resultKeys,
-                           interestPolicy, receiveValues);
-
-  if (m_tcrdm->isFatalError(err)) {
-    throwExceptionIfError("Region::registerAllKeys", err);
-  }
-
-  // Get the entries from the server using a special GET_ALL message
-  throwExceptionIfError("Region::registerAllKeys", err);
+void ThinClientRegion::registerAllKeys(const bool isDurable,
+                                       const bool getInitialValues,
+                                       const bool receiveValues) {
+  registerRegex(kAllKeysRegex, isDurable, getInitialValues, receiveValues);
 }
 
-void ThinClientRegion::registerRegex(const std::string& regex, bool isDurable,
-                                     bool getInitialValues,
-                                     bool receiveValues) {
-  auto pool = m_cacheImpl->getPoolManager().find(getAttributes().getPoolName());
-  if (pool != nullptr) {
+void ThinClientRegion::registerRegex(const std::string& regex,
+                                     const bool isDurable,
+                                     const bool getInitialValues,
+                                     const bool receiveValues) {
+  if (auto pool =
+          m_cacheImpl->getPoolManager().find(getAttributes().getPoolName())) {
     if (!pool->getSubscriptionEnabled()) {
       LOGERROR(
           "Register regex is supported only if "
@@ -526,36 +450,38 @@
           "pool subscription-enabled attribute is true.");
     }
   }
+
   if (isDurable && !isDurableClient()) {
-    LOGERROR("Register regex durable flag only applicable for durable clients");
+    LOGERROR(
+        "Register regex durable flag is only applicable for durable clients");
     throw IllegalStateException(
         "Durable flag only applicable for durable clients");
   }
 
+  const auto caching = m_regionAttributes.getCachingEnabled();
+  if (getInitialValues && !caching) {
+    LOGERROR(
+        "Register regex getInitialValues flag is only applicable for caching"
+        "clients");
+    throw IllegalStateException(
+        "getInitialValues flag only applicable for caching clients");
+  }
+
   if (regex.empty()) {
     throw IllegalArgumentException(
         "Region::registerRegex: Regex string is empty");
   }
 
-  auto interestPolicy = InterestResultPolicy::NONE;
-  if (getInitialValues) {
-    interestPolicy = InterestResultPolicy::KEYS_VALUES;
-  } else {
-    interestPolicy = InterestResultPolicy::KEYS;
-  }
+  const auto interestPolicy =
+      getInitialValues                    ? InterestResultPolicy::KEYS_VALUES
+      : caching && kAllKeysRegex != regex ? InterestResultPolicy::KEYS
+                                          : InterestResultPolicy::NONE;
 
-  LOGDEBUG("ThinClientRegion::registerRegex : interestpolicy is %d",
-           interestPolicy.ordinal);
+  LOGDEBUG("ThinClientRegion::registerRegex : interestPolicy is %d",
+           interestPolicy);
 
-  auto resultKeys2 =
-      std::make_shared<std::vector<std::shared_ptr<CacheableKey>>>();
-
-  //  if we need to fetch initial data for "allKeys" case, then we
-  // get the keys in that call itself using the special GET_ALL message and
-  // do not need to get the keys in the initial  register interest  call
-  GfErrType err =
-      registerRegexNoThrow(regex, true, nullptr, isDurable, resultKeys2,
-                           interestPolicy, receiveValues);
+  const auto err = registerRegexNoThrow(regex, true, nullptr, isDurable,
+                                        nullptr, interestPolicy, receiveValues);
 
   if (m_tcrdm->isFatalError(err)) {
     throwExceptionIfError("Region::registerRegex", err);
@@ -565,8 +491,8 @@
 }
 
 void ThinClientRegion::unregisterRegex(const std::string& regex) {
-  auto pool = m_cacheImpl->getPoolManager().find(getAttributes().getPoolName());
-  if (pool != nullptr) {
+  if (auto pool =
+          m_cacheImpl->getPoolManager().find(getAttributes().getPoolName())) {
     if (!pool->getSubscriptionEnabled()) {
       LOGERROR(
           "Unregister regex is supported only if "
@@ -583,40 +509,28 @@
     throw IllegalArgumentException("Unregister regex string is empty");
   }
 
-  GfErrType err = unregisterRegexNoThrow(regex);
+  const auto err = unregisterRegexNoThrow(regex);
   throwExceptionIfError("Region::unregisterRegex", err);
 }
 
-void ThinClientRegion::unregisterAllKeys() {
-  auto pool = m_cacheImpl->getPoolManager().find(getAttributes().getPoolName());
-  if (pool != nullptr) {
-    if (!pool->getSubscriptionEnabled()) {
-      LOGERROR(
-          "Unregister all keys is supported only if "
-          "subscription-enabled attribute is true for pool " +
-          pool->getName());
-      throw UnsupportedOperationException(
-          "Unregister all keys is supported only if "
-          "pool subscription-enabled attribute is true.");
-    }
-  }
-  GfErrType err = unregisterRegexNoThrow(".*");
-  throwExceptionIfError("Region::unregisterAllKeys", err);
-}
+void ThinClientRegion::unregisterAllKeys() { unregisterRegex(kAllKeysRegex); }
 
 std::shared_ptr<SelectResults> ThinClientRegion::query(
     const std::string& predicate, std::chrono::milliseconds timeout) {
   util::PROTOCOL_OPERATION_TIMEOUT_BOUNDS(timeout);
 
-  CHECK_DESTROY_PENDING(TryReadGuard, Region::query);
+  CHECK_DESTROY_PENDING(shared_lock, Region::query);
 
   if (predicate.empty()) {
     LOGERROR("Region query predicate string is empty");
     throw IllegalArgumentException("Region query predicate string is empty");
   }
 
+  static const boost::regex isFullQueryRegex("^\\s*(?:select|import)\\b",
+                                             boost::regex::icase);
+
   std::string squery;
-  if (std::regex_search(predicate, PREDICATE_IS_FULL_QUERY_REGEX)) {
+  if (boost::regex_search(predicate, isFullQueryRegex)) {
     squery = predicate;
   } else {
     squery = "select distinct * from ";
@@ -717,7 +631,7 @@
 }
 
 std::vector<std::shared_ptr<CacheableKey>> ThinClientRegion::serverKeys() {
-  CHECK_DESTROY_PENDING(TryReadGuard, Region::serverKeys);
+  CHECK_DESTROY_PENDING(shared_lock, Region::serverKeys);
 
   TcrMessageReply reply(true, m_tcrdm.get());
   TcrMessageKeySet request(new DataOutput(m_cacheImpl->createDataOutput()),
@@ -772,6 +686,7 @@
   TcrMessageReply reply(true, m_tcrdm.get());
   reply.setMessageTypeRequest(TcrMessage::CONTAINS_KEY);
   err = m_tcrdm->sendSyncRequest(request, reply);
+  if (err != GF_NOERR) return err;
 
   switch (reply.getMessageType()) {
     case TcrMessage::RESPONSE:
@@ -799,7 +714,6 @@
 
   auto rptr = CacheableBoolean::create(ret);
 
-  rptr = std::dynamic_pointer_cast<CacheableBoolean>(handleReplay(err, rptr));
   throwExceptionIfError("Region::containsKeyOnServer ", err);
   return rptr->value();
 }
@@ -818,7 +732,7 @@
   TcrMessageReply reply(true, m_tcrdm.get());
   reply.setMessageTypeRequest(TcrMessage::CONTAINS_KEY);
   err = m_tcrdm->sendSyncRequest(request, reply);
-  // if ( err != GF_NOERR ) return ret;
+  if (err != GF_NOERR) return ret;
 
   switch (reply.getMessageType()) {
     case TcrMessage::RESPONSE:
@@ -846,8 +760,6 @@
 
   auto rptr = CacheableBoolean::create(ret);
 
-  rptr = std::dynamic_pointer_cast<CacheableBoolean>(handleReplay(err, rptr));
-
   throwExceptionIfError("Region::containsValueForKey ", err);
   return rptr->value();
 }
@@ -1052,7 +964,7 @@
 
   // do TCR destroy
   TcrMessageDestroy request(new DataOutput(m_cacheImpl->createDataOutput()),
-                            this, keyPtr, nullptr, aCallbackArgument,
+                            this, keyPtr, nullptr, false, aCallbackArgument,
                             m_tcrdm.get());
   TcrMessageReply reply(true, m_tcrdm.get());
   err = m_tcrdm->sendSyncRequest(request, reply);
@@ -1096,8 +1008,8 @@
 
   // do TCR remove
   TcrMessageDestroy request(new DataOutput(m_cacheImpl->createDataOutput()),
-                            this, keyPtr, cvalue, aCallbackArgument,
-                            m_tcrdm.get());
+                            this, keyPtr, cvalue, cvalue == nullptr,
+                            aCallbackArgument, m_tcrdm.get());
   TcrMessageReply reply(true, m_tcrdm.get());
   err = m_tcrdm->sendSyncRequest(request, reply);
   if (err != GF_NOERR) {
@@ -1139,7 +1051,7 @@
 
   // do TCR remove
   TcrMessageDestroy request(new DataOutput(m_cacheImpl->createDataOutput()),
-                            this, keyPtr, nullptr, aCallbackArgument,
+                            this, keyPtr, nullptr, false, aCallbackArgument,
                             m_tcrdm.get());
   TcrMessageReply reply(true, m_tcrdm.get());
   err = m_tcrdm->sendSyncRequest(request, reply);
@@ -1913,7 +1825,7 @@
       std::make_shared<VersionedCacheableObjectPartList>(this, responseLock);
   // need to check
   ChunkedRemoveAllResponse* resultCollector(new ChunkedRemoveAllResponse(
-      shared_from_this(), reply, responseLock, versionedObjPartList));
+      shared_from_this(), reply, versionedObjPartList));
   reply.setChunkedResultHandler(resultCollector);
 
   err = m_tcrdm->sendSyncRequest(request, reply);
@@ -2028,6 +1940,23 @@
   return retVal;
 }
 
+void ThinClientRegion::clearKeysOfInterest() {
+  if (!getAttributes().getCachingEnabled()) {
+    return;
+  }
+
+  clearKeysOfInterestRegex(m_interestListRegex);
+  clearKeysOfInterestRegex(m_interestListRegexForUpdatesAsInvalidates);
+  clearKeysOfInterestRegex(m_durableInterestListRegex);
+  clearKeysOfInterestRegex(m_durableInterestListRegexForUpdatesAsInvalidates);
+
+  LocalRegion::clearKeysOfInterest(m_interestList);
+  LocalRegion::clearKeysOfInterest(m_interestListForUpdatesAsInvalidates);
+  LocalRegion::clearKeysOfInterest(m_durableInterestList);
+  LocalRegion::clearKeysOfInterest(
+      m_durableInterestListForUpdatesAsInvalidates);
+}
+
 GfErrType ThinClientRegion::registerKeys(TcrEndpoint* endpoint,
                                          const TcrMessage* request,
                                          TcrMessageReply* reply) {
@@ -2219,46 +2148,41 @@
     TcrMessageReply* reply) {
   RegionGlobalLocks acquireLocksRedundancy(this, false);
   RegionGlobalLocks acquireLocksFailover(this);
-  CHECK_DESTROY_PENDING_NOTHROW(TryReadGuard);
-  GfErrType err = GF_NOERR;
+  CHECK_DESTROY_PENDING_NOTHROW(shared_lock);
+  auto err = GF_NOERR;
 
   std::lock_guard<decltype(m_keysLock)> keysGuard(m_keysLock);
   if (keys.empty()) {
     return err;
   }
 
-  TcrMessageReply replyLocal(true, m_tcrdm.get());
-  bool needToCreateRC = true;
-  if (reply == nullptr) {
-    reply = &replyLocal;
-  } else {
-    needToCreateRC = false;
-  }
-
-  LOGDEBUG("ThinClientRegion::registerKeysNoThrow : interestpolicy is %d",
-           interestPolicy.ordinal);
+  LOGDEBUG("ThinClientRegion::registerKeysNoThrow : interestPolicy is %d",
+           interestPolicy);
 
   TcrMessageRegisterInterestList request(
       new DataOutput(m_cacheImpl->createDataOutput()), this, keys, isDurable,
       getAttributes().getCachingEnabled(), receiveValues, interestPolicy,
       m_tcrdm.get());
+
   std::recursive_mutex responseLock;
-  TcrChunkedResult* resultCollector = nullptr;
-  if (interestPolicy.ordinal == InterestResultPolicy::KEYS_VALUES.ordinal) {
-    auto values = std::make_shared<HashMapOfCacheable>();
-    auto exceptions = std::make_shared<HashMapOfException>();
-    MapOfUpdateCounters trackers;
-    int32_t destroyTracker = 1;
-    if (needToCreateRC) {
-      resultCollector = (new ChunkedGetAllResponse(
-          request, this, &keys, values, exceptions, nullptr, trackers,
-          destroyTracker, true, responseLock));
-      reply->setChunkedResultHandler(resultCollector);
-    }
-  } else {
-    if (needToCreateRC) {
-      resultCollector = (new ChunkedInterestResponse(request, nullptr, *reply));
-      reply->setChunkedResultHandler(resultCollector);
+  std::unique_ptr<TcrChunkedResult> resultCollector;
+  TcrMessageReply replyLocal(true, m_tcrdm.get());
+  if (!reply) {
+    reply = &replyLocal;
+    if (interestPolicy == InterestResultPolicy::KEYS_VALUES) {
+      auto values = std::make_shared<HashMapOfCacheable>();
+      auto exceptions = std::make_shared<HashMapOfException>();
+      MapOfUpdateCounters trackers;
+      int32_t destroyTracker = 1;
+      resultCollector =
+          std::unique_ptr<TcrChunkedResult>(new ChunkedGetAllResponse(
+              request, this, &keys, values, exceptions, nullptr, trackers,
+              destroyTracker, true, responseLock));
+      reply->setChunkedResultHandler(resultCollector.get());
+    } else {
+      resultCollector = std::unique_ptr<TcrChunkedResult>(
+          new ChunkedInterestResponse(request, nullptr, *reply));
+      reply->setChunkedResultHandler(resultCollector.get());
     }
   }
 
@@ -2274,15 +2198,12 @@
           endpoint->name().c_str());
     } else if (attemptFailover) {
       addKeys(keys, isDurable, receiveValues, interestPolicy);
-      if (!(interestPolicy.ordinal ==
-            InterestResultPolicy::KEYS_VALUES.ordinal)) {
+      if (interestPolicy != InterestResultPolicy::KEYS_VALUES) {
         localInvalidateForRegisterInterest(keys);
       }
     }
   }
-  if (needToCreateRC) {
-    delete resultCollector;
-  }
+
   return err;
 }
 
@@ -2291,8 +2212,8 @@
     bool attemptFailover) {
   RegionGlobalLocks acquireLocksRedundancy(this, false);
   RegionGlobalLocks acquireLocksFailover(this);
-  CHECK_DESTROY_PENDING_NOTHROW(TryReadGuard);
-  GfErrType err = GF_NOERR;
+  CHECK_DESTROY_PENDING_NOTHROW(shared_lock);
+  auto err = GF_NOERR;
   std::lock_guard<decltype(m_keysLock)> keysGuard(m_keysLock);
   TcrMessageReply reply(true, m_tcrdm.get());
   if (keys.empty()) {
@@ -2307,8 +2228,8 @@
   }
 
   TcrMessageUnregisterInterestList request(
-      new DataOutput(m_cacheImpl->createDataOutput()), this, keys, false, true,
-      InterestResultPolicy::NONE, m_tcrdm.get());
+      new DataOutput(m_cacheImpl->createDataOutput()), this, keys, false,
+      m_tcrdm.get());
   err = m_tcrdm->sendSyncRequestRegisterInterest(request, reply);
   if (err == GF_NOERR /*|| err == GF_CACHE_REDUNDANCY_FAILURE*/) {
     if (attemptFailover) {
@@ -2328,7 +2249,7 @@
     bool attemptFailover) {
   RegionGlobalLocks acquireLocksRedundancy(this, false);
   RegionGlobalLocks acquireLocksFailover(this);
-  GfErrType err = GF_NOERR;
+  auto err = GF_NOERR;
   std::lock_guard<decltype(m_keysLock)> keysGuard(m_keysLock);
   TcrMessageReply reply(true, m_tcrdm.get());
   if (keys.empty()) {
@@ -2343,8 +2264,8 @@
   }
 
   TcrMessageUnregisterInterestList request(
-      new DataOutput(m_cacheImpl->createDataOutput()), this, keys, false, true,
-      InterestResultPolicy::NONE, m_tcrdm.get());
+      new DataOutput(m_cacheImpl->createDataOutput()), this, keys, false,
+      m_tcrdm.get());
   err = m_tcrdm->sendSyncRequestRegisterInterest(request, reply);
   if (err == GF_NOERR) {
     if (attemptFailover) {
@@ -2362,7 +2283,7 @@
 bool ThinClientRegion::isRegexRegistered(
     std::unordered_map<std::string, InterestResultPolicy>& interestListRegex,
     const std::string& regex, bool allKeys) {
-  if (interestListRegex.find(".*") != interestListRegex.end() ||
+  if (interestListRegex.find(kAllKeysRegex) != interestListRegex.end() ||
       (!allKeys && interestListRegex.find(regex) != interestListRegex.end())) {
     return true;
   }
@@ -2377,10 +2298,10 @@
     TcrMessageReply* reply) {
   RegionGlobalLocks acquireLocksRedundancy(this, false);
   RegionGlobalLocks acquireLocksFailover(this);
-  CHECK_DESTROY_PENDING_NOTHROW(TryReadGuard);
-  GfErrType err = GF_NOERR;
+  CHECK_DESTROY_PENDING_NOTHROW(shared_lock);
+  auto err = GF_NOERR;
 
-  bool allKeys = (regex == ".*");
+  const auto allKeys = regex == kAllKeysRegex;
   std::lock_guard<decltype(m_keysLock)> keysGuard(m_keysLock);
 
   if (attemptFailover) {
@@ -2396,64 +2317,51 @@
     }
   }
 
-  ChunkedInterestResponse* resultCollector = nullptr;
-  ChunkedGetAllResponse* getAllResultCollector = nullptr;
-  if (reply != nullptr) {
-    // need to check
-    resultCollector = dynamic_cast<ChunkedInterestResponse*>(
-        reply->getChunkedResultHandler());
-    if (resultCollector != nullptr) {
-      resultKeys = resultCollector->getResultKeys();
-    } else {
-      getAllResultCollector = dynamic_cast<ChunkedGetAllResponse*>(
-          reply->getChunkedResultHandler());
-      resultKeys = getAllResultCollector->getResultKeys();
-    }
-  }
+  LOGDEBUG("ThinClientRegion::registerRegexNoThrow : interestPolicy is %d",
+           interestPolicy);
 
-  bool isRCCreatedLocally = false;
-  LOGDEBUG("ThinClientRegion::registerRegexNoThrow : interestpolicy is %d",
-           interestPolicy.ordinal);
+  TcrMessageRegisterInterestRegex request(
+      new DataOutput(m_cacheImpl->createDataOutput()), m_fullPath, regex,
+      interestPolicy, isDurable, getAttributes().getCachingEnabled(),
+      receiveValues, m_tcrdm.get());
 
-  // TODO:
-  TcrMessageRegisterInterest request(
-      new DataOutput(m_cacheImpl->createDataOutput()), m_fullPath,
-      regex.c_str(), interestPolicy, isDurable,
-      getAttributes().getCachingEnabled(), receiveValues, m_tcrdm.get());
   std::recursive_mutex responseLock;
-  if (reply == nullptr) {
-    TcrMessageReply replyLocal(true, m_tcrdm.get());
-    auto values = std::make_shared<HashMapOfCacheable>();
-    auto exceptions = std::make_shared<HashMapOfException>();
-
+  std::unique_ptr<TcrChunkedResult> resultCollector;
+  TcrMessageReply replyLocal(true, m_tcrdm.get());
+  if (reply) {
+    if (auto chunkedInterestResponse = dynamic_cast<ChunkedInterestResponse*>(
+            reply->getChunkedResultHandler())) {
+      resultKeys = chunkedInterestResponse->getResultKeys();
+    } else if (auto chunkedGetAllResponse =
+                   dynamic_cast<ChunkedGetAllResponse*>(
+                       reply->getChunkedResultHandler())) {
+      resultKeys = chunkedGetAllResponse->getResultKeys();
+    }
+  } else {
     reply = &replyLocal;
-    if (interestPolicy.ordinal == InterestResultPolicy::KEYS_VALUES.ordinal) {
+    if (!resultKeys) {
+      resultKeys =
+          std::make_shared<std::vector<std::shared_ptr<CacheableKey>>>();
+    }
+    if (interestPolicy == InterestResultPolicy::KEYS_VALUES) {
+      auto values = std::make_shared<HashMapOfCacheable>();
+      auto exceptions = std::make_shared<HashMapOfException>();
       MapOfUpdateCounters trackers;
       int32_t destroyTracker = 1;
-      if (resultKeys == nullptr) {
-        resultKeys =
-            std::shared_ptr<std::vector<std::shared_ptr<CacheableKey>>>(
-                new std::vector<std::shared_ptr<CacheableKey>>());
-      }
-      // need to check
-      getAllResultCollector = (new ChunkedGetAllResponse(
-          request, this, nullptr, values, exceptions, resultKeys, trackers,
-          destroyTracker, true, responseLock));
-      reply->setChunkedResultHandler(getAllResultCollector);
-      isRCCreatedLocally = true;
-    } else {
-      isRCCreatedLocally = true;
-      // need to check
       resultCollector =
-          new ChunkedInterestResponse(request, resultKeys, replyLocal);
-      reply->setChunkedResultHandler(resultCollector);
+          std::unique_ptr<TcrChunkedResult>(new ChunkedGetAllResponse(
+              request, this, nullptr, values, exceptions, resultKeys, trackers,
+              destroyTracker, true, responseLock));
+    } else {
+      resultCollector = std::unique_ptr<TcrChunkedResult>(
+          new ChunkedInterestResponse(request, resultKeys, *reply));
     }
-    err = m_tcrdm->sendSyncRequestRegisterInterest(
-        request, replyLocal, attemptFailover, this, endpoint);
-  } else {
-    err = m_tcrdm->sendSyncRequestRegisterInterest(
-        request, *reply, attemptFailover, this, endpoint);
+    reply->setChunkedResultHandler(resultCollector.get());
   }
+
+  err = m_tcrdm->sendSyncRequestRegisterInterest(
+      request, *reply, attemptFailover, this, endpoint);
+
   if (err == GF_NOERR /*|| err == GF_CACHE_REDUNDANCY_FAILURE*/) {
     if (reply->getMessageType() == TcrMessage::RESPONSE_FROM_SECONDARY &&
         endpoint) {
@@ -2463,26 +2371,18 @@
           endpoint->name().c_str());
     } else if (attemptFailover) {
       addRegex(regex, isDurable, receiveValues, interestPolicy);
-      if (interestPolicy.ordinal != InterestResultPolicy::KEYS_VALUES.ordinal) {
+      if (interestPolicy != InterestResultPolicy::KEYS_VALUES) {
         if (allKeys) {
           localInvalidateRegion_internal();
         } else {
-          const std::shared_ptr<std::vector<std::shared_ptr<CacheableKey>>>&
-              keys = resultCollector != nullptr
-                         ? resultCollector->getResultKeys()
-                         : getAllResultCollector->getResultKeys();
-          if (keys != nullptr) {
-            localInvalidateForRegisterInterest(*keys);
+          if (resultKeys) {
+            localInvalidateForRegisterInterest(*resultKeys);
           }
         }
       }
     }
   }
 
-  if (isRCCreatedLocally == true) {
-    if (resultCollector != nullptr) delete resultCollector;
-    if (getAllResultCollector != nullptr) delete getAllResultCollector;
-  }
   return err;
 }
 
@@ -2490,16 +2390,16 @@
                                                    bool attemptFailover) {
   RegionGlobalLocks acquireLocksRedundancy(this, false);
   RegionGlobalLocks acquireLocksFailover(this);
-  CHECK_DESTROY_PENDING_NOTHROW(TryReadGuard);
-  GfErrType err = GF_NOERR;
+  CHECK_DESTROY_PENDING_NOTHROW(shared_lock);
+  auto err = GF_NOERR;
 
   err = findRegex(regex);
 
   if (err == GF_NOERR) {
     TcrMessageReply reply(false, m_tcrdm.get());
-    TcrMessageUnregisterInterest request(
+    TcrMessageUnregisterInterestRegex request(
         new DataOutput(m_cacheImpl->createDataOutput()), m_fullPath, regex,
-        InterestResultPolicy::NONE, false, true, m_tcrdm.get());
+        false, m_tcrdm.get());
     err = m_tcrdm->sendSyncRequestRegisterInterest(request, reply);
     if (err == GF_NOERR /*|| err == GF_CACHE_REDUNDANCY_FAILURE*/) {
       if (attemptFailover) {
@@ -2543,9 +2443,9 @@
 
   if (err == GF_NOERR) {
     TcrMessageReply reply(false, m_tcrdm.get());
-    TcrMessageUnregisterInterest request(
+    TcrMessageUnregisterInterestRegex request(
         new DataOutput(m_cacheImpl->createDataOutput()), m_fullPath, regex,
-        InterestResultPolicy::NONE, false, true, m_tcrdm.get());
+        false, m_tcrdm.get());
     err = m_tcrdm->sendSyncRequestRegisterInterest(request, reply);
     if (err == GF_NOERR) {
       if (attemptFailover) {
@@ -2592,7 +2492,7 @@
           : (receiveValues ? m_interestListRegex
                            : m_interestListRegexForUpdatesAsInvalidates);
 
-  if (regex == ".*") {
+  if (regex == kAllKeysRegex) {
     interestListRegex.clear();
     interestList.clear();
   }
@@ -2606,7 +2506,7 @@
   auto nthis = const_cast<ThinClientRegion*>(this);
   RegionGlobalLocks acquireLocksRedundancy(nthis, false);
   RegionGlobalLocks acquireLocksFailover(nthis);
-  CHECK_DESTROY_PENDING(TryReadGuard, getInterestList);
+  CHECK_DESTROY_PENDING(shared_lock, getInterestList);
   std::lock_guard<decltype(m_keysLock)> keysGuard(nthis->m_keysLock);
 
   std::vector<std::shared_ptr<CacheableKey>> vlist;
@@ -2629,7 +2529,7 @@
   auto nthis = const_cast<ThinClientRegion*>(this);
   RegionGlobalLocks acquireLocksRedundancy(nthis, false);
   RegionGlobalLocks acquireLocksFailover(nthis);
-  CHECK_DESTROY_PENDING(TryReadGuard, getInterestListRegex);
+  CHECK_DESTROY_PENDING(shared_lock, getInterestListRegex);
   std::lock_guard<decltype(m_keysLock)> keysGuard(nthis->m_keysLock);
 
   std::vector<std::shared_ptr<CacheableString>> vlist;
@@ -2650,7 +2550,7 @@
   return vlist;
 }
 
-GfErrType ThinClientRegion::clientNotificationHandler(TcrMessage& msg) {
+GfErrType ThinClientRegion::clientNotificationHandler(const TcrMessage& msg) {
   GfErrType err = GF_NOERR;
   std::shared_ptr<Cacheable> oldValue;
   switch (msg.getMessageType()) {
@@ -2702,11 +2602,16 @@
       LocalRegion::tombstoneOperationNoThrow(msg.getTombstoneVersions(),
                                              msg.getTombstoneKeys());
       break;
-    default: {
-      if (TcrMessage::getAllEPDisMess() == &msg) {
+    default:
+      try {
+        auto& marker =
+            dynamic_cast<const TcrMessageAllEndpointsDisconnectedMarker&>(msg);
         setProcessedMarker(false);
+        LOGDEBUG(
+            "ThinClientRegion::clientNotificationHandler: rec'd endpoints "
+            "disconnected message");
         LocalRegion::invokeAfterAllEndPointDisconnected();
-      } else {
+      } catch (std::bad_cast&) {
         LOGERROR(
             "Unknown message type %d in subscription event handler; possible "
             "serialization mismatch",
@@ -2714,13 +2619,12 @@
         err = GF_MSG;
       }
       break;
-    }
   }
 
   // Update EventIdMap to mark event processed, Only for durable client.
   // In case of closing, don't send it as listener might not be invoked.
   if (!m_destroyPending && (m_isDurableClnt || msg.hasDelta()) &&
-      TcrMessage::getAllEPDisMess() != &msg) {
+      msg.getMessageType() != TcrMessage::INVALID) {
     m_tcrdm->checkDupAndAdd(msg.getEventId());
   }
 
@@ -2753,12 +2657,12 @@
                                "TransactionDataNodeHasDepartedException") !=
              std::string::npos) {
     error = GF_TRANSACTION_DATA_NODE_HAS_DEPARTED_EXCEPTION;
-  } else if (exceptionMsg.find(
-                 "org.apache.geode.cache.TransactionDataRebalancedException") !=
+  } else if (exceptionMsg.find("org.apache.geode.cache."
+                               "TransactionDataRebalancedException") !=
              std::string::npos) {
     error = GF_TRANSACTION_DATA_REBALANCED_EXCEPTION;
-  } else if (exceptionMsg.find(
-                 "org.apache.geode.security.AuthenticationRequiredException") !=
+  } else if (exceptionMsg.find("org.apache.geode.security."
+                               "AuthenticationRequiredException") !=
              std::string::npos) {
     error = GF_AUTHENTICATION_REQUIRED_EXCEPTION;
   } else if (exceptionMsg.find("org.apache.geode.cache.LowMemoryException") !=
@@ -2782,27 +2686,23 @@
   return error;
 }
 
-void ThinClientRegion::receiveNotification(TcrMessage* msg) {
+void ThinClientRegion::receiveNotification(const TcrMessage& msg) {
   std::unique_lock<std::mutex> lock(m_notificationMutex, std::defer_lock);
   {
-    TryReadGuard guard(m_rwLock, m_destroyPending);
+    boost::shared_lock<decltype(mutex_)> guard{mutex_};
     if (m_destroyPending) {
-      if (msg != TcrMessage::getAllEPDisMess()) {
-        _GEODE_SAFE_DELETE(msg);
-      }
       return;
     }
     lock.lock();
   }
 
-  if (msg->getMessageType() == TcrMessage::CLIENT_MARKER) {
+  if (msg.getMessageType() == TcrMessage::CLIENT_MARKER) {
     handleMarker();
   } else {
-    clientNotificationHandler(*msg);
+    clientNotificationHandler(msg);
   }
 
   lock.unlock();
-  if (TcrMessage::getAllEPDisMess() != msg) _GEODE_SAFE_DELETE(msg);
 }
 
 void ThinClientRegion::localInvalidateRegion_internal() {
@@ -2832,8 +2732,7 @@
 }
 
 void ThinClientRegion::localInvalidateFailover() {
-  CHECK_DESTROY_PENDING(TryReadGuard,
-                        ThinClientRegion::localInvalidateFailover);
+  CHECK_DESTROY_PENDING(shared_lock, ThinClientRegion::localInvalidateFailover);
 
   //  No need to invalidate from the "m_xxxForUpdatesAsInvalidates" lists?
   if (m_interestListRegex.empty() && m_durableInterestListRegex.empty()) {
@@ -2846,7 +2745,7 @@
 
 void ThinClientRegion::localInvalidateForRegisterInterest(
     const std::vector<std::shared_ptr<CacheableKey>>& keys) {
-  CHECK_DESTROY_PENDING(TryReadGuard,
+  CHECK_DESTROY_PENDING(shared_lock,
                         ThinClientRegion::localInvalidateForRegisterInterest);
 
   if (!m_regionAttributes.getCachingEnabled()) {
@@ -2878,22 +2777,6 @@
   return interestPolicy;
 }
 
-void ThinClientRegion::registerInterestGetValues(
-    const char* method, const std::vector<std::shared_ptr<CacheableKey>>* keys,
-    const std::shared_ptr<std::vector<std::shared_ptr<CacheableKey>>>&
-        resultKeys) {
-  auto exceptions = std::make_shared<HashMapOfException>();
-  auto err = getAllNoThrow_remote(keys, nullptr, exceptions, resultKeys, true,
-                                  nullptr);
-  throwExceptionIfError(method, err);
-  // log any exceptions here
-  for (const auto& iter : *exceptions) {
-    LOGWARN("%s Exception for key %s:: %s: %s", method,
-            Utils::nullSafeToString(iter.first).c_str(),
-            iter.second->getName().c_str(), iter.second->what());
-  }
-}
-
 void ThinClientRegion::destroyDM(bool keepEndpoints) {
   if (m_tcrdm != nullptr) {
     m_tcrdm->destroy(keepEndpoints);
@@ -2910,6 +2793,8 @@
     lock.lock();
   }
 
+  // TODO suspect
+  // NOLINTNEXTLINE(clang-analyzer-optin.cplusplus.VirtualCall)
   destroyDM(invokeCallbacks);
 
   m_interestList.clear();
@@ -2926,8 +2811,10 @@
 }
 
 ThinClientRegion::~ThinClientRegion() noexcept {
-  TryWriteGuard guard(m_rwLock, m_destroyPending);
+  boost::unique_lock<decltype(mutex_)> guard{mutex_};
   if (!m_destroyPending) {
+    // TODO suspect
+    // NOLINTNEXTLINE(clang-analyzer-optin.cplusplus.VirtualCall)
     release(false);
   }
 }
@@ -3009,7 +2896,8 @@
       } else if (err == GF_NOTCON) {
         attempt++;
         LOGDEBUG(
-            "ThinClientRegion::executeFunction with GF_NOTCON retry attempt = "
+            "ThinClientRegion::executeFunction with GF_NOTCON retry attempt "
+            "= "
             "%d ",
             attempt);
         if (attempt > retryAttempts) {
@@ -3094,7 +2982,8 @@
         failedNodes->clear();
         if (failedNodesIds) {
           LOGDEBUG(
-              "ThinClientRegion::reExecuteFunction with GF_FUNCTION_EXCEPTION "
+              "ThinClientRegion::reExecuteFunction with "
+              "GF_FUNCTION_EXCEPTION "
               "failedNodesIds size = %zu ",
               failedNodesIds->size());
           failedNodes->insert(failedNodesIds->begin(), failedNodesIds->end());
@@ -3165,7 +3054,6 @@
 
     if (err != GF_NOERR) {
       if (err == GF_FUNCTION_EXCEPTION) {
-        reExecute = true;
         if (auto poolDM =
                 std::dynamic_pointer_cast<ThinClientPoolDM>(m_tcrdm)) {
           if (poolDM->getClientMetaDataService()) {
@@ -3173,24 +3061,30 @@
                 this->getFullPath(), 0);
           }
         }
-        worker->getResultCollector()->reset();
-        {
-          std::lock_guard<decltype(*resultCollectorLock)> guard(
-              *resultCollectorLock);
-          rc->clearResults();
-        }
-        std::shared_ptr<CacheableHashSet> failedNodeIds(
-            currentReply->getFailedNode());
-        if (failedNodeIds) {
-          LOGDEBUG(
-              "ThinClientRegion::executeFunctionSH with GF_FUNCTION_EXCEPTION "
-              "failedNodeIds size = %zu ",
-              failedNodeIds->size());
-          failedNodes->insert(failedNodeIds->begin(), failedNodeIds->end());
+
+        if (!(getResult & 1) && abortError == GF_NOERR) {  // isHA = false
+          abortError = err;
+        } else if (getResult & 1) {  // isHA = true
+          reExecute = true;
+          worker->getResultCollector()->reset();
+          {
+            std::lock_guard<decltype(*resultCollectorLock)> guard(
+                *resultCollectorLock);
+            rc->clearResults();
+          }
+          std::shared_ptr<CacheableHashSet> failedNodeIds(
+              currentReply->getFailedNode());
+          if (failedNodeIds) {
+            LOGDEBUG(
+                "ThinClientRegion::executeFunctionSH with "
+                "GF_FUNCTION_EXCEPTION "
+                "failedNodeIds size = %zu ",
+                failedNodeIds->size());
+            failedNodes->insert(failedNodeIds->begin(), failedNodeIds->end());
+          }
         }
       } else if ((err == GF_NOTCON) || (err == GF_CLIENT_WAIT_TIMEOUT) ||
                  (err == GF_CLIENT_WAIT_TIMEOUT_REFRESH_PRMETADATA)) {
-        reExecute = true;
         LOGINFO(
             "ThinClientRegion::executeFunctionSH with GF_NOTCON or "
             "GF_CLIENT_WAIT_TIMEOUT ");
@@ -3201,11 +3095,17 @@
                 this->getFullPath(), 0);
           }
         }
-        worker->getResultCollector()->reset();
-        {
-          std::lock_guard<decltype(*resultCollectorLock)> guard(
-              *resultCollectorLock);
-          rc->clearResults();
+
+        if (!(getResult & 1) && abortError == GF_NOERR) {  // isHA = false
+          abortError = err;
+        } else if (getResult & 1) {  // isHA = true
+          reExecute = true;
+          worker->getResultCollector()->reset();
+          {
+            std::lock_guard<decltype(*resultCollectorLock)> guard(
+                *resultCollectorLock);
+            rc->clearResults();
+          }
         }
       } else {
         if (ThinClientBaseDM::isFatalClientError(err)) {
@@ -3224,6 +3124,7 @@
   if (abortError != GF_NOERR) {
     throwExceptionIfError("ExecuteOnRegion:", abortError);
   }
+
   return reExecute;
 }
 
@@ -3314,6 +3215,9 @@
 }
 
 void ThinClientRegion::setProcessedMarker(bool) {}
+boost::shared_mutex& ThinClientRegion::getMetadataMutex() {
+  return region_mutex_;
+}
 
 void ChunkedInterestResponse::reset() {
   if (m_resultKeys != nullptr && m_resultKeys->size() > 0) {
@@ -3407,12 +3311,14 @@
           if (arrayType != DSFid::CacheableObjectPartList) {
             LOGERROR(
                 "Query response got unhandled message format %d while "
-                "expecting struct set object part list; possible serialization "
+                "expecting struct set object part list; possible "
+                "serialization "
                 "mismatch",
                 arrayType);
             throw MessageException(
                 "Query response got unhandled message format while expecting "
-                "struct set object part list; possible serialization mismatch");
+                "struct set object part list; possible serialization "
+                "mismatch");
           }
           readObjectPartList(input, true);
         } else {
@@ -3533,7 +3439,8 @@
           "object part list; possible serialization mismatch",
           arrayType);
       throw MessageException(
-          "Query response got unhandled message format while expecting object "
+          "Query response got unhandled message format while expecting "
+          "object "
           "part list; possible serialization mismatch");
     }
     readObjectPartList(input, isResultSet);
@@ -3598,9 +3505,9 @@
     return;
   }
 
-  auto startLen = static_cast<size_t>(
-      input.getBytesRead() -
-      1);  // from here need to look value part + memberid AND -1 for array type
+  // from here need to look value part + memberid AND -1 for array type
+  auto startLen = static_cast<size_t>(input.getBytesRead() - 1);
+
   // read and ignore array length
   input.readArrayLength();
 
@@ -3613,7 +3520,8 @@
   const int SECURE_PART_LEN = 5 + 8;
   bool readPart = true;
   LOGDEBUG(
-      "ChunkedFunctionExecutionResponse::handleChunk chunkLen = %d & partLen = "
+      "ChunkedFunctionExecutionResponse::handleChunk chunkLen = %d & partLen "
+      "= "
       "%d ",
       chunkLen, partLen);
   if (partType == DSCode::JavaSerializable) {
@@ -3634,7 +3542,8 @@
       // skip first part i.e JavaSerializable.
       TcrMessageHelper::skipParts(m_msg, input, 1);
 
-      // read the second part which is string in usual manner, first its length.
+      // read the second part which is string in usual manner, first its
+      // length.
       partLen = input.readInt32();
 
       // then isObject byte
@@ -3643,8 +3552,8 @@
       startLen = input.getBytesRead();  // reset from here need to look value
       // part + memberid AND -1 for array type
 
-      // Since it is contained as a part of other results, read arrayType which
-      // is arrayList = 65.
+      // Since it is contained as a part of other results, read arrayType
+      // which is arrayList = 65.
       input.read();
 
       // read and ignore its len which is 2
@@ -3884,11 +3793,8 @@
   input.readInt32();
   if (!input.readBoolean()) {
     // we're currently always expecting an object
-    char exMsg[256];
-    std::snprintf(
-        exMsg, 255,
+    throw MessageException(
         "ChunkedDurableCQListResponse::handleChunk: part is not object");
-    throw MessageException(exMsg);
   }
 
   input.advanceCursor(1);  // skip the CacheableArrayList type ID byte
diff --git a/cppcache/src/ThinClientRegion.hpp b/cppcache/src/ThinClientRegion.hpp
index f62bee9..03f6c8a 100644
--- a/cppcache/src/ThinClientRegion.hpp
+++ b/cppcache/src/ThinClientRegion.hpp
@@ -48,7 +48,7 @@
  * region. It will inherit from DistributedRegion and overload some methods
  *
  */
-class APACHE_GEODE_EXPORT ThinClientRegion : public LocalRegion {
+class ThinClientRegion : public LocalRegion {
  public:
   /**
    * @brief constructor/initializer/destructor
@@ -133,7 +133,7 @@
   std::vector<std::shared_ptr<CacheableString>> getInterestListRegex()
       const override;
 
-  void receiveNotification(TcrMessage* msg);
+  void receiveNotification(const TcrMessage& msg);
 
   static GfErrType handleServerException(const std::string& func,
                                          const std::string& exceptionMsg);
@@ -170,7 +170,7 @@
   GfErrType getFuncAttributes(const std::string& func,
                               std::shared_ptr<std::vector<int8_t>>* attr);
 
-  ACE_RW_Thread_Mutex& getMataDataMutex() { return m_RegionMutex; }
+  boost::shared_mutex& getMetadataMutex();
 
   bool const& getMetaDataRefreshed() { return m_isMetaDataRefreshed; }
 
@@ -191,6 +191,8 @@
              const std::shared_ptr<Serializable>& callBack,
              std::shared_ptr<VersionTag> versionTag) override;
 
+  void clearKeysOfInterest();
+
  protected:
   GfErrType getNoThrow_remote(
       const std::shared_ptr<CacheableKey>& keyPtr,
@@ -257,7 +259,7 @@
                                    bool attemptFailover = true);
   GfErrType unregisterRegexNoThrowLocalDestroy(const std::string& regex,
                                                bool attemptFailover = true);
-  GfErrType clientNotificationHandler(TcrMessage& msg);
+  GfErrType clientNotificationHandler(const TcrMessage& msg);
 
   virtual void localInvalidateRegion_internal();
 
@@ -275,7 +277,7 @@
   bool isDurableClient() { return m_isDurableClnt; }
   std::shared_ptr<ThinClientBaseDM> m_tcrdm;
   std::recursive_mutex m_keysLock;
-  mutable ACE_RW_Thread_Mutex m_rwDestroyLock;
+  mutable boost::shared_mutex destroy_mutex_;
   std::unordered_map<std::shared_ptr<CacheableKey>, InterestResultPolicy>
       m_interestList;
   std::unordered_map<std::string, InterestResultPolicy> m_interestListRegex;
@@ -321,12 +323,6 @@
       const std::shared_ptr<CacheableKey>& keyPtr,
       const std::shared_ptr<Cacheable>& cvalue,
       const std::shared_ptr<Serializable>& aCallbackArgument);
-  // method to get the values for a register interest
-  void registerInterestGetValues(
-      const char* method,
-      const std::vector<std::shared_ptr<CacheableKey>>* keys,
-      const std::shared_ptr<std::vector<std::shared_ptr<CacheableKey>>>&
-          resultKeys);
   GfErrType getNoThrow_FullObject(
       std::shared_ptr<EventId> eventId, std::shared_ptr<Cacheable>& fullObject,
       std::shared_ptr<VersionTag>& versionTag) override;
@@ -352,7 +348,7 @@
       std::shared_ptr<VersionedCacheableObjectPartList>& versionedObjPartList,
       const std::shared_ptr<Serializable>& aCallbackArgument = nullptr);
 
-  ACE_RW_Thread_Mutex m_RegionMutex;
+  boost::shared_mutex region_mutex_;
   bool m_isMetaDataRefreshed;
 
   typedef std::unordered_map<
@@ -380,10 +376,6 @@
   TcrMessage& m_replyMsg;
   std::shared_ptr<std::vector<std::shared_ptr<CacheableKey>>> m_resultKeys;
 
-  // disabled
-  ChunkedInterestResponse(const ChunkedInterestResponse&);
-  ChunkedInterestResponse& operator=(const ChunkedInterestResponse&);
-
  public:
   inline ChunkedInterestResponse(
       TcrMessage& msg,
@@ -395,15 +387,20 @@
         m_replyMsg(replyMsg),
         m_resultKeys(resultKeys) {}
 
+  ChunkedInterestResponse(const ChunkedInterestResponse&) = delete;
+  ChunkedInterestResponse& operator=(const ChunkedInterestResponse&) = delete;
+
+  ~ChunkedInterestResponse() noexcept override = default;
+
   inline const std::shared_ptr<std::vector<std::shared_ptr<CacheableKey>>>&
   getResultKeys() const {
     return m_resultKeys;
   }
 
-  virtual void handleChunk(const uint8_t* chunk, int32_t chunkLen,
-                           uint8_t isLastChunkWithSecurity,
-                           const CacheImpl* cacheImpl);
-  virtual void reset();
+  void handleChunk(const uint8_t* chunk, int32_t chunkLen,
+                   uint8_t isLastChunkWithSecurity,
+                   const CacheImpl* cacheImpl) override;
+  virtual void reset() override;
 };
 
 /**
@@ -419,16 +416,17 @@
 
   void skipClass(DataInput& input);
 
-  // disabled
-  ChunkedQueryResponse(const ChunkedQueryResponse&);
-  ChunkedQueryResponse& operator=(const ChunkedQueryResponse&);
-
  public:
   inline explicit ChunkedQueryResponse(TcrMessage& msg)
       : TcrChunkedResult(),
         m_msg(msg),
         m_queryResults(CacheableVector::create()) {}
 
+  ChunkedQueryResponse(const ChunkedQueryResponse&) = delete;
+  ChunkedQueryResponse& operator=(const ChunkedQueryResponse&) = delete;
+
+  ~ChunkedQueryResponse() noexcept override = default;
+
   inline const std::shared_ptr<CacheableVector>& getQueryResults() const {
     return m_queryResults;
   }
@@ -437,10 +435,10 @@
     return m_structFieldNames;
   }
 
-  virtual void handleChunk(const uint8_t* chunk, int32_t chunkLen,
-                           uint8_t isLastChunkWithSecurity,
-                           const CacheImpl* cacheImpl);
-  virtual void reset();
+  void handleChunk(const uint8_t* chunk, int32_t chunkLen,
+                   uint8_t isLastChunkWithSecurity,
+                   const CacheImpl* cacheImpl) override;
+  void reset() override;
 
   void readObjectPartList(DataInput& input, bool isResultSet);
 };
@@ -458,11 +456,6 @@
   std::shared_ptr<ResultCollector> m_rc;
   std::shared_ptr<std::recursive_mutex> m_resultCollectorLock;
 
-  // disabled
-  ChunkedFunctionExecutionResponse(const ChunkedFunctionExecutionResponse&);
-  ChunkedFunctionExecutionResponse& operator=(
-      const ChunkedFunctionExecutionResponse&);
-
  public:
   inline ChunkedFunctionExecutionResponse(TcrMessage& msg, bool getResult,
                                           std::shared_ptr<ResultCollector> rc)
@@ -477,22 +470,19 @@
         m_rc(rc),
         m_resultCollectorLock(resultCollectorLock) {}
 
-  /* inline const std::shared_ptr<CacheableVector>&
-   getFunctionExecutionResults() const
-   {
-     return m_functionExecutionResults;
-   }*/
+  ChunkedFunctionExecutionResponse(const ChunkedFunctionExecutionResponse&) =
+      delete;
+  ChunkedFunctionExecutionResponse& operator=(
+      const ChunkedFunctionExecutionResponse&) = delete;
 
-  /* adongre
-   * CID 28805: Parse warning (PW.USELESS_TYPE_QUALIFIER_ON_RETURN_TYPE)
-   */
-  // inline const bool getResult() const
+  ~ChunkedFunctionExecutionResponse() noexcept override = default;
+
   inline bool getResult() const { return m_getResult; }
 
-  virtual void handleChunk(const uint8_t* chunk, int32_t chunkLen,
-                           uint8_t isLastChunkWithSecurity,
-                           const CacheImpl* cacheImpl);
-  virtual void reset();
+  void handleChunk(const uint8_t* chunk, int32_t chunkLen,
+                   uint8_t isLastChunkWithSecurity,
+                   const CacheImpl* cacheImpl) override;
+  void reset() override;
 };
 
 /**
@@ -513,9 +503,6 @@
   bool m_addToLocalCache;
   uint32_t m_keysOffset;
   std::recursive_mutex& m_responseLock;
-  // disabled
-  ChunkedGetAllResponse(const ChunkedGetAllResponse&);
-  ChunkedGetAllResponse& operator=(const ChunkedGetAllResponse&);
 
  public:
   inline ChunkedGetAllResponse(
@@ -540,10 +527,15 @@
         m_keysOffset(0),
         m_responseLock(responseLock) {}
 
-  virtual void handleChunk(const uint8_t* chunk, int32_t chunkLen,
-                           uint8_t isLastChunkWithSecurity,
-                           const CacheImpl* cacheImpl);
-  virtual void reset();
+  ChunkedGetAllResponse(const ChunkedGetAllResponse&) = delete;
+  ChunkedGetAllResponse& operator=(const ChunkedGetAllResponse&) = delete;
+
+  ~ChunkedGetAllResponse() noexcept override = default;
+
+  void handleChunk(const uint8_t* chunk, int32_t chunkLen,
+                   uint8_t isLastChunkWithSecurity,
+                   const CacheImpl* cacheImpl) override;
+  void reset() override;
 
   void add(const ChunkedGetAllResponse* other);
   bool getAddToLocalCache() { return m_addToLocalCache; }
@@ -565,9 +557,6 @@
   const std::shared_ptr<Region> m_region;
   std::recursive_mutex& m_responseLock;
   std::shared_ptr<VersionedCacheableObjectPartList> m_list;
-  // disabled
-  ChunkedPutAllResponse(const ChunkedPutAllResponse&);
-  ChunkedPutAllResponse& operator=(const ChunkedPutAllResponse&);
 
  public:
   inline ChunkedPutAllResponse(
@@ -580,10 +569,15 @@
         m_responseLock(responseLock),
         m_list(list) {}
 
-  virtual void handleChunk(const uint8_t* chunk, int32_t chunkLen,
-                           uint8_t isLastChunkWithSecurity,
-                           const CacheImpl* cacheImpl);
-  virtual void reset();
+  ChunkedPutAllResponse(const ChunkedPutAllResponse&) = delete;
+  ChunkedPutAllResponse& operator=(const ChunkedPutAllResponse&) = delete;
+
+  ~ChunkedPutAllResponse() noexcept override = default;
+
+  void handleChunk(const uint8_t* chunk, int32_t chunkLen,
+                   uint8_t isLastChunkWithSecurity,
+                   const CacheImpl* cacheImpl) override;
+  void reset() override;
   std::shared_ptr<VersionedCacheableObjectPartList> getList() { return m_list; }
   std::recursive_mutex& getResponseLock() { return m_responseLock; }
 };
@@ -595,29 +589,24 @@
  private:
   TcrMessage& m_msg;
   const std::shared_ptr<Region> m_region;
-  std::recursive_mutex& m_responseLock;
   std::shared_ptr<VersionedCacheableObjectPartList> m_list;
-  // disabled
-  ChunkedRemoveAllResponse(const ChunkedRemoveAllResponse&);
-  ChunkedRemoveAllResponse& operator=(const ChunkedRemoveAllResponse&);
 
  public:
   inline ChunkedRemoveAllResponse(
       const std::shared_ptr<Region>& region, TcrMessage& msg,
-      std::recursive_mutex& responseLock,
       std::shared_ptr<VersionedCacheableObjectPartList>& list)
-      : TcrChunkedResult(),
-        m_msg(msg),
-        m_region(region),
-        m_responseLock(responseLock),
-        m_list(list) {}
+      : TcrChunkedResult(), m_msg(msg), m_region(region), m_list(list) {}
 
-  virtual void handleChunk(const uint8_t* chunk, int32_t chunkLen,
-                           uint8_t isLastChunkWithSecurity,
-                           const CacheImpl* cacheImpl);
-  virtual void reset();
+  ChunkedRemoveAllResponse(const ChunkedRemoveAllResponse&) = delete;
+  ChunkedRemoveAllResponse& operator=(const ChunkedRemoveAllResponse&) = delete;
+
+  ~ChunkedRemoveAllResponse() noexcept override = default;
+
+  void handleChunk(const uint8_t* chunk, int32_t chunkLen,
+                   uint8_t isLastChunkWithSecurity,
+                   const CacheImpl* cacheImpl) override;
+  void reset() override;
   std::shared_ptr<VersionedCacheableObjectPartList> getList() { return m_list; }
-  std::recursive_mutex& getResponseLock() { return m_responseLock; }
 };
 
 /**
@@ -631,10 +620,6 @@
   TcrMessage& m_replyMsg;
   std::vector<std::shared_ptr<CacheableKey>>& m_resultKeys;
 
-  // disabled
-  ChunkedKeySetResponse(const ChunkedKeySetResponse&);
-  ChunkedKeySetResponse& operator=(const ChunkedKeySetResponse&);
-
  public:
   inline ChunkedKeySetResponse(
       TcrMessage& msg, std::vector<std::shared_ptr<CacheableKey>>& resultKeys,
@@ -644,10 +629,15 @@
         m_replyMsg(replyMsg),
         m_resultKeys(resultKeys) {}
 
-  virtual void handleChunk(const uint8_t* chunk, int32_t chunkLen,
-                           uint8_t isLastChunkWithSecurity,
-                           const CacheImpl* cacheImpl);
-  virtual void reset();
+  ChunkedKeySetResponse(const ChunkedKeySetResponse&) = delete;
+  ChunkedKeySetResponse& operator=(const ChunkedKeySetResponse&) = delete;
+
+  ~ChunkedKeySetResponse() noexcept override = default;
+
+  void handleChunk(const uint8_t* chunk, int32_t chunkLen,
+                   uint8_t isLastChunkWithSecurity,
+                   const CacheImpl* cacheImpl) override;
+  void reset() override;
 };
 
 class ChunkedDurableCQListResponse : public TcrChunkedResult {
@@ -655,10 +645,6 @@
   TcrMessage& m_msg;
   std::shared_ptr<CacheableArrayList> m_resultList;
 
-  // disabled
-  ChunkedDurableCQListResponse(const ChunkedDurableCQListResponse&);
-  ChunkedDurableCQListResponse& operator=(const ChunkedDurableCQListResponse&);
-
  public:
   inline explicit ChunkedDurableCQListResponse(TcrMessage& msg)
       : TcrChunkedResult(),
@@ -668,10 +654,16 @@
     return m_resultList;
   }
 
-  virtual void handleChunk(const uint8_t* chunk, int32_t chunkLen,
-                           uint8_t isLastChunkWithSecurity,
-                           const CacheImpl* cacheImpl);
-  virtual void reset();
+  ChunkedDurableCQListResponse(const ChunkedDurableCQListResponse&) = delete;
+  ChunkedDurableCQListResponse& operator=(const ChunkedDurableCQListResponse&) =
+      delete;
+
+  ~ChunkedDurableCQListResponse() noexcept override = default;
+
+  void handleChunk(const uint8_t* chunk, int32_t chunkLen,
+                   uint8_t isLastChunkWithSecurity,
+                   const CacheImpl* cacheImpl) override;
+  void reset() override;
 };
 
 }  // namespace client
diff --git a/cppcache/src/ThreadPool.cpp b/cppcache/src/ThreadPool.cpp
index f9212d9..887a45a 100644
--- a/cppcache/src/ThreadPool.cpp
+++ b/cppcache/src/ThreadPool.cpp
@@ -14,23 +14,21 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 #include "ThreadPool.hpp"
 
 #include "DistributedSystemImpl.hpp"
+#include "util/Log.hpp"
 
 namespace apache {
 namespace geode {
 namespace client {
 
-const char* ThreadPool::NC_Pool_Thread = "NC Pool Thread";
-
 ThreadPool::ThreadPool(size_t threadPoolSize)
     : shutdown_(false), appDomainContext_(createAppDomainContext()) {
   workers_.reserve(threadPoolSize);
 
   std::function<void()> executeWork = [this] {
-    DistributedSystemImpl::setThreadName(NC_Pool_Thread);
+    Log::setThreadName("NC Pool Thread");
     while (true) {
       std::unique_lock<decltype(queueMutex_)> lock(queueMutex_);
       queueCondition_.wait(lock,
diff --git a/cppcache/src/ThreadPool.hpp b/cppcache/src/ThreadPool.hpp
index d72f12a..a534bb0 100644
--- a/cppcache/src/ThreadPool.hpp
+++ b/cppcache/src/ThreadPool.hpp
@@ -50,7 +50,7 @@
  public:
   PooledWork() : m_mutex(), m_cond(), m_done(false) {}
 
-  ~PooledWork() override {}
+  ~PooledWork() noexcept override = default;
 
   void call() override {
     T res = execute();
diff --git a/cppcache/src/TombstoneEntry.hpp b/cppcache/src/TombstoneEntry.hpp
new file mode 100644
index 0000000..6f284ad
--- /dev/null
+++ b/cppcache/src/TombstoneEntry.hpp
@@ -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.
+ */
+
+#pragma once
+
+#ifndef GEODE_TOMBSTONEENTRY_H_
+#define GEODE_TOMBSTONEENTRY_H_
+
+#include <chrono>
+#include <memory>
+
+#include "ExpiryTask.hpp"
+#include "MapEntry.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
+class TombstoneEntry {
+ public:
+  explicit TombstoneEntry(std::shared_ptr<MapEntryImpl> entry)
+      : entry_(std::move(entry)), task_id_(ExpiryTask::invalid()) {}
+
+  std::shared_ptr<MapEntryImpl> entry() { return entry_; }
+  ExpiryTask::id_t task_id() { return task_id_; }
+  void task_id(ExpiryTask::id_t task_id) { task_id_ = task_id; }
+
+  void invalidate() { valid_ = false; }
+  bool valid() const { return valid_; }
+
+ protected:
+  std::shared_ptr<MapEntryImpl> entry_;
+  ExpiryTask::id_t task_id_;
+  bool valid_{true};
+};
+
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+#endif  // GEODE_TOMBSTONEENTRY_H_
diff --git a/cppcache/src/TombstoneExpiryHandler.cpp b/cppcache/src/TombstoneExpiryHandler.cpp
deleted file mode 100644
index dc488c9..0000000
--- a/cppcache/src/TombstoneExpiryHandler.cpp
+++ /dev/null
@@ -1,92 +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.
- */
-
-#include "TombstoneExpiryHandler.hpp"
-
-#include "CacheImpl.hpp"
-#include "ExpiryTaskManager.hpp"
-#include "MapEntry.hpp"
-#include "RegionInternal.hpp"
-
-namespace apache {
-namespace geode {
-namespace client {
-
-TombstoneExpiryHandler::TombstoneExpiryHandler(
-    std::shared_ptr<TombstoneEntry> entryPtr, TombstoneList* tombstoneList,
-    std::chrono::milliseconds duration, CacheImpl* cacheImpl)
-    : m_entryPtr(entryPtr),
-      m_duration(duration),
-      m_cacheImpl(cacheImpl),
-      m_tombstoneList(tombstoneList) {}
-
-int TombstoneExpiryHandler::handle_timeout(const ACE_Time_Value&, const void*) {
-  std::shared_ptr<CacheableKey> key;
-  m_entryPtr->getEntry()->getKeyI(key);
-  auto creationTime = m_entryPtr->getTombstoneCreationTime();
-  auto curr_time = TombstoneEntry::clock::now();
-  auto expiryTaskId = m_entryPtr->getExpiryTaskId();
-  auto sec = curr_time - creationTime - m_duration;
-  try {
-    using apache::geode::internal::chrono::duration::to_string;
-    LOGDEBUG(
-        "Entered entry expiry task handler for tombstone of key [%s]: "
-        "%s,%s,%s,%s",
-        Utils::nullSafeToString(key).c_str(),
-        to_string(curr_time.time_since_epoch()).c_str(),
-        to_string(creationTime.time_since_epoch()).c_str(),
-        to_string(m_duration).c_str(), to_string(sec).c_str());
-    if (sec >= std::chrono::seconds::zero()) {
-      DoTheExpirationAction(key);
-    } else {
-      // reset the task after
-      // (lastAccessTime + entryExpiryDuration - curr_time) in seconds
-      LOGDEBUG(
-          "Resetting expiry task %s later for key "
-          "[%s]",
-          to_string(-sec).c_str(), Utils::nullSafeToString(key).c_str());
-      m_cacheImpl->getExpiryTaskManager().resetTask(
-          m_entryPtr->getExpiryTaskId(), -sec);
-      return 0;
-    }
-  } catch (...) {
-    // Ignore whatever exception comes
-  }
-  LOGDEBUG("Removing expiry task for key [%s]",
-           Utils::nullSafeToString(key).c_str());
-  // we now delete the handler in GF_Timer_Heap_ImmediateReset_T
-  // and always return success.
-  m_cacheImpl->getExpiryTaskManager().resetTask(expiryTaskId, 0);
-  return 0;
-}
-
-int TombstoneExpiryHandler::handle_close(ACE_HANDLE, ACE_Reactor_Mask) {
-  return 0;
-}
-
-inline void TombstoneExpiryHandler::DoTheExpirationAction(
-    const std::shared_ptr<CacheableKey>& key) {
-  LOGDEBUG(
-      "EntryExpiryHandler::DoTheExpirationAction LOCAL_DESTROY "
-      "for region entry with key %s",
-      Utils::nullSafeToString(key).c_str());
-  m_tombstoneList->removeEntryFromMapSegment(key);
-}
-
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
diff --git a/cppcache/src/TombstoneExpiryHandler.hpp b/cppcache/src/TombstoneExpiryHandler.hpp
deleted file mode 100644
index c89a634..0000000
--- a/cppcache/src/TombstoneExpiryHandler.hpp
+++ /dev/null
@@ -1,73 +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.
- */
-
-#pragma once
-
-#ifndef GEODE_TOMBSTONEEXPIRYHANDLER_H_
-#define GEODE_TOMBSTONEEXPIRYHANDLER_H_
-
-#include <geode/ExpirationAction.hpp>
-#include <geode/Region.hpp>
-#include <geode/internal/geode_globals.hpp>
-
-#include "RegionInternal.hpp"
-#include "TombstoneList.hpp"
-
-namespace apache {
-namespace geode {
-namespace client {
-
-/**
- * @class TombstoneExpiryHandler TombstoneExpiryHandler.hpp
- *
- * The task object which contains the handler which gets triggered
- * when a tombstone expires.
- *
- */
-class APACHE_GEODE_EXPORT TombstoneExpiryHandler : public ACE_Event_Handler {
- public:
-  TombstoneExpiryHandler(std::shared_ptr<TombstoneEntry> entryPtr,
-                         TombstoneList* tombstoneList,
-                         std::chrono::milliseconds duration,
-                         CacheImpl* cacheImpl);
-
-  int handle_timeout(const ACE_Time_Value& current_time,
-                     const void* arg) override;
-
-  int handle_close(ACE_HANDLE handle, ACE_Reactor_Mask close_mask) override;
-
-  void setTombstoneEntry(std::shared_ptr<TombstoneEntry> entryPtr) {
-    m_entryPtr = entryPtr;
-  }
-
- private:
-  // The entry contained in the tombstone list
-  std::shared_ptr<TombstoneEntry> m_entryPtr;
-  // Duration after which the task should be reset in case of
-  // modification.
-  std::chrono::milliseconds m_duration;
-  CacheImpl* m_cacheImpl;
-  // perform the actual expiration action
-  void DoTheExpirationAction(const std::shared_ptr<CacheableKey>& key);
-
-  TombstoneList* m_tombstoneList;
-};
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_TOMBSTONEEXPIRYHANDLER_H_
diff --git a/cppcache/src/TombstoneExpiryTask.cpp b/cppcache/src/TombstoneExpiryTask.cpp
new file mode 100644
index 0000000..56e30d4
--- /dev/null
+++ b/cppcache/src/TombstoneExpiryTask.cpp
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+
+#include "TombstoneExpiryTask.hpp"
+
+#include "MapSegment.hpp"
+#include "TombstoneEntry.hpp"
+#include "Utils.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
+TombstoneExpiryTask::TombstoneExpiryTask(
+    ExpiryTaskManager& manager, MapSegment& segment,
+    std::shared_ptr<TombstoneEntry> tombstone)
+    : ExpiryTask(manager),
+      segment_(segment),
+      tombstone_(std::move(tombstone)) {}
+
+bool TombstoneExpiryTask::on_expire() {
+  std::shared_ptr<CacheableKey> key;
+  tombstone_->entry()->getKeyI(key);
+
+  LOGDEBUG(
+      "TombstoneExpiryTask::on_expire LOCAL_DESTROY "
+      "for region entry with key %s",
+      Utils::nullSafeToString(key).c_str());
+  segment_.remove_tomb_entry(tombstone_);
+  return true;
+}
+
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
diff --git a/cppcache/src/TombstoneExpiryTask.hpp b/cppcache/src/TombstoneExpiryTask.hpp
new file mode 100644
index 0000000..c0fd10b
--- /dev/null
+++ b/cppcache/src/TombstoneExpiryTask.hpp
@@ -0,0 +1,70 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+#ifndef GEODE_TOMBSTONEEXPIRYTASK_H_
+#define GEODE_TOMBSTONEEXPIRYTASK_H_
+
+#include <geode/internal/geode_globals.hpp>
+
+#include "ExpiryTask.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
+class MapSegment;
+class TombstoneEntry;
+
+/**
+ * @class TombstoneExpiryTask TombstoneExpiryTask.hpp
+ *
+ * The task which gets triggered when a tombstone expires.
+ */
+class TombstoneExpiryTask : public ExpiryTask {
+ public:
+  /**
+   * Class constructor
+   * @param manager A reference to the expiry manager
+   * @param segment A reference to the MapSegment the entry sits in
+   * @param tombstone Tombstone entry
+   */
+  TombstoneExpiryTask(ExpiryTaskManager& manager, MapSegment& segment,
+                      std::shared_ptr<TombstoneEntry> tombstone);
+
+ protected:
+  bool on_expire() override;
+
+ private:
+  /// Member attributes
+
+  /**
+   * Reference to the map segment in which the entry is
+   */
+  MapSegment& segment_;
+
+  /**
+   * Tombstone entry
+   */
+  std::shared_ptr<TombstoneEntry> tombstone_;
+};
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+#endif  // GEODE_TOMBSTONEEXPIRYTASK_H_
diff --git a/cppcache/src/TombstoneList.cpp b/cppcache/src/TombstoneList.cpp
index 211d95d..d272990 100644
--- a/cppcache/src/TombstoneList.cpp
+++ b/cppcache/src/TombstoneList.cpp
@@ -17,15 +17,20 @@
 
 #include "TombstoneList.hpp"
 
-#include <unordered_map>
+#include <unordered_set>
 
+#include <geode/SystemProperties.hpp>
+
+#include "CacheImpl.hpp"
 #include "MapSegment.hpp"
-#include "TombstoneExpiryHandler.hpp"
+#include "TombstoneEntry.hpp"
+#include "TombstoneExpiryTask.hpp"
 
 namespace apache {
 namespace geode {
 namespace client {
 
+// TODO. Review this overhead is OK
 #define SIZEOF_PTR (sizeof(void*))
 #define SIZEOF_SHAREDPTR (SIZEOF_PTR + 4)
 // 3 variables in expiry handler, two variables for ace_reactor expiry, one
@@ -40,55 +45,45 @@
 #define SIZEOF_TOMBSTONEOVERHEAD \
   (SIZEOF_EXPIRYHANDLER + SIZEOF_TOMBSTONELISTENTRY)
 
-ExpiryTaskManager::id_type TombstoneList::getExpiryTask(
-    TombstoneExpiryHandler** handler) {
-  // This function is not guarded as all functions of this class are called from
-  // MapSegment
-  auto duration = m_cacheImpl->getDistributedSystem()
-                      .getSystemProperties()
-                      .tombstoneTimeout();
-
-  auto tombstoneEntryPtr = std::make_shared<TombstoneEntry>(nullptr);
-  *handler = new TombstoneExpiryHandler(tombstoneEntryPtr, this, duration,
-                                        m_cacheImpl);
-  tombstoneEntryPtr->setHandler(*handler);
-  auto id = m_cacheImpl->getExpiryTaskManager().scheduleExpiryTask(
-      *handler, duration, std::chrono::seconds::zero());
-  return id;
-}
-
-void TombstoneList::add(const std::shared_ptr<MapEntryImpl>& entry,
-                        TombstoneExpiryHandler* handler,
-                        ExpiryTaskManager::id_type taskid) {
+ExpiryTask::id_t TombstoneList::add(
+    const std::shared_ptr<MapEntryImpl>& entry) {
   // This function is not guarded as all functions of this class are called from
   // MapSegment read TombstoneTImeout from systemProperties.
-  auto tombstoneEntryPtr = std::make_shared<TombstoneEntry>(entry);
-  handler->setTombstoneEntry(tombstoneEntryPtr);
-  tombstoneEntryPtr->setHandler(handler);
+  auto tombstone = std::make_shared<TombstoneEntry>(entry);
   std::shared_ptr<CacheableKey> key;
   entry->getKeyI(key);
 
-  tombstoneEntryPtr->setExpiryTaskId(taskid);
-  m_tombstoneMap[key] = tombstoneEntryPtr;
-  m_cacheImpl->getCachePerfStats().incTombstoneCount();
-  auto tombstonesize = key->objectSize() + SIZEOF_TOMBSTONEOVERHEAD;
-  m_cacheImpl->getCachePerfStats().incTombstoneSize(tombstonesize);
+  auto duration =
+      cache_.getDistributedSystem().getSystemProperties().tombstoneTimeout();
+  auto& manager = cache_.getExpiryTaskManager();
+  auto task =
+      std::make_shared<TombstoneExpiryTask>(manager, segment_, tombstone);
+  auto task_id = manager.schedule(std::move(task), duration);
+  tombstone->task_id(task_id);
+  tombstones_[key] = tombstone;
+
+  auto& perf_stats = cache_.getCachePerfStats();
+
+  perf_stats.incTombstoneCount();
+  perf_stats.incTombstoneSize(key->objectSize() + SIZEOF_TOMBSTONEOVERHEAD);
+
+  return task_id;
 }
 
 // Reaps the tombstones which have been gc'ed on server.
 // A map that has identifier for ClientProxyMembershipID as key
 // and server version of the tombstone with highest version as the
 // value is passed as paramter
-void TombstoneList::reapTombstones(std::map<uint16_t, int64_t>& gcVersions) {
+void TombstoneList::reap_tombstones(std::map<uint16_t, int64_t>& gcVersions) {
   // This function is not guarded as all functions of this class are called from
   // MapSegment
   std::unordered_set<std::shared_ptr<CacheableKey>,
                      dereference_hash<std::shared_ptr<CacheableKey>>,
                      dereference_equal_to<std::shared_ptr<CacheableKey>>>
       tobeDeleted;
-  for (const auto& queIter : m_tombstoneMap) {
+  for (const auto& queIter : tombstones_) {
     auto const& mapIter = gcVersions.find(
-        queIter.second->getEntry()->getVersionStamp().getMemberId());
+        queIter.second->entry()->getVersionStamp().getMemberId());
 
     if (mapIter == gcVersions.end()) {
       continue;
@@ -96,87 +91,61 @@
 
     auto const& version = (*mapIter).second;
     if (version >=
-        queIter.second->getEntry()->getVersionStamp().getRegionVersion()) {
+        queIter.second->entry()->getVersionStamp().getRegionVersion()) {
       tobeDeleted.insert(queIter.first);
     }
   }
-  for (const auto& itr : tobeDeleted) {
-    unguardedRemoveEntryFromMapSegment(itr);
+
+  for (const auto& key : tobeDeleted) {
+    segment_.remove_entry(key);
   }
 }
 
 // Reaps the tombstones whose keys are specified in the hash set .
-void TombstoneList::reapTombstones(
-    std::shared_ptr<CacheableHashSet> removedKeys) {
+void TombstoneList::reap_tombstones(
+    const std::shared_ptr<CacheableHashSet>& keys) {
   // This function is not guarded as all functions of this class are called from
   // MapSegment
-  for (auto queIter = removedKeys->begin(); queIter != removedKeys->end();
-       ++queIter) {
-    unguardedRemoveEntryFromMapSegment(*queIter);
+  for (const auto& key : *keys) {
+    segment_.remove_entry(key);
   }
 }
-// Call this when the lock of MapSegment has not been taken
-void TombstoneList::removeEntryFromMapSegment(
-    std::shared_ptr<CacheableKey> key) {
-  m_mapSegment->removeActualEntry(key, false);
-}
-
-// Call this when the lock of MapSegment has already been taken
-void TombstoneList::unguardedRemoveEntryFromMapSegment(
-    std::shared_ptr<CacheableKey> key) {
-  m_mapSegment->unguardedRemoveActualEntry(key);
-}
 
 bool TombstoneList::exists(const std::shared_ptr<CacheableKey>& key) const {
-  if (key) {
-    return m_tombstoneMap.find(key) != m_tombstoneMap.end();
-  }
-  return false;
+  return key != nullptr && tombstones_.find(key) != tombstones_.end();
 }
 
-void TombstoneList::eraseEntryFromTombstoneList(
-    const std::shared_ptr<CacheableKey>& key, bool cancelTask) {
+bool TombstoneList::erase(const std::shared_ptr<CacheableKey>& key,
+                          bool cancel_task) {
   // This function is not guarded as all functions of this class are called from
   // MapSegment
-  if (exists(key)) {
-    if (cancelTask) {
-      m_cacheImpl->getExpiryTaskManager().cancelTask(
-          m_tombstoneMap[key]->getExpiryTaskId());
-      delete m_tombstoneMap[key]->getHandler();
-    }
 
-    m_cacheImpl->getCachePerfStats().decTombstoneCount();
-    auto tombstonesize = key->objectSize() + SIZEOF_TOMBSTONEOVERHEAD;
-    m_cacheImpl->getCachePerfStats().decTombstoneSize(tombstonesize);
-    m_tombstoneMap.erase(key);
+  auto&& iter = tombstones_.find(key);
+  if (iter == tombstones_.end()) {
+    return false;
   }
+
+  iter->second->invalidate();
+
+  if (cancel_task) {
+    cache_.getExpiryTaskManager().cancel(iter->second->task_id());
+  }
+
+  auto& perf_stats = cache_.getCachePerfStats();
+
+  perf_stats.decTombstoneCount();
+  perf_stats.decTombstoneSize(key->objectSize() + SIZEOF_TOMBSTONEOVERHEAD);
+
+  tombstones_.erase(iter);
+  return true;
 }
 
-ExpiryTaskManager::id_type
-TombstoneList::eraseEntryFromTombstoneListWithoutCancelTask(
-    const std::shared_ptr<CacheableKey>& key,
-    TombstoneExpiryHandler*& handler) {
+void TombstoneList::cleanup() {
   // This function is not guarded as all functions of this class are called from
   // MapSegment
-  ExpiryTaskManager::id_type taskid = -1;
-  if (exists(key)) {
-    taskid = m_tombstoneMap[key]->getExpiryTaskId();
-    handler = m_tombstoneMap[key]->getHandler();
-    m_cacheImpl->getCachePerfStats().decTombstoneCount();
-    auto tombstonesize = key->objectSize() + SIZEOF_TOMBSTONEOVERHEAD;
-    m_cacheImpl->getCachePerfStats().decTombstoneSize(tombstonesize);
-    m_tombstoneMap.erase(key);
-  }
-  return taskid;
-}
-
-void TombstoneList::cleanUp() {
-  // This function is not guarded as all functions of this class are called from
-  // MapSegment
-  auto& expiryTaskManager = m_cacheImpl->getExpiryTaskManager();
-  for (const auto& queIter : m_tombstoneMap) {
-    expiryTaskManager.cancelTask(queIter.second->getExpiryTaskId());
-    delete queIter.second->getHandler();
+  auto& manager = cache_.getExpiryTaskManager();
+  for (const auto& iter : tombstones_) {
+    manager.cancel(iter.second->task_id());
   }
 }
 
diff --git a/cppcache/src/TombstoneList.hpp b/cppcache/src/TombstoneList.hpp
index 2e81eeb..951159c 100644
--- a/cppcache/src/TombstoneList.hpp
+++ b/cppcache/src/TombstoneList.hpp
@@ -21,13 +21,13 @@
 #define GEODE_TOMBSTONELIST_H_
 
 #include <chrono>
-#include <list>
 #include <memory>
 #include <unordered_map>
 
 #include <geode/CacheableBuiltins.hpp>
 #include <geode/internal/functional.hpp>
 
+#include "ExpiryTask.hpp"
 #include "MapEntry.hpp"
 
 namespace apache {
@@ -35,70 +35,37 @@
 namespace client {
 
 class MapSegment;
-class TombstoneExpiryHandler;
-
-class TombstoneEntry {
- public:
-  using clock = std::chrono::steady_clock;
-  using time_point = clock::time_point;
-
-  explicit TombstoneEntry(const std::shared_ptr<MapEntryImpl>& entry)
-      : m_entry(entry),
-        m_tombstoneCreationTime(TombstoneEntry::clock::now()),
-        m_expiryTaskId(0),
-        m_handler(nullptr) {}
-  virtual ~TombstoneEntry() {}
-  std::shared_ptr<MapEntryImpl> getEntry() { return m_entry; }
-  time_point getTombstoneCreationTime() { return m_tombstoneCreationTime; }
-  ExpiryTaskManager::id_type getExpiryTaskId() { return m_expiryTaskId; }
-  void setExpiryTaskId(ExpiryTaskManager::id_type expiryTaskId) {
-    m_expiryTaskId = expiryTaskId;
-  }
-  TombstoneExpiryHandler* getHandler() { return m_handler; }
-  void setHandler(TombstoneExpiryHandler* handler) { m_handler = handler; }
-
- private:
-  std::shared_ptr<MapEntryImpl> m_entry;
-  time_point m_tombstoneCreationTime;
-  ExpiryTaskManager::id_type m_expiryTaskId;
-  TombstoneExpiryHandler* m_handler;
-};
+class TombstoneEntry;
 
 class TombstoneList {
  public:
-  TombstoneList(MapSegment* mapSegment, CacheImpl* cacheImpl)
-      : m_mapSegment(mapSegment), m_cacheImpl(cacheImpl) {}
-  virtual ~TombstoneList() { cleanUp(); }
-  void add(const std::shared_ptr<MapEntryImpl>& entry,
-           TombstoneExpiryHandler* handler, ExpiryTaskManager::id_type taskID);
+  TombstoneList(MapSegment& segment, CacheImpl& cache)
+      : segment_(segment), cache_(cache) {}
+  virtual ~TombstoneList() { cleanup(); }
+
+  ExpiryTask::id_t add(const std::shared_ptr<MapEntryImpl>& entry);
+  bool erase(const std::shared_ptr<CacheableKey>& key, bool cancel_task = true);
+  bool exists(const std::shared_ptr<CacheableKey>& key) const;
+  void cleanup();
 
   // Reaps the tombstones which have been gc'ed on server.
   // A map that has identifier for ClientProxyMembershipID as key
   // and server version of the tombstone with highest version as the
   // value is passed as paramter
-  void reapTombstones(std::map<uint16_t, int64_t>& gcVersions);
-  void reapTombstones(std::shared_ptr<CacheableHashSet> removedKeys);
-  void eraseEntryFromTombstoneList(const std::shared_ptr<CacheableKey>& key,
-                                   bool cancelTask = true);
-  ExpiryTaskManager::id_type eraseEntryFromTombstoneListWithoutCancelTask(
-      const std::shared_ptr<CacheableKey>& key,
-      TombstoneExpiryHandler*& handler);
-  void cleanUp();
-  ExpiryTaskManager::id_type getExpiryTask(TombstoneExpiryHandler** handler);
-  bool exists(const std::shared_ptr<CacheableKey>& key) const;
+  void reap_tombstones(std::map<uint16_t, int64_t>& gcVersions);
+  void reap_tombstones(const std::shared_ptr<CacheableHashSet>& keys);
 
- private:
-  void removeEntryFromMapSegment(std::shared_ptr<CacheableKey> key);
-  void unguardedRemoveEntryFromMapSegment(std::shared_ptr<CacheableKey> key);
-  typedef std::unordered_map<
-      std::shared_ptr<CacheableKey>, std::shared_ptr<TombstoneEntry>,
-      dereference_hash<std::shared_ptr<CacheableKey>>,
-      dereference_equal_to<std::shared_ptr<CacheableKey>>>
-      TombstoneMap;
-  TombstoneMap m_tombstoneMap;
-  MapSegment* m_mapSegment;
-  CacheImpl* m_cacheImpl;
-  friend class TombstoneExpiryHandler;
+ protected:
+  using tombstone_map_t =
+      std::unordered_map<std::shared_ptr<CacheableKey>,
+                         std::shared_ptr<TombstoneEntry>,
+                         dereference_hash<std::shared_ptr<CacheableKey>>,
+                         dereference_equal_to<std::shared_ptr<CacheableKey>>>;
+
+ protected:
+  tombstone_map_t tombstones_;
+  MapSegment& segment_;
+  CacheImpl& cache_;
 };
 
 }  // namespace client
diff --git a/cppcache/src/TrackedMapEntry.cpp b/cppcache/src/TrackedMapEntry.cpp
index a413731..0bc21de 100644
--- a/cppcache/src/TrackedMapEntry.cpp
+++ b/cppcache/src/TrackedMapEntry.cpp
@@ -17,7 +17,7 @@
 
 #include "TrackedMapEntry.hpp"
 
-#include "MapEntry.hpp"
+#include "MapEntryImpl.hpp"
 
 namespace apache {
 namespace geode {
diff --git a/cppcache/src/TrackedMapEntry.hpp b/cppcache/src/TrackedMapEntry.hpp
index 7767b7e..42fb357 100644
--- a/cppcache/src/TrackedMapEntry.hpp
+++ b/cppcache/src/TrackedMapEntry.hpp
@@ -36,7 +36,7 @@
         m_trackingNumber(trackingNumber),
         m_updateCount(updateCount) {}
 
-  virtual ~TrackedMapEntry() {}
+  ~TrackedMapEntry() noexcept override = default;
 
   std::shared_ptr<MapEntryImpl> getImplPtr() final { return m_entry; }
 
diff --git a/cppcache/src/TypeRegistry.cpp b/cppcache/src/TypeRegistry.cpp
index af33a0e..060f12e 100644
--- a/cppcache/src/TypeRegistry.cpp
+++ b/cppcache/src/TypeRegistry.cpp
@@ -18,7 +18,7 @@
 #include "geode/TypeRegistry.hpp"
 
 #include "CacheImpl.hpp"
-#include "CacheRegionHelper.hpp"
+#include "SerializationRegistry.hpp"
 
 namespace apache {
 namespace geode {
diff --git a/cppcache/src/Utils.cpp b/cppcache/src/Utils.cpp
index 17227c5..7a42d49 100644
--- a/cppcache/src/Utils.cpp
+++ b/cppcache/src/Utils.cpp
@@ -22,10 +22,16 @@
 #include <cstdlib>
 #include <iomanip>
 
-#include <ace/INET_Addr.h>
-#include <ace/OS.h>
 #include <boost/asio.hpp>
 #include <boost/dll/import.hpp>
+#include <boost/dll/runtime_symbol_info.hpp>
+#include <boost/process/detail/config.hpp>
+
+#include "config.h"
+
+#if defined(HAVE_uname)
+#include <sys/utsname.h>
+#endif
 
 namespace apache {
 namespace geode {
@@ -39,6 +45,14 @@
   return env;
 }
 
+std::error_code Utils::getLastError() {
+  if (errno != 0) {
+    return std::error_code(errno, std::system_category());
+  }
+
+  return boost::process::detail::get_last_error();
+}
+
 void Utils::parseEndpointString(const char* endpoints, std::string& host,
                                 uint16_t& port) {
   std::string endpointsStr(endpoints);
@@ -69,47 +83,36 @@
   port = atoi(endpointsStr.c_str());
 }
 
-std::string Utils::convertHostToCanonicalForm(const char* endpoints) {
-  if (endpoints == nullptr) return nullptr;
-  std::string hostString("");
-  uint16_t port = 0;
-  std::string endpointsStr(endpoints);
-  std::string endpointsStr1(endpoints);
-  // Parse this string to get all hostnames and port numbers.
-  std::string endpoint;
-  std::string::size_type length = endpointsStr.size();
-  std::string::size_type pos = 0;
-  ACE_TCHAR hostName[256], fullName[512];
-  pos = endpointsStr.find(':', 0);
-  if (pos != std::string::npos) {
-    endpoint = endpointsStr.substr(0, pos);
-    pos += 1;  // skip ':'
-    length -= (pos);
-    endpointsStr = endpointsStr.substr(pos, length);
-  } else {
-    hostString = "";
-    return "";
+std::string Utils::convertHostToCanonicalForm(const std::string& endpoints) {
+  using boost::asio::io_service;
+  using boost::asio::ip::tcp;
+
+  if (endpoints.empty()) {
+    return {};
   }
-  hostString = endpoint;
-  port = atoi(endpointsStr.c_str());
-  if (strcmp(hostString.c_str(), "localhost") == 0) {
-    ACE_OS::hostname(hostName, sizeof(hostName) - 1);
-    struct hostent* host;
-    host = ACE_OS::gethostbyname(hostName);
-    if (host) {
-      std::snprintf(fullName, sizeof(fullName), "%s:%d", host->h_name, port);
-      return fullName;
-    }
-  } else {
-    pos = endpointsStr1.find('.', 0);
-    if (pos != std::string::npos) {
-      ACE_INET_Addr addr(endpoints);
-      addr.get_host_name(hostName, 256);
-      std::snprintf(fullName, sizeof(fullName), "%s:%d", hostName, port);
-      return fullName;
-    }
+
+  auto pos = endpoints.rfind(':');
+  if (pos == std::string::npos) {
+    return {};
   }
-  return endpoints;
+
+  auto hostname = endpoints.substr(0, pos);
+  auto port = endpoints.substr(pos + 1);
+
+  if (hostname == "localhost") {
+    hostname = boost::asio::ip::host_name();
+  }
+
+  io_service svc;
+  boost::system::error_code ec;
+  tcp::resolver resolver{svc};
+  auto results = resolver.resolve(hostname, ec);
+
+  if (!ec) {
+    hostname = results->host_name();
+  }
+
+  return hostname + ':' + port;
 }
 
 void Utils::parseEndpointNamesString(
@@ -173,20 +176,22 @@
 
   const auto& find = sharedLibraries.find(libraryName);
   if (find == sharedLibraries.end()) {
+    auto path = libraryName.empty() ? boost::dll::program_location()
+                                    : boost::dll::fs::path{libraryName};
     try {
       return *sharedLibraries
                   .emplace(
                       libraryName,
                       std::make_shared<boost::dll::shared_library>(
-                          libraryName,
+                          path,
                           boost::dll::load_mode::rtld_global |
                               boost::dll::load_mode::rtld_lazy |
                               boost::dll::load_mode::append_decorations |
                               boost::dll::load_mode::search_system_folders))
                   .first->second;
     } catch (const boost::dll::fs::system_error& e) {
-      throw IllegalArgumentException("cannot open library: " + libraryName +
-                                     ": reason: " + e.what());
+      throw IllegalArgumentException("cannot open library: \"" + path.string() +
+                                     "\": reason: " + e.what());
     }
   }
 
@@ -199,8 +204,10 @@
     const auto& sharedLibrary = getSharedLibrary(lib);
     return reinterpret_cast<void*>(sharedLibrary.get<void*()>(funcName));
   } catch (const boost::dll::fs::system_error&) {
+    std::string location =
+        lib.empty() ? "the application" : "library \"" + lib + "\"";
     throw IllegalArgumentException("cannot find factory function " + funcName +
-                                   " in library " + lib);
+                                   " in " + location);
   }
 }
 
@@ -235,6 +242,88 @@
   m_regionStats->incLong(statId, startStatOpTime() - start);
 }
 
+std::string Utils::getSystemInfo() {
+  std::string sysname{"Unknown"};
+  std::string machine{"Unknown"};
+  std::string nodename{"Unknown"};
+  std::string release{"Unknown"};
+  std::string version{"Unknown"};
+
+#if defined(HAVE_uname)
+  struct utsname name;
+  auto rc = ::uname(&name);
+  if (rc == 0) {
+    sysname = name.sysname;
+    machine = name.machine;
+    nodename = name.nodename;
+    release = name.release;
+    version = name.version;
+  }
+#elif defined(_WIN32) /* HAVE_uname */
+  sysname = "Win32";
+
+/* Since MS found it necessary to deprecate these. */
+#pragma warning(push)
+#pragma warning(disable : 4996)
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif /* __clang__ */
+  OSVERSIONINFOA vinfo;
+  vinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
+  ::GetVersionExA(&vinfo);
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif /* __clang__ */
+#pragma warning(pop)
+
+  if (vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT) {
+    // Get information from the two structures
+    release = "Windows NT " + std::to_string(vinfo.dwMajorVersion) + '.' +
+              std::to_string(vinfo.dwMinorVersion);
+    version = "Build " + std::to_string(vinfo.dwBuildNumber) + ' ' +
+              vinfo.szCSDVersion;
+  }
+
+  {
+    HKEY key;
+    DWORD size = 0;
+    DWORD type = 0;
+    auto key_name = "ProcessorNameString";
+    auto key_path = "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0";
+    auto rc = ::RegOpenKeyExA(HKEY_LOCAL_MACHINE, key_path, 0, KEY_READ, &key);
+    if (rc == ERROR_SUCCESS) {
+      rc = ::RegQueryValueExA(key, key_name, nullptr, &type, nullptr, &size);
+      if (rc == ERROR_SUCCESS && type == REG_SZ && size > 0) {
+        std::vector<char> buffer(size, 0);
+        auto ptr = reinterpret_cast<LPBYTE>(buffer.data());
+        rc = ::RegQueryValueExA(key, key_name, nullptr, &type, ptr, &size);
+        if (rc == ERROR_SUCCESS && buffer[0] != '\0') {
+          machine = buffer.data();
+        }
+      }
+
+      ::RegCloseKey(key);
+    }
+  }
+
+  nodename = boost::asio::ip::host_name();
+#endif /* _WIN32 */
+
+  std::string info = "SystemName=";
+  info += sysname;
+  info += " Machine=";
+  info += machine;
+  info += " Host=";
+  info += nodename;
+  info += " Release=";
+  info += release;
+  info += " Version=";
+  info += version;
+
+  return info;
+}
+
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/Utils.hpp b/cppcache/src/Utils.hpp
index 52a6041..0bfdc15 100644
--- a/cppcache/src/Utils.hpp
+++ b/cppcache/src/Utils.hpp
@@ -59,6 +59,8 @@
    */
   static std::string getEnv(const char* varName);
 
+  static std::error_code getLastError();
+
 #ifdef __GNUC__
   inline static char* _gnuDemangledName(const char* typeIdName, size_t& len) {
     int status;
@@ -154,7 +156,9 @@
   static void parseEndpointString(const char* endpoints, std::string& host,
                                   uint16_t& port);
 
-  static std::string convertHostToCanonicalForm(const char* endpoints);
+  static std::string convertHostToCanonicalForm(const std::string& endpoints);
+
+  static std::string getSystemInfo();
 
   static char* copyString(const char* str);
 
@@ -162,8 +166,9 @@
    * Convert the byte array to a string as "%d %d ...".
    * <code>maxLength</code> as zero implies no limit.
    */
-  static std::string convertBytesToString(const uint8_t* bytes, size_t length,
-                                          size_t maxLength = _GF_MSG_LIMIT);
+  static std::string convertBytesToString(
+      const uint8_t* bytes, size_t length,
+      size_t maxLength = _GEODE_LOG_MESSAGE_LIMIT);
 
   /**
    * lib should be in the form originally required by ACE_DLL, typically just
@@ -181,15 +186,17 @@
    * Convert the byte array to a string as "%d %d ...".
    * <code>maxLength</code> as zero implies no limit.
    */
-  static std::string convertBytesToString(const int8_t* bytes, size_t length,
-                                          size_t maxLength = _GF_MSG_LIMIT);
+  static std::string convertBytesToString(
+      const int8_t* bytes, size_t length,
+      size_t maxLength = _GEODE_LOG_MESSAGE_LIMIT);
 
   /**
    * Convert the byte array to a string as "%d %d ...".
    * <code>maxLength</code> as zero implies no limit.
    */
   inline static std::string convertBytesToString(
-      const char* bytes, size_t length, size_t maxLength = _GF_MSG_LIMIT) {
+      const char* bytes, size_t length,
+      size_t maxLength = _GEODE_LOG_MESSAGE_LIMIT) {
     return convertBytesToString(reinterpret_cast<const uint8_t*>(bytes), length,
                                 maxLength);
   }
@@ -202,9 +209,25 @@
 // Generate random numbers 0 to max-1
 class RandGen {
  public:
-  template <typename T, class G = std::default_random_engine>
-  inline T operator()(T max) {
-    return std::uniform_int_distribution<T>{0, max - 1}(generator<G>());
+  typedef std::size_t argument_type, result_type;
+
+  template <class G = std::default_random_engine>
+  result_type operator()(argument_type max) {
+    return std::uniform_int_distribution<result_type>{0,
+                                                      max - 1}(generator<G>());
+  }
+
+  template <class G = std::default_random_engine>
+  result_type operator()() {
+    return std::uniform_int_distribution<result_type>{
+        0, (max)() - 1}(generator<G>());
+  }
+
+  static constexpr result_type(min)() {
+    return (std::numeric_limits<result_type>::min)();
+  }
+  static constexpr result_type(max)() {
+    return (std::numeric_limits<result_type>::max)();
   }
 
  private:
diff --git a/cppcache/src/Version.cpp b/cppcache/src/Version.cpp
index 9d3feac..0ebd4ba 100644
--- a/cppcache/src/Version.cpp
+++ b/cppcache/src/Version.cpp
@@ -14,15 +14,36 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 #include "Version.hpp"
 
-#include "CacheImpl.hpp"
+#include <limits>
+
+#include <geode/DataInput.hpp>
+#include <geode/DataOutput.hpp>
 
 namespace apache {
 namespace geode {
 namespace client {
 
-int8_t Version::m_ordinal = 45;  // Geode 1.0.0
+void Version::write(DataOutput& dataOutput, const Version& version,
+                    bool compressed) {
+  const auto ordinal = version.getOrdinal();
+  if (compressed && (ordinal <= std::numeric_limits<int8_t>::max())) {
+    dataOutput.write(static_cast<int8_t>(ordinal));
+  } else {
+    dataOutput.write(kTokenOrdinal);
+    dataOutput.writeInt(ordinal);
+  }
+}
+
+Version Version::read(DataInput& dataInput) {
+  int16_t ordinal = dataInput.read();
+  if (kTokenOrdinal == ordinal) {
+    ordinal = dataInput.readInt16();
+  }
+  return Version(ordinal);
+}
 
 }  // namespace client
 }  // namespace geode
diff --git a/cppcache/src/Version.hpp b/cppcache/src/Version.hpp
index 8fedbde..255dab7 100644
--- a/cppcache/src/Version.hpp
+++ b/cppcache/src/Version.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_VERSION_H_
-#define GEODE_VERSION_H_
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -20,22 +15,41 @@
  * limitations under the License.
  */
 
-#include "CacheImpl.hpp"
+#pragma once
+
+#ifndef GEODE_VERSION_H_
+#define GEODE_VERSION_H_
+
+#include <cstdint>
 
 namespace apache {
 namespace geode {
 namespace client {
 
+class DataOutput;
+class DataInput;
+
 class Version {
  public:
-  // getter for ordinal
-  static int8_t getOrdinal() { return Version::m_ordinal; }
+  inline int16_t getOrdinal() const noexcept { return ordinal_; }
+
+  static const Version& current() noexcept {
+    static const auto version = Version{125};  // Geode 1.14.0
+    return version;
+  }
+
+  static void write(DataOutput& dataOutput, const Version& version,
+                    bool compressed = true);
+  static Version read(DataInput& dataOutput);
 
  private:
-  static int8_t m_ordinal;
+  const int16_t ordinal_;
 
-  Version() {}
+  inline explicit Version(int16_t ordinal) noexcept : ordinal_(ordinal) {}
+
+  static constexpr int8_t kTokenOrdinal = -1;
 };
+
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/VersionStamp.hpp b/cppcache/src/VersionStamp.hpp
index 2116413..a5d2eba 100644
--- a/cppcache/src/VersionStamp.hpp
+++ b/cppcache/src/VersionStamp.hpp
@@ -24,17 +24,17 @@
 
 #include <geode/internal/geode_globals.hpp>
 
-#include "ClientProxyMembershipID.hpp"
 #include "ErrType.hpp"
 #include "VersionTag.hpp"
 
 namespace apache {
 namespace geode {
 namespace client {
+
 /**
  * @brief This class encapsulates Version Stamp for map entries.
  */
-class APACHE_GEODE_EXPORT VersionStamp {
+class VersionStamp {
  public:
   VersionStamp()
       : m_memberID(0),
@@ -50,7 +50,7 @@
         m_regionVersionHighBytes(rhs.m_regionVersionHighBytes),
         m_regionVersionLowBytes(rhs.m_regionVersionLowBytes) {}
 
-  virtual ~VersionStamp() {}
+  virtual ~VersionStamp() noexcept = default;
   void setVersions(std::shared_ptr<VersionTag> versionTag);
   void setVersions(VersionStamp& versionStamp);
   int32_t getEntryVersion() const;
diff --git a/cppcache/src/VersionedCacheableObjectPartList.cpp b/cppcache/src/VersionedCacheableObjectPartList.cpp
index 15b8ea3..4260748 100644
--- a/cppcache/src/VersionedCacheableObjectPartList.cpp
+++ b/cppcache/src/VersionedCacheableObjectPartList.cpp
@@ -14,15 +14,18 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 #include "VersionedCacheableObjectPartList.hpp"
 
 #include <geode/CacheableString.hpp>
 #include <geode/ExceptionTypes.hpp>
 
+#include "CacheImpl.hpp"
 #include "CacheableToken.hpp"
 #include "DiskStoreId.hpp"
 #include "DiskVersionTag.hpp"
 #include "ThinClientRegion.hpp"
+
 namespace apache {
 namespace geode {
 namespace client {
@@ -181,7 +184,6 @@
 
   if (m_hasTags) {
     len = static_cast<int32_t>(input.readUnsignedVL());
-    ;
     m_versionTags.resize(len);
     std::vector<uint16_t> ids;
     MemberListForVersionStamp& memberListForVersionStamp =
@@ -232,7 +234,9 @@
           versionTag->setInternalMemID(ids.at(idNumber));
           break;
         }
-        default: { break; }
+        default: {
+          break;
+        }
       }
       m_versionTags[index] = versionTag;
     }
diff --git a/cppcache/src/config.h.in b/cppcache/src/config.h.in
index 3fb636a..c038456 100644
--- a/cppcache/src/config.h.in
+++ b/cppcache/src/config.h.in
@@ -29,8 +29,8 @@
 #cmakedefine HAVE_pthread_setname_np
 #endif
 
+#cmakedefine HAVE_uname
 #cmakedefine HAVE_SIGSTKFLT
-#cmakedefine HAVE_ACE_Select_Reactor
 
 // TODO replace with better CMake checks
 #cmakedefine _LINUX
@@ -48,16 +48,6 @@
 #define GEODE_SYSTEM_PROCESSOR "@CMAKE_SYSTEM_PROCESSOR@"
 #define GEODE_SYSTEM_NAME "@CMAKE_SYSTEM_NAME@"
 
-// TODO relace with CMake checks
-#define WITH_ACE_Select_Reactor 1
-
-// ACE_Thread is a pointer on MacOS *only*
-#if defined(_MACOSX)
-#define ACE_Thread_NULL nullptr
-#else
-#define ACE_Thread_NULL 0
-#endif
-
 #cmakedefine WITH_IPV6
 
 #endif  // GEODE_CONFIG_H_
diff --git a/cppcache/src/dllmain.cpp b/cppcache/src/dllmain.cpp
index 0b2f3e8..f6eaea0 100644
--- a/cppcache/src/dllmain.cpp
+++ b/cppcache/src/dllmain.cpp
@@ -61,7 +61,7 @@
   return TRUE;
 }
 
-APACHE_GEODE_EXPORT void DllMainGetPath(char *result, int maxLen) {
+void DllMainGetPath(char *result, int maxLen) {
   if (!initgflibDone) {
     result[0] = '\0';
     return;
diff --git a/cppcache/src/statistics/AtomicStatisticsImpl.cpp b/cppcache/src/statistics/AtomicStatisticsImpl.cpp
index 2ab27d3..927c006 100644
--- a/cppcache/src/statistics/AtomicStatisticsImpl.cpp
+++ b/cppcache/src/statistics/AtomicStatisticsImpl.cpp
@@ -135,11 +135,9 @@
 
 void AtomicStatisticsImpl::_setInt(int32_t offset, int32_t value) {
   if (offset >= statsType->getIntStatCount()) {
-    char s[128] = {'\0'};
-    std::snprintf(
-        s, 128, "setInt:The id (%d) of the Statistic Descriptor is not valid ",
-        offset);
-    throw IllegalArgumentException(s);
+    throw IllegalArgumentException(
+        "setInt:The id(" + std::to_string(offset) +
+        ") of the Statistic Descriptor is not valid");
   }
   intStorage[offset] = value;
 }
@@ -148,10 +146,9 @@
   if (offset >= statsType->getLongStatCount()) {
     char s[128] = {'\0'};
 
-    std::snprintf(
-        s, 128, "setLong:The id (%d) of the Statistic Descriptor is not valid ",
-        offset);
-    throw IllegalArgumentException(s);
+    throw IllegalArgumentException(
+        "setLong:The id(" + std::to_string(offset) +
+        ") of the Statistic Descriptor is not valid");
   }
 
   longStorage[offset] = value;
@@ -159,12 +156,9 @@
 
 void AtomicStatisticsImpl::_setDouble(int32_t offset, double value) {
   if (offset >= statsType->getDoubleStatCount()) {
-    char s[128] = {'\0'};
-    std::snprintf(
-        s, 128,
-        "setDouble:The id (%d) of the Statistic Descriptor is not valid ",
-        offset);
-    throw IllegalArgumentException(s);
+    throw IllegalArgumentException(
+        "setDouble:The id(" + std::to_string(offset) +
+        ") of the Statistic Descriptor is not valid");
   }
 
   doubleStorage[offset] = value;
@@ -172,11 +166,9 @@
 
 int32_t AtomicStatisticsImpl::_getInt(int32_t offset) const {
   if (offset >= statsType->getIntStatCount()) {
-    char s[128] = {'\0'};
-    std::snprintf(
-        s, 128, "getInt:The id (%d) of the Statistic Descriptor is not valid ",
-        offset);
-    throw IllegalArgumentException(s);
+    throw IllegalArgumentException(
+        "getInt:The id(" + std::to_string(offset) +
+        ") of the Statistic Descriptor is not valid");
   }
 
   return intStorage[offset];
@@ -184,23 +176,18 @@
 
 int64_t AtomicStatisticsImpl::_getLong(int32_t offset) const {
   if (offset >= statsType->getLongStatCount()) {
-    char s[128] = {'\0'};
-    std::snprintf(
-        s, 128, "getLong:The id (%d) of the Statistic Descriptor is not valid ",
-        offset);
-    throw IllegalArgumentException(s);
+    throw IllegalArgumentException(
+        "getLong:The id(" + std::to_string(offset) +
+        ") of the Statistic Descriptor is not valid");
   }
   return longStorage[offset];
 }
 
 double AtomicStatisticsImpl::_getDouble(int32_t offset) const {
   if (offset >= statsType->getDoubleStatCount()) {
-    char s[128] = {'\0'};
-    std::snprintf(
-        s, 128,
-        "getDouble:The id (%d) of the Statistic Descriptor is not valid ",
-        offset);
-    throw IllegalArgumentException(s);
+    throw IllegalArgumentException(
+        "getDouble:The id(" + std::to_string(offset) +
+        ") of the Statistic Descriptor is not valid");
   }
   return doubleStorage[offset];
 }
@@ -236,11 +223,9 @@
 
 int32_t AtomicStatisticsImpl::_incInt(int32_t offset, int32_t delta) {
   if (offset >= statsType->getIntStatCount()) {
-    char s[128] = {'\0'};
-    std::snprintf(
-        s, 128, "incInt:The id (%d) of the Statistic Descriptor is not valid ",
-        offset);
-    throw IllegalArgumentException(s);
+    throw IllegalArgumentException(
+        "incInt:The id(" + std::to_string(offset) +
+        ") of the Statistic Descriptor is not valid");
   }
 
   return (intStorage[offset] += delta);
diff --git a/cppcache/src/statistics/GeodeStatisticsFactory.cpp b/cppcache/src/statistics/GeodeStatisticsFactory.cpp
index 8ea2809..900e385 100644
--- a/cppcache/src/statistics/GeodeStatisticsFactory.cpp
+++ b/cppcache/src/statistics/GeodeStatisticsFactory.cpp
@@ -23,6 +23,7 @@
 
 #include <geode/Exception.hpp>
 #include <geode/internal/geode_globals.hpp>
+#include <geode/util/LogLevel.hpp>
 
 #include "../util/Log.hpp"
 #include "AtomicStatisticsImpl.hpp"
@@ -36,6 +37,7 @@
 using client::Exception;
 using client::IllegalArgumentException;
 using client::Log;
+using client::LogLevel;
 using client::OutOfMemoryException;
 
 GeodeStatisticsFactory::GeodeStatisticsFactory(StatisticsManager* statMngr) {
@@ -61,13 +63,12 @@
     statsTypeMap.clear();
 
   } catch (const Exception& ex) {
-    Log::warningCatch("~GeodeStatisticsFactory swallowing Geode exception", ex);
-
+    Log::logCatch(LogLevel::Warning,
+                  "~GeodeStatisticsFactory swallowing Geode exception", ex);
   } catch (const std::exception& ex) {
     std::string what = "~GeodeStatisticsFactory swallowing std::exception: ";
     what += ex.what();
     LOGWARN(what.c_str());
-
   } catch (...) {
     LOGERROR("~GeodeStatisticsFactory swallowing unknown exception");
   }
diff --git a/cppcache/src/statistics/HostStatSampler.cpp b/cppcache/src/statistics/HostStatSampler.cpp
index b77b76f..fb4c3ff 100644
--- a/cppcache/src/statistics/HostStatSampler.cpp
+++ b/cppcache/src/statistics/HostStatSampler.cpp
@@ -17,10 +17,8 @@
 
 #include "HostStatSampler.hpp"
 
-#include <algorithm>
 #include <chrono>
 #include <map>
-#include <regex>
 #include <thread>
 #include <utility>
 #include <vector>
@@ -28,6 +26,7 @@
 #include <boost/filesystem.hpp>
 #include <boost/process/environment.hpp>
 #include <boost/range/adaptors.hpp>
+#include <boost/thread/lock_types.hpp>
 
 #include <geode/CacheFactory.hpp>
 #include <geode/ExceptionTypes.hpp>
@@ -38,9 +37,7 @@
 #include "../ClientHealthStats.hpp"
 #include "../ClientProxyMembershipID.hpp"
 #include "../CppCacheLibrary.hpp"
-#include "../DistributedSystem.hpp"
 #include "../TcrConnectionManager.hpp"
-#include "../util/Log.hpp"
 #include "GeodeStatisticsFactory.hpp"
 #include "StatArchiveWriter.hpp"
 
@@ -71,10 +68,10 @@
 
     : HostStatSampler(std::move(filePath), sampleRate, statFileLimit,
                       statDiskSpaceLimit) {
-  m_cache = cache;
-  m_samplerStats = std::unique_ptr<StatSamplerStats>(
+  cache_ = cache;
+  samplerStats_ = std::unique_ptr<StatSamplerStats>(
       new StatSamplerStats(statMngr->getStatisticsFactory()));
-  m_statMngr = statMngr;
+  statsMgr_ = statMngr;
 
   initStatDiskSpaceEnabled();
 }
@@ -83,36 +80,36 @@
                                  std::chrono::milliseconds sampleRate,
                                  size_t statFileLimit,
                                  size_t statDiskSpaceLimit)
-    : m_adminError(false),
-      m_running(false),
-      m_stopRequested(false),
-      m_isStatDiskSpaceEnabled(statDiskSpaceLimit != 0),
-      m_archiveFileName(std::move(filePath)),
-      m_archiveFileSizeLimit(
-          std::min(statFileLimit * mebibyte, MAX_STATS_FILE_LIMIT)),
-      m_archiveDiskSpaceLimit(statDiskSpaceLimit * mebibyte),
-      m_spaceUsed(0),
-      m_sampleRate(sampleRate),
-      m_pid(boost::this_process::get_id()),
-      m_startTime(system_clock::now()),
-      m_rollIndex(0) {
-  if (m_isStatDiskSpaceEnabled) {
-    if (m_archiveFileSizeLimit == 0 ||
-        m_archiveFileSizeLimit > m_archiveDiskSpaceLimit) {
-      m_archiveFileSizeLimit = m_archiveDiskSpaceLimit;
+    : adminError_(false),
+      running_(false),
+      stopRequested_(false),
+      isStatDiskSpaceEnabled_(statDiskSpaceLimit != 0),
+      archiveFileName_(std::move(filePath)),
+      archiveFileSizeLimit_(
+          (std::min)(statFileLimit * mebibyte, MAX_STATS_FILE_LIMIT)),
+      archiveDiskSpaceLimit_(statDiskSpaceLimit * mebibyte),
+      spaceUsed_(0),
+      sampleRate_(sampleRate),
+      pid_(boost::this_process::get_id()),
+      startTime_(system_clock::now()),
+      rollIndex_(0) {
+  if (isStatDiskSpaceEnabled_) {
+    if (archiveFileSizeLimit_ == 0 ||
+        archiveFileSizeLimit_ > archiveDiskSpaceLimit_) {
+      archiveFileSizeLimit_ = archiveDiskSpaceLimit_;
     }
   }
 }
 
 void HostStatSampler::initStatDiskSpaceEnabled() {
-  if (m_isStatDiskSpaceEnabled) {
+  if (isStatDiskSpaceEnabled_) {
     initStatFileWithExt();
 
     initRollIndex();
 
-    auto exists = boost::filesystem::exists(m_archiveFileName);
-    if (exists && m_archiveFileSizeLimit > 0) {
-      changeArchive(m_archiveFileName);
+    auto exists = boost::filesystem::exists(archiveFileName_);
+    if (exists && archiveFileSizeLimit_ > 0) {
+      changeArchive(archiveFileName_);
     } else {
       writeGfs();
     }
@@ -122,7 +119,7 @@
 void HostStatSampler::initRollIndex() {
   forEachIndexStatFile(
       [&](const int32_t index, const boost::filesystem::path&) {
-        m_rollIndex = std::max(m_rollIndex, index + 1);
+        rollIndex_ = (std::max)(rollIndex_, index + 1);
       });
 }
 
@@ -133,57 +130,57 @@
 HostStatSampler::~HostStatSampler() noexcept = default;
 
 const boost::filesystem::path& HostStatSampler::createArchiveFilename() {
-  if (!m_isStatDiskSpaceEnabled) {
+  if (!isStatDiskSpaceEnabled_) {
     const auto pid = std::to_string(boost::this_process::get_id());
 
-    if (!m_archiveFileName.has_extension()) {
-      m_archiveFileName += "-" + pid;
+    if (!archiveFileName_.has_extension()) {
+      archiveFileName_ += "-" + pid;
     } else {
-      m_archiveFileName = m_archiveFileName.parent_path() /
-                          m_archiveFileName.stem() += "-" + pid;
+      archiveFileName_ =
+          archiveFileName_.parent_path() / archiveFileName_.stem() += "-" + pid;
     }
-    m_archiveFileName += GFS_EXTENSION;
+    archiveFileName_ += GFS_EXTENSION;
   }
 
-  return m_archiveFileName;
+  return archiveFileName_;
 }
 
 const boost::filesystem::path& HostStatSampler::getArchiveFilename() const {
-  return m_archiveFileName;
+  return archiveFileName_;
 }
 
 size_t HostStatSampler::getArchiveFileSizeLimit() const {
-  return m_archiveFileSizeLimit;
+  return archiveFileSizeLimit_;
 }
 
 size_t HostStatSampler::getArchiveDiskSpaceLimit() const {
-  return m_archiveDiskSpaceLimit;
+  return archiveDiskSpaceLimit_;
 }
 
 std::chrono::milliseconds HostStatSampler::getSampleRate() const {
-  return m_sampleRate;
+  return sampleRate_;
 }
 
 void HostStatSampler::accountForTimeSpentWorking(int64_t nanosSpentWorking) {
-  m_samplerStats->tookSample(nanosSpentWorking);
+  samplerStats_->tookSample(nanosSpentWorking);
 }
 
 std::recursive_mutex& HostStatSampler::getStatListMutex() {
-  return m_statMngr->getListMutex();
+  return statsMgr_->getListMutex();
 }
 
 std::vector<Statistics*>& HostStatSampler::getStatistics() {
-  return m_statMngr->getStatsList();
+  return statsMgr_->getStatsList();
 }
 
 std::vector<Statistics*>& HostStatSampler::getNewStatistics() {
-  return m_statMngr->getNewlyAddedStatsList();
+  return statsMgr_->getNewlyAddedStatsList();
 }
 
-int64_t HostStatSampler::getSystemId() { return m_pid; }
+int64_t HostStatSampler::getSystemId() { return pid_; }
 
 system_clock::time_point HostStatSampler::getSystemStartTime() {
-  return m_startTime;
+  return startTime_;
 }
 
 const std::string& HostStatSampler::getSystemDirectoryPath() {
@@ -197,19 +194,19 @@
 void HostStatSampler::changeArchive(boost::filesystem::path filename) {
   if (filename.empty()) {
     // terminate the sampling thread
-    m_stopRequested = true;
+    stopRequested_ = true;
     return;
   }
 
   filename = chkForGFSExt(filename);
 
-  if (m_archiver) {
-    m_archiver->closeFile();
+  if (archiver_) {
+    archiver_->closeFile();
   }
 
   rollArchive(filename);
 
-  m_archiver.reset(new StatArchiveWriter(filename.string(), this, m_cache));
+  archiver_.reset(new StatArchiveWriter(filename.string(), this, cache_));
 }
 
 boost::filesystem::path HostStatSampler::chkForGFSExt(
@@ -219,7 +216,7 @@
   }
 
   auto tmp = filename;
-  if (m_isStatDiskSpaceEnabled) {
+  if (isStatDiskSpaceEnabled_) {
     return tmp += GFS_EXTENSION;
   }
   return tmp.replace_extension(GFS_EXTENSION);
@@ -239,7 +236,7 @@
   while (true) {
     auto newFilename = filename.parent_path() / filename.stem();
     newFilename += "-";
-    newFilename += std::to_string(m_rollIndex++);
+    newFilename += std::to_string(rollIndex_++);
     newFilename += extension;
 
     if (boost::filesystem::exists(newFilename)) {
@@ -252,30 +249,31 @@
 }
 
 void HostStatSampler::start() {
-  if (!m_running.exchange(true)) {
-    m_thread = std::thread(&HostStatSampler::svc, this);
+  if (!running_.exchange(true)) {
+    thread_ = std::thread(&HostStatSampler::svc, this);
   }
 }
 
 void HostStatSampler::stop() {
-  m_stopRequested = true;
-  m_thread.join();
+  stopRequested_ = true;
+  thread_.join();
 }
 
-bool HostStatSampler::isRunning() const { return m_running; }
+bool HostStatSampler::isRunning() const { return running_; }
 
 void HostStatSampler::putStatsInAdminRegion() {
   try {
     // Get Values of gets, puts,misses,listCalls,numThreads
     static bool initDone = false;
     static std::string clientId = "";
-    auto adminRgn = m_statMngr->getAdminRegion();
+    auto adminRgn = statsMgr_->getAdminRegion();
     if (adminRgn == nullptr) return;
     auto conn_man = adminRgn->getConnectionManager();
     if (conn_man->isNetDown()) {
       return;
     }
-    client::TryReadGuard _guard(adminRgn->getRWLock(), adminRgn->isDestroyed());
+
+    boost::shared_lock<boost::shared_mutex> guard{adminRgn->getMutex()};
     if (!adminRgn->isDestroyed()) {
       if (conn_man->getNumEndPoints() > 0) {
         if (!initDone) {
@@ -285,7 +283,7 @@
         int puts = 0, gets = 0, misses = 0, numListeners = 0, numThreads = 0,
             creates = 0;
         int64_t cpuTime = 0;
-        auto gf = m_statMngr->getStatisticsFactory();
+        auto gf = statsMgr_->getStatisticsFactory();
         if (gf) {
           const auto cacheStatType = gf->findType("CachePerfStats");
           if (cacheStatType) {
@@ -308,8 +306,8 @@
         if (clientId.empty()) {
           auto memId = conn_man->getCacheImpl()
                            ->getClientProxyMembershipIDFactory()
-                           .create(m_durableClientId, m_durableTimeout);
-          clientId = memId->getDSMemberIdForThinClientUse();
+                           .create(durableClientId_, durableTimeout_);
+          clientId = memId->getClientId();
         }
 
         auto keyPtr = client::CacheableString::create(clientId.c_str());
@@ -317,7 +315,7 @@
       }
     }
   } catch (const Exception&) {
-    m_adminError = true;
+    adminError_ = true;
   }
 }
 
@@ -327,54 +325,53 @@
 }
 
 void HostStatSampler::forceSample() {
-  std::lock_guard<decltype(m_samplingLock)> guard(m_samplingLock);
+  std::lock_guard<decltype(samplingMutex_)> guard(samplingMutex_);
 
-  if (m_archiver) {
-    m_archiver->sample();
-    m_archiver->flush();
+  if (archiver_) {
+    archiver_->sample();
+    archiver_->flush();
   }
 }
 
 void HostStatSampler::doSample(const boost::filesystem::path& archiveFilename) {
-  std::lock_guard<decltype(m_samplingLock)> guard(m_samplingLock);
+  std::lock_guard<decltype(samplingMutex_)> guard(samplingMutex_);
 
-  if (!m_adminError) {
+  if (!adminError_) {
     putStatsInAdminRegion();
   }
 
-  if (m_archiver) {
-    m_archiver->sample();
+  if (archiver_) {
+    archiver_->sample();
 
-    if (m_archiveFileSizeLimit != 0) {
-      auto size = m_archiver->getSampleSize();
-      auto bytesWritten = m_archiver->bytesWritten();
-      if (bytesWritten > (m_archiveFileSizeLimit - size)) {
+    if (archiveFileSizeLimit_ != 0) {
+      auto size = archiver_->getSampleSize();
+      auto bytesWritten = archiver_->bytesWritten();
+      if (bytesWritten > (archiveFileSizeLimit_ - size)) {
         // roll the archive
         changeArchive(archiveFilename);
       }
     }
-    m_spaceUsed += m_archiver->bytesWritten();
+    spaceUsed_ += archiver_->bytesWritten();
     // delete older stat files if disk limit is about to be exceeded.
-    if ((m_archiveDiskSpaceLimit != 0) &&
-        (m_spaceUsed >=
-         (m_archiveDiskSpaceLimit - m_archiver->getSampleSize()))) {
+    if ((archiveDiskSpaceLimit_ != 0) &&
+        (spaceUsed_ >= (archiveDiskSpaceLimit_ - archiver_->getSampleSize()))) {
       checkDiskLimit();
     }
 
     // It will flush the contents to the archive file, in every
     // sample run.
 
-    m_archiver->flush();
+    archiver_->flush();
   }
 }
 
 template <typename _Function>
 void HostStatSampler::forEachIndexStatFile(_Function function) const {
-  const std::regex statsFilter(m_archiveFileName.stem().string() +
-                               R"(-([\d]+))" +
-                               m_archiveFileName.extension().string());
+  const boost::regex statsFilter(archiveFileName_.stem().string() +
+                                 R"(-([\d]+))" +
+                                 archiveFileName_.extension().string());
 
-  auto dir = m_archiveFileName.parent_path();
+  auto dir = archiveFileName_.parent_path();
   if (dir.empty()) {
     dir = boost::filesystem::current_path();
   }
@@ -385,11 +382,11 @@
            boost::adaptors::filtered(
                static_cast<bool (*)(const boost::filesystem::path&)>(
                    &boost::filesystem::is_regular_file))) {
-    std::smatch match;
+    boost::smatch match;
     const auto& file = entry.path();
     const auto filename = file.filename();
     const auto& filenameStr = filename.string();
-    if (std::regex_match(filenameStr, match, statsFilter)) {
+    if (boost::regex_match(filenameStr, match, statsFilter)) {
       const auto index = std::stoi(match[1].str());
       function(index, file);
     }
@@ -397,27 +394,27 @@
 }
 
 void HostStatSampler::checkDiskLimit() {
-  m_spaceUsed = 0;
+  spaceUsed_ = 0;
 
   std::map<int32_t, std::pair<boost::filesystem::path, size_t>> indexedFiles;
   forEachIndexStatFile(
       [&](const int32_t index, const boost::filesystem::path& file) {
         const auto size = boost::filesystem::file_size(file);
         indexedFiles.emplace(index, std::make_pair(file, size));
-        m_spaceUsed += size;
+        spaceUsed_ += size;
       });
 
-  if (m_archiver) {
-    m_spaceUsed += m_archiver->bytesWritten();
+  if (archiver_) {
+    spaceUsed_ += archiver_->bytesWritten();
   }
 
   for (const auto& i : indexedFiles) {
-    if (m_spaceUsed > m_archiveDiskSpaceLimit) {
+    if (spaceUsed_ > archiveDiskSpaceLimit_) {
       const auto& file = i.second.first;
       const auto size = i.second.second;
       try {
         boost::filesystem::remove(file);
-        m_spaceUsed -= size;
+        spaceUsed_ -= size;
       } catch (boost::filesystem::filesystem_error& e) {
         LOGWARN("Could not delete " + file.string() + ": " + e.what());
       }
@@ -426,19 +423,19 @@
 }
 
 void HostStatSampler::svc(void) {
-  client::DistributedSystemImpl::setThreadName("NC HSS Thread");
+  client::Log::setThreadName("NC HSS Thread");
   try {
     // createArchiveFileName instead of getArchiveFileName here because
     // for the first time the sampler needs to add the pid to the filename
     // passed to it.
     auto archiveFilename = createArchiveFilename();
-    if (!m_isStatDiskSpaceEnabled) {
+    if (!isStatDiskSpaceEnabled_) {
       changeArchive(archiveFilename);
     }
     auto samplingRate = milliseconds(getSampleRate());
     bool gotexception = false;
     int waitTime = 0;
-    while (!m_stopRequested) {
+    while (!stopRequested_) {
       try {
         if (gotexception) {
           std::this_thread::sleep_for(std::chrono::seconds(1));
@@ -464,7 +461,7 @@
         auto sleepDuration =
             samplingRate - duration_cast<milliseconds>(spentWorking);
         static const auto wakeInterval = milliseconds(100);
-        while (!m_stopRequested && sleepDuration > milliseconds::zero()) {
+        while (!stopRequested_ && sleepDuration > milliseconds::zero()) {
           std::this_thread::sleep_for(
               sleepDuration > wakeInterval ? wakeInterval : sleepDuration);
           sleepDuration -= wakeInterval;
@@ -480,9 +477,9 @@
         gotexception = true;
       }
     }
-    m_samplerStats->close();
-    if (m_archiver != nullptr) {
-      m_archiver->close();
+    samplerStats_->close();
+    if (archiver_ != nullptr) {
+      archiver_->close();
     }
   } catch (Exception& e) {
     // log the exception and let the thread exit.
@@ -493,7 +490,7 @@
        LOGERROR("Exception in sampler thread ");
        closeSpecialStats();
    }*/
-  m_running = false;
+  running_ = false;
 }
 
 }  // namespace statistics
diff --git a/cppcache/src/statistics/HostStatSampler.hpp b/cppcache/src/statistics/HostStatSampler.hpp
index ad6656e..1457050 100644
--- a/cppcache/src/statistics/HostStatSampler.hpp
+++ b/cppcache/src/statistics/HostStatSampler.hpp
@@ -24,7 +24,6 @@
 #include <chrono>
 #include <memory>
 #include <mutex>
-#include <regex>
 #include <string>
 #include <thread>
 #include <vector>
@@ -162,28 +161,6 @@
   bool isRunning() const;
 
  private:
-  std::recursive_mutex m_samplingLock;
-  bool m_adminError;
-  std::thread m_thread;
-  std::atomic<bool> m_running;
-  std::atomic<bool> m_stopRequested;
-  std::atomic<bool> m_isStatDiskSpaceEnabled;
-  std::unique_ptr<StatArchiveWriter> m_archiver;
-  std::unique_ptr<StatSamplerStats> m_samplerStats;
-  const char* m_durableClientId;
-  std::chrono::seconds m_durableTimeout;
-
-  boost::filesystem::path m_archiveFileName;
-  size_t m_archiveFileSizeLimit;
-  size_t m_archiveDiskSpaceLimit;
-  size_t m_spaceUsed = 0;
-  std::chrono::milliseconds m_sampleRate;
-  StatisticsManager* m_statMngr;
-  CacheImpl* m_cache;
-
-  int64_t m_pid;
-  system_clock::time_point m_startTime;
-
   /**
    * For testing only.
    */
@@ -193,12 +170,7 @@
 
   boost::filesystem::path initStatFileWithExt();
 
-  /**
-   * The archiveFile, after it exceeds archiveFileSizeLimit should be rolled
-   * to a new file name. This integer rollIndex will be used to format the
-   * file name into which the current archiveFile will be renamed.
-   */
-  int32_t m_rollIndex;
+
 
   /**
    * This function rolls the existing archive file.
@@ -220,13 +192,42 @@
 
   void initStatDiskSpaceEnabled();
 
-  static const char* NC_HSS_Thread;
 
   friend TestableHostStatSampler;
   void initRollIndex();
 
   template <typename _Function>
   void forEachIndexStatFile(_Function function) const;
+
+ private:
+  std::recursive_mutex samplingMutex_;
+  bool adminError_;
+  std::thread thread_;
+  std::atomic<bool> running_;
+  std::atomic<bool> stopRequested_;
+  std::atomic<bool> isStatDiskSpaceEnabled_;
+  std::unique_ptr<StatArchiveWriter> archiver_;
+  std::unique_ptr<StatSamplerStats> samplerStats_;
+  const char* durableClientId_;
+  std::chrono::seconds durableTimeout_;
+
+  boost::filesystem::path archiveFileName_;
+  size_t archiveFileSizeLimit_;
+  size_t archiveDiskSpaceLimit_;
+  size_t spaceUsed_ = 0;
+  std::chrono::milliseconds sampleRate_;
+  StatisticsManager* statsMgr_;
+  CacheImpl* cache_;
+
+  int64_t pid_;
+  system_clock::time_point startTime_;
+
+  /**
+   * The archiveFile, after it exceeds archiveFileSizeLimit should be rolled
+   * to a new file name. This integer rollIndex will be used to format the
+   * file name into which the current archiveFile will be renamed.
+   */
+  int32_t rollIndex_;
 };
 
 }  // namespace statistics
diff --git a/cppcache/src/statistics/OsStatisticsImpl.cpp b/cppcache/src/statistics/OsStatisticsImpl.cpp
index 63f3ca3..4634e35 100644
--- a/cppcache/src/statistics/OsStatisticsImpl.cpp
+++ b/cppcache/src/statistics/OsStatisticsImpl.cpp
@@ -85,10 +85,6 @@
   this->numericId = calcNumericId(system, numericIdArg);
   this->uniqueId = uniqueIdArg;
   this->closed = false;
-  ;
-  /* adongre
-   * CID 28981: Uninitialized pointer field (UNINIT_CTOR)
-   */
   doubleStorage = nullptr;
   intStorage = nullptr;
   longStorage = nullptr;
@@ -125,22 +121,18 @@
 }
 
 OsStatisticsImpl::~OsStatisticsImpl() noexcept {
-  try {
-    statsType = nullptr;
-    if (intStorage != nullptr) {
-      delete[] intStorage;
-      intStorage = nullptr;
-    }
-    if (longStorage != nullptr) {
-      delete[] longStorage;
-      longStorage = nullptr;
-    }
-    if (doubleStorage != nullptr) {
-      delete[] doubleStorage;
-      doubleStorage = nullptr;
-    }
-  } catch (...) {
-    LOGERROR("Exception in ~OsStatisticsImpl");
+  statsType = nullptr;
+  if (intStorage != nullptr) {
+    delete[] intStorage;
+    intStorage = nullptr;
+  }
+  if (longStorage != nullptr) {
+    delete[] longStorage;
+    longStorage = nullptr;
+  }
+  if (doubleStorage != nullptr) {
+    delete[] doubleStorage;
+    doubleStorage = nullptr;
   }
 }
 
@@ -162,34 +154,27 @@
 
 void OsStatisticsImpl::_setInt(int32_t offset, int32_t value) {
   if (offset >= statsType->getIntStatCount()) {
-    char s[128] = {'\0'};
-    std::snprintf(
-        s, 128, "setInt:The id (%d) of the Statistic Descriptor is not valid ",
-        offset);
-    throw IllegalArgumentException(s);
+    throw IllegalArgumentException(
+        "setInt:The id(" + std::to_string(offset) +
+        ") of the Statistic Descriptor is not valid");
   }
   intStorage[offset] = value;
 }
 
 void OsStatisticsImpl::_setLong(int32_t offset, int64_t value) {
   if (offset >= statsType->getLongStatCount()) {
-    char s[128] = {'\0'};
-    std::snprintf(
-        s, 128, "setLong:The id (%d) of the Statistic Descriptor is not valid ",
-        offset);
-    throw IllegalArgumentException(s);
+    throw IllegalArgumentException(
+        "setLong:The id(" + std::to_string(offset) +
+        ") of the Statistic Descriptor is not valid");
   }
   longStorage[offset] = value;
 }
 
 void OsStatisticsImpl::_setDouble(int32_t offset, double value) {
   if (offset >= statsType->getDoubleStatCount()) {
-    char s[128] = {'\0'};
-    std::snprintf(
-        s, 128,
-        "setDouble:The id (%d) of the Statistic Descriptor is not valid ",
-        offset);
-    throw IllegalArgumentException(s);
+    throw IllegalArgumentException(
+        "setDouble:The id(" + std::to_string(offset) +
+        ") of the Statistic Descriptor is not valid");
   }
   doubleStorage[offset] = value;
 }
@@ -198,11 +183,9 @@
 
 int32_t OsStatisticsImpl::_getInt(int32_t offset) const {
   if (offset >= statsType->getIntStatCount()) {
-    char s[128] = {'\0'};
-    std::snprintf(
-        s, 128, "getInt:The id (%d) of the Statistic Descriptor is not valid ",
-        offset);
-    throw IllegalArgumentException(s);
+    throw IllegalArgumentException(
+        "getInt:The id(" + std::to_string(offset) +
+        ") of the Statistic Descriptor is not valid");
   }
 
   return intStorage[offset];
@@ -210,11 +193,9 @@
 
 int64_t OsStatisticsImpl::_getLong(int32_t offset) const {
   if (offset >= statsType->getLongStatCount()) {
-    char s[128] = {'\0'};
-    std::snprintf(
-        s, 128, "getLong:The id (%d) of the Statistic Descriptor is not valid ",
-        offset);
-    throw IllegalArgumentException(s);
+    throw IllegalArgumentException(
+        "getLong:The id(" + std::to_string(offset) +
+        ") of the Statistic Descriptor is not valid");
   }
 
   return longStorage[offset];
@@ -222,12 +203,9 @@
 
 double OsStatisticsImpl::_getDouble(int32_t offset) const {
   if (offset >= statsType->getDoubleStatCount()) {
-    char s[128] = {'\0'};
-    std::snprintf(
-        s, 128,
-        "getDouble:The id (%d) of the Statistic Descriptor is not valid ",
-        offset);
-    throw IllegalArgumentException(s);
+    throw IllegalArgumentException(
+        "getDouble:The id(" + std::to_string(offset) +
+        ") of the Statistic Descriptor is not valid");
   }
 
   return doubleStorage[offset];
@@ -255,11 +233,9 @@
 
 int32_t OsStatisticsImpl::_incInt(int32_t offset, int32_t delta) {
   if (offset >= statsType->getIntStatCount()) {
-    char s[128] = {'\0'};
-    std::snprintf(
-        s, 128, "incInt:The id (%d) of the Statistic Descriptor is not valid ",
-        offset);
-    throw IllegalArgumentException(s);
+    throw IllegalArgumentException(
+        "incInt:The id(" + std::to_string(offset) +
+        ") of the Statistic Descriptor is not valid");
   }
 
   intStorage[offset] += delta;
@@ -268,11 +244,9 @@
 
 int64_t OsStatisticsImpl::_incLong(int32_t offset, int64_t delta) {
   if (offset >= statsType->getLongStatCount()) {
-    char s[128] = {'\0'};
-    std::snprintf(
-        s, 128, "incLong:The id (%d) of the Statistic Descriptor is not valid ",
-        offset);
-    throw IllegalArgumentException(s);
+    throw IllegalArgumentException(
+        "incLong:The id(" + std::to_string(offset) +
+        ") of the Statistic Descriptor is not valid");
   }
   longStorage[offset] += delta;
   return longStorage[offset];
@@ -280,12 +254,9 @@
 
 double OsStatisticsImpl::_incDouble(int32_t offset, double delta) {
   if (offset >= statsType->getDoubleStatCount()) {
-    char s[128] = {'\0'};
-    std::snprintf(
-        s, 128,
-        "incDouble:The id (%d) of the Statistic Descriptor is not valid ",
-        offset);
-    throw IllegalArgumentException(s);
+    throw IllegalArgumentException(
+        "incDouble:The id(" + std::to_string(offset) +
+        ") of the Statistic Descriptor is not valid");
   }
   doubleStorage[offset] += delta;
   return doubleStorage[offset];
diff --git a/cppcache/src/statistics/PoolStatsSampler.cpp b/cppcache/src/statistics/PoolStatsSampler.cpp
index 9e28db0..5353426 100644
--- a/cppcache/src/statistics/PoolStatsSampler.cpp
+++ b/cppcache/src/statistics/PoolStatsSampler.cpp
@@ -22,7 +22,7 @@
 #include "../AdminRegion.hpp"
 #include "../CacheImpl.hpp"
 #include "../ClientHealthStats.hpp"
-#include "../ReadWriteLock.hpp"
+#include "../ClientProxyMembershipID.hpp"
 #include "../ThinClientPoolDM.hpp"
 #include "GeodeStatisticsFactory.hpp"
 
@@ -35,8 +35,6 @@
 using std::chrono::milliseconds;
 using std::chrono::nanoseconds;
 
-const char* PoolStatsSampler::NC_PSS_Thread = "NC PSS Thread";
-
 PoolStatsSampler::PoolStatsSampler(milliseconds sampleRate, CacheImpl* cache,
                                    ThinClientPoolDM* distMan)
     : m_running(false),
@@ -48,7 +46,7 @@
           cache->getStatisticsManager().getStatisticsFactory()) {}
 
 void PoolStatsSampler::svc() {
-  client::DistributedSystemImpl::setThreadName(NC_PSS_Thread);
+  client::Log::setThreadName("NC PSS Thread");
   while (!m_stopRequested) {
     auto sampleStart = high_resolution_clock::now();
     putStatsInAdminRegion();
@@ -105,7 +103,7 @@
       auto obj = client::ClientHealthStats::create(
           gets, puts, misses, numListeners, numThreads, cpuTime, numCPU);
       const auto memId = m_distMan->getMembershipId();
-      clientId = memId->getDSMemberIdForThinClientUse();
+      clientId = memId->getClientId();
       auto keyPtr = client::CacheableString::create(clientId.c_str());
       m_adminRegion->put(keyPtr, obj);
     }
diff --git a/cppcache/src/statistics/ProcessStats.hpp b/cppcache/src/statistics/ProcessStats.hpp
index 0d6f4f7..b3de14b 100644
--- a/cppcache/src/statistics/ProcessStats.hpp
+++ b/cppcache/src/statistics/ProcessStats.hpp
@@ -33,7 +33,7 @@
  * This is necessary for monitoring the health of Geode components.
  *
  */
-class APACHE_GEODE_EXPORT ProcessStats {
+class ProcessStats {
  public:
   /**
    * Creates a new <code>ProcessStats</code> that wraps the given
diff --git a/cppcache/src/statistics/StatArchiveWriter.hpp b/cppcache/src/statistics/StatArchiveWriter.hpp
index 9940ebc..f3c6692 100644
--- a/cppcache/src/statistics/StatArchiveWriter.hpp
+++ b/cppcache/src/statistics/StatArchiveWriter.hpp
@@ -75,7 +75,7 @@
  *                 // of the Statistics object and the value of the
  *                 // descriptors in the previous sample run.
  */
-class APACHE_GEODE_EXPORT StatDataOutput {
+class StatDataOutput {
  public:
   explicit StatDataOutput(CacheImpl *cache);
   StatDataOutput(std::string, CacheImpl *cache);
@@ -135,7 +135,7 @@
   friend class StatArchiveWriter;
 };
 
-class APACHE_GEODE_EXPORT ResourceType {
+class ResourceType {
  public:
   ResourceType(int32_t id, const StatisticsType *type);
   ResourceType(const ResourceType &) = delete;
@@ -149,7 +149,7 @@
   const StatisticsType *type;
 };
 
-class APACHE_GEODE_EXPORT ResourceInst {
+class ResourceInst {
  public:
   ResourceInst(int32_t id, Statistics *, const ResourceType *,
                StatDataOutput *);
@@ -178,7 +178,7 @@
 
 class HostStatSampler;
 
-class APACHE_GEODE_EXPORT StatArchiveWriter {
+class StatArchiveWriter {
   HostStatSampler *sampler_;
   StatDataOutput *dataBuffer_;
   CacheImpl *cache_;
diff --git a/cppcache/src/statistics/StatSamplerStats.hpp b/cppcache/src/statistics/StatSamplerStats.hpp
index 386fe36..829f7f4 100644
--- a/cppcache/src/statistics/StatSamplerStats.hpp
+++ b/cppcache/src/statistics/StatSamplerStats.hpp
@@ -36,7 +36,7 @@
 /**
  * Statistics related to the statistic sampler.
  */
-class APACHE_GEODE_EXPORT StatSamplerStats {
+class StatSamplerStats {
   StatisticsType* samplerType;
   Statistics* samplerStats;
   int32_t sampleCountId;
diff --git a/cppcache/src/statistics/StatisticDescriptor.hpp b/cppcache/src/statistics/StatisticDescriptor.hpp
index 426f61e..2a96bad 100644
--- a/cppcache/src/statistics/StatisticDescriptor.hpp
+++ b/cppcache/src/statistics/StatisticDescriptor.hpp
@@ -40,7 +40,7 @@
  * StatisticDescriptors are naturally ordered by their name.
  *
  */
-class APACHE_GEODE_EXPORT StatisticDescriptor {
+class StatisticDescriptor {
  public:
   /**
    * Returns the id of this statistic in a {@link StatisticsType
diff --git a/cppcache/src/statistics/Statistics.hpp b/cppcache/src/statistics/Statistics.hpp
index b9440fe..db7054c 100644
--- a/cppcache/src/statistics/Statistics.hpp
+++ b/cppcache/src/statistics/Statistics.hpp
@@ -37,7 +37,7 @@
  * setting, incrementing and getting individual <code>StatisticDescriptor</code>
  * values.
  */
-class APACHE_GEODE_EXPORT Statistics {
+class Statistics {
  public:
   /**
    * Closes these statistics.  After statistics have been closed, they
diff --git a/cppcache/src/statistics/StatisticsFactory.hpp b/cppcache/src/statistics/StatisticsFactory.hpp
index 1a4aa95..5a301fc 100644
--- a/cppcache/src/statistics/StatisticsFactory.hpp
+++ b/cppcache/src/statistics/StatisticsFactory.hpp
@@ -52,7 +52,7 @@
  *
  */
 
-class APACHE_GEODE_EXPORT StatisticsFactory {
+class StatisticsFactory {
  protected:
   StatisticsFactory() = default;
   StatisticsFactory(const StatisticsFactory&) = delete;
diff --git a/cppcache/src/statistics/StatisticsManager.cpp b/cppcache/src/statistics/StatisticsManager.cpp
index 4f7b8d2..480cbeb 100644
--- a/cppcache/src/statistics/StatisticsManager.cpp
+++ b/cppcache/src/statistics/StatisticsManager.cpp
@@ -21,6 +21,7 @@
 
 #include <geode/Exception.hpp>
 #include <geode/internal/geode_globals.hpp>
+#include <geode/util/LogLevel.hpp>
 
 #include "../AdminRegion.hpp"
 #include "../util/Log.hpp"
@@ -35,6 +36,7 @@
 
 using client::Exception;
 using client::Log;
+using client::LogLevel;
 
 StatisticsManager::StatisticsManager(
     const char* filePath, const std::chrono::milliseconds sampleInterval,
@@ -95,15 +97,15 @@
       m_statsList.erase(m_statsList.begin(), m_statsList.end());
     }
   } catch (const Exception& ex) {
-    Log::warningCatch("~StatisticsManager swallowing Geode exception", ex);
-
+    Log::logCatch(LogLevel::Warning,
+                  "~StatisticsManager swallowing Geode exception", ex);
   } catch (const std::exception& ex) {
     std::string what = "~StatisticsManager swallowing std::exception: ";
     what += ex.what();
-    Log::warning(what.c_str());
+    LOGWARN(what.c_str());
 
   } catch (...) {
-    Log::error("~StatisticsManager swallowing unknown exception");
+    LOGERROR("~StatisticsManager swallowing unknown exception");
   }
 }
 
diff --git a/cppcache/src/statistics/StatisticsType.hpp b/cppcache/src/statistics/StatisticsType.hpp
index 527a9c8..a656fd5 100644
--- a/cppcache/src/statistics/StatisticsType.hpp
+++ b/cppcache/src/statistics/StatisticsType.hpp
@@ -44,7 +44,7 @@
  * {@link StatisticsFactory}.
  *
  */
-class APACHE_GEODE_EXPORT StatisticsType {
+class StatisticsType {
  public:
   /**
    * Returns the name of this statistics type.
diff --git a/cppcache/src/util/Log.hpp b/cppcache/src/util/Log.hpp
index 6ac930d..19f5e64 100644
--- a/cppcache/src/util/Log.hpp
+++ b/cppcache/src/util/Log.hpp
@@ -41,7 +41,7 @@
 #define GEODE_MAX_LOG_DISK_LIMIT (1024ll * 1024ll * 1024ll * 1024ll)
 #endif
 
-#define _GF_MSG_LIMIT 8192
+#define _GEODE_LOG_MESSAGE_LIMIT 8192
 
 namespace apache {
 namespace geode {
@@ -144,10 +144,13 @@
    * arguments
    */
   static void init
-      // 0 => use maximum value (currently 1G)
+      // 0 => use default value (currently 1GB for file, 1TB for disk)
       (LogLevel level, const char* logFileName, int32_t logFileLimit = 0,
        int64_t logDiskSpaceLimit = 0);
 
+  static void init(LogLevel level, const std::string& logFileName,
+                   int32_t logFileLimit = 0, int64_t logDiskSpaceLimit = 0);
+
   /**
    * closes logging facility (until next init).
    */
@@ -169,9 +172,7 @@
   static LogLevel charsToLevel(const std::string& chars);
 
   /**
-   * Fills the provided buffer with formatted log-line given the level
-   * and returns the buffer. This assumes that the buffer has large
-   * enough space left to hold the formatted log-line (around 70 chars).
+   * formats and returns a line for logging.
    *
    * This is provided so that applications wishing to use the same format
    * as Geode log-lines can do so easily. A log-line starts with the prefix
@@ -182,315 +183,116 @@
    * When invoking from outside either <init> should have been invoked,
    * or at least the first invocation should be single-threaded.
    */
-  static char* formatLogLine(char* buf, LogLevel level);
+  static std::string formatLogLine(LogLevel level);
 
-  /**
-   * Returns whether log messages at given level are enabled.
-   */
-  static bool enabled(LogLevel level);
+  static void log(LogLevel level, const std::string& msg);
 
-  /**
-   * Logs a message at given level.
-   */
-  static void log(LogLevel level, const char* msg);
+  static void log(LogLevel level, const char* fmt, ...);
 
-  /**
-   * Logs both a message and thrown exception.
-   */
-  static void logThrow(LogLevel level, const char* msg, const Exception& ex);
-
-  /**
-   * Logs both a message and caught exception.
-   */
   static void logCatch(LogLevel level, const char* msg, const Exception& ex);
 
-  /**
-   * Returns whether "error" log messages are enabled.
-   */
-  static bool errorEnabled();
+  static bool enabled(LogLevel level);
 
-  /**
-   * Logs a message.
-   * The message level is "error".
-   */
-  static void error(const char* msg);
-
-  static void error(const std::string& msg);
-
-  /**
-   * Logs both a message and thrown exception.
-   * The message level is "error".
-   */
-  static void errorThrow(const char* msg, const Exception& ex);
-
-  /**
-   * Writes both a message and caught exception.
-   * The message level is "error".
-   */
-  static void errorCatch(const char* msg, const Exception& ex);
-
-  /**
-   * Returns whether "warning" log messages are enabled.
-   */
-  static bool warningEnabled();
-
-  /**
-   * Logs a message.
-   * The message level is "warning".
-   */
-  static void warning(const char* msg);
-
-  /**
-   * Logs both a message and thrown exception.
-   * The message level is "warning".
-   */
-  static void warningThrow(const char* msg, const Exception& ex);
-
-  /**
-   * Writes both a message and caught exception.
-   * The message level is "warning".
-   */
-  static void warningCatch(const char* msg, const Exception& ex);
-
-  /**
-   * Returns whether "info" log messages are enabled.
-   */
-  static bool infoEnabled();
-
-  /**
-   * Logs a message.
-   * The message level is "info".
-   */
-  static void info(const char* msg);
-
-  /**
-   * Logs both a message and thrown exception.
-   * The message level is "info".
-   */
-  static void infoThrow(const char* msg, const Exception& ex);
-
-  /**
-   * Writes both a message and caught exception.
-   * The message level is "info".
-   */
-  static void infoCatch(const char* msg, const Exception& ex);
-
-  /**
-   * Returns whether "config" log messages are enabled.
-   */
-  static bool configEnabled();
-
-  /**
-   * Logs a message.
-   * The message level is "config".
-   */
-  static void config(const char* msg);
-
-  /**
-   * Logs both a message and thrown exception.
-   * The message level is "config".
-   */
-  static void configThrow(const char* msg, const Exception& ex);
-
-  /**
-   * Writes both a message and caught exception.
-   * The message level is "config".
-   */
-  static void configCatch(const char* msg, const Exception& ex);
-
-  /**
-   * Returns whether "fine" log messages are enabled.
-   */
-  static bool fineEnabled();
-
-  /**
-   * Logs a message.
-   * The message level is "fine".
-   */
-  static void fine(const char* msg);
-
-  /**
-   * Logs both a message and thrown exception.
-   * The message level is "fine".
-   */
-  static void fineThrow(const char* msg, const Exception& ex);
-
-  /**
-   * Writes both a message and caught exception.
-   * The message level is "fine".
-   */
-  static void fineCatch(const char* msg, const Exception& ex);
-
-  /**
-   * Returns whether "finer" log messages are enabled.
-   */
-  static bool finerEnabled();
-
-  /**
-   * Logs a message.
-   * The message level is "finer".
-   */
-  static void finer(const char* msg);
-
-  /**
-   * Logs both a message and thrown exception.
-   * The message level is "finer".
-   */
-  static void finerThrow(const char* msg, const Exception& ex);
-
-  /**
-   * Writes both a message and caught exception.
-   * The message level is "finer".
-   */
-  static void finerCatch(const char* msg, const Exception& ex);
-
-  /**
-   * Returns whether "finest" log messages are enabled.
-   */
-  static bool finestEnabled();
-
-  /**
-   * Logs a message.
-   * The message level is "finest".
-   */
-  static void finest(const char* msg);
-
-  /**
-   * Logs both a message and thrown exception.
-   * The message level is "finest".
-   */
-  static void finestThrow(const char* msg, const Exception& ex);
-
-  /**
-   * Writes both a message and caught exception.
-   * The message level is "finest".
-   */
-  static void finestCatch(const char* msg, const Exception& ex);
-
-  /**
-   * Returns whether "debug" log messages are enabled.
-   */
-  static bool debugEnabled();
-
-  /**
-   * Logs a message.
-   * The message level is "debug".
-   */
-  static void debug(const char* msg);
-
-  /**
-   * Logs both a message and thrown exception.
-   * The message level is "debug".
-   */
-  static void debugThrow(const char* msg, const Exception& ex);
-
-  /**
-   * Writes both a message and caught exception.
-   * The message level is "debug".
-   */
-  static void debugCatch(const char* msg, const Exception& ex);
-
-  static void enterFn(LogLevel level, const char* functionName);
-
-  static void exitFn(LogLevel level, const char* functionName);
+  static void setThreadName(const std::string& threadName);
 
  private:
   static LogLevel s_logLevel;
 
   static void writeBanner();
 
- public:
-  static void put(LogLevel level, const std::string& msg);
+  static void validateSizeLimits(int64_t fileSizeLimit, int64_t diskSpaceLimit);
 
-  static void put(LogLevel level, const char* msg);
+  static void validateLogFileName(const std::string& filename);
 
-  static void putThrow(LogLevel level, const char* msg, const Exception& ex);
+  static void rollLogFile();
 
-  static void putCatch(LogLevel level, const char* msg, const Exception& ex);
+  static void removeOldestRolledLogFile();
+
+  static void buildRollFileMapping();
+
+  static void setRollFileIndex();
+
+  static void setSizeLimits(int32_t logFileLimit, int64_t logDiskSpaceLimit);
+
+  static void logInternal(LogLevel level, const std::string& msg);
+
+  static void calculateUsedDiskSpace();
 };
 
-class APACHE_GEODE_EXPORT LogFn {
-  const char* m_functionName;
-  LogLevel m_level;
-
- public:
-  explicit LogFn(const char* functionName, LogLevel level = LogLevel::Finest);
-
-  ~LogFn();
-
-  LogFn(const LogFn& rhs) = delete;
-  LogFn& operator=(const LogFn& rhs) = delete;
-};
-
-class APACHE_GEODE_EXPORT LogVarargs {
- public:
-  static void debug(const char* fmt, ...);
-  static void error(const char* fmt, ...);
-  static void warn(const char* fmt, ...);
-  static void info(const char* fmt, ...);
-  static void config(const char* fmt, ...);
-  static void fine(const char* fmt, ...);
-  static void finer(const char* fmt, ...);
-  static void finest(const char* fmt, ...);
-
-  static void debug(const std::string& message);
-
-  static void error(const std::string& message);
-
-  static void warn(const std::string& message);
-
-  static void info(const std::string& message);
-
-  static void config(const std::string& message);
-
-  static void fine(const std::string& message);
-
-  static void finer(const std::string& message);
-
-  static void finest(const std::string& message);
-};
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
 
-#define LOGDEBUG                                  \
-  if (::apache::geode::client::LogLevel::Debug <= \
-      ::apache::geode::client::Log::logLevel())   \
-  ::apache::geode::client::LogVarargs::debug
+#define LOGERROR(...)                                             \
+  do {                                                            \
+    if (::apache::geode::client::Log::enabled(                    \
+            apache::geode::client::LogLevel::Error)) {            \
+      ::apache::geode::client::Log::log(                          \
+          ::apache::geode::client::LogLevel::Error, __VA_ARGS__); \
+    }                                                             \
+  } while (false)
 
-#define LOGERROR                                  \
-  if (::apache::geode::client::LogLevel::Error <= \
-      ::apache::geode::client::Log::logLevel())   \
-  ::apache::geode::client::LogVarargs::error
+#define LOGWARN(...)                                                \
+  do {                                                              \
+    if (::apache::geode::client::Log::enabled(                      \
+            apache::geode::client::LogLevel::Warning)) {            \
+      ::apache::geode::client::Log::log(                            \
+          ::apache::geode::client::LogLevel::Warning, __VA_ARGS__); \
+    }                                                               \
+  } while (false)
 
-#define LOGWARN                                     \
-  if (::apache::geode::client::LogLevel::Warning <= \
-      ::apache::geode::client::Log::logLevel())     \
-  ::apache::geode::client::LogVarargs::warn
+#define LOGINFO(...)                                             \
+  do {                                                           \
+    if (::apache::geode::client::Log::enabled(                   \
+            apache::geode::client::LogLevel::Info)) {            \
+      ::apache::geode::client::Log::log(                         \
+          ::apache::geode::client::LogLevel::Info, __VA_ARGS__); \
+    }                                                            \
+  } while (false)
 
-#define LOGINFO                                  \
-  if (::apache::geode::client::LogLevel::Info <= \
-      ::apache::geode::client::Log::logLevel())  \
-  ::apache::geode::client::LogVarargs::info
+#define LOGCONFIG(...)                                             \
+  do {                                                             \
+    if (::apache::geode::client::Log::enabled(                     \
+            apache::geode::client::LogLevel::Config)) {            \
+      ::apache::geode::client::Log::log(                           \
+          ::apache::geode::client::LogLevel::Config, __VA_ARGS__); \
+    }                                                              \
+  } while (false)
 
-#define LOGCONFIG                                  \
-  if (::apache::geode::client::LogLevel::Config <= \
-      ::apache::geode::client::Log::logLevel())    \
-  ::apache::geode::client::LogVarargs::config
+#define LOGFINE(...)                                             \
+  do {                                                           \
+    if (::apache::geode::client::Log::enabled(                   \
+            apache::geode::client::LogLevel::Fine)) {            \
+      ::apache::geode::client::Log::log(                         \
+          ::apache::geode::client::LogLevel::Fine, __VA_ARGS__); \
+    }                                                            \
+  } while (false)
 
-#define LOGFINE                                  \
-  if (::apache::geode::client::LogLevel::Fine <= \
-      ::apache::geode::client::Log::logLevel())  \
-  ::apache::geode::client::LogVarargs::fine
+#define LOGFINER(...)                                             \
+  do {                                                            \
+    if (::apache::geode::client::Log::enabled(                    \
+            apache::geode::client::LogLevel::Finer)) {            \
+      ::apache::geode::client::Log::log(                          \
+          ::apache::geode::client::LogLevel::Finer, __VA_ARGS__); \
+    }                                                             \
+  } while (false)
 
-#define LOGFINER                                  \
-  if (::apache::geode::client::LogLevel::Finer <= \
-      ::apache::geode::client::Log::logLevel())   \
-  ::apache::geode::client::LogVarargs::finer
+#define LOGFINEST(...)                                             \
+  do {                                                             \
+    if (::apache::geode::client::Log::enabled(                     \
+            apache::geode::client::LogLevel::Finest)) {            \
+      ::apache::geode::client::Log::log(                           \
+          ::apache::geode::client::LogLevel::Finest, __VA_ARGS__); \
+    }                                                              \
+  } while (false)
 
-#define LOGFINEST                                  \
-  if (::apache::geode::client::LogLevel::Finest <= \
-      ::apache::geode::client::Log::logLevel())    \
-  ::apache::geode::client::LogVarargs::finest
+#define LOGDEBUG(...)                                             \
+  do {                                                            \
+    if (::apache::geode::client::Log::enabled(                    \
+            apache::geode::client::LogLevel::Debug)) {            \
+      ::apache::geode::client::Log::log(                          \
+          ::apache::geode::client::LogLevel::Debug, __VA_ARGS__); \
+    }                                                             \
+  } while (false)
 
 #endif  // GEODE_LOG_H_
diff --git a/cppcache/src/util/concurrent/binary_semaphore.cpp b/cppcache/src/util/concurrent/binary_semaphore.cpp
new file mode 100644
index 0000000..74cb3e6
--- /dev/null
+++ b/cppcache/src/util/concurrent/binary_semaphore.cpp
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+#include "binary_semaphore.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
+binary_semaphore::binary_semaphore(bool released) : released_(released) {}
+
+void binary_semaphore::release() {
+  std::lock_guard<std::mutex> lock(mutex_);
+  released_ = true;
+  cv_.notify_one();
+}
+
+void binary_semaphore::acquire() {
+  std::unique_lock<std::mutex> lock(mutex_);
+  cv_.wait(lock, [this]() { return released_; });
+  released_ = false;
+}
+
+bool binary_semaphore::try_acquire_for(
+    const std::chrono::milliseconds& period) {
+  std::unique_lock<std::mutex> lock(mutex_);
+  if (!cv_.wait_for(lock, period, [this]() { return released_; })) {
+    return false;
+  }
+
+  released_ = false;
+  return true;
+}
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
diff --git a/cppcache/src/FunctionServiceImpl.cpp b/cppcache/src/util/concurrent/binary_semaphore.hpp
similarity index 62%
rename from cppcache/src/FunctionServiceImpl.cpp
rename to cppcache/src/util/concurrent/binary_semaphore.hpp
index 1f91209..3fb3526 100644
--- a/cppcache/src/FunctionServiceImpl.cpp
+++ b/cppcache/src/util/concurrent/binary_semaphore.hpp
@@ -15,25 +15,35 @@
  * limitations under the License.
  */
 
-#include "FunctionServiceImpl.hpp"
+#pragma once
 
-#include <geode/PoolManager.hpp>
+#ifndef GEODE_UTIL_CONCURRENT_BINARY_SEMAPHORE_H_
+#define GEODE_UTIL_CONCURRENT_BINARY_SEMAPHORE_H_
 
-#include "ExecutionImpl.hpp"
+#include <condition_variable>
+#include <mutex>
+
+#include <geode/internal/geode_globals.hpp>
 
 namespace apache {
 namespace geode {
 namespace client {
+class APACHE_GEODE_EXPORT binary_semaphore {
+ public:
+  explicit binary_semaphore(bool released);
 
-FunctionServiceImpl::FunctionServiceImpl(AuthenticatedView* authenticatedView) {
-  m_authenticatedView = authenticatedView;
-}
+  void release();
+  void acquire();
+  bool try_acquire_for(const std::chrono::milliseconds& period);
 
-std::shared_ptr<FunctionService> FunctionServiceImpl::getFunctionService(
-    AuthenticatedView* authenticatedView) {
-  return std::make_shared<FunctionServiceImpl>(authenticatedView);
-}
+ protected:
+  bool released_;
+  std::mutex mutex_;
+  std::condition_variable cv_;
+};
 
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
+
+#endif /* GEODE_UTIL_CONCURRENT_BINARY_SEMAPHORE_H_ */
diff --git a/cppcache/src/util/exception.hpp b/cppcache/src/util/exception.hpp
index 6e472b4..a839531 100644
--- a/cppcache/src/util/exception.hpp
+++ b/cppcache/src/util/exception.hpp
@@ -30,15 +30,13 @@
 namespace geode {
 namespace client {
 
-extern void APACHE_GEODE_EXPORT GfErrTypeThrowException(const char* str,
-                                                        GfErrType err);
+extern void GfErrTypeThrowException(const char* str, GfErrType err);
 
-#define throwExceptionIfError(str, err)  \
-  do {                                   \
-    if (err != GF_NOERR) {               \
-      GfErrTypeThrowException(str, err); \
-    }                                    \
-  } while (0)
+inline void throwExceptionIfError(const char* str, GfErrType err) {
+  if (err != GF_NOERR) {
+    GfErrTypeThrowException(str, err);
+  }
+}
 
 }  // namespace client
 }  // namespace geode
diff --git a/cppcache/static/CMakeLists.txt b/cppcache/static/CMakeLists.txt
index 6a63a94..9bd40ba 100644
--- a/cppcache/static/CMakeLists.txt
+++ b/cppcache/static/CMakeLists.txt
@@ -52,7 +52,10 @@
   )
 endif()
 
-set_target_properties(apache-geode-static PROPERTIES INTERPROCEDURAL_OPTIMIZATION FALSE)
+set_target_properties(apache-geode-static PROPERTIES 
+  INTERPROCEDURAL_OPTIMIZATION FALSE
+  POSITION_INDEPENDENT_CODE ON
+)
 
 # BEGIN Visual Studio organization
 source_group("Header Files" REGULAR_EXPRESSION "\.(hpp|inl)$")
diff --git a/cppcache/test/ByteArrayFixture.cpp b/cppcache/test/ByteArrayFixture.cpp
index 4cb6b3b..a03bc20 100644
--- a/cppcache/test/ByteArrayFixture.cpp
+++ b/cppcache/test/ByteArrayFixture.cpp
@@ -20,7 +20,7 @@
 ::testing::AssertionResult ByteArrayFixture::assertByteArrayEqual(
     const char* /*expectedStr*/, const char* /*bytesStr*/, const char* expected,
     const apache::geode::client::ByteArray& bytes) {
-  // One would normally just use std::regex but gcc 4.4.7 is lacking.
+  // One would normally just use boost::regex but gcc 4.4.7 is lacking.
   const std::string actual(apache::geode::client::ByteArray::toString(bytes));
   std::string::size_type actualPos = 0;
   const std::string pattern(expected);
diff --git a/cppcache/test/CMakeLists.txt b/cppcache/test/CMakeLists.txt
index 2fee415..8736b0f 100644
--- a/cppcache/test/CMakeLists.txt
+++ b/cppcache/test/CMakeLists.txt
@@ -32,26 +32,35 @@
   CacheXmlParserTest.cpp
   ChunkedHeaderTest.cpp
   ClientConnectionResponseTest.cpp
+  ClientMetadataServiceTest.cpp
   ClientProxyMembershipIDTest.cpp
   ConnectionQueueTest.cpp
   DataInputTest.cpp
   DataOutputTest.cpp
   ExceptionTypesTest.cpp
+  ExpiryTaskTest.cpp
+  ExpiryTaskManagerTest.cpp
   GatewaySenderEventCallbackArgumentTest.cpp
   geodeBannerTest.cpp
   gtest_extensions.h
-  InterestResultPolicyTest.cpp
+  gmock_extensions.h
   LocalRegionTest.cpp
+  LoggingTest.cpp
   LRUQueueTest.cpp
+  PartitionTest.cpp
   PdxInstanceImplTest.cpp
   PdxTypeTest.cpp
   QueueConnectionRequestTest.cpp
   RegionAttributesFactoryTest.cpp
   SerializableCreateTests.cpp
+  StringPrefixPartitionResolverTest.cpp
   StructSetTest.cpp
   TcrMessageTest.cpp
   ThreadPoolTest.cpp
+  TXIdTest.cpp
+  mock/MockExpiryTask.hpp
   mock/MapEntryImplMock.hpp
+  mock/ClientMetadataMock.hpp
   statistics/HostStatSamplerTest.cpp
   util/functionalTests.cpp
   util/JavaModifiedUtf8Tests.cpp
diff --git a/cppcache/test/CacheableDateTest.cpp b/cppcache/test/CacheableDateTest.cpp
index a22774e..e133551 100644
--- a/cppcache/test/CacheableDateTest.cpp
+++ b/cppcache/test/CacheableDateTest.cpp
@@ -26,14 +26,14 @@
 
 using apache::geode::client::CacheableDate;
 
-TEST(CacheableDateTest, constructFrom_time_t_WithDefault) {
+TEST(CacheableDateTest, constructFromTimeTWithDefault) {
   const CacheableDate cacheableDate;
 
   EXPECT_EQ(0, cacheableDate.milliseconds());
   EXPECT_EQ(0, static_cast<time_t>(cacheableDate));
 }
 
-TEST(CacheableDateTest, constructFrom_time_t) {
+TEST(CacheableDateTest, constructFromTimeT) {
   time_t time = 0;
   std::time(&time);
   CacheableDate cacheableDate(time);
@@ -42,7 +42,7 @@
   EXPECT_EQ(time, static_cast<time_t>(cacheableDate));
 }
 
-TEST(CacheableDateTest, constructFrom_time_point) {
+TEST(CacheableDateTest, constructFromTimePoint) {
   const auto timePoint = CacheableDate::clock::now();
   const CacheableDate cacheableDate(timePoint);
 
@@ -61,7 +61,7 @@
   EXPECT_EQ(time, static_cast<time_t>(cacheableDate));
 }
 
-TEST(CacheableDateTest, constructFrom_duration) {
+TEST(CacheableDateTest, constructFromDuration) {
   const auto duration = CacheableDate::duration(1000);
   const CacheableDate cacheableDate(duration);
 
diff --git a/cppcache/test/CacheableKeyCreateTests.cpp b/cppcache/test/CacheableKeyCreateTests.cpp
index 901671f..6216e97 100644
--- a/cppcache/test/CacheableKeyCreateTests.cpp
+++ b/cppcache/test/CacheableKeyCreateTests.cpp
@@ -36,7 +36,7 @@
 using apache::geode::client::CacheableKey;
 using apache::geode::client::CacheableString;
 
-TEST(CacheableKeyCreateTests, forArrayOf_constchar) {
+TEST(CacheableKeyCreateTests, forArrayOfConstChar) {
   const auto cacheableKey = CacheableKey::create("test");
   ASSERT_TRUE(nullptr != cacheableKey);
   auto&& cacheableString =
@@ -45,7 +45,7 @@
   EXPECT_EQ(cacheableString->value(), "test");
 }
 
-TEST(CacheableKeyCreateTests, forArrayOf_char) {
+TEST(CacheableKeyCreateTests, forArrayOfChar) {
   char* test = new char[5]{'t', 'e', 's', 't', '\0'};
   const auto cacheableKey = CacheableKey::create(test);
   ASSERT_TRUE(nullptr != cacheableKey);
@@ -55,7 +55,7 @@
   EXPECT_EQ(cacheableString->value(), "test");
 }
 
-TEST(CacheableKeyCreateTests, forArrayOf_char16_t) {
+TEST(CacheableKeyCreateTests, forArrayOfChar16) {
   const auto cacheableKey = CacheableKey::create(u"test");
   ASSERT_TRUE(nullptr != cacheableKey);
   auto&& cacheableString =
@@ -64,7 +64,7 @@
   EXPECT_EQ(cacheableString->value(), "test");
 }
 
-TEST(CacheableKeyCreateTests, forArrayOf_char32_t) {
+TEST(CacheableKeyCreateTests, forArrayOfChar32) {
   const auto cacheableKey = CacheableKey::create(U"test");
   ASSERT_TRUE(nullptr != cacheableKey);
   auto&& cacheableString =
@@ -73,7 +73,7 @@
   ASSERT_EQ(cacheableString->value(), "test");
 }
 
-TEST(CacheableKeyCreateTests, forArrayOf_wchar_t) {
+TEST(CacheableKeyCreateTests, forArrayOfWchar) {
   const auto cacheableKey = CacheableKey::create(L"test");
   ASSERT_TRUE(nullptr != cacheableKey);
   auto&& cacheableString =
@@ -82,7 +82,7 @@
   EXPECT_EQ(cacheableString->value(), "test");
 }
 
-TEST(CacheableKeyCreateTests, for_string) {
+TEST(CacheableKeyCreateTests, forString) {
   const auto cacheableKey = CacheableKey::create(std::string("test"));
   ASSERT_TRUE(nullptr != cacheableKey);
   auto&& cacheableString =
@@ -91,7 +91,7 @@
   EXPECT_EQ(cacheableString->value(), "test");
 }
 
-TEST(CacheableKeyCreateTests, for_u16string) {
+TEST(CacheableKeyCreateTests, forU16string) {
   const auto cacheableKey = CacheableKey::create(std::u16string(u"test"));
   ASSERT_TRUE(nullptr != cacheableKey);
   auto&& cacheableString =
@@ -100,7 +100,7 @@
   EXPECT_EQ(cacheableString->value(), "test");
 }
 
-TEST(CacheableKeyCreateTests, for_u32string) {
+TEST(CacheableKeyCreateTests, forU32string) {
   const auto cacheableKey = CacheableKey::create(std::u32string(U"test"));
   ASSERT_TRUE(nullptr != cacheableKey);
   auto&& cacheableString =
@@ -109,7 +109,7 @@
   EXPECT_EQ(cacheableString->value(), "test");
 }
 
-TEST(CacheableKeyCreateTests, for_wstring) {
+TEST(CacheableKeyCreateTests, forWstring) {
   const auto cacheableKey = CacheableKey::create(std::wstring(L"test"));
   ASSERT_TRUE(nullptr != cacheableKey);
   auto&& cacheableString =
@@ -118,7 +118,7 @@
   EXPECT_EQ(cacheableString->value(), "test");
 }
 
-TEST(CacheableKeyCreateTests, for_int8_t) {
+TEST(CacheableKeyCreateTests, forInt8) {
   const auto cacheableKey = CacheableKey::create(static_cast<int8_t>(1));
   ASSERT_TRUE(nullptr != cacheableKey);
   auto&& cacheableByte = std::dynamic_pointer_cast<CacheableByte>(cacheableKey);
@@ -126,7 +126,7 @@
   EXPECT_EQ(cacheableByte->value(), 1);
 }
 
-TEST(CacheableKeyCreateTests, for_int16_t) {
+TEST(CacheableKeyCreateTests, forInt16) {
   const auto cacheableKey = CacheableKey::create(static_cast<int16_t>(1));
   ASSERT_TRUE(nullptr != cacheableKey);
   auto&& cacheableInt16 =
@@ -135,7 +135,7 @@
   ASSERT_EQ(cacheableInt16->value(), 1);
 }
 
-TEST(CacheableKeyCreateTests, for_int32_t) {
+TEST(CacheableKeyCreateTests, forInt32) {
   const auto cacheableKey = CacheableKey::create(static_cast<int32_t>(1));
   ASSERT_TRUE(nullptr != cacheableKey);
   auto&& cacheableInt32 =
@@ -144,7 +144,7 @@
   ASSERT_EQ(cacheableInt32->value(), 1);
 }
 
-TEST(CacheableKeyCreateTests, for_int64_t) {
+TEST(CacheableKeyCreateTests, forInt64) {
   const auto cacheableKey = CacheableKey::create(static_cast<int64_t>(1));
   ASSERT_TRUE(nullptr != cacheableKey);
   auto&& cacheableInt64 =
@@ -153,7 +153,7 @@
   EXPECT_EQ(cacheableInt64->value(), 1);
 }
 
-TEST(CacheableKeyCreateTests, for_char16_t) {
+TEST(CacheableKeyCreateTests, forChar16) {
   const auto cacheableKey = CacheableKey::create(u'a');
   ASSERT_TRUE(nullptr != cacheableKey);
   auto&& cacheableCharacter =
@@ -162,7 +162,7 @@
   EXPECT_EQ(cacheableCharacter->value(), u'a');
 }
 
-TEST(CacheableKeyCreateTests, for_float) {
+TEST(CacheableKeyCreateTests, forFloat) {
   const auto cacheableKey = CacheableKey::create(1.1f);
   ASSERT_TRUE(nullptr != cacheableKey);
   auto&& cacheableFloat =
@@ -171,7 +171,7 @@
   EXPECT_EQ(cacheableFloat->value(), 1.1f);
 }
 
-TEST(CacheableKeyCreateTests, for_double) {
+TEST(CacheableKeyCreateTests, forDouble) {
   const auto cacheableKey = CacheableKey::create(1.1);
   ASSERT_TRUE(nullptr != cacheableKey);
   auto&& cacheableDouble =
@@ -180,7 +180,7 @@
   EXPECT_EQ(cacheableDouble->value(), 1.1);
 }
 
-TEST(CacheableKeyCreateTests, for_bool) {
+TEST(CacheableKeyCreateTests, forBool) {
   const auto cacheableKey = CacheableKey::create(true);
   ASSERT_TRUE(nullptr != cacheableKey);
   auto&& cacheableBoolean =
@@ -189,7 +189,7 @@
   EXPECT_EQ(cacheableBoolean->value(), true);
 }
 
-TEST(CacheableKeyCreateTests, for_timepoint) {
+TEST(CacheableKeyCreateTests, forTimepoint) {
   auto time = std::chrono::system_clock::now();
   const auto cacheableKey = CacheableKey::create(time);
   ASSERT_TRUE(nullptr != cacheableKey);
diff --git a/cppcache/test/CacheableKeysTest.cpp b/cppcache/test/CacheableKeysTest.cpp
index 58167d9..1b5a1ca 100644
--- a/cppcache/test/CacheableKeysTest.cpp
+++ b/cppcache/test/CacheableKeysTest.cpp
@@ -26,25 +26,25 @@
       << "Two different bool values have different hashcodes";
 }
 
-TEST(CacheableKeysTest, int8_tDifferentHashCodes) {
+TEST(CacheableKeysTest, int8DifferentHashCodes) {
   EXPECT_NE(hashcode(static_cast<int8_t>(37)),
             hashcode(static_cast<int8_t>(42)))
       << "Two different int8_t values have different hashcodes";
 }
 
-TEST(CacheableKeysTest, int16_tDifferentHashCodes) {
+TEST(CacheableKeysTest, int16DifferentHashCodes) {
   EXPECT_NE(hashcode(static_cast<int8_t>(37)),
             hashcode(static_cast<int8_t>(42)))
       << "Two different int16_t values have different hashcodes";
 }
 
-TEST(CacheableKeysTest, int32_tDifferentHashCodes) {
+TEST(CacheableKeysTest, int32DifferentHashCodes) {
   EXPECT_NE(hashcode(static_cast<int8_t>(37)),
             hashcode(static_cast<int8_t>(42)))
       << "Two different int32_t values have different hashcodes";
 }
 
-TEST(CacheableKeysTest, int64_tDifferentHashCodes) {
+TEST(CacheableKeysTest, int64DifferentHashCodes) {
   EXPECT_NE(hashcode(static_cast<int8_t>(37)),
             hashcode(static_cast<int8_t>(42)))
       << "Two different int64_t values have different hashcodes";
diff --git a/cppcache/test/CacheableStringTests.cpp b/cppcache/test/CacheableStringTests.cpp
index c4a15fe..0c330e6 100644
--- a/cppcache/test/CacheableStringTests.cpp
+++ b/cppcache/test/CacheableStringTests.cpp
@@ -15,21 +15,17 @@
  * limitations under the License.
  */
 
-#include <stdint.h>
-
+#include <cstdint>
 #include <limits>
-#include <regex>
 
 #include <gtest/gtest.h>
 
-#include <geode/CacheFactory.hpp>
 #include <geode/DataOutput.hpp>
 
 #include "ByteArrayFixture.hpp"
 #include "DataInputInternal.hpp"
 #include "DataOutputInternal.hpp"
 #include "SerializationRegistry.hpp"
-#include "gtest_extensions.h"
 
 namespace {
 
diff --git a/cppcache/test/ChunkedHeaderTest.cpp b/cppcache/test/ChunkedHeaderTest.cpp
index 767c8fc..a1280e9 100644
--- a/cppcache/test/ChunkedHeaderTest.cpp
+++ b/cppcache/test/ChunkedHeaderTest.cpp
@@ -34,7 +34,7 @@
 class TcrMessageTestFixture : public TcrMessage {
  public:
   TcrMessageTestFixture() : TcrMessage() {}
-  virtual ~TcrMessageTestFixture() {}
+  ~TcrMessageTestFixture() noexcept override = default;
 };
 }  // namespace
 
diff --git a/cppcache/test/ClientMetadataServiceTest.cpp b/cppcache/test/ClientMetadataServiceTest.cpp
new file mode 100644
index 0000000..867b27d
--- /dev/null
+++ b/cppcache/test/ClientMetadataServiceTest.cpp
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+#include <BucketServerLocation.hpp>
+#include <ClientMetadata.hpp>
+#include <ClientMetadataService.hpp>
+
+#include <gtest/gtest.h>
+
+#include "gmock/gmock.h"
+#include "mock/ClientMetadataMock.hpp"
+
+using ::testing::_;
+using ::testing::Return;
+
+namespace apache {
+namespace geode {
+namespace client {
+
+TEST(ClientMetadataServiceTest, testWhenBucketLocationIsNotAvailable) {
+  auto mock = std::make_shared<ClientMetadataMock>();
+
+  ClientMetadataService::BucketSet bucketSet({1, 2, 3});
+
+  std::vector<std::shared_ptr<BucketServerLocation>> emptyBucketList;
+
+  EXPECT_CALL(*mock, adviseServerLocations(_))
+      .WillOnce(Return(emptyBucketList));
+
+  ASSERT_EQ(nullptr, ClientMetadataService::pruneNodes(mock, bucketSet));
+}
+
+TEST(ClientMetadataServiceTest, testBucketAvailable) {
+  auto mock = std::make_shared<ClientMetadataMock>();
+
+  ClientMetadataService::BucketSet bucketSet({0, 1});
+
+  auto bucket =
+      std::make_shared<BucketServerLocation>(0, 2, "server1", true, 1);
+  auto bucket1 =
+      std::make_shared<BucketServerLocation>(1, 23, "server2", true, 1);
+
+  std::vector<std::shared_ptr<BucketServerLocation>>
+      m_bucketServerLocationsList;
+  m_bucketServerLocationsList.push_back(bucket);
+
+  std::vector<std::shared_ptr<BucketServerLocation>>
+      m_bucketServerLocationsList1;
+  m_bucketServerLocationsList1.push_back(bucket1);
+
+  EXPECT_CALL(*mock, adviseServerLocations(_))
+      .WillOnce(Return(m_bucketServerLocationsList))
+      .WillOnce(Return(m_bucketServerLocationsList1));
+
+  ASSERT_EQ(2, ClientMetadataService::pruneNodes(mock, bucketSet)->size());
+}
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
diff --git a/cppcache/test/ClientProxyMembershipIDTest.cpp b/cppcache/test/ClientProxyMembershipIDTest.cpp
index fba153e..fc8955e 100644
--- a/cppcache/test/ClientProxyMembershipIDTest.cpp
+++ b/cppcache/test/ClientProxyMembershipIDTest.cpp
@@ -15,10 +15,10 @@
  * limitations under the License.
  */
 
-#include <regex>
 #include <vector>
 
 #include <boost/endian/conversion.hpp>
+#include <boost/regex.hpp>
 
 #include <gtest/gtest.h>
 
@@ -49,8 +49,8 @@
       cpmID.hashcode(),
       apache::geode::client::internal::geode_hash<std::string>{}(":0:0:0:1") +
           static_cast<int32_t>(cpmID.getHostPort()));
-  EXPECT_TRUE(std::regex_search(
-      cpmID.getDSMemberIdForThinClientUse(),
-      std::regex(
+  EXPECT_TRUE(boost::regex_search(
+      cpmID.getClientId(),
+      boost::regex(
           std::string("localhost(.*):2:").append(uniqueTag).append(":myDs"))));
 }
diff --git a/cppcache/test/DataInputTest.cpp b/cppcache/test/DataInputTest.cpp
index 27d22e8..1ac81cc 100644
--- a/cppcache/test/DataInputTest.cpp
+++ b/cppcache/test/DataInputTest.cpp
@@ -62,9 +62,7 @@
  public:
   explicit TestDataInput(const char *str)
       : m_byteArray(ByteArray::fromString(str)),
-        m_dataInput(m_byteArray.get(), m_byteArray.size()) {
-    // NOP
-  }
+        m_dataInput(m_byteArray.get(), m_byteArray.size()) {}
 
   void read(uint8_t *value) { *value = m_dataInput.read(); }
 
@@ -258,8 +256,16 @@
   DataOutputInternal stream;
   stream.writeUTF(expectedString);
 
-  DataInputUnderTest dataInput(stream.getBufferCopy(),
-                               stream.getBufferLength());
+  size_t outputBufferSize;
+  auto outputBuffer = stream.getBuffer(&outputBufferSize);
+
+  auto buffer = std::unique_ptr<uint8_t, decltype(free) *>{
+      reinterpret_cast<uint8_t *>(
+          std::malloc(sizeof(uint8_t) * outputBufferSize)),
+      std::free};
+  std::memcpy(buffer.get(), outputBuffer, outputBufferSize);
+
+  DataInputUnderTest dataInput(buffer.get(), stream.getBufferLength());
   auto actualString = dataInput.readUTF();
 
   EXPECT_TRUE(expectedString == actualString);
@@ -315,7 +321,7 @@
   EXPECT_EQ(true, value) << "Correct bool";
 }
 
-TEST_F(DataInputTest, TestReadUint8_tBytesOnly) {
+TEST_F(DataInputTest, TestReadUint8BytesOnly) {
   TestDataInput dataInput("BABEFACE");
   uint8_t buffer[4];
   ::memset(buffer, 0U, 4 * sizeof(uint8_t));
@@ -326,7 +332,7 @@
   EXPECT_EQ(static_cast<uint8_t>(206U), buffer[3]) << "Correct third uint8_t";
 }
 
-TEST_F(DataInputTest, TestReadInt8_tBytesOnly) {
+TEST_F(DataInputTest, TestReadInt8BytesOnly) {
   TestDataInput dataInput("DEADBEEF");
   int8_t buffer[4];
   ::memset(buffer, 0, 4 * sizeof(int8_t));
@@ -337,32 +343,38 @@
   EXPECT_EQ(static_cast<int8_t>(-17), buffer[3]) << "Correct third int8_t";
 }
 
-TEST_F(DataInputTest, TestReadUint8_tBytes) {
+TEST_F(DataInputTest, TestReadUint8Bytes) {
   TestDataInput dataInput("04BABEFACE");
   uint8_t *buffer = nullptr;
   int32_t len = 0;
   dataInput.readBytes(&buffer, &len);
-  EXPECT_NE(static_cast<uint8_t *>(nullptr), buffer) << "Non-null buffer";
+  auto bufferGuard = std::unique_ptr<uint8_t[]>{buffer};
+  ASSERT_NE(nullptr, buffer) << "Non-null buffer";
   ASSERT_EQ(4, len) << "Correct length";
-  EXPECT_EQ(static_cast<uint8_t>(186U), buffer[0]) << "Correct zeroth uint8_t";
-  EXPECT_EQ(static_cast<uint8_t>(190U), buffer[1]) << "Correct first uint8_t";
-  EXPECT_EQ(static_cast<uint8_t>(250U), buffer[2]) << "Correct second uint8_t";
-  EXPECT_EQ(static_cast<uint8_t>(206U), buffer[3]) << "Correct third uint8_t";
-  _GEODE_SAFE_DELETE_ARRAY(buffer);
+  if (buffer) {
+    EXPECT_EQ(static_cast<uint8_t>(186U), buffer[0])
+        << "Correct zeroth uint8_t";
+    EXPECT_EQ(static_cast<uint8_t>(190U), buffer[1]) << "Correct first uint8_t";
+    EXPECT_EQ(static_cast<uint8_t>(250U), buffer[2])
+        << "Correct second uint8_t";
+    EXPECT_EQ(static_cast<uint8_t>(206U), buffer[3]) << "Correct third uint8_t";
+  }
 }
 
-TEST_F(DataInputTest, TestReadInt8_tBytes) {
+TEST_F(DataInputTest, TestReadInt8Bytes) {
   TestDataInput dataInput("04DEADBEEF");
   int8_t *buffer = nullptr;
   int32_t len = 0;
   dataInput.readBytes(&buffer, &len);
-  EXPECT_NE(static_cast<int8_t *>(nullptr), buffer) << "Non-null buffer";
+  auto bufferGuard = std::unique_ptr<int8_t[]>{buffer};
+  ASSERT_NE(nullptr, buffer) << "Non-null buffer";
   ASSERT_EQ(4, len) << "Correct length";
-  EXPECT_EQ(static_cast<int8_t>(-34), buffer[0]) << "Correct zeroth int8_t";
-  EXPECT_EQ(static_cast<int8_t>(-83), buffer[1]) << "Correct first int8_t";
-  EXPECT_EQ(static_cast<int8_t>(-66), buffer[2]) << "Correct second int8_t";
-  EXPECT_EQ(static_cast<int8_t>(-17), buffer[3]) << "Correct third int8_t";
-  _GEODE_SAFE_DELETE_ARRAY(buffer);
+  if (buffer) {
+    EXPECT_EQ(static_cast<int8_t>(-34), buffer[0]) << "Correct zeroth int8_t";
+    EXPECT_EQ(static_cast<int8_t>(-83), buffer[1]) << "Correct first int8_t";
+    EXPECT_EQ(static_cast<int8_t>(-66), buffer[2]) << "Correct second int8_t";
+    EXPECT_EQ(static_cast<int8_t>(-17), buffer[3]) << "Correct third int8_t";
+  }
 }
 
 TEST_F(DataInputTest, TestReadIntUint16) {
@@ -590,22 +602,25 @@
   int32_t *elementLength = nullptr;
   dataInput.readArrayOfByteArrays(&arrayOfByteArrays, arrayLength,
                                   &elementLength);
-  EXPECT_NE(static_cast<int8_t **>(nullptr), arrayOfByteArrays)
-      << "Non-null array of byte arrays";
+  auto arrayOfByteArraysGuard =
+      std::unique_ptr<int8_t *[]> { arrayOfByteArrays };
+  auto elementLengthGuard = std::unique_ptr<int32_t[]>{elementLength};
+
+  ASSERT_NE(nullptr, arrayOfByteArrays) << "Non-null array of byte arrays";
   ASSERT_EQ(1, arrayLength) << "Correct array length";
-  EXPECT_NE(static_cast<int8_t *>(nullptr), arrayOfByteArrays[0])
-      << "Non-null first byte array";
-  ASSERT_EQ(4, elementLength[0]) << "Correct length";
-  EXPECT_EQ(static_cast<int8_t>(-34), arrayOfByteArrays[0][0])
-      << "Correct zeroth int8_t";
-  EXPECT_EQ(static_cast<int8_t>(-83), arrayOfByteArrays[0][1])
-      << "Correct first int8_t";
-  EXPECT_EQ(static_cast<int8_t>(-66), arrayOfByteArrays[0][2])
-      << "Correct second int8_t";
-  EXPECT_EQ(static_cast<int8_t>(-17), arrayOfByteArrays[0][3])
-      << "Correct third int8_t";
-  _GEODE_SAFE_DELETE_ARRAY(elementLength);
-  _GEODE_SAFE_DELETE_ARRAY(arrayOfByteArrays);
+  if (arrayOfByteArrays) {
+    EXPECT_NE(static_cast<int8_t *>(nullptr), arrayOfByteArrays[0])
+        << "Non-null first byte array";
+    ASSERT_EQ(4, elementLength[0]) << "Correct length";
+    EXPECT_EQ(static_cast<int8_t>(-34), arrayOfByteArrays[0][0])
+        << "Correct zeroth int8_t";
+    EXPECT_EQ(static_cast<int8_t>(-83), arrayOfByteArrays[0][1])
+        << "Correct first int8_t";
+    EXPECT_EQ(static_cast<int8_t>(-66), arrayOfByteArrays[0][2])
+        << "Correct second int8_t";
+    EXPECT_EQ(static_cast<int8_t>(-17), arrayOfByteArrays[0][3])
+        << "Correct third int8_t";
+  }
 }
 
 TEST_F(DataInputTest, TestGetBytesRead) {
diff --git a/cppcache/test/DataOutputTest.cpp b/cppcache/test/DataOutputTest.cpp
index f3017d5..29e3982 100644
--- a/cppcache/test/DataOutputTest.cpp
+++ b/cppcache/test/DataOutputTest.cpp
@@ -71,29 +71,16 @@
 
 class DataOutputTest : public ::testing::Test, public ByteArrayFixture {
  public:
-  DataOutputTest() : m_mersennesTwister(m_randomDevice()) {
-    // NOP
-  }
-
-  virtual ~DataOutputTest() {
-    // NOP
-  }
+  DataOutputTest() : randomEngine_(randomDevice_()) {}
+  ~DataOutputTest() noexcept override = default;
 
  protected:
-  std::random_device m_randomDevice;
-  std::mt19937 m_mersennesTwister;
+  std::random_device randomDevice_;
+  std::default_random_engine randomEngine_;
+  std::uniform_int_distribution<int32_t> random_;
 
   int32_t getRandomSequenceNumber() {
-    // One would normally just use std::uniform_int_distribution but gcc 4.4.7
-    // is lacking.
-    const std::mt19937::result_type upperLimit =
-        static_cast<std::mt19937::result_type>(
-            std::numeric_limits<int32_t>::max());
-    std::mt19937::result_type result;
-    while (upperLimit < (result = m_mersennesTwister())) {
-      // Try again.
-    }
-    return static_cast<int32_t>(result);
+    return static_cast<int32_t>(random_(randomEngine_));
   }
 };
 
diff --git a/cppcache/test/ExpiryTaskManagerTest.cpp b/cppcache/test/ExpiryTaskManagerTest.cpp
new file mode 100644
index 0000000..50cdad7
--- /dev/null
+++ b/cppcache/test/ExpiryTaskManagerTest.cpp
@@ -0,0 +1,148 @@
+/*
+ * 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.
+ */
+
+#include <gtest/gtest.h>
+
+#include <geode/ExceptionTypes.hpp>
+
+#include "ExpiryTaskManager.hpp"
+#include "mock/MockExpiryTask.hpp"
+
+using apache::geode::client::ExpiryTask;
+using apache::geode::client::ExpiryTaskManager;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::MockExpiryTask;
+
+TEST(ExpiryTaskManagerTest, startStop) {
+  ExpiryTaskManager manager;
+  EXPECT_NO_THROW(manager.start());
+  EXPECT_TRUE(manager.running());
+  EXPECT_NO_THROW(manager.stop());
+}
+
+TEST(ExpiryTaskManagerTest, destroyWithoutStart) { ExpiryTaskManager manager; }
+
+TEST(ExpiryTaskManagerTest, destroyWithoutStop) {
+  ExpiryTaskManager manager;
+  EXPECT_NO_THROW(manager.start());
+}
+
+TEST(ExpiryTaskManagerTest, startTwice) {
+  ExpiryTaskManager manager;
+  EXPECT_NO_THROW(manager.start());
+  EXPECT_THROW(manager.start(), IllegalStateException);
+}
+
+TEST(ExpiryTaskManagerTest, stopTwice) {
+  ExpiryTaskManager manager;
+  EXPECT_NO_THROW(manager.start());
+  EXPECT_NO_THROW(manager.stop());
+  EXPECT_THROW(manager.stop(), IllegalStateException);
+}
+
+TEST(ExpiryTaskManagerTest, schedule) {
+  ExpiryTaskManager manager;
+  EXPECT_NO_THROW(manager.start());
+
+  auto task = std::make_shared<MockExpiryTask>(manager);
+  auto id = manager.schedule(std::move(task), std::chrono::seconds(10));
+  EXPECT_NE(id, ExpiryTask::invalid());
+  EXPECT_EQ(manager.count(), 1U);
+}
+
+TEST(ExpiryTaskManagerTest, scheduleStop) {
+  ExpiryTaskManager manager;
+  EXPECT_NO_THROW(manager.start());
+
+  auto task = std::make_shared<MockExpiryTask>(manager);
+  auto id_first = manager.schedule(std::move(task), std::chrono::seconds(10));
+  EXPECT_NE(id_first, ExpiryTask::invalid());
+  EXPECT_EQ(manager.count(), 1U);
+
+  task = std::make_shared<MockExpiryTask>(manager);
+  auto id_second = manager.schedule(std::move(task), std::chrono::seconds(10));
+  EXPECT_NE(id_second, ExpiryTask::invalid());
+  EXPECT_EQ(manager.count(), 2U);
+
+  EXPECT_NO_THROW(manager.stop());
+  EXPECT_EQ(manager.count(), 0U);
+}
+
+TEST(ExpiryTaskManagerTest, scheduleCancelStop) {
+  ExpiryTaskManager manager;
+  EXPECT_NO_THROW(manager.start());
+
+  auto task = std::make_shared<MockExpiryTask>(manager);
+  auto id_first = manager.schedule(std::move(task), std::chrono::seconds(10));
+  EXPECT_NE(id_first, ExpiryTask::invalid());
+  EXPECT_EQ(manager.count(), 1U);
+
+  task = std::make_shared<MockExpiryTask>(manager);
+  auto id_second = manager.schedule(std::move(task), std::chrono::seconds(10));
+  EXPECT_NE(id_second, ExpiryTask::invalid());
+  EXPECT_EQ(manager.count(), 2U);
+
+  EXPECT_EQ(manager.cancel(id_first), 1U);
+  EXPECT_EQ(manager.cancel(id_second), 1U);
+  EXPECT_NO_THROW(manager.stop());
+  EXPECT_EQ(manager.count(), 0U);
+}
+
+TEST(ExpiryTaskManagerTest, scheduleWithoutStart) {
+  ExpiryTaskManager manager;
+  auto task = std::make_shared<MockExpiryTask>(manager);
+  auto id = manager.schedule(std::move(task), std::chrono::seconds(1));
+  EXPECT_EQ(id, ExpiryTask::invalid());
+}
+
+TEST(ExpiryTaskManagerTest, reset) {
+  ExpiryTaskManager manager;
+  EXPECT_NO_THROW(manager.start());
+
+  auto task = std::make_shared<MockExpiryTask>(manager);
+  auto id = manager.schedule(std::move(task), std::chrono::seconds(10));
+  EXPECT_NE(id, ExpiryTask::invalid());
+  EXPECT_EQ(manager.count(), 1U);
+  EXPECT_EQ(manager.reset(id, std::chrono::seconds(1)), 1U);
+}
+
+TEST(ExpiryTaskManagerTest, resetInvalid) {
+  ExpiryTaskManager manager;
+  manager.start();
+  auto task = std::make_shared<MockExpiryTask>(manager);
+  (void)manager.schedule(std::move(task), std::chrono::seconds(1));
+  EXPECT_EQ(manager.reset(10, std::chrono::seconds(1)), -1);
+}
+
+TEST(ExpiryTaskManagerTest, cancel) {
+  ExpiryTaskManager manager;
+  EXPECT_NO_THROW(manager.start());
+
+  auto task = std::make_shared<MockExpiryTask>(manager);
+  auto id = manager.schedule(std::move(task), std::chrono::seconds(10));
+  EXPECT_NE(id, ExpiryTask::invalid());
+  EXPECT_EQ(manager.count(), 1U);
+  EXPECT_EQ(manager.cancel(id), 1U);
+}
+
+TEST(ExpiryTaskManagerTest, cancelInvalid) {
+  ExpiryTaskManager manager;
+  manager.start();
+  auto task = std::make_shared<MockExpiryTask>(manager);
+  (void)manager.schedule(std::move(task), std::chrono::seconds(1));
+  EXPECT_EQ(manager.cancel(10), -1);
+}
diff --git a/cppcache/test/ExpiryTaskTest.cpp b/cppcache/test/ExpiryTaskTest.cpp
new file mode 100644
index 0000000..4788da8
--- /dev/null
+++ b/cppcache/test/ExpiryTaskTest.cpp
@@ -0,0 +1,147 @@
+/*
+ * 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.
+ */
+
+#include <gtest/gtest.h>
+
+#include <geode/ExceptionTypes.hpp>
+
+#include "ExpiryTaskManager.hpp"
+#include "gmock_extensions.h"
+#include "mock/MockExpiryTask.hpp"
+#include "util/concurrent/binary_semaphore.hpp"
+
+using ::testing::DoAll;
+using ::testing::InvokeWithoutArgs;
+using ::testing::Return;
+using ::testing::Sequence;
+
+using apache::geode::client::binary_semaphore;
+
+using apache::geode::client::ExpiryTask;
+using apache::geode::client::ExpiryTaskManager;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::MockExpiryTask;
+
+constexpr std::chrono::milliseconds DEFAULT_TIMEOUT{100};
+
+TEST(ExpiryTaskTest, scheduleSingleshot) {
+  binary_semaphore sem{0};
+  ExpiryTaskManager manager;
+  EXPECT_NO_THROW(manager.start());
+
+  auto task = std::make_shared<MockExpiryTask>(manager);
+  EXPECT_CALL(*task, on_expire())
+      .Times(1)
+      .WillOnce(DoAll(ReleaseSem(&sem), Return(true)));
+
+  auto id = manager.schedule(std::move(task), std::chrono::seconds(0));
+  EXPECT_NE(id, ExpiryTask::invalid());
+
+  EXPECT_TRUE(sem.try_acquire_for(DEFAULT_TIMEOUT));
+
+  EXPECT_NO_THROW(manager.stop());
+}
+
+TEST(ExpiryTaskTest, schedulePeriodic) {
+  binary_semaphore sem{0};
+  ExpiryTaskManager manager;
+
+  EXPECT_NO_THROW(manager.start());
+
+  auto task = std::make_shared<MockExpiryTask>(manager);
+  {
+    Sequence s;
+    EXPECT_CALL(*task, on_expire())
+        .Times(1)
+        .InSequence(s)
+        .WillOnce(Return(true));
+    EXPECT_CALL(*task, on_expire())
+        .Times(1)
+        .InSequence(s)
+        .WillOnce(DoAll(ReleaseSem(&sem), Return(true)));
+    EXPECT_CALL(*task, on_expire()).InSequence(s).WillRepeatedly(Return(true));
+  }
+  auto id = manager.schedule(std::move(task), std::chrono::seconds(0),
+                             std::chrono::nanoseconds(1));
+  EXPECT_NE(id, ExpiryTask::invalid());
+
+  EXPECT_TRUE(sem.try_acquire_for(DEFAULT_TIMEOUT));
+
+  EXPECT_NO_THROW(manager.stop());
+}
+
+TEST(ExpiryTaskTest, resetSingleshot) {
+  binary_semaphore sem{0};
+  ExpiryTaskManager manager;
+
+  EXPECT_NO_THROW(manager.start());
+
+  auto task = std::make_shared<MockExpiryTask>(manager);
+  auto& task_ref = *task;
+
+  {
+    Sequence s;
+    EXPECT_CALL(task_ref, on_expire())
+        .Times(1)
+        .InSequence(s)
+        .WillOnce(InvokeWithoutArgs([&task_ref] {
+          task_ref.reset(std::chrono::nanoseconds(1));
+          return false;
+        }));
+    EXPECT_CALL(task_ref, on_expire())
+        .Times(1)
+        .InSequence(s)
+        .WillOnce(DoAll(ReleaseSem(&sem), Return(true)));
+  }
+
+  auto id = manager.schedule(std::move(task), std::chrono::seconds(0));
+  EXPECT_NE(id, ExpiryTask::invalid());
+
+  EXPECT_TRUE(sem.try_acquire_for(DEFAULT_TIMEOUT));
+
+  EXPECT_NO_THROW(manager.stop());
+}
+
+TEST(ExpiryTaskTest, resetPeriodic) {
+  binary_semaphore sem{0};
+  ExpiryTaskManager manager;
+
+  EXPECT_NO_THROW(manager.start());
+
+  auto task = std::make_shared<MockExpiryTask>(manager);
+  auto& task_ref = *task;
+
+  {
+    Sequence s;
+    EXPECT_CALL(task_ref, on_expire())
+        .Times(1)
+        .InSequence(s)
+        .WillOnce(InvokeWithoutArgs([&task_ref] {
+          task_ref.reset(std::chrono::nanoseconds(1));
+          return false;
+        }));
+    EXPECT_CALL(task_ref, on_expire())
+        .InSequence(s)
+        .WillRepeatedly(DoAll(ReleaseSem(&sem), Return(true)));
+  }
+  auto id = manager.schedule(std::move(task), std::chrono::seconds(0));
+  EXPECT_NE(id, ExpiryTask::invalid());
+
+  EXPECT_TRUE(sem.try_acquire_for(DEFAULT_TIMEOUT));
+
+  EXPECT_NO_THROW(manager.stop());
+}
diff --git a/cppcache/test/InterestResultPolicyTest.cpp b/cppcache/test/InterestResultPolicyTest.cpp
deleted file mode 100644
index 8f2f00d..0000000
--- a/cppcache/test/InterestResultPolicyTest.cpp
+++ /dev/null
@@ -1,34 +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.
- */
-
-#include <InterestResultPolicy.hpp>
-
-#include <gtest/gtest.h>
-
-using apache::geode::client::InterestResultPolicy;
-
-TEST(InterestResultPolicyTest, VerifyOrdinals) {
-  EXPECT_NE(InterestResultPolicy::NONE.getOrdinal(),
-            InterestResultPolicy::KEYS.getOrdinal())
-      << "NONE and KEYS have different ordinals";
-  EXPECT_NE(InterestResultPolicy::KEYS.getOrdinal(),
-            InterestResultPolicy::KEYS_VALUES.getOrdinal())
-      << "KEYS and KEYS_VALUES have different ordinals";
-  EXPECT_NE(InterestResultPolicy::KEYS_VALUES.getOrdinal(),
-            InterestResultPolicy::NONE.getOrdinal())
-      << "KEYS_VALUES and NONE have different ordinals";
-}
diff --git a/cppcache/test/LoggingTest.cpp b/cppcache/test/LoggingTest.cpp
new file mode 100644
index 0000000..240d097
--- /dev/null
+++ b/cppcache/test/LoggingTest.cpp
@@ -0,0 +1,684 @@
+/*
+ * 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.
+ */
+
+#include <map>
+#include <string>
+#include <util/Log.hpp>
+
+#include <boost/filesystem.hpp>
+#include <boost/regex.hpp>
+
+#include <gtest/gtest.h>
+
+#include <geode/AuthenticatedView.hpp>
+#include <geode/Cache.hpp>
+#include <geode/PoolManager.hpp>
+#include <geode/RegionFactory.hpp>
+#include <geode/RegionShortcut.hpp>
+
+using apache::geode::client::CacheClosedException;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::LogLevel;
+using apache::geode::client::RegionShortcut;
+
+namespace {
+
+const auto __1K__ = 1024;
+const auto __4K__ = 4 * __1K__;
+const auto __1M__ = (__1K__ * __1K__);
+const auto __1G__ = (__1K__ * __1K__ * __1K__);
+
+const auto LENGTH_OF_BANNER = 16;
+
+const char* __1KStringLiteral =
+    "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+    "AA"
+    "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+    "AA"
+    "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+    "AA"
+    "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+    "AA"
+    "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+    "AA"
+    "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+    "AA"
+    "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+    "AA"
+    "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+    "AA"
+    "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+    "AA"
+    "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+    "AA"
+    "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+    "AA"
+    "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+    "AA"
+    "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+    "AA"
+    "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
+
+auto testFileNames = {"LoggingTest.log", "geode-native.log"};
+
+class LoggingTest : public testing::Test {
+  void scrubTestLogFiles() {
+    for (auto name : testFileNames) {
+      // Close logger, just in case
+      apache::geode::client::Log::close();
+
+      if (boost::filesystem::exists(name)) {
+        boost::filesystem::remove(name);
+      }
+
+      std::map<int32_t, boost::filesystem::path> rolledFiles;
+      LoggingTest::findRolledFiles(boost::filesystem::current_path().string(),
+                                   name, rolledFiles);
+      for (auto& item : rolledFiles) {
+        boost::filesystem::remove(item.second);
+      }
+    }
+  }
+
+  void SetUp() override { scrubTestLogFiles(); }
+
+  void TearDown() override { scrubTestLogFiles(); }
+
+ public:
+  static void writeRolledLogFile(const boost::filesystem::path& logdir,
+                                 const char* filename, int32_t rollIndex) {
+    auto baseName = boost::filesystem::path(filename).stem().string();
+    auto rolledPath =
+        logdir / boost::filesystem::path(baseName + "-" +
+                                         std::to_string(rollIndex) + ".log");
+    auto rolledFile = fopen(rolledPath.string().c_str(), "w");
+    fwrite("Test", 1, 4, rolledFile);
+    fclose(rolledFile);
+  }
+
+  static int numOfLinesInFile(const char* fname) {
+    char line[2048];
+    int ln_cnt = 0;
+    FILE* fp = fopen(fname, "r");
+    if (fp == nullptr) {
+      return 0;
+    }
+    while (!!(fgets(line, sizeof line, fp))) {
+      ++ln_cnt;
+    }
+
+    if (!feof(fp)) {
+      fclose(fp);
+      return -2;
+    }
+    fclose(fp);
+    return ln_cnt;
+  }
+
+  static int expected(LogLevel level) {
+    int expected = static_cast<int>(level);
+    if (level >= LogLevel::Default) {
+      expected--;
+    }
+    return expected;
+  }
+
+  static int expectedWithBanner(LogLevel level) {
+    int expected = LoggingTest::expected(level);
+    if (level != LogLevel::None) {
+      expected += LENGTH_OF_BANNER;
+    }
+    return expected;
+  }
+
+  static void verifyLineCountAtLevel(LogLevel level) {
+    for (auto logFilename : testFileNames) {
+      apache::geode::client::Log::init(level, logFilename);
+
+      LOGERROR("Error Message");
+      LOGWARN("Warning Message");
+      LOGINFO("Info Message");
+      LOGCONFIG("Config Message");
+      LOGFINE("Fine Message");
+      LOGFINER("Finer Message");
+      LOGFINEST("Finest Message");
+      LOGDEBUG("Debug Message");
+
+      int lines = LoggingTest::numOfLinesInFile(logFilename);
+
+      ASSERT_TRUE(lines == LoggingTest::expectedWithBanner(level));
+
+      apache::geode::client::Log::close();
+      boost::filesystem::remove(logFilename);
+    }
+  }
+
+  static void findRolledFiles(
+      const std::string& logFilePath, const boost::filesystem::path& filename,
+      std::map<int32_t, boost::filesystem::path>& rolledFiles) {
+    const auto basePath =
+        boost::filesystem::absolute(boost::filesystem::path(logFilePath)) /
+        filename;
+    const auto filterstring = basePath.stem().string() + "-(\\d+)\\.log$";
+    const boost::regex my_filter(filterstring);
+
+    rolledFiles.clear();
+
+    boost::filesystem::directory_iterator end_itr;
+    for (boost::filesystem::directory_iterator i(
+             basePath.parent_path().string());
+         i != end_itr; ++i) {
+      if (boost::filesystem::is_regular_file(i->status())) {
+        std::string rootFilename = i->path().filename().string();
+        boost::regex testPattern(filterstring);
+        boost::match_results<std::string::const_iterator> testMatches;
+        if (boost::regex_search(
+                std::string::const_iterator(rootFilename.begin()),
+                rootFilename.cend(), testMatches, testPattern)) {
+          auto index = std::atoi(
+              std::string(testMatches[1].first, testMatches[1].second).c_str());
+          rolledFiles[index] = i->path();
+        }
+      }
+    }
+  }
+
+  static size_t calculateUsedDiskSpace(const std::string& logFilePath) {
+    std::map<int32_t, boost::filesystem::path> rolledLogFiles{};
+    findRolledFiles(boost::filesystem::current_path().string(),
+                    boost::filesystem::path(logFilePath), rolledLogFiles);
+
+    auto usedSpace = boost::filesystem::file_size(logFilePath);
+    for (auto const& item : rolledLogFiles) {
+      usedSpace += boost::filesystem::file_size(item.second);
+    }
+
+    return usedSpace;
+  }
+
+  void verifyDiskSpaceNotLeakedForFile(const char* filename) {
+    const int NUMBER_OF_ITERATIONS = 4 * __1K__;
+    const int DISK_SPACE_LIMIT = 2 * __1M__;
+
+    std::string logfileName = filename ? filename : "geode-native.log";
+
+    // Start/stop logger several times, make sure it's picking up any/all
+    // existing logs in its disk space calculations.
+    for (auto j = 0; j < 5; j++) {
+      ASSERT_NO_THROW(apache::geode::client::Log::init(
+          apache::geode::client::LogLevel::Debug, logfileName, 1, 2));
+      for (auto i = 0; i < NUMBER_OF_ITERATIONS; i++) {
+        LOGDEBUG(__1KStringLiteral);
+      }
+      apache::geode::client::Log::close();
+
+      // Original file should still be around
+      ASSERT_TRUE(boost::filesystem::exists(logfileName));
+
+      // We wrote 4x the log file limit, and 2x the disk space limit, so
+      // there should be one 'rolled' file.  Its name should be of the form
+      // <base>-n.log, where n is some reasonable number.
+      auto usedSpace = calculateUsedDiskSpace(logfileName);
+      ASSERT_TRUE(usedSpace < DISK_SPACE_LIMIT);
+    }
+  }
+};
+
+/**
+ * Verify we can initialize the logger with any combination of level,
+ * filename, file size limit, and disk space limit
+ */
+TEST_F(LoggingTest, logInit) {
+  for (auto logFilename : testFileNames) {
+    // Check all valid levels
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::None, logFilename, 1, 4));
+    apache::geode::client::Log::close();
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::Error, logFilename, 1, 4));
+    apache::geode::client::Log::close();
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::Warning, logFilename, 1, 4));
+    apache::geode::client::Log::close();
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::Info, logFilename, 1, 4));
+    apache::geode::client::Log::close();
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::Default, logFilename, 1, 4));
+    apache::geode::client::Log::close();
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::Config, logFilename, 1, 4));
+    apache::geode::client::Log::close();
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::Fine, logFilename, 1, 4));
+    apache::geode::client::Log::close();
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::Finer, logFilename, 1, 4));
+    apache::geode::client::Log::close();
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::Finest, logFilename, 1, 4));
+    apache::geode::client::Log::close();
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::Debug, logFilename, 1, 4));
+    apache::geode::client::Log::close();
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::All, logFilename, 1, 4));
+    apache::geode::client::Log::close();
+    // Specify a disk space limit smaller than the file size limit
+    ASSERT_THROW(
+        apache::geode::client::Log::init(
+            apache::geode::client::LogLevel::Config, logFilename, __1K__, 4),
+        apache::geode::client::IllegalArgumentException);
+
+    // Specify a file size limit above max allowed
+    ASSERT_THROW(
+        apache::geode::client::Log::init(
+            apache::geode::client::LogLevel::Config, logFilename, __1G__),
+        apache::geode::client::IllegalArgumentException);
+
+    // Specify a disk space limit above max allowed
+    ASSERT_THROW(
+        apache::geode::client::Log::init(
+            apache::geode::client::LogLevel::Config, logFilename, 1, __1G__),
+        apache::geode::client::IllegalArgumentException);
+
+    // Init twice without closing
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::All, logFilename, 1, 4));
+    ASSERT_THROW(apache::geode::client::Log::init(
+                     apache::geode::client::LogLevel::All, logFilename, 1, 4),
+                 apache::geode::client::IllegalStateException);
+    apache::geode::client::Log::close();
+  }
+
+  // Init with valid filename
+  ASSERT_NO_THROW(apache::geode::client::Log::init(
+      apache::geode::client::LogLevel::Config, "LoggingTest.log"));
+  apache::geode::client::Log::close();
+
+  // Init with legal filename with (), #, and space
+  ASSERT_NO_THROW(apache::geode::client::Log::init(
+      apache::geode::client::LogLevel::Config, "LoggingTest (#).log"));
+  apache::geode::client::Log::close();
+  boost::filesystem::remove("LoggingTest (#).log");
+
+  // Init with invalid filename
+  ASSERT_THROW(apache::geode::client::Log::init(
+                   apache::geode::client::LogLevel::Config, "#?$?%.log"),
+               apache::geode::client::IllegalArgumentException);
+
+  // Specify disk or file limit without a filename
+  ASSERT_NO_THROW(apache::geode::client::Log::init(
+      apache::geode::client::LogLevel::Config, nullptr, 4));
+  apache::geode::client::Log::close();
+  ASSERT_NO_THROW(apache::geode::client::Log::init(
+      apache::geode::client::LogLevel::Config, nullptr, 0, 4));
+  apache::geode::client::Log::close();
+}
+
+TEST_F(LoggingTest, logToFileAtEachLevel) {
+  for (auto logFilename : testFileNames) {
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::Debug, logFilename));
+    LOGDEBUG("This is a debug string");
+    LOGDEBUG("This is a formatted debug string (%d)", __1K__);
+    apache::geode::client::Log::close();
+    ASSERT_TRUE(boost::filesystem::exists(logFilename));
+    ASSERT_TRUE(boost::filesystem::file_size(logFilename) > 0);
+    boost::filesystem::remove(logFilename);
+    ASSERT_FALSE(boost::filesystem::exists(logFilename));
+
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::Finest, logFilename));
+    LOGFINEST("This is a 'finest' string");
+    LOGFINEST("This is a formatted 'finest' string (%d)", __1K__);
+    apache::geode::client::Log::close();
+    ASSERT_TRUE(boost::filesystem::exists(logFilename));
+    ASSERT_TRUE(boost::filesystem::file_size(logFilename) > 0);
+    boost::filesystem::remove(logFilename);
+
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::Finer, logFilename));
+    LOGFINER("This is a 'finer' string");
+    LOGFINER("This is a formatted 'finer' string (%d)", __1K__);
+    apache::geode::client::Log::close();
+    ASSERT_TRUE(boost::filesystem::exists(logFilename));
+    ASSERT_TRUE(boost::filesystem::file_size(logFilename) > 0);
+    boost::filesystem::remove(logFilename);
+
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::Fine, logFilename));
+    LOGFINE("This is a 'fine' string");
+    LOGFINE("This is a formatted 'fine' string (%d)", __1K__);
+    apache::geode::client::Log::close();
+    ASSERT_TRUE(boost::filesystem::exists(logFilename));
+    ASSERT_TRUE(boost::filesystem::file_size(logFilename) > 0);
+    boost::filesystem::remove(logFilename);
+
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::Config, logFilename));
+    LOGCONFIG("This is a 'config' string");
+    LOGCONFIG("This is a formatted 'config' string (%d)", __1K__);
+    apache::geode::client::Log::close();
+    ASSERT_TRUE(boost::filesystem::exists(logFilename));
+    ASSERT_TRUE(boost::filesystem::file_size(logFilename) > 0);
+    boost::filesystem::remove(logFilename);
+
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::Info, logFilename));
+    LOGINFO("This is a 'finer' string");
+    LOGINFO("This is a formatted 'finer' string (%d)", __1K__);
+    apache::geode::client::Log::close();
+    ASSERT_TRUE(boost::filesystem::exists(logFilename));
+    ASSERT_TRUE(boost::filesystem::file_size(logFilename) > 0);
+    boost::filesystem::remove(logFilename);
+
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::Warning, logFilename));
+    LOGWARN("This is a 'warning' string");
+    LOGWARN("This is a formatted 'warning' string (%d)", __1K__);
+    apache::geode::client::Log::close();
+    ASSERT_TRUE(boost::filesystem::exists(logFilename));
+    ASSERT_TRUE(boost::filesystem::file_size(logFilename) > 0);
+    boost::filesystem::remove(logFilename);
+
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::Error, logFilename));
+    LOGERROR("This is a 'error' string");
+    LOGERROR("This is a formatted 'error' string (%d)", __1K__);
+    apache::geode::client::Log::close();
+    ASSERT_TRUE(boost::filesystem::exists(logFilename));
+    ASSERT_TRUE(boost::filesystem::file_size(logFilename) > 0);
+    boost::filesystem::remove(logFilename);
+  }
+}
+
+TEST_F(LoggingTest, verifyFileSizeLimit) {
+  for (auto logFilename : testFileNames) {
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::Debug, logFilename, 1, 5));
+    for (auto i = 0; i < 4 * __1K__; i++) {
+      LOGDEBUG(__1KStringLiteral);
+    }
+    apache::geode::client::Log::close();
+
+    // Original file should still be around
+    ASSERT_TRUE(boost::filesystem::exists(logFilename));
+
+    // Check for 'rolled' log files.  With a 1MB file size limit and each logged
+    // string having a length of 1K chars, we should have at least one less
+    // rolled log file than the number of strings logged, i.e. 3 rolled files
+    // for 4K strings in this case.  spdlog rolled files look like
+    // <<basename>>.<<#>>.<<extension>>, so for LoggingTest.log we should find
+    // LoggingTest.1.log, LoggingTest.2.log, etc.
+    auto base = boost::filesystem::path(logFilename).stem();
+    auto ext = boost::filesystem::path(logFilename).extension();
+
+    // File size limit is treated as a "soft" limit.  If the last message in the
+    // log puts the file size over the limit, the file is rolled and the message
+    // is preserved intact, rather than truncated or split across files.  We'll
+    // assume the file size never exceeds 110% of the specified limit.
+    auto adjustedFileSizeLimit =
+        static_cast<uint32_t>(static_cast<uint64_t>(__1M__) * 11 / 10);
+
+    for (auto i = 0; i < 4; i++) {
+      auto rolledLogFileName =
+          base.string() + "-" + std::to_string(i) + ext.string();
+
+      ASSERT_TRUE(boost::filesystem::exists(rolledLogFileName));
+      ASSERT_TRUE(adjustedFileSizeLimit >
+                  boost::filesystem::file_size(rolledLogFileName));
+    }
+  }
+}
+
+TEST_F(LoggingTest, verifyDiskSpaceLimit) {
+  for (auto logFilename : testFileNames) {
+    const int NUMBER_OF_ITERATIONS = 4 * __1K__;
+    const int DISK_SPACE_LIMIT = 2 * __1M__;
+
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::Debug, logFilename, 1, 2));
+    for (auto i = 0; i < NUMBER_OF_ITERATIONS; i++) {
+      LOGDEBUG(__1KStringLiteral);
+    }
+    apache::geode::client::Log::close();
+
+    // Original file should still be around
+    ASSERT_TRUE(boost::filesystem::exists(logFilename));
+
+    auto size = boost::filesystem::file_size(logFilename);
+    auto numRolledFilesFound = 0;
+    auto base = boost::filesystem::path(logFilename).stem();
+    auto ext = boost::filesystem::path(logFilename).extension();
+
+    // We wrote 4x the log file limit, and 2x the disk space limit, so
+    // there should be one 'rolled' file.  Its name should be of the form
+    // <base>-n.log, where n is some reasonable number.
+    std::map<int32_t, boost::filesystem::path> rolledFiles;
+    LoggingTest::findRolledFiles(boost::filesystem::current_path().string(),
+                                 logFilename, rolledFiles);
+    ASSERT_TRUE(rolledFiles.size() == 1);
+
+    auto rolledFile = rolledFiles.begin()->second;
+    size += boost::filesystem::file_size(rolledFile);
+
+    ASSERT_TRUE(size <= DISK_SPACE_LIMIT);
+  }
+}
+
+TEST_F(LoggingTest, verifyWithExistingRolledFile) {
+  for (auto logFilename : testFileNames) {
+    LoggingTest::writeRolledLogFile(boost::filesystem::current_path(),
+                                    logFilename, 11);
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::Debug, logFilename, 1, 5));
+    for (auto i = 0; i < 2 * __1K__; i++) {
+      LOGDEBUG(__1KStringLiteral);
+    }
+    apache::geode::client::Log::close();
+
+    // Original file should still be around
+    ASSERT_TRUE(boost::filesystem::exists(logFilename));
+
+    // Check for 'rolled' log files.  With a 1MB file size limit and each logged
+    // string having a length of 1K chars, we should have at least one less
+    // rolled log file than the number of strings logged, i.e. 3 rolled files
+    // for 4K strings in this case.  spdlog rolled files look like
+    // <<basename>>.<<#>>.<<extension>>, so for LoggingTest.log we should find
+    // LoggingTest.1.log, LoggingTest.2.log, etc.
+    auto base = boost::filesystem::path(logFilename).stem();
+    auto ext = boost::filesystem::path(logFilename).extension();
+
+    // File size limit is treated as a "soft" limit.  If the last message in the
+    // log puts the file size over the limit, the file is rolled and the message
+    // is preserved intact, rather than truncated or split across files.  We'll
+    // assume the file size never exceeds 110% of the specified limit.
+    auto adjustedFileSizeLimit =
+        static_cast<uint32_t>(static_cast<uint64_t>(__1M__) * 11 / 10);
+
+    auto rolledLogFileName =
+        base.string() + "-" + std::to_string(12) + ext.string();
+
+    ASSERT_TRUE(boost::filesystem::exists(rolledLogFileName));
+    ASSERT_TRUE(adjustedFileSizeLimit >
+                boost::filesystem::file_size(rolledLogFileName));
+  }
+}
+
+void verifyWithPath(const boost::filesystem::path& path, int32_t fileSizeLimit,
+                    int64_t diskSpaceLimit) {
+  for (auto logFilename : testFileNames) {
+    auto relativePath = path / boost::filesystem::path(logFilename);
+
+    ASSERT_NO_THROW(apache::geode::client::Log::init(
+        apache::geode::client::LogLevel::Debug, relativePath.string(),
+        fileSizeLimit, diskSpaceLimit));
+    for (auto i = 0; i < ((3 * fileSizeLimit) / 2) * __1K__; i++) {
+      LOGDEBUG(__1KStringLiteral);
+    }
+    apache::geode::client::Log::close();
+
+    // Original file should still be around
+    ASSERT_TRUE(boost::filesystem::exists(relativePath));
+
+    // Check for 'rolled' log files.  With a 1MB file size limit and each logged
+    // string having a length of 1K chars, we should have at least one less
+    // rolled log file than the number of strings logged, i.e. 3 rolled files
+    // for 4K strings in this case.  spdlog rolled files look like
+    // <<basename>>.<<#>>.<<extension>>, so for LoggingTest.log we should find
+    // LoggingTest.1.log, LoggingTest.2.log, etc.
+    auto base = boost::filesystem::path(relativePath).stem();
+    auto ext = boost::filesystem::path(relativePath).extension();
+
+    // File size limit is treated as a "soft" limit.  If the last message in the
+    // log puts the file size over the limit, the file is rolled and the message
+    // is preserved intact, rather than truncated or split across files.  We'll
+    // assume the file size never exceeds 110% of the specified limit.
+    auto adjustedFileSizeLimit = static_cast<uint32_t>(
+        static_cast<uint64_t>(__1M__ * fileSizeLimit) * 11 / 10);
+
+    auto rolledLogFileName =
+        relativePath.parent_path() /
+        boost::filesystem::path(base.string() + "-" + std::to_string(0) +
+                                ext.string());
+
+    if (fileSizeLimit == diskSpaceLimit) {
+      // If the limits are equal, we should *never* roll logs, just delete the
+      // current file and start over
+      ASSERT_FALSE(boost::filesystem::exists(rolledLogFileName));
+    } else {
+      ASSERT_TRUE(boost::filesystem::exists(rolledLogFileName));
+      ASSERT_TRUE(adjustedFileSizeLimit >
+                  boost::filesystem::file_size(rolledLogFileName));
+    }
+    ASSERT_TRUE(adjustedFileSizeLimit >
+                boost::filesystem::file_size(relativePath));
+  }
+}
+
+TEST_F(LoggingTest, verifyWithRelativePathFromCWD) {
+  auto relativePath = boost::filesystem::path("foo/bar");
+
+  verifyWithPath(relativePath, 1, 5);
+
+  boost::filesystem::remove_all(boost::filesystem::path("foo"));
+}
+
+TEST_F(LoggingTest, verifyWithAbsolutePath) {
+  auto absolutePath =
+      boost::filesystem::absolute(boost::filesystem::path("foo/bar"));
+
+  verifyWithPath(absolutePath, 1, 5);
+
+  boost::filesystem::remove_all(boost::filesystem::path("foo"));
+}
+
+TEST_F(LoggingTest, setLimitsEqualAndRoll) {
+  verifyWithPath(boost::filesystem::path(), 1, 1);
+}
+
+// Logger is supposed to tack the '.log' extension on any file that doesn't
+// already have it.
+TEST_F(LoggingTest, verifyExtension) {
+  apache::geode::client::Log::init(LogLevel::All, "foo");
+  LOGINFO("...");
+  apache::geode::client::Log::close();
+  ASSERT_TRUE(LoggingTest::numOfLinesInFile("foo.log") > 0);
+  boost::filesystem::remove("foo.log");
+
+  apache::geode::client::Log::init(LogLevel::All, "foo.txt");
+  LOGINFO("...");
+  apache::geode::client::Log::close();
+  ASSERT_TRUE(LoggingTest::numOfLinesInFile("foo.txt.log") > 0);
+  boost::filesystem::remove("foo.txt.log");
+}
+
+// Old version of logger didn't distinguish between rolled log file and
+// filename containing '-', so would crash in an atoi() call if you used
+// '-' in your log file name.
+TEST_F(LoggingTest, verifyFilenameWithDash) {
+  apache::geode::client::Log::init(LogLevel::All, "foo-bar.log");
+  LOGINFO("...");
+  apache::geode::client::Log::close();
+  ASSERT_TRUE(LoggingTest::numOfLinesInFile("foo-bar.log") > 0);
+  boost::filesystem::remove("foo-bar.log");
+}
+
+TEST_F(LoggingTest, countLinesAllLevels) {
+  for (LogLevel level : {
+           LogLevel::Error,
+           LogLevel::Warning,
+           LogLevel::Info,
+           LogLevel::Default,
+           LogLevel::Config,
+           LogLevel::Fine,
+           LogLevel::Finer,
+           LogLevel::Finest,
+           LogLevel::Debug,
+       }) {
+    for (auto logFilename : testFileNames) {
+      apache::geode::client::Log::init(level, logFilename);
+
+      LOGERROR("Error Message");
+      LOGWARN("Warning Message");
+      LOGINFO("Info Message");
+      LOGCONFIG("Config Message");
+      LOGFINE("Fine Message");
+      LOGFINER("Finer Message");
+      LOGFINEST("Finest Message");
+      LOGDEBUG("Debug Message");
+
+      int lines = LoggingTest::numOfLinesInFile(logFilename);
+
+      ASSERT_TRUE(lines == LoggingTest::expectedWithBanner(level));
+
+      apache::geode::client::Log::close();
+      boost::filesystem::remove(logFilename);
+    }
+  }
+}
+
+TEST_F(LoggingTest, countLinesConfigOnwards) {
+  verifyLineCountAtLevel(LogLevel::Config);
+}
+
+TEST_F(LoggingTest, countLinesInfoOnwards) {
+  verifyLineCountAtLevel(LogLevel::Info);
+}
+
+TEST_F(LoggingTest, countLinesWarningOnwards) {
+  verifyLineCountAtLevel(LogLevel::Warning);
+}
+
+TEST_F(LoggingTest, countLinesErrorOnly) {
+  verifyLineCountAtLevel(LogLevel::Error);
+}
+
+TEST_F(LoggingTest, countLinesNone) { verifyLineCountAtLevel(LogLevel::None); }
+
+TEST_F(LoggingTest, verifyDiskSpaceNotLeaked) {
+  for (auto logFilename : testFileNames) {
+    verifyDiskSpaceNotLeakedForFile(logFilename);
+  }
+}
+
+TEST_F(LoggingTest, verifyDiskSpaceNotLeakedWithDefaultLogName) {
+  verifyDiskSpaceNotLeakedForFile(nullptr);
+}
+
+}  // namespace
diff --git a/dependencies/ACE/config.h.in b/cppcache/test/PartitionTest.cpp
old mode 100755
new mode 100644
similarity index 70%
copy from dependencies/ACE/config.h.in
copy to cppcache/test/PartitionTest.cpp
index b6ee2e8..d877898
--- a/dependencies/ACE/config.h.in
+++ b/cppcache/test/PartitionTest.cpp
@@ -14,23 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
-#define ACE_LACKS_IOSTREAM_TOTALLY 1
-#define ACE_HAS_VERSIONED_NAMESPACE 1
 
-#if __cplusplus >= 201103L
+#include <gtest/gtest.h>
 
-#if defined(__SUNPRO_CC)
-#define ACE_HAS_CPP11 1
-#define _RWSTD_ALLOCATOR 1
-#endif
+#include <geode/Cache.hpp>
 
-#endif // __cplusplus >= 201103L
+#include "FixedPartitionAttributesImpl.hpp"
 
-#cmakedefine WITH_IPV6
-#ifdef WITH_IPV6
-#define ACE_HAS_IPV6 1
-#endif
+using apache::geode::client::FixedPartitionAttributesImpl;
 
-#include "ace/config-@ACE_CONFIG@.h"
-
+TEST(PartitionTest, createFixedPartitionAttributes) {
+  FixedPartitionAttributesImpl attributes;
+}
diff --git a/cppcache/test/PdxInstanceImplTest.cpp b/cppcache/test/PdxInstanceImplTest.cpp
index 604b46f..5301dfb 100644
--- a/cppcache/test/PdxInstanceImplTest.cpp
+++ b/cppcache/test/PdxInstanceImplTest.cpp
@@ -1,3 +1,4 @@
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -15,24 +16,23 @@
  * limitations under the License.
  */
 
-#include <CachePerfStats.hpp>
-#include <PdxInstanceImpl.hpp>
-#include <statistics/StatisticsFactory.hpp>
-
 #include <gtest/gtest.h>
 
 #include <geode/AuthenticatedView.hpp>
-#include <geode/Cache.hpp>
-#include <geode/PoolManager.hpp>
 #include <geode/Properties.hpp>
 #include <geode/RegionFactory.hpp>
 #include <geode/RegionShortcut.hpp>
 
+#include "CacheImpl.hpp"
+#include "PdxInstanceImpl.hpp"
+#include "statistics/StatisticsFactory.hpp"
+
 using apache::geode::client::Cache;
 using apache::geode::client::CacheFactory;
 using apache::geode::client::CacheImpl;
 using apache::geode::client::CachePerfStats;
 using apache::geode::client::PdxInstanceImpl;
+using apache::geode::client::PdxType;
 using apache::geode::client::Properties;
 using apache::geode::statistics::StatisticsFactory;
 
@@ -51,18 +51,21 @@
 //
 TEST(PdxInstanceImplTest, updatePdxStream) {
   auto properties = std::make_shared<Properties>();
-  CacheFactory cacheFactory;
-  auto cache = cacheFactory.create();
+  properties->insert("log-level", "none");
+  auto cache = CacheFactory{}.set("log-level", "none").create();
   CacheImpl cacheImpl(&cache, properties, true, false, nullptr);
-  auto buffer = std::vector<uint8_t>(__1M__, 0xcc);
-  auto len = static_cast<int32_t>(buffer.size());
+  std::vector<uint8_t> buffer(__1M__, 0xcc);
+
+  auto type =
+      std::make_shared<PdxType>(*cacheImpl.getPdxTypeRegistry(), "Test", false);
+
   PdxInstanceImpl pdxInstanceImpl(
-      buffer.data(), len, 0xdeadbeef, cacheImpl.getCachePerfStats(),
-      *(cacheImpl.getPdxTypeRegistry()), cacheImpl, false);
+      buffer.data(), __1M__, type, cacheImpl.getCachePerfStats(),
+      *cacheImpl.getPdxTypeRegistry(), cacheImpl, false);
 
   for (auto i = 0; i < __100K__; i++) {
     try {
-      pdxInstanceImpl.updatePdxStream(buffer.data(), len);
+      pdxInstanceImpl.updatePdxStream(buffer);
     } catch (const std::exception&) {
       GTEST_FAIL();
     }
diff --git a/cppcache/test/PdxTypeTest.cpp b/cppcache/test/PdxTypeTest.cpp
index d3183b2..bbca824 100644
--- a/cppcache/test/PdxTypeTest.cpp
+++ b/cppcache/test/PdxTypeTest.cpp
@@ -184,9 +184,9 @@
   m_pdxType2.addVariableLengthTypeField("bar0", "string",
                                         PdxFieldTypes::STRING);
   m_pdxType2.addFixedLengthTypeField("bar1", "bool", PdxFieldTypes::BOOLEAN,
-                                     PdxTypes::BOOLEAN_SIZE);
+                                     PdxTypes::kPdxBooleanSize);
   m_pdxType2.addFixedLengthTypeField("bar2", "int", PdxFieldTypes::INT,
-                                     PdxTypes::INTEGER_SIZE);
+                                     PdxTypes::kPdxIntegerSize);
 
   std::hash<PdxType> type1Hash;
   std::hash<PdxType> type2Hash;
@@ -201,7 +201,7 @@
   pdx_type.addVariableLengthTypeField("foo", "", PdxFieldTypes::STRING);
   pdx_type.addVariableLengthTypeField("alice", "", PdxFieldTypes::STRING);
   pdx_type.addFixedLengthTypeField("bar1", "", PdxFieldTypes::BOOLEAN,
-                                   PdxTypes::BOOLEAN_SIZE);
+                                   PdxTypes::kPdxBooleanSize);
 
   DataOutputInternal out;
   pdx_type.toData(out);
@@ -222,7 +222,7 @@
   pdx_type.addVariableLengthTypeField("foo", "", PdxFieldTypes::STRING);
   pdx_type.addVariableLengthTypeField("alice", "", PdxFieldTypes::STRING);
   pdx_type.addFixedLengthTypeField("bar1", "", PdxFieldTypes::BOOLEAN,
-                                   PdxTypes::BOOLEAN_SIZE);
+                                   PdxTypes::kPdxBooleanSize);
 
   DataOutputInternal out;
   pdx_type.toData(out);
@@ -243,7 +243,7 @@
   pdx_expected.addVariableLengthTypeField("foo", "", PdxFieldTypes::STRING);
   pdx_expected.addVariableLengthTypeField("alice", "", PdxFieldTypes::STRING);
   pdx_expected.addFixedLengthTypeField("bar1", "", PdxFieldTypes::BOOLEAN,
-                                       PdxTypes::BOOLEAN_SIZE);
+                                       PdxTypes::kPdxBooleanSize);
 
   DataOutputInternal out;
   pdx_expected.toData(out);
@@ -263,7 +263,7 @@
   pdx_expected.addVariableLengthTypeField("foo", "", PdxFieldTypes::STRING);
   pdx_expected.addVariableLengthTypeField("alice", "", PdxFieldTypes::STRING);
   pdx_expected.addFixedLengthTypeField("bar1", "", PdxFieldTypes::BOOLEAN,
-                                       PdxTypes::BOOLEAN_SIZE);
+                                       PdxTypes::kPdxBooleanSize);
 
   DataOutputInternal out;
   pdx_expected.toData(out);
diff --git a/cppcache/test/QueueConnectionRequestTest.cpp b/cppcache/test/QueueConnectionRequestTest.cpp
index 6aa11ef..89daef1 100644
--- a/cppcache/test/QueueConnectionRequestTest.cpp
+++ b/cppcache/test/QueueConnectionRequestTest.cpp
@@ -17,6 +17,7 @@
 
 #include <QueueConnectionRequest.hpp>
 
+#include <boost/asio.hpp>
 #include <boost/process/environment.hpp>
 
 #include <gtest/gtest.h>
@@ -24,6 +25,7 @@
 #include <geode/DataOutput.hpp>
 
 #include "ByteArrayFixture.hpp"
+#include "ClientProxyMembershipID.hpp"
 #include "DataOutputInternal.hpp"
 
 namespace apache {
@@ -34,8 +36,10 @@
                                    public ByteArrayFixture {};
 
 TEST_F(QueueConnectionRequestTest, testToData) {
+  namespace bip = boost::asio::ip;
+
   DataOutputInternal dataOutput;
-  ACE_INET_Addr addr(10, "localhost");
+  auto address = bip::make_address("127.0.0.1");
   ServerLocation srv("server", 10);
   std::set<ServerLocation> servLoc;
   servLoc.insert(srv);
@@ -44,7 +48,7 @@
   const std::string hostname = "name";
   const std::string durableClientId = "id-1";
 
-  const ClientProxyMembershipID qCR(dsName, randString, hostname, addr, 10,
+  const ClientProxyMembershipID qCR(dsName, randString, hostname, address, 10,
                                     durableClientId);
 
   QueueConnectionRequest queueConnReq(qCR, servLoc, -1, false);
@@ -52,7 +56,7 @@
 
   EXPECT_BYTEARRAY_EQ(
       "2A0000012631015C047F000001000000022A00046E616D65000000302E\\h{8}"
-      "0D002A000664734E616D652A000772616E644E756D2D00000001FFFFFFFF000000012A00"
+      "0D002A000664734E616D652A000772616E644E756D7D00000001FFFFFFFF000000012A00"
       "067365727665720000000A00",
       ByteArray(dataOutput.getBuffer(), dataOutput.getBufferLength()));
 }
diff --git a/cppcache/test/SerializableCreateTests.cpp b/cppcache/test/SerializableCreateTests.cpp
index aa17168..fcf241e 100644
--- a/cppcache/test/SerializableCreateTests.cpp
+++ b/cppcache/test/SerializableCreateTests.cpp
@@ -36,7 +36,7 @@
 using apache::geode::client::CacheableString;
 using apache::geode::client::Serializable;
 
-TEST(SerializableCreateTests, forArrayOf_constchar) {
+TEST(SerializableCreateTests, forArrayOfConstChar) {
   const auto serializable = Serializable::create("test");
   ASSERT_TRUE(nullptr != serializable);
   auto&& cacheableString =
@@ -45,7 +45,7 @@
   ASSERT_EQ(cacheableString->value(), "test");
 }
 
-TEST(SerializableCreateTests, forArrayOf_char) {
+TEST(SerializableCreateTests, forArrayOfChar) {
   char* test = new char[5]{'t', 'e', 's', 't', '\0'};
   const auto serializable = Serializable::create(test);
   ASSERT_TRUE(nullptr != serializable);
@@ -55,7 +55,7 @@
   ASSERT_EQ(cacheableString->value(), "test");
 }
 
-TEST(SerializableCreateTests, forArrayOf_char16_t) {
+TEST(SerializableCreateTests, forArrayOfChar16) {
   const auto serializable = Serializable::create(u"test");
   ASSERT_TRUE(nullptr != serializable);
   auto&& cacheableString =
@@ -64,7 +64,7 @@
   ASSERT_EQ(cacheableString->value(), "test");
 }
 
-TEST(SerializableCreateTests, forArrayOf_char32_t) {
+TEST(SerializableCreateTests, forArrayOfChar32) {
   const auto serializable = Serializable::create(U"test");
   ASSERT_TRUE(nullptr != serializable);
   auto&& cacheableString =
@@ -73,7 +73,7 @@
   ASSERT_EQ(cacheableString->value(), "test");
 }
 
-TEST(SerializableCreateTests, forArrayOf_wchar_t) {
+TEST(SerializableCreateTests, forArrayOfWchar) {
   const auto serializable = Serializable::create(L"test");
   ASSERT_TRUE(nullptr != serializable);
   auto&& cacheableString =
@@ -82,7 +82,7 @@
   ASSERT_EQ(cacheableString->value(), "test");
 }
 
-TEST(SerializableCreateTests, for_int8_t) {
+TEST(SerializableCreateTests, forInt8) {
   const auto serializable = Serializable::create(static_cast<int8_t>(1));
   ASSERT_TRUE(nullptr != serializable);
   auto&& cacheableByte = std::dynamic_pointer_cast<CacheableByte>(serializable);
@@ -90,7 +90,7 @@
   ASSERT_EQ(cacheableByte->value(), 1);
 }
 
-TEST(SerializableCreateTests, for_int16_t) {
+TEST(SerializableCreateTests, forInt16) {
   const auto serializable = Serializable::create(static_cast<int16_t>(1));
   ASSERT_TRUE(nullptr != serializable);
   auto&& cacheableInt16 =
@@ -99,7 +99,7 @@
   ASSERT_EQ(cacheableInt16->value(), 1);
 }
 
-TEST(SerializableCreateTests, for_int32_t) {
+TEST(SerializableCreateTests, forInt32) {
   const auto serializable = Serializable::create(static_cast<int32_t>(1));
   ASSERT_TRUE(nullptr != serializable);
   auto&& cacheableInt32 =
@@ -108,7 +108,7 @@
   ASSERT_EQ(cacheableInt32->value(), 1);
 }
 
-TEST(SerializableCreateTests, for_int64_t) {
+TEST(SerializableCreateTests, forInt64) {
   const auto serializable = Serializable::create(static_cast<int64_t>(1));
   ASSERT_TRUE(nullptr != serializable);
   auto&& cacheableInt64 =
@@ -117,7 +117,7 @@
   ASSERT_EQ(cacheableInt64->value(), 1);
 }
 
-TEST(SerializableCreateTests, for_char16_t) {
+TEST(SerializableCreateTests, forCr16) {
   const auto serializable = Serializable::create(u'a');
   ASSERT_TRUE(nullptr != serializable);
   auto&& cacheableCharacter =
@@ -126,7 +126,7 @@
   ASSERT_EQ(cacheableCharacter->value(), u'a');
 }
 
-TEST(SerializableCreateTests, for_float) {
+TEST(SerializableCreateTests, forFloat) {
   const auto serializable = Serializable::create(1.1f);
   ASSERT_TRUE(nullptr != serializable);
   auto&& cacheableFloat =
@@ -135,7 +135,7 @@
   ASSERT_EQ(cacheableFloat->value(), 1.1f);
 }
 
-TEST(SerializableCreateTests, for_double) {
+TEST(SerializableCreateTests, forDouble) {
   const auto serializable = Serializable::create(1.1);
   ASSERT_TRUE(nullptr != serializable);
   auto&& cacheableDouble =
@@ -144,7 +144,7 @@
   ASSERT_EQ(cacheableDouble->value(), 1.1);
 }
 
-TEST(SerializableCreateTests, for_bool) {
+TEST(SerializableCreateTests, forBool) {
   const auto serializable = Serializable::create(true);
   ASSERT_TRUE(nullptr != serializable);
   auto&& cacheableBoolean =
@@ -153,7 +153,7 @@
   ASSERT_EQ(cacheableBoolean->value(), true);
 }
 
-TEST(SerializableCreateTests, for_timepoint) {
+TEST(SerializableCreateTests, forTimepoint) {
   auto time = std::chrono::system_clock::now();
   const auto serializable = Serializable::create(time);
   ASSERT_TRUE(nullptr != serializable);
diff --git a/cppcache/test/StringPrefixPartitionResolverTest.cpp b/cppcache/test/StringPrefixPartitionResolverTest.cpp
new file mode 100644
index 0000000..45ca65e
--- /dev/null
+++ b/cppcache/test/StringPrefixPartitionResolverTest.cpp
@@ -0,0 +1,68 @@
+/*
+ * 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.
+ */
+
+#include <gtest/gtest.h>
+
+#include <geode/CacheableKey.hpp>
+#include <geode/EntryEvent.hpp>
+#include <geode/StringPrefixPartitionResolver.hpp>
+
+using apache::geode::client::CacheableKey;
+using apache::geode::client::EntryEvent;
+using apache::geode::client::IllegalArgumentException;
+using apache::geode::client::StringPrefixPartitionResolver;
+
+TEST(StringPrefixPartitionResolverTest, testGetName) {
+  EXPECT_EQ(StringPrefixPartitionResolver{}.getName(),
+            "StringPrefixPartitionResolver");
+}
+
+TEST(StringPrefixPartitionResolverTest, testWithNullKey) {
+  StringPrefixPartitionResolver pr;
+  EntryEvent event{nullptr, nullptr, nullptr, nullptr, nullptr, false};
+
+  auto key = pr.getRoutingObject(event);
+  EXPECT_FALSE(key);
+}
+
+TEST(StringPrefixPartitionResolverTest, testWithDefaultDelimiter) {
+  StringPrefixPartitionResolver pr;
+  auto key = CacheableKey::create("prefix|suffix");
+  EntryEvent event{nullptr, key, nullptr, nullptr, nullptr, false};
+
+  key = pr.getRoutingObject(event);
+  EXPECT_TRUE(key);
+  EXPECT_EQ(key->toString(), "prefix");
+}
+
+TEST(StringPrefixPartitionResolverTest, testWithCustomDelimiter) {
+  StringPrefixPartitionResolver pr{"$#"};
+  auto key = CacheableKey::create("prefix$#suffix");
+  EntryEvent event{nullptr, key, nullptr, nullptr, nullptr, false};
+
+  key = pr.getRoutingObject(event);
+  EXPECT_TRUE(key);
+  EXPECT_EQ(key->toString(), "prefix");
+}
+
+TEST(StringPrefixPartitionResolverTest, testNoDelimiterFound) {
+  StringPrefixPartitionResolver pr;
+  auto key = CacheableKey::create("prefix-suffix");
+  EntryEvent event{nullptr, key, nullptr, nullptr, nullptr, false};
+
+  EXPECT_THROW(pr.getRoutingObject(event), IllegalArgumentException);
+}
diff --git a/cppcache/test/TXIdTest.cpp b/cppcache/test/TXIdTest.cpp
new file mode 100644
index 0000000..9356307
--- /dev/null
+++ b/cppcache/test/TXIdTest.cpp
@@ -0,0 +1,53 @@
+/*
+ * 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.
+ */
+
+#include <TXId.hpp>
+
+#include <gtest/gtest.h>
+
+namespace apache {
+namespace geode {
+namespace client {
+
+TEST(TXIdTest, testIncrementTransactionID) {
+  TXId tx1;
+  ASSERT_EQ(1, tx1.getId());
+
+  TXId tx2;
+  ASSERT_EQ(2, tx2.getId());
+}
+
+TEST(TXIdTest, testIncrementTransactionIdOverMaxValue) {
+  // Set inital value of transactionId to integer INT32_MAX.
+  TXId::setInitalTransactionIDValue(INT32_MAX);
+
+  // TransactionId is incremented by one each time TXId is created.
+  // When transactionId is incremented over the INT32_MAX value
+  // then it should be reset to one.
+  TXId tx1;
+  ASSERT_EQ(1, tx1.getId());
+
+  TXId tx2;
+  ASSERT_EQ(2, tx2.getId());
+
+  // reset value at the end of test
+  TXId::setInitalTransactionIDValue(0);
+}
+
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
diff --git a/cppcache/test/TcrMessageTest.cpp b/cppcache/test/TcrMessageTest.cpp
index cfe2004..2654d1a 100644
--- a/cppcache/test/TcrMessageTest.cpp
+++ b/cppcache/test/TcrMessageTest.cpp
@@ -18,11 +18,13 @@
 #include <TcrMessage.hpp>
 #include <iostream>
 
+#include <gtest/gtest.h>
+
 #include <geode/CacheFactory.hpp>
 #include <geode/CqState.hpp>
 
 #include "ByteArrayFixture.hpp"
-#include "gtest/gtest.h"
+#include "SerializationRegistry.hpp"
 
 namespace {
 
@@ -78,7 +80,7 @@
   EXPECT_EQ(TcrMessage::INVALID, message.getMessageType());
 }
 
-TEST_F(TcrMessageTest, testConstructor1MessageDataContentWithDESTROY_REGION) {
+TEST_F(TcrMessageTest, testConstructor1MessageDataContentWithDestoryRegion) {
   using apache::geode::client::TcrMessageDestroyRegion;
 
   const Region *region = nullptr;
@@ -99,7 +101,7 @@
       message);
 }
 
-TEST_F(TcrMessageTest, testConstructor1MessageDataContentWithCLEAR_REGION) {
+TEST_F(TcrMessageTest, testConstructor1MessageDataContentWithClearRegion) {
   using apache::geode::client::TcrMessageClearRegion;
 
   const Region *region = nullptr;
@@ -135,7 +137,7 @@
       message);
 }
 
-TEST_F(TcrMessageTest, testQueryConstructorWithQUERY) {
+TEST_F(TcrMessageTest, testQueryConstructorWithQuery) {
   using apache::geode::client::TcrMessageQuery;
 
   std::chrono::milliseconds messageResponseTimeout{1000};
@@ -152,7 +154,7 @@
       message);
 }
 
-TEST_F(TcrMessageTest, testQueryConstructorWithSTOPCQ_MSG_TYPE) {
+TEST_F(TcrMessageTest, testQueryConstructorWithStopCq) {
   using apache::geode::client::TcrMessageStopCQ;
 
   std::chrono::milliseconds messageResponseTimeout{1000};
@@ -169,7 +171,7 @@
       message);
 }
 
-TEST_F(TcrMessageTest, testQueryConstructorWithCLOSECQ_MSG_TYPE) {
+TEST_F(TcrMessageTest, testQueryConstructorWithCloseCq) {
   using apache::geode::client::TcrMessageCloseCQ;
 
   std::chrono::milliseconds messageResponseTimeout{1000};
@@ -187,7 +189,7 @@
 }
 
 TEST_F(TcrMessageTest,
-       testParameterizedQueryConstructorWithQUERY_WITH_PARAMETERS) {
+       testParameterizedQueryConstructorWithQueryWithParameters) {
   using apache::geode::client::TcrMessageQueryWithParameters;
 
   std::chrono::milliseconds messageResponseTimeout{1000};
@@ -207,7 +209,7 @@
       message);
 }
 
-TEST_F(TcrMessageTest, testConstructorWithCONTAINS_KEY) {
+TEST_F(TcrMessageTest, testConstructorWithContainsKey) {
   using apache::geode::client::TcrMessageContainsKey;
 
   TcrMessageContainsKey message(
@@ -226,7 +228,7 @@
       message);
 }
 
-TEST_F(TcrMessageTest, testConstructorWithGETDURABLECQS_MSG_TYPE) {
+TEST_F(TcrMessageTest, testConstructorWithGetDurableCqs) {
   using apache::geode::client::TcrMessageGetDurableCqs;
 
   TcrMessageGetDurableCqs message(new DataOutputUnderTest(),
@@ -256,26 +258,26 @@
       message);
 }
 
-TEST_F(TcrMessageTest, testConstructor2WithDESTROY) {
+TEST_F(TcrMessageTest, testConstructor2WithDestroy) {
   using apache::geode::client::TcrMessageDestroy;
 
   TcrMessageDestroy message(
       new DataOutputUnderTest(), static_cast<const Region *>(nullptr),
       CacheableString::create("mykey"),
-      static_cast<const std::shared_ptr<CacheableKey>>(nullptr),
+      static_cast<const std::shared_ptr<CacheableKey>>(nullptr), true,
       static_cast<const std::shared_ptr<Serializable>>(nullptr),
       static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::DESTROY, message.getMessageType());
 
   EXPECT_MESSAGE_EQ(
-      "000000090000004800000005FFFFFFFF000000001300494E56414C49445F524547494F4E"
-      "5F4E414D4500000008015700056D796B6579000000010129000000010129000000120003"
-      "000000000000000103\\h{16}",
+      "000000090000004900000005FFFFFFFF000000001300494E56414C49445F524547494F4E"
+      "5F4E414D4500000008015700056D796B6579000000010129000000020137080000001200"
+      "03000000000000000103\\h{16}",
       message);
 }
 
-TEST_F(TcrMessageTest, testConstructor2WithINVALIDATE) {
+TEST_F(TcrMessageTest, testConstructor2WithInvalidate) {
   using apache::geode::client::TcrMessageInvalidate;
 
   TcrMessageInvalidate message(
@@ -295,7 +297,7 @@
       message);
 }
 
-TEST_F(TcrMessageTest, testConstructor3WithPUT) {
+TEST_F(TcrMessageTest, testConstructor3WithPut) {
   using apache::geode::client::TcrMessagePut;
 
   TcrMessagePut message(
@@ -373,7 +375,7 @@
       message);
 }
 
-TEST_F(TcrMessageTest, testConstructor5WithUNREGISTER_INTERST_LIST) {
+TEST_F(TcrMessageTest, testConstructor5WithUnregisterInteresetList) {
   using apache::geode::client::TcrMessageUnregisterInterestList;
 
   std::vector<std::shared_ptr<CacheableKey>> keys;
@@ -381,9 +383,7 @@
 
   TcrMessageUnregisterInterestList message(
       new DataOutputUnderTest(), static_cast<const Region *>(nullptr), keys,
-      false,  // isDurable
-      false,  // receiveValues
-      InterestResultPolicy::NONE, static_cast<ThinClientBaseDM *>(nullptr));
+      false, static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::UNREGISTER_INTEREST_LIST, message.getMessageType());
 
@@ -394,7 +394,7 @@
       message);
 }
 
-TEST_F(TcrMessageTest, testConstructorGET_FUNCTION_ATTRIBUTES) {
+TEST_F(TcrMessageTest, testConstructorGetFunctionAttributes) {
   using apache::geode::client::TcrMessageGetFunctionAttributes;
 
   TcrMessageGetFunctionAttributes message(
@@ -408,7 +408,7 @@
       message);
 }
 
-TEST_F(TcrMessageTest, testConstructorKEY_SET) {
+TEST_F(TcrMessageTest, testConstructorKeySet) {
   using apache::geode::client::TcrMessageKeySet;
 
   TcrMessageKeySet message(new DataOutputUnderTest(),
@@ -423,30 +423,28 @@
       message);
 }
 
-TEST_F(TcrMessageTest, testConstructor6WithCREATE_REGION) {
+TEST_F(TcrMessageTest, testConstructor6WithCreateRegion) {
   using apache::geode::client::TcrMessageCreateRegion;
 
-  TcrMessageCreateRegion message(new DataOutputUnderTest(),
-                                 "str1",  // TODO: what does this parameter do?!
-                                 "str2",  // TODO: what does this parameter do?!
-                                 false,   // isDurable
-                                 false,   // receiveValues
+  TcrMessageCreateRegion message(new DataOutputUnderTest(), "parentRegionName",
+                                 "regionName",
+                                 false,  // isDurable
+                                 false,  // receiveValues
                                  static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::CREATE_REGION, message.getMessageType());
 
   EXPECT_MESSAGE_EQ(
-      "0000001D0000001200000002FFFFFFFF00000000040073747231000000040073747232",
+      "0000001D0000002400000002FFFFFFFF000000001000706172656E74526567696F6E4E61"
+      "6D650000000A00726567696F6E4E616D65",
       message);
 }
 
-TEST_F(TcrMessageTest, testConstructor6WithREGISTER_INTEREST) {
-  using apache::geode::client::TcrMessageRegisterInterest;
+TEST_F(TcrMessageTest, testConstructor6WithRegisterInterest) {
+  using apache::geode::client::TcrMessageRegisterInterestRegex;
 
-  TcrMessageRegisterInterest message(
-      new DataOutputUnderTest(),
-      "str1",  // TODO: what does this parameter do?!
-      "str2",  // TODO: what does this parameter do?!
+  TcrMessageRegisterInterestRegex message(
+      new DataOutputUnderTest(), "regionName", "regexString",
       InterestResultPolicy::NONE,
       false,  // isDurable
       false,  // isCacheingEnabled
@@ -456,32 +454,109 @@
   EXPECT_EQ(TcrMessage::REGISTER_INTEREST, message.getMessageType());
 
   EXPECT_MESSAGE_EQ(
-      "000000140000003600000007FFFFFFFF0000000004007374723100000004000000000100"
-      "0000030101250000000001000000000004007374723200000001000100000002000000",
+      "000000140000004300000007FFFFFFFF000000000A00726567696F6E4E616D6500000004"
+      "000000000100000003010125000000000100000000000B007265676578537472696E6700"
+      "000001000100000002000000",
       message);
-}
 
-TEST_F(TcrMessageTest, testConstructor6WithUNREGISTER_INTEREST) {
-  using apache::geode::client::TcrMessageUnregisterInterest;
+  TcrMessageRegisterInterestRegex message2(
+      new DataOutputUnderTest(), "regionName", "regexString",
+      InterestResultPolicy::NONE,
+      true,   // isDurable
+      false,  // isCacheingEnabled
+      false,  // receiveValues
+      static_cast<ThinClientBaseDM *>(nullptr));
 
-  TcrMessageUnregisterInterest message(
-      new DataOutputUnderTest(),
-      "str1",  // TODO: what does this parameter do?!
-      "str2",  // TODO: what does this parameter do?!
+  EXPECT_EQ(TcrMessage::REGISTER_INTEREST, message2.getMessageType());
+
+  EXPECT_MESSAGE_EQ(
+      "000000140000004300000007FFFFFFFF000000000A00726567696F6E4E616D6500000004"
+      "000000000100000003010125000000000100010000000B007265676578537472696E6700"
+      "000001000100000002000000",
+      message2);
+
+  TcrMessageRegisterInterestRegex message3(
+      new DataOutputUnderTest(), "regionName", "regexString",
       InterestResultPolicy::NONE,
       false,  // isDurable
+      true,   // isCacheingEnabled
       false,  // receiveValues
       static_cast<ThinClientBaseDM *>(nullptr));
 
+  EXPECT_EQ(TcrMessage::REGISTER_INTEREST, message3.getMessageType());
+
+  EXPECT_MESSAGE_EQ(
+      "000000140000004300000007FFFFFFFF000000000A00726567696F6E4E616D6500000004"
+      "000000000100000003010125000000000100000000000B007265676578537472696E6700"
+      "000001000100000002000100",
+      message3);
+
+  TcrMessageRegisterInterestRegex message4(
+      new DataOutputUnderTest(), "regionName", "regexString",
+      InterestResultPolicy::NONE,
+      false,  // isDurable
+      false,  // isCacheingEnabled
+      true,   // receiveValues
+      static_cast<ThinClientBaseDM *>(nullptr));
+
+  EXPECT_EQ(TcrMessage::REGISTER_INTEREST, message4.getMessageType());
+
+  EXPECT_MESSAGE_EQ(
+      "000000140000004300000007FFFFFFFF000000000A00726567696F6E4E616D6500000004"
+      "000000000100000003010125000000000100000000000B007265676578537472696E6700"
+      "000001000000000002000000",
+      message4);
+
+  TcrMessageRegisterInterestRegex message5(
+      new DataOutputUnderTest(), "regionName", "regexString",
+      InterestResultPolicy::KEYS,
+      true,  // isDurable
+      true,  // isCacheingEnabled
+      true,  // receiveValues
+      static_cast<ThinClientBaseDM *>(nullptr));
+
+  EXPECT_EQ(TcrMessage::REGISTER_INTEREST, message5.getMessageType());
+
+  EXPECT_MESSAGE_EQ(
+      "000000140000004300000007FFFFFFFF000000000A00726567696F6E4E616D6500000004"
+      "000000000100000003010125010000000100010000000B007265676578537472696E6700"
+      "000001000000000002000100",
+      message5);
+
+  TcrMessageRegisterInterestRegex message6(
+      new DataOutputUnderTest(), "regionName", "regexString",
+      InterestResultPolicy::KEYS_VALUES,
+      true,  // isDurable
+      true,  // isCacheingEnabled
+      true,  // receiveValues
+      static_cast<ThinClientBaseDM *>(nullptr));
+
+  EXPECT_EQ(TcrMessage::REGISTER_INTEREST, message6.getMessageType());
+
+  EXPECT_MESSAGE_EQ(
+      "000000140000004300000007FFFFFFFF000000000A00726567696F6E4E616D6500000004"
+      "000000000100000003010125020000000100010000000B007265676578537472696E6700"
+      "000001000000000002000100",
+      message6);
+}
+
+TEST_F(TcrMessageTest, testConstructor6WithUnregisterInterest) {
+  using apache::geode::client::TcrMessageUnregisterInterestRegex;
+
+  TcrMessageUnregisterInterestRegex message(
+      new DataOutputUnderTest(), "regionName", "regexString",
+      false,  // isDurable
+      static_cast<ThinClientBaseDM *>(nullptr));
+
   EXPECT_EQ(TcrMessage::UNREGISTER_INTEREST, message.getMessageType());
 
   EXPECT_MESSAGE_EQ(
-      "000000160000002700000005FFFFFFFF0000000004007374723100000004000000000100"
-      "0000040073747232000000010000000000010000",
+      "000000160000003400000005FFFFFFFF000000000A00726567696F6E4E616D6500000004"
+      "00000000010000000B007265676578537472696E67000000010000000000010000",
       message);
 }
 
-TEST_F(TcrMessageTest, testConstructorGET_PDX_TYPE_BY_ID) {
+TEST_F(TcrMessageTest, testConstructorGetPdxTypeById) {
   using apache::geode::client::TcrMessageGetPdxTypeById;
 
   TcrMessageGetPdxTypeById message(new DataOutputUnderTest(), 42,
@@ -493,7 +568,7 @@
                     message);
 }
 
-TEST_F(TcrMessageTest, testConstructorGET_PDX_ENUM_BY_ID) {
+TEST_F(TcrMessageTest, testConstructorGetPdxEnumById) {
   using apache::geode::client::TcrMessageGetPdxEnumById;
 
   TcrMessageGetPdxEnumById message(new DataOutputUnderTest(), 42,
@@ -505,7 +580,7 @@
                     message);
 }
 
-TEST_F(TcrMessageTest, testConstructorGET_PDX_ID_FOR_TYPE) {
+TEST_F(TcrMessageTest, testConstructorGetPdxIdForType) {
   using apache::geode::client::TcrMessageGetPdxIdForType;
 
   std::shared_ptr<Cacheable> myPtr(CacheableString::createDeserializable());
@@ -518,7 +593,7 @@
                     message);
 }
 
-TEST_F(TcrMessageTest, testConstructorADD_PDX_TYPE) {
+TEST_F(TcrMessageTest, testConstructorAddPdxType) {
   using apache::geode::client::TcrMessageAddPdxType;
 
   std::shared_ptr<Cacheable> myPtr(CacheableString::createDeserializable());
@@ -532,7 +607,7 @@
       message);
 }
 
-TEST_F(TcrMessageTest, testConstructorGET_PDX_ID_FOR_ENUM) {
+TEST_F(TcrMessageTest, testConstructorGetPdxIdForEnum) {
   using apache::geode::client::TcrMessageGetPdxIdForEnum;
 
   TcrMessageGetPdxIdForEnum message(
@@ -545,11 +620,9 @@
   EXPECT_MESSAGE_EQ("000000610000000600000001FFFFFFFF00000000010129", message);
 }
 
-TEST_F(TcrMessageTest, testConstructorADD_PDX_ENUM) {
+TEST_F(TcrMessageTest, testConstructorAddPdxEnum) {
   using apache::geode::client::TcrMessageAddPdxEnum;
 
-  std::shared_ptr<Cacheable> myPtr(CacheableString::createDeserializable());
-
   TcrMessageAddPdxEnum message(new DataOutputUnderTest(),
                                static_cast<std::shared_ptr<Cacheable>>(nullptr),
                                static_cast<ThinClientBaseDM *>(nullptr), 42);
@@ -574,7 +647,7 @@
   EXPECT_MESSAGE_EQ("000000440000000600000001FFFFFFFF00000000010129", message);
 }
 
-TEST_F(TcrMessageTest, testConstructorREMOVE_USER_AUTH) {
+TEST_F(TcrMessageTest, testConstructorRemoveUserAuth) {
   using apache::geode::client::TcrMessageRemoveUserAuth;
 
   TcrMessageRemoveUserAuth message(new DataOutputUnderTest(), true,
@@ -592,7 +665,7 @@
   EXPECT_MESSAGE_EQ("0000004E0000000600000001FFFFFFFF00000000010000", message2);
 }
 
-TEST_F(TcrMessageTest, testConstructorUSER_CREDENTIAL_MESSAGE) {
+TEST_F(TcrMessageTest, testConstructorUserCredential) {
   using apache::geode::client::Properties;
   using apache::geode::client::TcrMessageUserCredential;
 
@@ -607,7 +680,7 @@
   EXPECT_MESSAGE_EQ("", message);
 }
 
-TEST_F(TcrMessageTest, testConstructorGET_CLIENT_PARTITION_ATTRIBUTES) {
+TEST_F(TcrMessageTest, testConstructorGetClientPartitionAttributes) {
   using apache::geode::client::TcrMessageGetClientPartitionAttributes;
 
   TcrMessageGetClientPartitionAttributes message(new DataOutputUnderTest(),
@@ -622,7 +695,7 @@
       message);
 }
 
-TEST_F(TcrMessageTest, testConstructorGET_CLIENT_PR_METADATA) {
+TEST_F(TcrMessageTest, testConstructorGetClientPrMetadata) {
   using apache::geode::client::TcrMessageGetClientPrMetadata;
 
   TcrMessageGetClientPrMetadata message(new DataOutputUnderTest(),
@@ -635,7 +708,7 @@
       "6F6E50524D455441",
       message);
 }
-TEST_F(TcrMessageTest, testConstructorSIZE) {
+TEST_F(TcrMessageTest, testConstructorSize) {
   using apache::geode::client::TcrMessageSize;
 
   TcrMessageSize message(new DataOutputUnderTest(), "testClientRegionSIZE");
@@ -648,7 +721,7 @@
       message);
 }
 
-TEST_F(TcrMessageTest, testConstructorEXECUTE_REGION_FUNCTION_SINGLE_HOP) {
+TEST_F(TcrMessageTest, testConstructorExecuteRegionFunctionSingleHop) {
   using apache::geode::client::TcrMessageExecuteRegionFunctionSingleHop;
 
   const Region *region = nullptr;
@@ -676,7 +749,7 @@
   EXPECT_TRUE(message.hasResult());
 }
 
-TEST_F(TcrMessageTest, testConstructorEXECUTE_REGION_FUNCTION) {
+TEST_F(TcrMessageTest, testConstructorExecuteRegionFunction) {
   using apache::geode::client::TcrMessageExecuteRegionFunction;
 
   const Region *region = nullptr;
@@ -705,7 +778,7 @@
   EXPECT_TRUE(testMessage.hasResult());
 }
 
-TEST_F(TcrMessageTest, DISABLED_testConstructorEXECUTE_FUNCTION) {
+TEST_F(TcrMessageTest, DISABLED_testConstructorExecuteFunction) {
   using apache::geode::client::TcrMessageExecuteFunction;
 
   std::shared_ptr<Cacheable> myCacheablePtr(
@@ -725,7 +798,7 @@
       testMessage);
 }
 
-TEST_F(TcrMessageTest, testConstructorEXECUTECQ_MSG_TYPE) {
+TEST_F(TcrMessageTest, testConstructorExecuteCq) {
   using apache::geode::client::TcrMessageExecuteCq;
 
   std::shared_ptr<Cacheable> myCacheablePtr(
@@ -744,12 +817,9 @@
       testMessage);
 }
 
-TEST_F(TcrMessageTest, testConstructorWithGinormousQueryEXECUTECQ_MSG_TYPE) {
+TEST_F(TcrMessageTest, testConstructorWithGinormousQueryExecuteCq) {
   using apache::geode::client::TcrMessageExecuteCq;
 
-  std::shared_ptr<Cacheable> myCacheablePtr(
-      CacheableString::createDeserializable());
-
   std::ostringstream oss;
   oss << "select * from /somewhere s where s.data.id in SET(";
   // Ensure over 64KiB of query string.
@@ -778,12 +848,9 @@
       testMessage);
 }
 
-TEST_F(TcrMessageTest, testConstructorEXECUTECQ_WITH_IR_MSG_TYPE) {
+TEST_F(TcrMessageTest, testConstructorExecuteCqWithIr) {
   using apache::geode::client::TcrMessageExecuteCqWithIr;
 
-  std::shared_ptr<Cacheable> myCacheablePtr(
-      CacheableString::createDeserializable());
-
   TcrMessageExecuteCqWithIr testMessage(
       new DataOutputUnderTest(), "ExecuteCQWithIr", "select * from /somewhere",
       CqState::RUNNING, false, static_cast<ThinClientBaseDM *>(nullptr));
@@ -798,26 +865,25 @@
       testMessage);
 }
 
-TEST_F(TcrMessageTest, testConstructorPING) {
+TEST_F(TcrMessageTest, testConstructorPing) {
   using apache::geode::client::TcrMessagePing;
 
-  std::shared_ptr<Cacheable> myCacheablePtr(
-      CacheableString::createDeserializable());
-
-  TcrMessagePing testMessage(new DataOutputUnderTest(), false);
+  TcrMessagePing testMessage(
+      std::unique_ptr<DataOutput>(new DataOutputUnderTest()));
 
   EXPECT_EQ(TcrMessage::PING, testMessage.getMessageType());
 
   EXPECT_MESSAGE_EQ("000000050000000000000000FFFFFFFF00", testMessage);
 }
 
-TEST_F(TcrMessageTest, testConstructorCLOSE_CONNECTION) {
+TEST_F(TcrMessageTest, testConstructorCloseConnection) {
   using apache::geode::client::TcrMessageCloseConnection;
 
   std::shared_ptr<Cacheable> myCacheablePtr(
       CacheableString::createDeserializable());
 
-  TcrMessageCloseConnection testMessage(new DataOutputUnderTest(), false);
+  TcrMessageCloseConnection testMessage(
+      std::unique_ptr<DataOutput>(new DataOutputUnderTest()), false);
 
   EXPECT_EQ(TcrMessage::CLOSE_CONNECTION, testMessage.getMessageType());
 
@@ -825,4 +891,19 @@
                     testMessage);
 }
 
+TEST_F(TcrMessageTest, testConstructorCloseConnectionKeepAlive) {
+  using apache::geode::client::TcrMessageCloseConnection;
+
+  std::shared_ptr<Cacheable> myCacheablePtr(
+      CacheableString::createDeserializable());
+
+  TcrMessageCloseConnection testMessage(
+      std::unique_ptr<DataOutput>(new DataOutputUnderTest()), true);
+
+  EXPECT_EQ(TcrMessage::CLOSE_CONNECTION, testMessage.getMessageType());
+
+  EXPECT_MESSAGE_EQ("000000120000000600000001FFFFFFFF00000000010001",
+                    testMessage);
+}
+
 }  // namespace
diff --git a/cppcache/test/ThreadPoolTest.cpp b/cppcache/test/ThreadPoolTest.cpp
index f62bf61..3f0bb24 100644
--- a/cppcache/test/ThreadPoolTest.cpp
+++ b/cppcache/test/ThreadPoolTest.cpp
@@ -33,7 +33,7 @@
  public:
   TestCallable() : called_(0) {}
 
-  void call() {
+  void call() override {
     std::lock_guard<decltype(mutex_)> lock(mutex_);
     called_++;
     condition_.notify_all();
diff --git a/dependencies/ACE/config.h.in b/cppcache/test/gmock_extensions.h
old mode 100755
new mode 100644
similarity index 70%
copy from dependencies/ACE/config.h.in
copy to cppcache/test/gmock_extensions.h
index b6ee2e8..8bca2d9
--- a/dependencies/ACE/config.h.in
+++ b/cppcache/test/gmock_extensions.h
@@ -14,23 +14,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
-#define ACE_LACKS_IOSTREAM_TOTALLY 1
-#define ACE_HAS_VERSIONED_NAMESPACE 1
 
-#if __cplusplus >= 201103L
+#pragma once
 
-#if defined(__SUNPRO_CC)
-#define ACE_HAS_CPP11 1
-#define _RWSTD_ALLOCATOR 1
-#endif
+#ifndef GEODE_GMOCK_EXTENSIONS_H_
+#define GEODE_GMOCK_EXTENSIONS_H_
 
-#endif // __cplusplus >= 201103L
+#include <gmock/gmock.h>
 
-#cmakedefine WITH_IPV6
-#ifdef WITH_IPV6
-#define ACE_HAS_IPV6 1
-#endif
+ACTION_P(ReleaseSem, sem) { sem->release(); }
 
-#include "ace/config-@ACE_CONFIG@.h"
-
+#endif  // GEODE_GMOCK_EXTENSIONS_H_
diff --git a/cppcache/test/gtest_extensions.h b/cppcache/test/gtest_extensions.h
index 4c29f0d..574adaf 100644
--- a/cppcache/test/gtest_extensions.h
+++ b/cppcache/test/gtest_extensions.h
@@ -22,9 +22,10 @@
 
 #include <iostream>
 #include <limits>
-#include <regex>
 #include <string>
 
+#include <boost/regex.hpp>
+
 #include <gtest/gtest.h>
 
 #include <geode/internal/chrono/duration.hpp>
@@ -65,9 +66,9 @@
 
 inline ::testing::AssertionResult regexMatch(const char* s1_expression,
                                              const char* /*s2_expression*/,
-                                             const std::regex& regex,
+                                             const boost::regex& regex,
                                              const std::string& source) {
-  if (!std::regex_match(source, regex)) {
+  if (!boost::regex_match(source, regex)) {
     return ::testing::AssertionFailure()
            << squash(source) << " !~ " << s1_expression;
   }
@@ -79,7 +80,7 @@
                                              const char* /*s2_expression*/,
                                              const std::string& regex,
                                              const std::string& source) {
-  if (!std::regex_match(source, std::regex(regex))) {
+  if (!boost::regex_match(source, boost::regex(regex))) {
     return ::testing::AssertionFailure()
            << squash(source) << " !~ /" << regex << "/";
   }
diff --git a/cppcache/src/InterestResultPolicy.cpp b/cppcache/test/mock/ClientMetadataMock.hpp
similarity index 71%
copy from cppcache/src/InterestResultPolicy.cpp
copy to cppcache/test/mock/ClientMetadataMock.hpp
index b043896..be7716c 100644
--- a/cppcache/src/InterestResultPolicy.cpp
+++ b/cppcache/test/mock/ClientMetadataMock.hpp
@@ -15,17 +15,25 @@
  * limitations under the License.
  */
 
-#include "InterestResultPolicy.hpp"
+#pragma once
+
+#ifndef GEODE_CLIENTMETADATAMOCK_H_
+#define GEODE_CLIENTMETADATAMOCK_H_
+
+#include <gmock/gmock.h>
+
+#include "ClientMetadata.hpp"
 
 namespace apache {
 namespace geode {
 namespace client {
-
-char InterestResultPolicy::nextOrdinal = 0;
-InterestResultPolicy InterestResultPolicy::NONE;
-InterestResultPolicy InterestResultPolicy::KEYS;
-InterestResultPolicy InterestResultPolicy::KEYS_VALUES;
-
+class ClientMetadataMock : public ClientMetadata {
+ public:
+  MOCK_METHOD1(adviseServerLocations,
+               std::vector<std::shared_ptr<BucketServerLocation>>(int bucket));
+};
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
+
+#endif  // GEODE_CLIENTMETADATAMOCK_H_
diff --git a/cppcache/test/mock/MapEntryImplMock.hpp b/cppcache/test/mock/MapEntryImplMock.hpp
index 68fc6c7..ab234d0 100644
--- a/cppcache/test/mock/MapEntryImplMock.hpp
+++ b/cppcache/test/mock/MapEntryImplMock.hpp
@@ -22,7 +22,7 @@
 
 #include <gmock/gmock.h>
 
-#include "MapEntry.hpp"
+#include "MapEntryImpl.hpp"
 
 namespace apache {
 namespace geode {
diff --git a/cppcache/src/InterestResultPolicy.cpp b/cppcache/test/mock/MockExpiryTask.hpp
similarity index 72%
copy from cppcache/src/InterestResultPolicy.cpp
copy to cppcache/test/mock/MockExpiryTask.hpp
index b043896..c7363b5 100644
--- a/cppcache/src/InterestResultPolicy.cpp
+++ b/cppcache/test/mock/MockExpiryTask.hpp
@@ -15,17 +15,26 @@
  * limitations under the License.
  */
 
-#include "InterestResultPolicy.hpp"
+#ifndef GEODE_MOCKEXPIRYTASK_H_
+#define GEODE_MOCKEXPIRYTASK_H_
+
+#include <gmock/gmock.h>
+
+#include "ExpiryTask.hpp"
 
 namespace apache {
 namespace geode {
 namespace client {
+class MockExpiryTask : public ExpiryTask {
+ public:
+  explicit MockExpiryTask(ExpiryTaskManager& manager) : ExpiryTask(manager) {}
 
-char InterestResultPolicy::nextOrdinal = 0;
-InterestResultPolicy InterestResultPolicy::NONE;
-InterestResultPolicy InterestResultPolicy::KEYS;
-InterestResultPolicy InterestResultPolicy::KEYS_VALUES;
+  using ExpiryTask::reset;
 
+  MOCK_METHOD0(on_expire, bool());
+};
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
+
+#endif  // GEODE_MOCKEXPIRYTASK_H_
diff --git a/cppcache/test/statistics/HostStatSamplerTest.cpp b/cppcache/test/statistics/HostStatSamplerTest.cpp
index f3efbd8..33a23e4 100644
--- a/cppcache/test/statistics/HostStatSamplerTest.cpp
+++ b/cppcache/test/statistics/HostStatSamplerTest.cpp
@@ -66,9 +66,9 @@
 
   void initRollIndex() { HostStatSampler::initRollIndex(); }
 
-  int32_t getRollIndex() { return HostStatSampler::m_rollIndex; }
+  int32_t getRollIndex() { return HostStatSampler::rollIndex_; }
 
-  size_t getSpaceUsed() { return HostStatSampler::m_spaceUsed; }
+  size_t getSpaceUsed() { return HostStatSampler::spaceUsed_; }
 };
 
 TEST(HostStatSamplerTest,
diff --git a/cppcache/test/util/chrono/durationTest.cpp b/cppcache/test/util/chrono/durationTest.cpp
index 80e766e..26f95c9 100644
--- a/cppcache/test/util/chrono/durationTest.cpp
+++ b/cppcache/test/util/chrono/durationTest.cpp
@@ -29,7 +29,7 @@
 using apache::geode::internal::chrono::duration::to_string;
 using apache::geode::util::chrono::duration::assert_bounds;
 
-TEST(util_chrono_durationTest, ceil) {
+TEST(durationTest, ceil) {
   EXPECT_EQ(std::chrono::seconds(1),
             _ceil<std::chrono::seconds>(std::chrono::milliseconds(1)));
   EXPECT_EQ(std::chrono::milliseconds(1),
@@ -38,7 +38,7 @@
             _ceil<std::chrono::milliseconds>(std::chrono::milliseconds(1)));
 }
 
-TEST(util_chrono_durationTest, to_string) {
+TEST(durationTest, toString) {
   EXPECT_EQ("42h", to_string(std::chrono::hours(42)));
   EXPECT_EQ("42min", to_string(std::chrono::minutes(42)));
   EXPECT_EQ("42s", to_string(std::chrono::seconds(42)));
@@ -52,7 +52,7 @@
             to_string(std::chrono::duration<int, std::ratio<1, 100000>>(100)));
 }
 
-TEST(util_chrono_durationTest, from_string) {
+TEST(durationTest, fromString) {
   EXPECT_EQ(std::chrono::hours(42), from_string("42h"));
   EXPECT_EQ(std::chrono::minutes(42), from_string("42min"));
   EXPECT_EQ(std::chrono::seconds(42), from_string("42s"));
@@ -63,7 +63,7 @@
   EXPECT_EQ(std::chrono::nanoseconds(-42), from_string("-42ns"));
 }
 
-TEST(util_chrono_durationTest, from_stringWithCeil) {
+TEST(durationTest, fromStringWithCeil) {
   EXPECT_EQ(std::chrono::hours(42), from_string<std::chrono::hours>("42h"));
   EXPECT_EQ(std::chrono::hours(1), from_string<std::chrono::hours>("42min"));
   EXPECT_EQ(std::chrono::minutes(1), from_string<std::chrono::minutes>("42s"));
@@ -76,11 +76,11 @@
             from_string<std::chrono::seconds>("2000ms"));
 }
 
-TEST(util_chrono_durationTest, from_stringException) {
+TEST(durationTest, fromStringException) {
   ASSERT_THROW(from_string("42"), std::invalid_argument);
 }
 
-TEST(util_chrono_durationTest, assert_bounds) {
+TEST(durationTest, assertBounds) {
   auto protocolTimeoutLimit = assert_bounds<int32_t, std::milli, 0>{};
 
   ASSERT_NO_THROW(protocolTimeoutLimit(std::chrono::milliseconds(2147483647)));
diff --git a/cppcache/test/util/functionalTests.cpp b/cppcache/test/util/functionalTests.cpp
index 1cd483c..eee0269 100644
--- a/cppcache/test/util/functionalTests.cpp
+++ b/cppcache/test/util/functionalTests.cpp
@@ -23,7 +23,7 @@
 
 using apache::geode::client::internal::geode_hash;
 
-TEST(string, geode_hash) {
+TEST(string, geodeHash) {
   auto&& hash = geode_hash<std::string>{};
 
   EXPECT_EQ(0, hash(""));
diff --git a/cppcache/test/util/queueTest.cpp b/cppcache/test/util/queueTest.cpp
index b5d6861..c31a3b3 100644
--- a/cppcache/test/util/queueTest.cpp
+++ b/cppcache/test/util/queueTest.cpp
@@ -23,7 +23,7 @@
 
 using apache::geode::client::queue::coalesce;
 
-TEST(util_queueTest, coalesce) {
+TEST(queueTest, coalesce) {
   auto queue = std::deque<int32_t>({1, 1, 1, 2, 3, 4});
 
   coalesce(queue, 1);
diff --git a/cppcache/test/util/synchronized_mapTest.cpp b/cppcache/test/util/synchronized_mapTest.cpp
index 2a6f79c..272b4b8 100644
--- a/cppcache/test/util/synchronized_mapTest.cpp
+++ b/cppcache/test/util/synchronized_mapTest.cpp
@@ -26,7 +26,7 @@
 
 using apache::geode::client::synchronized_map;
 
-TEST(synchronized_mapTest, emplaceLocks) {
+TEST(SynchronizedMapTest, emplaceLocks) {
   synchronized_map<std::unordered_map<std::string, std::string>,
                    TestableRecursiveMutex>
       map;
@@ -48,7 +48,7 @@
   EXPECT_EQ(2, map.mutex().unlock_count_);
 }
 
-TEST(synchronized_mapTest, eraseKeyLocks) {
+TEST(SynchronizedMapTest, eraseKeyLocks) {
   synchronized_map<std::unordered_map<std::string, std::string>,
                    TestableRecursiveMutex>
       map;
@@ -63,7 +63,7 @@
   EXPECT_EQ(1, map.mutex().unlock_count_);
 }
 
-TEST(synchronized_mapTest, beginLocks) {
+TEST(SynchronizedMapTest, beginLocks) {
   synchronized_map<std::unordered_map<std::string, std::string>,
                    TestableRecursiveMutex>
       map;
@@ -80,7 +80,7 @@
   EXPECT_EQ(0, map.mutex().unlock_count_);
 }
 
-TEST(synchronized_mapTest, beginConstLocks) {
+TEST(SynchronizedMapTest, beginConstLocks) {
   synchronized_map<std::unordered_map<std::string, std::string>,
                    TestableRecursiveMutex>
       map;
@@ -98,7 +98,7 @@
   EXPECT_EQ(0, map.mutex().unlock_count_);
 }
 
-TEST(synchronized_mapTest, cbeginLocks) {
+TEST(SynchronizedMapTest, cbeginLocks) {
   synchronized_map<std::unordered_map<std::string, std::string>,
                    TestableRecursiveMutex>
       map;
@@ -115,7 +115,7 @@
   EXPECT_EQ(0, map.mutex().unlock_count_);
 }
 
-TEST(synchronized_mapTest, endLocks) {
+TEST(SynchronizedMapTest, endLocks) {
   synchronized_map<std::unordered_map<std::string, std::string>,
                    TestableRecursiveMutex>
       map;
@@ -133,7 +133,7 @@
   EXPECT_EQ(0, map.mutex().unlock_count_);
 }
 
-TEST(synchronized_mapTest, endConsLocks) {
+TEST(SynchronizedMapTest, endConsLocks) {
   synchronized_map<std::unordered_map<std::string, std::string>,
                    TestableRecursiveMutex>
       map;
@@ -152,7 +152,7 @@
   EXPECT_EQ(0, map.mutex().unlock_count_);
 }
 
-TEST(synchronized_mapTest, cendLocks) {
+TEST(SynchronizedMapTest, cendLocks) {
   synchronized_map<std::unordered_map<std::string, std::string>,
                    TestableRecursiveMutex>
       map;
@@ -170,7 +170,7 @@
   EXPECT_EQ(0, map.mutex().unlock_count_);
 }
 
-TEST(synchronized_mapTest, emptyLocks) {
+TEST(SynchronizedMapTest, emptyLocks) {
   synchronized_map<std::unordered_map<std::string, std::string>,
                    TestableRecursiveMutex>
       map;
@@ -189,7 +189,7 @@
   EXPECT_EQ(1, map.mutex().unlock_count_);
 }
 
-TEST(synchronized_mapTest, sizeLocks) {
+TEST(SynchronizedMapTest, sizeLocks) {
   synchronized_map<std::unordered_map<std::string, std::string>,
                    TestableRecursiveMutex>
       map;
@@ -208,7 +208,7 @@
   EXPECT_EQ(1, map.mutex().unlock_count_);
 }
 
-TEST(synchronized_mapTest, clearLocks) {
+TEST(SynchronizedMapTest, clearLocks) {
   synchronized_map<std::unordered_map<std::string, std::string>,
                    TestableRecursiveMutex>
       map;
@@ -223,7 +223,7 @@
   EXPECT_TRUE(map.empty());
 }
 
-TEST(synchronized_mapTest, findNotLocked) {
+TEST(SynchronizedMapTest, findNotLocked) {
   synchronized_map<std::unordered_map<std::string, std::string>,
                    TestableRecursiveMutex>
       map;
@@ -244,7 +244,7 @@
   EXPECT_EQ(1, map.mutex().unlock_count_);
 }
 
-TEST(synchronized_mapTest, findConstNotLocked) {
+TEST(SynchronizedMapTest, findConstNotLocked) {
   synchronized_map<std::unordered_map<std::string, std::string>,
                    TestableRecursiveMutex>
       map;
@@ -266,7 +266,7 @@
   EXPECT_EQ(1, map.mutex().unlock_count_);
 }
 
-TEST(synchronized_mapTest, iteratorNotLocked) {
+TEST(SynchronizedMapTest, iteratorNotLocked) {
   synchronized_map<std::unordered_map<std::string, std::string>,
                    TestableRecursiveMutex>
       map;
@@ -305,7 +305,7 @@
   EXPECT_EQ(1, map.mutex().unlock_count_);
 }
 
-TEST(synchronized_mapTest, make_lockDefault) {
+TEST(SynchronizedMapTest, makeLockDefault) {
   synchronized_map<std::unordered_map<std::string, std::string>,
                    TestableRecursiveMutex>
       map;
@@ -321,7 +321,7 @@
   EXPECT_EQ(1, map.mutex().unlock_count_);
 }
 
-TEST(synchronized_mapTest, make_lock_WithUniqueLock) {
+TEST(SynchronizedMapTest, makeLockWithUniqueLock) {
   synchronized_map<std::unordered_map<std::string, std::string>,
                    TestableRecursiveMutex>
       map;
@@ -337,7 +337,7 @@
   EXPECT_EQ(1, map.mutex().unlock_count_);
 }
 
-TEST(synchronized_mapTest, make_lock_WithUniqueLockDefered) {
+TEST(SynchronizedMapTest, makeLockWithUniqueLockDefered) {
   synchronized_map<std::unordered_map<std::string, std::string>,
                    TestableRecursiveMutex>
       map;
@@ -357,7 +357,7 @@
   EXPECT_EQ(1, map.mutex().unlock_count_);
 }
 
-TEST(synchronized_mapTest, insertIteratorIteratorLocks) {
+TEST(SynchronizedMapTest, insertIteratorIteratorLocks) {
   std::unordered_map<std::string, std::string> source = {{"a", "A"},
                                                          {"b", "B"}};
 
diff --git a/cppcache/test/util/synchronized_setTest.cpp b/cppcache/test/util/synchronized_setTest.cpp
index 98f8563..005aa21 100644
--- a/cppcache/test/util/synchronized_setTest.cpp
+++ b/cppcache/test/util/synchronized_setTest.cpp
@@ -26,7 +26,7 @@
 
 using apache::geode::client::synchronized_set;
 
-TEST(synchronized_setTest, emplaceLocks) {
+TEST(SynchronizedSetTest, emplaceLocks) {
   synchronized_set<std::unordered_set<std::string>, TestableRecursiveMutex> set;
 
   auto result = set.emplace("a");
@@ -44,7 +44,7 @@
   EXPECT_EQ(2, set.mutex().unlock_count_);
 }
 
-TEST(synchronized_setTest, eraseKeyLocks) {
+TEST(SynchronizedSetTest, eraseKeyLocks) {
   synchronized_set<std::unordered_set<std::string>, TestableRecursiveMutex> set;
 
   set.emplace("a");
@@ -57,7 +57,7 @@
   EXPECT_EQ(1, set.mutex().unlock_count_);
 }
 
-TEST(synchronized_setTest, beginLocks) {
+TEST(SynchronizedSetTest, beginLocks) {
   synchronized_set<std::unordered_set<std::string>, TestableRecursiveMutex> set;
 
   set.emplace("a");
@@ -72,7 +72,7 @@
   EXPECT_EQ(0, set.mutex().unlock_count_);
 }
 
-TEST(synchronized_setTest, beginConstLocks) {
+TEST(SynchronizedSetTest, beginConstLocks) {
   synchronized_set<std::unordered_set<std::string>, TestableRecursiveMutex> set;
 
   set.emplace("a");
@@ -88,7 +88,7 @@
   EXPECT_EQ(0, set.mutex().unlock_count_);
 }
 
-TEST(synchronized_setTest, cbeginLocks) {
+TEST(SynchronizedSetTest, cbeginLocks) {
   synchronized_set<std::unordered_set<std::string>, TestableRecursiveMutex> set;
 
   set.emplace("a");
@@ -103,7 +103,7 @@
   EXPECT_EQ(0, set.mutex().unlock_count_);
 }
 
-TEST(synchronized_setTest, endLocks) {
+TEST(SynchronizedSetTest, endLocks) {
   synchronized_set<std::unordered_set<std::string>, TestableRecursiveMutex> set;
 
   set.emplace("a");
@@ -119,7 +119,7 @@
   EXPECT_EQ(0, set.mutex().unlock_count_);
 }
 
-TEST(synchronized_setTest, endConsLocks) {
+TEST(SynchronizedSetTest, endConsLocks) {
   synchronized_set<std::unordered_set<std::string>, TestableRecursiveMutex> set;
 
   set.emplace("a");
@@ -136,7 +136,7 @@
   EXPECT_EQ(0, set.mutex().unlock_count_);
 }
 
-TEST(synchronized_setTest, cendLocks) {
+TEST(SynchronizedSetTest, cendLocks) {
   synchronized_set<std::unordered_set<std::string>, TestableRecursiveMutex> set;
 
   set.emplace("a");
@@ -152,7 +152,7 @@
   EXPECT_EQ(0, set.mutex().unlock_count_);
 }
 
-TEST(synchronized_setTest, emptyLocks) {
+TEST(SynchronizedSetTest, emptyLocks) {
   synchronized_set<std::unordered_set<std::string>, TestableRecursiveMutex> set;
 
   ASSERT_TRUE(set.empty());
@@ -169,7 +169,7 @@
   EXPECT_EQ(1, set.mutex().unlock_count_);
 }
 
-TEST(synchronized_setTest, sizeLocks) {
+TEST(SynchronizedSetTest, sizeLocks) {
   synchronized_set<std::unordered_set<std::string>, TestableRecursiveMutex> set;
 
   ASSERT_EQ(0, set.size());
@@ -186,7 +186,7 @@
   EXPECT_EQ(1, set.mutex().unlock_count_);
 }
 
-TEST(synchronized_setTest, clearLocks) {
+TEST(SynchronizedSetTest, clearLocks) {
   synchronized_set<std::unordered_set<std::string>, TestableRecursiveMutex> set;
 
   set.emplace("a");
@@ -199,7 +199,7 @@
   EXPECT_TRUE(set.empty());
 }
 
-TEST(synchronized_setTest, findNotLocked) {
+TEST(SynchronizedSetTest, findNotLocked) {
   synchronized_set<std::unordered_set<std::string>, TestableRecursiveMutex> set;
 
   set.emplace("a");
@@ -218,7 +218,7 @@
   EXPECT_EQ(1, set.mutex().unlock_count_);
 }
 
-TEST(synchronized_setTest, findConstNotLocked) {
+TEST(SynchronizedSetTest, findConstNotLocked) {
   synchronized_set<std::unordered_set<std::string>, TestableRecursiveMutex> set;
 
   set.emplace("a");
@@ -238,7 +238,7 @@
   EXPECT_EQ(1, set.mutex().unlock_count_);
 }
 
-TEST(synchronized_setTest, iteratorNotLocked) {
+TEST(SynchronizedSetTest, iteratorNotLocked) {
   synchronized_set<std::unordered_set<std::string>, TestableRecursiveMutex> set;
 
   set.emplace("a");
@@ -275,7 +275,7 @@
   EXPECT_EQ(1, set.mutex().unlock_count_);
 }
 
-TEST(synchronized_setTest, make_lockDefault) {
+TEST(SynchronizedSetTest, makeLockDefault) {
   synchronized_set<std::unordered_set<std::string>, TestableRecursiveMutex> set;
 
   {
@@ -289,7 +289,7 @@
   EXPECT_EQ(1, set.mutex().unlock_count_);
 }
 
-TEST(synchronized_setTest, make_lock_WithUniqueLock) {
+TEST(SynchronizedSetTest, makeLockWithUniqueLock) {
   synchronized_set<std::unordered_set<std::string>, TestableRecursiveMutex> set;
 
   {
@@ -303,7 +303,7 @@
   EXPECT_EQ(1, set.mutex().unlock_count_);
 }
 
-TEST(synchronized_setTest, make_lock_WithUniqueLockDefered) {
+TEST(SynchronizedSetTest, makeLockWithUniqueLockDefered) {
   synchronized_set<std::unordered_set<std::string>, TestableRecursiveMutex> set;
 
   {
@@ -321,7 +321,7 @@
   EXPECT_EQ(1, set.mutex().unlock_count_);
 }
 
-TEST(synchronized_setTest, insertIteratorIteratorLocks) {
+TEST(SynchronizedSetTest, insertIteratorIteratorLocks) {
   std::unordered_set<std::string> source = {"a", "b"};
 
   synchronized_set<std::unordered_set<std::string>, TestableRecursiveMutex> set;
@@ -333,7 +333,7 @@
   EXPECT_EQ(2, set.size());
 }
 
-TEST(synchronized_setTest, insertRvalue) {
+TEST(SynchronizedSetTest, insertRvalue) {
   synchronized_set<std::unordered_set<std::string>, TestableRecursiveMutex> set;
 
   set.insert("a");
@@ -343,7 +343,7 @@
   EXPECT_EQ(1, set.size());
 }
 
-TEST(synchronized_setTest, insertLvalue) {
+TEST(SynchronizedSetTest, insertLvalue) {
   synchronized_set<std::unordered_set<std::string>, TestableRecursiveMutex> set;
 
   std::string value = "a";
@@ -354,7 +354,7 @@
   EXPECT_EQ(1, set.size());
 }
 
-TEST(synchronized_setTest, compilesWithStdSet) {
+TEST(SynchronizedSetTest, compilesWithStdSet) {
   synchronized_set<std::set<std::string>, TestableRecursiveMutex> set;
 
   auto result = set.emplace("a");
diff --git a/dependencies/ACE/CMakeLists.txt b/dependencies/ACE/CMakeLists.txt
deleted file mode 100644
index e87dc57..0000000
--- a/dependencies/ACE/CMakeLists.txt
+++ /dev/null
@@ -1,206 +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.
-
-project( ACE VERSION 7.0.3 LANGUAGES NONE )
-
-set( SHA256 96998d1e710b6d88416640caeb76915518c8d85d3f10c02079bf0dd4e57cf60a )
-
-if ("SunOS" STREQUAL ${CMAKE_SYSTEM_NAME})
-  set( ACE_PLATFORM sunos5_sunc++ )
-  set( ACE_CONFIG sunos${CMAKE_SYSTEM_VERSION} )
-elseif ("Linux" STREQUAL ${CMAKE_SYSTEM_NAME} )
-  if ("Clang" STREQUAL ${CMAKE_CXX_COMPILER_ID})
-    set( ACE_PLATFORM linux_clang )
-  else()
-    set( ACE_PLATFORM linux )
-  endif()
-  set( ACE_CONFIG linux )
-  ## TODO fix visibility problem with g++
-  set( _MAKE_ARGS ${_MAKE_ARGS} no_hidden_visibility=1 )
-elseif ("Darwin" STREQUAL ${CMAKE_SYSTEM_NAME} )
-  set( ACE_PLATFORM macosx )
-  set( ACE_CONFIG macosx )
-elseif ("Windows" STREQUAL ${CMAKE_SYSTEM_NAME} )
-  set( ACE_PLATFORM win32-msvc )
-  set( ACE_CONFIG win32 )
-endif()
-
-if (NOT DEFINED ACE_PLATFORM)
-  message( FATAL_ERROR "ACE_PLATFORM unset for ${CMAKE_SYSTEM_NAME}" )
-endif()
-
-find_package(OpenSSL REQUIRED)
-set( OPENSSL_ROOT ${OPENSSL_INCLUDE_DIR}/.. )
-
-if (${WIN32})
-  if (64 EQUAL ${BUILD_BITS})
-    set( _PLATFORM x64 )
-  else()
-    set( _PLATFORM win32 )
-  endif()
-  if (MSVC_VERSION EQUAL 1900)
-    set(_TYPE "vc14")
-  elseif((MSVC_VERSION GREATER_EQUAL 1910) AND (MSVC_VERSION LESS_EQUAL 1919))
-    set(_TYPE "vs2017")
-  else()
-    set(_TYPE "vs2019")
-  endif()
-
-  set ( _COMMAND_PREFIX ${CMAKE_COMMAND} -E chdir ace )
-
-  set ( _MSBUILD_FLAGS /m /p:Platform=${_PLATFORM} /p:Configuration=$<$<CONFIG:Debug>:Debug>$<$<NOT:$<CONFIG:Debug>>:Release>)
-  set ( _MSBUILD_FLAGS_STATIC ${_MSBUILD_FLAGS} /t:ace_${_TYPE}_static /t:SSL_${_TYPE}_static )
-
-  include(ProcessorCount)
-  ProcessorCount(_NPROCS)
-
-  find_package(Perl REQUIRED)
-
-  set ( MPC ${PERL_EXECUTABLE} ..\\bin\\mwc.pl )
-  set ( MPC_FLAGS -type ${_TYPE} -expand_vars -features ssl=1 -recurse -hierarchy -workers ${_NPROCS} -value_template MultiProcessorCompilation=true -apply_project )
-
-  #TODO add custom targets to build in parallel?
-  #TODO MPC has flag to replace variables with absolute paths, think we need that for devstudio builds
-  set ( _CONFIGURE_COMMAND ${_COMMAND_PREFIX}
-                             ${CMAKE_COMMAND} -E env ACE_ROOT=<SOURCE_DIR> SSL_ROOT=${OPENSSL_ROOT}
-							 ${MPC} ${MPC_FLAGS} -name_modifier "*_${_TYPE}_static" -static
-							 -value_template staticflags+=__ACE_INLINE__ 
-							 -value_template staticflags+=ACE_BUILD_DLL 
-							 -value_template staticflags+=ACE_AS_STATIC_LIBS 
-							 -value_template runtime_library=Multithreaded$<$<CONFIG:Debug>:Debug>Dll 
-  )
-  set ( _BUILD_COMMAND ${_COMMAND_PREFIX} ${CMAKE_VS_MSBUILD_COMMAND} ACE_${_TYPE}_static.sln ${_MSBUILD_FLAGS} ${_MSBUILD_FLAGS_STATIC}
-  )
-  set ( _INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory lib <INSTALL_DIR>/lib 
-                 COMMAND ${CMAKE_COMMAND} -E copy_directory ace <INSTALL_DIR>/include/ace
-  )
-
-  set(CMAKE_STATIC_LIBRARY_SUFFIX s$<${MSVC}:$<$<CONFIG:Debug>:d>>.lib)
-
-else()
-  # TODO Configure trips up without MAKE
-  # TODO look into using cmake -E chdir
-  # TODO use cmake -E env
-
-  set( _MAKE cd ace && ACE_ROOT=<SOURCE_DIR> SSL_ROOT=${OPENSSL_ROOT} $(MAKE) SHELL=/bin/bash debug=$<CONFIG:Debug> optimize=$<NOT:$<CONFIG:Debug>> buildbits=${BUILD_BITS} c++11=1 static_libs_only=1 ssl=1 ${_MAKE_ARGS})
-  set ( _CONFIGURE_COMMAND "" )
-  set ( _BUILD_COMMAND ${_MAKE} all )
-  set ( _INSTALL_COMMAND ${_MAKE} install )
-endif()
-
-string(REPLACE "." "_" _VERSION_UNDERSCORE ${PROJECT_VERSION})
-
-set( EXTERN ${PROJECT_NAME}-extern )
-include(ExternalProject)
-ExternalProject_Add( ${EXTERN}
-   URL "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-${_VERSION_UNDERSCORE}/ACE-${PROJECT_VERSION}.tar.gz"
-   URL_HASH SHA256=${SHA256}
-   UPDATE_COMMAND ""
-   BUILD_IN_SOURCE 1
-   CONFIGURE_COMMAND "${_CONFIGURE_COMMAND}"
-   BUILD_COMMAND "${_BUILD_COMMAND}"
-   INSTALL_COMMAND "${_INSTALL_COMMAND}"
-   DEPENDS ${DEPENDS}
-)
-
-ExternalProject_Get_Property( ${EXTERN} SOURCE_DIR )
-set( SOURCE_DIR ${SOURCE_DIR} )
-ExternalProject_Get_Property( ${EXTERN} INSTALL_DIR )
-set( INSTALL_DIR ${INSTALL_DIR} )
-set( DEPENDENCIES_DIR ${INSTALL_DIR} PARENT_SCOPE)
-
-if ("SunOS" STREQUAL ${CMAKE_SYSTEM_NAME})
-set( PATCH_FILE ${CMAKE_CURRENT_SOURCE_DIR}/patches )
-ExternalProject_Add_Step( ${EXTERN} patches
-  ALWAYS 0
-  DEPENDEES download
-  DEPENDERS patch
-  DEPENDS ${PATCH_FILE}
-  BYPRODUCTS ${SOURCE_DIR}/include/makeinclude/platform_sunos5_sunc++.GNU ${SOURCE_DIR}/ace/config-lite.h ${SOURCE_DIR}/ace/Stats.cpp
-  WORKING_DIRECTORY ${SOURCE_DIR}
-  COMMAND ${Patch_EXECUTABLE} -u -N -p1 < ${PATCH_FILE}
-)
-endif()
-
-configure_file(config.h.in config.h)
-ExternalProject_Add_Step( ${EXTERN} config.h
-  DEPENDEES patch
-  DEPENDERS configure
-  DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/config.h
-  BYPRODUCTS ${SOURCE_DIR}/ace/config.h
-  COMMAND ${CMAKE_COMMAND} -E copy config.h ${SOURCE_DIR}/ace/config.h
-)
-
-if (UNIX)
-ExternalProject_Add_Step( ${EXTERN} platform
-  DEPENDEES patch
-  DEPENDERS configure
-  BYPRODUCTS ${SOURCE_DIR}/include/makeinclude/platform_macros.GNU
-  COMMAND echo "INSTALL_PREFIX = ${INSTALL_DIR}" > ${SOURCE_DIR}/include/makeinclude/platform_macros.GNU
-  COMMAND echo "CC = ${CMAKE_C_COMPILER}" >> ${SOURCE_DIR}/include/makeinclude/platform_macros.GNU
-  COMMAND echo "CXX = ${CMAKE_CXX_COMPILER}" >> ${SOURCE_DIR}/include/makeinclude/platform_macros.GNU
-  COMMAND echo "CCFLAGS += ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_PIC}" >> ${SOURCE_DIR}/include/makeinclude/platform_macros.GNU
-  COMMAND echo "include ${SOURCE_DIR}/include/makeinclude/platform_${ACE_PLATFORM}.GNU" >> ${SOURCE_DIR}/include/makeinclude/platform_macros.GNU
-)
-endif()
-
-find_package(Threads)
-
-add_library(ACE_ACE INTERFACE)
-target_include_directories(ACE_ACE SYSTEM INTERFACE
-  $<BUILD_INTERFACE:${INSTALL_DIR}/include>
-)
-target_compile_definitions(ACE_ACE INTERFACE
-  __ACE_INLINE__
-  ACE_AS_STATIC_LIBS
-  __STDC_FORMAT_MACROS # ACE slurps in inttypes.h before cinttypes and clobbers these macros
-)
-target_link_libraries(ACE_ACE INTERFACE
-  ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}ACE${CMAKE_STATIC_LIBRARY_SUFFIX}
-  Threads::Threads
-)
-
-if ("SunOS" STREQUAL ${CMAKE_SYSTEM_NAME})
-  target_link_libraries(ACE_ACE INTERFACE
-    rt
-    m
-    socket
-    nsl
-  )
-  target_compile_definitions(ACE_ACE INTERFACE
-    _POSIX_PTHREAD_SEMANTICS
-  )
-
-elseif ("Linux" STREQUAL ${CMAKE_SYSTEM_NAME} )
-  target_link_libraries(ACE_ACE INTERFACE
-    dl
-    rt
-  )
-elseif ("Darwin" STREQUAL ${CMAKE_SYSTEM_NAME} )
-elseif ("Windows" STREQUAL ${CMAKE_SYSTEM_NAME} )
-endif()
-
-add_dependencies(ACE_ACE ${EXTERN})
-
-add_library(ACE_ACE_SSL INTERFACE)
-target_link_libraries(ACE_ACE_SSL INTERFACE
-  ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}ACE_SSL${CMAKE_STATIC_LIBRARY_SUFFIX}
-  ACE_ACE
-  OpenSSL::SSL
-  OpenSSL::Crypto
-)
-
-add_library(ACE::ACE ALIAS ACE_ACE)
-add_library(ACE::ACE_SSL ALIAS ACE_ACE_SSL)
diff --git a/dependencies/ACE/patches b/dependencies/ACE/patches
deleted file mode 100644
index d755bcd..0000000
--- a/dependencies/ACE/patches
+++ /dev/null
@@ -1,72 +0,0 @@
-diff -ru a/ace/config-lite.h b/ace/config-lite.h
---- a/ace/config-lite.h	2015-09-16 23:55:18.290052190 -0700
-+++ b/ace/config-lite.h	2015-12-16 13:05:16.451203813 -0800
-@@ -115,7 +115,8 @@
- // adapters, we can drop this generator macro or at least drop the
- // MSVC++ or Sun Studio preprocessor conditional blocks.
- #if defined (__SUNPRO_CC) && __SUNPRO_CC <= 0x5140 \
--      && !defined (_STLPORT_VERSION)
-+      && !defined (_STLPORT_VERSION) \
-+      && __cplusplus < 201103L
-   // If we're not using the stlport4 C++ library (which has standard
-   // iterators), we need to ensure this is included in order to test
-   // the _RWSTD_NO_CLASS_PARTIAL_SPEC feature test macro below.
-diff -ru a/include/makeinclude/platform_sunos5_sunc++.GNU b/include/makeinclude/platform_sunos5_sunc++.GNU
---- a/include/makeinclude/platform_sunos5_sunc++.GNU	2015-09-16 23:55:18.443053145 -0700
-+++ b/include/makeinclude/platform_sunos5_sunc++.GNU	2015-12-16 13:12:05.914217145 -0800
-@@ -45,6 +45,7 @@
- rwtools ?= 0
- stdcpplib ?= 1
- stlport ?= 0
-+c++11 ?= 0
- threads ?= 1
- pthreads ?= 1
- versioned_so ?= 1
-@@ -121,6 +122,10 @@
- 
-   CCFLAGS += $(CFLAGS)
- 
-+  ifeq (C++ 5.13,$(findstring C++ 5.13,$(CC_VERSION)))
-+    CCFLAGS += -features=zla
-+  endif # 5.13
-+
-   #### If compat=4 is desired, set up for that. There are syntactic diffs
-   #### in the compatibility modes, but here all we need to be concerned with
-   #### is turning on -compat=4, and not trying to enable the new libraries.
-@@ -187,6 +192,9 @@
- 
- # Support alternate CC libraries (i.e. STLport, Tools.h++, Cstd)
- # See: http://docs.sun.com/app/docs/doc/820-7599/bkaty?a=view
-+ifeq ($(c++11),1)
-+  CCFLAGS += -std=c++11
-+else
- ifeq ($(stlport),1)
-   CC_LIBRARY = stlport4
-   PLATFORM_STLPORT_CCFLAGS += -library=$(CC_LIBRARY)
-@@ -210,6 +218,7 @@
-   CCFLAGS += -library=$(CC_LIBRARY)
-   LDFLAGS += -library=$(CC_LIBRARY)
- endif
-+endif
- 
- ### CC 5.10 enables annotation support by default; allow user to override
- ### new behavior. This also provides a work around for 64-bit linker crashes,
-diff -ru a/ace/Stats.cpp b/ace/Stats.cpp
---- a/ace/Stats.cpp        2015-09-16 23:55:18.268052000 -0700
-+++ b/ace/Stats.cpp  2015-11-23 17:21:03.000000000 -0800
-@@ -240,12 +240,12 @@
-       ACE_Stats_Value minimum (tmp_precision), maximum (tmp_precision);
-       if (min_ != 0)
-         {
--          const ACE_UINT64 m (min_);
-+          const ACE_UINT64 m = min_;
-           quotient (m, scale_factor, minimum);
-         }
-       if (max_ != 0)
-         {
--          const ACE_UINT64 m (max_);
-+          const ACE_UINT64 m = max_;
-           quotient (m, scale_factor, maximum);
-         }
-       ACE_OS::sprintf (min_string, format,
-
diff --git a/dependencies/CMakeLists.txt b/dependencies/CMakeLists.txt
index e3aacaa..e4e30df 100644
--- a/dependencies/CMakeLists.txt
+++ b/dependencies/CMakeLists.txt
@@ -18,7 +18,6 @@
 
 find_package(Patch REQUIRED)
 
-add_subdirectory(ACE)
 add_subdirectory(boost)
 add_subdirectory(sqlite)
 add_subdirectory(doxygen)
diff --git a/dependencies/benchmark/CMakeLists.txt b/dependencies/benchmark/CMakeLists.txt
index 63ec1d7..abf4df2 100644
--- a/dependencies/benchmark/CMakeLists.txt
+++ b/dependencies/benchmark/CMakeLists.txt
@@ -13,9 +13,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-project( benchmark VERSION 1.5.0 LANGUAGES NONE )
+project( benchmark VERSION 1.6.0 LANGUAGES NONE )
 
-set( SHA256 2d22dd3758afee43842bb504af1a8385cccb3ee1f164824e4837c1c1b04d92a0 )
+set( SHA256 3da225763533aa179af8438e994842be5ca72e4a7fed4d7976dc66c8c4502f58 )
 set( DEPENDS GTest::gtest )
 
 
@@ -26,17 +26,21 @@
 set( EXTERN ${PROJECT_NAME}-extern )
 include(ExternalProject)
 ExternalProject_Add( ${EXTERN}
-   URL "https://github.com/google/benchmark/archive/v${PROJECT_VERSION}.zip"
-   URL_HASH SHA256=${SHA256}
-   UPDATE_COMMAND ""
-   CMAKE_ARGS
+  URL "https://github.com/google/benchmark/archive/v${PROJECT_VERSION}.zip"
+  URL_HASH SHA256=${SHA256}
+  UPDATE_COMMAND ""
+  CMAKE_ARGS
     -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
     -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
     -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>/$<CONFIG>
     -DCMAKE_BUILD_TYPE=$<CONFIG>
     -DGTEST_ROOT=$<TARGET_PROPERTY:GTest::gtest,INTERFACE_INCLUDE_DIRECTORIES>/..
     -DBENCHMARK_ENABLE_TESTING=OFF
-   DEPENDS ${DEPENDS}
+  CMAKE_CACHE_ARGS
+    -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
+    -DCMAKE_OSX_SYSROOT:STRING=${CMAKE_OSX_SYSROOT}
+    -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${CMAKE_OSX_DEPLOYMENT_TARGET}
+  DEPENDS ${DEPENDS}
 )
 
 ExternalProject_Get_Property( ${EXTERN} SOURCE_DIR )
diff --git a/dependencies/boost/CMakeLists.txt b/dependencies/boost/CMakeLists.txt
index 9d3db68..000770c 100644
--- a/dependencies/boost/CMakeLists.txt
+++ b/dependencies/boost/CMakeLists.txt
@@ -13,15 +13,23 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-project( boost VERSION 1.73.0 LANGUAGES NONE )
+project(boost VERSION 1.76.0 LANGUAGES NONE)
 
-set( SHA256 9995e192e68528793755692917f9eb6422f3052a53c5e13ba278a228af6c7acf )
+set(SHA256 7bd7ddceec1a1dfdcbdb3e609b60d01739c38390a5f956385a12f3122049f0ca)
 
-set(_B2_FLAGS
+if (WIN32)
+  set(BOOTSTRAP_COMMAND bootstrap.bat)
+else()
+  set(BOOTSTRAP_COMMAND ./bootstrap.sh)
+endif()
+set(B2_COMMAND ./b2)
+set(B2_FLAGS
   -d0
   --prefix=<INSTALL_DIR>/$<CONFIG>
   --with-system
   --with-log
+  --with-iostreams
+  --with-program_options
   --layout=system
   address-model=${BUILD_BITS}
   link=static
@@ -31,33 +39,46 @@
 )
 
 include(ProcessorCount)
-ProcessorCount(_NPROCS)
-if (${_NPROCS})
-  set ( _B2_FLAGS ${_B2_FLAGS} -j${_NPROCS} )
+ProcessorCount(NPROCS)
+if (${NPROCS})
+  list(APPEND B2_FLAGS -j${NPROCS})
 endif()
 
-if (${WIN32})
-  set ( _BOOTSTRAP_COMMAND .\\bootstrap.bat )
-  set ( _B2_COMMAND .\\b2 )
-  set ( _B2_FLAGS ${_B2_FLAGS} toolset=msvc-14.1 )
-else()
-  set ( _BOOTSTRAP_COMMAND ./bootstrap.sh )
-  set ( _B2_COMMAND ./b2 )
-  set ( _B2_FLAGS ${_B2_FLAGS} "cxxflags=${CMAKE_CXX_FLAGS} ${CMAKE_CXX11_STANDARD_COMPILE_OPTION} ${CMAKE_CXX_COMPILE_OPTIONS_PIC}" )
+if ("Darwin" STREQUAL ${CMAKE_SYSTEM_NAME})
+  # disabled until combined supports arm list(APPEND B2_FLAGS architecture=combined)
+  # manually set arch until combine supports arm
+  foreach(arch ${CMAKE_OSX_ARCHITECTURES})
+    string(APPEND CMAKE_CXX_FLAGS " -arch ${arch}")
+    string(APPEND CMAKE_STATIC_LINKER_FLAGS " -arch ${arch}")
+  endforeach()
+  string(APPEND CMAKE_CXX_FLAGS " ${CMAKE_CXX_SYSROOT_FLAG} ${CMAKE_OSX_SYSROOT}")
+  string(APPEND CMAKE_CXX_FLAGS " ${CMAKE_CXX_OSX_DEPLOYMENT_TARGET_FLAG}${CMAKE_OSX_DEPLOYMENT_TARGET}")
 endif()
 
 if ("SunOS" STREQUAL ${CMAKE_SYSTEM_NAME})
-  set ( _BOOTSTRAP_COMMAND ${_BOOTSTRAP_COMMAND} --with-toolset=sun )
-  set ( _B2_FLAGS ${_B2_FLAGS} define=BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
-elseif ("Windows" STREQUAL ${CMAKE_SYSTEM_NAME})
-  set ( CMAKE_STATIC_LIBRARY_PREFIX lib )
+  list(APPEND BOOTSTRAP_FLAGS --with-toolset=sun)
+  list(APPEND B2_FLAGS define=BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
+elseif(MSVC)
+  if(CMAKE_GENERATOR_TOOLSET MATCHES "version=([0-9]+\.[0-9]+\.[0-9]+)")
+    set(BOOTSTRAP_COMMAND ${CMAKE_COMMAND} -E env VCToolsVersion=${CMAKE_MATCH_1} ${BOOTSTRAP_COMMAND})
+    set(B2_COMMAND ${CMAKE_COMMAND} -E env VCToolsVersion=${CMAKE_MATCH_1} ${B2_COMMAND})
+  endif()
+  list(APPEND BOOTSTRAP_FLAGS vc${MSVC_TOOLSET_VERSION})
+  if (CMAKE_VS_PLATFORM_TOOLSET_VERSION)
+	list(APPEND B2_FLAGS toolset=msvc-${CMAKE_VS_PLATFORM_TOOLSET_VERSION})
+  else()
+    list(APPEND B2_FLAGS toolset=msvc-${MSVC_TOOLSET_VERSION})
+  endif()
+  set(CMAKE_STATIC_LIBRARY_PREFIX lib)
 elseif ("Clang" STREQUAL ${CMAKE_CXX_COMPILER_ID})
-  set ( _BOOTSTRAP_COMMAND ${_BOOTSTRAP_COMMAND} --with-toolset=clang )
+  list(APPEND BOOTSTRAP_FLAGS --with-toolset=clang)
 endif()
 
-string(REPLACE "." "_" _VERSION_UNDERSCORE ${PROJECT_VERSION})
-set( EXTERN ${PROJECT_NAME}-extern )
+list(APPEND B2_FLAGS "cxxflags=${CMAKE_CXX_FLAGS} ${CMAKE_CXX11_STANDARD_COMPILE_OPTION} ${CMAKE_CXX_COMPILE_OPTIONS_PIC}")
 
+string(REPLACE "." "_" _VERSION_UNDERSCORE ${PROJECT_VERSION})
+
+set(EXTERN ${PROJECT_NAME}-extern)
 include(ExternalProject)
 ExternalProject_Add(${EXTERN}
    URL "https://boostorg.jfrog.io/artifactory/main/release/${PROJECT_VERSION}/source/boost_${_VERSION_UNDERSCORE}.tar.gz"
@@ -65,17 +86,17 @@
    URL_HASH SHA256=${SHA256}
    UPDATE_COMMAND ""
    BUILD_IN_SOURCE 1
-   CONFIGURE_COMMAND ${_BOOTSTRAP_COMMAND}
-   BUILD_COMMAND ${_B2_COMMAND} ${_B2_FLAGS}
-   INSTALL_COMMAND ${_B2_COMMAND} ${_B2_FLAGS} install
+   CONFIGURE_COMMAND ${BOOTSTRAP_COMMAND} ${BOOTSTRAP_FLAGS}
+   BUILD_COMMAND ${B2_COMMAND} ${B2_FLAGS}
+   INSTALL_COMMAND ${B2_COMMAND} ${B2_FLAGS} install
    PREFIX .
    DOWNLOAD_DIR .
    SOURCE_DIR ./src
    STAMP_DIR ./stamp
 )
 
-ExternalProject_Get_Property( ${EXTERN} SOURCE_DIR )
-ExternalProject_Get_Property( ${EXTERN} INSTALL_DIR )
+ExternalProject_Get_Property(${EXTERN} SOURCE_DIR)
+ExternalProject_Get_Property(${EXTERN} INSTALL_DIR)
 set(INSTALL_DIR "${INSTALL_DIR}/$<CONFIG>")
 
 function(ADD_BOOST_LIBRARY)
@@ -120,6 +141,7 @@
 
 add_boost_library(system DEPENDENCIES Boost::boost)
 add_boost_library(atomic DEPENDENCIES Boost::boost)
+add_boost_library(iostreams DEPENDENCIES Boost::boost)
 add_boost_library(thread DEPENDENCIES Threads::Threads Boost::atomic Boost::boost)
 add_boost_library(filesystem DEPENDENCIES Boost::system Boost::boost)
 add_boost_library(log DEPENDENCIES Boost::thread Boost::filesystem Boost::boost)
@@ -128,6 +150,8 @@
 add_boost_library(stacktrace LIBRARIES "" DEPENDENCIES Boost::boost)
 add_boost_library(asio LIBRARIES "" DEPENDENCIES Boost::boost)
 add_boost_library(process LIBRARIES "" DEPENDENCIES Boost::system)
+add_boost_library(program_options DEPENDENCIES Boost::system)
+add_boost_library(regex DEPENDENCIES Boost::boost)
 
 target_compile_definitions(boost_stacktrace INTERFACE
   BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED
diff --git a/dependencies/gtest/CMakeLists.txt b/dependencies/gtest/CMakeLists.txt
index 4cca1e7..3d5c14f 100644
--- a/dependencies/gtest/CMakeLists.txt
+++ b/dependencies/gtest/CMakeLists.txt
@@ -13,9 +13,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-project( gtest VERSION 1.10.0 LANGUAGES NONE )
+project( gtest VERSION 1.11.0 LANGUAGES NONE )
 
-set( SHA256 94c634d499558a76fa649edb13721dce6e98fb1e7018dfaeba3cd7a083945e91 )
+set( SHA256 353571c2440176ded91c2de6d6cd88ddd41401d14692ec1f99e35d013feda55a )
 
 include(ExternalProject)
 ExternalProject_Add( ${PROJECT_NAME}-extern
@@ -27,6 +27,10 @@
     -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
     -DCMAKE_BUILD_TYPE=$<CONFIG>
     -Dgtest_force_shared_crt:BOOL=ON
+  CMAKE_CACHE_ARGS
+    -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
+    -DCMAKE_OSX_SYSROOT:STRING=${CMAKE_OSX_SYSROOT}
+    -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${CMAKE_OSX_DEPLOYMENT_TARGET}
 )
 
 ExternalProject_Get_Property( ${PROJECT_NAME}-extern INSTALL_DIR )
@@ -58,6 +62,12 @@
     ${args_DEPENDENCIES}
   )
 
+  if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+    target_compile_options(${target} INTERFACE
+      -Wno-used-but-marked-unused # GTest uses unused attribute incorrectly
+    )
+  endif()
+
   add_library(GTest::${args_NAME} ALIAS ${target})
 
   add_dependencies(${target} ${PROJECT_NAME}-extern)
diff --git a/dependencies/rat/CMakeLists.txt b/dependencies/rat/CMakeLists.txt
index f3af689..4e1494c 100644
--- a/dependencies/rat/CMakeLists.txt
+++ b/dependencies/rat/CMakeLists.txt
@@ -18,7 +18,7 @@
 
 set( ARTIFACT_NAME apache-rat-${PROJECT_VERSION} )
 set( ARTIFACT_FILE apache-rat-${PROJECT_VERSION}-bin.tar.gz )
-set( ARTIFACT_URL "https://www.apache.org/dyn/closer.cgi?action=download&filename=creadur/${ARTIFACT_NAME}/${ARTIFACT_FILE}" )
+set( ARTIFACT_URL "https://www.apache.org/dyn/closer.lua/creadur/${ARTIFACT_NAME}/${ARTIFACT_FILE}?action=download" )
 
 file( DOWNLOAD ${ARTIFACT_URL} ${CMAKE_CURRENT_BINARY_DIR}/${ARTIFACT_FILE} )
 execute_process(
diff --git a/dependencies/sqlite-netFx/CMakeLists.txt b/dependencies/sqlite-netFx/CMakeLists.txt
index 4be8359..522b205 100644
--- a/dependencies/sqlite-netFx/CMakeLists.txt
+++ b/dependencies/sqlite-netFx/CMakeLists.txt
@@ -13,9 +13,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-project( sqlite-netFx VERSION 1.0.102.0 LANGUAGES NONE )
+project( sqlite-netFx VERSION 1.0.115.5 LANGUAGES NONE )
 
-set( SHA256 b980e8a151ddc685ed30652d39573381aef7b623478cba80b02d0795607638e1 )
+set( SHA256 2ca18143c470a50305fdca6cf9062aa0713afce6ccdc2d5ea23bb031cdb842fc )
 
 include(ExternalProject)
 ExternalProject_Add( ${PROJECT_NAME}
diff --git a/dependencies/sqlite/CMakeLists.txt b/dependencies/sqlite/CMakeLists.txt
index add55e8..b3a084d 100644
--- a/dependencies/sqlite/CMakeLists.txt
+++ b/dependencies/sqlite/CMakeLists.txt
@@ -13,20 +13,24 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-project( sqlite VERSION 3310100 LANGUAGES NONE )
+project( sqlite VERSION 3370200 LANGUAGES NONE )
 
-set( SHA256 f3c79bc9f4162d0b06fa9fe09ee6ccd23bb99ce310b792c5145f87fbcc30efca )
+set( SHA256 cb25df0fb90b77be6660f6ace641bbea88f3d0441110d394ce418f35f7561bb0 )
 
 
 set( EXTERN ${PROJECT_NAME}-extern )
 include(ExternalProject)
 ExternalProject_Add( ${EXTERN}
-  URL "https://www.sqlite.org/2020/sqlite-amalgamation-${PROJECT_VERSION}.zip"
+  URL "https://www.sqlite.org/2022/sqlite-amalgamation-${PROJECT_VERSION}.zip"
   URL_HASH SHA256=${SHA256}
   UPDATE_COMMAND ""
   CMAKE_ARGS
     -DCMAKE_BUILD_TYPE=$<CONFIG>
     -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
+  CMAKE_CACHE_ARGS
+    -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
+    -DCMAKE_OSX_SYSROOT:STRING=${CMAKE_OSX_SYSROOT}
+    -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${CMAKE_OSX_DEPLOYMENT_TARGET}
 )
 
 ExternalProject_Get_Property( ${EXTERN} SOURCE_DIR )
diff --git a/dependencies/xerces-c/CMakeLists.txt b/dependencies/xerces-c/CMakeLists.txt
index 68eebfa..449bf5b 100644
--- a/dependencies/xerces-c/CMakeLists.txt
+++ b/dependencies/xerces-c/CMakeLists.txt
@@ -25,6 +25,10 @@
   set(Xerces_TRANSCODER "-Dtranscoder=iconv")
 endif()
 
+# Xerces-C++ is very warningful
+string(APPEND CMAKE_C_FLAGS " -w")
+string(APPEND CMAKE_CXX_FLAGS " -w")
+
 ExternalProject_Add( ${PROJECT_NAME}-extern
   URL "http://archive.apache.org/dist/xerces/c/3/sources/xerces-c-${PROJECT_VERSION}.tar.gz"
   URL_HASH SHA256=${SHA256}
@@ -33,12 +37,16 @@
     -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
     -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
     -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
-    -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+    -DCMAKE_BUILD_TYPE=$<CONFIG>
     -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
     -DBUILD_SHARED_LIBS=OFF
     -DCMAKE_POSITION_INDEPENDENT_CODE=ON
     -Dnetwork:BOOL=OFF
     ${Xerces_TRANSCODER}
+  CMAKE_CACHE_ARGS
+    -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
+    -DCMAKE_OSX_SYSROOT:STRING=${CMAKE_OSX_SYSROOT}
+    -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${CMAKE_OSX_DEPLOYMENT_TARGET}
 )
 
 ExternalProject_Get_Property( ${PROJECT_NAME}-extern INSTALL_DIR )
diff --git a/docker/Dockerfile b/docker/Dockerfile
deleted file mode 100644
index b5428f7..0000000
--- a/docker/Dockerfile
+++ /dev/null
@@ -1,67 +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.
-
-FROM ubuntu
-LABEL maintainer="Apache Geode <dev@geode.apache.org>"
-
-ENV TZ=US/Pacific
-RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
-
-ENV CLANG_VERSION 6.0
-ENV DEBIAN_FRONTEND=noninteractive
-RUN apt-get update && \
-        apt-get install -y \
-            libc++-dev \
-            libc++abi-dev \
-            libssl-dev \
-            zlib1g-dev \
-            clang-${CLANG_VERSION} \
-            clang-tidy-${CLANG_VERSION} \
-            clang-format-${CLANG_VERSION} \
-            make \
-            doxygen \
-            git \
-            graphviz \
-            openjdk-8-jdk \
-            wget && \
-        rm -rf /var/lib/apt/lists/* && \
-        ln -s /usr/lib/llvm-*/include/c++/v1/ /usr/include/c++/v1 && \
-        update-alternatives --install /usr/bin/clang         clang         /usr/bin/clang-${CLANG_VERSION} 999 && \
-        update-alternatives --install /usr/bin/clang++       clang++       /usr/bin/clang++-${CLANG_VERSION} 999 && \
-        update-alternatives --install /usr/bin/cc            cc            /usr/bin/clang-${CLANG_VERSION} 999 && \
-        update-alternatives --install /usr/bin/c++           c++           /usr/bin/clang++-${CLANG_VERSION} 999 && \
-        update-alternatives --install /usr/bin/clang-tidy    clang-tidy    /usr/bin/clang-tidy-${CLANG_VERSION} 999 && \
-        update-alternatives --install /usr/bin/clang-format  clang-format  /usr/bin/clang-format-${CLANG_VERSION} 999
-
-ENV GEODE_VERSION 1.14.3
-RUN wget "https://downloads.apache.org/geode/${GEODE_VERSION}/apache-geode-${GEODE_VERSION}.tgz" --quiet -O - | \
-        tar xzf -
-
-ENV RAT_VERSION 0.13
-RUN wget "https://archive.apache.org/dist/creadur/apache-rat-${RAT_VERSION}/apache-rat-${RAT_VERSION}-bin.tar.gz" --quiet -O - | \
-        tar xzf -
-
-ENV CMAKE_VERSION 3.16.8
-RUN wget "https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}-Linux-x86_64.sh" --quiet -O /tmp/cmake && \
-        bash /tmp/cmake --skip-license --prefix=/usr/local && \
-        rm -rf /tmp/cmake
-
-ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
-ENV GEODE_HOME /apache-geode-${GEODE_VERSION}
-ENV RAT_HOME /apache-rat-${RAT_VERSION}
-ENV PATH $PATH:$GEODE_HOME/bin
-
-CMD ["bash"]
diff --git a/docker/centos-7/Dockerfile b/docker/centos-7/Dockerfile
new file mode 100644
index 0000000..6fb0ca1
--- /dev/null
+++ b/docker/centos-7/Dockerfile
@@ -0,0 +1,58 @@
+# 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.
+
+FROM centos/devtoolset-4-toolchain-centos7:latest
+LABEL maintainer Apache Geode <dev@geode.apache.org>
+
+USER root
+WORKDIR /
+
+RUN yum update -y && \
+    yum -y clean all
+
+COPY bellsoft.repo /etc/yum.repos.d/
+
+RUN yum update -y && \
+    yum install -y \
+        git \
+        make \
+        zlib-devel \
+        patch \
+        openssl-devel \
+        bellsoft-java11 \
+        doxygen \
+        python3-pip \
+        which && \
+    yum -y clean all
+
+RUN pip3 install --upgrade pip && \
+    pip3 install cpp-coveralls
+
+# Get latest release of CMake ignoring pre-releases
+RUN installer=$(mktemp) \
+    && curl -o ${installer} -L $(curl -s https://api.github.com/repos/Kitware/CMake/releases \
+        | grep -P -i 'browser_download_url.*cmake-\d+\.\d+\.\d+-linux-x86_64\.sh' \
+        | head -n 1 \
+        | cut -d : -f 2,3 \
+        | tr -d '"') \
+    && bash ${installer} --skip-license --prefix=/usr/local \
+    && rm ${installer}
+
+ARG GEODE_VERSION=1.14.4
+ENV GEODE_HOME /apache-geode-${GEODE_VERSION}
+RUN curl -L -s "https://www.apache.org/dyn/closer.lua/geode/${GEODE_VERSION}/apache-geode-${GEODE_VERSION}.tgz?action=download" | tar -zxvf - --exclude javadoc
+
+CMD ["bash"]
diff --git a/docker/centos-7/bellsoft.repo b/docker/centos-7/bellsoft.repo
new file mode 100644
index 0000000..bd08107
--- /dev/null
+++ b/docker/centos-7/bellsoft.repo
@@ -0,0 +1,7 @@
+[BellSoft]
+name=BellSoft Repository
+baseurl=https://yum.bell-sw.com
+enabled=1
+gpgcheck=1
+gpgkey=https://download.bell-sw.com/pki/GPG-KEY-bellsoft
+priority=1
diff --git a/docker/centos-8/Dockerfile b/docker/centos-8/Dockerfile
new file mode 100644
index 0000000..7bd2cfb
--- /dev/null
+++ b/docker/centos-8/Dockerfile
@@ -0,0 +1,60 @@
+# 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.
+
+FROM centos:8
+LABEL maintainer Apache Geode <dev@geode.apache.org>
+
+USER root
+WORKDIR /
+
+RUN yum update -y && \
+    yum -y clean all
+
+COPY bellsoft.repo /etc/yum.repos.d/
+
+RUN yum install -y 'dnf-command(config-manager)' && \
+    yum config-manager --set-enabled powertools && \
+    yum update -y && \
+    yum install -y --setopt=tsflags=nodocs \
+        git \
+        make \
+        zlib-devel \
+        patch \
+        openssl-devel \
+        bellsoft-java11 \
+        doxygen \
+        python3-pip \
+        gcc-c++ && \
+    yum -y clean all
+
+RUN pip3 install --upgrade pip && \
+    pip3 install cpp-coveralls
+
+# Get latest release of CMake ignoring pre-releases
+RUN installer=$(mktemp) \
+    && curl -o ${installer} -L $(curl -s https://api.github.com/repos/Kitware/CMake/releases \
+        | grep -P -i 'browser_download_url.*cmake-\d+\.\d+\.\d+-linux-x86_64\.sh' \
+        | head -n 1 \
+        | cut -d : -f 2,3 \
+        | tr -d '"') \
+    && bash ${installer} --skip-license --prefix=/usr/local \
+    && rm ${installer}
+
+ARG GEODE_VERSION=1.14.4
+ENV GEODE_HOME /apache-geode-${GEODE_VERSION}
+RUN curl -L -s "https://www.apache.org/dyn/closer.lua/geode/${GEODE_VERSION}/apache-geode-${GEODE_VERSION}.tgz?action=download" | tar -zxvf - --exclude javadoc
+
+CMD ["bash"]
diff --git a/docker/centos-8/bellsoft.repo b/docker/centos-8/bellsoft.repo
new file mode 100644
index 0000000..bd08107
--- /dev/null
+++ b/docker/centos-8/bellsoft.repo
@@ -0,0 +1,7 @@
+[BellSoft]
+name=BellSoft Repository
+baseurl=https://yum.bell-sw.com
+enabled=1
+gpgcheck=1
+gpgkey=https://download.bell-sw.com/pki/GPG-KEY-bellsoft
+priority=1
diff --git a/docker/rhel-7/Dockerfile b/docker/rhel-7/Dockerfile
new file mode 100644
index 0000000..45b164a
--- /dev/null
+++ b/docker/rhel-7/Dockerfile
@@ -0,0 +1,61 @@
+# 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.
+
+FROM registry.access.redhat.com/rhscl/devtoolset-4-toolchain-rhel7:latest
+LABEL maintainer Apache Geode <dev@geode.apache.org>
+
+USER root
+WORKDIR /
+
+COPY --from=registry.access.redhat.com/rhscl/s2i-core-rhel7:latest /etc/yum.repos.d/ubi.repo /etc/yum.repos.d/ubi.repo
+
+RUN yum-config-manager --enable ubi-server-rhscl-7-rpms && \
+    yum update -y && \
+    yum -y clean all
+
+COPY bellsoft.repo /etc/yum.repos.d/
+
+RUN yum-config-manager --enable ubi-server-rhscl-7-rpms && \
+    yum update -y && \
+    yum install -y --setopt=tsflags=nodocs \
+        git \
+        make \
+        zlib-devel \
+        patch \
+        openssl-devel \
+        rh-python36-python-pip \
+        bellsoft-java11 \
+        http://mirror.centos.org/centos/7/os/x86_64/Packages/doxygen-1.8.5-4.el7.x86_64.rpm && \
+    yum -y clean all
+
+RUN scl enable rh-python36 "pip3 install --upgrade pip && \
+    pip3 install cpp-coveralls"
+
+# Get latest release of CMake ignoring pre-releases
+RUN installer=$(mktemp) \
+    && curl -o ${installer} -L $(curl -s https://api.github.com/repos/Kitware/CMake/releases \
+        | grep -P -i 'browser_download_url.*cmake-\d+\.\d+\.\d+-linux-x86_64\.sh' \
+        | head -n 1 \
+        | cut -d : -f 2,3 \
+        | tr -d '"') \
+    && bash ${installer} --skip-license --prefix=/usr/local \
+    && rm ${installer}
+
+ARG GEODE_VERSION=1.14.4
+ENV GEODE_HOME /apache-geode-${GEODE_VERSION}
+RUN curl -L -s "https://www.apache.org/dyn/closer.lua/geode/${GEODE_VERSION}/apache-geode-${GEODE_VERSION}.tgz?action=download" | tar -zxvf - --exclude javadoc
+
+CMD ["bash"]
diff --git a/docker/rhel-7/bellsoft.repo b/docker/rhel-7/bellsoft.repo
new file mode 100644
index 0000000..bd08107
--- /dev/null
+++ b/docker/rhel-7/bellsoft.repo
@@ -0,0 +1,7 @@
+[BellSoft]
+name=BellSoft Repository
+baseurl=https://yum.bell-sw.com
+enabled=1
+gpgcheck=1
+gpgkey=https://download.bell-sw.com/pki/GPG-KEY-bellsoft
+priority=1
diff --git a/docker/rhel-8/Dockerfile b/docker/rhel-8/Dockerfile
new file mode 100644
index 0000000..940e832
--- /dev/null
+++ b/docker/rhel-8/Dockerfile
@@ -0,0 +1,61 @@
+# 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.
+
+FROM registry.access.redhat.com/ubi8/ubi:latest
+LABEL maintainer Apache Geode <dev@geode.apache.org>
+
+USER root
+WORKDIR /
+
+RUN yum update -y && \
+    yum -y clean all
+
+COPY bellsoft.repo /etc/yum.repos.d/
+COPY --from=centos:8 /etc/yum.repos.d/CentOS-Linux-PowerTools.repo /etc/yum.repos.d/
+COPY --from=centos:8 /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial /etc/pki/rpm-gpg/
+
+RUN yum config-manager --set-enabled powertools && \
+    yum update -y && \
+    yum install -y --setopt=tsflags=nodocs \
+        git \
+        make \
+        zlib-devel \
+        patch \
+        openssl-devel \
+        bellsoft-java11 \
+        doxygen \
+        python3-pip \
+        gcc-c++ && \
+    yum -y clean all
+
+RUN pip3 install --upgrade pip && \
+    pip3 install cpp-coveralls
+
+# Get latest release of CMake ignoring pre-releases
+RUN installer=$(mktemp) \
+    && curl -o ${installer} -L $(curl -s https://api.github.com/repos/Kitware/CMake/releases \
+        | grep -P -i 'browser_download_url.*cmake-\d+\.\d+\.\d+-linux-x86_64\.sh' \
+        | head -n 1 \
+        | cut -d : -f 2,3 \
+        | tr -d '"') \
+    && bash ${installer} --skip-license --prefix=/usr/local \
+    && rm ${installer}
+
+ARG GEODE_VERSION=1.14.4
+ENV GEODE_HOME /apache-geode-${GEODE_VERSION}
+RUN curl -L -s "https://www.apache.org/dyn/closer.lua/geode/${GEODE_VERSION}/apache-geode-${GEODE_VERSION}.tgz?action=download" | tar -zxvf - --exclude javadoc
+
+CMD ["bash"]
diff --git a/docker/rhel-8/bellsoft.repo b/docker/rhel-8/bellsoft.repo
new file mode 100644
index 0000000..bd08107
--- /dev/null
+++ b/docker/rhel-8/bellsoft.repo
@@ -0,0 +1,7 @@
+[BellSoft]
+name=BellSoft Repository
+baseurl=https://yum.bell-sw.com
+enabled=1
+gpgcheck=1
+gpgkey=https://download.bell-sw.com/pki/GPG-KEY-bellsoft
+priority=1
diff --git a/docker/ubuntu-16.04/Dockerfile b/docker/ubuntu-16.04/Dockerfile
new file mode 100644
index 0000000..50b24c3
--- /dev/null
+++ b/docker/ubuntu-16.04/Dockerfile
@@ -0,0 +1,73 @@
+# 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.
+
+FROM ubuntu:16.04
+LABEL maintainer Apache Geode <dev@geode.apache.org>
+
+USER root
+WORKDIR /
+
+ENV DEBIAN_FRONTEND noninteractive
+RUN apt update && \
+    apt -yq full-upgrade && \
+    apt-get -y install \
+        apt-transport-https \
+        ca-certificates \
+        curl \
+        gnupg2 \
+        software-properties-common && \
+    apt-get -y autoremove && \
+    apt-get autoclean
+
+RUN . /etc/os-release && \
+    curl -s https://download.bell-sw.com/pki/GPG-KEY-bellsoft | apt-key add - && \
+    apt-add-repository "deb http://apt.bell-sw.com/ stable main" && \
+    curl -s https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
+    apt-add-repository "deb http://apt.llvm.org/${VERSION_CODENAME}/ llvm-toolchain-${VERSION_CODENAME}-6.0 main"
+
+RUN apt update && apt -yq full-upgrade && apt-get -y install \
+        build-essential \
+        libc++-dev \
+        libc++abi-dev \
+        zlib1g-dev \
+        libssl-dev \
+        bellsoft-java11 \
+        git \
+        doxygen \
+        graphviz \
+        python3-pip \
+        clang-format-6.0 && \
+    apt-get -y autoremove && \
+    apt-get autoclean
+
+RUN pip3 install --upgrade pip && \
+    pip3 install cpp-coveralls
+
+# Get latest release of CMake ignoring pre-releases
+RUN installer=$(mktemp) \
+    && curl -o ${installer} -L $(curl -s https://api.github.com/repos/Kitware/CMake/releases \
+        | grep -P -i 'browser_download_url.*cmake-\d+\.\d+\.\d+-linux-x86_64\.sh' \
+        | head -n 1 \
+        | cut -d : -f 2,3 \
+        | tr -d '"') \
+    && bash ${installer} --skip-license --prefix=/usr/local \
+    && rm ${installer}
+
+ARG GEODE_VERSION=1.14.4
+ENV GEODE_HOME /apache-geode-${GEODE_VERSION}
+RUN curl -L -s "https://www.apache.org/dyn/closer.lua/geode/${GEODE_VERSION}/apache-geode-${GEODE_VERSION}.tgz?action=download" | tar -zxvf - --exclude javadoc
+
+CMD ["bash"]
diff --git a/docker/ubuntu-18.04/Dockerfile b/docker/ubuntu-18.04/Dockerfile
new file mode 100644
index 0000000..9b9e0b3
--- /dev/null
+++ b/docker/ubuntu-18.04/Dockerfile
@@ -0,0 +1,73 @@
+# 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.
+
+FROM ubuntu:18.04
+LABEL maintainer Apache Geode <dev@geode.apache.org>
+
+USER root
+WORKDIR /
+
+ENV DEBIAN_FRONTEND noninteractive
+RUN apt update && \
+    apt -yq full-upgrade && \
+    apt-get -y install \
+        apt-transport-https \
+        ca-certificates \
+        curl \
+        gnupg2 \
+        software-properties-common && \
+    apt-get -y autoremove && \
+    apt-get autoclean
+
+RUN . /etc/os-release && \
+    curl -s https://download.bell-sw.com/pki/GPG-KEY-bellsoft | apt-key add - && \
+    apt-add-repository "deb http://apt.bell-sw.com/ stable main" && \
+    curl -s https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
+    apt-add-repository "deb http://apt.llvm.org/${VERSION_CODENAME}/ llvm-toolchain-${VERSION_CODENAME}-6.0 main"
+
+RUN apt update && apt -yq full-upgrade && apt-get -y install \
+        build-essential \
+        libc++-dev \
+        libc++abi-dev \
+        zlib1g-dev \
+        libssl-dev \
+        bellsoft-java11 \
+        git \
+        doxygen \
+        graphviz \
+        python3-pip \
+        clang-format-6.0 && \
+    apt-get -y autoremove && \
+    apt-get autoclean
+
+RUN pip3 install --upgrade pip && \
+    pip3 install cpp-coveralls
+
+# Get latest release of CMake ignoring pre-releases
+RUN installer=$(mktemp) \
+    && curl -o ${installer} -L $(curl -s https://api.github.com/repos/Kitware/CMake/releases \
+        | grep -P -i 'browser_download_url.*cmake-\d+\.\d+\.\d+-linux-x86_64\.sh' \
+        | head -n 1 \
+        | cut -d : -f 2,3 \
+        | tr -d '"') \
+    && bash ${installer} --skip-license --prefix=/usr/local \
+    && rm ${installer}
+
+ARG GEODE_VERSION=1.14.4
+ENV GEODE_HOME /apache-geode-${GEODE_VERSION}
+RUN curl -L -s "https://www.apache.org/dyn/closer.lua/geode/${GEODE_VERSION}/apache-geode-${GEODE_VERSION}.tgz?action=download" | tar -zxvf - --exclude javadoc
+
+CMD ["bash"]
diff --git a/docker/ubuntu-20.04/Dockerfile b/docker/ubuntu-20.04/Dockerfile
new file mode 100644
index 0000000..b6f310c
--- /dev/null
+++ b/docker/ubuntu-20.04/Dockerfile
@@ -0,0 +1,71 @@
+# 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.
+
+FROM ubuntu:20.04
+LABEL maintainer Apache Geode <dev@geode.apache.org>
+
+USER root
+WORKDIR /
+
+ENV DEBIAN_FRONTEND noninteractive
+RUN apt update && \
+    apt -yq full-upgrade && \
+    apt-get -y install \
+        apt-transport-https \
+        ca-certificates \
+        curl \
+        gnupg2 \
+        software-properties-common && \
+    apt-get -y autoremove && \
+    apt-get autoclean
+
+RUN . /etc/os-release && \
+    curl -s https://download.bell-sw.com/pki/GPG-KEY-bellsoft | apt-key add - && \
+    apt-add-repository "deb http://apt.bell-sw.com/ stable main"
+
+RUN apt update && apt -yq full-upgrade && apt-get -y install \
+        build-essential \
+        libc++-dev \
+        libc++abi-dev \
+        zlib1g-dev \
+        libssl-dev \
+        bellsoft-java11 \
+        git \
+        doxygen \
+        graphviz \
+        python3-pip \
+        clang-format-6.0 && \
+    apt-get -y autoremove && \
+    apt-get autoclean
+
+RUN pip3 install --upgrade pip && \
+    pip3 install cpp-coveralls
+
+# Get latest release of CMake ignoring pre-releases
+RUN installer=$(mktemp) \
+    && curl -o ${installer} -L $(curl -s https://api.github.com/repos/Kitware/CMake/releases \
+        | grep -P -i 'browser_download_url.*cmake-\d+\.\d+\.\d+-linux-x86_64\.sh' \
+        | head -n 1 \
+        | cut -d : -f 2,3 \
+        | tr -d '"') \
+    && bash ${installer} --skip-license --prefix=/usr/local \
+    && rm ${installer}
+
+ARG GEODE_VERSION=1.14.4
+ENV GEODE_HOME /apache-geode-${GEODE_VERSION}
+RUN curl -L -s "https://www.apache.org/dyn/closer.lua/geode/${GEODE_VERSION}/apache-geode-${GEODE_VERSION}.tgz?action=download" | tar -zxvf - --exclude javadoc
+
+CMD ["bash"]
diff --git a/docker/windows/Dockerfile b/docker/windows/Dockerfile
new file mode 100644
index 0000000..c0e2404
--- /dev/null
+++ b/docker/windows/Dockerfile
@@ -0,0 +1,68 @@
+# 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.
+
+# escape=`
+
+# .NET 3.5 is required for NUnit 2.6 only.
+ARG FROM_IMAGE=mcr.microsoft.com/dotnet/framework/runtime:3.5
+FROM ${FROM_IMAGE}
+
+SHELL ["cmd", "/S", "/C"]
+
+WORKDIR C:\
+
+RUN powershell -Command `
+    iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'));
+
+RUN choco install `
+    git.install `
+    liberica8jdk `
+    cmake.portable `
+    doxygen.install `
+    openssl `
+    strawberryperl `
+    nuget.commandline -confirm
+
+# Only for NUnit 2.6
+RUN choco install nunit.install --version 2.6.4 -confirm
+
+ARG GEODE_VERSION=1.14.4
+ENV GEODE_HOME C:\apache-geode-${GEODE_VERSION}
+RUN curl -L -s "https://www.apache.org/dyn/closer.lua/geode/%GEODE_VERSION%/apache-geode-%GEODE_VERSION%.tgz?action=download" | tar -zxvf - --exclude javadoc
+
+ADD https://raw.githubusercontent.com/microsoft/vs-dockerfiles/master/managed-native-desktop/Install.cmd C:\TEMP\Install.cmd
+ADD https://aka.ms/vscollect.exe C:\TEMP\collect.exe
+
+# Download channel for fixed install.
+ARG CHANNEL_URL=https://aka.ms/vs/15/release/channel
+ADD ${CHANNEL_URL} C:\TEMP\VisualStudio.chman
+
+# Download and install Build Tools for Visual Studio 2017.
+ADD https://aka.ms/vs/15/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe
+RUN C:\TEMP\Install.cmd C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `
+    --channelUri C:\TEMP\VisualStudio.chman `
+    --installChannelUri C:\TEMP\VisualStudio.chman `
+    --add Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools `
+    --add Microsoft.Net.Component.4.5.2.TargetingPack `
+    --add Microsoft.VisualStudio.Component.TestTools.BuildTools `
+    --add Microsoft.VisualStudio.Workload.VCTools `
+    --add Microsoft.VisualStudio.Component.VC.CLI.Support `
+    --add Microsoft.VisualStudio.Component.VC.Tools.14.15 `
+    --add Microsoft.VisualStudio.Component.Windows10SDK.16299.Desktop `
+    --installPath C:\BuildTools
+
+ENTRYPOINT C:\BuildTools\VC\Auxiliary\Build\vcvarsall.bat x86_amd64 10.0.16299.0 -vcvars_ver=14.15 &&
+CMD cmd
diff --git a/docker/windows/README.md b/docker/windows/README.md
new file mode 100644
index 0000000..d911527
--- /dev/null
+++ b/docker/windows/README.md
@@ -0,0 +1,21 @@
+# C++ Toolkit Version
+Currently we target VC toolset 14.15 which is forward compatible to 14.15+.
+* Build Tools Component: `Microsoft.VisualStudio.Component.VC.Tools.14.15`
+* Entrypoint: `vcvarsall.bat ... -vcvars_ver=14.15`
+
+We should investigate if we need to go back a few more minors to remain compatible
+with previous releases.
+
+# C++ SDK Version
+We haven't really figured out if or how to lock down the SDK version. Currently we use
+version 10.16299.
+* Build Tools Component: `Microsoft.VisualStudio.Component.Windows10SDK.16299.Desktop`
+* Entrypoint: `vcvarsall.bat  ... 10.0.16299.0 ...`
+
+ACE library seems to be stuck on 10.16299. If we upgrade in the future we may need to
+unstick ACE to avoid mixing of SDKs. It is unclear is mixing SDKs is an issue.
+
+# .NET Framework
+We build against version 4.5.2 but require 3.5 for old NUnit 2.6.4 at runtime.
+* Base Image: `mcr.microsoft.com/dotnet/framework/runtime:3.5`
+* Build Tools Component: `Microsoft.Net.Component.4.5.2.TargetingPack`
diff --git a/docs/README.md b/docs/README.md
index 3efd51e..edb7e31 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -15,19 +15,38 @@
 
 Documentation can be built and previewed using the utility script at {geode-project-dir}/docs/docker. This script uses a Docker image that provides the tools to build and view the guide, including Ruby, Bookbinder, and Rackup.
 
-For C++ guide:
+For the C++ guide:
+
 ```
 $ cd {geode-native-project-dir}/docs/docker
 $ ./preview-user-guide.sh cpp
 ```
 
-For .NET guide:
+For the .NET guide:
+
 ```
 $ cd {geode-native-project-dir}/docs/docker
 $ ./preview-user-guide.sh dotnet
 ```
 
-In a browser, navigate to `http://localhost:9292` to view the user guide.
+Once the script shows it is listening on a local address, you can use a browser to view the user guide on that address.
+
+For example:
+
+```
+$ ./preview-user-guide.sh cpp
+...
+...
+Puma starting in single mode...
+* Version 4.3.8 (ruby 2.5.9-p229), codename: Mysterious Traveller
+* Min threads: 0, max threads: 16
+* Environment: development
+* Listening on tcp://0.0.0.0:9292
+Use Ctrl-C to stop
+```
+You will find the user guide at `0.0.0.0:9292`. 
+
+Files generated by Bookbinder will be at `{geode-project-dir}/docs/geode-native-book-cpp/final_app` for the C++ guide, and at `{geode-project-dir}/docs/geode-native-book-dotnet/final_app` for the .NET guide.
 
 
 ## Build the User Guide
@@ -46,14 +65,14 @@
 
 1. The GemFile in each book directory already defines the gem "bookbindery" dependency. Make sure you are in the `_geode-native-project-dir_/docs/geode-native-book-cpp` or `_geode-native-project-dir_/docs/geode-native-book-dotnet` (depending if you want to build the C++ or .NET user guide respectively) directory and enter:
 
-   For C++ guide:
+   For the C++ guide:
     
    ```bash
    $ cd docs/geode-native-book-cpp
    $ bundle install
    ```
 
-   For .NET guide:
+   For the .NET guide:
     
    ```bash
    $ cd docs/geode-native-book-dotnet
diff --git a/docs/docker/Dockerfile b/docs/docker/Dockerfile
index 0efb124..0c605d6 100644
--- a/docs/docker/Dockerfile
+++ b/docs/docker/Dockerfile
@@ -42,7 +42,6 @@
 # Install Bookbinder
 COPY Gemfile Gemfile
 COPY Gemfile.lock Gemfile.lock
+
 RUN bundle install
 
-COPY geode-native-book-* .
-COPY geode-native-docs-* .
diff --git a/docs/docker/preview-user-guide.sh b/docs/docker/preview-user-guide.sh
index 98934f2..17a804d 100755
--- a/docs/docker/preview-user-guide.sh
+++ b/docs/docker/preview-user-guide.sh
@@ -17,14 +17,11 @@
 # limitations under the License.
 
 function cleanup {
-  rm Gemfile Gemfile.lock
-  rm -r geode-native-book-* geode-native-docs-*
+  rm -f Gemfile Gemfile.lock
 }
 
 trap cleanup EXIT
 
-set -x -e
-
 if [ "$#" -ne 1 ]; then
   echo "ERROR: Illegal number of parameters"
   echo ""
@@ -43,13 +40,43 @@
 BOOK_DIR_NAME=geode-native-book-${LANG}
 DOCS_DIR_NAME=geode-native-docs-${LANG}
 
-mkdir -p ${BOOK_DIR_NAME}
-mkdir -p ${DOCS_DIR_NAME}
+BOOK_PATH="$(pwd)/../${BOOK_DIR_NAME}"
+DOCS_PATH="$(pwd)/../${DOCS_DIR_NAME}"
 
+# Gemfile & Gemfile.lock are copied to avoid including the whole
+# geode-book folder to the image context
 cp ../${BOOK_DIR_NAME}/Gemfile* .
-cp -r ../${BOOK_DIR_NAME} ${BOOK_DIR_NAME}
-cp -r ../${DOCS_DIR_NAME} ${DOCS_DIR_NAME}
 
-docker build --build-arg lang=${LANG} -t geodenativedocs/temp:1.0 .
+docker build -t geodenativedocs/temp:1.0 .
 
-docker run -it -p 9292:9292 geodenativedocs/temp:1.0 /bin/bash -c "cd ${BOOK_DIR_NAME} && bundle exec bookbinder bind local && cd final_app && bundle exec rackup --host=0.0.0.0"
+
+# "${BOOK_DIR_NAME}/final_app" and "${BOOK_DIR_NAME}/output" are created
+# inside the container, so it is necessary to use the current user to
+# avoid these folders are owned by root user.
+MY_UID=$(id -u)
+MY_GID=$(id -g)
+docker run -it -p 9292:9292 --user $MY_UID:$MY_GID \
+    --workdir="/home/$USER" \
+    --volume="/etc/group:/etc/group:ro" \
+    --volume="/etc/passwd:/etc/passwd:ro" \
+    --volume="/etc/shadow:/etc/shadow:ro" \
+    --volume="${BOOK_PATH}:/${BOOK_DIR_NAME}:rw" \
+    --volume="${DOCS_PATH}:/${DOCS_DIR_NAME}:rw" \
+    geodenativedocs/temp:1.0 /bin/bash -c "cd /${BOOK_DIR_NAME} && bundle exec bookbinder bind local && cd final_app && bundle exec rackup --host=0.0.0.0"
+
+
+# Bookbinder creates the following links
+# <your geode native repo>/docs/geode-native-book-[cpp|dotnet]/output/master_middleman/source/docs/guide/<version> -> /geode-book/output/preprocessing/sections/docs/geode-native/[cpp|dotnet]/<version>
+# <your geode native repo>/docs/geode-native-book-[cpp|dotnet]/output/preprocessing/sections/docs/guide/<version> -> /geode-docs
+#
+# Following lines fix these wrong symbolic links:
+#
+ug_version=`ls ${BOOK_PATH}/final_app/public/docs/geode-native/${LANG}/`
+master_middleman_folder="${BOOK_PATH}/output/master_middleman/source/docs/geode-native/${LANG}/${ug_version}"
+preprocessing_folder="${BOOK_PATH}/output/preprocessing/sections/docs/geode-native/${LANG}/${ug_version}"
+rm ${master_middleman_folder}
+rm ${preprocessing_folder}
+
+ln -s ${DOCS_PATH} ${preprocessing_folder}
+ln -s ${preprocessing_folder} ${master_middleman_folder}
+
diff --git a/docs/geode-native-book-cpp/Gemfile b/docs/geode-native-book-cpp/Gemfile
index a418990..a365d5c 100644
--- a/docs/geode-native-book-cpp/Gemfile
+++ b/docs/geode-native-book-cpp/Gemfile
@@ -19,4 +19,3 @@
 
 gem 'bookbindery'
 
-gem 'libv8'
diff --git a/docs/geode-native-book-cpp/Gemfile.lock b/docs/geode-native-book-cpp/Gemfile.lock
index 4b7f27c..c02d2f7 100644
--- a/docs/geode-native-book-cpp/Gemfile.lock
+++ b/docs/geode-native-book-cpp/Gemfile.lock
@@ -9,8 +9,8 @@
     addressable (2.8.0)
       public_suffix (>= 2.0.2, < 5.0)
     ansi (1.5.0)
-    backports (3.21.0)
-    bookbindery (10.1.17)
+    backports (3.23.0)
+    bookbindery (10.1.18)
       ansi (~> 1.4)
       css_parser
       elasticsearch
@@ -28,7 +28,6 @@
       redcarpet (~> 3.2.3)
       rouge (!= 1.9.1)
       sprockets (= 3.7.2)
-      therubyracer
       thor (= 0.19.1)
     builder (3.2.4)
     chunky_png (1.4.0)
@@ -50,44 +49,50 @@
       sass (>= 3.2, < 3.5)
     concurrent-ruby (1.1.9)
     contracts (0.13.0)
-    css_parser (1.9.0)
+    css_parser (1.11.0)
       addressable
     dotenv (2.7.6)
-    elasticsearch (7.13.3)
-      elasticsearch-api (= 7.13.3)
-      elasticsearch-transport (= 7.13.3)
-    elasticsearch-api (7.13.3)
-      multi_json
-    elasticsearch-transport (7.13.3)
+    elastic-transport (8.0.0)
       faraday (~> 1)
       multi_json
-    em-websocket (0.5.2)
+    elasticsearch (8.1.0)
+      elastic-transport (= 8.0.0)
+      elasticsearch-api (= 8.1.0)
+    elasticsearch-api (8.1.0)
+      multi_json
+    em-websocket (0.5.3)
       eventmachine (>= 0.12.9)
-      http_parser.rb (~> 0.6.0)
+      http_parser.rb (~> 0)
     erubis (2.7.0)
     eventmachine (1.2.7)
-    excon (0.85.0)
+    excon (0.91.0)
     execjs (2.8.1)
-    faraday (1.5.1)
+    faraday (1.10.0)
       faraday-em_http (~> 1.0)
       faraday-em_synchrony (~> 1.0)
       faraday-excon (~> 1.1)
-      faraday-httpclient (~> 1.0.1)
+      faraday-httpclient (~> 1.0)
+      faraday-multipart (~> 1.0)
       faraday-net_http (~> 1.0)
-      faraday-net_http_persistent (~> 1.1)
+      faraday-net_http_persistent (~> 1.0)
       faraday-patron (~> 1.0)
-      multipart-post (>= 1.2, < 3)
+      faraday-rack (~> 1.0)
+      faraday-retry (~> 1.0)
       ruby2_keywords (>= 0.0.4)
     faraday-em_http (1.0.0)
     faraday-em_synchrony (1.0.0)
     faraday-excon (1.1.0)
     faraday-httpclient (1.0.1)
+    faraday-multipart (1.0.3)
+      multipart-post (>= 1.2, < 3)
     faraday-net_http (1.0.1)
     faraday-net_http_persistent (1.2.0)
     faraday-patron (1.0.0)
-    fast_blank (1.0.0)
-    fastimage (2.2.4)
-    ffi (1.15.3)
+    faraday-rack (1.0.0)
+    faraday-retry (1.0.3)
+    fast_blank (1.0.1)
+    fastimage (2.2.6)
+    ffi (1.15.5)
     fog-aws (0.7.6)
       fog-core (~> 1.27)
       fog-json (~> 1.0)
@@ -100,24 +105,23 @@
     fog-json (1.2.0)
       fog-core
       multi_json (~> 1.10)
-    fog-xml (0.1.3)
+    fog-xml (0.1.4)
       fog-core
       nokogiri (>= 1.5.11, < 2.0.0)
     font-awesome-sass (4.7.0)
       sass (>= 3.2)
     formatador (0.3.0)
     git (1.2.9.1)
-    haml (5.2.1)
+    haml (5.2.2)
       temple (>= 0.8.0)
       tilt
     hamster (3.0.0)
       concurrent-ruby (~> 1.0)
     hashie (3.6.0)
-    http_parser.rb (0.6.0)
+    http_parser.rb (0.8.0)
     i18n (0.7.0)
     ipaddress (0.8.3)
     kramdown (1.17.0)
-    libv8 (3.16.14.19)
     listen (3.0.8)
       rb-fsevent (~> 0.9, >= 0.9.4)
       rb-inotify (~> 0.9, >= 0.9.7)
@@ -169,10 +173,10 @@
       middleman-core (>= 3.2)
       rouge (~> 1.0)
     mini_portile2 (2.4.0)
-    minitest (5.14.4)
+    minitest (5.15.0)
     multi_json (1.15.0)
     multipart-post (2.1.1)
-    nio4r (2.5.7)
+    nio4r (2.5.8)
     nokogiri (1.10.1)
       mini_portile2 (~> 2.4.0)
     padrino-helpers (0.13.3.4)
@@ -181,19 +185,18 @@
       tilt (>= 1.4.1, < 3)
     padrino-support (0.13.3.4)
       activesupport (>= 3.1)
-    parallel (1.20.1)
+    parallel (1.21.0)
     public_suffix (4.0.6)
-    puma (5.3.2)
+    puma (5.6.4)
       nio4r (~> 2.0)
     rack (1.6.13)
     rack-livereload (0.3.17)
       rack
     rack-rewrite (1.5.1)
-    rb-fsevent (0.11.0)
+    rb-fsevent (0.11.1)
     rb-inotify (0.10.1)
       ffi (~> 1.0)
     redcarpet (3.2.3)
-    ref (2.0.0)
     rouge (1.11.1)
     ruby2_keywords (0.0.5)
     sass (3.4.25)
@@ -202,9 +205,6 @@
       concurrent-ruby (~> 1.0)
       rack (> 1, < 3)
     temple (0.8.2)
-    therubyracer (0.12.3)
-      libv8 (~> 3.16.14.15)
-      ref
     thor (0.19.1)
     thread_safe (0.3.6)
     tilt (1.4.1)
@@ -218,7 +218,6 @@
 
 DEPENDENCIES
   bookbindery
-  libv8
 
 BUNDLED WITH
    1.17.3
diff --git a/docs/geode-native-book-cpp/config.yml b/docs/geode-native-book-cpp/config.yml
index 7f030d3..1040524 100644
--- a/docs/geode-native-book-cpp/config.yml
+++ b/docs/geode-native-book-cpp/config.yml
@@ -21,15 +21,19 @@
 sections:
 - repository:
     name: geode-native-docs-cpp
-  directory: docs/geode-native/cpp/114
+  directory: docs/geode-native/cpp/115
   subnav_template: geode-nc-nav
 
 template_variables:
   product_name_long: Apache Geode
   product_name: Geode
   product_name_lc: geode
-  product_version: "1.14"
-  product_version_nodot: 114
+  product_version: "1.15"
+  product_version_nodot: 115
+  # Un-versioned API names (cppapiref, dotnetapiref) always point to the latest release. Be sure redirects.rb provides entries for the (right-hand) values.
+  cppapiref_version: cppapiref
+  dotnetapiref_version: dotnetapiref
+  #
   product_language: cpp
   client_name: Geode Native Client for C++
   min_java_update: 121
diff --git a/docs/geode-native-book-cpp/redirects.rb b/docs/geode-native-book-cpp/redirects.rb
index 4d3b3a1..a48a7bf 100644
--- a/docs/geode-native-book-cpp/redirects.rb
+++ b/docs/geode-native-book-cpp/redirects.rb
@@ -15,14 +15,13 @@
 
 # Links to API Documentation #
 r301 %r{/releases/latest/javadoc/(.*)}, 'https://geode.apache.org/releases/latest/javadoc/$1'
-r302 %r{/apidocs/(.*)}, 'https://geode.apache.org/releases/latest/cppdocs/$1'
 r302 %r{/cppdocs/(.*)}, 'https://geode.apache.org/releases/latest/cppdocs/$1'
-r302 %r{/cppapiref/(.*)}, 'https://geode.apache.org/releases/latest/cppdocs/$1'
 r302 %r{/dotnetdocs/(.*)}, 'https://geode.apache.org/releases/latest/dotnetdocs/$1'
+r302 %r{/cppapiref/(.*)}, 'https://geode.apache.org/releases/latest/cppdocs/$1'
 r302 %r{/dotnetapiref/(.*)}, 'https://geode.apache.org/releases/latest/dotnetdocs/$1'
 
 # Links to User Guides #
-rewrite '/', '/docs/geode-native/cpp/114/about-client-users-guide.html'
-rewrite '/index.html', '/docs/geode-native/cpp/114/about-client-users-guide.html'
-r301 %r{/serverman/(.*)}, 'https://geode.apache.org/docs/guide/114/$1'
-r301 %r{/geodeman/(.*)}, 'https://geode.apache.org/docs/guide/114/$1'
+rewrite '/', '/docs/geode-native/cpp/115/about-client-users-guide.html'
+rewrite '/index.html', '/docs/geode-native/cpp/115/about-client-users-guide.html'
+r301 %r{/serverman/(.*)}, 'https://geode.apache.org/docs/guide/115/$1'
+r301 %r{/geodeman/(.*)}, 'https://geode.apache.org/docs/guide/115/$1'
diff --git a/docs/geode-native-book-dotnet/Gemfile b/docs/geode-native-book-dotnet/Gemfile
index a418990..a365d5c 100644
--- a/docs/geode-native-book-dotnet/Gemfile
+++ b/docs/geode-native-book-dotnet/Gemfile
@@ -19,4 +19,3 @@
 
 gem 'bookbindery'
 
-gem 'libv8'
diff --git a/docs/geode-native-book-dotnet/Gemfile.lock b/docs/geode-native-book-dotnet/Gemfile.lock
index 4b7f27c..c02d2f7 100644
--- a/docs/geode-native-book-dotnet/Gemfile.lock
+++ b/docs/geode-native-book-dotnet/Gemfile.lock
@@ -9,8 +9,8 @@
     addressable (2.8.0)
       public_suffix (>= 2.0.2, < 5.0)
     ansi (1.5.0)
-    backports (3.21.0)
-    bookbindery (10.1.17)
+    backports (3.23.0)
+    bookbindery (10.1.18)
       ansi (~> 1.4)
       css_parser
       elasticsearch
@@ -28,7 +28,6 @@
       redcarpet (~> 3.2.3)
       rouge (!= 1.9.1)
       sprockets (= 3.7.2)
-      therubyracer
       thor (= 0.19.1)
     builder (3.2.4)
     chunky_png (1.4.0)
@@ -50,44 +49,50 @@
       sass (>= 3.2, < 3.5)
     concurrent-ruby (1.1.9)
     contracts (0.13.0)
-    css_parser (1.9.0)
+    css_parser (1.11.0)
       addressable
     dotenv (2.7.6)
-    elasticsearch (7.13.3)
-      elasticsearch-api (= 7.13.3)
-      elasticsearch-transport (= 7.13.3)
-    elasticsearch-api (7.13.3)
-      multi_json
-    elasticsearch-transport (7.13.3)
+    elastic-transport (8.0.0)
       faraday (~> 1)
       multi_json
-    em-websocket (0.5.2)
+    elasticsearch (8.1.0)
+      elastic-transport (= 8.0.0)
+      elasticsearch-api (= 8.1.0)
+    elasticsearch-api (8.1.0)
+      multi_json
+    em-websocket (0.5.3)
       eventmachine (>= 0.12.9)
-      http_parser.rb (~> 0.6.0)
+      http_parser.rb (~> 0)
     erubis (2.7.0)
     eventmachine (1.2.7)
-    excon (0.85.0)
+    excon (0.91.0)
     execjs (2.8.1)
-    faraday (1.5.1)
+    faraday (1.10.0)
       faraday-em_http (~> 1.0)
       faraday-em_synchrony (~> 1.0)
       faraday-excon (~> 1.1)
-      faraday-httpclient (~> 1.0.1)
+      faraday-httpclient (~> 1.0)
+      faraday-multipart (~> 1.0)
       faraday-net_http (~> 1.0)
-      faraday-net_http_persistent (~> 1.1)
+      faraday-net_http_persistent (~> 1.0)
       faraday-patron (~> 1.0)
-      multipart-post (>= 1.2, < 3)
+      faraday-rack (~> 1.0)
+      faraday-retry (~> 1.0)
       ruby2_keywords (>= 0.0.4)
     faraday-em_http (1.0.0)
     faraday-em_synchrony (1.0.0)
     faraday-excon (1.1.0)
     faraday-httpclient (1.0.1)
+    faraday-multipart (1.0.3)
+      multipart-post (>= 1.2, < 3)
     faraday-net_http (1.0.1)
     faraday-net_http_persistent (1.2.0)
     faraday-patron (1.0.0)
-    fast_blank (1.0.0)
-    fastimage (2.2.4)
-    ffi (1.15.3)
+    faraday-rack (1.0.0)
+    faraday-retry (1.0.3)
+    fast_blank (1.0.1)
+    fastimage (2.2.6)
+    ffi (1.15.5)
     fog-aws (0.7.6)
       fog-core (~> 1.27)
       fog-json (~> 1.0)
@@ -100,24 +105,23 @@
     fog-json (1.2.0)
       fog-core
       multi_json (~> 1.10)
-    fog-xml (0.1.3)
+    fog-xml (0.1.4)
       fog-core
       nokogiri (>= 1.5.11, < 2.0.0)
     font-awesome-sass (4.7.0)
       sass (>= 3.2)
     formatador (0.3.0)
     git (1.2.9.1)
-    haml (5.2.1)
+    haml (5.2.2)
       temple (>= 0.8.0)
       tilt
     hamster (3.0.0)
       concurrent-ruby (~> 1.0)
     hashie (3.6.0)
-    http_parser.rb (0.6.0)
+    http_parser.rb (0.8.0)
     i18n (0.7.0)
     ipaddress (0.8.3)
     kramdown (1.17.0)
-    libv8 (3.16.14.19)
     listen (3.0.8)
       rb-fsevent (~> 0.9, >= 0.9.4)
       rb-inotify (~> 0.9, >= 0.9.7)
@@ -169,10 +173,10 @@
       middleman-core (>= 3.2)
       rouge (~> 1.0)
     mini_portile2 (2.4.0)
-    minitest (5.14.4)
+    minitest (5.15.0)
     multi_json (1.15.0)
     multipart-post (2.1.1)
-    nio4r (2.5.7)
+    nio4r (2.5.8)
     nokogiri (1.10.1)
       mini_portile2 (~> 2.4.0)
     padrino-helpers (0.13.3.4)
@@ -181,19 +185,18 @@
       tilt (>= 1.4.1, < 3)
     padrino-support (0.13.3.4)
       activesupport (>= 3.1)
-    parallel (1.20.1)
+    parallel (1.21.0)
     public_suffix (4.0.6)
-    puma (5.3.2)
+    puma (5.6.4)
       nio4r (~> 2.0)
     rack (1.6.13)
     rack-livereload (0.3.17)
       rack
     rack-rewrite (1.5.1)
-    rb-fsevent (0.11.0)
+    rb-fsevent (0.11.1)
     rb-inotify (0.10.1)
       ffi (~> 1.0)
     redcarpet (3.2.3)
-    ref (2.0.0)
     rouge (1.11.1)
     ruby2_keywords (0.0.5)
     sass (3.4.25)
@@ -202,9 +205,6 @@
       concurrent-ruby (~> 1.0)
       rack (> 1, < 3)
     temple (0.8.2)
-    therubyracer (0.12.3)
-      libv8 (~> 3.16.14.15)
-      ref
     thor (0.19.1)
     thread_safe (0.3.6)
     tilt (1.4.1)
@@ -218,7 +218,6 @@
 
 DEPENDENCIES
   bookbindery
-  libv8
 
 BUNDLED WITH
    1.17.3
diff --git a/docs/geode-native-book-dotnet/config.yml b/docs/geode-native-book-dotnet/config.yml
index 39c93c7..643eb59 100644
--- a/docs/geode-native-book-dotnet/config.yml
+++ b/docs/geode-native-book-dotnet/config.yml
@@ -21,21 +21,25 @@
 sections:
 - repository:
     name: geode-native-docs-dotnet
-  directory: docs/geode-native/dotnet/114
+  directory: docs/geode-native/dotnet/115
   subnav_template: geode-nc-nav
 
 template_variables:
   product_name_long: Apache Geode
   product_name: Geode
   product_name_lc: geode
-  product_version: "1.14"
-  product_version_nodot: 114
+  product_version: "1.15"
+  product_version_nodot: 115
+  # Un-versioned API names (cppapiref, dotnetapiref) always point to the latest release. Be sure redirects.rb provides entries for the (right-hand) values.
+  cppapiref_version: cppapiref
+  dotnetapiref_version: dotnetapiref
+  #
   product_language: dotnet
-  client_name: Geode Native Client for .NET
+  client_name: Geode Native Client for .NET Framework
   min_java_update: 121
   support_url: http://geode.apache.org/community
   product_url: http://geode.apache.org
-  book_title: Apache Geode Native .NET Documentation
+  book_title: Apache Geode Native .NET Framework Documentation
   book_header_img: /images/Apache_Geode_logo_symbol_white.png
   support_link: <a href="http://geode.apache.org/community" target="_blank">Community</a>
   support_call_to_action: <a href="http://geode.apache.org/community" target="_blank">Need Help?</a>
@@ -43,7 +47,7 @@
   product_link: <div class="header-item"><a href="http://geode.apache.org">Back to Product Page</a></div>
   domain_name: apache.org
   book_title_short: Geode Native .NET Docs
-  local_header_title: Apache Geode Native .NET
+  local_header_title: Apache Geode Native .NET Framework
   local_header_img: /images/Apache_Geode_logo_symbol.png
   serverman: https://geode.apache.org/docs/guide/latest
   geodeman: https://geode.apache.org/docs/guide/latest
@@ -51,4 +55,4 @@
   dotnetapiref: https://geode.apache.org/releases/latest/dotnetdocs/
   javaapiref: https://geode.apache.org/releases/latest/javadoc/index.html
 
-broken_link_exclusions: iefix|using_custom_classes|arrowhead|cppdocs|dotnetdocs|114|#
+broken_link_exclusions: iefix|using_custom_classes|arrowhead|cppdocs|dotnetdocs|#
diff --git a/docs/geode-native-book-dotnet/redirects.rb b/docs/geode-native-book-dotnet/redirects.rb
index 52caf4c..2661a96 100644
--- a/docs/geode-native-book-dotnet/redirects.rb
+++ b/docs/geode-native-book-dotnet/redirects.rb
@@ -15,14 +15,13 @@
 
 # Links to API Documentation #
 r301 %r{/releases/latest/javadoc/(.*)}, 'https://geode.apache.org/releases/latest/javadoc/$1'
-r302 %r{/apidocs/(.*)}, 'https://geode.apache.org/releases/latest/dotnetdocs/$1'
-r302 %r{/dotnetdocs/(.*)}, 'https://geode.apache.org/releases/latest/dotnetdocs/$1'
-r302 %r{/dotnetapiref/(.*)}, 'https://geode.apache.org/releases/latest/dotnetdocs/$1'
 r302 %r{/cppdocs/(.*)}, 'https://geode.apache.org/releases/latest/cppdocs/$1'
+r302 %r{/dotnetdocs/(.*)}, 'https://geode.apache.org/releases/latest/dotnetdocs/$1'
 r302 %r{/cppapiref/(.*)}, 'https://geode.apache.org/releases/latest/cppdocs/$1'
+r302 %r{/dotnetapiref/(.*)}, 'https://geode.apache.org/releases/latest/dotnetdocs/$1'
 
 # Links to User Guides #
-rewrite '/', '/docs/geode-native/dotnet/114/about-client-users-guide.html'
-rewrite '/index.html', '/docs/geode-native/dotnet/114/about-client-users-guide.html'
-r301 %r{/serverman/(.*)}, 'https://geode.apache.org/docs/guide/114/$1'
-r301 %r{/geodeman/(.*)}, 'https://geode.apache.org/docs/guide/114/$1'
+rewrite '/', '/docs/geode-native/dotnet/115/about-client-users-guide.html'
+rewrite '/index.html', '/docs/geode-native/dotnet/115/about-client-users-guide.html'
+r301 %r{/serverman/(.*)}, 'https://geode.apache.org/docs/guide/115/$1'
+r301 %r{/geodeman/(.*)}, 'https://geode.apache.org/docs/guide/115/$1'
diff --git a/docs/geode-native-docs-cpp/about-client-users-guide.html.md.erb b/docs/geode-native-docs-cpp/about-client-users-guide.html.md.erb
index 34114c7..6f9511f 100644
--- a/docs/geode-native-docs-cpp/about-client-users-guide.html.md.erb
+++ b/docs/geode-native-docs-cpp/about-client-users-guide.html.md.erb
@@ -21,12 +21,12 @@
 Source files are available from the [Apache Geode-Native Github repository](https://github.com/apache/geode-native) 
 and instructions on how to build this documentation are available in the project README file found at that location.
 
-The Apache Geode Native Client is a library that provides access for C++ and Microsoft<sup>®</sup> .NET™ clients to an Apache Geode cluster.
+The Apache Geode Native Client is a library that provides access for C++ and Microsoft<sup>®</sup> .NET™ Framework clients to an Apache Geode cluster.
 
 See the API docs for API details:
 
-  - [C++ API docs](https://geode.apache.org/releases/latest/cppdocs/hierarchy.html)
-  - [.NET API docs](https://geode.apache.org/releases/latest/dotnetdocs/hierarchy.html)
+  - [C++ API docs](/<%=vars.cppapiref_version%>/hierarchy.html)
+  - [.NET Framework API docs](/<%=vars.dotnetapiref_version%>/hierarchy.html)
 
 See the [_<%=vars.product_name_long%> User Guide_](<%=vars.serverman%>/about_<%=vars.product_name.downcase%>.html) for information regarding the server.
 
diff --git a/docs/geode-native-docs-cpp/client-cache-ref.html.md.erb b/docs/geode-native-docs-cpp/client-cache-ref.html.md.erb
index c993bf8..aebd70d 100644
--- a/docs/geode-native-docs-cpp/client-cache-ref.html.md.erb
+++ b/docs/geode-native-docs-cpp/client-cache-ref.html.md.erb
@@ -41,7 +41,7 @@
 
 The declarative XML file is used to externalize the configuration of the client cache.
 The contents of the XML file correspond to APIs found in the`apache::geode::client` package for C++ applications,
-and the `Apache::Geode::Client` package for .NET applications.
+and the `Apache::Geode::Client` package for .NET Framework applications.
 
 Elements are defined in the Client Cache XSD file, named `cpp-cache-1.0.xsd`, which you can find in
 your native client distribution in the `xsds` directory, and online at
@@ -88,6 +88,12 @@
     <persistence-manager library-name="SqLiteImpl"
      library-function-name="createSqLiteInstance">
     ```
+Take into account that if a library name is not specified, the function name will be look for in the application.
+For example:
+
+    ```xml
+    <partition-resolver library-function-name="createPartitionResolver"/>
+    ```
 
 # Cache Initialization File Element Descriptions
 
@@ -353,7 +359,8 @@
 <a id="partition-resolver-ref"></a>
 ## \<partition-resolver\>
 
-\<partition-resolver\> identifies a function by specifying `library-name` and `library-function-name`.
+\<partition-resolver\> identifies a function by specifying `library-function-name` and optionally a `library-name`.
+Take into account that if `library-name` is not specified, the function will be looked for in the application itself.
 
 A partition resolver is used for single-hop access to partitioned region entries on the server side. This resolver
 implementation must match that of the `PartitionResolver` on the server side.
@@ -394,7 +401,8 @@
 must perform cache-to-disk and disk-to-cache operations.
 See the [API Class Reference](<%=vars.cppapiref_version%>/hierarchy.html) for the **PersistenceManager** class.
 
-\<persistence-manager\> identifies a persistence manager function by specifying `library-name` and `library-function-name`.
+\<persistence-manager\> identifies a persistence manager function by specifying `library-function-name` and optionally a `library-name`.
+Take into account that if `library-name` is not specified, the function will be looked for in the application itself.
 You can also specify a set of properties to be passed to the function as parameters.
 
 The sub-element `<properties>` is a sequence of 0 or more `<property>` elements.
diff --git a/docs/geode-native-docs-cpp/continuous-queries.html.md.erb b/docs/geode-native-docs-cpp/continuous-queries.html.md.erb
index 6d01d8d..8b7549d 100644
--- a/docs/geode-native-docs-cpp/continuous-queries.html.md.erb
+++ b/docs/geode-native-docs-cpp/continuous-queries.html.md.erb
@@ -19,9 +19,9 @@
 limitations under the License.
 -->
 
-The C++ and .NET clients can initiate queries that run on the <%=vars.product_name%> cache server
-and notify the client when the query results have changed.  For details on the server-side setup for
-continuous queries, see [How Continuous Querying Works](<%=vars.serverman%>/developing/continuous_querying/how_continuous_querying_works.html) 
+The C++ and .NET Framework clients can initiate queries that run on the <%=vars.product_name%>
+cache server and notify the client when the query results have changed.  For details on the
+server-side setup for continuous queries, see [How Continuous Querying Works](<%=vars.serverman%>/developing/continuous_querying/how_continuous_querying_works.html)
 in the *<%=vars.product_name%> User Guide*.
 
 ## <a id="cq_main_features" ></a>Continuous Query Basics
diff --git a/docs/geode-native-docs-cpp/function-execution.html.md.erb b/docs/geode-native-docs-cpp/function-execution.html.md.erb
index bf01b17..acf3fb8 100644
--- a/docs/geode-native-docs-cpp/function-execution.html.md.erb
+++ b/docs/geode-native-docs-cpp/function-execution.html.md.erb
@@ -97,7 +97,7 @@
 - invokes the object's execute method to invoke the server-side function
 
 If the client expects results, it must create a result object.
-The .NET example uses a built-in result collector (`IResultCollector.getResults()`) to retrieve the function results.
+The .NET Framework example uses a built-in result collector (`IResultCollector.getResults()`) to retrieve the function results.
 
 The example creates a result variable to hold the results from the collector.
 
diff --git a/docs/geode-native-docs-cpp/serialization/cpp-serialization/pdxserializable-interface.html.md.erb b/docs/geode-native-docs-cpp/serialization/cpp-serialization/pdxserializable-interface.html.md.erb
index 4f09837..1cdf2c9 100644
--- a/docs/geode-native-docs-cpp/serialization/cpp-serialization/pdxserializable-interface.html.md.erb
+++ b/docs/geode-native-docs-cpp/serialization/cpp-serialization/pdxserializable-interface.html.md.erb
@@ -43,7 +43,7 @@
     }
     ```
     
-    If you also use PDX serialization in Java or .NET for the object, serialize the object in the same way for each language. Serialize the same fields in the same order and mark the same identity fields.
+    If you also use PDX serialization in Java or .NET Framework for the object, serialize the object in the same way for each language. Serialize the same fields in the same order and mark the same identity fields.
 
 3.  Program the `fromData` function to read your data fields from the serialized form into the object's fields.
 
diff --git a/docs/geode-native-docs-dotnet/about-client-users-guide.html.md.erb b/docs/geode-native-docs-dotnet/about-client-users-guide.html.md.erb
index 34114c7..6f9511f 100644
--- a/docs/geode-native-docs-dotnet/about-client-users-guide.html.md.erb
+++ b/docs/geode-native-docs-dotnet/about-client-users-guide.html.md.erb
@@ -21,12 +21,12 @@
 Source files are available from the [Apache Geode-Native Github repository](https://github.com/apache/geode-native) 
 and instructions on how to build this documentation are available in the project README file found at that location.
 
-The Apache Geode Native Client is a library that provides access for C++ and Microsoft<sup>®</sup> .NET™ clients to an Apache Geode cluster.
+The Apache Geode Native Client is a library that provides access for C++ and Microsoft<sup>®</sup> .NET™ Framework clients to an Apache Geode cluster.
 
 See the API docs for API details:
 
-  - [C++ API docs](https://geode.apache.org/releases/latest/cppdocs/hierarchy.html)
-  - [.NET API docs](https://geode.apache.org/releases/latest/dotnetdocs/hierarchy.html)
+  - [C++ API docs](/<%=vars.cppapiref_version%>/hierarchy.html)
+  - [.NET Framework API docs](/<%=vars.dotnetapiref_version%>/hierarchy.html)
 
 See the [_<%=vars.product_name_long%> User Guide_](<%=vars.serverman%>/about_<%=vars.product_name.downcase%>.html) for information regarding the server.
 
diff --git a/docs/geode-native-docs-dotnet/client-cache-ref.html.md.erb b/docs/geode-native-docs-dotnet/client-cache-ref.html.md.erb
index 35bcbbd..bfa74c8 100644
--- a/docs/geode-native-docs-dotnet/client-cache-ref.html.md.erb
+++ b/docs/geode-native-docs-dotnet/client-cache-ref.html.md.erb
@@ -40,8 +40,8 @@
 specified in the XML file.
 
 The declarative XML file is used to externalize the configuration of the client cache.
-The contents of the XML file correspond to APIs found in the`apache::geode::client` package for C++ applications,
-and the `Apache::Geode::Client` package for .NET applications.
+The contents of the XML file correspond to APIs found in the `apache::geode::client` package for C++ applications,
+and the `Apache::Geode::Client` package for .NET Framework applications.
 
 Elements are defined in the Client Cache XSD file, named `cpp-cache-1.0.xsd`, which you can find in
 your native client distribution in the `xsds` directory, and online at
diff --git a/docs/geode-native-docs-dotnet/configuring/config-client-cache.html.md.erb b/docs/geode-native-docs-dotnet/configuring/config-client-cache.html.md.erb
index a07cb11..a8a735c 100644
--- a/docs/geode-native-docs-dotnet/configuring/config-client-cache.html.md.erb
+++ b/docs/geode-native-docs-dotnet/configuring/config-client-cache.html.md.erb
@@ -32,5 +32,5 @@
 instances of `Region` and `RegionEntry`.
 
 For more information specific to your client programming language, see the
-[.NET Client API](<%=vars.dotnetapiref%>/hierarchy.html).
+[.NET Framework Client API](<%=vars.dotnetapiref%>/hierarchy.html).
 
diff --git a/docs/geode-native-docs-dotnet/configuring/sysprops.html.md.erb b/docs/geode-native-docs-dotnet/configuring/sysprops.html.md.erb
index aba2185..0e20b41 100644
--- a/docs/geode-native-docs-dotnet/configuring/sysprops.html.md.erb
+++ b/docs/geode-native-docs-dotnet/configuring/sysprops.html.md.erb
@@ -20,7 +20,7 @@
 -->
 
 A variety of system properties can be specified when a client connects to a distributed system, either programmatically or in a `geode.properties` file.
-See `Apache::Geode::Client::SystemProperties` in the [.NET API docs](<%=vars.dotnetapiref%>/hierarchy.html).
+See `Apache::Geode::Client::SystemProperties` in the [.NET Framework API documentation](<%=vars.dotnetapiref%>/hierarchy.html).
 
 The following settings can be configured:
 
diff --git a/docs/geode-native-docs-dotnet/continuous-queries.html.md.erb b/docs/geode-native-docs-dotnet/continuous-queries.html.md.erb
index f7f1afc..a471c41 100644
--- a/docs/geode-native-docs-dotnet/continuous-queries.html.md.erb
+++ b/docs/geode-native-docs-dotnet/continuous-queries.html.md.erb
@@ -19,7 +19,7 @@
 limitations under the License.
 -->
 
-The C++ and .NET clients can initiate queries that run on the <%=vars.product_name%> cache server
+The C++ and .NET Framework clients can initiate queries that run on the <%=vars.product_name%> cache server
 and notify the client when the query results have changed.  For details on the server-side setup for
 continuous queries, see [How Continuous Querying Works](<%=vars.serverman%>/developing/continuous_querying/how_continuous_querying_works.html) 
 in the *<%=vars.product_name%> User Guide*.
@@ -70,7 +70,7 @@
 1.  Iterate through the returned objects.
 1.  When finished, close down the continuous query.
 
-### <a id="DotNetCQExample"></a>.NET Continuous Query Example
+### <a id="DotNetCQExample"></a>.NET Framework Continuous Query Example
 
 These C# code excerpts are from the `examples\dotnet\continuousquery` example included in your client
 distribution. See the example for full context.
diff --git a/docs/geode-native-docs-dotnet/function-execution.html.md.erb b/docs/geode-native-docs-dotnet/function-execution.html.md.erb
index 8c40e9f..95ebfe0 100644
--- a/docs/geode-native-docs-dotnet/function-execution.html.md.erb
+++ b/docs/geode-native-docs-dotnet/function-execution.html.md.erb
@@ -97,13 +97,13 @@
 - invokes the object's execute method to invoke the server-side function
 
 If the client expects results, it must create a result object.
-The .NET example uses a built-in result collector (`IResultCollector.GetResults()`) to retrieve the function results.
+The .NET Framework example uses a built-in result collector (`IResultCollector.GetResults()`) to retrieve the function results.
 
-### <a id="nc-fe-dotnet_example"></a>.NET Example
-This section contains code snippets showing highlights of the .NET function execution example. They are not intended for cut-and-paste execution.
+### <a id="nc-fe-dotnet_example"></a>.NET Framework Example
+This section contains code snippets showing highlights of the .NET Framework function execution example. They are not intended for cut-and-paste execution.
 For the complete source, see the example source directory.
 
-The .NET example creates a cache, then uses it to create a connection pool.
+The .NET Framework example creates a cache, then uses it to create a connection pool.
 
 ```csharp
    var cacheFactory = new CacheFactory()
diff --git a/docs/geode-native-docs-dotnet/getting-started/app-dev-walkthrough-dotnet.html.md.erb b/docs/geode-native-docs-dotnet/getting-started/app-dev-walkthrough-dotnet.html.md.erb
index 5245ac0..ab44aec 100644
--- a/docs/geode-native-docs-dotnet/getting-started/app-dev-walkthrough-dotnet.html.md.erb
+++ b/docs/geode-native-docs-dotnet/getting-started/app-dev-walkthrough-dotnet.html.md.erb
@@ -1,5 +1,5 @@
 ---
-title:  .NET Application Development Walkthrough
+title:  .NET Framework Application Development Walkthrough
 ---
 
 
@@ -20,7 +20,7 @@
 limitations under the License.
 -->
 
-This section describes how to set up a .NET native client development environment using C# and CMake.
+This section describes how to set up a .NET Framework native client development environment using C# and CMake.
 
 ## <a id="prerequisites_dotnet"></a>Prerequisites
 This walkthrough assumes that certain components are in place:
@@ -33,9 +33,9 @@
 
 - **Geode**: Install and configure Geode. See the [_Geode User's Guide_](http://geode.apache.org/docs/) for instructions and system requirements.
 
-- **Visual Studio 2015** or higher and **.NET 4.5.2**.
+- **Visual Studio 2015** or higher and **.NET Framework 4.5.2**.
 
-To develop a Native Client application using .NET and CMake:
+To develop a Native Client application using .NET Framework and CMake:
 
   - Create a project directory structure
   - Populate the project directories with C# source code
@@ -104,7 +104,7 @@
 Combined, the above elements comprise the following CMakeLists.txt:
 
 ```
-# CMakeLists.txt for .NET Native Client App
+# CMakeLists.txt for .NET Framework Native Client App
 cmake_minimum_required(VERSION 3.10)
 
 project(MyProject LANGUAGES CSharp)
@@ -139,7 +139,7 @@
     $ cmake ..
     ```
 
-This creates a Visual Studio solution for your .NET application. For example, `MyProject.sln`.
+This creates a Visual Studio solution for your .NET Framework application. For example, `MyProject.sln`.
 
 ## <a id="building_and_running_dotnet"></a>Building and Running the App
 
diff --git a/docs/geode-native-docs-dotnet/getting-started/getting-started-nc-client.html.md.erb b/docs/geode-native-docs-dotnet/getting-started/getting-started-nc-client.html.md.erb
index a322e00..cc04bdc 100644
--- a/docs/geode-native-docs-dotnet/getting-started/getting-started-nc-client.html.md.erb
+++ b/docs/geode-native-docs-dotnet/getting-started/getting-started-nc-client.html.md.erb
@@ -57,7 +57,7 @@
 
 Once the connection pool and the shared region are in place, your client application is ready to share data with the server.
 
-**Server Connection: .NET Example**
+**Server Connection: .NET Framework Example**
 
 Create a cache and set its characteristics:
 
@@ -91,7 +91,7 @@
 
 ### <a id="app_dev_walkthroughs"></a>Application Development Walkthrough
 
-The [.NET App Development Walkthrough](app-dev-walkthrough-dotnet.html) describes how to set up a native client development environment using CMake.
+The [.NET Framework App Development Walkthrough](app-dev-walkthrough-dotnet.html) describes how to set up a native client development environment using CMake.
 
 ## <a id="programming_examples"></a>Programming Examples
 
diff --git a/docs/geode-native-docs-dotnet/getting-started/put-get-example.html.md.erb b/docs/geode-native-docs-dotnet/getting-started/put-get-example.html.md.erb
index 30dc2a7..fa08e7f 100644
--- a/docs/geode-native-docs-dotnet/getting-started/put-get-example.html.md.erb
+++ b/docs/geode-native-docs-dotnet/getting-started/put-get-example.html.md.erb
@@ -19,9 +19,9 @@
 limitations under the License.
 -->
 
-The native client release contains an example written for .NET showing how a client application
-can establish a connection to a cluster and then use that connection to perform basic operations on a remote server. 
-The example is located in `../examples/dotnet/putgetremove`. 
+The native client release contains an example written for .NET Framework showing how a client
+application can establish a connection to a cluster and then use that connection to perform basic
+operations on a remote server. The example is located in `../examples/dotnet/putgetremove`. 
 
 The example performs a sequence of operations, displaying simple log entries as they run.
 
@@ -40,10 +40,11 @@
 
 ## <a id="put-get-remove-example-code"></a>Put/Get/Remove Example Code
 
-This section contains code snippets showing highlights of the .NET put/get/remove example. They are not intended for cut-and-paste execution.
+This section contains code snippets showing highlights of the .NET Framework put/get/remove
+example. They are not intended for cut-and-paste execution.
 For the complete source, see the example source directory.
 
-The .NET example creates a cache, then uses it to create a connection pool and a region object (of class `IRegion`).
+The .NET Framework example creates a cache, then uses it to create a connection pool and a region object (of class `IRegion`).
 
 ```csharp
   var cache = new CacheFactory()
diff --git a/docs/geode-native-docs-dotnet/preserving-data/config-durable-reconnect.html.md.erb b/docs/geode-native-docs-dotnet/preserving-data/config-durable-reconnect.html.md.erb
index 2f6815e..d47b0e1 100644
--- a/docs/geode-native-docs-dotnet/preserving-data/config-durable-reconnect.html.md.erb
+++ b/docs/geode-native-docs-dotnet/preserving-data/config-durable-reconnect.html.md.erb
@@ -21,7 +21,7 @@
 
 You can configure a durable client to obtain an approximate count of pending events upon durable client reconnection. Based on the returned number, you can determine whether to proceed and receive the pending events or to close the cache.
 
-Use the `getPendingEventCount` (C++ API) and the `PendingEventCount` (.NET API) property to detect whether the previously registered subscription queue is available upon durable client reconnection and the count of pending events in the queue. Based on the returned results, you can then decide whether to receive the remaining events or close the cache if the number is too large.
+Use the `getPendingEventCount` (C++ API) and the `PendingEventCount` (.NET Framework API) property to detect whether the previously registered subscription queue is available upon durable client reconnection and the count of pending events in the queue. Based on the returned results, you can then decide whether to receive the remaining events or close the cache if the number is too large.
 
 For example, consider this code fragment for a client with only the default pool created:
 
diff --git a/docs/geode-native-docs-dotnet/preserving-data/using-queue-conflation.html.md.erb b/docs/geode-native-docs-dotnet/preserving-data/using-queue-conflation.html.md.erb
index 90601bc..8855f44 100644
--- a/docs/geode-native-docs-dotnet/preserving-data/using-queue-conflation.html.md.erb
+++ b/docs/geode-native-docs-dotnet/preserving-data/using-queue-conflation.html.md.erb
@@ -23,7 +23,7 @@
 
 Conflation is enabled for a cache server region, so all clients receiving updates for a particular region benefit from the conflation. To enable conflation, set the cache server’s `enable-subscription-conflation` region attribute to `true`. This region attribute is `false` by default.
 
-The queue managment code conflates entry updates as part of the enqueue operation. If the previous enqueued item for that key is also an `update` operation, the queue management code removes that previously enqueued update, leaving only the latest update to be sent when event distribution occurs. For high availability, conflation also occurs for any secondary queues.
+The queue management code conflates entry updates as part of the enqueue operation. If the previous enqueued item for that key is also an `update` operation, the queue management code removes that previously enqueued update, leaving only the latest update to be sent when event distribution occurs. For high availability, conflation also occurs for any secondary queues.
 
 Only entry `update` messages in a cache server region with `distributed-no-ack` scope are conflated. Region operations and entry operations other than updates are not conflated.
 
diff --git a/docs/geode-native-docs-dotnet/regions/regions.html.md.erb b/docs/geode-native-docs-dotnet/regions/regions.html.md.erb
index 5ea0b8f..63152e2 100644
--- a/docs/geode-native-docs-dotnet/regions/regions.html.md.erb
+++ b/docs/geode-native-docs-dotnet/regions/regions.html.md.erb
@@ -42,7 +42,7 @@
 1. Use the cache to instantiate a `RegionFactory` and use it to create a region, specifying any desired attributes
 and an association with the connection pool.
 
-### .NET C# Region Creation Example
+### .NET Framework C# Region Creation Example
 
 This example illustrates how to create two regions with different characteristics using C#:
 
diff --git a/docs/geode-native-docs-dotnet/regions/registering-interest-for-entries.html.md.erb b/docs/geode-native-docs-dotnet/regions/registering-interest-for-entries.html.md.erb
index d410874..a6d0dbb 100644
--- a/docs/geode-native-docs-dotnet/regions/registering-interest-for-entries.html.md.erb
+++ b/docs/geode-native-docs-dotnet/regions/registering-interest-for-entries.html.md.erb
@@ -28,7 +28,7 @@
 
 ## <a id="registering-interest-for-entries__section_C9A3D7F193B24ACD83B2D67813E596A0" class="no-quick-link"></a>Client API for Registering Interest
 
-You register client interest through the .NET API. The .NET API provides the `RegisterKeys`, `RegisterAllKeys`, and `RegisterRegex` methods, with corresponding unregistration accomplished using the `UnregisterKeys`, `UnregisterAllKeys`, and `UnregisterRegex` methods.
+You register client interest through the .NET Framework API. The .NET Framework API provides the `RegisterKeys`, `RegisterAllKeys`, and `RegisterRegex` methods, with corresponding unregistration accomplished using the `UnregisterKeys`, `UnregisterAllKeys`, and `UnregisterRegex` methods.
 
 The `RegisterKeys`, `RegisterRegex` and `RegisterAllKeys` methods have the option to populate the cache with the registration results from the server. The `RegisterRegex` and `RegisterAllKeys` methods can also optionally return the current list of keys registered on the server.
 
diff --git a/docs/geode-native-docs-dotnet/remote-queries.html.md.erb b/docs/geode-native-docs-dotnet/remote-queries.html.md.erb
index a918d73..131c9c4 100644
--- a/docs/geode-native-docs-dotnet/remote-queries.html.md.erb
+++ b/docs/geode-native-docs-dotnet/remote-queries.html.md.erb
@@ -76,7 +76,7 @@
    remotely evaluates the query string and returns the results to the client.
 1.  Iterate through the returned objects.
 
-### <a id="DotNetQueryExample"></a>.NET Query Example
+### <a id="DotNetQueryExample"></a>.NET Framework Query Example
 
 These C# code excerpts are from the `examples\dotnet\remotequery` example included in your client
 distribution. See the example for full context.
diff --git a/docs/geode-native-docs-dotnet/security/authentication.html.md.erb b/docs/geode-native-docs-dotnet/security/authentication.html.md.erb
index 77644e1..85dadfd 100644
--- a/docs/geode-native-docs-dotnet/security/authentication.html.md.erb
+++ b/docs/geode-native-docs-dotnet/security/authentication.html.md.erb
@@ -25,7 +25,7 @@
 In your application, authentication credentials must be set when creating the cache. In practice,
 this means setting the authentication credentials when you create the CacheFactory.
 
-### .NET Authentication Example
+### .NET Framework Authentication Example
 
 In this C# authentication example, the `CacheFactory` creation process sets the authentication callback:
 
diff --git a/docs/geode-native-docs-dotnet/serialization/data-serialization.html.md.erb b/docs/geode-native-docs-dotnet/serialization/data-serialization.html.md.erb
index cf9bdb1..7c13c77 100644
--- a/docs/geode-native-docs-dotnet/serialization/data-serialization.html.md.erb
+++ b/docs/geode-native-docs-dotnet/serialization/data-serialization.html.md.erb
@@ -20,15 +20,16 @@
 -->
 
 Data in your client application's <%=vars.product_name%> cache must be serializable to be shared
-with <%=vars.product_name%> servers and other <%=vars.product_name%> clients.  Built-in .NET types
-are serialized automatically into the cache and can be retrieved by Java servers and other
-<%=vars.product_name%> clients.
+with <%=vars.product_name%> servers and other <%=vars.product_name%> clients. Built-in .NET
+Framework types are serialized automatically into the cache and can be retrieved by Java servers
+and other <%=vars.product_name%> clients.
 
-For domain objects that are not simple types, <%=vars.product_name%> provides multiple serialization options
-for storage and transmittal between processes, of which [**<%=vars.product_name%> Portable Data eXchange (PDX) serialization**](dotnet-serialization/dotnet-pdx-serialization.html) offers
-the best combination of versatility and ease-of-use for most applications.
+For domain objects that are not simple types, <%=vars.product_name%> provides multiple
+serialization options for storage and transmittal between processes, of which
+[**<%=vars.product_name%> Portable Data eXchange (PDX) serialization**](dotnet-serialization/dotnet-pdx-serialization.html) offers the best combination of
+versatility and ease-of-use for most applications.
 
-Many .NET clients can take advantage of **PDX reflection-based autoserialization**.
+Many .NET Framework clients can take advantage of **PDX reflection-based autoserialization**.
 
 To learn more about other serialization options, see the [Data Serialization section in the
 _<%=vars.product_name_long%> User
diff --git a/docs/geode-native-docs-dotnet/serialization/dotnet-serialization/dotnet-pdx-autoserializer.html.md.erb b/docs/geode-native-docs-dotnet/serialization/dotnet-serialization/dotnet-pdx-autoserializer.html.md.erb
index 67fee7f..a181009 100644
--- a/docs/geode-native-docs-dotnet/serialization/dotnet-serialization/dotnet-pdx-autoserializer.html.md.erb
+++ b/docs/geode-native-docs-dotnet/serialization/dotnet-serialization/dotnet-pdx-autoserializer.html.md.erb
@@ -17,8 +17,9 @@
 limitations under the License.
 -->
 
-It's extremely easy for .NET applications to store and retrieve data from Geode. All that's required
-is a single line of code to set the `PdxSerializer` to the .NET client's `ReflectionBasedAutoSerializer`:
+It's extremely easy for .NET Framework applications to store and retrieve data from Geode. All
+that's required is a single line of code to set the `PdxSerializer` to the .NET Framework client's
+`ReflectionBasedAutoSerializer`:
 
 ```csharp
 cache.TypeRegistry.PdxSerializer = new ReflectionBasedAutoSerializer();
@@ -34,30 +35,31 @@
 region.Put(key, value);
 ```
     
-The .NET client's `ReflectionBasedAutoSerializer` supports the full list of .NET primitives and other common
-built-in types.
+The .NET Framework client's `ReflectionBasedAutoSerializer` supports the full list of .NET
+Framework primitives and other common built-in types.
 
 Types without a no-arg constructor are not supported by the `ReflectionBasedAutoSerializer`. This
 includes all user defined structs. `System.Data.Datatable` is an example of a system class that is not
 supported due to lack of a no-arg constructor.
 
-## <a id="auto-ser-java-interop"></a>Java Interoperability with .NET Specific Types
+## <a id="auto-ser-java-interop"></a>Java Interoperability with .NET Framework Specific Types
 
 Java does not have unsigned data types or exact equivalents of `Guid` and `Decimal`. Care should be
-taken when passing these types between .NET and Java applications using the .NET
-`ReflectionBasedAutoSerializer`. For example, if storing `UInt16` data (that is, 16-bit unsigned values),
-be aware that values greater than `UInt16.MaxValue/2 - 1` will show up as negative numbers in
-Java. Using that data in a Java application may have unexpected behavior. If you expect to exceed
+taken when passing these types between .NET Framework and Java applications using the .NET
+Framework `ReflectionBasedAutoSerializer`. For example, if storing `UInt16` data (that is, 16-bit
+unsigned values), be aware that values greater than `UInt16.MaxValue/2 - 1` will show up as
+negative numbers in Java.
+Using that data in a Java application may have unexpected behavior. If you expect to exceed
 half the range for the given type (`Byte.MaxValue/2`, `UInt16.MaxValue/2`, `UInt32.MaxValue/2`, or
 `UInt64.MaxValue/2`) you should use the next larger type. This obviously breaks down for
-`UInt64`, which has no next larger type. However, if your range exceeds `UIn64.MaxValue/2`, you likely
-have a much more complex set of issues to deal with, such as heavy paging due to such a large data
-set.
+`UInt64`, which has no next larger type. However, if your range exceeds `UIn64.MaxValue/2`, you
+likely have a much more complex set of issues to deal with, such as heavy paging due to such a
+large data set.
 
-## <a id="auto-ser-remote-queries"></a>Remote Queries of .NET Only Types
+## <a id="auto-ser-remote-queries"></a>Remote Queries of .NET Framework Only Types
 
-At this time the .NET Client does not support queries against user classes that have been stored on
-the server using the `ReflectionBasedAutoSerializer`.
+At this time the .NET Framework Client does not support queries against user classes that have been
+stored on the server using the `ReflectionBasedAutoSerializer`.
 
 When you register the reflection-based serializer, <%=vars.product_name%> uses it to serialize all
 objects that do not implement `IPdxSerializable`. You can customize the
@@ -87,7 +89,7 @@
 [PdxIdentityField] private int id;
 ```
 
-To exclude a field from serialization, add the .NET attribute `NonSerialized` to the field.
+To exclude a field from serialization, add the .NET Framework attribute `NonSerialized` to the field.
 
 For example:
 
@@ -97,7 +99,7 @@
 
 For each domain class <%=vars.product_name%> serializes using the autoserializer, all fields are
 considered for serialization except those defined as `static`, `literal` or `readonly` and those you
-explicitly exclude using the .NET `NonSerialized` attribute.
+explicitly exclude using the .NET Framework `NonSerialized` attribute.
 
 This example code demonstrates how to extend the autoserializer to customize serialization.
 
diff --git a/docs/geode-native-docs-dotnet/serialization/dotnet-serialization/dotnet-pdx-serialization.html.md.erb b/docs/geode-native-docs-dotnet/serialization/dotnet-serialization/dotnet-pdx-serialization.html.md.erb
index 05d8be3..c2468ac 100644
--- a/docs/geode-native-docs-dotnet/serialization/dotnet-serialization/dotnet-pdx-serialization.html.md.erb
+++ b/docs/geode-native-docs-dotnet/serialization/dotnet-serialization/dotnet-pdx-serialization.html.md.erb
@@ -19,7 +19,7 @@
 
 <%=vars.product_name%>'s Portable Data eXchange (PDX) is a cross-language data format that can reduce the cost of distributing and serializing your objects.
 
-<%=vars.product_name%> .NET PDX serialization:
+<%=vars.product_name%> .NET Framework PDX serialization:
 
 - Is <a href="#pdx-ser-portability">interoperable with other languages by <%=vars.product_name%></a> -- no need to program a Java-side implementation
 
@@ -30,9 +30,11 @@
 
 - <a href="#pdx-ser-delta-prop">Works with <%=vars.product_name%> delta propagation</a>
 
-The simplest option is to use [automatic serialization](dotnet-pdx-autoserializer.html) by registering the <%=vars.product_name%> .NET
-PDX reflection-based autoserializer in your application. When you have an autoserializer,
-<%=vars.product_name%> uses it for all domain objects that are not separately treated under the IPDXSerializable interface.
+The simplest option is to use [automatic serialization](dotnet-pdx-autoserializer.html) by
+registering the <%=vars.product_name%> .NET Framework PDX reflection-based autoserializer in your
+application. When you have an autoserializer,
+<%=vars.product_name%> uses it for all domain objects that are not separately treated under the
+IPDXSerializable interface.
 
 For greater control, you can specify individual treatment for domain objects using the `IPdxSerializable` interface.
 Objects derived from the `IPdxSerializable` interface are not subject to autoserialization.
@@ -43,21 +45,23 @@
 information in a central registry. The information is passed between peers, between clients and
 servers, and between distributed systems.
 
-This offers a notable advantage to the .NET client, which shares data with Java cache
-servers. When using PDX serialization, clients automatically pass registry information to servers when they store an
-`IPdxSerializable` object. Clients can run queries and functions against the data in the servers
-without the servers needing to know anything about the stored objects. One client can store data on
-the server to be retrieved by another client, with the server never needing to know the object
-type. This means you can code your .NET clients to manage data using Java servers without having to
-create Java implementations of your .NET domain objects.
+This offers a notable advantage to the .NET Framework client, which shares data with Java cache
+servers. When using PDX serialization, clients automatically pass registry information to servers
+when they store an `IPdxSerializable` object. Clients can run queries and functions against the
+data in the servers without the servers needing to know anything about the stored objects. One
+client can store data on the server to be retrieved by another client, with the server never
+needing to know the object type. This means you can code your .NET Framework clients to manage data
+using Java servers without having to create Java implementations of your .NET Framework domain
+objects.
 
 ## <a id="pdx-ser-reduced-deserialization"></a>Reduced Deserialization of Serialized Objects
 
 The access methods for `IPdxSerializable` objects allow you to examine specific fields of your
 domain object without deserializing the entire object. This can reduce 
-deserialization costs significantly. Client .NET apps can run queries and execute functions against
-the objects in the server caches without deserializing the entire object on the server side. The
-query engine automatically recognizes PDX objects and uses only the fields it needs.
+deserialization costs significantly. Client .NET Framework apps can run queries and execute
+functions against the objects in the server caches without deserializing the entire object on the
+server side. The query engine automatically recognizes PDX objects and uses only the fields it
+needs.
 
 Clients can execute Java functions on server data that only access parts of the domain objects by using `PdxInstance.`
 
diff --git a/docs/geode-native-docs-dotnet/serialization/dotnet-serialization/pdx-serializable-examples.html.md.erb b/docs/geode-native-docs-dotnet/serialization/dotnet-serialization/pdx-serializable-examples.html.md.erb
index 1b09788..bb180ba 100644
--- a/docs/geode-native-docs-dotnet/serialization/dotnet-serialization/pdx-serializable-examples.html.md.erb
+++ b/docs/geode-native-docs-dotnet/serialization/dotnet-serialization/pdx-serializable-examples.html.md.erb
@@ -19,8 +19,8 @@
 limitations under the License.
 -->
 
-The native client release contain an example showing how a client application
-can register for serialization of domain objects using the .NET IPdxSerializable interface.
+The native client release contain an example showing how a client application can register for
+serialization of domain objects using the .NET Framework IPdxSerializable interface.
 
 The example is located in `examples\dotnet\pdxserializable`.
 
@@ -48,12 +48,12 @@
 
 
 <a id="pdsxbl_dotnet_example"></a>
-## .NET Example
+## .NET Framework Example
 
-This section contains code snippets showing highlights of the .NET PdxSerializable example. They are not intended for cut-and-paste execution.
+This section contains code snippets showing highlights of the .NET Framework PdxSerializable example. They are not intended for cut-and-paste execution.
 For the complete source, see the example source directory.
 
-The .NET example defines a PdxSerializable class called `Order` that inherits from the `IPdxSerializable` interface.
+The .NET Framework example defines a PdxSerializable class called `Order` that inherits from the `IPdxSerializable` interface.
 An `Order` object contains three fields:
 
 - an integer `order_id`
@@ -102,7 +102,7 @@
     }
 ```
 
-The .NET example mainline creates a cache, then uses it to register the PdxSerializable class that was created in Orders.cs:
+The .NET Framework example mainline creates a cache, then uses it to register the PdxSerializable class that was created in Orders.cs:
 
 ```csharp
 var cache = new CacheFactory()
diff --git a/docs/geode-native-docs-dotnet/serialization/dotnet-serialization/serialize-using-ipdxserializable.html.md.erb b/docs/geode-native-docs-dotnet/serialization/dotnet-serialization/serialize-using-ipdxserializable.html.md.erb
index 856bd28..ee8a523 100644
--- a/docs/geode-native-docs-dotnet/serialization/dotnet-serialization/serialize-using-ipdxserializable.html.md.erb
+++ b/docs/geode-native-docs-dotnet/serialization/dotnet-serialization/serialize-using-ipdxserializable.html.md.erb
@@ -38,7 +38,7 @@
     If you also use PDX serialization in Java for the object, serialize the object in the same way for each language. Serialize the same fields in the same order and mark the same identify fields.
 
 3.  Program the `IPdxSerializable ToData` function to serialize your object as required by your application.
-    1.  Write your domain class's standard .NET data fields using the `IPdxWriter` write methods. <%=vars.product_name%> automatically provides `IPdxWriter` to the `ToData` function for `IPdxSerializable` objects.
+    1.  Write your domain class's standard .NET Framework data fields using the `IPdxWriter` write methods. <%=vars.product_name%> automatically provides `IPdxWriter` to the `ToData` function for `IPdxSerializable` objects.
     2.  Call the `ToData MarkIdentifyField` function for each field <%=vars.product_name%> should use to identify your object. This is used to compare objects for operations like `DISTINCT` queries. The `MarkIdentifyField` call must come after the associated field write methods.
 
         Example:
diff --git a/docs/geode-native-docs-dotnet/transactions.html.md.erb b/docs/geode-native-docs-dotnet/transactions.html.md.erb
index f97feeb..182f1d6 100644
--- a/docs/geode-native-docs-dotnet/transactions.html.md.erb
+++ b/docs/geode-native-docs-dotnet/transactions.html.md.erb
@@ -29,7 +29,7 @@
 The API for distributed transactions has the familiar relational database methods, `Begin`,
 `Commit`, and `Rollback`. There are also APIs available to suspend and resume transactions.
 
-The .NET classes for executing transactions are:
+The .NET Framework classes for executing transactions are:
 
 -   `Apache.Geode.Client.CacheTransactionManager`
 -   `Apache.Geode.Client.TransactionId`
@@ -80,12 +80,12 @@
   - In case the transaction repeatedly fails, the retry loop uses a counter to set a limit of 5 retries.
 
 
-### <a id="dotnet-example"></a>.NET Example
+### <a id="dotnet-example"></a>.NET Framework Example
 
-This section contains code snippets showing highlights of the .NET transaction example. They are not intended for cut-and-paste execution.
+This section contains code snippets showing highlights of the .NET Framework transaction example. They are not intended for cut-and-paste execution.
 For the complete source, see the example source directory.
 
-The .NET example creates a cache, then uses it to create a connection pool.
+The .NET Framework example creates a cache, then uses it to create a connection pool.
 
 ```csharp
   var cache = new CacheFactory()
diff --git a/docs/manual-build/Dockerfile b/docs/manual-build/Dockerfile
deleted file mode 100644
index c062c64..0000000
--- a/docs/manual-build/Dockerfile
+++ /dev/null
@@ -1,37 +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.
-
-FROM ubuntu:latest
-
-RUN apt-get update
-RUN apt-get install -y curl git gnupg2
-RUN gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB || \
-    gpg2 --keyserver hkp://pgp.mit.edu --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB || \
-    gpg2 --keyserver hkp://ha.pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
-
-RUN \curl -sSL https://get.rvm.io | bash
-RUN /bin/bash -l -c "rvm requirements"
-RUN /bin/bash -l -c "rvm install 2.3.0"
-RUN /bin/bash -l -c "gem install bundler --no-document -v '=1.16.1'"
-
-RUN /bin/bash -l -c "cp /etc/hosts ~/hosts.new"
-RUN /bin/bash -l -c 'sed -i -E "s/(::1\s)localhost/\1/g" ~/hosts.new'
-
-RUN echo "alias rackup='rackup -o 0.0.0'" >> /etc/profile
-
-EXPOSE 9292
-
-ENTRYPOINT ["/bin/sh", "-c" , "cat ~/hosts.new > /etc/hosts && . /etc/profile && alias rackup='rackup -o 0.0.0.0' && /bin/bash -l" ]
diff --git a/docs/manual-build/README.md b/docs/manual-build/README.md
deleted file mode 100644
index f659110..0000000
--- a/docs/manual-build/README.md
+++ /dev/null
@@ -1,70 +0,0 @@
-# Apache Geode Native Client User Guides
-
-This document contains instructions for building and viewing the Apache Geode Native Client User Guides.
-
-## Bookbinder Usage
-
-Bookbinder is meant to be used from within a project called a **book**. The book includes a configuration file that describes which documentation repositories to use as source materials. Bookbinder provides a set of scripts to aggregate those repositories and publish them to various locations.
-
-For Geode Native Client, a preconfigured **book** is provided for each user guide (C++ and .NET) in the directories `_geode-native-project-dir_/docs/geode-native-book-cpp` and `_geode-native-project-dir_/docs/geode-native-book-dotnet`. Each book gathers content from the language-specific directory _geode-native-project-dir_/docs/geode-native-docs-cpp or geode-native-docs-dotnet. You can use this configuration to build an HTML version of the Apache Geode Native Client User Guides on your local system.
-
-<a name="docker-setup"></a>
-## Docker Setup
-
-For ease of use, a Docker image is provided that contains a self-consistent Bookbinder environment. [Install Docker](https://docs.docker.com/install/) if you have not already done so.
-
-<a name="building-the-documentation"></a>
-## Building the Documentation
-
-1. Navigate to the directory that contains the Dockerfile and run the `docker build` command to create the Bookbinder-enabled Docker image:
-
-    ```bash
-    $ cd geode-native/docs/manual-build
-    $ docker build -t geode-native-userman .
-    ```
-    
-1. Run the Docker image in interactive mode with a command similar to the following:
-
-    ```bash
-    $ docker run -it -p 9292:9292 -p 1234:1234 -v PATH-TO-GEODE-NATIVE/docs:/docs geode-native-userman
-    ```
-
-    where `PATH-TO-GEODE-NATIVE` is the fully-qualified path to the geode-native repo. This brings up the interactive Docker container, with `/` as your current working directory.
-
-1. To build the documentation, `cd` to the book directory:
-
-    For C++ guide:
-    
-    ```bash
-    $ cd docs/geode-native-book-cpp
-    ```
-
-    For .NET guide:
-    
-    ```bash
-    $ cd docs/geode-native-book-dotnet
-    ```
-
-1. Run `bundle install` to install the dependencies required to build the user guide.
-
-    ```bash
-    $ bundle install
-    ```
-
-1. Invoke bookbinder to build the user guide. Bookbinder converts the markdown source into HTML, which it puts in the `final_app` directory:
-
-    ```bash
-    $ bundle exec bookbinder bind local
-    ```
-
-1. To start a local website of the Apache Geode Native Client User Guide, navigate to the `final_app` directory and run `rackup`:
-
-    ```bash
-    $ cd final_app
-    $ rackup
-    ```
-
-    Note: You may be prompted to run `bundle install` to supply any missing components. Do that, then re-try the `rackup` command.
-
-   You can now view the local documentation in a browser at <http://localhost:9292>. 
-
diff --git a/examples/cmake/FindGeodeNative.cmake.in b/examples/cmake/FindGeodeNative.cmake.in
index 906fec0..8c7dc47 100644
--- a/examples/cmake/FindGeodeNative.cmake.in
+++ b/examples/cmake/FindGeodeNative.cmake.in
@@ -130,7 +130,6 @@
       IMPORTED_LOCATION "${@PRODUCT_NAME_NOSPACE@_CPP_LIBRARY}"
       INTERFACE_INCLUDE_DIRECTORIES "${@PRODUCT_NAME_NOSPACE@_CPP_INCLUDE_DIR}")
   endif()
-
   set(@PRODUCT_NAME_NOSPACE@_DOTNET_TARGET "@PRODUCT_NAME_NOSPACE@::dotnet")
   if(NOT TARGET ${@PRODUCT_NAME_NOSPACE@_DOTNET_TARGET})
     add_library(${@PRODUCT_NAME_NOSPACE@_DOTNET_TARGET} UNKNOWN IMPORTED)
diff --git a/examples/cpp/functionexecution/startserver.ps1 b/examples/cpp/functionexecution/startserver.ps1
index 255bab9..5c9042d 100644
--- a/examples/cpp/functionexecution/startserver.ps1
+++ b/examples/cpp/functionexecution/startserver.ps1
@@ -1,4 +1,4 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
+# 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
diff --git a/examples/cpp/functionexecution/stopserver.ps1 b/examples/cpp/functionexecution/stopserver.ps1
index 0b57682..13e5a55 100644
--- a/examples/cpp/functionexecution/stopserver.ps1
+++ b/examples/cpp/functionexecution/stopserver.ps1
@@ -1,4 +1,4 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
+# 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
diff --git a/examples/cpp/sslputget/CMakeLists.txt.in b/examples/cpp/sslputget/CMakeLists.txt.in
index d84fa79..1f160f9 100644
--- a/examples/cpp/sslputget/CMakeLists.txt.in
+++ b/examples/cpp/sslputget/CMakeLists.txt.in
@@ -20,7 +20,7 @@
 set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../../cmake)
 set(CMAKE_CXX_STANDARD 11)
 
-find_package(@PRODUCT_NAME_NOSPACE@ REQUIRED COMPONENTS cpp crypto)
+find_package(@PRODUCT_NAME_NOSPACE@ REQUIRED COMPONENTS cpp)
 
 add_executable(${PROJECT_NAME} main.cpp)
 
diff --git a/examples/cpp/sslputget/main.cpp b/examples/cpp/sslputget/main.cpp
index 7487a2d..5ed8b7f 100644
--- a/examples/cpp/sslputget/main.cpp
+++ b/examples/cpp/sslputget/main.cpp
@@ -29,9 +29,9 @@
 using apache::geode::client::RegionShortcut;
 
 void print_usage() {
-  printf("Usage: cpp-sslputget <<path>>\n");
-  printf("Where <<path>> is the absolute path to the location of your SSL "
-	"client keystore and truststore\n");
+  std::cout << "Usage: cpp-sslputget <<path>>\n";
+  std::cout << "Where <<path>> is the absolute path to the location of your "
+               "SSL client keystore and truststore\n";
 }
 
 int main(int argc, char** argv) {
@@ -42,24 +42,23 @@
 
   auto sslKeyPath = std::string(argv[1]);
 
-  auto cache =
-      CacheFactory()
-          .set("log-level", "none")
-          .set("ssl-enabled", "true")
-          .set("ssl-keystore",
+  auto cache = CacheFactory()
+                   .set("log-level", "none")
+                   .set("ssl-enabled", "true")
+                   .set("ssl-keystore",
 #ifdef WIN32
-               (sslKeyPath + "\\client_keystore.pem").c_str())
+                        (sslKeyPath + "\\client_keystore.pem").c_str())
 #else
-               (sslKeyPath + "/client_keystore.pem").c_str())
+                        (sslKeyPath + "/client_keystore.pem").c_str())
 #endif
-          .set("ssl-keystore-password", "apachegeode")
-          .set("ssl-truststore",
+                   .set("ssl-keystore-password", "apachegeode")
+                   .set("ssl-truststore",
 #ifdef WIN32
-               (sslKeyPath + "\\client_truststore.pem").c_str())
+                        (sslKeyPath + "\\client_truststore.pem").c_str())
 #else
-               (sslKeyPath + "/client_truststore.pem").c_str())
+                        (sslKeyPath + "/client_truststore.pem").c_str())
 #endif
-          .create();
+                   .create();
 
   const auto pool = cache.getPoolManager()
                         .createFactory()
diff --git a/examples/cpp/sslputget/startserver.ps1 b/examples/cpp/sslputget/startserver.ps1
index 5555d29..d6b1067 100644
--- a/examples/cpp/sslputget/startserver.ps1
+++ b/examples/cpp/sslputget/startserver.ps1
@@ -1,4 +1,4 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
+# 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
diff --git a/examples/cpp/sslputget/stopserver.ps1 b/examples/cpp/sslputget/stopserver.ps1
index fa6e59c..c8904ed 100644
--- a/examples/cpp/sslputget/stopserver.ps1
+++ b/examples/cpp/sslputget/stopserver.ps1
@@ -1,4 +1,4 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
+# 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
diff --git a/examples/dotnet/CMakeLists.txt b/examples/dotnet/CMakeLists.txt
index fba2374..11ef580 100644
--- a/examples/dotnet/CMakeLists.txt
+++ b/examples/dotnet/CMakeLists.txt
@@ -49,6 +49,9 @@
 add_example(NAME authinitialize
 	SOURCE ExampleAuthInitialize.cs Program.cs)
 
+add_example(NAME classaskey
+	SOURCE PhotosKey.cs PhotosValue.cs Program.cs)
+
 add_example(NAME continuousquery
 	SOURCE Order.cs MyCqListener.cs Program.cs)
 
diff --git a/examples/dotnet/CMakeLists.txt.dotnet_example.in b/examples/dotnet/CMakeLists.txt.dotnet_example.in
index 978a013..f845522 100644
--- a/examples/dotnet/CMakeLists.txt.dotnet_example.in
+++ b/examples/dotnet/CMakeLists.txt.dotnet_example.in
@@ -31,4 +31,4 @@
 
 set_target_properties(${PROJECT_NAME} PROPERTIES
     VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.5.2"
-    VS_DOTNET_REFERENCES "System;${@PRODUCT_NAME_NOSPACE@_DOTNET_LIBRARY}")
+    VS_DOTNET_REFERENCES "System;System.Drawing;${@PRODUCT_NAME_NOSPACE@_DOTNET_LIBRARY}")
diff --git a/examples/dotnet/CMakeLists.txt.in b/examples/dotnet/CMakeLists.txt.in
index 19935c2..69ec90d 100644
--- a/examples/dotnet/CMakeLists.txt.in
+++ b/examples/dotnet/CMakeLists.txt.in
@@ -18,6 +18,7 @@
 project(@PRODUCT_DLL_NAME@.DotNet.Examples LANGUAGES NONE)
 
 add_subdirectory(authinitialize)
+add_subdirectory(classaskey)
 add_subdirectory(continuousquery)
 add_subdirectory(dataserializable)
 add_subdirectory(functionexecution)
diff --git a/examples/dotnet/classaskey/CMakeLists.txt b/examples/dotnet/classaskey/CMakeLists.txt
new file mode 100644
index 0000000..87365ed
--- /dev/null
+++ b/examples/dotnet/classaskey/CMakeLists.txt
@@ -0,0 +1,34 @@
+# 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.
+
+cmake_minimum_required(VERSION 3.10)
+
+project(dotnet-classaskey LANGUAGES CSharp)
+
+set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../../cmake)
+
+find_package(GeodeNative REQUIRED COMPONENTS dotnet)
+
+add_executable(${PROJECT_NAME} PhotosKey.cs;PhotosValue.cs;Program.cs)
+
+configure_file("startserver.ps1" ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
+configure_file("stopserver.ps1" ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
+
+target_link_libraries(${PROJECT_NAME}
+    GeodeNative::dotnet)
+
+set_target_properties(${PROJECT_NAME} PROPERTIES
+    VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.5.2"
+    VS_DOTNET_REFERENCES "System;System.Drawing;${GeodeNative_DOTNET_LIBRARY}")
diff --git a/examples/dotnet/classaskey/PhotosKey.cs b/examples/dotnet/classaskey/PhotosKey.cs
new file mode 100644
index 0000000..f94c4ef
--- /dev/null
+++ b/examples/dotnet/classaskey/PhotosKey.cs
@@ -0,0 +1,110 @@
+/*
+* 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.
+*/
+using Apache.Geode.Client;
+using System;
+using System.Collections.Generic;
+
+namespace Apache.Geode.Examples.ClassAsKey
+{
+  public class PhotosKey : IDataSerializable, ICacheableKey
+  {
+    public List<String> people;
+    public DateTime rangeStart;
+    public DateTime rangeEnd;
+
+    // A default constructor is required for deserialization
+    public PhotosKey() { }
+
+    public PhotosKey(List<String> names, DateTime start, DateTime end)
+    {
+      people = names;
+
+      // Geode server defaults to Utc to ensure hashes match between client and
+      // server
+      TimeZone tz = TimeZone.CurrentTimeZone;
+      rangeStart = tz.ToUniversalTime(start);
+      rangeEnd = tz.ToUniversalTime(end);
+    }
+
+    public override string ToString()
+    {
+      string result = "{";
+      for (int i = 0; i < people.Count; i++)
+      {
+        result += people[i];
+        if (i<people.Count-1)
+          result += ", ";
+      }
+      result += "} from ";
+      return result + rangeStart.ToString() + " to " +
+        rangeEnd.ToString();
+    }
+
+    public void ToData(DataOutput output)
+    {
+      output.WriteObject(people);
+      output.WriteDate(rangeStart);
+      output.WriteDate(rangeEnd);
+    }
+
+    public void FromData(DataInput input)
+    {
+      people = (List<String>)input.ReadObject();
+      rangeStart = (DateTime)input.ReadDate();
+      rangeEnd = (DateTime)input.ReadDate();
+    }
+
+    public ulong ObjectSize
+    {
+      get { return 0; }
+    }
+
+    public bool Equals(ICacheableKey other)
+    {
+      return Equals((object)other);
+    }
+
+    public override bool Equals(object obj)
+    {
+      if (this == obj)
+      {
+        return true;
+      }
+
+      if (GetType() != obj.GetType())
+      {
+        return false;
+      }
+
+      PhotosKey otherKey = (PhotosKey)obj;
+      return (people == otherKey.people &&
+        rangeStart == otherKey.rangeStart &&
+        rangeEnd == otherKey.rangeEnd);
+    }
+
+    public override int GetHashCode()
+    {
+      return Objects.Hash(people, rangeStart, rangeEnd);
+    }
+
+    public static ISerializable CreateDeserializable()
+    {
+      return new PhotosKey();
+    }
+  }
+}
+
diff --git a/examples/dotnet/classaskey/PhotosValue.cs b/examples/dotnet/classaskey/PhotosValue.cs
new file mode 100644
index 0000000..db16d57
--- /dev/null
+++ b/examples/dotnet/classaskey/PhotosValue.cs
@@ -0,0 +1,121 @@
+/*
+* 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.
+*/
+using Apache.Geode.Client;
+using System;
+using System.Drawing;
+using System.Collections.Generic;
+
+namespace Apache.Geode.Examples.ClassAsKey
+{
+  public class PhotoMetaData : IDataSerializable
+  {
+    public int fullResId;
+    public Bitmap thumbnailImage;
+
+    public const int THUMB_WIDTH = 32;
+    public const int THUMB_HEIGHT = 32;
+
+    // A default constructor is required for deserialization
+    public PhotoMetaData() { }
+
+    public PhotoMetaData(int id, Bitmap thumb)
+    {
+      fullResId = id;
+      thumbnailImage = thumb;
+    }
+
+    public void ToData(DataOutput output)
+    {
+      output.WriteInt32(fullResId);
+
+      for (int i=0; i<thumbnailImage.Height; i++)
+      {
+        for (int j=0; j<thumbnailImage.Width; j++)
+        {
+          output.WriteInt32(thumbnailImage.GetPixel(i, j).ToArgb());
+        }
+      }
+    }
+
+    public void FromData(DataInput input)
+    {
+      fullResId = input.ReadInt32();
+
+      thumbnailImage = new Bitmap(THUMB_WIDTH, THUMB_HEIGHT);
+      for (int i = 0; i < thumbnailImage.Height; i++)
+      {
+        for (int j = 0; j < thumbnailImage.Width; j++)
+        {
+          thumbnailImage.SetPixel(i, j, Color.FromArgb(input.ReadInt32()));
+        }
+      }
+    }
+
+    public ulong ObjectSize
+    {
+      get { return 0; }
+    }
+
+    public static ISerializable CreateDeserializable()
+    {
+      return new PhotoMetaData();
+    }
+  }
+
+  public class PhotosValue : IDataSerializable
+  {
+    public List<PhotoMetaData> photosMeta;
+
+    // A default constructor is required for deserialization
+    public PhotosValue() { }
+
+    public PhotosValue(List<PhotoMetaData> metaData)
+    {
+      photosMeta = metaData;
+    }
+
+    public void ToData(DataOutput output)
+    {
+      output.WriteObject(photosMeta);
+    }
+
+    public void FromData(DataInput input)
+    {
+      photosMeta = new List<PhotoMetaData>();
+      var pmd = input.ReadObject() as IList<object>;
+      if (pmd != null)
+      {
+        foreach (var item in pmd)
+        {
+          photosMeta.Add((PhotoMetaData)item);
+        }
+      }
+    }
+
+    public ulong ObjectSize
+    {
+      get { return 0; }
+    }
+
+    public static ISerializable CreateDeserializable()
+    {
+      return new PhotosValue();
+    }
+  }
+}
+
+
diff --git a/examples/dotnet/classaskey/Program.cs b/examples/dotnet/classaskey/Program.cs
new file mode 100644
index 0000000..0352440
--- /dev/null
+++ b/examples/dotnet/classaskey/Program.cs
@@ -0,0 +1,202 @@
+/*
+* 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.
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using Apache.Geode.Client;
+
+namespace Apache.Geode.Examples.ClassAsKey
+{
+  public class Program
+  {
+    static Cache cache;
+    static Random rand;
+
+    public static void Main(string[] args)
+    {
+      const int MAXPHOTOKEYS = 10;
+      const int MAXPHOTOSPERKEY = 5;
+
+      IRegion<PhotosKey, PhotosValue> photosMetaData = CreateRegion();
+
+      Console.WriteLine("Populating the photos region\n");
+
+      PhotosKey[] keys = new PhotosKey[MAXPHOTOKEYS];
+      PhotosValue[] values = new PhotosValue[MAXPHOTOKEYS];
+
+      DateTime start;
+      DateTime end;
+
+      rand = new Random();
+      int numPhotos;
+      int photoId = 0;
+
+      for (int i=0; i<MAXPHOTOKEYS; i++)
+      {
+        ChooseDateRange(out start, out end);
+        keys[i] = new PhotosKey(ChoosePeople(), start, end);
+
+        numPhotos = rand.Next(0, MAXPHOTOSPERKEY+1);
+        List<PhotoMetaData> metaData = new List<PhotoMetaData>();
+        for (int j=0; j<numPhotos; j++)
+        {
+          PhotoMetaData meta = new PhotoMetaData();
+          meta.fullResId = photoId++;
+          meta.thumbnailImage = ChooseThumb();
+          metaData.Add(meta);
+        }
+        values[i] = new PhotosValue(metaData);
+
+        Console.WriteLine("Inserting " + numPhotos + " photos for key: " + keys[i].ToString() +
+          " with hashCode = " + Objects.Hash(keys[i].people, keys[i].rangeStart, keys[i].rangeEnd));
+
+        photosMetaData.Put(keys[i], values[i]);
+      }
+
+      // Verify the region was populated properly
+      photoId = 0;
+      Console.WriteLine();
+      for (int k = 0; k < MAXPHOTOKEYS; k++)
+      {
+        Console.WriteLine("Fetching photos for key: " + keys[k].ToString());
+
+        PhotosValue value = photosMetaData.Get(keys[k]);
+        PhotoMetaData meta;
+        for (int p = 0; p < value.photosMeta.Count; p++)
+        {
+          Console.WriteLine("   Fetching photo number " + p);
+
+          meta = value.photosMeta[p];
+          if (meta.fullResId != photoId)
+            Console.WriteLine("      ERROR: Expected fullResId = " + photoId + " but actual = " + meta.fullResId);
+
+          bool thumbValid = true;
+          for (int i=0; i<PhotoMetaData.THUMB_HEIGHT; i++)
+          {
+            for (int j=0; j<PhotoMetaData.THUMB_WIDTH; j++)
+            {
+              if (meta.thumbnailImage.GetPixel(i,j) != values[k].photosMeta[p].thumbnailImage.GetPixel(i,j))
+              {
+                Console.WriteLine("      ERROR: Unexpected thumb for photoId = " + photoId);
+                thumbValid = false;
+                break;
+              }
+            }
+
+            if (!thumbValid)
+              break;
+          }
+
+          photoId++;
+        }
+      }
+
+      cache.Close();
+      Console.ReadLine();
+    }
+
+    public static IRegion<PhotosKey, PhotosValue> CreateRegion()
+    {
+      cache = new CacheFactory()
+          .Set("log-level", "debug")
+          .Set("log-file", "c:/temp/classaskey.log")
+          .Create();
+
+      Console.WriteLine("Registering for data serialization");
+
+        cache.TypeRegistry.RegisterType(PhotosKey.CreateDeserializable, 500);
+        cache.TypeRegistry.RegisterType(PhotosValue.CreateDeserializable, 501);
+        cache.TypeRegistry.RegisterType(PhotoMetaData.CreateDeserializable, 502);
+
+        cache.GetPoolManager()
+            .CreateFactory()
+            .AddLocator("localhost", 10334)
+            .Create("pool");
+
+      var regionFactory = cache.CreateRegionFactory(RegionShortcut.PROXY)
+          .SetPoolName("pool");
+      IRegion<PhotosKey, PhotosValue> photosMetaData = regionFactory.Create<PhotosKey, PhotosValue>("photosMetaData");
+      return photosMetaData;
+    }
+
+    public static List<String> ChoosePeople()
+    {
+      List<String> availablePeople = new List<String> {
+        "Alice",
+        "Bob",
+        "Carol",
+        "Ted"
+      };
+
+      List<String> chosenPeople = new List<String>();
+
+      // Choose at least one person
+      int numChosen = rand.Next(1, availablePeople.Count+1);
+
+      int index;
+      int numAvailable = availablePeople.Count;
+
+      for (int i=0; i<numChosen; i++)
+      {
+        // Choose someone not already chosen
+        index = rand.Next(numAvailable);
+        chosenPeople.Add(availablePeople[index]);
+
+        // Update available people
+        availablePeople.RemoveAt(index);
+        numAvailable--;
+      }
+
+      // Sort the chosen. We only care who is chosen, not the order they're chosen.
+      chosenPeople.Sort();
+      return chosenPeople;
+    }
+
+    public static void ChooseDateRange(out DateTime start, out DateTime end)
+    {
+      //Choose start and end dates between Jan 1, 1970 and now
+      var earliestStart = new DateTime(1970, 1, 1);
+      int numAvailableDays = (int)(DateTime.Now - earliestStart).TotalDays;
+
+      var startIndex = rand.Next(numAvailableDays);
+      start = earliestStart.AddDays(startIndex);
+
+      int numRemainingDays = (int)(DateTime.Now - start).TotalDays;
+      end = start.AddDays(rand.Next(numRemainingDays));
+    }
+
+    public static Bitmap ChooseThumb()
+    {
+      int thumbWidth = 32;
+      int thumbHeight = 32;
+
+      Bitmap thumb = new Bitmap(thumbWidth, thumbHeight);
+      for (int j=0; j<thumbHeight; j++)
+      {
+        for (int i = 0; i < thumbWidth; i++)
+        {
+          thumb.SetPixel(i, j, Color.FromArgb(rand.Next(256), rand.Next(256), rand.Next(256)));
+        }
+      }
+
+      return thumb;
+    }
+  }
+}
+
+
diff --git a/examples/dotnet/classaskey/README.md b/examples/dotnet/classaskey/README.md
new file mode 100644
index 0000000..29dd20f
--- /dev/null
+++ b/examples/dotnet/classaskey/README.md
@@ -0,0 +1,117 @@
+# classaskey example
+
+Many applications are best served by using compound keys to store and retrieve data. Geode Native fills this need by allowing users to define their own custom class to be used as a key. It is very easy to implement the ICacheableKey interface and design classes that can be used as keys. In addition, by leveraging the Geode Native Objects.Hash() function will ensure client and server hashcodes match. This is important for performance sensitive applications that use single hop.
+
+This example shows how to design a photo filter as the key for storing metadata for a photo library. The photo filter class (called PhotoKeys in the code) provides for storing and retrieving all photos containing a group of people and that were taken during a date range. The photo metadata class (called PhotoValues in the code) contains the full resolution photoId and thumbnail image for the photo key. In this example, the photoId is an integer representing an index into a photo library. The thumbnail is a small two diminsional array of pixels.
+
+## Prerequisites
+
+* Install [Apache Geode](https://geode.apache.org)
+* Build and install [Apache Geode Native](https://github.com/apache/geode-native)
+* Apache Geode Native examples, built and installed
+* Set `GEODE_HOME` to the install directory of Apache Geode
+
+## Running
+
+1. From a command shell, set the current directory to the `classaskey` directory in your example workspace.
+
+    ```console
+    $ cd workspace/examples/build/dotnet/classaskey
+    ```
+
+1. Run the `startserver.ps1` script to start the Geode cluster with the example.jar file and create a region.
+
+   For Windows cmd:
+
+    ```console
+    $ powershell.exe -File startserver.ps1
+    ```
+
+   For Windows Powershell:
+
+    ```console
+    $ startserver.ps1
+    ```
+
+1. Execute `Debug\dotnet-classaskey.exe`. Expect client and server output similar to below. Since the keys are generated using random numbers, your output will differ. However, as shown in the following output, the hashCodes should match between client and server.
+
+    Program output:
+    ```console
+    Registering for data serialization
+    Populating the photosMetaData region
+
+    Inserting 3 photos for key: {Alice} from 4/21/2017 7:00:00 AM to 7/18/2020 7:00:00 AM with hashCode = -401665386
+    Inserting 3 photos for key: {Bob, Carol, Ted} from 7/26/2002 7:00:00 AM to 7/4/2005 7:00:00 AM with hashCode = -1032114678
+    Inserting 2 photos for key: {Alice, Bob, Carol, Ted} from 4/30/1987 7:00:00 AM to 4/15/2020 7:00:00 AM with hashCode = -647461847
+    Inserting 0 photos for key: {Alice, Bob, Carol, Ted} from 8/3/1971 7:00:00 AM to 2/23/2015 8:00:00 AM with hashCode = -358151561
+    Inserting 2 photos for key: {Alice, Bob, Carol, Ted} from 7/5/1984 7:00:00 AM to 11/6/1985 8:00:00 AM with hashCode = 452667681
+    Inserting 2 photos for key: {Bob} from 11/1/1988 7:00:00 AM to 5/3/1992 7:00:00 AM with hashCode = 651272813
+    Inserting 2 photos for key: {Alice, Ted} from 7/25/1982 7:00:00 AM to 3/23/1999 7:00:00 AM with hashCode = 1995204525
+    Inserting 5 photos for key: {Alice, Bob, Carol, Ted} from 12/12/1974 8:00:00 AM to 1/10/1990 8:00:00 AM with hashCode = -1945749946
+    Inserting 1 photos for key: {Alice, Bob, Carol, Ted} from 12/31/1990 8:00:00 AM to 9/26/1997 7:00:00 AM with hashCode = 1893650760
+    Inserting 4 photos for key: {Bob, Carol, Ted} from 5/7/2016 7:00:00 AM to 5/30/2016 7:00:00 AM with hashCode = 664954774
+
+    Fetching photos for key: {Alice} from 4/21/2017 7:00:00 AM to 7/18/2020 7:00:00 AM
+       Fetching photo number 0
+       Fetching photo number 1
+       Fetching photo number 2
+    Fetching photos for key: {Bob, Carol, Ted} from 7/26/2002 7:00:00 AM to 7/4/2005 7:00:00 AM
+       Fetching photo number 0
+       Fetching photo number 1
+       Fetching photo number 2
+    Fetching photos for key: {Alice, Bob, Carol, Ted} from 4/30/1987 7:00:00 AM to 4/15/2020 7:00:00 AM
+       Fetching photo number 0
+       Fetching photo number 1
+    Fetching photos for key: {Alice, Bob, Carol, Ted} from 8/3/1971 7:00:00 AM to 2/23/2015 8:00:00 AM
+    Fetching photos for key: {Alice, Bob, Carol, Ted} from 7/5/1984 7:00:00 AM to 11/6/1985 8:00:00 AM
+       Fetching photo number 0
+       Fetching photo number 1
+    Fetching photos for key: {Bob} from 11/1/1988 7:00:00 AM to 5/3/1992 7:00:00 AM
+       Fetching photo number 0
+       Fetching photo number 1
+    Fetching photos for key: {Alice, Ted} from 7/25/1982 7:00:00 AM to 3/23/1999 7:00:00 AM
+       Fetching photo number 0
+       Fetching photo number 1
+    Fetching photos for key: {Alice, Bob, Carol, Ted} from 12/12/1974 8:00:00 AM to 1/10/1990 8:00:00 AM
+       Fetching photo number 0
+       Fetching photo number 1
+       Fetching photo number 2
+       Fetching photo number 3
+       Fetching photo number 4
+    Fetching photos for key: {Alice, Bob, Carol, Ted} from 12/31/1990 8:00:00 AM to 9/26/1997 7:00:00 AM
+       Fetching photo number 0
+    Fetching photos for key: {Bob, Carol, Ted} from 5/7/2016 7:00:00 AM to 5/30/2016 7:00:00 AM
+       Fetching photo number 0
+       Fetching photo number 1
+       Fetching photo number 2
+       Fetching photo number 3
+    [fine 2021/02/06 14:20:08.989562 Pacific Standard Time  FirstPro:548 23060] Cache closed.
+    [fine 2021/02/06 14:20:09.000032 Pacific Standard Time  FirstPro:548 23060] Removing cliCallback 1
+     ```
+     Server Log (for readability filtered for just the hashCode):
+     ```console
+    [warn 2021/02/06 14:20:08.200 PST <ServerConnection on port 40404 Thread 1> tid=0x42] hashCode = -401665386
+    [warn 2021/02/06 14:20:08.236 PST <ServerConnection on port 40404 Thread 1> tid=0x42] hashCode = -1032114678
+    [warn 2021/02/06 14:20:08.272 PST <ServerConnection on port 40404 Thread 1> tid=0x42] hashCode = -647461847
+    [warn 2021/02/06 14:20:08.285 PST <ServerConnection on port 40404 Thread 1> tid=0x42] hashCode = -358151561
+    [warn 2021/02/06 14:20:08.330 PST <ServerConnection on port 40404 Thread 1> tid=0x42] hashCode = 452667681
+    [warn 2021/02/06 14:20:08.365 PST <ServerConnection on port 40404 Thread 1> tid=0x42] hashCode = 651272813
+    [warn 2021/02/06 14:20:08.404 PST <ServerConnection on port 40404 Thread 1> tid=0x42] hashCode = 1995204525
+    [warn 2021/02/06 14:20:08.443 PST <ServerConnection on port 40404 Thread 1> tid=0x42] hashCode = -1945749946
+    [warn 2021/02/06 14:20:08.469 PST <ServerConnection on port 40404 Thread 1> tid=0x42] hashCode = 1893650760
+    [warn 2021/02/06 14:20:08.509 PST <ServerConnection on port 40404 Thread 1> tid=0x42] hashCode = 664954774
+    ```
+    
+1. Run the `stopserver.ps1` script to gracefully shutdown the Geode cluster.
+
+   For Windows cmd:
+
+    ```console
+    $ powershell.exe -File stopserver.ps1
+    ```
+
+   For Windows Powershell:
+
+    ```console
+    $ stopserver.ps1
+    ```
diff --git a/examples/dotnet/classaskey/startserver.ps1 b/examples/dotnet/classaskey/startserver.ps1
new file mode 100644
index 0000000..7f352be
--- /dev/null
+++ b/examples/dotnet/classaskey/startserver.ps1
@@ -0,0 +1,45 @@
+# 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.
+
+$GFSH_PATH = ""
+if (Get-Command gfsh -ErrorAction SilentlyContinue)
+{
+    $GFSH_PATH = "gfsh"
+}
+else
+{
+    if (-not (Test-Path env:GEODE_HOME))
+    {
+        Write-Host "Could not find gfsh.  Please set the GEODE_HOME path. e.g. "
+        Write-Host "(Powershell) `$env:GEODE_HOME = <path to Geode>"
+        Write-Host " OR"
+        Write-Host "(Command-line) set %GEODE_HOME% = <path to Geode>"
+    }
+    else
+    {
+        $GFSH_PATH = "$env:GEODE_HOME\bin\gfsh.bat"
+    }
+}
+
+if ($GFSH_PATH -ne "")
+{
+   $expression = "$GFSH_PATH " + `
+	     "-e 'start locator --name=locator --dir=$PSScriptRoot\locator' " + `
+	     "-e 'deploy --jar=$PSScriptRoot/../../utilities/example.jar' " + `
+		 "-e 'start server --name=server --dir=$PSScriptRoot\server' " + `
+         "-e 'create region --name=photosMetaData --type=PARTITION' " + `
+		 "-e 'execute function --id=InstantiateDataSerializable --member=server'";
+   Invoke-Expression $expression
+}
\ No newline at end of file
diff --git a/examples/dotnet/classaskey/stopserver.ps1 b/examples/dotnet/classaskey/stopserver.ps1
new file mode 100644
index 0000000..164e0c6
--- /dev/null
+++ b/examples/dotnet/classaskey/stopserver.ps1
@@ -0,0 +1,39 @@
+# 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.
+
+$GFSH_PATH = ""
+if (Get-Command gfsh -ErrorAction SilentlyContinue)
+{
+    $GFSH_PATH = "gfsh"
+}
+else
+{
+    if (-not (Test-Path env:GEODE_HOME))
+    {
+        Write-Host "Could not find gfsh.  Please set the GEODE_HOME path. e.g. "
+        Write-Host "(Powershell) `$env:GEODE_HOME = <path to Geode>"
+        Write-Host " OR"
+        Write-Host "(Command-line) set %GEODE_HOME% = <path to Geode>"
+    }
+    else
+    {
+        $GFSH_PATH = "$env:GEODE_HOME\bin\gfsh.bat"
+    }
+}
+
+if ($GFSH_PATH -ne "")
+{
+   Invoke-Expression "$GFSH_PATH -e 'connect' -e 'destroy region --name=photosMetaData' -e 'stop server --name=server' -e 'stop locator --name=locator'"
+}
\ No newline at end of file
diff --git a/examples/dotnet/functionexecution/Program.cs b/examples/dotnet/functionexecution/Program.cs
index a2bff53..ad19a93 100644
--- a/examples/dotnet/functionexecution/Program.cs
+++ b/examples/dotnet/functionexecution/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
 * 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.
diff --git a/examples/dotnet/functionexecution/startserver.ps1 b/examples/dotnet/functionexecution/startserver.ps1
index bc38327..6885624 100644
--- a/examples/dotnet/functionexecution/startserver.ps1
+++ b/examples/dotnet/functionexecution/startserver.ps1
@@ -1,4 +1,4 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
+# 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
diff --git a/examples/dotnet/functionexecution/stopserver.ps1 b/examples/dotnet/functionexecution/stopserver.ps1
index 742ce8d..74a6c2d 100644
--- a/examples/dotnet/functionexecution/stopserver.ps1
+++ b/examples/dotnet/functionexecution/stopserver.ps1
@@ -1,4 +1,4 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
+# 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
diff --git a/examples/dotnet/sslputget/CMakeLists.txt.in b/examples/dotnet/sslputget/CMakeLists.txt.in
index e782e43..990e735 100644
--- a/examples/dotnet/sslputget/CMakeLists.txt.in
+++ b/examples/dotnet/sslputget/CMakeLists.txt.in
@@ -19,7 +19,7 @@
 
 set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../../cmake)
 
-find_package(@PRODUCT_NAME_NOSPACE@ REQUIRED COMPONENTS dotnet crypto)
+find_package(@PRODUCT_NAME_NOSPACE@ REQUIRED COMPONENTS dotnet)
 
 add_executable(${PROJECT_NAME} Program.cs)
 
diff --git a/examples/dotnet/sslputget/Program.cs b/examples/dotnet/sslputget/Program.cs
index af7d6ed..c033e69 100644
--- a/examples/dotnet/sslputget/Program.cs
+++ b/examples/dotnet/sslputget/Program.cs
@@ -1,4 +1,4 @@
-/*
+/*
 * 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.
diff --git a/examples/dotnet/sslputget/startserver.ps1 b/examples/dotnet/sslputget/startserver.ps1
index 5555d29..d6b1067 100644
--- a/examples/dotnet/sslputget/startserver.ps1
+++ b/examples/dotnet/sslputget/startserver.ps1
@@ -1,4 +1,4 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
+# 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
diff --git a/examples/dotnet/sslputget/stopserver.ps1 b/examples/dotnet/sslputget/stopserver.ps1
index e2e5719..d457631 100644
--- a/examples/dotnet/sslputget/stopserver.ps1
+++ b/examples/dotnet/sslputget/stopserver.ps1
@@ -1,4 +1,4 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
+# 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
diff --git a/examples/utilities/InstantiateDataSerializable.java b/examples/utilities/InstantiateDataSerializable.java
new file mode 100644
index 0000000..80b0139
--- /dev/null
+++ b/examples/utilities/InstantiateDataSerializable.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 javaobject;
+
+
+import java.util.*;
+import java.io.*;
+import org.apache.geode.*; // for DataSerializable
+import org.apache.geode.cache.Declarable;
+
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.execute.FunctionAdapter;
+import org.apache.geode.cache.execute.FunctionContext;
+import org.apache.geode.cache.execute.ResultSender;
+import org.apache.geode.cache.execute.RegionFunctionContext;
+import org.apache.geode.cache.partition.PartitionRegionHelper;
+
+public class InstantiateDataSerializable extends FunctionAdapter implements Declarable{
+
+public void execute(FunctionContext context) {
+
+  Instantiator.register(new Instantiator(javaobject.PhotosKey.class, 500) {
+    public DataSerializable newInstance() {
+      return new javaobject.PhotosKey();
+    }
+  });
+
+  ResultSender sender = context.getResultSender();
+    sender.lastResult(0);
+  } 
+
+  public String getId() {
+    return "InstantiateDataSerializable";
+  }
+
+  public void init(Properties arg0) {
+  }
+}
diff --git a/examples/utilities/PhotosKey.java b/examples/utilities/PhotosKey.java
new file mode 100644
index 0000000..23ded8e
--- /dev/null
+++ b/examples/utilities/PhotosKey.java
@@ -0,0 +1,84 @@
+/*
+ * 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 javaobject;
+
+import java.util.*;
+import java.io.*;
+import org.apache.geode.*;
+import org.apache.geode.cache.Declarable;
+import org.apache.geode.DataSerializer;
+
+import org.apache.geode.logging.internal.log4j.api.LogService;
+
+public class PhotosKey implements DataSerializable {
+  public List<String> people;
+  public Date rangeStart;
+  public Date rangeEnd;
+
+  static {
+     Instantiator.register(new Instantiator(javaobject.PhotosKey.class, 500) {
+     public DataSerializable newInstance() {
+        return new PhotosKey();
+     }
+   });
+  }
+
+  /* public no-arg constructor required for DataSerializable */  
+  public PhotosKey() {}
+
+  public PhotosKey(List<String> names, Date start, Date end){
+    people = names;
+	rangeStart = start;
+	rangeEnd = end;
+  }
+  
+  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
+    this.people = DataSerializer.readObject(in);
+	this.rangeStart = DataSerializer.readDate(in);
+	this.rangeEnd = DataSerializer.readDate(in);
+  }
+  
+  public void toData(DataOutput out) throws IOException {
+    DataSerializer.writeObject(this.people, out);
+    DataSerializer.writeDate(this.rangeStart, out);
+    DataSerializer.writeDate(this.rangeEnd, out);
+  } 
+
+  public int hashCode() {
+	LogService.getLogger().warn("hashCode = {}", Objects.hash(people, rangeStart, rangeEnd));
+	return Objects.hash(people, rangeStart, rangeEnd);
+  }
+
+  public boolean equals(final Object obj)
+  {
+    if (this == obj)
+      return true;
+    if (obj == null)
+      return false;
+    if (getClass() != obj.getClass())
+      return false;
+    final PhotosKey other = (PhotosKey) obj;
+
+    if (!people.equals(other.people))
+      return false;
+
+	if (!rangeStart.equals(other.rangeStart) || !rangeEnd.equals(other.rangeEnd))
+	  return false;
+
+    return true;
+  }
+}
diff --git a/packer/build-linux.json b/packer/build-linux.json
deleted file mode 100644
index 7b47588..0000000
--- a/packer/build-linux.json
+++ /dev/null
@@ -1,101 +0,0 @@
-{
-  "variables":{
-    "region":"us-west-2",
-    "source_ami":"",
-    "source_image_name":"",
-    "image_name":"build-linux"
-  },
-  "builders":[
-    {
-      "type":"amazon-ebs",
-      "instance_type":"t2.micro",
-      "ami_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}",
-      "access_key":"{{user `aws_access_key`}}",
-      "secret_key":"{{user `aws_secret_key`}}",
-      "region":"{{user `region`}}",
-      "source_ami":"{{user `source_ami`}}",
-      "subnet_id":"{{user `subnet_id`}}",
-      "vpc_id":"{{user `vpc_id`}}",
-      "tags":{
-        "team":"native",
-        "version":"{{user `version`}}",
-        "source_ami":"{{user `source_ami`}}"
-      },
-      "ssh_username":"ec2-user",
-      "ssh_pty":true
-    }
-  ],
-  "provisioners":[
-    {
-      "type":"shell",
-      "script":"rhel/wait-for-cloud-init.sh"
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "scripts":[
-        "rhel/update.sh"
-      ]
-    },
-    {
-      "type":"file",
-      "source":"rhel/files",
-      "destination":"/tmp"
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "inline":[
-        "cp -rv /tmp/files/* /",
-        "rm -rf /tmp/files",
-        "chmod +x /etc/init-user.sh"
-      ]
-    },
-    {
-      "type":"file",
-      "source":"rhel/init-hosts.rc.local",
-      "destination":"/tmp/init-hosts.rc.local"
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "inline":[
-        "cat /tmp/init-hosts.rc.local >> /etc/rc.local"
-      ]
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "scripts":[
-        "rhel/disable-selinux.sh",
-        "rhel/add-user-build.sh",
-        "rhel/install-repos.sh",
-        "rhel/install-scl-devtoolset.sh",
-        "rhel/install-scl-python27.sh",
-        "rhel/install-build-rpms.sh",
-        "rhel/install-coverage-tools.sh",
-        "rhel/install-cmake.sh",
-        "rhel/install-jdk-1.8.sh"
-      ]
-    },
-    {
-      "type":"file",
-      "source":"{{user `gemfire_archive`}}",
-      "destination":"gemfire.tar.gz"
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "scripts":[
-        "rhel/install-gemfire.sh"
-      ]
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "scripts":[
-        "rhel/cleanup.sh"
-      ]
-    }
-  ]
-}
diff --git a/packer/build-rhel-6.json b/packer/build-rhel-6.json
deleted file mode 100644
index cbd6004..0000000
--- a/packer/build-rhel-6.json
+++ /dev/null
@@ -1,94 +0,0 @@
-{
-  "variables":{
-    "region":"us-west-2",
-    "source_ami":"ami-80296ff8",
-    "source_image_name":"",
-    "image_name":"build-rhel6"
-  },
-  "builders":[
-    {
-      "type":"amazon-ebs",
-      "instance_type":"t2.micro",
-      "ami_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}",
-      "access_key":"{{user `aws_access_key`}}",
-      "secret_key":"{{user `aws_secret_key`}}",
-      "region":"{{user `region`}}",
-      "source_ami":"{{user `source_ami`}}",
-      "subnet_id":"{{user `subnet_id`}}",
-      "vpc_id":"{{user `vpc_id`}}",
-      "launch_block_device_mappings":[
-        {
-          "device_name":"/dev/sda1",
-          "delete_on_termination":true,
-          "volume_type": "gp2",
-          "volume_size":100
-        }
-      ],
-      "tags":{
-        "team":"native",
-        "version":"{{user `version`}}",
-        "source_ami":"{{user `source_ami`}}"
-      },
-      "ssh_username":"ec2-user",
-      "ssh_pty":true
-    }
-  ],
-  "provisioners":[
-    {
-      "type":"shell",
-      "script":"rhel/wait-for-cloud-init.sh"
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "scripts":[
-        "rhel/update.sh"
-      ]
-    },
-    {
-      "type":"file",
-      "source":"rhel/files",
-      "destination":"/tmp"
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "inline":[
-        "cp -rv /tmp/files/* /",
-        "rm -rf /tmp/files",
-        "chmod +x /etc/init-user.sh"
-      ]
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "scripts":[
-        "rhel/disable-selinux.sh",
-        "rhel/add-user-build.sh",
-        "rhel/install-scl-devtoolset.sh",
-        "rhel/install-build-rpms.sh",
-        "rhel/install-cmake.sh",
-        "rhel/install-jdk-1.8.sh"
-      ]
-    },
-    {
-      "type":"file",
-      "source":"{{user `gemfire_archive`}}",
-      "destination":"gemfire.tar.gz"
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "scripts":[
-        "rhel/install-gemfire.sh"
-      ]
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "scripts":[
-        "rhel/cleanup.sh"
-      ]
-    }
-  ]
-}
diff --git a/packer/build-rhel-7.json b/packer/build-rhel-7.json
new file mode 100644
index 0000000..186740c
--- /dev/null
+++ b/packer/build-rhel-7.json
@@ -0,0 +1,156 @@
+{
+  "variables": {
+    "aws_region": "",
+    "googlecompute_zone": "",
+    "googlecompute_project": "",
+    "image_family": "build-rhel-7",
+    "image_name_prefix": "{{user `image_family`}}"
+  },
+  "builders": [
+    {
+      "type": "amazon-ebs",
+      "instance_type": "t2.micro",
+      "ami_virtualization_type": "hvm",
+      "ami_name": "{{user `image_family`}}-{{timestamp}}",
+      "region": "{{user `aws_region`}}",
+      "source_ami_filter": {
+        "filters": {
+          "virtualization-type": "hvm",
+          "name": "RHEL-7.7_HVM-*-x86_64-*-Hourly2-GP2",
+          "root-device-type": "ebs"
+        },
+        "owners": [
+          "309956199498"
+        ],
+        "most_recent": true
+      },
+      "subnet_id": "{{user `subnet_id`}}",
+      "vpc_id": "{{user `vpc_id`}}",
+      "tags": {
+        "owner": "{{user `owner`}}",
+        "repository": "{{user `repository`}}",
+        "branch": "{{user `branch`}}"
+      },
+      "ssh_username": "ec2-user",
+      "ssh_pty": true
+    },
+    {
+      "type": "googlecompute",
+      "machine_type": "n1-standard-1",
+      "project_id": "{{user `googlecompute_project`}}",
+      "zone": "{{user `googlecompute_zone`}}",
+      "source_image_family": "rhel-7",
+      "image_name": "{{user `image_name_prefix`}}-{{timestamp}}",
+      "image_family": "{{user `image_family`}}",
+      "image_labels": {
+        "owner": "{{user `owner`}}",
+        "repository": "{{user `repository`}}",
+        "branch": "{{user `branch`}}"
+      },
+      "disk_size": "20",
+      "ssh_username": "packer"
+    }
+  ],
+  "provisioners": [
+    {
+      "type": "shell",
+      "script": "linux/aws/wait-for-cloud-init.sh",
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} /bin/sudo -E -S bash '{{.Path}}'",
+      "inline": [
+        "yum update -y",
+        "yum remove -y yum-cron"
+      ]
+    },
+    {
+      "type": "file",
+      "source": "linux/files",
+      "destination": "/tmp"
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "linux/setup-files.sh"
+      ]
+    },
+    {
+      "type": "file",
+      "source": "linux/aws/files",
+      "destination": "/tmp",
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "linux/aws/setup-files.sh"
+      ],
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "file",
+      "source": "rhel/aws/files",
+      "destination": "/tmp",
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "rhel/aws/setup-files.sh"
+      ],
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} /bin/sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "rhel/disable-selinux.sh",
+        "rhel/7/install-devtoolset.sh",
+        "rhel/install-jdk-11.sh",
+        "linux/install-cmake.sh"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} /bin/sudo -E -S bash '{{.Path}}'",
+      "inline": [
+        "yum install -y git make zlib-devel patch openssl-devel",
+        "yum install -y python3-pip",
+        "pip3 install cpp-coveralls",
+        "yum --enablerepo '*codeready*' install -y doxygen"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} /bin/sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "rhel/aws/add-user-build.sh"
+      ],
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} /bin/sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "rhel/cleanup.sh"
+      ]
+    }
+  ]
+}
diff --git a/packer/build-rhel-8.json b/packer/build-rhel-8.json
new file mode 100644
index 0000000..7874ce7
--- /dev/null
+++ b/packer/build-rhel-8.json
@@ -0,0 +1,155 @@
+{
+  "variables": {
+    "aws_region": "",
+    "googlecompute_zone": "",
+    "googlecompute_project": "",
+    "image_family": "build-rhel-8",
+    "image_name_prefix": "{{user `image_family`}}"
+  },
+  "builders": [
+    {
+      "type": "amazon-ebs",
+      "instance_type": "t2.micro",
+      "ami_virtualization_type": "hvm",
+      "ami_name": "{{user `image_family`}}-{{timestamp}}",
+      "region": "{{user `aws_region`}}",
+      "source_ami_filter": {
+        "filters": {
+          "virtualization-type": "hvm",
+          "name": "RHEL-8.2.0_HVM-*-x86_64-*-Hourly2-GP2",
+          "root-device-type": "ebs"
+        },
+        "owners": [
+          "309956199498"
+        ],
+        "most_recent": true
+      },
+      "subnet_id": "{{user `subnet_id`}}",
+      "vpc_id": "{{user `vpc_id`}}",
+      "tags": {
+        "owner": "{{user `owner`}}",
+        "repository": "{{user `repository`}}",
+        "branch": "{{user `branch`}}"
+      },
+      "ssh_username": "ec2-user",
+      "ssh_pty": true
+    },
+    {
+      "type": "googlecompute",
+      "machine_type": "n1-standard-1",
+      "project_id": "{{user `googlecompute_project`}}",
+      "zone": "{{user `googlecompute_zone`}}",
+      "source_image_family": "rhel-8",
+      "image_name": "{{user `image_name_prefix`}}-{{timestamp}}",
+      "image_family": "{{user `image_family`}}",
+      "image_labels": {
+        "owner": "{{user `owner`}}",
+        "repository": "{{user `repository`}}",
+        "branch": "{{user `branch`}}"
+      },
+      "disk_size": "20",
+      "ssh_username": "packer"
+    }
+  ],
+  "provisioners": [
+    {
+      "type": "shell",
+      "script": "linux/aws/wait-for-cloud-init.sh",
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} /bin/sudo -E -S bash '{{.Path}}'",
+      "inline": [
+        "yum update -y",
+        "yum remove -y dnf-automatic"
+      ]
+    },
+    {
+      "type": "file",
+      "source": "linux/files",
+      "destination": "/tmp"
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "linux/setup-files.sh"
+      ]
+    },
+    {
+      "type": "file",
+      "source": "linux/aws/files",
+      "destination": "/tmp",
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "linux/aws/setup-files.sh"
+      ],
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "file",
+      "source": "rhel/aws/files",
+      "destination": "/tmp",
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "rhel/aws/setup-files.sh"
+      ],
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} /bin/sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "rhel/disable-selinux.sh",
+        "rhel/install-jdk-11.sh",
+        "linux/install-cmake.sh"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} /bin/sudo -E -S bash '{{.Path}}'",
+      "inline": [
+        "yum install -y git make gcc-c++ zlib-devel patch openssl-devel",
+        "yum install -y python3-pip",
+        "pip3 install cpp-coveralls",
+        "yum --enablerepo '*codeready*' install -y doxygen"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} /bin/sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "rhel/aws/add-user-build.sh"
+      ],
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} /bin/sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "rhel/cleanup.sh"
+      ]
+    }
+  ]
+}
diff --git a/packer/build-solaris-sparc.json b/packer/build-solaris-sparc.json
deleted file mode 100644
index 0ce5eec..0000000
--- a/packer/build-solaris-sparc.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
-  "variables":{
-    "image_name":"build-solaris-sparc",
-    "openstack_source_image":"",
-    "openstack_flavor":"Oracle Solaris non-global zone - tiny",
-    "vmware_source_image_name":"",
-    "gemfire_archive":"gemfire.tar.gz",
-    "pkg_oracle_com_certificate":"pkg.oracle.com.certificate.pem",
-    "pkg_oracle_com_key":"pkg.oracle.com.key.pem"
-  },
-  "builders":[
-    {
-      "type":"openstack",
-      "identity_endpoint":"{{user `openstack_identity_endpoint`}}",
-      "tenant_name":"{{user `openstack_tenant_name`}}",
-      "username":"{{user `openstack_username`}}",
-      "password":"{{user `openstack_password`}}",
-      "region":"{{user `openstack_region`}}",
-      "ssh_username":"root",
-      "image_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}",
-      "source_image":"{{user `openstack_source_image`}}",
-      "flavor":"{{user `openstack_flavor`}}",
-      "insecure":"true"
-    }
-  ],
-  "provisioners":[
-    {
-      "type":"file",
-      "source":"{{user `pkg_oracle_com_certificate`}}",
-      "destination":"/var/pkg/ssl/pkg.oracle.com.certificate.pem"
-    },
-    {
-      "type":"file",
-      "source":"{{user `pkg_oracle_com_key`}}",
-      "destination":"/var/pkg/ssl/pkg.oracle.com.key.pem"
-    },
-    {
-      "type":"shell",
-      "scripts":[
-        "solaris/install-opencsw.sh",
-        "solaris/install-build-tools.sh",
-        "solaris/install-solarisstudio.sh",
-        "solaris/install-cmake.sh"
-      ]
-    },
-    {
-      "type":"file",
-      "source":"{{user `gemfire_archive`}}",
-      "destination":"gemfire.tar.gz"
-    },
-    {
-      "type":"shell",
-      "scripts":[
-        "solaris/install-gemfire.sh"
-      ]
-    },
-    {
-       "type":"file",
-       "source":"solaris/changepasswd",
-       "destination":"changepasswd"
-    },
-    {
-      "type":"shell",
-      "scripts":"solaris/add-user-build.sh"
-    },
-    {
-      "type":"shell",
-      "scripts":[
-        "solaris/update.sh",
-        "solaris/cleanup.sh"
-      ]
-    }
-  ]
-}
diff --git a/packer/build-solaris-x86.json b/packer/build-solaris-x86.json
deleted file mode 100644
index 6a55c82..0000000
--- a/packer/build-solaris-x86.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
-  "variables":{
-    "image_name":"build-solaris-x86",
-    "openstack_source_image":"",
-    "openstack_flavor":"Oracle Solaris non-global zone - tiny",
-    "vmware_source_image_name":"",
-    "gemfire_archive":"gemfire.tar.gz",
-    "pkg_oracle_com_certificate":"pkg.oracle.com.certificate.pem",
-    "pkg_oracle_com_key":"pkg.oracle.com.key.pem"
-  },
-  "builders":[
-    {
-      "type":"openstack",
-      "identity_endpoint":"{{user `openstack_identity_endpoint`}}",
-      "tenant_name":"{{user `openstack_tenant_name`}}",
-      "username":"{{user `openstack_username`}}",
-      "password":"{{user `openstack_password`}}",
-      "region":"{{user `openstack_region`}}",
-      "ssh_username":"root",
-      "image_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}",
-      "source_image":"{{user `openstack_source_image`}}",
-      "flavor":"{{user `openstack_flavor`}}",
-      "insecure":"true"
-    }
-  ],
-  "provisioners":[
-    {
-      "type":"file",
-      "source":"{{user `pkg_oracle_com_certificate`}}",
-      "destination":"/var/pkg/ssl/pkg.oracle.com.certificate.pem"
-    },
-    {
-      "type":"file",
-      "source":"{{user `pkg_oracle_com_key`}}",
-      "destination":"/var/pkg/ssl/pkg.oracle.com.key.pem"
-    },
-    {
-      "type":"shell",
-      "scripts":[
-        "solaris/install-opencsw.sh",
-        "solaris/install-build-tools.sh",
-        "solaris/install-solarisstudio.sh",
-        "solaris/install-cmake.sh"
-      ]
-    },
-    {
-      "type":"file",
-      "source":"{{user `gemfire_archive`}}",
-      "destination":"gemfire.tar.gz"
-    },
-    {
-      "type":"shell",
-      "scripts":[
-        "solaris/install-gemfire.sh"
-      ]
-    },
-    {
-       "type":"file",
-       "source":"solaris/changepasswd",
-       "destination":"changepasswd"
-    },
-    {
-      "type":"shell",
-      "scripts":"solaris/add-user-build.sh"
-    },
-    {
-      "type":"shell",
-      "scripts":[
-        "solaris/update.sh",
-        "solaris/cleanup.sh"
-      ]
-    }
-  ]
-}
diff --git a/packer/build-ubuntu-16-04.json b/packer/build-ubuntu-16-04.json
new file mode 100644
index 0000000..3121907
--- /dev/null
+++ b/packer/build-ubuntu-16-04.json
@@ -0,0 +1,132 @@
+{
+  "variables": {
+    "aws_region": "",
+    "googlecompute_zone": "",
+    "googlecompute_project": "",
+    "image_family": "build-ubuntu-16-04",
+    "image_name_prefix": "{{user `image_family`}}"
+  },
+  "builders": [
+    {
+      "type": "amazon-ebs",
+      "instance_type": "t2.micro",
+      "ami_virtualization_type": "hvm",
+      "ami_name": "{{user `image_family`}}-{{timestamp}}",
+      "region": "{{user `aws_region`}}",
+      "source_ami_filter": {
+        "filters": {
+          "virtualization-type": "hvm",
+          "name": "ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-*",
+          "root-device-type": "ebs"
+        },
+        "owners": [
+          "099720109477"
+        ],
+        "most_recent": true
+      },
+      "subnet_id": "{{user `subnet_id`}}",
+      "vpc_id": "{{user `vpc_id`}}",
+      "tags": {
+        "owner": "{{user `owner`}}",
+        "repository": "{{user `repository`}}",
+        "branch": "{{user `branch`}}"
+      },
+      "ssh_username": "ubuntu",
+      "ssh_pty": true
+    },
+    {
+      "type": "googlecompute",
+      "machine_type": "n1-standard-1",
+      "project_id": "{{user `googlecompute_project`}}",
+      "zone": "{{user `googlecompute_zone`}}",
+      "source_image_family": "ubuntu-1604-lts",
+      "image_name": "{{user `image_name_prefix`}}-{{timestamp}}",
+      "image_family": "{{user `image_family`}}",
+      "image_labels": {
+        "owner": "{{user `owner`}}",
+        "repository": "{{user `repository`}}",
+        "branch": "{{user `branch`}}"
+      },
+      "ssh_username": "packer"
+    }
+  ],
+  "provisioners": [
+    {
+      "type": "shell",
+      "script": "linux/aws/wait-for-cloud-init.sh",
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "ubuntu/update.sh"
+      ]
+    },
+    {
+      "type": "file",
+      "source": "linux/files",
+      "destination": "/tmp"
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "linux/setup-files.sh"
+      ]
+    },
+    {
+      "type": "file",
+      "source": "linux/aws/files",
+      "destination": "/tmp",
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "linux/aws/setup-files.sh"
+      ],
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "linux/install-cmake.sh",
+        "ubuntu/install-clang-format.sh",
+        "ubuntu/install-jdk-11.sh"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "ubuntu/aws/add-user-build.sh"
+      ],
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "inline": [
+        "apt-get -y install build-essential libc++-dev libc++abi-dev zlib1g-dev libssl-dev wget doxygen graphviz"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "ubuntu/cleanup.sh"
+      ]
+    }
+  ]
+}
diff --git a/packer/build-ubuntu-18-04.json b/packer/build-ubuntu-18-04.json
new file mode 100644
index 0000000..66acfa6
--- /dev/null
+++ b/packer/build-ubuntu-18-04.json
@@ -0,0 +1,134 @@
+{
+  "variables": {
+    "aws_region": "",
+    "googlecompute_zone": "",
+    "googlecompute_project": "",
+    "image_family": "build-ubuntu-18-04",
+    "image_name_prefix": "{{user `image_family`}}"
+  },
+  "builders": [
+    {
+      "type": "amazon-ebs",
+      "instance_type": "t2.micro",
+      "ami_virtualization_type": "hvm",
+      "ami_name": "{{user `image_family`}}-{{timestamp}}",
+      "region": "{{user `aws_region`}}",
+      "source_ami_filter": {
+        "filters": {
+          "virtualization-type": "hvm",
+          "name": "ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*",
+          "root-device-type": "ebs"
+        },
+        "owners": [
+          "099720109477"
+        ],
+        "most_recent": true
+      },
+      "subnet_id": "{{user `subnet_id`}}",
+      "vpc_id": "{{user `vpc_id`}}",
+      "tags": {
+        "owner": "{{user `owner`}}",
+        "repository": "{{user `repository`}}",
+        "branch": "{{user `branch`}}"
+      },
+      "ssh_username": "ubuntu",
+      "ssh_pty": true
+    },
+    {
+      "type": "googlecompute",
+      "machine_type": "n1-standard-1",
+      "project_id": "{{user `googlecompute_project`}}",
+      "zone": "{{user `googlecompute_zone`}}",
+      "source_image_family": "ubuntu-1804-lts",
+      "image_name": "{{user `image_name_prefix`}}-{{timestamp}}",
+      "image_family": "{{user `image_family`}}",
+      "image_labels": {
+        "owner": "{{user `owner`}}",
+        "repository": "{{user `repository`}}",
+        "branch": "{{user `branch`}}"
+      },
+      "ssh_username": "packer"
+    }
+  ],
+  "provisioners": [
+    {
+      "type": "shell",
+      "script": "linux/aws/wait-for-cloud-init.sh",
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "ubuntu/update.sh"
+      ]
+    },
+    {
+      "type": "file",
+      "source": "linux/files",
+      "destination": "/tmp"
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "linux/setup-files.sh"
+      ]
+    },
+    {
+      "type": "file",
+      "source": "linux/aws/files",
+      "destination": "/tmp",
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "linux/aws/setup-files.sh"
+      ],
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "linux/install-cmake.sh",
+        "ubuntu/install-clang-format.sh",
+        "ubuntu/install-jdk-11.sh"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "ubuntu/aws/add-user-build.sh"
+      ],
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "inline": [
+        "apt-get -y install build-essential libc++-dev libc++abi-dev zlib1g-dev libssl-dev wget doxygen graphviz python python-pip",
+        "pip install --upgrade pip",
+        "pip install cpp-coveralls"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "ubuntu/cleanup.sh"
+      ]
+    }
+  ]
+}
diff --git a/packer/build-ubuntu-20-04.json b/packer/build-ubuntu-20-04.json
new file mode 100644
index 0000000..47de7f5
--- /dev/null
+++ b/packer/build-ubuntu-20-04.json
@@ -0,0 +1,132 @@
+{
+  "variables": {
+    "aws_region": "",
+    "googlecompute_zone": "",
+    "googlecompute_project": "",
+    "image_family": "build-ubuntu-20-04",
+    "image_name_prefix": "{{user `image_family`}}"
+  },
+  "builders": [
+    {
+      "type": "amazon-ebs",
+      "instance_type": "t2.micro",
+      "ami_virtualization_type": "hvm",
+      "ami_name": "{{user `image_family`}}-{{timestamp}}",
+      "region": "{{user `aws_region`}}",
+      "source_ami_filter": {
+        "filters": {
+          "virtualization-type": "hvm",
+          "name": "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*",
+          "root-device-type": "ebs"
+        },
+        "owners": [
+          "099720109477"
+        ],
+        "most_recent": true
+      },
+      "subnet_id": "{{user `subnet_id`}}",
+      "vpc_id": "{{user `vpc_id`}}",
+      "tags": {
+        "owner": "{{user `owner`}}",
+        "repository": "{{user `repository`}}",
+        "branch": "{{user `branch`}}"
+      },
+      "ssh_username": "ubuntu",
+      "ssh_pty": true
+    },
+    {
+      "type": "googlecompute",
+      "machine_type": "n1-standard-1",
+      "project_id": "{{user `googlecompute_project`}}",
+      "zone": "{{user `googlecompute_zone`}}",
+      "source_image_family": "ubuntu-2004-lts",
+      "image_name": "{{user `image_name_prefix`}}-{{timestamp}}",
+      "image_family": "{{user `image_family`}}",
+      "image_labels": {
+        "owner": "{{user `owner`}}",
+        "repository": "{{user `repository`}}",
+        "branch": "{{user `branch`}}"
+      },
+      "ssh_username": "packer"
+    }
+  ],
+  "provisioners": [
+    {
+      "type": "shell",
+      "script": "linux/aws/wait-for-cloud-init.sh",
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "ubuntu/update.sh"
+      ]
+    },
+    {
+      "type": "file",
+      "source": "linux/files",
+      "destination": "/tmp"
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "linux/setup-files.sh"
+      ]
+    },
+    {
+      "type": "file",
+      "source": "linux/aws/files",
+      "destination": "/tmp",
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "linux/aws/setup-files.sh"
+      ],
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "ubuntu/install-clang-format.sh",
+        "linux/install-cmake.sh",
+        "ubuntu/install-jdk-11.sh"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "ubuntu/aws/add-user-build.sh"
+      ],
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "inline": [
+        "apt-get -y install build-essential libc++-dev libc++abi-dev zlib1g-dev libssl-dev wget doxygen graphviz"
+      ]
+    },
+    {
+      "type": "shell",
+      "execute_command": "{{.Vars}} sudo -E -S bash '{{.Path}}'",
+      "scripts": [
+        "ubuntu/cleanup.sh"
+      ]
+    }
+  ]
+}
diff --git a/packer/build-ubuntu.json b/packer/build-ubuntu.json
deleted file mode 100644
index bf86055..0000000
--- a/packer/build-ubuntu.json
+++ /dev/null
@@ -1,90 +0,0 @@
-{
-  "variables":{
-    "region":"us-west-2",
-    "source_ami":"ami-08718fb38f5f50f34",
-    "source_image_name":"X.vmx",
-    "image_name":"build-ubuntu"
-  },
-  "builders":[
-    {
-      "type":"amazon-ebs",
-      "instance_type":"t2.micro",
-      "ami_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}",
-      "access_key":"{{user `aws_access_key`}}",
-      "secret_key":"{{user `aws_secret_key`}}",
-      "region":"{{user `region`}}",
-      "source_ami":"{{user `source_ami`}}",
-      "subnet_id":"{{user `subnet_id`}}",
-      "vpc_id":"{{user `vpc_id`}}",
-      "tags":{
-        "team":"native",
-        "version":"{{user `version`}}",
-        "source_ami":"{{user `source_ami`}}"
-      },
-      "ssh_username":"ubuntu",
-      "ssh_pty":true
-    }
-  ],
-  "provisioners":[
-    {
-      "type":"shell",
-      "script":"ubuntu/wait-for-cloud-init.sh"
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "pause_before":"30s",
-      "scripts":[
-        "ubuntu/update.sh"
-      ]
-    },
-    {
-      "type":"file",
-      "source":"ubuntu/files",
-      "destination":"/tmp"
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "inline":[
-        "cp -rv /tmp/files/* /",
-        "rm -rf /tmp/files",
-        "chmod +x /etc/init-user.sh",
-        "chmod +x /usr/local/bin/update-hosts.sh",
-        "systemctl daemon-reload",
-        "systemctl enable update-hosts.service",
-        "systemctl start update-hosts.service"
-      ]
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "scripts":[
-        "ubuntu/add-user-build.sh",
-        "ubuntu/install-packages.sh",
-        "ubuntu/install-coverage-tools.sh",
-        "ubuntu/install-cmake.sh",
-        "ubuntu/install-clang-format.sh"
-      ]
-    },
-    {
-      "type":"file",
-      "source":"{{user `gemfire_archive`}}",
-      "destination":"gemfire.tar.gz"
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "scripts":[
-        "ubuntu/install-gemfire.sh"
-      ]
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "scripts":[
-        "ubuntu/cleanup.sh"
-      ]
-    }
-  ]
-}
diff --git a/packer/build-windows-2016-vs-2017.json b/packer/build-windows-2016-vs-2017.json
new file mode 100644
index 0000000..3c049ce
--- /dev/null
+++ b/packer/build-windows-2016-vs-2017.json
@@ -0,0 +1,149 @@
+{
+  "variables": {
+    "aws_region": "",
+    "googlecompute_zone": "",
+    "googlecompute_project": "",
+    "image_family": "build-windows-2016-vs-2017",
+    "image_name_prefix": "{{user `image_family`}}"
+  },
+  "builders": [
+    {
+      "type": "amazon-ebs",
+      "instance_type": "c5d.2xlarge",
+      "ami_virtualization_type": "hvm",
+      "ami_name": "{{user `image_family`}}-{{timestamp}}",
+      "region": "{{user `aws_region`}}",
+      "source_ami_filter": {
+        "filters": {
+          "virtualization-type": "hvm",
+          "name": "Windows_Server-2016-English-Full-Base-*",
+          "root-device-type": "ebs"
+        },
+        "owners": [
+          "amazon"
+        ],
+        "most_recent": true
+      },
+      "subnet_id": "{{user `subnet_id`}}",
+      "vpc_id": "{{user `vpc_id`}}",
+      "tags": {
+        "owner": "{{user `owner`}}",
+        "repository": "{{user `repository`}}",
+        "branch": "{{user `branch`}}"
+      },
+      "launch_block_device_mappings": [
+        {
+          "device_name": "/dev/sda1",
+          "delete_on_termination": true,
+          "volume_size": 100
+        }
+      ],
+      "user_data_file": "windows/2016/aws/startup.ps1",
+      "communicator": "winrm",
+      "winrm_username": "Administrator",
+      "winrm_insecure": true,
+      "winrm_use_ssl": true
+    },
+    {
+      "type": "googlecompute",
+      "machine_type": "n1-standard-2",
+      "project_id": "{{user `googlecompute_project`}}",
+      "zone": "{{user `googlecompute_zone`}}",
+      "source_image_family": "windows-2016",
+      "image_name": "{{user `image_name_prefix`}}-{{timestamp}}",
+      "image_family": "{{user `image_family`}}",
+      "image_labels": {
+        "owner": "{{user `owner`}}",
+        "repository": "{{user `repository`}}",
+        "branch": "{{user `branch`}}"
+      },
+      "disk_size": "100",
+      "metadata": {
+        "windows-startup-script-cmd": "dism /Online /NoRestart /Enable-Feature /All /FeatureName:NetFx3 & winrm quickconfig -quiet & winrm set winrm/config/service/auth @{Basic=\"true\"} & net user Administrator /active:yes"
+      },
+      "communicator": "winrm",
+      "winrm_username": "Administrator",
+      "winrm_insecure": true,
+      "winrm_use_ssl": true
+    }
+  ],
+  "provisioners": [
+    {
+      "type": "powershell",
+      "scripts": [
+        "windows/disable-uac.ps1",
+        "windows/install-chocolatey.ps1"
+      ]
+    },
+    {
+      "type": "powershell",
+      "scripts": [
+        "windows/install-vs-2017-community.ps1"
+      ]
+    },
+    {
+      "type": "powershell",
+      "inline": [
+        "choco install openssh -params '/SSHServerFeature' -confirm",
+        "choco install git.install -confirm",
+        "choco install cmake.portable -confirm",
+        "# TODO Old CLI tests aren't compatible with Java 11",
+        "choco install liberica8jdk -confirm",
+        "choco install doxygen.install -confirm",
+        "choco install openssl -confirm",
+        "choco install strawberryperl -confirm",
+        "choco install nuget.commandline -confirm"
+      ]
+    },
+    {
+      "type": "file",
+      "source": "windows/aws/init-ssh.ps1",
+      "destination": "$Env:ProgramData/ssh/init-ssh.ps1",
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "file",
+      "source": "windows/google/init-ssh.ps1",
+      "destination": "$Env:ProgramData/ssh/init-ssh.ps1",
+      "only": [
+        "googlecompute"
+      ]
+    },
+    {
+      "type": "powershell",
+      "inline": [
+        ". $Env:ProgramData\\ssh\\init-ssh.ps1 -schedule"
+      ]
+    },
+    {
+      "type": "powershell",
+      "scripts": [
+        "windows/aws/setup-ec2launch.ps1"
+      ],
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "windows-restart",
+      "restart_timeout": "30m"
+    },
+    {
+      "type": "powershell",
+      "scripts": [
+        "windows/cleanup.ps1"
+      ]
+    },
+    {
+      "type": "powershell",
+      "inline": [
+        "GCESysprep -NoShutdown"
+      ],
+      "only": [
+        "googlecompute"
+      ]
+    }
+  ]
+}
diff --git a/packer/build-windows-2019-vs-2017.json b/packer/build-windows-2019-vs-2017.json
new file mode 100644
index 0000000..727f2a5
--- /dev/null
+++ b/packer/build-windows-2019-vs-2017.json
@@ -0,0 +1,149 @@
+{
+  "variables": {
+    "aws_region": "",
+    "googlecompute_zone": "",
+    "googlecompute_project": "",
+    "image_family": "build-windows-2019-vs-2017",
+    "image_name_prefix": "{{user `image_family`}}"
+  },
+  "builders": [
+    {
+      "type": "amazon-ebs",
+      "instance_type": "c5d.2xlarge",
+      "ami_virtualization_type": "hvm",
+      "ami_name": "{{user `image_family`}}-{{timestamp}}",
+      "region": "{{user `aws_region`}}",
+      "source_ami_filter": {
+        "filters": {
+          "virtualization-type": "hvm",
+          "name": "Windows_Server-2019-English-Full-Base-*",
+          "root-device-type": "ebs"
+        },
+        "owners": [
+          "amazon"
+        ],
+        "most_recent": true
+      },
+      "subnet_id": "{{user `subnet_id`}}",
+      "vpc_id": "{{user `vpc_id`}}",
+      "tags": {
+        "owner": "{{user `owner`}}",
+        "repository": "{{user `repository`}}",
+        "branch": "{{user `branch`}}"
+      },
+      "launch_block_device_mappings": [
+        {
+          "device_name": "/dev/sda1",
+          "delete_on_termination": true,
+          "volume_size": 100
+        }
+      ],
+      "user_data_file": "windows/2019/aws/startup.ps1",
+      "communicator": "winrm",
+      "winrm_username": "Administrator",
+      "winrm_insecure": true,
+      "winrm_use_ssl": true
+    },
+    {
+      "type": "googlecompute",
+      "machine_type": "n1-standard-2",
+      "project_id": "{{user `googlecompute_project`}}",
+      "zone": "{{user `googlecompute_zone`}}",
+      "source_image_family": "windows-2019",
+      "image_name": "{{user `image_name_prefix`}}-{{timestamp}}",
+      "image_family": "{{user `image_family`}}",
+      "image_labels": {
+        "owner": "{{user `owner`}}",
+        "repository": "{{user `repository`}}",
+        "branch": "{{user `branch`}}"
+      },
+      "disk_size": "100",
+      "metadata": {
+        "windows-startup-script-cmd": "dism /Online /NoRestart /Add-Capability /CapabilityName:OpenSSH.Server~~~~0.0.1.0 & dism /Online /NoRestart /Enable-Feature /All /FeatureName:NetFx3 & winrm quickconfig -quiet & winrm set winrm/config/service/auth @{Basic=\"true\"} & net user Administrator /active:yes"
+      },
+      "communicator": "winrm",
+      "winrm_username": "Administrator",
+      "winrm_insecure": true,
+      "winrm_use_ssl": true
+    }
+  ],
+  "provisioners": [
+    {
+      "type": "powershell",
+      "scripts": [
+        "windows/disable-uac.ps1",
+        "windows/2019/install-ssh.ps1",
+        "windows/install-chocolatey.ps1"
+      ]
+    },
+    {
+      "type": "powershell",
+      "scripts": [
+        "windows/install-vs-2017-community.ps1"
+      ]
+    },
+    {
+      "type": "powershell",
+      "inline": [
+        "choco install git.install -confirm",
+        "choco install cmake.portable -confirm",
+        "# TODO Old CLI tests aren't compatible with Java 11",
+        "choco install liberica8jdk -confirm",
+        "choco install doxygen.install -confirm",
+        "choco install openssl -confirm",
+        "choco install strawberryperl -confirm",
+        "choco install nuget.commandline -confirm"
+      ]
+    },
+    {
+      "type": "file",
+      "source": "windows/aws/init-ssh.ps1",
+      "destination": "$Env:ProgramData/ssh/init-ssh.ps1",
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "file",
+      "source": "windows/google/init-ssh.ps1",
+      "destination": "$Env:ProgramData/ssh/init-ssh.ps1",
+      "only": [
+        "googlecompute"
+      ]
+    },
+    {
+      "type": "powershell",
+      "inline": [
+        ". $Env:ProgramData\\ssh\\init-ssh.ps1 -schedule"
+      ]
+    },
+    {
+      "type": "powershell",
+      "scripts": [
+        "windows/aws/setup-ec2launch.ps1"
+      ],
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "windows-restart",
+      "restart_timeout": "30m"
+    },
+    {
+      "type": "powershell",
+      "scripts": [
+        "windows/cleanup.ps1"
+      ]
+    },
+    {
+      "type": "powershell",
+      "inline": [
+        "GCESysprep -NoShutdown"
+      ],
+      "only": [
+        "googlecompute"
+      ]
+    }
+  ]
+}
diff --git a/packer/build-windows-2019-vs-2019.json b/packer/build-windows-2019-vs-2019.json
new file mode 100644
index 0000000..9fa7916
--- /dev/null
+++ b/packer/build-windows-2019-vs-2019.json
@@ -0,0 +1,149 @@
+{
+  "variables": {
+    "aws_region": "",
+    "googlecompute_zone": "",
+    "googlecompute_project": "",
+    "image_family": "build-windows-2019-vs-2017",
+    "image_name_prefix": "{{user `image_family`}}"
+  },
+  "builders": [
+    {
+      "type": "amazon-ebs",
+      "instance_type": "c5d.2xlarge",
+      "ami_virtualization_type": "hvm",
+      "ami_name": "{{user `image_family`}}-{{timestamp}}",
+      "region": "{{user `aws_region`}}",
+      "source_ami_filter": {
+        "filters": {
+          "virtualization-type": "hvm",
+          "name": "Windows_Server-2019-English-Full-Base-*",
+          "root-device-type": "ebs"
+        },
+        "owners": [
+          "amazon"
+        ],
+        "most_recent": true
+      },
+      "subnet_id": "{{user `subnet_id`}}",
+      "vpc_id": "{{user `vpc_id`}}",
+      "tags": {
+        "owner": "{{user `owner`}}",
+        "repository": "{{user `repository`}}",
+        "branch": "{{user `branch`}}"
+      },
+      "launch_block_device_mappings": [
+        {
+          "device_name": "/dev/sda1",
+          "delete_on_termination": true,
+          "volume_size": 100
+        }
+      ],
+      "user_data_file": "windows/2019/aws/startup.ps1",
+      "communicator": "winrm",
+      "winrm_username": "Administrator",
+      "winrm_insecure": true,
+      "winrm_use_ssl": true
+    },
+    {
+      "type": "googlecompute",
+      "machine_type": "n1-standard-2",
+      "project_id": "{{user `googlecompute_project`}}",
+      "zone": "{{user `googlecompute_zone`}}",
+      "source_image_family": "windows-2019",
+      "image_name": "{{user `image_name_prefix`}}-{{timestamp}}",
+      "image_family": "{{user `image_family`}}",
+      "image_labels": {
+        "owner": "{{user `owner`}}",
+        "repository": "{{user `repository`}}",
+        "branch": "{{user `branch`}}"
+      },
+      "disk_size": "100",
+      "metadata": {
+        "windows-startup-script-cmd": "dism /Online /NoRestart /Add-Capability /CapabilityName:OpenSSH.Server~~~~0.0.1.0 & dism /Online /NoRestart /Enable-Feature /All /FeatureName:NetFx3 & winrm quickconfig -quiet & winrm set winrm/config/service/auth @{Basic=\"true\"} & net user Administrator /active:yes"
+      },
+      "communicator": "winrm",
+      "winrm_username": "Administrator",
+      "winrm_insecure": true,
+      "winrm_use_ssl": true
+    }
+  ],
+  "provisioners": [
+    {
+      "type": "powershell",
+      "scripts": [
+        "windows/disable-uac.ps1",
+        "windows/2019/install-ssh.ps1",
+        "windows/install-chocolatey.ps1"
+      ]
+    },
+    {
+      "type": "powershell",
+      "scripts": [
+        "windows/install-vs-2019-community.ps1"
+      ]
+    },
+    {
+      "type": "powershell",
+      "inline": [
+        "choco install git.install -confirm",
+        "choco install cmake.portable -confirm",
+        "# TODO Old CLI tests aren't compatible with Java 11",
+        "choco install liberica8jdk -confirm",
+        "choco install doxygen.install -confirm",
+        "choco install openssl -confirm",
+        "choco install strawberryperl -confirm",
+        "choco install nuget.commandline -confirm"
+      ]
+    },
+    {
+      "type": "file",
+      "source": "windows/aws/init-ssh.ps1",
+      "destination": "$Env:ProgramData/ssh/init-ssh.ps1",
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "file",
+      "source": "windows/google/init-ssh.ps1",
+      "destination": "$Env:ProgramData/ssh/init-ssh.ps1",
+      "only": [
+        "googlecompute"
+      ]
+    },
+    {
+      "type": "powershell",
+      "inline": [
+        ". $Env:ProgramData\\ssh\\init-ssh.ps1 -schedule"
+      ]
+    },
+    {
+      "type": "powershell",
+      "scripts": [
+        "windows/aws/setup-ec2launch.ps1"
+      ],
+      "only": [
+        "amazon-ebs"
+      ]
+    },
+    {
+      "type": "windows-restart",
+      "restart_timeout": "30m"
+    },
+    {
+      "type": "powershell",
+      "scripts": [
+        "windows/cleanup.ps1"
+      ]
+    },
+    {
+      "type": "powershell",
+      "inline": [
+        "GCESysprep -NoShutdown"
+      ],
+      "only": [
+        "googlecompute"
+      ]
+    }
+  ]
+}
diff --git a/packer/build-windows.json b/packer/build-windows.json
deleted file mode 100644
index 46723af..0000000
--- a/packer/build-windows.json
+++ /dev/null
@@ -1,101 +0,0 @@
-{
-  "variables":{
-    "region":"us-west-2",
-    "source_ami":"ami-4e6ea82e",
-    "source_image_name":"X.vmx",
-    "image_name":"build-windows",
-    "gemfire_archive": "gemfire.zip"
-  },
-  "builders":[
-    {
-      "type":"amazon-ebs",
-      "instance_type":"t2.large",
-      "ami_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}",
-      "access_key":"{{user `aws_access_key`}}",
-      "secret_key":"{{user `aws_secret_key`}}",
-      "region":"{{user `region`}}",
-      "source_ami":"{{user `source_ami`}}",
-      "subnet_id":"{{user `subnet_id`}}",
-      "vpc_id":"{{user `vpc_id`}}",
-      "tags":{
-        "team":"native",
-        "version":"{{user `version`}}",
-        "source_ami":"{{user `source_ami`}}"
-      },
-      "communicator":"ssh",
-      "ssh_username":"Administrator",
-      "ssh_handshake_attempts":100,
-      "ssh_timeout":"15m",
-      "launch_block_device_mappings":[
-        {
-          "device_name":"/dev/sda1",
-          "delete_on_termination":true,
-          "volume_size":100
-        }
-      ]
-    }
-  ],
-  "provisioners": [
-    {
-      "pause_before":"60s",      
-      "type": "powershell",
-      "scripts": [
-        "windows/install-dependencies.ps1"
-      ]
-    },
-    {
-      "type": "powershell",
-      "scripts": [
-        "windows/install-activeperl.ps1"
-      ]
-    },
-    {
-      "type": "file",
-      "source": "{{user `gemfire_archive`}}",
-      "destination": "gemfire.tar.gz"
-    },
-    {
-      "type": "powershell",
-      "scripts": [
-        "windows/install-gemfire.ps1"
-      ]
-    },
-    {
-      "type":"file",
-      "source":"windows/Packer.psm1",
-      "destination":"Documents/WindowsPowerShell/Modules/Packer/Packer.psm1"
-    },
-    {
-      "type": "powershell",
-      "scripts": [
-        "windows/install-openssl.ps1"
-      ]
-    },
-    {
-      "type": "powershell",
-      "scripts": [
-        "windows/add-user-build.ps1"
-      ]
-    },
-    {
-      "type": "file",
-      "source": "windows/init-user-build.ps1",
-      "destination": "C:/Users/build/init-user-build.ps1"
-    },
-    {
-      "type": "powershell",
-      "scripts": [
-        "windows/cleanup.ps1"
-      ]
-    },
-    {
-      "type": "powershell",
-      "scripts": [
-        "windows/setup-ec2launch.ps1"
-      ],
-      "only": [
-        "amazon-ebs"
-      ]
-    }
-  ]
-}
diff --git a/packer/default.json b/packer/default.json
index 42666d0..27467c7 100644
--- a/packer/default.json
+++ b/packer/default.json
@@ -1,5 +1,6 @@
 {
-  "product_name":"native",
-  "region":"us-west-2",
-  "openstack_region":"RegionOne"
+  "region": "us-west-2",
+  "aws_region": "us-west-2",
+  "googlecompute_project": "apachegeode-ci",
+  "googlecompute_zone": "us-central1-c"
 }
diff --git a/packer/dev-solaris-sparc.json b/packer/dev-solaris-sparc.json
deleted file mode 100644
index 180e8e3..0000000
--- a/packer/dev-solaris-sparc.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
-  "variables":{
-    "image_name":"dev-solaris-sparc",
-    "openstack_source_image":"",
-    "openstack_flavor":"Oracle Solaris non-global zone - tiny",
-    "vmware_source_image_name":""
-  },
-  "builders":[
-    {
-      "type":"openstack",
-      "identity_endpoint":"{{user `openstack_identity_endpoint`}}",
-      "tenant_name":"{{user `openstack_tenant_name`}}",
-      "username":"{{user `openstack_username`}}",
-      "password":"{{user `openstack_password`}}",
-      "region":"{{user `openstack_region`}}",
-      "ssh_username":"root",
-      "image_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}",
-      "source_image":"{{user `openstack_source_image`}}",
-      "flavor":"{{user `openstack_flavor`}}",
-      "insecure":"true"
-    }
-  ],
-  "provisioners":[
-    {
-      "type":"shell",
-      "inline":[
-        "/opt/csw/bin/pkgutil -i -y ccache"
-      ]
-    },
-    {
-      "type":"shell",
-      "scripts":[
-        "solaris/update.sh",
-        "solaris/cleanup.sh"
-      ]
-    }
-  ]
-}
diff --git a/packer/dev-solaris-x86.json b/packer/dev-solaris-x86.json
deleted file mode 100644
index 783945e..0000000
--- a/packer/dev-solaris-x86.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
-  "variables":{
-    "image_name":"dev-solaris-x86",
-    "openstack_source_image":"",
-    "openstack_flavor":"Oracle Solaris non-global zone - tiny",
-    "vmware_source_image_name":""
-  },
-  "builders":[
-    {
-      "type":"openstack",
-      "identity_endpoint":"{{user `openstack_identity_endpoint`}}",
-      "tenant_name":"{{user `openstack_tenant_name`}}",
-      "username":"{{user `openstack_username`}}",
-      "password":"{{user `openstack_password`}}",
-      "region":"{{user `openstack_region`}}",
-      "ssh_username":"root",
-      "image_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}",
-      "source_image":"{{user `openstack_source_image`}}",
-      "flavor":"{{user `openstack_flavor`}}",
-      "insecure":"true"
-    }
-  ],
-  "provisioners":[
-    {
-      "type":"shell",
-      "inline":[
-        "/opt/csw/bin/pkgutil -i -y ccache"
-      ]
-    },
-    {
-      "type":"shell",
-      "scripts":[
-        "solaris/update.sh",
-        "solaris/cleanup.sh"
-      ]
-    }
-  ]
-}
diff --git a/packer/dev-windows-2012-r2.json b/packer/dev-windows-2012-r2.json
deleted file mode 100644
index bd3f539..0000000
--- a/packer/dev-windows-2012-r2.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
-  "variables":{
-    "region":"us-west-2",
-    "source_ami":"",
-    "source_image_name":"X.vmx",
-    "image_name":"dev-windows-2016"
-  },
-  "builders":[
-    {
-      "type":"amazon-ebs",
-      "instance_type":"t2.large",
-      "ami_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}",
-      "access_key":"{{user `aws_access_key`}}",
-      "secret_key":"{{user `aws_secret_key`}}",
-      "region":"{{user `region`}}",
-      "source_ami":"{{user `source_ami`}}",
-      "subnet_id":"{{user `subnet_id`}}",
-      "vpc_id":"{{user `vpc_id`}}",
-      "tags":{
-        "team":"native",
-        "version":"{{user `version`}}",
-        "source_ami":"{{user `source_ami`}}"
-      },
-      "communicator":"ssh",
-      "ssh_username":"Administrator",
-      "ssh_handshake_attempts":100,
-      "ssh_timeout":"15m",
-      "launch_block_device_mappings":[
-        {
-          "device_name":"/dev/sda1",
-          "delete_on_termination":true,
-          "volume_size":100
-        }
-      ]
-    }
-  ],
-  "provisioners":[
-    {
-      "pause_before":"30s",
-      "type":"powershell",
-      "inline":[
-        "choco install notepadplusplus -confirm",
-        "choco install googlechrome -confirm",
-        "choco install sysinternals -confirm",
-        "choco install windbg -confirm"
-      ]
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/install-dependencies-app-from-github.ps1"
-      ]
-    },
-    {
-      "type":"powershell",
-      "inline":[
-        "Remove-Item C:\\Users\\build\\.ssh -Recurse -Force -ErrorAction SilentlyContinue"
-      ]
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/cleanup.ps1"
-      ]
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/setup-ec2config.ps1"
-      ],
-      "only":[
-        "amazon-ebs"
-      ]
-    }
-  ]
-}
diff --git a/packer/rhel/files/etc/init-user.sh b/packer/linux/aws/files/usr/local/bin/init-user.sh
similarity index 100%
rename from packer/rhel/files/etc/init-user.sh
rename to packer/linux/aws/files/usr/local/bin/init-user.sh
diff --git a/packer/rhel/update.sh b/packer/linux/aws/setup-files.sh
similarity index 90%
copy from packer/rhel/update.sh
copy to packer/linux/aws/setup-files.sh
index 819de1d..8087c39 100644
--- a/packer/rhel/update.sh
+++ b/packer/linux/aws/setup-files.sh
@@ -17,4 +17,7 @@
 
 set -x -e -o pipefail
 
-yum update -y
+cp -rv /tmp/files/* /
+rm -rf /tmp/files
+
+chmod +x /usr/local/bin/init-user.sh
diff --git a/packer/rhel/wait-for-cloud-init.sh b/packer/linux/aws/wait-for-cloud-init.sh
similarity index 100%
rename from packer/rhel/wait-for-cloud-init.sh
rename to packer/linux/aws/wait-for-cloud-init.sh
diff --git a/packer/windows/install-openssl.ps1 b/packer/linux/files/etc/systemd/system/update-hosts.service
similarity index 75%
copy from packer/windows/install-openssl.ps1
copy to packer/linux/files/etc/systemd/system/update-hosts.service
index f20f510..cd954ce 100644
--- a/packer/windows/install-openssl.ps1
+++ b/packer/linux/files/etc/systemd/system/update-hosts.service
@@ -13,7 +13,14 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-$ErrorActionPreference = "Stop"
-Import-Module Packer -Force
+[Unit]
+Description=Ensure an A record exists for local hostname in /etc/hosts
+After=network.target
+After=network-online.target
+Wants=network-online.target
 
-Install-Package https://slproweb.com/download/Win64OpenSSL-1_1_1d.exe -ArgumentList /silent
+[Service]
+ExecStart=/usr/local/bin/update-hosts.sh
+
+[Install]
+WantedBy=multi-user.target
diff --git a/packer/windows/install-openssl.ps1 b/packer/linux/files/usr/local/bin/update-hosts.sh
similarity index 83%
rename from packer/windows/install-openssl.ps1
rename to packer/linux/files/usr/local/bin/update-hosts.sh
index f20f510..43921de 100644
--- a/packer/windows/install-openssl.ps1
+++ b/packer/linux/files/usr/local/bin/update-hosts.sh
@@ -1,3 +1,5 @@
+#!/bin/bash
+
 # 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.
@@ -13,7 +15,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-$ErrorActionPreference = "Stop"
-Import-Module Packer -Force
-
-Install-Package https://slproweb.com/download/Win64OpenSSL-1_1_1d.exe -ArgumentList /silent
+# add hostname to /etc/hosts if not set
+if (! getent hosts `hostname` >/dev/null); then
+  echo `hostname -I` `hostname` >> /etc/hosts
+fi
diff --git a/packer/rhel/install-cmake.sh b/packer/linux/install-cmake.sh
similarity index 79%
copy from packer/rhel/install-cmake.sh
copy to packer/linux/install-cmake.sh
index 71afe7e..d483dae 100644
--- a/packer/rhel/install-cmake.sh
+++ b/packer/linux/install-cmake.sh
@@ -17,9 +17,13 @@
 
 set -x -e -o pipefail
 
-tmp=`mktemp`
+tmp=$(mktemp)
 
-curl -o ${tmp} -v -L https://cmake.org/files/v3.16/cmake-3.16.8-Linux-x86_64.sh
+curl -o ${tmp} -L $(curl -s https://api.github.com/repos/Kitware/CMake/releases \
+    | grep -P -i 'browser_download_url.*cmake-\d+\.\d+\.\d+-linux-x86_64\.sh' \
+    | head -n 1 \
+    | cut -d : -f 2,3 \
+    | tr -d \")
 
 bash ${tmp} --skip-license --prefix=/usr/local
 
diff --git a/packer/rhel/install-scl-devtoolset.sh b/packer/linux/install-dotnet.sh
similarity index 82%
rename from packer/rhel/install-scl-devtoolset.sh
rename to packer/linux/install-dotnet.sh
index f165e44..2992bc0 100644
--- a/packer/rhel/install-scl-devtoolset.sh
+++ b/packer/linux/install-dotnet.sh
@@ -6,9 +6,9 @@
 # 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.
@@ -17,7 +17,8 @@
 
 set -x -e -o pipefail
 
-yum-config-manager --enable rhui-REGION-rhel-server-rhscl
-yum -y install devtoolset-4-gcc-c++
+curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin \
+    --channel 3.1 \
+    --install-dir /usr/lib/dotnet
 
-echo "source scl_source enable devtoolset-4" >> ~build/.bashrc
+ln -s /usr/lib/dotnet/dotnet /usr/bin/dotnet
diff --git a/packer/rhel/install-cmake.sh b/packer/linux/setup-files.sh
similarity index 81%
rename from packer/rhel/install-cmake.sh
rename to packer/linux/setup-files.sh
index 71afe7e..4f23ff7 100644
--- a/packer/rhel/install-cmake.sh
+++ b/packer/linux/setup-files.sh
@@ -17,10 +17,11 @@
 
 set -x -e -o pipefail
 
-tmp=`mktemp`
+cp -rv /tmp/files/* /
+rm -rf /tmp/files
 
-curl -o ${tmp} -v -L https://cmake.org/files/v3.16/cmake-3.16.8-Linux-x86_64.sh
+chmod +x /usr/local/bin/update-hosts.sh
 
-bash ${tmp} --skip-license --prefix=/usr/local
-
-rm -f ${tmp}
+systemctl daemon-reload
+systemctl enable update-hosts.service
+systemctl start update-hosts.service
diff --git a/packer/rhel-7-base.json b/packer/rhel-7-base.json
deleted file mode 100644
index 84d43f8..0000000
--- a/packer/rhel-7-base.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
-  "variables":{
-    "region":"us-west-2",
-    "source_ami":"ami-775e4f16",
-    "source_image_name":"X.vmx",
-    "image_name":"rhel-7-base"
-  },
-  "builders":[
-    {
-      "type":"amazon-ebs",
-      "instance_type":"t2.micro",
-      "ami_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}",
-      "access_key":"{{user `aws_access_key`}}",
-      "secret_key":"{{user `aws_secret_key`}}",
-      "region":"{{user `region`}}",
-      "source_ami":"{{user `source_ami`}}",
-      "subnet_id":"{{user `subnet_id`}}",
-      "vpc_id":"{{user `vpc_id`}}",
-      "tags":{
-        "team":"native",
-        "version":"{{user `version`}}",
-        "source_ami":"{{user `source_ami`}}"
-      },
-      "ssh_username":"ec2-user",
-      "ssh_pty":true
-    }
-  ],
-  "provisioners":[
-    {
-      "type":"shell",
-      "script":"rhel/wait-for-cloud-init.sh"
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "scripts":[
-        "rhel/update.sh"
-      ]
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "scripts":[
-        "rhel/cleanup.sh"
-      ]
-    }
-  ]
-}
\ No newline at end of file
diff --git a/packer/rhel/install-coverage-tools.sh b/packer/rhel/7/install-devtoolset.sh
similarity index 85%
rename from packer/rhel/install-coverage-tools.sh
rename to packer/rhel/7/install-devtoolset.sh
index b696e33..999df2a 100644
--- a/packer/rhel/install-coverage-tools.sh
+++ b/packer/rhel/7/install-devtoolset.sh
@@ -17,8 +17,6 @@
 
 set -x -e -o pipefail
 
-# for coveralls.io
-scl enable python27 'pip install cpp-coveralls'
+yum --enablerepo '*rhscl*' install -y devtoolset-4-gcc-c++
 
-# For codecov.ip
-yum install -y lcov
\ No newline at end of file
+echo "source scl_source enable devtoolset-4" > /etc/profile.d/devtoolset.sh
diff --git a/packer/rhel/add-user-build.sh b/packer/rhel/aws/add-user-build.sh
similarity index 100%
rename from packer/rhel/add-user-build.sh
rename to packer/rhel/aws/add-user-build.sh
diff --git a/packer/rhel/files/etc/cloud/cloud.cfg.d/10_hosts.cfg b/packer/rhel/aws/files/etc/cloud/cloud.cfg.d/10_hosts.cfg
similarity index 100%
rename from packer/rhel/files/etc/cloud/cloud.cfg.d/10_hosts.cfg
rename to packer/rhel/aws/files/etc/cloud/cloud.cfg.d/10_hosts.cfg
diff --git a/packer/rhel/update.sh b/packer/rhel/aws/setup-files.sh
similarity index 94%
rename from packer/rhel/update.sh
rename to packer/rhel/aws/setup-files.sh
index 819de1d..3a0d930 100644
--- a/packer/rhel/update.sh
+++ b/packer/rhel/aws/setup-files.sh
@@ -17,4 +17,5 @@
 
 set -x -e -o pipefail
 
-yum update -y
+cp -rv /tmp/files/* /
+rm -rf /tmp/files
diff --git a/packer/rhel/install-build-rpms.sh b/packer/rhel/install-build-rpms.sh
deleted file mode 100644
index 2809a1f..0000000
--- a/packer/rhel/install-build-rpms.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-set -x -e -o pipefail
-
-yum install -y make doxygen zlib-devel patch openssl-devel
-
-yum install -y rh-git29
-echo "source scl_source enable rh-git29" >> ~build/.bashrc
diff --git a/packer/rhel/install-gemfire.sh b/packer/rhel/install-gemfire.sh
deleted file mode 100644
index 64382af..0000000
--- a/packer/rhel/install-gemfire.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-set -x -e -o pipefail
-
-mkdir /gemfire
-tar -zxf gemfire.tar.gz -C /gemfire
-rm gemfire.tar.gz
diff --git a/packer/rhel/install-jdk-1.8.sh b/packer/rhel/install-jdk-1.8.sh
deleted file mode 100644
index 016ea05..0000000
--- a/packer/rhel/install-jdk-1.8.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-set -x -e -o pipefail
-
-tmp=`mktemp -d`
-
-curl -o ${tmp}/jdk.rpm -v -j -k -L -H "Cookie: oraclelicense=accept-securebackup-cookie" \
-    http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm
-
-yum install -y ${tmp}/jdk.rpm
-
-rm -rf ${tmp}
diff --git a/packer/ubuntu/install-packages.sh b/packer/rhel/install-jdk-11.sh
similarity index 77%
rename from packer/ubuntu/install-packages.sh
rename to packer/rhel/install-jdk-11.sh
index f3e803f..6cffe2e 100644
--- a/packer/ubuntu/install-packages.sh
+++ b/packer/rhel/install-jdk-11.sh
@@ -17,17 +17,14 @@
 
 set -x -e -o pipefail
 
-apt-get -y install \
-    build-essential \
-    libc++-dev \
-    libc++abi-dev \
-    zlib1g-dev \
-    libssl-dev \
-    wget \
-    doxygen \
-    graphviz \
-    openjdk-8-jdk \
-    python \
-    python-pip
+cat <<'EOF' > /etc/yum.repos.d/bellsoft.repo
+[BellSoft]
+name=BellSoft Repository
+baseurl=https://yum.bell-sw.com
+enabled=1
+gpgcheck=1
+gpgkey=https://download.bell-sw.com/pki/GPG-KEY-bellsoft
+priority=1
+EOF
 
-pip install --upgrade pip
+yum install -y bellsoft-java11
diff --git a/packer/rhel/install-repos.sh b/packer/rhel/install-repos.sh
deleted file mode 100644
index c4e6273..0000000
--- a/packer/rhel/install-repos.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-set -x -e -o pipefail
-
-yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
-yum install -y https://rhel7.iuscommunity.org/ius-release.rpm
-
diff --git a/packer/rhel/install-scl-python27.sh b/packer/rhel/install-scl-python27.sh
deleted file mode 100644
index 666a3e9..0000000
--- a/packer/rhel/install-scl-python27.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-set -x -e -o pipefail
-
-yum-config-manager --enable rhui-REGION-rhel-server-rhscl
-yum -y install python27-python-pip
-scl enable python27 'pip install --upgrade pip'
-
-echo "source scl_source enable python27" >> ~build/.bashrc
diff --git a/packer/solaris/add-user-build.sh b/packer/solaris/add-user-build.sh
deleted file mode 100644
index 2ce3509..0000000
--- a/packer/solaris/add-user-build.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-set -x -e -o pipefail
-
-useradd -m -s /usr/bin/bash build
-
-if (! which expect > /dev/null); then
-  pkg install  -v --accept shell/expect
-fi
-
-chmod +x ./changepasswd
-./changepasswd build p1votal!
\ No newline at end of file
diff --git a/packer/solaris/changepasswd b/packer/solaris/changepasswd
deleted file mode 100755
index caae9c0..0000000
--- a/packer/solaris/changepasswd
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env expect -f
-# 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.
-
-set force_conservative 0  ;# set to 1 to force conservative mode even if
-                          ;# script wasn't run conservatively originally
-if {$force_conservative} {
-        set send_slow {1 .1}
-        proc send {ignore arg} {
-                sleep .1
-                exp_send -s -- $arg
-        }
-}
-
-set username [lindex $argv 0]
-set password [lindex $argv 1]
-
-set timeout -1
-spawn passwd $username
-match_max 100000
-expect "New Password: "
-send -- "$password\r"
-expect "Re-enter new Password: "
-send -- "$password\r"
-expect eof
diff --git a/packer/solaris/install-build-tools.sh b/packer/solaris/install-build-tools.sh
deleted file mode 100755
index 11ab841..0000000
--- a/packer/solaris/install-build-tools.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-set -x -e -o pipefail
-
-pkg change-facet \
-    facet.version-lock.consolidation/java-8/java-8-incorporation=false
-
-# Install required tools
-pkg install -v --accept \
-    system/header \
-    developer/assembler \
-    developer/java/jdk-8 \
-    developer/build/gnu-make \
-    archiver/gnu-tar \
-    text/gnu-patch
-
-# too many conflicts with system libraries, use opencsw
-/opt/csw/bin/pkgutil -U
-/opt/csw/bin/pkgutil -i -y \
-    git \
-    doxygen
diff --git a/packer/solaris/install-cmake.sh b/packer/solaris/install-cmake.sh
deleted file mode 100644
index b13b7b4..0000000
--- a/packer/solaris/install-cmake.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-set -x -e -o pipefail
-
-source ~/.bashrc
-
-NCPU=2
-
-pushd `mktemp -d`
-wget -O - https://cmake.org/files/v3.16/cmake-3.16.8.tar.gz | \
-    gtar --strip-components=1 -zxf -
-./bootstrap --system-curl --no-qt-gui --parallel=$NCPU -- -DBUILD_CursesDialog=off
-gmake -j$NCPU
-gmake install
-popd
-
-p='PATH=$PATH:/usr/local/bin; export PATH'
-echo "$p" >> ~/.profile
-echo "$p" >> ~/.bashrc
-echo "$p" >> /etc/skel/.profile
-echo "$p" >> /etc/skel/.bashrc
diff --git a/packer/solaris/install-gemfire.sh b/packer/solaris/install-gemfire.sh
deleted file mode 100755
index a9d18b4..0000000
--- a/packer/solaris/install-gemfire.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-set -x -e -o pipefail
-
-mkdir /gemfire
-gtar -xzvf gemfire.tar.gz -C /gemfire
-rm gemfire.tar.gz
diff --git a/packer/solaris/install-opencsw.sh b/packer/solaris/install-opencsw.sh
deleted file mode 100644
index 010950e..0000000
--- a/packer/solaris/install-opencsw.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-set -e
-
-yes | pkgadd -d http://get.opencsw.org/now all 
-/opt/csw/bin/pkgutil -U
-
-p='PATH=$PATH:/opt/csw/bin; export PATH'
-echo "$p" >> ~/.profile
-echo "$p" >> ~/.bashrc
-echo "$p" >> /etc/skel/.profile
-echo "$p" >> /etc/skel/.bashrc
diff --git a/packer/solaris/install-solarisstudio.sh b/packer/solaris/install-solarisstudio.sh
deleted file mode 100644
index faa6b0c..0000000
--- a/packer/solaris/install-solarisstudio.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-set -e
-
-pkg change-facet facet.version-lock.consolidation/sunpro/sunpro-incorporation=false
-pkg update sunpro-incorporation || true
-
-pkg set-publisher \
-    -k /var/pkg/ssl/pkg.oracle.com.key.pem \
-    -c /var/pkg/ssl/pkg.oracle.com.certificate.pem \
-    -G '*' -g https://pkg.oracle.com/solarisstudio/release solarisstudio
-
-pkg install --accept -v developerstudio-126/c++  developerstudio-126/dbx
-
-p='PATH=$PATH:/opt/developerstudio12.6/bin; export PATH'
-echo "$p" >> ~/.profile
-echo "$p" >> ~/.bashrc
-echo "$p" >> /etc/skel/.profile
-echo "$p" >> /etc/skel/.bashrc
diff --git a/packer/solaris/install-test-tools.sh b/packer/solaris/install-test-tools.sh
deleted file mode 100755
index 2cbeb9d..0000000
--- a/packer/solaris/install-test-tools.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-set -x -e -o pipefail
-
-pkg change-facet \
-    facet.version-lock.consolidation/java-8/java-8-incorporation=false
-
-# Install required tools
-pkg install -v --accept \
-    developer/java/jdk-8 \
-    archiver/gnu-tar
diff --git a/packer/solaris/update.sh b/packer/solaris/update.sh
deleted file mode 100755
index 3181ea5..0000000
--- a/packer/solaris/update.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-
-pkg update -v --no-backup-be --accept
-
-# exits 4 on no update
-exit 0
diff --git a/packer/test-rhel-7.json b/packer/test-rhel-7.json
deleted file mode 100644
index 2b16e5d..0000000
--- a/packer/test-rhel-7.json
+++ /dev/null
@@ -1,97 +0,0 @@
-{
-  "variables":{
-    "region":"us-west-2",
-    "source_ami":"",
-    "source_image_name":"X.vmx",
-    "image_name":"test-rhel-7"
-  },
-  "builders":[
-    {
-      "type":"amazon-ebs",
-      "instance_type":"t2.micro",
-      "ami_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}",
-      "access_key":"{{user `aws_access_key`}}",
-      "secret_key":"{{user `aws_secret_key`}}",
-      "region":"{{user `region`}}",
-      "source_ami":"{{user `source_ami`}}",
-      "subnet_id":"{{user `subnet_id`}}",
-      "vpc_id":"{{user `vpc_id`}}",
-      "tags":{
-        "team":"native",
-        "version":"{{user `version`}}",
-        "source_ami":"{{user `source_ami`}}"
-      },
-      "ssh_username":"ec2-user",
-      "ssh_pty":true
-    }
-  ],
-  "provisioners":[
-    {
-      "type":"shell",
-      "script":"rhel/wait-for-cloud-init.sh"
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "scripts":[
-        "rhel/update.sh"
-      ]
-    },
-    {
-      "type":"file",
-      "source":"rhel/files",
-      "destination":"/tmp"
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "inline":[
-        "cp -rv /tmp/files/* /",
-        "rm -rf /tmp/files",
-        "chmod +x /etc/init-user.sh"
-      ]
-    },
-    {
-      "type":"file",
-      "source":"rhel/init-hosts.rc.local",
-      "destination":"/tmp/init-hosts.rc.local"
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "inline":[
-        "cat /tmp/init-hosts.rc.local >> /etc/rc.local"
-      ]
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "scripts":[
-        "rhel/disable-selinux.sh",
-        "rhel/add-user-build.sh",
-        "rhel/install-repos.sh",
-        "rhel/install-jdk-1.8.sh",
-        "rhel/install-cmake.sh"
-      ]
-    },
-    {
-      "type":"file",
-      "source":"{{user `gemfire_archive`}}",
-      "destination":"gemfire.tar.gz"
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "scripts":[
-        "rhel/install-gemfire.sh"
-      ]
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "scripts":[
-        "rhel/cleanup.sh"
-      ]
-    }
-  ]
-}
diff --git a/packer/test-solaris-x86.json b/packer/test-solaris-x86.json
deleted file mode 100644
index 6657b67..0000000
--- a/packer/test-solaris-x86.json
+++ /dev/null
@@ -1,71 +0,0 @@
-{
-  "variables":{
-    "image_name":"test-solaris-x86",
-    "openstack_source_image":"c0df7ff9-fc8f-4220-ac1f-fd24924dfe7a",
-    "vmware_source_image_name":"X.vmx",
-    "gemfire_archive":"gemfire.tar.gz",
-    "pkg_oracle_com_certificate":"pkg.oracle.com.certificate.pem",
-    "pkg_oracle_com_key":"pkg.oracle.com.key.pem"
-  },
-  "builders":[
-    {
-      "type":"openstack",
-      "identity_endpoint":"{{user `openstack_identity_endpoint`}}",
-      "tenant_name":"{{user `openstack_tenant_name`}}",
-      "username":"{{user `openstack_username`}}",
-      "password":"{{user `openstack_password`}}",
-      "region":"{{user `openstack_region`}}",
-      "ssh_username":"root",
-      "image_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}",
-      "source_image":"{{user `openstack_source_image`}}",
-      "flavor":"Oracle Solaris non-global zone - tiny",
-      "insecure":"true"
-    }
-  ],
-  "provisioners":[
-    {
-      "type":"file",
-      "source":"{{user `pkg_oracle_com_certificate`}}",
-      "destination":"/var/pkg/ssl/pkg.oracle.com.certificate.pem"
-    },
-    {
-      "type":"file",
-      "source":"{{user `pkg_oracle_com_key`}}",
-      "destination":"/var/pkg/ssl/pkg.oracle.com.key.pem"
-    },
-    {
-      "type":"shell",
-      "scripts":[
-        "solaris/install-opencsw.sh",
-        "solaris/install-test-tools.sh"
-      ]
-    },
-    {
-      "type":"file",
-      "source":"{{user `gemfire_archive`}}",
-      "destination":"gemfire.tar.gz"
-    },
-    {
-      "type":"shell",
-      "scripts":[
-        "solaris/install-gemfire.sh"
-      ]
-    },
-    {
-       "type":"file",
-       "source":"solaris/changepasswd",
-       "destination":"changepasswd"
-    },
-    {
-      "type":"shell",
-      "scripts":"solaris/add-user-build.sh"
-    },
-    {
-      "type":"shell",
-      "scripts":[
-        "solaris/update.sh",
-        "solaris/cleanup.sh"
-      ]
-    }
-  ]
-}
diff --git a/packer/test-windows-2012-r2.json b/packer/test-windows-2012-r2.json
deleted file mode 100644
index 953719d..0000000
--- a/packer/test-windows-2012-r2.json
+++ /dev/null
@@ -1,88 +0,0 @@
-{
-  "variables":{
-    "region":"us-west-2",
-    "source_ami":"",
-    "source_image_name":"X.vmx",
-    "image_name":"test-windows-2016"
-  },
-  "builders":[
-    {
-      "type":"amazon-ebs",
-      "instance_type":"t2.large",
-      "ami_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}",
-      "access_key":"{{user `aws_access_key`}}",
-      "secret_key":"{{user `aws_secret_key`}}",
-      "region":"{{user `region`}}",
-      "source_ami":"{{user `source_ami`}}",
-      "subnet_id":"{{user `subnet_id`}}",
-      "vpc_id":"{{user `vpc_id`}}",
-      "tags":{
-        "team":"native",
-        "version":"{{user `version`}}",
-        "source_ami":"{{user `source_ami`}}"
-      },
-      "communicator":"winrm",
-      "winrm_username":"Administrator",
-      "launch_block_device_mappings":[
-        {
-          "device_name":"/dev/sda1",
-          "delete_on_termination":true,
-          "volume_size":40
-        }
-      ]
-    }
-  ],
-  "provisioners":[
-    {
-      "pause_before":"30s",
-      "type":"powershell",
-      "inline":[
-        "choco install adoptopenjdk8 -confirm",
-        "choco install cmake.portable -confirm"
-      ]
-    },
-    {
-      "type":"file",
-      "source":"windows/Packer.psm1",
-      "destination":"Documents/WindowsPowerShell/Modules/Packer/Packer.psm1"
-    },
-    {
-      "type":"file",
-      "source":"{{user `gemfire_archive`}}",
-      "destination":"gemfire.tar.gz"
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/install-gemfire.ps1"
-      ]
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/add-user-build.ps1"
-      ]
-    },
-    {
-      "pause_before":"30s",
-      "type":"file",
-      "source":"windows/init-user-build.ps1",
-      "destination":"C:/Users/build/init-user-build.ps1"
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/cleanup.ps1"
-      ]
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/setup-ec2config.ps1"
-      ],
-      "only":[
-        "amazon-ebs"
-      ]
-    }
-  ]
-}
diff --git a/packer/test-windows-2012.json b/packer/test-windows-2012.json
deleted file mode 100644
index 953719d..0000000
--- a/packer/test-windows-2012.json
+++ /dev/null
@@ -1,88 +0,0 @@
-{
-  "variables":{
-    "region":"us-west-2",
-    "source_ami":"",
-    "source_image_name":"X.vmx",
-    "image_name":"test-windows-2016"
-  },
-  "builders":[
-    {
-      "type":"amazon-ebs",
-      "instance_type":"t2.large",
-      "ami_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}",
-      "access_key":"{{user `aws_access_key`}}",
-      "secret_key":"{{user `aws_secret_key`}}",
-      "region":"{{user `region`}}",
-      "source_ami":"{{user `source_ami`}}",
-      "subnet_id":"{{user `subnet_id`}}",
-      "vpc_id":"{{user `vpc_id`}}",
-      "tags":{
-        "team":"native",
-        "version":"{{user `version`}}",
-        "source_ami":"{{user `source_ami`}}"
-      },
-      "communicator":"winrm",
-      "winrm_username":"Administrator",
-      "launch_block_device_mappings":[
-        {
-          "device_name":"/dev/sda1",
-          "delete_on_termination":true,
-          "volume_size":40
-        }
-      ]
-    }
-  ],
-  "provisioners":[
-    {
-      "pause_before":"30s",
-      "type":"powershell",
-      "inline":[
-        "choco install adoptopenjdk8 -confirm",
-        "choco install cmake.portable -confirm"
-      ]
-    },
-    {
-      "type":"file",
-      "source":"windows/Packer.psm1",
-      "destination":"Documents/WindowsPowerShell/Modules/Packer/Packer.psm1"
-    },
-    {
-      "type":"file",
-      "source":"{{user `gemfire_archive`}}",
-      "destination":"gemfire.tar.gz"
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/install-gemfire.ps1"
-      ]
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/add-user-build.ps1"
-      ]
-    },
-    {
-      "pause_before":"30s",
-      "type":"file",
-      "source":"windows/init-user-build.ps1",
-      "destination":"C:/Users/build/init-user-build.ps1"
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/cleanup.ps1"
-      ]
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/setup-ec2config.ps1"
-      ],
-      "only":[
-        "amazon-ebs"
-      ]
-    }
-  ]
-}
diff --git a/packer/ubuntu-16.04-base.json b/packer/ubuntu-16.04-base.json
deleted file mode 100644
index abdb064..0000000
--- a/packer/ubuntu-16.04-base.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
-  "variables":{
-    "region":"us-west-2",
-    "source_ami":"ami-0afae182eed9d2b46",
-    "source_image_name":"X.vmx",
-    "image_name":"ubuntu-16.04-base"
-  },
-  "builders":[
-    {
-      "type":"amazon-ebs",
-      "instance_type":"t2.micro",
-      "ami_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}",
-      "access_key":"{{user `aws_access_key`}}",
-      "secret_key":"{{user `aws_secret_key`}}",
-      "region":"{{user `region`}}",
-      "source_ami":"{{user `source_ami`}}",
-      "subnet_id":"{{user `subnet_id`}}",
-      "vpc_id":"{{user `vpc_id`}}",
-      "tags":{
-        "team":"native",
-        "version":"{{user `version`}}",
-        "source_ami":"{{user `source_ami`}}"
-      },
-      "ssh_username":"ubuntu",
-      "ssh_pty":true
-    }
-  ],
-  "provisioners":[
-    {
-      "type":"shell",
-      "script":"ubuntu/wait-for-cloud-init.sh"
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "scripts":[
-        "ubuntu/update.sh"
-      ]
-    },
-    {
-      "type":"shell",
-      "execute_command":"{{.Vars}} sudo -E -S bash '{{.Path}}'",
-      "scripts":[
-        "ubuntu/cleanup.sh"
-      ]
-    }
-  ]
-}
\ No newline at end of file
diff --git a/packer/ubuntu/add-user-build.sh b/packer/ubuntu/aws/add-user-build.sh
similarity index 100%
rename from packer/ubuntu/add-user-build.sh
rename to packer/ubuntu/aws/add-user-build.sh
diff --git a/packer/ubuntu/cleanup.sh b/packer/ubuntu/cleanup.sh
index 1398249..77cf3d5 100644
--- a/packer/ubuntu/cleanup.sh
+++ b/packer/ubuntu/cleanup.sh
@@ -18,4 +18,3 @@
 set -x -e -o pipefail
 
 apt-get autoclean
-
diff --git a/packer/ubuntu/install-clang-format.sh b/packer/ubuntu/install-clang-format.sh
index 03a1ce1..3d44393 100644
--- a/packer/ubuntu/install-clang-format.sh
+++ b/packer/ubuntu/install-clang-format.sh
@@ -17,6 +17,14 @@
 
 set -x -e -o pipefail
 
-apt-get -y install clang-format-6.0
+. /etc/os-release
 
-ln -s /usr/bin/clang-format-6.0 /usr/bin/clang-format
\ No newline at end of file
+CLANG_VERSION=11
+
+wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
+apt-add-repository "deb http://apt.llvm.org/${VERSION_CODENAME}/ llvm-toolchain-${VERSION_CODENAME}-${CLANG_VERSION} main"
+
+apt-get update
+apt-get -y install clang-format-${CLANG_VERSION}
+
+update-alternatives --install /usr/bin/clang-format    clang-format    /usr/bin/clang-format-${CLANG_VERSION} 10
diff --git a/packer/ubuntu/install-cmake.sh b/packer/ubuntu/install-cmake.sh
deleted file mode 100644
index 71afe7e..0000000
--- a/packer/ubuntu/install-cmake.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-set -x -e -o pipefail
-
-tmp=`mktemp`
-
-curl -o ${tmp} -v -L https://cmake.org/files/v3.16/cmake-3.16.8-Linux-x86_64.sh
-
-bash ${tmp} --skip-license --prefix=/usr/local
-
-rm -f ${tmp}
diff --git a/packer/ubuntu/install-coverage-tools.sh b/packer/ubuntu/install-coverage-tools.sh
deleted file mode 100644
index 8d268af..0000000
--- a/packer/ubuntu/install-coverage-tools.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-set -x -e -o pipefail
-
-# for coveralls.io
-pip install cpp-coveralls
-
-# For codecov.ip
-apt-get -y install lcov
\ No newline at end of file
diff --git a/packer/ubuntu/install-gemfire.sh b/packer/ubuntu/install-gemfire.sh
deleted file mode 100644
index 64382af..0000000
--- a/packer/ubuntu/install-gemfire.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-set -x -e -o pipefail
-
-mkdir /gemfire
-tar -zxf gemfire.tar.gz -C /gemfire
-rm gemfire.tar.gz
diff --git a/packer/ubuntu/install-packages.sh b/packer/ubuntu/install-jdk-11.sh
similarity index 76%
copy from packer/ubuntu/install-packages.sh
copy to packer/ubuntu/install-jdk-11.sh
index f3e803f..4b758ef 100644
--- a/packer/ubuntu/install-packages.sh
+++ b/packer/ubuntu/install-jdk-11.sh
@@ -17,17 +17,8 @@
 
 set -x -e -o pipefail
 
-apt-get -y install \
-    build-essential \
-    libc++-dev \
-    libc++abi-dev \
-    zlib1g-dev \
-    libssl-dev \
-    wget \
-    doxygen \
-    graphviz \
-    openjdk-8-jdk \
-    python \
-    python-pip
+wget -q -O - https://download.bell-sw.com/pki/GPG-KEY-bellsoft | sudo apt-key add -
+echo "deb [arch=amd64] https://apt.bell-sw.com/ stable main" | sudo tee /etc/apt/sources.list.d/bellsoft.list
 
-pip install --upgrade pip
+sudo apt-get update
+sudo apt-get install -y bellsoft-java11
diff --git a/packer/ubuntu/update.sh b/packer/ubuntu/update.sh
index 13bc1d1..ab017e1 100644
--- a/packer/ubuntu/update.sh
+++ b/packer/ubuntu/update.sh
@@ -18,4 +18,4 @@
 set -x -e -o pipefail
 
 export DEBIAN_FRONTEND=noninteractive
-apt update && apt -yq full-upgrade && apt-get -y autoremove
+apt update && apt-get -y autoremove && apt remove -y unattended-upgrades
diff --git a/packer/ubuntu/wait-for-cloud-init.sh b/packer/ubuntu/wait-for-cloud-init.sh
deleted file mode 100644
index 86b394c..0000000
--- a/packer/ubuntu/wait-for-cloud-init.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-
-#set -x
-set -e
-set -o pipefail
-
-# leaves tail running but we should be restarting anyway
-{ tail -n +1 -f /var/log/cloud-init.log /var/log/cloud-init-output.log & } | sed \
-		-e '/Cloud-init .* finished/q' \
-		-e '/Failed at merging in cloud config/q1'
diff --git a/packer/windows-2016-base.json b/packer/windows-2016-base.json
deleted file mode 100644
index 62492e2..0000000
--- a/packer/windows-2016-base.json
+++ /dev/null
@@ -1,75 +0,0 @@
-{
-  "variables":{
-    "region":"us-west-2",
-    "source_ami":"",
-    "source_image_name":"X.vmx",
-    "image_name":"windows-2016-base"
-  },
-  "builders":[
-    {
-      "type":"amazon-ebs",
-      "instance_type":"t2.large",
-      "ami_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}",
-      "access_key":"{{user `aws_access_key`}}",
-      "secret_key":"{{user `aws_secret_key`}}",
-      "region":"{{user `region`}}",
-      "source_ami":"{{user `source_ami`}}",
-      "subnet_id":"{{user `subnet_id`}}",
-      "vpc_id":"{{user `vpc_id`}}",
-      "tags":{
-        "team":"native",
-        "version":"{{user `version`}}",
-        "source_ami":"{{user `source_ami`}}"
-      },
-      "communicator":"winrm",
-      "winrm_username":"Administrator",
-      "user_data_file":"windows/winrm.cloud-init"
-    }
-  ],
-  "provisioners":[
-    {
-      "pause_before":"30s",
-      "type":"file",
-      "source":"windows/Packer.psm1",
-      "destination":"Documents/WindowsPowerShell/Modules/Packer/Packer.psm1"
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/install-chocolatey.ps1"
-      ]
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/install-doxygen.ps1"
-      ]
-    },
-    {
-      "type":"file",
-      "source":"windows/init-ssh.ps1",
-      "destination":"$Env:ProgramData/Amazon/EC2-Windows/Launch/Scripts/init-ssh.ps1"
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/install-ssh.ps1"
-      ]
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/cleanup.ps1"
-      ]
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/setup-ec2launch.ps1"
-      ],
-      "only":[
-        "amazon-ebs"
-      ]
-    }
-  ]
-}
diff --git a/packer/windows-2016-vs-2017.json b/packer/windows-2016-vs-2017.json
deleted file mode 100644
index 9ebe9c3..0000000
--- a/packer/windows-2016-vs-2017.json
+++ /dev/null
@@ -1,67 +0,0 @@
-{
-  "variables":{
-    "region":"us-west-2",
-    "source_ami":"ami-ac5395cc",
-    "source_image_name":"X.vmx",
-    "image_name":"windows-2016-vs-2017"
-  },
-  "builders":[
-    {
-      "type":"amazon-ebs",
-      "instance_type":"t2.large",
-      "ami_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}",
-      "access_key":"{{user `aws_access_key`}}",
-      "secret_key":"{{user `aws_secret_key`}}",
-      "region":"{{user `region`}}",
-      "source_ami":"{{user `source_ami`}}",
-      "subnet_id":"{{user `subnet_id`}}",
-      "vpc_id":"{{user `vpc_id`}}",
-      "tags":{
-        "team":"native",
-        "version":"{{user `version`}}",
-        "source_ami":"{{user `source_ami`}}"
-      },
-      "communicator":"ssh",
-      "ssh_username":"Administrator",
-      "ssh_handshake_attempts":100,
-      "ssh_timeout":"15m",
-      "launch_block_device_mappings":[
-        {
-          "device_name":"/dev/sda1",
-          "delete_on_termination":true,
-          "volume_size":100
-        }
-      ]
-    }
-  ],
-  "provisioners": [
-    {
-      "pause_before":"60s",
-      "type": "powershell",
-      "scripts": [
-        "windows/install-vs-2017-community.ps1"
-      ]
-    },
-    {
-      "type": "powershell",
-      "inline": [	
-        "Install-WindowsFeature -name NET-Framework-Core"	
-      ]
-    },
-    {
-      "type": "powershell",
-      "scripts": [
-        "windows/cleanup.ps1"
-      ]
-    },
-    {
-      "type": "powershell",
-      "scripts": [
-        "windows/setup-ec2launch.ps1"
-      ],
-      "only": [
-        "amazon-ebs"
-      ]
-    }
-  ]
-}
diff --git a/packer/windows/2016/aws/startup.ps1 b/packer/windows/2016/aws/startup.ps1
new file mode 100644
index 0000000..86ba8fa
--- /dev/null
+++ b/packer/windows/2016/aws/startup.ps1
@@ -0,0 +1,55 @@
+<powershell>
+# 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.
+
+write-output "Running User Data Script"
+write-host "(host) Running User Data Script"
+
+Set-ExecutionPolicy Unrestricted -Scope LocalMachine -Force -ErrorAction Ignore
+
+# Don't set this before Set-ExecutionPolicy as it throws an error
+$ErrorActionPreference = "stop"
+
+# Install .NET 3.5 for NUnit 2.6
+# Can't be installed over WinRM/SSH
+Add-WindowsFeature -Name NET-Framework-Core
+
+# Remove HTTP listener
+Remove-Item -Path WSMan:\Localhost\listener\listener* -Recurse
+
+$Cert = New-SelfSignedCertificate -CertstoreLocation Cert:\LocalMachine\My -DnsName "packer"
+New-Item -Path WSMan:\LocalHost\Listener -Transport HTTPS -Address * -CertificateThumbPrint $Cert.Thumbprint -Force
+
+# WinRM
+write-output "Setting up WinRM"
+write-host "(host) setting up WinRM"
+
+cmd.exe /c winrm quickconfig -q
+cmd.exe /c winrm set "winrm/config" '@{MaxTimeoutms="1800000"}'
+cmd.exe /c winrm set "winrm/config/winrs" '@{MaxMemoryPerShellMB="8192"}'
+cmd.exe /c winrm set "winrm/config/service" '@{AllowUnencrypted="true"}'
+cmd.exe /c winrm set "winrm/config/client" '@{AllowUnencrypted="true"}'
+cmd.exe /c winrm set "winrm/config/service/auth" '@{Basic="true"}'
+cmd.exe /c winrm set "winrm/config/client/auth" '@{Basic="true"}'
+cmd.exe /c winrm set "winrm/config/service/auth" '@{CredSSP="true"}'
+cmd.exe /c winrm set "winrm/config/listener?Address=*+Transport=HTTPS" "@{Port=`"5986`";Hostname=`"packer`";CertificateThumbprint=`"$($Cert.Thumbprint)`"}"
+cmd.exe /c netsh advfirewall firewall set rule group="remote administration" new enable=yes
+cmd.exe /c netsh firewall add portopening TCP 5986 "Port 5986"
+cmd.exe /c net stop winrm
+cmd.exe /c sc config winrm start= auto
+cmd.exe /c net start winrm
+
+</powershell>
\ No newline at end of file
diff --git a/packer/windows/2019/aws/startup.ps1 b/packer/windows/2019/aws/startup.ps1
new file mode 100644
index 0000000..fbec752
--- /dev/null
+++ b/packer/windows/2019/aws/startup.ps1
@@ -0,0 +1,59 @@
+<powershell>
+# 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.
+
+write-output "Running User Data Script"
+write-host "(host) Running User Data Script"
+
+Set-ExecutionPolicy Unrestricted -Scope LocalMachine -Force -ErrorAction Ignore
+
+# Don't set this before Set-ExecutionPolicy as it throws an error
+$ErrorActionPreference = "stop"
+
+# Install SSH
+# Can't be installed over WinRM/SSH
+Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
+
+# Install .NET 3.5 for NUnit 2.6
+# Can't be installed over WinRM/SSH
+Add-WindowsFeature -Name NET-Framework-Core
+
+# Remove HTTP listener
+Remove-Item -Path WSMan:\Localhost\listener\listener* -Recurse
+
+$Cert = New-SelfSignedCertificate -CertstoreLocation Cert:\LocalMachine\My -DnsName "packer"
+New-Item -Path WSMan:\LocalHost\Listener -Transport HTTPS -Address * -CertificateThumbPrint $Cert.Thumbprint -Force
+
+# WinRM
+write-output "Setting up WinRM"
+write-host "(host) setting up WinRM"
+
+cmd.exe /c winrm quickconfig -q
+cmd.exe /c winrm set "winrm/config" '@{MaxTimeoutms="1800000"}'
+cmd.exe /c winrm set "winrm/config/winrs" '@{MaxMemoryPerShellMB="8192"}'
+cmd.exe /c winrm set "winrm/config/service" '@{AllowUnencrypted="true"}'
+cmd.exe /c winrm set "winrm/config/client" '@{AllowUnencrypted="true"}'
+cmd.exe /c winrm set "winrm/config/service/auth" '@{Basic="true"}'
+cmd.exe /c winrm set "winrm/config/client/auth" '@{Basic="true"}'
+cmd.exe /c winrm set "winrm/config/service/auth" '@{CredSSP="true"}'
+cmd.exe /c winrm set "winrm/config/listener?Address=*+Transport=HTTPS" "@{Port=`"5986`";Hostname=`"packer`";CertificateThumbprint=`"$($Cert.Thumbprint)`"}"
+cmd.exe /c netsh advfirewall firewall set rule group="remote administration" new enable=yes
+cmd.exe /c netsh firewall add portopening TCP 5986 "Port 5986"
+cmd.exe /c net stop winrm
+cmd.exe /c sc config winrm start= auto
+cmd.exe /c net start winrm
+
+</powershell>
\ No newline at end of file
diff --git a/packer/windows/install-ssh.ps1 b/packer/windows/2019/install-ssh.ps1
similarity index 65%
rename from packer/windows/install-ssh.ps1
rename to packer/windows/2019/install-ssh.ps1
index 0b4165b..b419298 100644
--- a/packer/windows/install-ssh.ps1
+++ b/packer/windows/2019/install-ssh.ps1
@@ -17,10 +17,14 @@
 
 $ErrorActionPreference = "Stop"
 
-write-host "Installing OpenSSH"
-choco install openssh -params '/SSHServerFeature' -confirm
+write-host "Installing OpenSSH..."
 
-(Get-Content -Path $Env:ProgramData\ssh\sshd_config -Raw) -replace '.*Match Group administrators.*','' -replace '.*administrators_authorized_keys.*','' | Set-Content -Path $Env:ProgramData\ssh\sshd_config
+# Can't be installed via WinRM. Installed at startup.
+#Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
 
-schtasks.exe /Create /TN init-ssh /RU SYSTEM /SC ONSTART /TR "powershell.exe -File '${Env:ProgramData}\Amazon\EC2-Windows\Launch\Scripts\init-ssh.ps1'"
+Start-Service sshd
+Set-Service -Name sshd -StartupType 'Automatic'
+Get-NetFirewallRule -Name *ssh*
+New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
 
+write-host "Installed OpenSSH."
diff --git a/packer/windows/Packer.psm1 b/packer/windows/Packer.psm1
deleted file mode 100644
index 6ca5962..0000000
--- a/packer/windows/Packer.psm1
+++ /dev/null
@@ -1,233 +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.
-
-Set-PSDebug -Trace 0
-
-function Install-Package {
-  [CmdletBinding()]
-  param (
-    [parameter(Mandatory=$false,Position=0)]
-    [string]$Uri,
-    
-    [parameter(Mandatory=$false)]
-    [string]$Installer,
-    
-    [parameter(Mandatory=$false)]
-    [string]$Log,
-
-    [parameter(Mandatory=$false)]
-    [string[]]$ArgumentList=@(),
-
-    [parameter(Mandatory=$false)]
-    [string]$Hash,
-
-    [parameter(Mandatory=$false)]
-    [string]$DestinationPath,
-
-    [parameter(Mandatory=$false)]
-    [System.Collections.IDictionary]$DownloadHeaders=@{},
-
-    [parameter(Mandatory=$false)]
-    [string]$DownloadMethod="Get",
-
-    [parameter(Mandatory=$false)]
-    [string]$MsuPackage
-  )
-  PROCESS {
-    Push-Location -Path $Env:temp
-  
-    if (-not $Installer) {
-      $Installer = $Env:temp + "\" + $Uri.Split('/')[-1]
-    }
-
-    Write-Verbose "Install-Package: Uri=$Uri, Installer=$Installer, ArgumentList=$ArgumentList Log=$Log"
-    
-    if ($Uri) {
-
-    if (!((Test-Path $Installer) -and ((Get-FileHash $Installer).hash -eq "$Hash"))) {
-
-        if ($DownloadMethod -eq 'GET') {
-        $ds = New-Object psobject -Property @{downloadProgress = 0; downloadComplete = $false; error = 0}
-      
-        $wc = New-Object System.Net.WebClient
-      
-        if ($DownloadHeaders.Count -gt 0) {
-          $a = $DownloadHeaders.GetEnumerator() | % { "$($_.Name):$($_.Value)" }
-          $wc.Headers.Add($a)
-        }
-      
-        $eventDataComplete = Register-ObjectEvent $wc DownloadFileCompleted `
-            -MessageData $ds `
-            -Action { 
-                $event.MessageData.downloadComplete = $true
-                $event.MessageData.error = $EventArgs.Error
-            }
-      
-        $eventDataProgress = Register-ObjectEvent $wc DownloadProgressChanged `
-            -MessageData $ds `
-            -Action {
-                $event.MessageData.downloadProgress = $EventArgs.ProgressPercentage
-            }    
-      
-        while ($true) {
-        $ds.error = 0
-        $ds.downloadComplete = $false
-        $ds.downloadProgress = 0
-        
-        try {
-            $wc.DownloadFileAsync($Uri, $Installer)
-        } catch {
-            Write-Host $_.Exception.Message
-        }
-      
-      
-        $p = 0;
-        while (!$ds.downloadComplete) {
-        if ($ds.downloadProgress -gt $p) {
-            $p = $ds.downloadProgress;
-            Write-Host "Downloading... ($($ds.downloadProgress)%)"
-            Start-Sleep -m 100
-        }
-        }
-        if ($ds.error) {
-        Write-Host "Error: $($ds.error)"
-        } else {
-        break;
-        }
-        }
-      } else {
-        # POST
-        Invoke-WebRequest -Uri $Uri `
-                        -Headers $DownloadHeaders `
-                        -Method $DownloadMethod `
-                        -OutFile $Installer
-      }
-    }
-    }
-
-    Write-Host "Installing..."
-    if ($Installer -match "\.msi$") {
-      Write-Verbose "Installing via MSI"
-      $Log = "$Installer.log"
-      $ArgumentList = @("/package", $Installer, "/quiet", "/log", "$Log") + $ArgumentList
-      $Installer = "msiexec";
-    } elseif ($Installer -match "\.msu$") {
-      Write-Verbose "Installing via MSU"
-      $Log = "$Installer.log"
-      Start-Process -FilePath "wusa" -ArgumentList @($Installer, "/extract:.")
-      $ArgumentList = @("/Online", "/Add-Package", "/NoRestart", "/PackagePath:$MsuPackage") + $ArgumentList
-      $Installer = "dism";
-    } elseif ($Installer -match "\.zip$") {
-      Write-Verbose "Installing via ZIP"
-      Expand-Archive -Path $Installer -DestinationPath $DestinationPath -Force -Verbose
-      $Installer = "";
-    }
-
-    if ($Installer) {
-    Write-Verbose "Installer=$Installer, ArgumentList=$ArgumentList"
-    $ip = Start-Process -FilePath $Installer -ArgumentList $ArgumentList -NoNewWindow -PassThru
-    if (!$ip) {
-      throw "Error starting installer. Installer=$Installer, ArgumentList=$ArgumentList"
-    }
-    $handle = $ip.Handle
-
-    if ($log) {
-      $lp = Start-Process -FilePath powershell.exe -ArgumentList @("-Command", "& {Import-Module Packer; Get-Tail -FilePath $Log -Follow}") -NoNewWindow -PassThru
-      #$lp= &{ Tail-File $Log -Follow }
-      #$lp
-    }
-
-    while(-not $ip.HasExited) {
-      Write-Host -NoNewline '.'
-#      if ($Log) {
-#        $c = Get-Content -Path $Log -Tail 1
-#        Write-Host ">> $c"
-#      }
-      sleep 1
-    }
-    
-    $lp | Stop-Process -ErrorAction SilentlyContinue
-
-    Write-Verbose "Exit Code: $($ip.ExitCode)"
-    if ($ip.ExitCode -eq 0) {
-      Write-Host "Installation complete."
-    } elseif ($ip.ExitCode -eq 3010) {
-      Write-Host "Restart required to complete installation."
-    } else {
-      throw "Error while installing. Installer exit code $($ip.ExitCode). Installer=$Installer, ArgumentList=$ArgumentList"
-    }
-    }
-    
-    Pop-Location
-  }
-}
-
-function Get-Tail { 
- [CmdletBinding()]
-  param (
-    [parameter(Mandatory=$true,Position=0)]
-    [string]$FilePath,
-
-    [parameter(Mandatory=$false)]
-    [int]$Offset,
-    
-    [parameter(Mandatory=$false)]
-    [switch]$Follow
-  )
-  PROCESS {
-    Write-Verbose "Tail-File: FilePath=$FilePath, Follow=$Follow"
-    
-    while (1) {
-      $ci = get-childitem $FilePath -ErrorAction SilentlyContinue
-      if ($ci) { break }
-      Start-Sleep -m 100
-    }
-    
-    $fullName = $ci.FullName
-    
-    $reader = new-object System.IO.StreamReader(New-Object IO.FileStream($fullName, [System.IO.FileMode]::Open, [System.IO.FileAccess]::Read, [IO.FileShare]::ReadWrite))
-    #start at the end of the file
-    $lastMaxOffset = $reader.BaseStream.Length - $Offset
-
-    while ($true)
-    {
-      $reader = new-object System.IO.StreamReader(New-Object IO.FileStream($fullName, [System.IO.FileMode]::Open, [System.IO.FileAccess]::Read, [IO.FileShare]::ReadWrite))
-      #if the file size has not changed, idle
-      if ($reader.BaseStream.Length -ge $lastMaxOffset) {
-        #seek to the last max offset
-        $reader.BaseStream.Seek($lastMaxOffset, [System.IO.SeekOrigin]::Begin) | out-null
-
-        #read out of the file until the EOF
-        $line = ""
-        while (($line = $reader.ReadLine()) -ne $null) {
-            write-output $line
-        }
-
-        #update the last max offset
-        $lastMaxOffset = $reader.BaseStream.Position
-      } elseif ($reader.BaseStream.Length -lt $lastMaxOffset) {
-        write-output "File truncated"
-        $lastMaxOffset = 0;
-      }
-  
-      if($Follow){
-          Start-Sleep -m 100
-      } else {
-          break;
-      }
-    }
-    
-  }
-}
\ No newline at end of file
diff --git a/packer/windows/add-user-build.ps1 b/packer/windows/add-user-build.ps1
deleted file mode 100644
index 31606d6..0000000
--- a/packer/windows/add-user-build.ps1
+++ /dev/null
@@ -1,29 +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.
-
-$user = "build"
-$pass = "p1votal!"
-
-net.exe user $user $pass /add
-net.exe localgroup Administrators $user /add
-wmic.exe UserAccount where "Name='$user'" set PasswordExpires=False
-
-$spw = ConvertTo-SecureString $pass -AsPlainText -Force
-$cred = New-Object System.Management.Automation.PSCredential -ArgumentList $user,$spw
-Start-Process cmd /c -WindowStyle Hidden -Credential $cred -ErrorAction SilentlyContinue
-
-
-schtasks.exe /Create /TN init-user-build /RU SYSTEM /SC ONSTART /TR "powershell.exe -File 'C:\Users\build\init-user-build.ps1'" 
-
diff --git a/packer/windows/aws/init-ssh.ps1 b/packer/windows/aws/init-ssh.ps1
new file mode 100644
index 0000000..651c98b
--- /dev/null
+++ b/packer/windows/aws/init-ssh.ps1
@@ -0,0 +1,49 @@
+ # 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.
+
+[CmdletBinding(DefaultParameterSetName = 'Default')]
+param (
+    # Schedules the script to run on the next boot.
+    # If this argument is not provided, script is executed immediately.
+    [parameter(Mandatory = $false, ParameterSetName = "Schedule")]
+    [switch] $Schedule = $false
+)
+
+Set-Variable modulePath -Option Constant -Scope Local -Value (Join-Path $env:ProgramData -ChildPath "Amazon\EC2-Windows\Launch\Module\Ec2Launch.psd1")
+Set-Variable scriptPath -Option Constant -Scope Local -Value (Join-Path $PSScriptRoot -ChildPath $MyInvocation.MyCommand.Name)
+Set-Variable authorizedKeysPath -Option Constant -Scope Local -Value (Join-Path $env:ProgramData -ChildPath "ssh\administrators_authorized_keys")
+
+Import-Module $modulePath
+
+Initialize-Log -Filename "Ec2Launch.log" -AllowLogToConsole
+
+if ($Schedule) {
+  Write-Log "Scheduling SSH Authorized Keys Initialization..."
+  Register-ScriptScheduler -ScriptPath $scriptPath -ScheduleName "SSH Authorized Keys Initialization"
+  Write-Log "Scheduling SSH Authorized Keys Initialization."
+
+  Complete-Log
+  Exit 0
+}
+
+Write-Log "Initializing SSH Authorized Keys..."
+
+Invoke-WebRequest -Uri "http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key" -OutFile $authorizedKeysPath
+icacls $authorizedKeysPath /inheritance:r /grant "SYSTEM:(F)" /grant "BUILTIN\Administrators:(F)"
+
+Write-Log "Initialized SSH Authorized Keys."
+
+Complete-Log
+Exit 0
diff --git a/packer/windows/setup-ec2launch.ps1 b/packer/windows/aws/setup-ec2launch.ps1
similarity index 100%
rename from packer/windows/setup-ec2launch.ps1
rename to packer/windows/aws/setup-ec2launch.ps1
diff --git a/packer/windows/cleanup.ps1 b/packer/windows/cleanup.ps1
index c6a9366..0422e66 100644
--- a/packer/windows/cleanup.ps1
+++ b/packer/windows/cleanup.ps1
@@ -14,7 +14,8 @@
 # limitations under the License.
 
 # Remove admin ssh keys
-Remove-Item C:\Users\Administrator\.ssh -Recurse -Force -ErrorAction SilentlyContinue
+$authorized_keys_file = "${ENV:PROGRAMDATA}\ssh\administrators_authorized_keys"
+Remove-Item "${authorized_keys_file}" -Force -ErrorAction SilentlyContinue
 
 # Cleanup temp
 Get-ChildItem $env:tmp -Recurse | Remove-Item -Recurse -force -ErrorAction SilentlyContinue
diff --git a/packer/windows/install-openssl.ps1 b/packer/windows/disable-uac.ps1
similarity index 69%
copy from packer/windows/install-openssl.ps1
copy to packer/windows/disable-uac.ps1
index f20f510..932fef9 100644
--- a/packer/windows/install-openssl.ps1
+++ b/packer/windows/disable-uac.ps1
@@ -4,9 +4,9 @@
 # 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.
@@ -14,6 +14,10 @@
 # limitations under the License.
 
 $ErrorActionPreference = "Stop"
-Import-Module Packer -Force
 
-Install-Package https://slproweb.com/download/Win64OpenSSL-1_1_1d.exe -ArgumentList /silent
+Write-Host "Disabling UAC..."
+
+New-ItemProperty -Path HKLM:Software\Microsoft\Windows\CurrentVersion\Policies\System -Name EnableLUA -PropertyType DWord -Value 0 -Force
+New-ItemProperty -Path HKLM:Software\Microsoft\Windows\CurrentVersion\Policies\System -Name ConsentPromptBehaviorAdmin -PropertyType DWord -Value 0 -Force
+
+Write-Host "Disabled UAC."
diff --git a/packer/windows/google/init-ssh.ps1 b/packer/windows/google/init-ssh.ps1
new file mode 100644
index 0000000..4163584
--- /dev/null
+++ b/packer/windows/google/init-ssh.ps1
@@ -0,0 +1,64 @@
+ # 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.
+
+[CmdletBinding(DefaultParameterSetName = 'Default')]
+param (
+    # Schedules the script to run on the next boot.
+    # If this argument is not provided, script is executed immediately.
+    [parameter(Mandatory = $false, ParameterSetName = "Schedule")]
+    [switch] $Schedule = $false
+)
+
+Set-Variable log -Option Constant -Scope Local -Value c:\ssh-init.log
+Set-Variable scriptPath -Option Constant -Scope Local -Value (Join-Path $PSScriptRoot -ChildPath $MyInvocation.MyCommand.Name)
+Set-Variable authorizedKeysPath -Option Constant -Scope Local -Value (Join-Path $env:ProgramData -ChildPath "ssh\administrators_authorized_keys")
+Set-Variable sskKeysPath -Option Constant -Scope Local -Value (Join-Path $env:ProgramData -ChildPath "ssh\ssh-keys")
+
+function Write-Log {
+    Write-Host "$args"
+    Add-Content -Path $log -Value "$args"
+}
+
+if ($Schedule) {
+  Write-Log "Scheduling SSH Authorized Keys Initialization..."
+  schtasks.exe /Create /F /TN "SSH Authorized Keys Initialization" /RU SYSTEM /SC ONSTART /TR "powershell.exe -File '$scriptPath'"
+  Write-Log "Scheduled SSH Authorized Keys Initialization."
+  Exit 0
+}
+
+Write-Log "Initializing SSH Authorized Keys..."
+
+Invoke-WebRequest -Headers @{'Metadata-Flavor'='Google'} -Uri 'http://metadata.google.internal/computeMetadata/v1/instance/attributes/ssh-keys' -OutFile "$sskKeysPath"
+Get-Content -Path "$sskKeysPath" -OutVariable sshKeys
+
+Write-Log "Got ssh-keys: $sshKeys"
+
+Remove-Item -Path "$authorizedKeysPath" -Force
+$sshKeys = $sshKeys.Split([Environment]::NewLine, [System.StringSplitOptions]::RemoveEmptyEntries)
+foreach ($sshKey in $sshKeys) {
+    $sshKey = $sshKey.Split(':')
+    $user = $sshKey[0]
+    $key = $sshKey[1]
+
+    Write-Log "Adding admin user $user with key $key."
+
+    New-LocalUser -AccountNeverExpires -Name $user -NoPassword
+    Add-LocalGroupMember -Group "Administrators" -Member $user
+
+    Add-Content -Path "$authorizedKeysPath" -Value "$key"
+    icacls "${authorizedKeysPath}" /inheritance:r /grant "SYSTEM:(F)" /grant "BUILTIN\Administrators:(F)"
+}
+
+Write-Log "Initialized SSH Authorized Keys."
diff --git a/packer/windows/init-ssh.ps1 b/packer/windows/init-ssh.ps1
deleted file mode 100644
index bff7ea1..0000000
--- a/packer/windows/init-ssh.ps1
+++ /dev/null
@@ -1,29 +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.
-
-$ssh = "C:\Users\Administrator\.ssh"
-$authorized_keys = "$ssh\authorized_keys"
-if ( -not (Test-Path $authorized_keys -PathType Leaf) ) {
-
-  write-host "Installing SSH authorized key"
-
-  mkdir -p $ssh -ErrorAction SilentlyContinue
-
-  Invoke-WebRequest -Uri "http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key" -OutFile $authorized_keys
-
-  Import-Module "$Env:ProgramFiles\OpenSSH-Win64\OpenSSHUtils" -force
-
-  Repair-AuthorizedKeyPermission $authorized_keys -Confirm:$false
-}
diff --git a/packer/windows/init-user-build.ps1 b/packer/windows/init-user-build.ps1
deleted file mode 100644
index 20fd98b..0000000
--- a/packer/windows/init-user-build.ps1
+++ /dev/null
@@ -1,38 +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.
-
-$ssh = "C:\Users\build\.ssh"
-$authorized_keys = "$ssh\authorized_keys"
-if ( -not (Test-Path $authorized_keys -PathType Leaf) ) {
-
-  write-host "Installing SSH authorized key"
-
-  mkdir -p $ssh -ErrorAction SilentlyContinue
-
-  Invoke-WebRequest -Uri 'http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key' -OutFile $authorized_keys
-
-  # Give sshd permission to read authorized_keys
-  Import-Module 'C:\Program Files\OpenSSH-Win64\OpenSSHUtils' -force
-
-  $currentUserSid = Get-UserSID -User "NT SERVICE\sshd"
-  $account = Get-UserAccount -UserSid $currentUserSid
-  $ace = New-Object System.Security.AccessControl.FileSystemAccessRule `
-                            ($account, "Read", "None", "None", "Allow")
-  $acl = Get-Acl $authorized_keys
-  $acl.AddAccessRule($ace)
-  Enable-Privilege SeRestorePrivilege | out-null
-  Set-Acl -Path $authorized_keys -AclObject $acl -Confirm:$false
-
-}
diff --git a/packer/windows/install-activeperl.ps1 b/packer/windows/install-activeperl.ps1
deleted file mode 100644
index 0dc4157..0000000
--- a/packer/windows/install-activeperl.ps1
+++ /dev/null
@@ -1,19 +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.
-
-$ErrorActionPreference = "Stop"
-Import-Module Packer -Force
-
-Install-Package http://downloads.activestate.com/ActivePerl/releases/5.28.1.2801/ActivePerl-5.28.1.2801-MSWin32-x64-24563874.exe -ArgumentList "/exenoupdates /quiet"
diff --git a/packer/windows/install-chocolatey.ps1 b/packer/windows/install-chocolatey.ps1
index 60bdd85..f86f6ad 100644
--- a/packer/windows/install-chocolatey.ps1
+++ b/packer/windows/install-chocolatey.ps1
@@ -15,11 +15,9 @@
 
 $ErrorActionPreference = "Stop"
 
-write-host "Installing Chocolatey"
+write-host "Installing Chocolatey..."
 
-# Avoid bug in 7zip when running via WinRM
-$Env:chocolateyUseWindowsCompression = $true
+[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
+iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
 
-iwr https://chocolatey.org/install.ps1 | iex
-
-write-host "Chocolatey Installed"
+write-host "Installed Chocolatey."
diff --git a/packer/windows/install-dependencies-app-from-github.ps1 b/packer/windows/install-dependencies-app-from-github.ps1
deleted file mode 100644
index 58580d4..0000000
--- a/packer/windows/install-dependencies-app-from-github.ps1
+++ /dev/null
@@ -1,37 +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.
-
-$repo = "lucasg/Dependencies"
-$file = "Dependencies.zip"
-
-$releases = "https://api.github.com/repos/$repo/releases"
-
-[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
-
-Write-Host Determining latest release
-$tag = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].tag_name
-
-$download = "https://github.com/$repo/releases/download/$tag/$file"
-$name = $file.Split(".")[0]
-$zip = "c:\$name-$tag.zip"
-
-Write-Host Downloading latest release
-Invoke-WebRequest $download -Out $zip
-
-Write-Host Extracting release files
-Expand-Archive -Path $zip -DestinationPath c:\Users\Administrator\Desktop\Dependencies-$tag -Force
-
-# Removing temp files
-Remove-Item $zip -Force
diff --git a/packer/windows/install-dependencies.ps1 b/packer/windows/install-dependencies.ps1
deleted file mode 100644
index 2485c6e..0000000
--- a/packer/windows/install-dependencies.ps1
+++ /dev/null
@@ -1,25 +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.
-
-choco install adoptopenjdk8 -confirm
-choco install cmake.portable -confirm
-choco install git.install -confirm
-choco install dogtail.dotnet3.5sp1 -confirm
-choco install nunit.install --version 2.6.4 -confirm
-choco install netfx-4.5.2-devpack --allowEmptyChecksums -confirm
-choco install nsis -confirm
-choco install patch -confirm
-choco install gnuwin32-coreutils.portable -confirm
-choco install nuget.commandline -confirm
diff --git a/packer/windows/install-doxygen.ps1 b/packer/windows/install-doxygen.ps1
deleted file mode 100644
index c1337da..0000000
--- a/packer/windows/install-doxygen.ps1
+++ /dev/null
@@ -1,26 +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 = 'doxygen.install'
-$url  = 'http://doxygen.nl/files/doxygen-1.8.16-setup.exe'
-$sha256 = 'c0d4bb19e87921b4aad2d0962bac1f6664bfb9d0f103658908af76565386c940'
-
-Import-Module C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1
-Install-ChocolateyPackage $package 'exe' '/VERYSILENT' $url -Checksum $sha256 -ChecksumType 'sha256'
-
-$oldpath = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).path
-$newpath = "$oldpath;C:\Program Files\doxygen\bin"
-Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $newPath
-$ENV:PATH=$newpath
diff --git a/packer/windows/install-gemfire.ps1 b/packer/windows/install-gemfire.ps1
deleted file mode 100644
index 1ea3e26..0000000
--- a/packer/windows/install-gemfire.ps1
+++ /dev/null
@@ -1,21 +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.
-
-$ErrorActionPreference = "Stop"
-
-mkdir C:\gemfire
-cd C:\gemfire
-cmake -E tar zxf $Home\gemfire.tar.gz
-rm $Home\gemfire.tar.gz
diff --git a/packer/windows/install-vs-2017-community.ps1 b/packer/windows/install-vs-2017-community.ps1
index 8c0e196..ce1f760 100644
--- a/packer/windows/install-vs-2017-community.ps1
+++ b/packer/windows/install-vs-2017-community.ps1
@@ -15,36 +15,27 @@
 # TODO AdminDeploy.xml
 # vs_community.exe /AdminFile C:\Users\Administrator\AdminDeployment.xml /Log setup.log /Passive
 
-Set-PSDebug -Trace 0
+$ErrorActionPreference = "Stop"
 
-$vs_community_bootstrapper_uri = "https://download.visualstudio.microsoft.com/download/pr/5df30b3f-9db2-4195-bce3-c5518277da5d/18edc9dd7697111f993c5c06f18b51e5/vs_community.exe"
-$vs_community_bootstrapper = "C:\vs_community.exe"
+write-host "Installing Visual Studio 2017 Community..."
 
-$args = @('--installPath "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community"'
-          '--add microsoft.net.component.4.targetingpack'
-		  '--add microsoft.net.component.4.5.1.targetingpack'
-		  '--add microsoft.visualstudio.component.debugger.justintime'
-		  '--add microsoft.visualstudio.component.web'
-		  '--add microsoft.visualstudio.component.vc.coreide'
-		  '--add microsoft.visualstudio.component.vc.redist.14.latest'
-		  '--add microsoft.visualstudio.component.graphics.win81'
-		  '--add microsoft.visualstudio.component.vc.cmake.project'
-		  '--add microsoft.visualstudio.component.vc.testadapterforgoogletest'
-		  '--add microsoft.component.vc.runtime.ucrtsdk'
-		  '--add microsoft.visualstudio.component.windows81sdk'
-		  '--add microsoft.visualstudio.component.vc.cli.support'
-		  '--add microsoft.visualstudio.component.windows10sdk.17134'
-		  '--add microsoft.visualstudio.component.windows10sdk.16299.desktop'
-		  '--add microsoft.visualstudio.component.webdeploy'
-		  '--add microsoft.component.pythontools'
-		  '--add component.cpython2.x64'
-		  '--add microsoft.net.component.3.5.developertools'
-		  '--add microsoft.visualstudio.component.typescript.3.0'
+$args = @('--add microsoft.visualstudio.component.debugger.justintime',
+          '--add microsoft.visualstudio.component.web',
+          '--add microsoft.visualstudio.component.vc.coreide',
+          '--add microsoft.visualstudio.component.vc.redist.14.latest',
+          '--add microsoft.visualstudio.component.vc.tools.x86.x64',
+          '--add microsoft.visualstudio.component.windows10sdk.17763',
+          '--add microsoft.visualstudio.component.vc.testadapterforgoogletest',
+          '--add microsoft.component.vc.runtime.ucrtsdk',
+          '--add microsoft.visualstudio.component.vc.cli.support',
+          '--add microsoft.visualstudio.component.windows10sdk.16299.desktop',
+          '--add microsoft.visualstudio.component.webdeploy'
 		  '--quiet'
 		  )
 
-Invoke-WebRequest -Uri $vs_community_bootstrapper_uri -OutFile $vs_community_bootstrapper
+choco install visualstudio2017community -confirm --package-parameters "$args"
 
-Start-Process -Filepath $vs_community_bootstrapper -ArgumentList $args -Wait
+write-host "Installed Visual Studio 2017 Community."
 
+# Avoids reboot error code
 Exit 0
diff --git a/packer/windows/install-vs-2019-community.ps1 b/packer/windows/install-vs-2019-community.ps1
new file mode 100644
index 0000000..7f2580b
--- /dev/null
+++ b/packer/windows/install-vs-2019-community.ps1
@@ -0,0 +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.
+# TODO AdminDeploy.xml
+# vs_community.exe /AdminFile C:\Users\Administrator\AdminDeployment.xml /Log setup.log /Passive
+
+$ErrorActionPreference = "Stop"
+
+write-host "Installing Visual Studio 2019 Community..."
+
+$args = @('--add Microsoft.VisualStudio.Component.CoreEditor',
+          '--add Microsoft.VisualStudio.Workload.CoreEditor',
+          '--add Microsoft.Net.Component.4.6.1.TargetingPack',
+          '--add Microsoft.VisualStudio.Component.Roslyn.Compiler',
+          '--add Microsoft.Net.Component.4.8.SDK',
+          '--add Microsoft.Component.MSBuild',
+          '--add Microsoft.VisualStudio.Component.TextTemplating',
+          '--add Microsoft.Net.Component.4.5.2.TargetingPack',
+          '--add Microsoft.VisualStudio.Component.IntelliCode',
+          '--add Microsoft.VisualStudio.Component.VC.CoreIde',
+          '--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
+          '--add Microsoft.VisualStudio.Component.VC.Redist.14.Latest',
+          '--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core',
+          '--add Microsoft.VisualStudio.Component.VC.ATL',
+          '--add Microsoft.VisualStudio.Component.Windows10SDK.16299',
+          '--add Microsoft.VisualStudio.Component.VC.14.20.x86.x64',
+          '--add Microsoft.VisualStudio.Workload.NativeDesktop',
+          '--add Microsoft.VisualStudio.Component.VC.14.20.CLI.Support',
+          '--add Microsoft.Net.Component.4.6.1.SDK',
+		  '--quiet')
+
+choco install visualstudio2019community -confirm --package-parameters "$args"
+
+write-host "Installed Visual Studio 2019 Community."
+
+# Avoids reboot error code
+Exit 0
diff --git a/packer/windows/setup-ec2config.ps1 b/packer/windows/setup-ec2config.ps1
deleted file mode 100644
index 04124b1..0000000
--- a/packer/windows/setup-ec2config.ps1
+++ /dev/null
@@ -1,33 +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.
-
-# Enable the system password to be retrieved from the AWS Console after this AMI is built and used to launch code
-$ec2config = [xml] (get-content 'C:\Program Files\Amazon\Ec2ConfigService\Settings\config.xml')
-($ec2config.ec2configurationsettings.plugins.plugin | where {$_.name -eq "Ec2SetPassword"}).state = "Enabled"
-($ec2config.ec2configurationsettings.plugins.plugin | where {$_.name -eq "Ec2DynamicBootVolumeSize"}).state = "Enabled"
-($ec2config.ec2configurationsettings.plugins.plugin | where {$_.name -eq "Ec2HandleUserData"}).state = "Enabled"
-($ec2config.ec2configurationsettings.plugins.plugin | where {$_.name -eq "Ec2SetComputerName"}).state = "Enabled"
-($ec2config.ec2configurationsettings.plugins.plugin | where {$_.name -eq "Ec2EventLog"}).state = "Enabled"
-$ec2config.save("C:\Program Files\Amazon\Ec2ConfigService\Settings\config.xml")
-$ec2DiskConfig = [xml] (get-content 'C:\Program Files\Amazon\Ec2ConfigService\Settings\DriveLetterConfig.xml')
-$mappingElement = $ec2DiskConfig.SelectNodes("DriveLetterMapping")[0].Mapping;
-if (!$mappingElement) {
-	$mappingElement = $ec2DiskConfig.SelectNodes("DriveLetterMapping")[0].AppendChild($ec2DiskConfig.CreateElement("Mapping"))
-	$volumeNameElement = $mappingElement.AppendChild($ec2DiskConfig.CreateElement("VolumeName"))
-	$volumeName = $volumeNameElement.AppendChild($ec2DiskConfig.CreateTextNode("Temporary Storage 0"))
-	$driveLetterElement = $mappingElement.AppendChild($ec2DiskConfig.CreateElement("DriveLetter"))
-	$driveLetter = $driveLetterElement.AppendChild($ec2DiskConfig.CreateTextNode("D:"))
-	$ec2DiskConfig.save("C:\Program Files\Amazon\Ec2ConfigService\Settings\DriveLetterConfig.xml")
-}
\ No newline at end of file
diff --git a/packer/windows/uninstall-doxygen.ps1 b/packer/windows/uninstall-doxygen.ps1
deleted file mode 100644
index 5175f1d..0000000
--- a/packer/windows/uninstall-doxygen.ps1
+++ /dev/null
@@ -1,23 +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.
-
-# Enable the system password to be retrieved from the AWS Console after this AMI is built and used to launch code
-
-$package = 'doxygen.install'
-$uninstallRegKey = 'HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\doxygen_is1'
-
-Import-Module C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1
-$uninstallPath = (Get-ItemProperty $uninstallRegKey UninstallString).UninstallString
-Uninstall-ChocolateyPackage $package 'exe' '/VERYSILENT' $uninstallPath
diff --git a/packer/windows/vs-2015-admin.xml b/packer/windows/vs-2015-admin.xml
deleted file mode 100644
index 867ff0f..0000000
--- a/packer/windows/vs-2015-admin.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<?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.
--->
-<AdminDeploymentCustomizations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/wix/2011/AdminDeployment">
-  <BundleCustomizations TargetDir="C:\Program Files (x86)\Microsoft Visual Studio 14.0" NoCacheOnlyMode="default" NoWeb="default" NoRefresh="default" SuppressRefreshPrompt="default" Feed="default" />
-  <SelectableItemCustomizations>
-    <SelectableItemCustomization Id="MicroUpdateV3.5" Selected="yes" FriendlyName="Update for Microsoft Visual Studio 2015 (KB3165756)" />
-    <SelectableItemCustomization Id="WebToolsV1" Hidden="no" Selected="yes" FriendlyName="Microsoft Web Developer Tools" />
-    <SelectableItemCustomization Id="JavaScript_HiddenV12" Selected="yes" FriendlyName="JavaScript Project System for Visual Studio" />
-    <SelectableItemCustomization Id="MDDJSDependencyHiddenV1" Selected="yes" FriendlyName="MDDJSDependencyHidden" />
-    <SelectableItemCustomization Id="AppInsightsToolsVisualStudioHiddenVSU3RTMV1" Selected="no" FriendlyName="Developer Analytics Tools v7.0.2" />
-    <SelectableItemCustomization Id="Silverlight5_DRTHidden" Selected="no" FriendlyName="Silverlight5_DRTHidden" />
-    <SelectableItemCustomization Id="BlissHidden" Selected="no" FriendlyName="BlissHidden" />
-    <SelectableItemCustomization Id="HelpHidden" Selected="yes" FriendlyName="HelpHidden" />
-    <SelectableItemCustomization Id="JavaScript" Selected="yes" FriendlyName="JavascriptHidden" />
-    <SelectableItemCustomization Id="NetFX4Hidden" Selected="yes" FriendlyName="NetFX4Hidden" />
-    <SelectableItemCustomization Id="NetFX45Hidden" Selected="yes" FriendlyName="NetFX45Hidden" />
-    <SelectableItemCustomization Id="NetFX451MTPackHidden" Selected="yes" FriendlyName="NetFX451MTPackHidden" />
-    <SelectableItemCustomization Id="NetFX451MTPackCoreHidden" Selected="yes" FriendlyName="NetFX451MTPackCoreHidden" />
-    <SelectableItemCustomization Id="NetFX452MTPackHidden" Selected="yes" FriendlyName="NetFX452MTPackHidden" />
-    <SelectableItemCustomization Id="NetFX46MTPackHidden" Selected="yes" FriendlyName="NetFX46MTPackHidden" />
-    <SelectableItemCustomization Id="PortableDTPHidden" Selected="yes" FriendlyName="PortableDTPHidden" />
-    <SelectableItemCustomization Id="PreEmptiveDotfuscatorHidden" Selected="no" FriendlyName="PreEmptiveDotfuscatorHidden" />
-    <SelectableItemCustomization Id="PreEmptiveAnalyticsHidden" Selected="no" FriendlyName="PreEmptiveAnalyticsHidden" />
-    <SelectableItemCustomization Id="ProfilerHidden" Selected="no" FriendlyName="ProfilerHidden" />
-    <SelectableItemCustomization Id="RoslynLanguageServicesHidden" Selected="no" FriendlyName="RoslynLanguageServicesHidden" />
-    <SelectableItemCustomization Id="SDKTools3Hidden" Selected="yes" FriendlyName="SDKTools3Hidden" />
-    <SelectableItemCustomization Id="SDKTools4Hidden" Selected="yes" FriendlyName="SDKTools4Hidden" />
-    <SelectableItemCustomization Id="WCFDataServicesHidden" Selected="no" FriendlyName="WCFDataServicesHidden" />
-    <SelectableItemCustomization Id="VSUV1PreReqV1" Selected="no" FriendlyName="Visual Studio 2015 Update 1 Prerequisite" />
-    <SelectableItemCustomization Id="VSUV3RTMV1" Selected="yes" FriendlyName="Visual Studio 2015 Update 3" />
-    <SelectableItemCustomization Id="NativeLanguageSupport_VCV1" Hidden="no" Selected="yes" FriendlyName="Common Tools for Visual C++ 2015" />
-    <SelectableItemCustomization Id="NativeLanguageSupport_MFCV1" Hidden="no" Selected="no" FriendlyName="Microsoft Foundation Classes for C++" />
-    <SelectableItemCustomization Id="NativeLanguageSupport_XPV1" Hidden="no" Selected="no" FriendlyName="Windows XP Support for C++" />
-    <SelectableItemCustomization Id="Win81SDK_HiddenV1" Hidden="no" Selected="no" FriendlyName="Windows 8.1 SDK and Universal CRT SDK" />
-    <SelectableItemCustomization Id="FSharpV1" Hidden="no" Selected="no" FriendlyName="Visual F#" />
-    <SelectableItemCustomization Id="PythonToolsForVisualStudioV8" Hidden="no" Selected="no" FriendlyName="Python Tools for Visual Studio (January 2017)" />
-    <SelectableItemCustomization Id="ClickOnceV1" Hidden="no" Selected="no" FriendlyName="ClickOnce Publishing Tools" />
-    <SelectableItemCustomization Id="SQLV1" Hidden="no" Selected="no" FriendlyName="Microsoft SQL Server Data Tools" />
-    <SelectableItemCustomization Id="PowerShellToolsV1" Hidden="no" Selected="no" FriendlyName="PowerShell Tools for Visual Studio" />
-    <SelectableItemCustomization Id="SilverLight_Developer_KitV1" Hidden="no" Selected="no" FriendlyName="Silverlight Development Kit" />
-    <SelectableItemCustomization Id="Windows10_ToolsAndSDKV13" Hidden="no" Selected="no" FriendlyName="Tools (1.4.1) and Windows 10 SDK (10.0.14393)" />
-    <SelectableItemCustomization Id="Win10_EmulatorV1" Selected="no" FriendlyName="Emulators for Windows 10 Mobile (10.0.10240)" />
-    <SelectableItemCustomization Id="Win10_EmulatorV2" Selected="no" FriendlyName="Emulators for Windows 10 Mobile (10.0.10586)" />
-    <SelectableItemCustomization Id="Win10_EmulatorV3" Hidden="no" Selected="no" FriendlyName="Emulators for Windows 10 Mobile (10.0.14393)" />
-    <SelectableItemCustomization Id="XamarinVSCoreV7" Hidden="no" Selected="no" FriendlyName="C#/.NET (Xamarin v4.2.1)" />
-    <SelectableItemCustomization Id="XamarinPT_V1" Selected="no" FriendlyName="Xamarin Preparation Tool" />
-    <SelectableItemCustomization Id="MDDJSCoreV11" Hidden="no" Selected="no" FriendlyName="HTML/JavaScript (Apache Cordova) Update 10" />
-    <SelectableItemCustomization Id="AndroidNDK11C_V1" Hidden="no" Selected="no" FriendlyName="Android Native Development Kit (R11C, 32 bits)" />
-    <SelectableItemCustomization Id="AndroidNDK11C_32_V1" Hidden="no" Selected="no" FriendlyName="Android Native Development Kit (R11C, 32 bits)" />
-    <SelectableItemCustomization Id="AndroidNDK11C_64_V1" Hidden="no" Selected="no" FriendlyName="Android Native Development Kit (R11C, 64 bits)" />
-    <SelectableItemCustomization Id="AndroidNDKV1" Hidden="no" Selected="no" FriendlyName="Android Native Development Kit (R10E, 32 bits)" />
-    <SelectableItemCustomization Id="AndroidNDK_32_V1" Hidden="no" Selected="no" FriendlyName="Android Native Development Kit (R10E, 32 bits)" />
-    <SelectableItemCustomization Id="AndroidNDK_64_V1" Hidden="no" Selected="no" FriendlyName="Android Native Development Kit (R10E, 64 bits)" />
-    <SelectableItemCustomization Id="AndroidSDKV1" Hidden="no" Selected="no" FriendlyName="Android SDK" />
-    <SelectableItemCustomization Id="AndroidSDK_API1921V1" Hidden="no" Selected="no" FriendlyName="Android SDK Setup (API Level 19 and 21)" />
-    <SelectableItemCustomization Id="AndroidSDK_API22V1" Hidden="no" Selected="no" FriendlyName="Android SDK Setup (API Level 22)" />
-    <SelectableItemCustomization Id="AndroidSDK_API23V1" Hidden="no" Selected="no" FriendlyName="Android SDK Setup (API Level 23)" />
-    <SelectableItemCustomization Id="AntV1" Hidden="no" Selected="no" FriendlyName="Apache Ant (1.9.3)" />
-    <SelectableItemCustomization Id="L_MDDCPlusPlus_iOS_V7" Hidden="no" Selected="no" FriendlyName="Visual C++ iOS Development (Update 3)" />
-    <SelectableItemCustomization Id="L_MDDCPlusPlus_Android_V7" Hidden="no" Selected="no" FriendlyName="Visual C++ Android Development (Update 3)" />
-    <SelectableItemCustomization Id="L_MDDCPlusPlus_ClangC2_V6" Hidden="no" Selected="no" FriendlyName="Clang with Microsoft CodeGen (July 2016)" />
-    <SelectableItemCustomization Id="L_IncrediBuild_V1" Selected="no" FriendlyName="IncrediBuild" />
-    <SelectableItemCustomization Id="JavaJDKV1" Hidden="no" Selected="no" FriendlyName="Java SE Development Kit (7.0.550.13)" />
-    <SelectableItemCustomization Id="Node.jsV1" Hidden="no" Selected="no" FriendlyName="Joyent Node.js" />
-    <SelectableItemCustomization Id="VSEmu_AndroidV1.1.622.2" Hidden="no" Selected="no" FriendlyName="Microsoft Visual Studio Emulator for Android (July 2016)" />
-    <SelectableItemCustomization Id="WebSocket4NetV1" Hidden="no" Selected="no" FriendlyName="WebSocket4Net" />
-    <SelectableItemCustomization Id="ToolsForWin81_WP80_WP81V1" Hidden="no" Selected="no" FriendlyName="Tools and Windows SDKs" />
-    <SelectableItemCustomization Id="WindowsPhone81EmulatorsV1" Hidden="no" Selected="no" FriendlyName="Emulators for Windows Phone 8.1" />
-    <SelectableItemCustomization Id="GitForWindowsx64V7" Hidden="no" Selected="no" FriendlyName="Git for Windows" />
-    <SelectableItemCustomization Id="GitForWindowsx86V7" Hidden="no" Selected="no" FriendlyName="Git for Windows" />
-    <SelectableItemCustomization Id="GitHubVSV1" Hidden="no" Selected="no" FriendlyName="GitHub Extension for Visual Studio" />
-    <SelectableItemCustomization Id="VS_SDK_GroupV5" Hidden="no" Selected="no" FriendlyName="Visual Studio Extensibility Tools Update 3" />
-    <SelectableItemCustomization Id="VS_SDK_Breadcrumb_GroupV5" Selected="no" FriendlyName="Visual Studio Extensibility Tools Update 3" />
-    <SelectableItemCustomization Id="Win10_VSToolsV13" Hidden="no" Selected="no" FriendlyName="Tools for Universal Windows Apps (1.4.1) and Windows 10 SDK (10.0.14393)" />
-    <SelectableItemCustomization Id="Win10SDK_HiddenV1" Hidden="no" Selected="no" FriendlyName="Windows 10 SDK (10.0.10240)" />
-    <SelectableItemCustomization Id="Win10SDK_HiddenV2" Selected="no" FriendlyName="Windows 10 SDK (10.0.10586)" />
-    <SelectableItemCustomization Id="Win10SDK_HiddenV3" Hidden="no" Selected="no" FriendlyName="Windows 10 SDK (10.0.10586)" />
-    <SelectableItemCustomization Id="Win10SDK_HiddenV4" Selected="no" FriendlyName="Windows 10 SDK (10.0.14393)" />
-    <SelectableItemCustomization Id="Win10SDK_VisibleV1" Hidden="no" Selected="no" FriendlyName="Windows 10 SDK 10.0.10240" />
-    <SelectableItemCustomization Id="UWPPatch_KB3073097_HiddenV3" Selected="no" FriendlyName="KB3073097" />
-    <SelectableItemCustomization Id="AppInsightsToolsVSWinExpressHiddenVSU3RTMV1" Selected="no" FriendlyName="Developer Analytics Tools v7.0.2" />
-    <SelectableItemCustomization Id="AppInsightsToolsVWDExpressHiddenVSU3RTMV1" Selected="no" FriendlyName="Developer Analytics Tools v7.0.2" />
-    <SelectableItemCustomization Id="UWPStartPageV1" Selected="no" FriendlyName="Tools for Universal Windows Apps Getting Started Experience" />
-  </SelectableItemCustomizations>
-</AdminDeploymentCustomizations>
\ No newline at end of file
diff --git a/packer/windows/winrm.cloud-init b/packer/windows/winrm.cloud-init
deleted file mode 100644
index 8195a8e..0000000
--- a/packer/windows/winrm.cloud-init
+++ /dev/null
@@ -1,26 +0,0 @@
-<powershell>
-$ErrorActionPreference = "Stop";
-
-Set-ExecutionPolicy Unrestricted
-
-write-host "Setting up WinRM"
-
-cmd /c winrm quickconfig -q
-cmd /c winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="8000"}'
-cmd /c winrm set winrm/config/winrs '@{MaxShellsPerUser="5"}'
-cmd /c winrm set winrm/config '@{MaxTimeoutms="1800000"}'
-cmd /c winrm set winrm/config/service '@{AllowUnencrypted="true"}'
-cmd /c winrm set winrm/config/service/auth '@{Basic="true"}'
-
-cmd /c net stop winrm
-# Will restart on reboot
-
-cmd /c netsh advfirewall firewall add rule name="WinRM 5985" protocol=TCP dir=in localport=5985 action=allow
-cmd /c netsh advfirewall firewall add rule name="WinRM 5986" protocol=TCP dir=in localport=5986 action=allow
-
-cmd /c sc config winrm start= auto
-
-write-host "WinRM ready"
-cmd /c net start winrm
-
-</powershell>
\ No newline at end of file
diff --git a/sni-test-config/docker-compose.yml b/sni-test-config/docker-compose.yml
index b0a6100..0ccf7f9 100644
--- a/sni-test-config/docker-compose.yml
+++ b/sni-test-config/docker-compose.yml
@@ -20,8 +20,8 @@
     container_name: 'geode'
     image: 'apachegeode/geode'
     expose:
-      - '10334'
-      - '40404'
+      - '20220'
+      - '20221'
     entrypoint: 'sh'
     command: ["-c", "while true; do sleep 600; done"]
     networks:
diff --git a/sni-test-config/haproxy.cfg b/sni-test-config/haproxy.cfg
index c451ef6..32b3a38 100644
--- a/sni-test-config/haproxy.cfg
+++ b/sni-test-config/haproxy.cfg
@@ -33,12 +33,12 @@
 
 backend locators-maeve
   mode tcp
-  server locator1 geode:10334
+  server locator1 geode:20220
 
 backend servers-dolores
   mode tcp
-  server server1 geode:40404
+  server server1 geode:20221
 
 backend servers-clementine
   mode tcp
-  server server1 geode:40405
+  server server1 geode:20222
diff --git a/sni-test-config/scripts/geode-starter.gfsh b/sni-test-config/scripts/geode-starter.gfsh
index 9ceecad..b1be771 100644
--- a/sni-test-config/scripts/geode-starter.gfsh
+++ b/sni-test-config/scripts/geode-starter.gfsh
@@ -15,8 +15,8 @@
 # limitations under the License.
 #
 
-start locator --name=locator-maeve --hostname-for-clients=locator-maeve --properties-file=/geode/config/gemfire.properties --security-properties-file=/geode/config/gfsecurity.properties --J=-Dgemfire.ssl-keystore=/geode/config/locator-maeve-keystore.jks
-start server --name=server-dolores --max-heap=256m --hostname-for-clients=server-dolores --locators=localhost[10334] --properties-file=/geode/config/gemfire.properties --security-properties-file=/geode/config/gfsecurity.properties --J=-Dgemfire.ssl-keystore=/geode/config/server-dolores-keystore.jks
-connect --locator=localhost[10334] --use-ssl=true --security-properties-file=/geode/config/gfsecurity.properties
+start locator --port=20220 --name=locator-maeve --hostname-for-clients=locator-maeve --properties-file=/geode/config/gemfire.properties --security-properties-file=/geode/config/gfsecurity.properties --J=-Dgemfire.ssl-keystore=/geode/config/locator-maeve-keystore.jks
+start server --server-port=20221 --name=server-dolores --max-heap=256m --hostname-for-clients=server-dolores --locators=localhost[20220] --properties-file=/geode/config/gemfire.properties --security-properties-file=/geode/config/gfsecurity.properties --J=-Dgemfire.ssl-keystore=/geode/config/server-dolores-keystore.jks
+connect --locator=localhost[20220] --use-ssl=true --security-properties-file=/geode/config/gfsecurity.properties
 create region --name=jellyfish --type=REPLICATE
 
diff --git a/sqliteimpl/SqLiteHelper.cpp b/sqliteimpl/SqLiteHelper.cpp
index e6ec651..8c37415 100644
--- a/sqliteimpl/SqLiteHelper.cpp
+++ b/sqliteimpl/SqLiteHelper.cpp
@@ -15,14 +15,12 @@
  * limitations under the License.
  */
 
-#include <string.h>
-
 #include "SqLiteHelper.hpp"
 
-#define QUERY_SIZE 512
+#include <string.h>
 
-int SqLiteHelper::initDB(const char *regionName, int maxPageCount, int pageSize,
-                         const char *regionDBfile, int busy_timeout_ms) {
+int SqLiteHelper::initDB(const char* regionName, int maxPageCount, int pageSize,
+                         const char* regionDBfile, int busy_timeout_ms) {
   // open the database
   int retCode = sqlite3_open(regionDBfile, &m_dbHandle);
   if (retCode == SQLITE_OK) {
@@ -48,15 +46,13 @@
 
 int SqLiteHelper::createTable() {
   // construct query
-  char query[QUERY_SIZE];
-  SNPRINTF(query, QUERY_SIZE,
-           "CREATE TABLE IF NOT EXISTS %s(key BLOB PRIMARY KEY,value BLOB);",
-           m_tableName);
-  sqlite3_stmt *stmt;
+  auto query = std::string("CREATE TABLE IF NOT EXISTS ") + m_tableName +
+               "(key BLOB PRIMARY KEY, value BLOB);";
+  sqlite3_stmt* stmt;
 
   // prepare statement
   int retCode;
-  retCode = sqlite3_prepare_v2(m_dbHandle, query, -1, &stmt, nullptr);
+  retCode = sqlite3_prepare_v2(m_dbHandle, query.c_str(), -1, &stmt, nullptr);
 
   // execute statement
   if (retCode == SQLITE_OK) retCode = sqlite3_step(stmt);
@@ -64,15 +60,15 @@
   return retCode == SQLITE_DONE ? 0 : retCode;
 }
 
-int SqLiteHelper::insertKeyValue(void *keyData, int keyDataSize,
-                                 void *valueData, int valueDataSize) {
+int SqLiteHelper::insertKeyValue(void* keyData, int keyDataSize,
+                                 void* valueData, int valueDataSize) {
   // construct query
-  char query[QUERY_SIZE];
-  SNPRINTF(query, QUERY_SIZE, "REPLACE INTO %s VALUES(?,?);", m_tableName);
+  auto query = std::string("REPLACE INTO ") + m_tableName + " VALUES(?,?);";
 
   // prepare statement
-  sqlite3_stmt *stmt;
-  int retCode = sqlite3_prepare_v2(m_dbHandle, query, -1, &stmt, nullptr);
+  sqlite3_stmt* stmt;
+  int retCode =
+      sqlite3_prepare_v2(m_dbHandle, query.c_str(), -1, &stmt, nullptr);
   if (retCode == SQLITE_OK) {
     // bind parameters and execte statement
     sqlite3_bind_blob(stmt, 1, keyData, keyDataSize, nullptr);
@@ -84,14 +80,14 @@
   return retCode == SQLITE_DONE ? 0 : retCode;
 }
 
-int SqLiteHelper::removeKey(void *keyData, int keyDataSize) {
+int SqLiteHelper::removeKey(void* keyData, int keyDataSize) {
   // construct query
-  char query[QUERY_SIZE];
-  SNPRINTF(query, QUERY_SIZE, "DELETE FROM %s WHERE key=?;", m_tableName);
+  auto query = std::string("DELETE FROM ") + m_tableName + " WHERE key=?;";
 
   // prepare statement
-  sqlite3_stmt *stmt;
-  int retCode = sqlite3_prepare_v2(m_dbHandle, query, -1, &stmt, nullptr);
+  sqlite3_stmt* stmt;
+  int retCode =
+      sqlite3_prepare_v2(m_dbHandle, query.c_str(), -1, &stmt, nullptr);
   if (retCode == SQLITE_OK) {
     // bind parameters and execte statement
     sqlite3_bind_blob(stmt, 1, keyData, keyDataSize, nullptr);
@@ -102,27 +98,26 @@
   return retCode == SQLITE_DONE ? 0 : retCode;
 }
 
-int SqLiteHelper::getValue(void *keyData, int keyDataSize, void *&valueData,
-                           int &valueDataSize) {
+int SqLiteHelper::getValue(void* keyData, int keyDataSize, void*& valueData,
+                           int& valueDataSize) {
   // construct query
-  char query[QUERY_SIZE];
-  SNPRINTF(query, QUERY_SIZE,
-           "SELECT value, length(value) AS valLength FROM %s WHERE key=?;",
-           m_tableName);
+  auto query = std::string("SELECT value, length(value) AS valLength FROM ") +
+               m_tableName + " WHERE key=?;";
 
   // prepare statement
-  sqlite3_stmt *stmt;
-  int retCode = sqlite3_prepare_v2(m_dbHandle, query, -1, &stmt, nullptr);
+  sqlite3_stmt* stmt;
+  int retCode =
+      sqlite3_prepare_v2(m_dbHandle, query.c_str(), -1, &stmt, nullptr);
   if (retCode == SQLITE_OK) {
     // bind parameters and execte statement
     sqlite3_bind_blob(stmt, 1, keyData, keyDataSize, nullptr);
     retCode = sqlite3_step(stmt);
     if (retCode == SQLITE_ROW)  // we will get only one row
     {
-      void *tempBuff = const_cast<void *>(sqlite3_column_blob(stmt, 0));
+      void* tempBuff = const_cast<void*>(sqlite3_column_blob(stmt, 0));
       valueDataSize = sqlite3_column_int(stmt, 1);
       valueData =
-          reinterpret_cast<uint8_t *>(malloc(sizeof(uint8_t) * valueDataSize));
+          reinterpret_cast<uint8_t*>(malloc(sizeof(uint8_t) * valueDataSize));
       memcpy(valueData, tempBuff, valueDataSize);
       retCode = sqlite3_step(stmt);
     }
@@ -134,13 +129,12 @@
 
 int SqLiteHelper::dropTable() {
   // create query
-  char query[QUERY_SIZE];
-  SNPRINTF(query, QUERY_SIZE, "DROP TABLE %s;", m_tableName);
+  auto query = std::string("DROP TABLE ") + m_tableName + ";";
 
   // prepare statement
-  sqlite3_stmt *stmt;
+  sqlite3_stmt* stmt;
   int retCode;
-  retCode = sqlite3_prepare_v2(m_dbHandle, query, -1, &stmt, nullptr);
+  retCode = sqlite3_prepare_v2(m_dbHandle, query.c_str(), -1, &stmt, nullptr);
 
   // execute statement
   if (retCode == SQLITE_OK) retCode = sqlite3_step(stmt);
@@ -156,17 +150,15 @@
   return retCode;
 }
 
-int SqLiteHelper::executePragma(const char *pragmaName, int pragmaValue) {
+int SqLiteHelper::executePragma(const char* pragmaName, int pragmaValue) {
   // create query
-  char query[QUERY_SIZE];
-  char strVal[50];
-  SNPRINTF(strVal, 50, "%d", pragmaValue);
-  SNPRINTF(query, QUERY_SIZE, "PRAGMA %s = %s;", pragmaName, strVal);
+  auto query = std::string("PRAGMA ") + pragmaName + " = " +
+               std::to_string(pragmaValue) + ";";
 
   // prepare statement
-  sqlite3_stmt *stmt;
+  sqlite3_stmt* stmt;
   int retCode;
-  retCode = sqlite3_prepare_v2(m_dbHandle, query, -1, &stmt, nullptr);
+  retCode = sqlite3_prepare_v2(m_dbHandle, query.c_str(), -1, &stmt, nullptr);
 
   // execute PRAGMA
   if (retCode == SQLITE_OK &&
diff --git a/sqliteimpl/SqLiteHelper.hpp b/sqliteimpl/SqLiteHelper.hpp
index 3fea892..f5348d3 100644
--- a/sqliteimpl/SqLiteHelper.hpp
+++ b/sqliteimpl/SqLiteHelper.hpp
@@ -29,12 +29,6 @@
 #include <sys/stat.h>
 #endif
 
-#ifdef _WIN32
-#define SNPRINTF _snprintf
-#else
-#define SNPRINTF snprintf
-#endif
-
 class SqLiteHelper {
  public:
   int initDB(const char* regionName, int maxPageCount, int pageSize,
@@ -50,7 +44,6 @@
   sqlite3* m_dbHandle;
 
   const char* m_tableName;
-  // std::string regionName;
   int dropTable();
   int createTable();
   int executePragma(const char* pragmaName, int pragmaValue);
diff --git a/sqliteimpl/SqLiteImpl.cpp b/sqliteimpl/SqLiteImpl.cpp
index 96a86df..f1acb09 100644
--- a/sqliteimpl/SqLiteImpl.cpp
+++ b/sqliteimpl/SqLiteImpl.cpp
@@ -15,10 +15,11 @@
  * limitations under the License.
  */
 
-#include <geode/Region.hpp>
-#include <geode/Cache.hpp>
-
 #include "SqLiteImpl.hpp"
+
+#include <geode/Cache.hpp>
+#include <geode/Region.hpp>
+
 #include "sqliteimpl_export.h"
 
 #ifdef _WIN32
@@ -37,8 +38,8 @@
 static constexpr char const* PAGE_SIZE = "PageSize";
 static constexpr char const* PERSISTENCE_DIR = "PersistenceDirectory";
 
-void SqLiteImpl::init(const std::shared_ptr<Region> &region,
-                      const std::shared_ptr<Properties> &diskProperties) {
+void SqLiteImpl::init(const std::shared_ptr<Region>& region,
+                      const std::shared_ptr<Properties>& diskProperties) {
   // Set the default values
 
   int maxPageCount = 0;
@@ -107,21 +108,20 @@
   }
 }
 
-void SqLiteImpl::write(const std::shared_ptr<CacheableKey> &key,
-                       const std::shared_ptr<Cacheable> &value,
-                       std::shared_ptr<void> &) {
+void SqLiteImpl::write(const std::shared_ptr<CacheableKey>& key,
+                       const std::shared_ptr<Cacheable>& value,
+                       std::shared_ptr<void>&) {
   // Serialize key and value.
-  auto &cache = m_regionPtr->getCache();
+  auto& cache = m_regionPtr->getCache();
   auto keyDataBuffer = cache.createDataOutput();
   auto valueDataBuffer = cache.createDataOutput();
   size_t keyBufferSize, valueBufferSize;
 
   keyDataBuffer.writeObject(key);
   valueDataBuffer.writeObject(value);
-  void *keyData =
-      const_cast<uint8_t *>(keyDataBuffer.getBuffer(&keyBufferSize));
-  void *valueData =
-      const_cast<uint8_t *>(valueDataBuffer.getBuffer(&valueBufferSize));
+  void* keyData = const_cast<uint8_t*>(keyDataBuffer.getBuffer(&keyBufferSize));
+  void* valueData =
+      const_cast<uint8_t*>(valueDataBuffer.getBuffer(&valueBufferSize));
 
   if (m_sqliteHelper->insertKeyValue(keyData, static_cast<int>(keyBufferSize),
                                      valueData,
@@ -132,14 +132,13 @@
 
 bool SqLiteImpl::writeAll() { return true; }
 std::shared_ptr<Cacheable> SqLiteImpl::read(
-    const std::shared_ptr<CacheableKey> &key, const std::shared_ptr<void> &) {
+    const std::shared_ptr<CacheableKey>& key, const std::shared_ptr<void>&) {
   // Serialize key.
   auto keyDataBuffer = m_regionPtr->getCache().createDataOutput();
   size_t keyBufferSize;
   keyDataBuffer.writeObject(key);
-  void *keyData =
-      const_cast<uint8_t *>(keyDataBuffer.getBuffer(&keyBufferSize));
-  void *valueData;
+  void* keyData = const_cast<uint8_t*>(keyDataBuffer.getBuffer(&keyBufferSize));
+  void* valueData;
   int valueBufferSize;
 
   if (m_sqliteHelper->getValue(keyData, static_cast<int>(keyBufferSize),
@@ -149,7 +148,7 @@
 
   // Deserialize object and return value.
   auto valueDataBuffer = m_regionPtr->getCache().createDataInput(
-      reinterpret_cast<uint8_t *>(valueData), valueBufferSize);
+      reinterpret_cast<uint8_t*>(valueData), valueBufferSize);
   std::shared_ptr<Cacheable> retValue;
   valueDataBuffer.readObject(retValue);
 
@@ -176,21 +175,22 @@
 #endif
 }
 
-void SqLiteImpl::destroy(const std::shared_ptr<CacheableKey> &key,
-                         const std::shared_ptr<void> &) {
+void SqLiteImpl::destroy(const std::shared_ptr<CacheableKey>& key,
+                         const std::shared_ptr<void>&) {
   // Serialize key and value.
   auto keyDataBuffer = m_regionPtr->getCache().createDataOutput();
   size_t keyBufferSize;
   keyDataBuffer.writeObject(key);
-  void *keyData =
-      const_cast<uint8_t *>(keyDataBuffer.getBuffer(&keyBufferSize));
+  void* keyData = const_cast<uint8_t*>(keyDataBuffer.getBuffer(&keyBufferSize));
   if (m_sqliteHelper->removeKey(keyData, static_cast<int>(keyBufferSize)) !=
       0) {
     throw IllegalStateException("Failed to destroy the key from SQLITE.");
   }
 }
 
-SqLiteImpl::SqLiteImpl() { m_sqliteHelper = std::unique_ptr<SqLiteHelper>(new SqLiteHelper()); }
+SqLiteImpl::SqLiteImpl() {
+  m_sqliteHelper = std::unique_ptr<SqLiteHelper>(new SqLiteHelper());
+}
 
 void SqLiteImpl::close() {
   m_sqliteHelper->closeDB();
@@ -215,7 +215,7 @@
 using apache::geode::client::PersistenceManager;
 using apache::geode::client::SqLiteImpl;
 
-SQLITEIMPL_EXPORT PersistenceManager *createSqLiteInstance() {
+SQLITEIMPL_EXPORT PersistenceManager* createSqLiteInstance() {
   return new SqLiteImpl();
 }
 }
diff --git a/templates/security/csharp/CMakeLists.txt b/templates/security/csharp/CMakeLists.txt
index 26751b1..c292f98 100644
--- a/templates/security/csharp/CMakeLists.txt
+++ b/templates/security/csharp/CMakeLists.txt
@@ -4,15 +4,33 @@
 # 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.
-cmake_minimum_required(VERSION 3.4)
-#project(templates.csharp.security)
 
-configure_file(securityImpl.csproj.in ${CMAKE_CURRENT_BINARY_DIR}/securityImpl.csproj)
\ No newline at end of file
+
+project(Apache.Geode.Templates.Cache.Security CSharp)
+
+add_library(Apache.Geode.Templates.Cache.Security SHARED
+  AssemblyInfo.cs
+  UserPasswordAuthInit.cs
+)
+
+target_link_libraries(Apache.Geode.Templates.Cache.Security
+  PUBLIC
+    Apache.Geode
+)
+
+set_target_properties(Apache.Geode.Templates.Cache.Security PROPERTIES
+  VS_GLOBAL_ROOTNAMESPACE Apache.Geode.Templates.Cache.Security
+  VS_GLOBAL_TreatWarningsAsErrors True
+  VS_GLOBAL_PROJECT_TYPES "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+  VS_DOTNET_REFERENCES "System;System.Xml;System.Data"
+  FOLDER cli/test/integration
+)
+
diff --git a/templates/security/csharp/securityImpl.csproj.in b/templates/security/csharp/securityImpl.csproj.in
deleted file mode 100644
index d547e6a..0000000
--- a/templates/security/csharp/securityImpl.csproj.in
+++ /dev/null
@@ -1,98 +0,0 @@
-<?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.
--->
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">X64</Platform>
-    <ProjectGuid>{D9F8A614-D117-491F-9E3A-B5F432E435AE}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Apache.Geode.Templates.Cache.Security</RootNamespace>
-    <AssemblyName>Apache.Geode.Templates.Cache.Security</AssemblyName>
-    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
-    <DebugSymbols>true</DebugSymbols>
-    <OutputPath>bin\x64\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DebugType>full</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <WarningLevel>4</WarningLevel>
-    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
-    <OutputPath>bin\x64\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <WarningLevel>4</WarningLevel>
-    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64'">
-    <OutputPath>bin\x64\RelWithDebInfo\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <WarningLevel>4</WarningLevel>
-    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="Apache.Geode.Client">
-      <HintPath>${GEODE_NATIVE_HOME}\bin\Apache.Geode.dll</HintPath>
-    </Reference>
-    <Reference Include="System" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="${CMAKE_SOURCE_DIR}\AssemblyInfo.cs">
-      <Link>AssemblyInfo.cs</Link>
-    </Compile>
-    <Compile Include="${CMAKE_SOURCE_DIR}\UserPasswordAuthInit.cs">
-      <Link>UserPasswordAuthInit.cs</Link>
-    </Compile>    
-  </ItemGroup>
-  <ItemGroup>
-    <Folder Include="Properties\" />
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <PropertyGroup>
-    <PostBuildEvent>copy $(TargetPath) ${GEODE_NATIVE_HOME}\bin\$(TargetFileName)</PostBuildEvent>
-  </PropertyGroup>  
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-</Project>
diff --git a/tests/cli/CMakeLists.txt b/tests/cli/CMakeLists.txt
index 1d81e62..ff8033b 100644
--- a/tests/cli/CMakeLists.txt
+++ b/tests/cli/CMakeLists.txt
@@ -13,42 +13,12 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.10)
-project(nativeclient.tests LANGUAGES NONE)
-
+add_subdirectory(DUnitFramework)
+add_subdirectory(FwkClient)
 add_subdirectory(QueryHelper)
 add_subdirectory(PdxClassLibrary)
+add_subdirectory(NewTestObject)
+add_subdirectory(PdxVersion1Lib)
+add_subdirectory(PdxVersion2Lib)
+add_subdirectory(SecurityUtil)
 
-set (NUNIT "C:\\Program Files (x86)\\NUnit 2.6.4")
-
-if (64 EQUAL ${BUILD_BITS})
-  set (NUNIT_CONSOLE "nunit-console")
-  set (PLATFORM x64)
-else()
-  set (NUNIT_CONSOLE "nunit-console-x86")
-  set (PLATFORM x86)
-endif()
-
-# Set the .NET Target Framework (Note: This should match the build for Apache.Geode.)
-
-foreach(var CMAKE_CURRENT_SOURCE_DIR CMAKE_SOURCE_DIR CMAKE_BINARY_DIR CMAKE_CURRENT_BINARY_DIR)
-  file(TO_NATIVE_PATH ${${var}} ${var}_NATIVE)
-endforeach()
-
-file(GLOB_RECURSE CSPROJECTS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.csproj.in")
-if(EXISTS "${STRONG_NAME_KEY}")
-  set(STRONG_NAME_KEY_ENABLED true)
-endif()
-
-foreach(FILE ${CSPROJECTS})
-  # TODO: make this a one line MATCH statement
-  string(REGEX REPLACE "\\.csproj.in" "" PROJDIR ${FILE})
-  string(REGEX REPLACE ".*/" "" PROJNAME ${PROJDIR})
-  configure_file(${FILE} ${CMAKE_CURRENT_BINARY_DIR}/${PROJNAME}/${PROJNAME}.csproj)
-  include_external_msproject(
-      ${PROJNAME}  ${CMAKE_CURRENT_BINARY_DIR}/${PROJNAME}/${PROJNAME}.csproj
-      TYPE FAE04EC0-301F-11D3-BF4B-00C04F79EFBC
-	  PLATFORM ${PLATFORM})
-  set_target_properties(${PROJNAME} PROPERTIES FOLDER cli/test/integration)
-
-endforeach()
diff --git a/tests/cli/DUnitFramework/CMakeLists.txt b/tests/cli/DUnitFramework/CMakeLists.txt
new file mode 100644
index 0000000..a37887c
--- /dev/null
+++ b/tests/cli/DUnitFramework/CMakeLists.txt
@@ -0,0 +1,54 @@
+# 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.
+
+cmake_minimum_required( VERSION 3.15 )
+project(DUnitFramework CSharp)
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/packages.config ${CMAKE_CURRENT_BINARY_DIR}/packages.config COPYONLY)
+
+add_library(DUnitFramework SHARED
+  packages.config
+  AssemblyInfo.cs
+  ClientBase.cs
+  ClientGroup.cs
+  CMakeLists.txt
+  DUnitTestClass.cs
+  Exceptions.cs
+  IClientServerComm.cs
+  Log.cs
+  ServerCommunication.cs
+  ServerConnection.cs
+  TimeBomb.cs
+  UnitProcess.cs
+  UnitThread.cs
+  Util.cs
+  XmlNodeReaderWriter.cs
+)
+
+target_link_libraries(DUnitFramework
+  PUBLIC
+    Apache.Geode
+)
+
+set_target_properties(DUnitFramework PROPERTIES
+  VS_GLOBAL_ROOTNAMESPACE Apache.Geode.DUnitFramework
+  VS_GLOBAL_TreatWarningsAsErrors True
+  VS_GLOBAL_PROJECT_TYPES "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+  VS_DOTNET_REFERENCES "System;System.Xml;System.Runtime.Remoting;System.Management"
+  VS_DOTNET_REFERENCE_NUnit "${CMAKE_BINARY_DIR}/packages/NUnit.2.6.4/lib/nunit.framework.dll"
+  FOLDER cli/test/integration
+)
+
+add_dependencies(DUnitFramework nuget-restore)
diff --git a/tests/cli/DUnitFramework/DUnitFramework.csproj.in b/tests/cli/DUnitFramework/DUnitFramework.csproj.in
deleted file mode 100755
index aa7c750..0000000
--- a/tests/cli/DUnitFramework/DUnitFramework.csproj.in
+++ /dev/null
@@ -1,156 +0,0 @@
-<?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.
--->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
-  <PropertyGroup>
-    <CMAKE_SOURCE_DIR>${CMAKE_SOURCE_DIR_NATIVE}</CMAKE_SOURCE_DIR>
-    <CMAKE_CURRENT_SOURCE_DIR>${CMAKE_CURRENT_SOURCE_DIR_NATIVE}</CMAKE_CURRENT_SOURCE_DIR>
-    <CMAKE_BINARY_DIR>${CMAKE_BINARY_DIR_NATIVE}</CMAKE_BINARY_DIR>
-    <CMAKE_CURRENT_BINARY_DIR>${CMAKE_CURRENT_BINARY_DIR_NATIVE}</CMAKE_CURRENT_BINARY_DIR>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">x64</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{B2F8AE2D-3E73-3A99-BFD2-FF0B7B55C780}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Apache.Geode.DUnitFramework</RootNamespace>
-    <AssemblyName>DUnitFramework</AssemblyName>
-    <SignAssembly>${STRONG_NAME_KEY_ENABLED}</SignAssembly>
-    <AssemblyOriginatorKeyFile>${STRONG_NAME_KEY}</AssemblyOriginatorKeyFile>
-    <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
-    <FileUpgradeFlags>
-    </FileUpgradeFlags>
-    <OldToolsVersion>2.0</OldToolsVersion>
-    <UpgradeBackupLocation />
-    <PublishUrl>publish\</PublishUrl>
-    <Install>true</Install>
-    <InstallFrom>Disk</InstallFrom>
-    <UpdateEnabled>false</UpdateEnabled>
-    <UpdateMode>Foreground</UpdateMode>
-    <UpdateInterval>7</UpdateInterval>
-    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
-    <UpdatePeriodically>false</UpdatePeriodically>
-    <UpdateRequired>false</UpdateRequired>
-    <MapFileExtensions>true</MapFileExtensions>
-    <ApplicationRevision>0</ApplicationRevision>
-    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
-    <IsWebBootstrapper>false</IsWebBootstrapper>
-    <UseApplicationTrust>false</UseApplicationTrust>
-    <BootstrapperEnabled>true</BootstrapperEnabled>
-    <TargetFrameworkProfile />
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
-    <DebugSymbols>true</DebugSymbols>
-    <IntermediateOutputPath>Debug</IntermediateOutputPath>
-    <OutputPath>Debug</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <WarningLevel>4</WarningLevel>
-    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <IntermediateOutputPath>Release</IntermediateOutputPath>
-    <OutputPath>Release</OutputPath>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <WarningLevel>4</WarningLevel>
-    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' ">
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <IntermediateOutputPath>RelWithDebInfo</IntermediateOutputPath>
-    <OutputPath>RelWithDebInfo</OutputPath>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <WarningLevel>4</WarningLevel>
-    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="nunit.framework">
-      <HintPath>${NUNIT}\bin\framework\nunit.framework.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="System" />
-    <Reference Include="System.Management" />
-    <Reference Include="System.Runtime.Remoting" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DUnitFramework\AssemblyInfo.cs">
-      <Link>AssemblyInfo.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DUnitFramework\ClientBase.cs">
-      <Link>ClientBase.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DUnitFramework\ClientGroup.cs">
-      <Link>ClientGroup.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DUnitFramework\DUnitTestClass.cs">
-      <Link>DUnitTestClass.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DUnitFramework\Exceptions.cs">
-      <Link>Exceptions.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DUnitFramework\IClientServerComm.cs">
-      <Link>IClientServerComm.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DUnitFramework\Log.cs">
-      <Link>Log.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DUnitFramework\ServerCommunication.cs">
-      <Link>ServerCommunication.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DUnitFramework\ServerConnection.cs">
-      <Link>ServerConnection.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DUnitFramework\TimeBomb.cs">
-      <Link>TimeBomb.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DUnitFramework\UnitProcess.cs">
-      <Link>UnitProcess.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DUnitFramework\UnitThread.cs">
-      <Link>UnitThread.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DUnitFramework\Util.cs">
-      <Link>Util.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DUnitFramework\XmlNodeReaderWriter.cs">
-      <Link>XmlNodeReaderWriter.cs</Link>
-    </Compile>
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-</Project>
diff --git a/tests/cli/DUnitFramework/UnitProcess.cs b/tests/cli/DUnitFramework/UnitProcess.cs
index 50705a0..dbd0531 100644
--- a/tests/cli/DUnitFramework/UnitProcess.cs
+++ b/tests/cli/DUnitFramework/UnitProcess.cs
@@ -68,7 +68,6 @@
     #region Private members
 
     private static int m_clientId = 0;
-    private static int m_clientPort = Util.RandPort(20000, 40000) - 1;
     
     internal static Dictionary<string, ManualResetEvent> ProcessIDMap =
       new Dictionary<string, ManualResetEvent>();
@@ -206,8 +205,7 @@
 
     public static int GetClientPort()
     {
-      Interlocked.Increment(ref m_clientPort);
-      return m_clientPort;
+      return Util.GetAvailablePort();
     }
 
     private UnitProcess(string clientId)
diff --git a/tests/cli/DUnitFramework/Util.cs b/tests/cli/DUnitFramework/Util.cs
index 0a067b3..0114004 100644
--- a/tests/cli/DUnitFramework/Util.cs
+++ b/tests/cli/DUnitFramework/Util.cs
@@ -454,7 +454,7 @@
 
     private static Random m_rnd = new Random((int)DateTime.Now.Ticks);
     private static IDriverComm m_driverComm = null;
-    private static int m_driverPort = RandPort(20000, 40000);
+    private static int m_driverPort = 0;
     private static IPAddress m_ipAddress = null;
     private static IBBComm m_bbComm = null;
     private static string m_externalBBServer = null;
@@ -474,7 +474,12 @@
     private const string NoServerConnMsg = "Server connection not established.";
     private static Dictionary<UnitFnMethod, bool> m_testCompleteMap =
       new Dictionary<UnitFnMethod, bool>();
+    
 
+    static Util()
+    {
+      DriverPort = GetAvailablePort();
+    }
     #endregion
 
     /// <summary>
@@ -753,41 +758,20 @@
     }
 
     /// <summary>
-    /// Get a free random port in the given range.
+    /// Get a free ephemeral port.
     /// </summary>
-    /// <param name="min">
-    /// The inclusive lower bound of the random integer.
-    /// </param>
-    /// <param name="max">
-    /// The exclusive upper bound of the random integer.
-    /// </param>
     /// <returns>the free port number</returns>
-    public static int RandPort(int min, int max)
+    public static int GetAvailablePort()
     {
-      int portNo;
-      while (true)
+      Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+      try
       {
-        portNo = Rand(min, max);
-        Socket s = new Socket(AddressFamily.InterNetwork,
-          SocketType.Stream, ProtocolType.Tcp);
-        try
-        {
-          s.Bind(new IPEndPoint(IPAddress.Any, portNo));
-          s.Close();
-          return portNo;
-        }
-        catch (SocketException ex)
-        {
-          // EADDRINUSE?
-          if (ex.ErrorCode == 10048)
-          {
-            continue;
-          }
-          else
-          {
-            throw;
-          }
-        }
+        s.Bind(new IPEndPoint(IPAddress.Any, 0));
+        return ((IPEndPoint)s.LocalEndPoint).Port;
+      }
+      finally
+      {
+        s.Close();
       }
     }
 
@@ -827,16 +811,29 @@
       return StartProcess(procPath, procArgs, useShell, startDir, redirectStdOut,
       redirectStdIn, redirectStdErr, false, out proc);
     }
-    
+
     public static bool StartProcess(string procPath, string procArgs,
       bool useShell, string startDir, bool redirectStdOut,
       bool redirectStdIn, bool redirectStdErr, bool createNoWindow, out Process proc)
     {
+      return StartProcess(procPath, procArgs, useShell, startDir, redirectStdOut,
+        redirectStdIn, redirectStdErr, createNoWindow, new Dictionary<string, string>(), out proc);
+    }
+
+    public static bool StartProcess(string procPath, string procArgs,
+      bool useShell, string startDir, bool redirectStdOut,
+      bool redirectStdIn, bool redirectStdErr, bool createNoWindow, IDictionary<string, string> environment, out Process proc)
+    {
       ProcessStartInfo pInfo = new ProcessStartInfo(procPath, procArgs);
 
       // Force launch without a shell. This allows launching FwkClient.exe without a window so tests can run in CI.
       useShell = false;
 
+      foreach(var e in environment)
+      {
+        pInfo.EnvironmentVariables[e.Key] = e.Value;
+      }
+
       if (!useShell)
       {
         if (m_externalBBServer != null || createNoWindow)
diff --git a/tests/cli/DUnitFramework/packages.config b/tests/cli/DUnitFramework/packages.config
new file mode 100644
index 0000000..47b176b
--- /dev/null
+++ b/tests/cli/DUnitFramework/packages.config
@@ -0,0 +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.
+-->
+<packages>
+  <package id="NUnit" version="2.6.4" targetFramework="net35" />
+</packages>
diff --git a/tests/cli/FwkClient/CMakeLists.txt b/tests/cli/FwkClient/CMakeLists.txt
new file mode 100644
index 0000000..6e2cef2
--- /dev/null
+++ b/tests/cli/FwkClient/CMakeLists.txt
@@ -0,0 +1,38 @@
+# 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.
+
+cmake_minimum_required( VERSION 3.15 )
+project(FwkClient CSharp)
+
+add_executable(FwkClient
+  AssemblyInfo.cs
+  ClientComm.cs
+  ClientProcess.cs
+  App.config
+)
+
+target_link_libraries(FwkClient
+  PUBLIC
+    DUnitFramework
+)
+
+set_target_properties(FwkClient PROPERTIES
+  VS_GLOBAL_ROOTNAMESPACE Apache.Geode.Client.FwkClient
+  VS_GLOBAL_TreatWarningsAsErrors True
+  VS_GLOBAL_PROJECT_TYPES "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+  VS_DOTNET_REFERENCES "System;System.Xml;System.Runtime.Remoting;System.Management"
+  FOLDER cli/test/integration
+)
+
diff --git a/tests/cli/FwkClient/FwkClient.csproj.in b/tests/cli/FwkClient/FwkClient.csproj.in
deleted file mode 100644
index 9a2ef5b..0000000
--- a/tests/cli/FwkClient/FwkClient.csproj.in
+++ /dev/null
@@ -1,122 +0,0 @@
-<?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.
--->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
-  <PropertyGroup>
-    <CMAKE_SOURCE_DIR>${CMAKE_SOURCE_DIR_NATIVE}</CMAKE_SOURCE_DIR>
-    <CMAKE_CURRENT_SOURCE_DIR>${CMAKE_CURRENT_SOURCE_DIR_NATIVE}</CMAKE_CURRENT_SOURCE_DIR>
-    <CMAKE_BINARY_DIR>${CMAKE_BINARY_DIR_NATIVE}</CMAKE_BINARY_DIR>
-    <CMAKE_CURRENT_BINARY_DIR>${CMAKE_CURRENT_BINARY_DIR_NATIVE}</CMAKE_CURRENT_BINARY_DIR>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">x64</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{0A33CB39-D33F-39B2-BB11-B0A555805177}</ProjectGuid>
-    <OutputType>Exe</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Apache.Geode.Client.FwkClient</RootNamespace>
-    <AssemblyName>FwkClient</AssemblyName>
-    <SignAssembly>${STRONG_NAME_KEY_ENABLED}</SignAssembly>
-    <AssemblyOriginatorKeyFile>${STRONG_NAME_KEY}</AssemblyOriginatorKeyFile>
-    <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
-    <FileUpgradeFlags>
-    </FileUpgradeFlags>
-    <OldToolsVersion>2.0</OldToolsVersion>
-    <UpgradeBackupLocation />
-    <PublishUrl>publish\</PublishUrl>
-    <Install>true</Install>
-    <InstallFrom>Disk</InstallFrom>
-    <UpdateEnabled>false</UpdateEnabled>
-    <UpdateMode>Foreground</UpdateMode>
-    <UpdateInterval>7</UpdateInterval>
-    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
-    <UpdatePeriodically>false</UpdatePeriodically>
-    <UpdateRequired>false</UpdateRequired>
-    <MapFileExtensions>true</MapFileExtensions>
-    <ApplicationRevision>0</ApplicationRevision>
-    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
-    <IsWebBootstrapper>false</IsWebBootstrapper>
-    <UseApplicationTrust>false</UseApplicationTrust>
-    <BootstrapperEnabled>true</BootstrapperEnabled>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
-    <DebugSymbols>true</DebugSymbols>
-    <Optimize>false</Optimize>
-    <IntermediateOutputPath>Debug</IntermediateOutputPath>
-    <OutputPath>Debug</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DebugType>full</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <IntermediateOutputPath>Release</IntermediateOutputPath>
-    <OutputPath>Release</OutputPath>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <WarningLevel>4</WarningLevel>
-    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' ">
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <IntermediateOutputPath>RelWithDebInfo</IntermediateOutputPath>
-    <OutputPath>RelWithDebInfo</OutputPath>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <WarningLevel>4</WarningLevel>
-    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="System.Runtime.Remoting" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\FwkClient\AssemblyInfo.cs">
-      <Link>AssemblyInfo.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\FwkClient\ClientComm.cs">
-      <Link>ClientComm.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\FwkClient\ClientProcess.cs">
-      <Link>ClientProcess.cs</Link>
-    </Compile>
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\DUnitFramework\DUnitFramework.csproj">
-      <Project>{796727E8-3A6A-46BE-A2DB-584A4774CD51}</Project>
-      <Name>DUnitFramework</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target> -->
-  <!--<Target Name="AfterBuild">
-    <Copy SourceFiles="$(OSBUILDDIR)\tests\clicache\FwkClient\FwkClient.exe.config" DestinationFolder="$(OSBUILDDIR)\tests\clicache\UnitTests" />
-  </Target>-->
-</Project>
diff --git a/tests/cli/FwkLauncher/FwkLauncher.csproj.in b/tests/cli/FwkLauncher/FwkLauncher.csproj.txt
similarity index 97%
rename from tests/cli/FwkLauncher/FwkLauncher.csproj.in
rename to tests/cli/FwkLauncher/FwkLauncher.csproj.txt
index 8396fb7..9152e76 100644
--- a/tests/cli/FwkLauncher/FwkLauncher.csproj.in
+++ b/tests/cli/FwkLauncher/FwkLauncher.csproj.txt
@@ -30,8 +30,6 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>Apache.Geode.Client.FwkLauncher</RootNamespace>
     <AssemblyName>FwkLauncher</AssemblyName>
-    <SignAssembly>${STRONG_NAME_KEY_ENABLED}</SignAssembly>
-    <AssemblyOriginatorKeyFile>${STRONG_NAME_KEY}</AssemblyOriginatorKeyFile>
     <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
     <FileUpgradeFlags>
     </FileUpgradeFlags>
diff --git a/tests/cli/FwkUtil/FwkUtil.csproj.in b/tests/cli/FwkUtil/FwkUtil.csproj.txt
similarity index 97%
rename from tests/cli/FwkUtil/FwkUtil.csproj.in
rename to tests/cli/FwkUtil/FwkUtil.csproj.txt
index 8e49b59..c0058f3 100644
--- a/tests/cli/FwkUtil/FwkUtil.csproj.in
+++ b/tests/cli/FwkUtil/FwkUtil.csproj.txt
@@ -30,8 +30,6 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>Apache.Geode.Client.FwkLib</RootNamespace>
     <AssemblyName>FwkUtil</AssemblyName>
-    <SignAssembly>${STRONG_NAME_KEY_ENABLED}</SignAssembly>
-    <AssemblyOriginatorKeyFile>${STRONG_NAME_KEY}</AssemblyOriginatorKeyFile>
     <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
     <FileUpgradeFlags>
     </FileUpgradeFlags>
diff --git a/tests/cli/NewFwkLib/AssemblyInfo.cs b/tests/cli/NewFwkLib/AssemblyInfo.cs
deleted file mode 100644
index 58af713..0000000
--- a/tests/cli/NewFwkLib/AssemblyInfo.cs
+++ /dev/null
@@ -1,49 +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.
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following 
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("NewFwkLib")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyProduct("NewFwkLib")]
-[assembly: AssemblyCopyright("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.")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible 
-// to COM components.  If you need to access a type in this assembly from 
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("9d51841c-4400-4bb4-95c9-15a8e6c14b38")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/tests/cli/NewFwkLib/CacheHelper.cs b/tests/cli/NewFwkLib/CacheHelper.cs
deleted file mode 100644
index 8c178c0..0000000
--- a/tests/cli/NewFwkLib/CacheHelper.cs
+++ /dev/null
@@ -1,482 +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.
- */
-
-using System;
-using System.Diagnostics;
-using System.IO;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Xml;
-
-#pragma warning disable 618
-
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.DUnitFramework;
-  using Apache.Geode.Client;
-  //using Region = Apache.Geode.Client.IRegion<Object, Object>;
-  //using IntRegion = Apache.Geode.Client.IRegion<int, byte[]>;
-  //using StringRegion = Apache.Geode.Client.IRegion<string, byte[]>;
-  using VMW = Apache.Geode.Client;
-  public class PropsStringToObject
-  {
-    public PropsStringToObject(Properties<string, object> target)
-    {
-      m_target = target;
-    }
-
-    public void Visit(string key, string val)
-    {
-      if (key == "security-signature")
-      {
-        string[] stringbytes = val.Split(' ');
-        byte[] credentialbytes = new byte[stringbytes.Length - 1];
-        int position = 0;
-        foreach (string item in stringbytes)
-        {
-          if (string.IsNullOrEmpty(item)) continue;
-          credentialbytes[position++] = byte.Parse(item);
-        }
-        m_target.Insert(key, credentialbytes);
-      }
-      else
-      {
-        m_target.Insert(key, val);
-      }
-    }
-    private Properties<string, object> m_target;
-  }
-
-  public class PropsObjectToObject
-  {
-    public PropsObjectToObject(Properties<string, object> target)
-    {
-      m_target = target;
-    }
-
-    public void Visit(string key, object val)
-    {
-      if (key == "security-signature")
-      {
-        string strval = (string)val;
-        string[] stringbytes = strval.Split(' ');
-        byte[] credentialbytes = new byte[stringbytes.Length - 1];
-        int position = 0;
-        foreach (string item in stringbytes)
-        {
-          if (string.IsNullOrEmpty(item)) continue;
-          credentialbytes[position++] = byte.Parse(item);
-        }
-        m_target.Insert(key, credentialbytes);
-      }
-      else
-      {
-        m_target.Insert(key, val);
-      }
-    }
-    private Properties<string, object> m_target;
-  }
-
-  /// <summary>
-  /// Helper class to create/destroy Distributed System, cache and regions.
-  /// This class is intentionally not thread-safe.
-  /// </summary>
-  public class CacheHelper<TKey, TVal>
-  {
-    #region Private static members and constants
-
-    private static Cache m_cache = null;
-    private static IRegion<TKey,TVal> m_currRegion = null;
-
-    private const string DefaultDSName = "dstest";
-    private const string DefaultCacheName = "cachetest";
-
-    private static char PathSep = Path.DirectorySeparatorChar;
-    #endregion
-
-    #region Private Utility functions
-
-
-    private static void FwkInfo(string message)
-    {
-      if (FwkTest<TKey, TVal>.CurrentTest != null)
-      {
-        FwkTest<TKey, TVal>.CurrentTest.FwkInfo(message);
-      }
-    }
-
-    private static void FwkInfo(string fmt, params object[] paramList)
-    {
-      if (FwkTest<TKey, TVal>.CurrentTest != null)
-      {
-        FwkTest<TKey, TVal>.CurrentTest.FwkInfo(fmt, paramList);
-      }
-    }
-
-    private static void FwkAssert(bool condition, string message)
-    {
-      if (FwkTest<TKey, TVal>.CurrentTest != null)
-      {
-        FwkTest<TKey, TVal>.CurrentTest.FwkAssert(condition, message);
-      }
-    }
-
-    private static void FwkAssert(bool condition, string fmt,
-      params object[] paramList)
-    {
-      if (FwkTest<TKey, TVal>.CurrentTest != null)
-      {
-        FwkTest<TKey, TVal>.CurrentTest.FwkAssert(condition, fmt, paramList);
-      }
-    }
-
-    #endregion
-
-    #region Public accessors
-
-    public static Cache DCache
-    {
-      get
-      {
-        return m_cache;
-      }
-      set
-      {
-        m_cache = value;
-      }
-    }
-    public static IRegion<TKey,TVal> CurrentRegion
-    {
-      get
-      {
-        return m_currRegion;
-      }
-    }
-
-    #endregion
-
-    #region Functions to initialize or close a cache and distributed system
-
-
-    public static void Init()
-    {
-      InitConfig(null, null, false);
-    }
-    public static Properties<string, object> GetPkcsCredentialsForMU(Properties<string, string> credentials)
-    {
-      if (credentials == null)
-        return null;
-      var target = Properties<string, object>.Create();
-      var psto = new PropsStringToObject(target);
-      credentials.ForEach(new PropertyVisitorGeneric<string, string>(psto.Visit));
-      return target;
-    }
-    public static Properties<string, object> GetPkcsCredentialsForMU(Properties<string, object> credentials)
-    {
-      if (credentials == null)
-        return null;
-      var target = Properties<string, object>.Create();
-      var poto = new PropsObjectToObject(target);
-      credentials.ForEach(new PropertyVisitorGeneric<string, object>(poto.Visit));
-      return target;
-    }
-
-    public static void InitConfig(Properties<string,string> config)
-    {
-      InitConfig(config, null, false);
-    }
-
-    public static void InitConfigPdxReadSerialized(Properties<string, string> dsProps, bool PdxReadSerialized)
-    {
-      InitConfig(dsProps, null, PdxReadSerialized);
-    }
-
-    public static void InitConfigPool(Properties<string,string> dsProps)
-    {
-      InitConfig(dsProps, null, false);
-    }
-
-    public static void InitConfig(string cacheXml)
-    {
-      InitConfig(null, cacheXml, false);
-    }
-
-    public static void InitConfig(Properties<string,string> config,
-      string cacheXml, bool PdxReadSerialized)
-    {
-      string geodeNativePropsFile = Util.AssemblyDir + "/geode.properties";
-      if (File.Exists(geodeNativePropsFile))
-      {
-        Properties<string,string> newConfig = new Properties<string,string>();
-        newConfig.Load(geodeNativePropsFile);
-        if (config != null)
-        {
-          newConfig.AddAll(config);
-        }
-        config = newConfig;
-      }
-      //ConnectConfig(dsName, config);
-      if (m_cache == null || m_cache.IsClosed)
-      {
-        try
-        {
-          CacheFactory cf = new CacheFactory(config);
-
-          if (cacheXml != null && cacheXml.Length > 0)
-          {
-            FwkInfo("seting cache-xml-file {0}", cacheXml);
-            cf = cf.Set("cache-xml-file", cacheXml);
-          }
-          
-          if (PdxReadSerialized)
-          {
-            FwkInfo("seting PdxReadSerialized {0}", PdxReadSerialized);
-            cf = new CacheFactory(config)
-                .SetPdxReadSerialized(PdxReadSerialized);
-          }
-          
-          m_cache = cf.Create();
-        }
-        catch (CacheExistsException)
-        {
-          m_cache = new CacheFactory(config).Create();
-        }
-      }
-
-    }
-
-    public static void InitConfigForPoolDurable(string durableClientId, int durableTimeout, string conflateEvents, bool isSslEnable)
-    {
-      Properties<string,string> config = new Properties<string,string>();
-      config.Insert("durable-client-id", durableClientId);
-      config.Insert("durable-timeout", durableTimeout.ToString() + "s");
-      if (conflateEvents != null && conflateEvents.Length > 0)
-      {
-        config.Insert("conflate-events", conflateEvents);
-      }
-      if (isSslEnable)
-      {
-        config.Insert("ssl-enabled", "true");
-        string keyStorePath = Util.GetFwkLogDir(Util.SystemType) + "/data/keystore";
-        string pubkey = keyStorePath + "/client_truststore.pem";
-        string privkey = keyStorePath + "/client_keystore.pem";
-        config.Insert("ssl-keystore", privkey);
-        config.Insert("ssl-truststore", pubkey);
-      }
-      InitConfig(config, null,false);
-
-    }
-    public static void InitClient()
-    {
-      CacheHelper<TKey, TVal>.Close();
-      Properties<string,string> config = new Properties<string,string>();
-      CacheHelper<TKey, TVal>.InitConfig(config);
-    }
-
-    public static void Close()
-    {
-      CloseCache();
-    }
-
-    public static void CloseCache()
-    {
-      if (m_cache != null && !m_cache.IsClosed)
-      {
-        m_cache.Close();
-      }
-      m_cache = null;
-    }
-
-    public static void CloseKeepAlive()
-    {
-      CloseCacheKeepAlive();
-    }
-
-    public static void CloseCacheKeepAlive()
-    {
-      if (m_cache != null && !m_cache.IsClosed)
-      {
-        m_cache.Close(true);
-      }
-      m_cache = null;
-    }
-
-    #endregion
-
-    #region Functions to create or destroy a region
-
-    public static IRegion<TKey, TVal> CreateRegion(string name, RegionFactory attrs)
-    {
-
-      Init();
-      DestroyRegion(name, true, false);
-      IRegion<TKey, TVal> region = attrs.Create<TKey, TVal>(name);
-      FwkAssert(region != null, "Region {0} was not created.", name);
-      m_currRegion = region;
-      return region;
-    }
-    
-    public static void DestroyRegion(string name, bool local, bool verify)
-    {
-      IRegion<TKey, TVal> region;
-      if (verify)
-      {
-        region = GetVerifyRegion(name);
-      }
-      else
-      {
-        region = GetRegion(name);
-      }
-      if (region != null)
-      {
-        if (local)
-        {
-          region.GetLocalView().DestroyRegion();
-        }
-        else
-        {
-          region.DestroyRegion();
-        }
-      }
-    }
-    
-    public static void DestroyAllRegions(bool local)
-    {
-      if (m_cache != null && !m_cache.IsClosed)
-      {
-        IRegion<TKey, TVal>[] regions = m_cache.RootRegions<TKey, TVal>();
-        if (regions != null)
-        {
-          foreach (IRegion<TKey, TVal> region in regions)
-          {
-            if (local)
-            {
-              region.GetLocalView().DestroyRegion();
-            }
-            else
-            {
-              region.DestroyRegion();
-            }
-          }
-        }
-      } 
-    }
-    public static void SetDCacheNull()
-    {
-      m_cache = null;
-    }
-    #endregion
-
-    #region Functions to obtain a region
-   
-    public static IRegion<TKey, TVal> GetRegion(string path)
-    {
-
-      if (m_cache != null)
-      {
-        return m_cache.GetRegion<TKey,TVal>(path);
-      }
-      return null;
-    }
-    
-    public static IRegion<TKey, TVal> GetVerifyRegion(string path)
-    {
-      IRegion<TKey, TVal> region = GetRegion(path);
-      FwkAssert(region != null, "Region [" + path + "] not found.");
-      FwkInfo("Found region '{0}'", path);
-      return region;
-    }
-    
-    #endregion
-
-    #region Utility functions
-
-    public static void LogKeys(ICacheableKey[] cKeys)
-    {
-      if (cKeys != null)
-      {
-        for (int i = 0; i < cKeys.Length; i++)
-        {
-          FwkInfo("Key [{0}] = {1}", i, cKeys[i]);
-        }
-      }
-    }
-
-    public static void LogValues(ISerializable[] cValues)
-    {
-      if (cValues != null)
-      {
-        for (int i = 0; i < cValues.Length; i++)
-        {
-          FwkInfo("Value [{0}] = {1}", i, cValues[i]);
-        }
-      }
-    }
-
-    public static string RegionTag(Apache.Geode.Client.RegionAttributes<TKey, TVal> attrs)
-    {
-      string tag = string.Empty;
-      tag += attrs.CachingEnabled ? "Caching" : "NoCache";
-      tag += (attrs.CacheListener == null) ? "Nlstnr" : "Lstnr";
-      return tag;
-    }
-
-    public static string RegionAttributesToString(Apache.Geode.Client.RegionAttributes<TKey, TVal> attrs)
-    {
-      StringBuilder attrsSB = new StringBuilder();
-      attrsSB.Append(Environment.NewLine + "caching: " +
-        attrs.CachingEnabled);
-      attrsSB.Append(Environment.NewLine + "pool: " +
-        attrs.PoolName);
-       attrsSB.Append(Environment.NewLine + "initialCapacity: " +
-        attrs.InitialCapacity);
-      attrsSB.Append(Environment.NewLine + "loadFactor: " +
-        attrs.LoadFactor);
-      attrsSB.Append(Environment.NewLine + "concurrencyLevel: " +
-        attrs.ConcurrencyLevel);
-      attrsSB.Append(Environment.NewLine + "lruEntriesLimit: " +
-        attrs.LruEntriesLimit);
-      attrsSB.Append(Environment.NewLine + "lruEvictionAction: " +
-        attrs.LruEvictionAction);
-      attrsSB.Append(Environment.NewLine + "entryTimeToLive: " +
-        attrs.EntryTimeToLive);
-      attrsSB.Append(Environment.NewLine + "entryTimeToLiveAction: " +
-        attrs.EntryTimeToLiveAction);
-      attrsSB.Append(Environment.NewLine + "entryIdleTimeout: " +
-        attrs.EntryIdleTimeout);
-      attrsSB.Append(Environment.NewLine + "entryIdleTimeoutAction: " +
-        attrs.EntryIdleTimeoutAction);
-      attrsSB.Append(Environment.NewLine + "regionTimeToLive: " +
-        attrs.RegionTimeToLive);
-      attrsSB.Append(Environment.NewLine + "regionTimeToLiveAction: " +
-        attrs.RegionTimeToLiveAction);
-      attrsSB.Append(Environment.NewLine + "regionIdleTimeout: " +
-        attrs.RegionIdleTimeout);
-      attrsSB.Append(Environment.NewLine + "regionIdleTimeoutAction: " +
-        attrs.RegionIdleTimeoutAction);
-      attrsSB.AppendFormat("{0}cacheLoader: {1}",Environment.NewLine, attrs.CacheLoader != null ? "Enabled" : "Disabled");
-      attrsSB.AppendFormat("{0}cacheWriter: {1}", Environment.NewLine,attrs.CacheWriter != null ? "Enabled" : "Disabled");
-      attrsSB.AppendFormat("{0}cacheListener: {1}", Environment.NewLine, attrs.CacheListener != null ? "Enabled" : "Disabled");
-      attrsSB.Append(Environment.NewLine + "concurrency-checks-enabled: " +
-        attrs.ConcurrencyChecksEnabled);
-      attrsSB.Append(Environment.NewLine);
-      return attrsSB.ToString();
-    }
-
-    #endregion
-  }
-}
diff --git a/tests/cli/NewFwkLib/CacheServer.cs b/tests/cli/NewFwkLib/CacheServer.cs
deleted file mode 100644
index afa1025..0000000
--- a/tests/cli/NewFwkLib/CacheServer.cs
+++ /dev/null
@@ -1,4890 +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.
- */
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using System.Threading;
-using System.Reflection;
-using System.IO;
-using PdxTests;
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.DUnitFramework;
-  using Apache.Geode.Client.Tests;
-  using Apache.Geode.Client;
-  using QueryCategory = Apache.Geode.Client.Tests.QueryCategory;
-  using QueryStrings = Apache.Geode.Client.Tests.QueryStrings;
-  using QueryStatics = Apache.Geode.Client.Tests.QueryStatics;
-
-  public class SilenceListener<TKey, TVal> : CacheListenerAdapter<TKey, TVal>
-  {
-
-      long currentTimeInMillies()
-      {
-          long curruntMillis = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
-          return curruntMillis;
-      }
-    public override void AfterCreate(EntryEvent<TKey, TVal> ev)
-    {
-
-      Util.BBSet("ListenerBB", "lastEventTime", currentTimeInMillies());
-    }
-    public override void AfterUpdate(EntryEvent<TKey, TVal> ev)
-    {
-      Util.BBSet("ListenerBB", "lastEventTime", currentTimeInMillies());
-    }
-    public override void AfterDestroy(EntryEvent<TKey, TVal> ev)
-    {
-      Util.BBSet("ListenerBB", "lastEventTime", currentTimeInMillies());
-    }
-    public override void AfterInvalidate(EntryEvent<TKey, TVal> ev)
-    {
-      Util.BBSet("ListenerBB", "lastEventTime", currentTimeInMillies());
-    }
-  }
-  
-  public class MyCqListener<TKey, TResult> : ICqListener<TKey, TResult>
-  {
-    private UInt32 m_updateCnt;
-    private UInt32 m_createCnt;
-    private UInt32 m_destroyCnt;
-    private UInt32 m_eventCnt;
-
-    public MyCqListener()
-    {
-      m_updateCnt = 0;
-      m_createCnt = 0;
-      m_destroyCnt = 0;
-      m_eventCnt = 0;
-    }
-
-    public UInt32 NumInserts()
-    {
-      return m_createCnt;
-    }
-
-    public UInt32 NumUpdates()
-    {
-      return m_updateCnt;
-    }
-
-    public UInt32 NumDestroys()
-    {
-      return m_destroyCnt;
-    }
-
-    public UInt32 NumEvents()
-    {
-      return m_eventCnt;
-    }
-
-    public virtual void UpdateCount(CqEvent<TKey, TResult> ev)
-    {
-      m_eventCnt++;
-      CqOperation opType = ev.getQueryOperation();
-      if (opType == CqOperation.OP_TYPE_CREATE)
-      {
-        m_createCnt++;
-       // Util.Log("m_create is {0}",m_createCnt);
-      }
-      else if (opType == CqOperation.OP_TYPE_UPDATE)
-      {
-        m_updateCnt++;
-       // Util.Log("m_create is {0}", m_updateCnt);
-      }
-      else if (opType == CqOperation.OP_TYPE_DESTROY)
-      {
-        m_destroyCnt++;
-      //  Util.Log("m_create is {0}", m_destroyCnt);
-      }
-
-    }
-    public virtual void OnError(CqEvent<TKey, TResult> ev)
-    {
-      UpdateCount(ev);
-    }
-
-    public virtual void OnEvent(CqEvent<TKey, TResult> ev)
-    {
-      UpdateCount(ev);
-    }
-
-    public virtual void Close()
-    {
-    }
-  }
-  //----------------------------------- DoOpsTask start ------------------------
-    public class DoOpsTask<TKey, TVal> : ClientTask
-    {
-        private IRegion<TKey, TVal> m_region;
-        private  const int INVALIDATE             = 1;
-        private  const int LOCAL_INVALIDATE       = 2;
-        private  const int DESTROY                = 3;
-        private  const int LOCAL_DESTROY          = 4;
-        private  const int UPDATE_EXISTING_KEY    = 5;
-        private  const int GET                    = 6;
-        private  const int ADD_NEW_KEY            = 7;
-        private  const int PUTALL_NEW_KEY         = 8;
-        private  const int NUM_EXTRA_KEYS = 100;
-        private static bool m_istransaction = false;
-        CacheTransactionManager txManager = null;
-        private object CLASS_LOCK = new object();
-        private static string m_sharePath;
-        //Assembly m_pdxVersionOneAsm;
-        //Assembly m_pdxVersionTwoAsm;
-        protected int[] operations = { INVALIDATE, LOCAL_INVALIDATE, DESTROY, LOCAL_DESTROY, UPDATE_EXISTING_KEY, GET, ADD_NEW_KEY, PUTALL_NEW_KEY };
-        public DoOpsTask(IRegion<TKey, TVal> region, bool istransaction)
-            : base()
-        {
-            m_region = region;
-            m_istransaction = istransaction;
-            if(m_istransaction)
-                txManager = CacheHelper<TKey, TVal>.DCache.CacheTransactionManager;
-
-        }
-        public override void DoTask(int iters, object data)
-        {
-            Random random = new Random();
-            List<int> availableOps = new List<int>(operations);
-            if (m_istransaction)
-            {
-               availableOps.Remove(LOCAL_DESTROY);
-               availableOps.Remove(LOCAL_INVALIDATE);
-            }
-            while (Running && (availableOps.Count != 0))
-            {
-                int opcode = -1;
-                lock (CLASS_LOCK)
-                {
-                    bool doneWithOps = false;
-                    int i = random.Next(0, availableOps.Count);
-                    //try
-                    //{
-                        opcode = availableOps[i];
-                        if (m_istransaction)
-                        {
-                            //txManager = CacheHelper<TKey, TVal>.DCache.CacheTransactionManager;
-                            txManager.Begin();
-                        }
-                        switch (opcode)
-                        {
-                            case ADD_NEW_KEY:
-                                doneWithOps = addNewKey();
-                                break;
-                            case PUTALL_NEW_KEY:
-                                doneWithOps = putAllNewKey();
-                                break;
-                            case INVALIDATE:
-                                doneWithOps = invalidate();
-                                break;
-                            case DESTROY:
-                                doneWithOps = destroy();
-                                break;
-                            case UPDATE_EXISTING_KEY:
-                                doneWithOps = updateExistingKey();
-                                break;
-                            case GET:
-                                doneWithOps = get();
-                                break;
-                            case LOCAL_INVALIDATE:
-                                doneWithOps = localInvalidate();
-                                break;
-                            case LOCAL_DESTROY:
-                                doneWithOps = localDestroy();
-                                break;
-                            default:
-                                {
-                                    throw new Exception("Invalid operation specified:" + opcode);
-                                }
-                        }
-                        if (m_istransaction)// && (!doneWithOps))
-                        {
-                            try
-                            {
-                                txManager.Commit();
-                            }
-                           catch (CommitConflictException ex)
-                            {
-                                string errStr = ex.ToString();
-                                if ((errStr.IndexOf("REMOVED") >= 0) ||
-                                    (errStr.IndexOf("INVALID") >= 0) ||
-                                    (errStr.IndexOf("Deserializ") >= 0))
-                                {
-                                    throw new Exception("Test got " + errStr + ", but this error text " +
-                                          "might contain Geode internal values\n" + ex.Message);
-                                }
-                            }
-                           
-                        }
-                    
-                    if (doneWithOps)
-                    {
-                        availableOps.Remove(opcode);
-                    }
-                }
-            }
-         } //end doTask function
-
-         private TVal GetValue()
-         {
-             return GetValue(null);
-         }
-
-         private TVal GetValue(object value)
-         {
-             TVal tmpValue = default(TVal);
-             FwkTest<TKey, TVal>.CurrentTest.ResetKey("valueSizes");
-             int size = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("valueSizes");
-             StringBuilder builder = new StringBuilder();
-             Random random = new Random();
-             char ch;
-             for (int j = 0; j < size; j++)
-             {
-                 ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
-                 builder.Append(ch);
-             }
-             FwkTest<TKey, TVal>.CurrentTest.ResetKey("objectType");
-             string m_objectType = FwkTest<TKey, TVal>.CurrentTest.GetStringValue("objectType");
-             FwkTest<TKey, TVal>.CurrentTest.ResetKey("versionNum");
-             int m_versionNum = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("versionNum"); //random.Next(2) + 1;// (counter++ % 2) + 1;
-             string sharedpath = (string)Util.BBGet("SharedPath", "sharedDir");
-             m_sharePath = Path.Combine(sharedpath, "framework/csharp/bin");
-             if (typeof(TVal) == typeof(string))
-             {
-                 tmpValue = (TVal)(object)builder.ToString();
-             }
-             else if (typeof(TVal) == typeof(byte[]))
-             {
-                 tmpValue = (TVal)(object)(Encoding.ASCII.GetBytes(builder.ToString()));
-             }
-             else if (m_objectType != null)
-             {
-                 if (m_objectType.Equals("PdxVersioned") && m_versionNum == 1)
-                 {
-                     PdxTests<TKey, TVal>.m_pdxVersionOneAsm = Assembly.LoadFrom(Path.Combine(m_sharePath, "PdxVersion1Lib.dll"));
-                     Type pt = PdxTests<TKey, TVal>.m_pdxVersionOneAsm.GetType("PdxVersionTests.PdxVersioned", true, true);
-                     tmpValue = (TVal)pt.InvokeMember("PdxVersioned", BindingFlags.CreateInstance, null, null, new object[] { value.ToString() });
-                 }
-                 else if (m_objectType.Equals("PdxVersioned") && m_versionNum == 2)
-                 {
-                     PdxTests<TKey, TVal>.m_pdxVersionTwoAsm = Assembly.LoadFrom(Path.Combine(m_sharePath, "PdxVersion2Lib.dll"));
-                     Type pt = PdxTests<TKey, TVal>.m_pdxVersionTwoAsm.GetType("PdxVersionTests.PdxVersioned", true, true);
-                     tmpValue = (TVal)pt.InvokeMember("PdxVersioned", BindingFlags.CreateInstance, null, null, new object[] { value.ToString() });
-                 }
-                 else if (m_objectType.Equals("Nested"))
-                 {
-
-                     tmpValue = (TVal)(object)new NestedPdx();
-                 }
-                 else if (m_objectType.Equals("PdxType"))
-                 {
-                     tmpValue = (TVal)(object)new PdxType();
-                 }
-                 /*else if (m_objectType.Equals("PdxInstanceFactory"))
-                 {
-
-                     tmpValue = createIpdxInstance();
-                 }*/
-                 else if (m_objectType.Equals("AutoSerilizer"))
-                 {
-                     tmpValue = (TVal)(object)new SerializePdx1(true);
-                 }
-             }
-             else
-                 tmpValue = (TVal)(object)value;
-             return tmpValue;
-
-         }
-        private void checkContainsValueForKey(TKey key, bool expected, string logStr) {
-           //RegionPtr regionPtr = getRegion();
-           bool containsValue = m_region.ContainsValueForKey(key);
-           if (containsValue != expected)
-               FwkTest<TKey, TVal>.CurrentTest.FwkException("DoOpsTask::checkContainsValueForKey: Expected containsValueForKey(" + key + ") to be " + expected +
-                        ", but it was " + containsValue + ": " + logStr);
-        }
-        bool addNewKey()
-        {
-            int numNewKeysCreated = (int)Util.BBGet("ImageBB","NUM_NEW_KEYS_CREATED");
-	        Util.BBIncrement("ImageBB","NUM_NEW_KEYS_CREATED");
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("NumNewKeys");
-            int numNewKeys = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("NumNewKeys");
-            if (numNewKeysCreated > numNewKeys) {
-	              FwkTest<TKey, TVal>.CurrentTest.FwkInfo("All new keys created; returning from addNewKey");
-	              return true;
-	        }
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("entryCount");
-            int entryCount = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("entryCount");
-	        entryCount = ( entryCount < 1 ) ? 10000 : entryCount;
-            TKey key = (TKey)(object)(entryCount + numNewKeysCreated);
-	        checkContainsValueForKey(key, false, "before addNewKey");
-            TVal value = GetValue((entryCount + numNewKeysCreated));
-            m_region.Add(key,value);
-
-	        return (numNewKeysCreated >= numNewKeys);
-        }
-        bool putAllNewKey()
-        {
-            int numNewKeysCreated = (int)Util.BBGet("ImageBB","NUM_NEW_KEYS_CREATED");
-	        Util.BBIncrement("ImageBB","NUM_NEW_KEYS_CREATED");
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("NumNewKeys");
-	        int numNewKeys = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue( "NumNewKeys" );
-                if (numNewKeysCreated > numNewKeys) {
-		              FwkTest<TKey, TVal>.CurrentTest.FwkInfo("All new keys created; returning from putAllNewKey");
-		              return true;
-		        }
-                FwkTest<TKey, TVal>.CurrentTest.ResetKey("entryCount");
-                int entryCount = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("entryCount");
-		        entryCount = ( entryCount < 1 ) ? 10000 : entryCount;
-		        TKey key = (TKey)(object)(entryCount + numNewKeysCreated);
-                checkContainsValueForKey(key, false, "before addNewKey");
-                TVal value = GetValue((entryCount + numNewKeysCreated));
-                IDictionary<TKey, TVal> map = new Dictionary<TKey, TVal>();
-                map.Clear();
-                map.Add(key, value);
-                
-                m_region.PutAll(map);
-                return (numNewKeysCreated >= numNewKeys);
-        }
-        bool invalidate()
-        {
-            int nextKey = (int)Util.BBGet("ImageBB", "LASTKEY_INVALIDATE");
-            Util.BBIncrement("ImageBB","LASTKEY_INVALIDATE");
-	        int firstKey = (int)Util.BBGet("ImageBB", "First_Invalidate");
-	        int lastKey = (int)Util.BBGet("ImageBB", "Last_Invalidate");
-	        if(!((nextKey >= firstKey) && (nextKey <= lastKey))) {
-		        FwkTest<TKey, TVal>.CurrentTest.FwkInfo("All existing keys invalidated; returning from invalidate");
-	           return true;
-	        }
-            TKey key = (TKey)(object)(nextKey);
-	        
-	        try {
-                m_region.Invalidate(key);
-	        } catch (EntryNotFoundException e) {
-                throw new EntryNotFoundException(e.Message);
-	        }
-	        return (nextKey >= lastKey);
-        }
-        bool destroy()
-        {
-            int nextKey = (int)Util.BBGet("ImageBB", "LASTKEY_DESTROY");
-	        Util.BBIncrement("ImageBB","LASTKEY_DESTROY");
-	        int firstKey = (int)Util.BBGet("ImageBB", "First_Destroy");
-	        int lastKey = (int)Util.BBGet("ImageBB", "Last_Destroy");
-	        if(!((nextKey >= firstKey) && (nextKey <= lastKey))) {
-		        FwkTest<TKey, TVal>.CurrentTest.FwkInfo("All destroys completed; returning from destroy");
-	           return true;
-	        }
-            TKey key = (TKey)(object)(nextKey);
-	        try{
-                m_region.Remove(key);
-            } catch (CacheWriterException e) {
-              throw new CacheWriterException(e.Message);
-            } catch (EntryNotFoundException e) {
-              throw new EntryNotFoundException(e.Message);
-            }
-	        return (nextKey >= lastKey);
-        }
-        bool updateExistingKey()
-        {
-            int nextKey = (int)Util.BBGet("ImageBB", "LASTKEY_UPDATE_EXISTING_KEY");
-	        Util.BBIncrement("ImageBB","LASTKEY_UPDATE_EXISTING_KEY");
-	        int firstKey = (int)Util.BBGet("ImageBB", "First_UpdateExistingKey");
-	        int lastKey = (int)Util.BBGet("ImageBB", "Last_UpdateExistingKey");
-	        if(!((nextKey >= firstKey) && (nextKey <= lastKey))) {
-		        FwkTest<TKey, TVal>.CurrentTest.FwkInfo("All existing keys updated; returning from updateExistingKey");
-	           return true;
-	        }
-            TKey key = (TKey)(object)(nextKey);
-	        TVal existingValue = m_region[key];
-	              if (existingValue == null)
-	    	          throw new Exception("Get of key "+ key + " returned unexpected null");
-                  if (existingValue.GetType() == typeof(string))
-	    	          throw new Exception("Trying to update a key which was already updated: " + existingValue);
-                  TVal newValue = GetValue(("updated_" + nextKey));
-
-            m_region[key] = newValue;
-	        return (nextKey >= lastKey);
-        }
-        bool get()
-        {
-            int nextKey = (int)Util.BBGet("ImageBB", "LASTKEY_GET");
-	        Util.BBIncrement("ImageBB","LASTKEY_GET");
-	        int firstKey = (int)Util.BBGet("ImageBB", "First_Get");
-	        int lastKey = (int)Util.BBGet("ImageBB", "Last_Get");
-	        if(!((nextKey >= firstKey) && (nextKey <= lastKey))) {
-		        FwkTest<TKey, TVal>.CurrentTest.FwkInfo("All gets completed; returning from get");
-	           return true;
-	        }
-            TKey key = (TKey)(object)(nextKey);
-            TVal existingValue = m_region[key];
-	        if (existingValue == null)
-                FwkTest<TKey, TVal>.CurrentTest.FwkSevere("Get of key " + key + " returned unexpected " + existingValue);
-	        return (nextKey >= lastKey);
-        }
-        bool localInvalidate()
-        {
-            int nextKey = (int)Util.BBGet("ImageBB", "LASTKEY_LOCAL_INVALIDATE");
-	        Util.BBIncrement("ImageBB","LASTKEY_LOCAL_INVALIDATE");
-	        int firstKey = (int)Util.BBGet("ImageBB", "First_LocalInvalidate");
-	        int lastKey = (int)Util.BBGet("ImageBB", "Last_LocalInvalidate");
-	        if(!((nextKey >= firstKey) && (nextKey <= lastKey))) {
-		        FwkTest<TKey, TVal>.CurrentTest.FwkInfo("All local invalidates completed; returning from localInvalidate");
-	           return true;
-	        }
-            TKey key = (TKey)(object)(nextKey);
-	        try {
-                m_region.GetLocalView().Invalidate(key);
-	        } catch (EntryNotFoundException e) {
-	              throw new EntryNotFoundException(e.Message);
-	        }
-
-	        return (nextKey >= lastKey);
-        }
-        bool localDestroy()
-        {
-            int nextKey = (int)Util.BBGet("ImageBB", "LASTKEY_LOCAL_DESTROY");
-            Util.BBIncrement("ImageBB","LASTKEY_LOCAL_DESTROY");
-	        int firstKey = (int)Util.BBGet("ImageBB", "First_LocalDestroy");
-	        int lastKey = (int)Util.BBGet("ImageBB", "Last_LocalDestroy");
-	        if(!((nextKey >= firstKey) && (nextKey <= lastKey))) {
-		        FwkTest<TKey, TVal>.CurrentTest.FwkInfo("All local destroys completed; returning from localDestroy");
-	           return true;
-	        }
-            TKey key = (TKey)(object)(nextKey);
-	        try {
-                m_region.GetLocalView().Remove(key);
-            } catch (EntryNotFoundException e) {
-	          throw new EntryNotFoundException(e.Message);
-            }
-	        return (nextKey >= lastKey);
-        }
-
-        
-    }
-
-  //------------------------------------DoOpsTask end --------------------------
-
-  //------------------------------ ExpectedRegionContents Start----------------
-    public class ExpectedRegionContents
-    {
-
-        // instance fields
-        // KeyIntevals.NONE
-        private bool m_containsKey_none;            // expected value of m_containsKey for KeyIntervals.NONE
-        private bool m_containsValue_none;          // expected value of m_containsValue for KeyIntervals.NONE
-        private bool m_getAllowed_none;             // if true, then check the value with a get
-
-        // KeyIntevals.INVALIDATE
-        private bool m_containsKey_invalidate;
-        private bool m_containsValue_invalidate;
-        private bool m_getAllowed_invalidate;
-
-        // KeyIntevals.LOCAL_INVALIDATE
-        private bool m_containsKey_localInvalidate;
-        private bool m_containsValue_localInvalidate;
-        private bool m_getAllowed_localInvalidate;
-
-        // KeyIntevals.DESTROY
-        private bool m_containsKey_destroy;
-        private bool m_containsValue_destroy;
-        private bool m_getAllowed_destroy;
-
-        // KeyIntevals.LOCAL_DESTROY
-        private bool m_containsKey_localDestroy;
-        private bool m_containsValue_localDestroy;
-        private bool m_getAllowed_localDestroy;
-
-        // KeyIntevals.UPDATE
-        private bool m_containsKey_update;
-        private bool m_containsValue_update;
-        private bool m_getAllowed_update;
-        private bool m_valueIsUpdated;
-
-        // KeyIntervals.GET
-        private bool m_containsKey_get;
-        private bool m_containsValue_get;
-        private bool m_getAllowed_get;
-
-        // new keys
-        private bool m_containsKey_newKey;
-        private bool m_containsValue_newKey;
-        private bool m_getAllowed_newKey;
-
-        // region size specifications
-        int m_exactSize;
-        int m_minSize;
-        int m_maxSize;
-
-        // constructors
-        public ExpectedRegionContents(bool m_containsKey, bool m_containsValue, bool m_getAllowed)
-        {
-            m_containsKey_none = m_containsKey;
-            m_containsKey_invalidate = m_containsKey;
-            m_containsKey_localInvalidate = m_containsKey;
-            m_containsKey_destroy = m_containsKey;
-            m_containsKey_localDestroy = m_containsKey;
-            m_containsKey_update = m_containsKey;
-            m_containsKey_get = m_containsKey;
-            m_containsKey_newKey = m_containsKey;
-
-            m_containsValue_none = m_containsValue;
-            m_containsValue_invalidate = m_containsValue;
-            m_containsValue_localInvalidate = m_containsValue;
-            m_containsValue_destroy = m_containsValue;
-            m_containsValue_localDestroy = m_containsValue;
-            m_containsValue_update = m_containsValue;
-            m_containsValue_get = m_containsValue;
-            m_containsValue_newKey = m_containsValue;
-
-            m_getAllowed_none = m_getAllowed;
-            m_getAllowed_invalidate = m_getAllowed;
-            m_getAllowed_localInvalidate = m_getAllowed;
-            m_getAllowed_destroy = m_getAllowed;
-            m_getAllowed_localDestroy = m_getAllowed;
-            m_getAllowed_update = m_getAllowed;
-            m_getAllowed_get = m_getAllowed;
-            m_getAllowed_newKey = m_getAllowed;
-            m_valueIsUpdated = false;
-
-        }
-
-        public ExpectedRegionContents(bool m_containsKeyNone, bool m_containsValueNone,
-                                     bool m_containsKeyInvalidate, bool m_containsValueInvalidate,
-                                     bool m_containsKeyLocalInvalidate, bool m_containsValueLocalInvalidate,
-                                     bool m_containsKeyDestroy, bool m_containsValueDestroy,
-                                     bool m_containsKeyLocalDestroy, bool m_containsValueLocalDestroy,
-                                     bool m_containsKeyUpdate, bool m_containsValueUpdate,
-                                     bool m_containsKeyGet, bool m_containsValueGet,
-                                     bool m_containsKeyNewKey, bool m_containsValueNewKey,
-                                     bool m_getAllowed,
-                                     bool updated)
-        {
-            m_containsKey_none = m_containsKeyNone;
-            m_containsValue_none = m_containsValueNone;
-
-            m_containsKey_invalidate = m_containsKeyInvalidate;
-            m_containsValue_invalidate = m_containsValueInvalidate;
-
-            m_containsKey_localInvalidate = m_containsKeyLocalInvalidate;
-            m_containsValue_localInvalidate = m_containsValueLocalInvalidate;
-
-            m_containsKey_destroy = m_containsKeyDestroy;
-            m_containsValue_destroy = m_containsValueDestroy;
-
-            m_containsKey_localDestroy = m_containsKeyLocalDestroy;
-            m_containsValue_localDestroy = m_containsValueLocalDestroy;
-
-            m_containsKey_update = m_containsKeyUpdate;
-            m_containsValue_update = m_containsValueUpdate;
-
-            m_containsKey_get = m_containsKeyGet;
-            m_containsValue_get = m_containsValueGet;
-
-            m_containsKey_newKey = m_containsKeyNewKey;
-            m_containsValue_newKey = m_containsValueNewKey;
-
-            m_getAllowed_none = m_getAllowed;
-            m_getAllowed_invalidate = m_getAllowed;
-            m_getAllowed_localInvalidate = m_getAllowed;
-            m_getAllowed_destroy = m_getAllowed;
-            m_getAllowed_localDestroy = m_getAllowed;
-            m_getAllowed_update = m_getAllowed;
-            m_getAllowed_get = m_getAllowed;
-            m_getAllowed_newKey = m_getAllowed;
-            m_valueIsUpdated = updated;
-        }
-
-        //================================================================================
-        // getter methods
-        public bool containsKey_none()
-        {
-            return m_containsKey_none;
-        }
-        public bool containsValue_none()
-        {
-            return m_containsValue_none;
-        }
-        public bool getAllowed_none()
-        {
-            return m_getAllowed_none;
-        }
-        public bool containsKey_invalidate()
-        {
-            return m_containsKey_invalidate;
-        }
-        public bool containsValue_invalidate()
-        {
-            return m_containsValue_invalidate;
-        }
-        public bool getAllowed_invalidate()
-        {
-            return m_getAllowed_invalidate;
-        }
-        public bool containsKey_localInvalidate()
-        {
-            return m_containsKey_localInvalidate;
-        }
-        public bool containsValue_localInvalidate()
-        {
-            return m_containsValue_localInvalidate;
-        }
-        public bool getAllowed_localInvalidate()
-        {
-            return m_getAllowed_localInvalidate;
-        }
-        public bool containsKey_destroy()
-        {
-            return m_containsKey_destroy;
-        }
-        public bool containsValue_destroy()
-        {
-            return m_containsValue_destroy;
-        }
-        public bool getAllowed_destroy()
-        {
-            return m_getAllowed_destroy;
-        }
-        public bool containsKey_localDestroy()
-        {
-            return m_containsKey_localDestroy;
-        }
-        public bool containsValue_localDestroy()
-        {
-            return m_containsValue_localDestroy;
-        }
-        public bool getAllowed_localDestroy()
-        {
-            return m_getAllowed_localDestroy;
-        }
-        public bool containsKey_update()
-        {
-            return m_containsKey_update;
-        }
-        public bool containsValue_update()
-        {
-            return m_containsValue_update;
-        }
-        public bool getAllowed_update()
-        {
-            return m_getAllowed_update;
-        }
-        public bool valueIsUpdated()
-        {
-            return m_valueIsUpdated;
-        }
-        public bool containsKey_get()
-        {
-            return m_containsKey_get;
-        }
-        public bool containsValue_get()
-        {
-            return m_containsValue_get;
-        }
-        public bool getAllowed_get()
-        {
-            return m_getAllowed_get;
-        }
-        public bool containsKey_newKey()
-        {
-            return m_containsKey_newKey;
-        }
-        public bool containsValue_newKey()
-        {
-            return m_containsValue_newKey;
-        }
-        public bool getAllowed_newKey()
-        {
-            return m_getAllowed_newKey;
-        }
-        public int exactSize()
-        {
-            return m_exactSize;
-        }
-        public int minSize()
-        {
-            return m_minSize;
-        }
-        public int maxSize()
-        {
-            return m_maxSize;
-        }
-
-        //================================================================================
-        // setter methods
-
-        public void containsKey_none(bool abool)
-        {
-            m_containsKey_none = abool;
-        }
-
-        public void containsValue_none(bool abool)
-        {
-            m_containsValue_none = abool;
-        }
-
-        public void containsKey_invalidate(bool abool)
-        {
-            m_containsKey_invalidate = abool;
-        }
-
-        public void containsValue_invalidate(bool abool)
-        {
-            m_containsValue_invalidate = abool;
-        }
-
-        public void containsKey_localInvalidate(bool abool)
-        {
-            m_containsKey_localInvalidate = abool;
-        }
-
-        public void containsValue_localInvalidate(bool abool)
-        {
-            m_containsValue_localInvalidate = abool;
-        }
-
-        public void containsKey_destroy(bool abool)
-        {
-            m_containsKey_destroy = abool;
-        }
-
-        public void containsValue_destroy(bool abool)
-        {
-            m_containsValue_destroy = abool;
-        }
-
-        public void containsKey_localDestroy(bool abool)
-        {
-            m_containsKey_localDestroy = abool;
-        }
-
-        public void containsValue_localDestroy(bool abool)
-        {
-            m_containsValue_localDestroy = abool;
-        }
-
-        public void containsKey_update(bool abool)
-        {
-            m_containsKey_update = abool;
-        }
-
-        public void containsValue_update(bool abool)
-        {
-            m_containsValue_update = abool;
-        }
-
-        public void containsKey_get(bool abool)
-        {
-            m_containsKey_get = abool;
-        }
-
-        public void containsValue_get(bool abool)
-        {
-            m_containsValue_get = abool;
-        }
-
-        public void containsKey_newKey(bool abool)
-        {
-            m_containsKey_newKey = abool;
-        }
-
-        public void containsValue_newKey(bool abool)
-        {
-            m_containsValue_newKey = abool;
-        }
-
-        public void exactSize(int anInt)
-        {
-            m_exactSize = anInt;
-        }
-
-        public void minSize(int anInt)
-        {
-            m_minSize = anInt;
-        }
-
-        public void maxSize(int anInt)
-        {
-            m_maxSize = anInt;
-        }
-        public void valueIsUpdated(bool abool)
-        {
-            m_valueIsUpdated = abool;
-        }
-
-        public string toString() {
-            StringBuilder attrsSB = new StringBuilder();
-            attrsSB.Append(Environment.NewLine + "m_containsKey_none: " + m_containsKey_none);
-            attrsSB.Append(Environment.NewLine + "m_containsValue_none: " + m_containsValue_none);
-            attrsSB.Append(Environment.NewLine + "m_containsKey_invalidate: " + m_containsKey_invalidate);
-            attrsSB.Append(Environment.NewLine + "m_containsValue_invalidate: " + m_containsValue_invalidate);
-            attrsSB.Append(Environment.NewLine + "m_containsKey_localInvalidate: " + m_containsKey_localInvalidate);
-            attrsSB.Append(Environment.NewLine + "m_containsValue_localInvalidate: " + m_containsValue_localInvalidate);
-            attrsSB.Append(Environment.NewLine + "m_containsKey_destroy: " + m_containsKey_destroy);
-            attrsSB.Append(Environment.NewLine + "m_containsValue_destroy: " + m_containsValue_destroy);
-            attrsSB.Append(Environment.NewLine + "m_containsKey_localDestroy: " + m_containsKey_localDestroy);
-            attrsSB.Append(Environment.NewLine + "m_containsValue_localDestroy: " + m_containsValue_localDestroy);
-            attrsSB.Append(Environment.NewLine + "m_containsKey_update: " + m_containsKey_update);
-            attrsSB.Append(Environment.NewLine + "m_containsValue_update: " + m_containsValue_update);
-            attrsSB.Append(Environment.NewLine + "m_containsKey_get: " + m_containsKey_get);
-            attrsSB.Append(Environment.NewLine + "m_containsValue_get: " + m_containsValue_get);
-            attrsSB.Append(Environment.NewLine + "m_containsKey_newKey: " + m_containsKey_newKey);
-            attrsSB.Append(Environment.NewLine + "m_containsValue_newKey: " + m_containsValue_newKey);
-            attrsSB.Append(Environment.NewLine );
-            return attrsSB.ToString();
-
-        }
-    }
-
-//================================================================================
-  public class CacheServer<TKey, TVal> : FwkTest<TKey, TVal>
-  {
-    #region Private constants and statics
-
-    private static TimeSpan QueryResponseTimeout = TimeSpan.FromSeconds(600);
-    private const string RegionName = "regionName";
-    private const string ValueSizes = "valueSizes";
-    private const string OpsSecond = "opsSecond";
-    private const string EntryCount = "entryCount";
-    private const string WorkTime = "workTime";
-    private const string EntryOps = "entryOps";
-    private const string LargeSetQuery = "largeSetQuery";
-    private const string UnsupportedPRQuery = "unsupportedPRQuery";
-    private const string ObjectType = "objectType";
-    private const int NUM_EXTRA_KEYS = 100;
-    
-   // private const bool MultiRegion = "multiRegion";
-
-    private static Dictionary<string, int> OperationsMap =
-      new Dictionary<string, int>();
-    private static Dictionary<string, int> ExceptionsMap =
-      new Dictionary<string, int>();
-    private static bool m_istransaction = false;
-    private static bool isSerialExecution = false;
-    protected static bool isEmptyClient = false;  // true if this is a bridge client with empty dataPolicy
-    protected static bool isThinClient = false; // true if this is a bridge client with eviction to keep it small
-    private static Dictionary<TKey, TVal> regionSnapshot = null;
-    //  new Dictionary<TKey, TVal>();
-    private static List<TKey> destroyedKeys = null;// = new List<TKey>();
-    //private static List<TKey> destroyList = null;
-    private int keyCount;
-    private static List<TKey> m_KeysA = new List<TKey>();
-    private static ExpectedRegionContents[] expectedRgnContents = new ExpectedRegionContents[5];
-    private static int totalNumKeys = 0;
-    //Assembly m_pdxVersionOneAsm;
-    //Assembly m_pdxVersionTwoAsm;
-    //protected TKey[] m_KeysA;
-    #endregion
-      /*
-       Util.BBSet("OpsBB","CREATES",creates);
-      Util.BBSet("OpsBB","UPDATES",puts);
-      Util.BBSet("OpsBB","DESTROYS",dests);
-      Util.BBSet("OpsBB","GETS",gets);
-      Util.BBSet("OpsBB","INVALIDATES",invals);
-       
-       
-       */
-      public const string OPSBB="OpsBB";
-      public const string CREATE = "CREATE";
-      public const string UPDATES = "UPDATES";
-      public const string DESTROYS = "DESTROYS";
-      public const string GETS = "GETS";
-      public const string INVALIDATES = "INVALIDATES";
-      
-    #region Private utility methods
-
-    private IRegion<TKey, TVal> GetRegion()
-    {
-      return GetRegion(null);
-    }
-
-    protected IRegion<TKey, TVal> GetRegion(string regionName)
-    {
-      IRegion<TKey, TVal> region;
-      if (regionName == null)
-      {
-        regionName = GetStringValue("regionName");
-      }
-      if (regionName == null)
-      {
-        region = (IRegion<TKey, TVal>)GetRootRegion();
-        if (region == null)
-        {
-          IRegion<TKey, TVal>[] rootRegions = CacheHelper<TKey, TVal>.DCache.RootRegions<TKey, TVal>();
-          if (rootRegions != null && rootRegions.Length > 0)
-          {
-            region = rootRegions[Util.Rand(rootRegions.Length)];
-          }
-        }
-      }
-      else
-      {
-        region = CacheHelper<TKey, TVal>.GetRegion(regionName);
-      }
-      return region;
-    }
-
-    private void AddValue(IRegion<TKey, TVal> region, int count, byte[] valBuf)
-    {
-      if (region == null)
-      {
-        FwkSevere("CacheServer::AddValue(): No region to perform add on.");
-        return;
-      }
-      TKey key = (TKey)(object)count.ToString();
-      TVal value = (TVal)(object)valBuf;
-      BitConverter.GetBytes(count).CopyTo(valBuf, 0);
-      BitConverter.GetBytes(DateTime.Now.Ticks).CopyTo(valBuf, 4);
-      try
-      {
-        region.Add(key, value);
-        //FwkInfo("key: {0}  value: {1}", key, Encoding.ASCII.GetString(value.Value));
-      }
-      catch (Exception ex)
-      {
-        FwkException("CacheServer.AddValue() caught Exception: {0}", ex);
-      }
-    }
-
-    private TKey GetKey(int max)
-    {
-      ResetKey(ObjectType);
-      string objectType = GetStringValue(ObjectType);
-      QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
-      int numSet = 0;
-      int setSize = 0;
-      if (objectType != null && (objectType == "Portfolio" || objectType == "PortfolioPdx"))
-      {
-        setSize = qh.PortfolioSetSize;
-        numSet = max / setSize;
-        return (TKey)(object)String.Format("port{0}-{1}", Util.Rand(numSet), Util.Rand(setSize));
-      }
-      else if (objectType != null && (objectType == "Position" || objectType == "PositionPdx"))
-      {
-        setSize = qh.PositionSetSize;
-        numSet = max / setSize;
-        return (TKey)(object)String.Format("pos{0}-{1}", Util.Rand(numSet), Util.Rand(setSize));
-      }
-      return (TKey)(object)Util.Rand(max).ToString();
-    }
-
-    private TVal GetUserObject(string objType)
-    {
-      TVal usrObj = default(TVal);
-      ResetKey(EntryCount);
-      int numOfKeys = GetUIntValue(EntryCount);
-      ResetKey(ValueSizes);
-      int objSize = GetUIntValue(ValueSizes);
-      QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
-      int numSet = 0;
-      int setSize = 0;
-      if (objType != null && objType == "Portfolio")
-      {
-        setSize = qh.PortfolioSetSize;
-        numSet = numOfKeys / setSize;
-        usrObj = (TVal)(object) new Portfolio(Util.Rand(setSize), objSize);
-      }
-      else if (objType != null && objType == "Position")
-      {
-        setSize = qh.PositionSetSize;
-        numSet = numOfKeys / setSize;
-        int numSecIds = Portfolio.SecIds.Length;
-        usrObj = (TVal)(object)new Position(Portfolio.SecIds[setSize % numSecIds], setSize * 100);
-      }
-      if (objType != null && objType == "PortfolioPdx")
-      {
-        setSize = qh.PortfolioSetSize;
-        numSet = numOfKeys / setSize;
-        usrObj = (TVal)(object)new PortfolioPdx(Util.Rand(setSize), objSize);
-      }
-      else if (objType != null && objType == "PositionPdx")
-      {
-        setSize = qh.PositionSetSize;
-        numSet = numOfKeys / setSize;
-        int numSecIds = PortfolioPdx.SecIds.Length;
-        usrObj = (TVal)(object)new PositionPdx(PortfolioPdx.SecIds[setSize % numSecIds], setSize * 100);
-      }
-      return usrObj;
-    }
-
-    private bool AllowQuery(QueryCategory category, bool haveLargeResultset,
-      bool islargeSetQuery, bool isUnsupportedPRQuery)
-    {
-      if (category == QueryCategory.Unsupported)
-      {
-        return false;
-      }
-      else if (haveLargeResultset != islargeSetQuery)
-      {
-        return false;
-      }
-      else if (isUnsupportedPRQuery &&
-               ((category == QueryCategory.MultiRegion) ||
-                (category == QueryCategory.NestedQueries)))
-      {
-        return false;
-      }
-      else
-      {
-        return true;
-      }
-    }
-    private void remoteQuery(QueryStrings currentQuery, bool isLargeSetQuery, 
-      bool isUnsupportedPRQuery, int queryIndex,bool isparam,bool isStructSet)
-    {
-      DateTime startTime;
-      DateTime endTime;
-      TimeSpan elapsedTime;
-      var qs = CheckQueryService();
-      if (AllowQuery(currentQuery.Category, currentQuery.IsLargeResultset,
-            isLargeSetQuery, isUnsupportedPRQuery))
-        {
-          string query = currentQuery.Query;
-          FwkInfo("CacheServer.RunQuery: ResultSet Query Category [{0}], " +
-            "String [{1}].", currentQuery.Category, query);
-          Query<object> qry = qs.NewQuery<object>(query);
-          object[] paramList = null;
-          if (isparam)
-          {
-            Int32 numVal = 0;
-            if (isStructSet)
-            {
-              paramList = new object[QueryStatics.NoOfQueryParamSS[queryIndex]];
-
-              for (Int32 ind = 0; ind < QueryStatics.NoOfQueryParamSS[queryIndex]; ind++)
-              {
-                try
-                {
-                  numVal = Convert.ToInt32(QueryStatics.QueryParamSetSS[queryIndex][ind]);
-                  paramList[ind] = numVal;
-                }
-                catch (FormatException)
-                {
-                  paramList[ind] = (System.String)QueryStatics.QueryParamSetSS[queryIndex][ind];
-                }
-              }
-            }
-            else
-            {
-              paramList = new object[QueryStatics.NoOfQueryParam[queryIndex]];
-              for (Int32 ind = 0; ind < QueryStatics.NoOfQueryParam[queryIndex]; ind++)
-              {
-                try
-                {
-                  numVal = Convert.ToInt32(QueryStatics.QueryParamSet[queryIndex][ind]);
-                  paramList[ind] = numVal;
-                }
-                catch (FormatException)
-                {
-                  paramList[ind] = (System.String)QueryStatics.QueryParamSet[queryIndex][ind];
-                }
-              }
-            }
-          }
-          ISelectResults<object> results = null;
-          startTime = DateTime.Now;
-          if (isparam)
-          {
-            results = qry.Execute(paramList, TimeSpan.FromSeconds(600));
-          }
-          else
-          {
-            results = qry.Execute(TimeSpan.FromSeconds(600));
-          }
-          endTime = DateTime.Now;
-          elapsedTime = endTime - startTime;
-          FwkInfo("CacheServer.RunQuery: Time Taken to execute" +
-            " the query [{0}]: {1}ms", query, elapsedTime.TotalMilliseconds);
-        }
-    }
-
-    private void RunQuery()
-    {
-      FwkInfo("In CacheServer.RunQuery");
-
-      try
-      {
-        ResetKey(EntryCount);
-        int numOfKeys = GetUIntValue(EntryCount);
-        QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
-        int setSize = qh.PortfolioSetSize;
-        if (numOfKeys < setSize)
-        {
-          setSize = numOfKeys;
-        }
-        int i = Util.Rand(QueryStrings.RSsize);
-        ResetKey(LargeSetQuery);
-        ResetKey(UnsupportedPRQuery);
-        bool isLargeSetQuery = GetBoolValue(LargeSetQuery);
-        bool isUnsupportedPRQuery = GetBoolValue(UnsupportedPRQuery);
-        QueryStrings currentQuery = QueryStatics.ResultSetQueries[i];
-        remoteQuery(currentQuery, isLargeSetQuery, isUnsupportedPRQuery, i,false,false);
-        i = Util.Rand(QueryStrings.SSsize);
-        int[] a = new int[] { 4, 6, 7, 9, 12, 14, 15, 16 };
-        if ((typeof(TVal).Equals(typeof(Apache.Geode.Client.Tests.PortfolioPdx)) ||
-          (typeof(TVal).Equals(typeof(Apache.Geode.Client.Tests.PositionPdx)))) && ((IList<int>)a).Contains(i))
-        {
-          FwkInfo("Skiping Query for pdx object [{0}]", QueryStatics.StructSetQueries[i]);
-        }
-        else
-        {
-          currentQuery = QueryStatics.StructSetQueries[i];
-          remoteQuery(currentQuery, isLargeSetQuery, isUnsupportedPRQuery, i, false, false);
-        }
-        i = Util.Rand(QueryStrings.RSPsize);
-        currentQuery = QueryStatics.ResultSetParamQueries[i];
-        remoteQuery(currentQuery, isLargeSetQuery, isUnsupportedPRQuery, i,true,false);
-        i = Util.Rand(QueryStrings.SSPsize);
-        if ((typeof(TVal).Equals(typeof(Apache.Geode.Client.Tests.PortfolioPdx)) ||
-          (typeof(TVal).Equals(typeof(Apache.Geode.Client.Tests.PositionPdx)))) && ((IList<int>)a).Contains(i))
-        {
-          FwkInfo("Skiping Query for pdx object [{0}]", QueryStatics.StructSetParamQueries[i]);
-        }
-        else
-        {
-          currentQuery = QueryStatics.StructSetParamQueries[i];
-          remoteQuery(currentQuery, isLargeSetQuery, isUnsupportedPRQuery, i, true, true);
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("CacheServer.RunQuery: Caught Exception: {0}", ex);
-      }
-      FwkInfo("CacheServer.RunQuery complete.");
-    }
-
-    private void UpdateOperationsMap(string opCode, int numOps)
-    {
-      UpdateOpsMap(OperationsMap, opCode, numOps);
-    }
-
-    private void UpdateExceptionsMap(string opCode, int numOps)
-    {
-      UpdateOpsMap(ExceptionsMap, opCode, numOps);
-    }
-
-    private void UpdateOpsMap(Dictionary<string, int> map, string opCode,
-      int numOps)
-    {
-      lock (((ICollection)map).SyncRoot)
-      {
-        int currentOps;
-        if (!map.TryGetValue(opCode, out currentOps))
-        {
-          currentOps = 0;
-        }
-        map[opCode] = currentOps + numOps;
-      }
-    }
-
-    private int GetOpsFromMap(Dictionary<string, int> map, string opCode)
-    {
-      int numOps;
-      lock (((ICollection)map).SyncRoot)
-      {
-        if (!map.TryGetValue(opCode, out numOps))
-        {
-          numOps = 0;
-        }
-      }
-      return numOps;
-    }
-    private void PutAllOps()
-    {
-      IRegion<TKey,TVal> region = GetRegion();
-      IDictionary<TKey, TVal> map = new Dictionary<TKey,TVal>();
-      int valSize = GetUIntValue(ValueSizes);
-      int minValSize = (int)(sizeof(int) + sizeof(long) + 4);
-      valSize = ((valSize < minValSize) ? minValSize : valSize);
-      string valBuf = null;
-      ResetKey(ObjectType);
-      string objectType = GetStringValue(ObjectType);
-      if (objectType != null)
-      {
-        Int32 numSet = 0;
-        Int32 setSize = 0;
-        QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
-        TVal port;
-        setSize = qh.PortfolioSetSize;
-        numSet = 200 / setSize;
-        for (int set = 1; set <= numSet; set++)
-        {
-          for (int current = 1; current <= setSize; current++)
-          {
-            if (objectType != "PortfolioPdx")
-            {
-              port = (TVal)(object)new Portfolio(current, valSize);
-            }
-            else
-            {
-              port = (TVal)(object)new PortfolioPdx(current, valSize);
-            }
-            string Id = String.Format("port{0}-{1}", set,current); 
-            TKey key = (TKey)(object)Id.ToString();
-            map.Add(key, port);
-          }
-        }
-      }
-      else
-      {
-        valBuf = new string('A', valSize);
-        for (int count = 0; count < 200; count++)
-        {
-          TKey key = (TKey)(object)count.ToString();
-          TVal value = (TVal)(object)Encoding.ASCII.GetBytes(valBuf);
-          map.Add(key, value);
-        }
-      }
-      region.PutAll(map, TimeSpan.FromSeconds(60));
-    }
-
-    private void GetAllOps()
-    {
-      IRegion<TKey, TVal> region = GetRegion();
-      List<TKey> keys  = new List<TKey>();
-      keys.Clear();
-      for (int count = 0; count < 200; count++)
-      {
-        TKey key = (TKey)(object)count.ToString();
-        keys.Add(key);
-      }    
-      IDictionary<TKey, TVal> values = new Dictionary<TKey, TVal>();
-      values.Clear();
-      region.GetAll(keys.ToArray(), values, null, false);
-    }
-    #endregion
-
-    #region Public methods
-    public static ICacheListener<TKey, TVal> CreateSilenceListener()
-    {
-      return new SilenceListener<TKey, TVal>();
-    }
-    public virtual void DoCreatePool()
-    {
-      FwkInfo("In DoCreatePool()");
-      try
-      {
-        CreatePool();
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoCreatePool() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoCreatePool() complete.");
-    }
-   
-    public virtual void DoCreateRegion()
-    {
-      FwkInfo("In DoCreateRegion()");
-      try {
-        IRegion<TKey, TVal> region = CreateRootRegion();
-        ResetKey("useTransactions");
-        m_istransaction = GetBoolValue("useTransactions");
-        isEmptyClient = !(region.Attributes.CachingEnabled);
-        isThinClient = region.Attributes.CachingEnabled;
-        if (region == null) {
-          FwkException("DoCreateRegion()  could not create region.");
-        }
-        
-        FwkInfo("DoCreateRegion()  Created region '{0}'", region.Name);
-      } catch (Exception ex) {
-        FwkException("DoCreateRegion() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoCreateRegion() complete.");
-    }
-
-    public void DoCloseCache()
-    {
-      FwkInfo("DoCloseCache()  Closing cache and disconnecting from" +
-        " distributed system.");
-      CacheHelper<TKey, TVal>.Close();
-    }
-    public void DoRegisterAllKeys()
-    {
-      FwkInfo("In DoRegisterAllKeys()");
-      try
-      {
-          IRegion<TKey, TVal> region = GetRegion();
-          FwkInfo("DoRegisterAllKeys() region name is {0}", region.Name);
-          bool isDurable = GetBoolValue("isDurableReg");
-          ResetKey("getInitialValues");
-          bool isGetInitialValues = GetBoolValue("getInitialValues");
-          bool checkReceiveVal = GetBoolValue("checkReceiveVal");
-          bool isReceiveValues = true;
-          if (checkReceiveVal)
-          {
-              ResetKey("receiveValue");
-              isReceiveValues = GetBoolValue("receiveValue");
-          }
-          ResetKey("sleepBeforeRegisterInterest");
-          int sleepTime = GetUIntValue("sleepBeforeRegisterInterest");
-          sleepTime = sleepTime > 0 ? sleepTime : 0;
-          FwkInfo("Sleeping for " + sleepTime + " millis");
-          Thread.Sleep(sleepTime);
-          region.GetSubscriptionService().RegisterAllKeys(isDurable, isGetInitialValues, isReceiveValues);
-          String durableClientId = CacheHelper<TKey, TVal>.DCache.SystemProperties.DurableClientId;
-          if (durableClientId.Length > 0)
-          {
-              CacheHelper<TKey, TVal>.DCache.ReadyForEvents();
-          }
-      }
-      catch (Exception ex)
-      {
-          FwkException("DoRegisterAllKeys() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoRegisterAllKeys() complete.");
-    }
-    public void DoFeed()
-    {
-      FwkInfo("CacheServer.DoFeed() called.");
-
-      int opsSec = GetUIntValue(OpsSecond);
-      opsSec = (opsSec < 1) ? 0 : opsSec;
-
-      int entryCount = GetUIntValue(EntryCount);
-      entryCount = (entryCount < 1) ? 10000 : entryCount;
-
-      int cnt = 0;
-      int valSize = GetUIntValue(ValueSizes);
-      int minValSize = (int)(sizeof(int) + sizeof(long) + 4);
-      valSize = ((valSize < minValSize) ? minValSize : valSize);
-      string valBuf = new string('A', valSize);
-
-      IRegion<TKey,TVal> region = GetRegion();
-      PaceMeter pm = new PaceMeter(opsSec);
-      while (cnt++ < entryCount)
-      {
-        AddValue(region, cnt, Encoding.ASCII.GetBytes(valBuf));
-        pm.CheckPace();
-      }
-    }
-    protected void removeDuplicates(List<TKey> destroyedKeys)
-    {
-      List<TKey> myStringList = new List<TKey>();
-      foreach (TKey s in destroyedKeys)
-      {
-        if (!myStringList.Contains(s))
-        {
-          myStringList.Add(s);
-        }
-      }
-      destroyedKeys = myStringList;
-      //return myStringList;
-    }
-    // Tx code start
-   
-    protected void verifyContainsKey(IRegion<TKey, TVal> m_region,TKey key, bool expected)
-    {
-      //bool containsKey = m_region.GetLocalView().ContainsKey(key);
-
-      bool containsKey = false;
-      if (isEmptyClient || m_istransaction)
-        containsKey = m_region.ContainsKey(key);
-      else
-        containsKey = m_region.GetLocalView().ContainsKey(key);
-      if (containsKey != expected)
-      {
-        throw new Exception("Expected ContainsKey() for " + key + " to be " + expected +
-                  " in " + m_region.FullPath + ", but it is " + containsKey);
-      }
-    }
-    
-    protected void verifyContainsValueForKey(IRegion<TKey, TVal> m_region,TKey key, bool expected)
-    {
-      
-      //bool containsValueForKey = m_region.GetLocalView().ContainsValueForKey(key);
-      bool containsValueForKey = false;
-      if (isEmptyClient ||m_istransaction)
-        containsValueForKey = m_region.ContainsValueForKey(key);
-      else
-        containsValueForKey = m_region.GetLocalView().ContainsValueForKey(key);
-      if (containsValueForKey != expected)
-      {
-        throw new Exception("Expected ContainsValueForKey() for " + key + " to be " + expected +
-                  " in " + m_region.FullPath + ", but it is " + containsValueForKey);
-      }
-       
-    }
-    protected void verifySize(IRegion<TKey, TVal> m_region,int expectedSize)
-    {
-      int size = 0;
-      if (isEmptyClient || m_istransaction)
-        size = m_region.Count;
-      else
-        size = m_region.GetLocalView().Count;
-      if (size != expectedSize)
-      {
-        if (size < 1000)
-        {
-          StringBuilder sb = new StringBuilder();
-          sb.Append("region has wrong size (").Append(size)
-            .Append(").  Dump of region follows:")
-            .Append("\n");
-          ICollection<RegionEntry<TKey, TVal>> regionentry = m_region.GetEntries(false);
-          foreach (RegionEntry<TKey, TVal> kvp in regionentry)
-         {
-           TKey key = kvp.Key;
-           TVal Value = kvp.Value;
-            sb.Append(key).Append(") -> ").Append(Value)
-               .Append("\n");
-          }
-          FwkInfo(sb.ToString());
-        }
-        throw new Exception("Expected size of " + m_region.FullPath + " to be " +
-           expectedSize + ", but it is " + size);
-      }
-      /*
-      int size = m_region.Count;
-      if (size != expectedSize)
-      {
-        throw new Exception("Expected size of " + m_region.FullPath + " to be " +
-           expectedSize + ", but it is " + size);
-      }*/
-    }
-    protected TKey GetNewKey()
-    {
-      ResetKey("distinctKeys");
-      int numKeys = GetUIntValue("distinctKeys");
-      keyCount = Util.BBIncrement("uniqueKey", "count");
-      TKey key = default(TKey);
-      if (typeof(TKey) == typeof(string))
-      {
-          String keybuf = String.Format("Key-{0}-{1}-{2}", Util.PID, Util.ThreadID, keyCount);
-          key = (TKey)(object)(keybuf);
-      }
-      else
-      {
-          key = (TKey)(object)(keyCount);
-      }
-      return key;
-    }
-    protected TKey GetExistingKey(bool useServerKeys)
-    {
-      IRegion<TKey, TVal> region = GetRegion();
-      TKey key = default(TKey);
-      //if (EqualityComparer<TKey>.Default.Equals(key, default(TKey)))
-      //{
-        if (useServerKeys)
-        {
-          int size = region.Count;
-          TKey[] keys = (TKey[])region.Keys;
-          key = keys[Util.Rand(0, keys.Length)];
-        }
-        else
-        {
-          int size = region.GetLocalView().Count;
-          TKey[] keys = (TKey[])region.GetLocalView().Keys;
-          key = keys[Util.Rand(0, size)];
-        }
-      /*}
-      else
-      {
-        return key;
-      }*/
-      keyCount = Util.BBIncrement("uniqueKey", "count");
-      return key;
-    }
-    protected TKey addEntry(IRegion<TKey, TVal> m_region)
-    {
-      TKey key = GetNewKey();
-      TVal value = GetValue();
-      int beforeSize = 0;
-      if (isEmptyClient || m_istransaction)
-        beforeSize = m_region.Count;
-      else
-        beforeSize = m_region.GetLocalView().Count;
-      try
-      {
-        m_region.Add(key, value);
-        
-      }
-      catch (EntryExistsException ex)
-      {
-        if (isSerialExecution)
-        {
-          // cannot get this exception; nobody else can have this key
-          throw new Exception(ex.StackTrace);
-        }
-        else
-        {
-          Util.Log("Caught {0} (expected with concurrent execution); continuing with test", ex);
-        }
-      }
-      catch (Exception ex)
-      {
-         throw new Exception(ex.Message);
-      }
-      // validation
-      if (isSerialExecution)
-      {
-        if (isEmptyClient)
-        {
-          if (!CacheHelper<TKey, TVal>.DCache.CacheTransactionManager.Exists())
-          {
-            verifySize(m_region,0);
-          }
-        }
-        else if (isThinClient)
-        { 
-          if (!CacheHelper<TKey, TVal>.DCache.CacheTransactionManager.Exists())
-          {
-            // new entry should be in the local region
-            verifyContainsKey(m_region,key, true);
-            verifyContainsValueForKey(m_region,key, true);
-          }
-        }
-        else
-        { // region has all keys/values
-          verifyContainsKey(m_region,key, true);
-          verifyContainsValueForKey(m_region,key, true);
-          verifySize(m_region,beforeSize + 1);
-        }
-        regionSnapshot[key] = value;
-        destroyedKeys.Remove(key);
-      }
-      return key;
-
-    }
-    protected void updateEntry(IRegion<TKey, TVal> r)
-    {
-      TKey key = GetExistingKey(isEmptyClient||isThinClient);
-      if (EqualityComparer<TKey>.Default.Equals(key, default(TKey)))
-      {
-        int size = r.Count;
-        if (isSerialExecution && (size != 0))
-          throw new Exception("getExistingKey returned " + key + ", but region size is " + size);
-        FwkInfo("updateEntry: No keys in region");
-        return;
-      }
-      int beforeSize = 0;
-      if (isEmptyClient || m_istransaction)
-        beforeSize = r.Count;
-      else
-        beforeSize = r.GetLocalView().Count;
-      TVal value = GetValue();
-      r[key] = value;
-      
-      // validation
-      // cannot validate return value from put due to bug 36436; in peer configurations
-      // we do not make any guarantees about the return value
-      if (isSerialExecution)
-      {
-        if (isEmptyClient)
-        {
-          if (!CacheHelper<TKey, TVal>.DCache.CacheTransactionManager.Exists())
-          {
-            verifySize(r, 0);
-          }
-        }
-        else if (isThinClient)
-        { // we have eviction
-          if (!CacheHelper<TKey, TVal>.DCache.CacheTransactionManager.Exists())
-          {
-            verifyContainsKey(r, key, true);
-            verifyContainsValueForKey(r, key, true);
-           
-          }
-        }
-        else
-        { // we have all keys/values
-          verifyContainsKey(r, key, true);
-          verifyContainsValueForKey(r, key, true);
-          verifySize(r, beforeSize);
-        }
-
-        // record the current state
-        regionSnapshot[key] = value;
-        destroyedKeys.Remove(key);
-      }
-    }
-    protected void invalidateEntry(IRegion<TKey, TVal> m_region,bool isLocalInvalidate)
-    {
-      int beforeSize = 0;
-      if (isEmptyClient || m_istransaction)
-        beforeSize = m_region.Count;
-      else
-        beforeSize = m_region.GetLocalView().Count;
-      TKey key = GetExistingKey(isEmptyClient||isThinClient);
-      if (EqualityComparer<TKey>.Default.Equals(key, default(TKey)))
-      {
-        if (isSerialExecution && (beforeSize != 0))
-          throw new Exception("getExistingKey returned " + key + ", but region size is " + beforeSize);
-        FwkInfo("invalidateEntry: No keys in region");
-      }
-      bool containsKey = m_region.GetLocalView().ContainsKey(key);
-      bool containsValueForKey = m_region.GetLocalView().ContainsValueForKey(key);
-      FwkInfo("containsKey for " + key + ": " + containsKey);
-      FwkInfo("containsValueForKey for " + key + ": " + containsValueForKey);
-      try
-      {
-        if (isLocalInvalidate)
-        { // do a local invalidate
-          m_region.GetLocalView().Invalidate(key);
-        }
-        else
-        { // do a distributed invalidate
-          m_region.Invalidate(key);
-        }
-
-        // validation
-        if (isSerialExecution)
-        {
-          if (isEmptyClient)
-          {
-            if (!CacheHelper<TKey, TVal>.DCache.CacheTransactionManager.Exists())
-            {
-              verifySize(m_region,0);
-            }
-          }
-          else if (isThinClient)
-          { // we have eviction
-            if (!CacheHelper<TKey, TVal>.DCache.CacheTransactionManager.Exists())
-            {
-              verifySize(m_region,beforeSize);
-            }
-          }
-          else
-          { // region has all keys/values
-            verifyContainsKey(m_region,key, true);
-            verifyContainsValueForKey(m_region,key, false);
-            verifySize(m_region,beforeSize);
-          }
-          regionSnapshot[key] = default(TVal);
-          //regionSnapshot.Remove(key);
-          destroyedKeys.Remove(key);
-        }
-      }
-      catch (EntryNotFoundException e)
-      {
-        if (isSerialExecution)
-          throw new Exception(e.StackTrace);
-        else
-        {
-          Util.Log("Caught {0} (expected with concurrent execution); continuing with test", e);
-          return;
-        }
-      }
-    }
-/** Get an existing key in the given region if one is available,
- *  otherwise get a new key. 
- *
- *  @param aRegion The region to use for getting an entry.
- */
-    protected void getKey(IRegion<TKey, TVal> aRegion)
-    {
-      TKey key = GetExistingKey(isEmptyClient || isThinClient);
-      if (EqualityComparer<TKey>.Default.Equals(key, default(TKey)))
-      { // no existing keys; get a new key then
-        int size = aRegion.Count;
-        if (isSerialExecution && (size != 0))
-          throw new Exception("getExistingKey returned " + key + ", but region size is " + size);
-        FwkTest<TKey, TVal>.CurrentTest.FwkInfo("getKey: No keys in region");
-        return;
-      }
-      int beforeSize = 0;
-      if (isEmptyClient || m_istransaction)
-        beforeSize = aRegion.Count;
-      else
-        beforeSize = aRegion.GetLocalView().Count;
-      bool beforeContainsValueForKey = aRegion.ContainsValueForKey(key);
-      bool beforeContainsKey = aRegion.ContainsKey(key);
-      TVal anObj = default(TVal);
-      try
-      {
-        anObj = aRegion[key];
-      }
-      catch (Apache.Geode.Client.KeyNotFoundException)
-      {
-        if (!EqualityComparer<TVal>.Default.Equals(anObj, default(TVal)))
-        {
-          throw new Apache.Geode.Client.KeyNotFoundException();
-        }
-
-      }
-      
-      // validation 
-      if (isSerialExecution)
-      {
-        if (isEmptyClient)
-        {
-          if (!CacheHelper<TKey, TVal>.DCache.CacheTransactionManager.Exists())
-          {
-            verifySize(aRegion, 0);
-          }
-        }
-        else if (isThinClient)
-        { // we have eviction
-          if (!CacheHelper<TKey, TVal>.DCache.CacheTransactionManager.Exists())
-          {
-            verifyContainsKey(aRegion, key, true);
-          }
-        }
-        else
-        { // we have all keys/values
-          verifyContainsKey(aRegion, key, true);
-          verifyContainsValueForKey(aRegion, key, (beforeContainsValueForKey));
-
-          // check the expected value of the get
-          TVal actualValue = anObj;
-          TVal expectedValue = default(TVal);
-          foreach( KeyValuePair<TKey, TVal> kvp in regionSnapshot )
-         {
-          TKey mapkey = kvp.Key;
-
-          if (key.Equals(mapkey))
-            {
-              expectedValue = kvp.Value;
-              if (!EqualityComparer<TVal>.Default.Equals(actualValue, default(TVal)))
-              {
-                if (!actualValue.Equals(expectedValue))
-                {
-                FwkException("getKey: expected value {0} is not same as actual value {1} for key {2}",
-                  expectedValue, actualValue, key);
-                }
-              } 
-            }
-          }
-          verifySize(aRegion, beforeSize);
-        }
-
-        // record the current state
-        // in case the get works like a put because there is a cacheLoader
-        regionSnapshot[key] = anObj;
-        destroyedKeys.Remove(key);
-      }
-    }
-
-    protected void destroyEntry(IRegion<TKey, TVal> m_region, bool isLocalDestroy)
-    {
-      TKey key = GetExistingKey(isEmptyClient || isThinClient);
-      if (EqualityComparer<TKey>.Default.Equals(key,default(TKey)))
-      {
-        int size = m_region.Count;
-        if (isSerialExecution && (size != 0))
-          throw new Exception("getExistingKey returned " + key + ", but region size is " + size);
-        FwkTest<TKey, TVal>.CurrentTest.FwkInfo("destroyEntry: No keys in region");
-        return;
-      }
-      int beforeSize = 0;
-      if (isEmptyClient || m_istransaction)
-        beforeSize = m_region.Count;
-      else
-        beforeSize = m_region.GetLocalView().Count;
-      try
-      {
-        if (isLocalDestroy)
-        { // do a local invalidate
-          m_region.GetLocalView().Remove(key);
-        }
-        else
-        { // do a distributed invalidate
-          m_region.Remove(key);
-        }
-
-        // validation
-        if (isSerialExecution)
-        {
-          if (isEmptyClient)
-          {
-            if (!CacheHelper<TKey, TVal>.DCache.CacheTransactionManager.Exists())
-            {
-              verifySize(m_region,0);
-            }
-          }
-          else if (isThinClient)
-          { // we have eviction
-            if (!CacheHelper<TKey, TVal>.DCache.CacheTransactionManager.Exists())
-            {
-              verifyContainsKey(m_region,key, false);
-              verifyContainsValueForKey(m_region,key, false);
-              int afterSize = m_region.Count;
-              if ((afterSize != beforeSize) && (afterSize != beforeSize - 1))
-              {
-                throw new Exception("Expected region size " + afterSize + " to be either " +
-                    beforeSize + " or " + (beforeSize - 1));
-              }
-            }
-          }
-          else
-          { // region has all keys/values
-            verifyContainsKey(m_region,key, false);
-            verifyContainsValueForKey(m_region,key, false);
-            verifySize(m_region,beforeSize - 1);
-          }
-          regionSnapshot.Remove(key);
-          destroyedKeys.Add(key);
-        }
-      }
-      catch (EntryNotFoundException e)
-      {
-        if (isSerialExecution)
-          throw new Exception(e.StackTrace);
-        else
-        {
-          Util.Log("Caught {0} (expected with concurrent execution); continuing with test", e);
-          return;
-        }
-      }
-    }
-    protected void putAll(IRegion<TKey, TVal> r) 
-    {
-   // determine the number of new keys to put in the putAll
-   int beforeSize = 0;
-   if (isEmptyClient || m_istransaction)
-        beforeSize = r.Count;
-      else
-        beforeSize = r.GetLocalView().Count;
-   int localBeforeSize = r.GetLocalView().Count;
-   ResetKey("numPutAllExistingKeys");
-   ResetKey("numPutAllNewKeys");
-   int numNewKeysToPut = GetUIntValue("numPutAllNewKeys");
-  // get a map to put
-   IDictionary<TKey, TVal> mapToPut = new Dictionary<TKey,TVal>();
-      int valSize = GetUIntValue(ValueSizes);
-      int minValSize = (int)(sizeof(int) + sizeof(long) + 4);
-      valSize = ((valSize < minValSize) ? minValSize : valSize);
-      string valBuf = null;
-      valBuf = new string('A', valSize);
-      StringBuilder newKeys = new StringBuilder();
-        for (int i = 0; i < numNewKeysToPut; i++)
-        {
-          TKey key = GetNewKey();
-          TVal value = GetValue();
-          mapToPut[key] = value;
-          newKeys.Append(key + " ");
-          if ((i % 10) == 0) {
-            newKeys.Append("\n");
-          }
-        }
-     
-
-   // add existing keys to the map
-   int numPutAllExistingKeys =  GetUIntValue("numPutAllExistingKeys");
-   StringBuilder existingKeys = new StringBuilder();
-   if (numPutAllExistingKeys > 0) {
-         for (int i = 0; i < numPutAllExistingKeys; i++) { // put existing keys
-           TKey key = GetExistingKey(isEmptyClient || isThinClient);
-           TVal anObj = GetValue();
-            mapToPut[key] = anObj;
-            existingKeys.Append(key + " ");
-            if (((i+1) % 10) == 0) {
-               existingKeys.Append("\n");
-            }
-         }
-   }
-   FwkInfo("PR size is " + beforeSize + ", local region size is " +
-       localBeforeSize + ", map to use as argument to putAll is " + 
-       mapToPut.GetType().Name + " containing " + numNewKeysToPut + " new keys and " + 
-       numPutAllExistingKeys + " existing keys (updates); total map size is " + mapToPut.Count +
-       "\nnew keys are: " + newKeys + "\n" + "existing keys are: " + existingKeys);
-   
-
-   // do the putAll
-   FwkInfo("putAll: calling putAll with map of " + mapToPut.Count + " entries");
-   r.PutAll(mapToPut, TimeSpan.FromSeconds(60));
-
-   FwkInfo("putAll: done calling putAll with map of " + mapToPut.Count + " entries");
-
-   // validation
-   if (isSerialExecution) {
-     if (isEmptyClient) {
-       if (!CacheHelper<TKey, TVal>.DCache.CacheTransactionManager.Exists())
-       {
-         verifySize(r, 0);
-       }
-     }
-     else { // we have all keys/values in the local region
-      verifySize(r, beforeSize + numNewKeysToPut);
-     }
-     foreach (KeyValuePair<TKey, TVal> kvp in mapToPut)
-     {
-       TKey key = kvp.Key;
-       TVal value = kvp.Value;
-       if (!isEmptyClient && !isThinClient)
-       {
-         verifyContainsKey(r, key, true);
-         verifyContainsValueForKey(r, key, true);
-       }
-       regionSnapshot[key] = value;
-       destroyedKeys.Remove(key);
-      } 
-    }
-}
-    public void doEntryOps()
-    {
-      IRegion<TKey, TVal> region = GetRegion();
-      string opcode = null;
-      bool rolledback = false;
-      int entryCount = GetUIntValue(EntryCount);
-      entryCount = (entryCount < 1) ? 10000 : entryCount;
-
-      int secondsToRun = GetTimeValue(WorkTime);
-      secondsToRun = (secondsToRun < 1) ? 10 : secondsToRun;
-
-      DateTime now = DateTime.Now;
-      DateTime end = now.AddSeconds(secondsToRun);
-      if (region == null)
-      {
-        FwkSevere("CacheServer.doEntryOps(): No region to perform operations on.");
-        now = end; // Do not do the loop
-      }
-      int size = 0;
-      int create = 0, update = 0, destroy = 0, invalidate = 0, localdestroy = 0, localinvalidate = 0,
-        get = 0, putall=0;
-      CacheTransactionManager txManager = null;
-      while (now < end)
-      {
-        rolledback = false;
-        try
-        {
-          if (isEmptyClient || m_istransaction)
-            size = region.Count;
-          else
-            size = region.GetLocalView().Count;
-        if (m_istransaction)
-        {
-          txManager = CacheHelper<TKey, TVal>.DCache.CacheTransactionManager;
-          txManager.Begin();
-        }
-        opcode = GetStringValue("entryOps");
-        if (opcode == null) opcode = "no-opcode";
-        //int addKeyCount = Util.BBIncrement("CreateOpCount", "CreateKeyCount");
-        
-        if (((size < 1) && (opcode != "create")) || (opcode == "create"))
-        {
-          addEntry(region);
-          create++;
-        }
-        else if (opcode == "update")
-        {
-          updateEntry(region);
-          update++;
-        }
-        else if (opcode == "destroy")
-        {
-          destroyEntry(region,false);
-          destroy++;
-          //Util.BBDecrement("CreateOpCount", "CreateKeyCount");
-        }
-        else if (opcode == "localDestroy")
-        {
-          destroyEntry(region,true);
-          localdestroy++;
-        }
-        else if (opcode == "invalidate")
-        {
-          invalidateEntry(region,false);
-          invalidate++;
-          //Util.BBDecrement("CreateOpCount", "CreateKeyCount");
-        }
-        else if (opcode == "localInvalidate")
-        {
-          invalidateEntry(region, true);
-          localinvalidate++;
-        }
-        else if (opcode == "putAll")
-        {
-          putAll(region);
-          putall++;
-        }
-        else if (opcode == "get")
-        {
-          getKey(region);
-          get++;
-        }
-        else
-        {
-          FwkException("CacheServer.doEntryOps() Invalid operation " +
-            "specified: {0}", opcode);
-        }
-        //removeDuplicates(destroyedKeys);
-        if (m_istransaction && !rolledback)
-        {
-          try
-          {
-            txManager.Commit();
-          }
-          catch (CommitConflictException)
-          {
-            // can occur with concurrent execution
-            Util.Log("Caught CommitConflictException. Expected with concurrent execution, continuing test.");
-          }
-          catch (TransactionDataNodeHasDepartedException e)
-          {
-            throw e;
-          }
-          catch (Exception ex)
-          {
-            throw new Exception("Caught unexpected in doEntry : {0}", ex);
-          }
-        }
-        }
-        catch (TransactionDataNodeHasDepartedException e)
-        {
-          if (!m_istransaction)
-          {
-            throw new Exception("Unexpected Exception : {0}",e);
-          }
-          else
-          {
-            FwkInfo("Caught Exception " + e + ".  Expected with HA, continuing test.");
-            FwkInfo("Rolling back transaction.");
-            try
-            {
-              txManager.Rollback();
-              FwkInfo("Done Rolling back Transaction");
-            }
-            catch (Exception te)
-            {
-              FwkInfo("Caught exception {0} on rollback() after catching TransactionDataNodeHasDeparted during tx ops.  Expected, continuing test.",te);
-            }
-            rolledback = true;
-          }
-        } 
-        catch (Exception ex)
-        {
-          FwkException("CacheServer.doEntryOps() Caught unexpected " +
-            "exception during entry '{0}' operation: {1}.", opcode, ex);
-        }
-        now = DateTime.Now;
-      }
-      FwkInfo("DoEntryOP: create = {0}, update = {1}, destroy = {2}, localdestroy = {3}"
-         + ",invalidate = {4},localinvalidate = {5}, get = {6}, putall = {7}",
-        create, update, destroy, localinvalidate, invalidate, localinvalidate, get, putall);
-    }
-    public void DoRandomEntryOperation()
-    {
-      FwkInfo("In DoRandomEntryOperation");
-      try
-      {
-        int timedInterval = GetTimeValue("timedInterval") * 1000;
-        if (timedInterval <= 0)
-        {
-          timedInterval = 5000;
-        }
-        int maxTime = 10 * timedInterval;
-
-        // Loop over key set sizes
-        ResetKey("distinctKeys");
-        int numKeys = GetUIntValue("distinctKeys");
-        isSerialExecution = GetBoolValue("serialExecution");
-        string clntid = null;
-        int roundPosition = 0;
-        if (isSerialExecution)
-        {
-            regionSnapshot = new Dictionary<TKey, TVal>();
-            destroyedKeys = new List<TKey>();
-            Util.BBSet("RoundPositionBB", "roundPosition", 1);
-            roundPosition = (int)Util.BBGet("RoundPositionBB", "roundPosition");
-            clntid = String.Format("Client.{0}", roundPosition);
-            
-        }
-        else
-        {
-            clntid = Util.ClientId;
-        }
-        int numClients = GetUIntValue("clientCount");
-        string dummyClntid = null;
-        bool isdone = false;
-        Util.BBSet("RoundPositionBB", "done", false);
-        while (true)
-        {
-           if (roundPosition > numClients)
-            break;
-          try
-          {
-            if (clntid.Equals(Util.ClientId))
-            {
-              //RunTask(entrytask, numThreads, -1, timedInterval, maxTime, null);
-              if (isSerialExecution)
-              {
-                  doEntryOps();
-                  DoWaitForSilenceListenerComplete();
-                  Util.BBSet("RegionSnapshot", "regionSnapshot", regionSnapshot);
-                  Util.BBSet("DestroyedKeys", "destroyedKeys", destroyedKeys);
-
-                  roundPosition = Util.BBIncrement("RoundPositionBB", "roundPosition");
-                  Util.BBSet("RoundPositionBB", "roundPosition", roundPosition);
-                  //clntid = String.Format("Client.{0}", roundPosition);
-                  Util.BBSet("RoundPositionBB", "done", true);
-                  Util.BBSet("RoundPositionBB", "VerifyCnt", 0);
-              }
-              else
-              {
-                  doEntryOps();
-                  break;
-              }
-              Thread.Sleep(2000);
-            }
-            else// if(!Util.ClientId.Equals(dummyClntid))G1326
-            {
-                for (; ; )
-                {
-                    isdone = (bool)Util.BBGet("RoundPositionBB", "done");
-                    if (isdone)
-                        break;
-                }
-                if (isdone)
-                {
-                  Thread.Sleep(35000);
-                  try
-                  {
-                      verifyFromSnapshot();
-                      Util.BBSet("RoundPositionBB", "done", false);
-                      Util.BBIncrement("RoundPositionBB", "VerifyCnt");     
-                  }
-                  catch (Exception ex)
-                    {
-                        Util.BBSet("RoundPositionBB", "done", false);
-                        Util.BBIncrement("RoundPositionBB", "VerifyCnt");
-                        Util.BBSet("RoundPositionBB", "roundPosition", numClients + 1);
-                        FwkException("In DoRandomEntryOperation() caught excption {0}.",ex.Message);
-                    }
-                                 
-                }
-                Thread.Sleep(100);
-              
-              
-            }
-            if (isSerialExecution)
-            {
-                int verifyCnt = (int)Util.BBGet("RoundPositionBB", "VerifyCnt");
-                while (verifyCnt < numClients - 1)
-                {
-                    verifyCnt = (int)Util.BBGet("RoundPositionBB", "VerifyCnt");
-                    Thread.Sleep(100);
-                }
-                //Util.BBSet("RoundPositionBB", "VerifyCnt", 0);
-                roundPosition = (int)Util.BBGet("RoundPositionBB", "roundPosition");
-                clntid = String.Format("Client.{0}", roundPosition);
-                dummyClntid = String.Format("Client.{0}", (roundPosition - 1));
-            }
-
-            Thread.Sleep(3000);
-          }
-          catch (ClientTimeoutException)
-          {
-            Util.BBSet("RoundPositionBB", "done", true);
-            Util.BBSet("RoundPositionBB", "roundPosition", numClients + 1);
-            FwkException("In DoRandomEntryOperation()  Timed run timed out.");
-          }
-          catch (Exception ex)
-          {
-            Util.BBSet("RoundPositionBB", "done", true);
-            Util.BBSet("RoundPositionBB", "roundPosition", numClients + 1);
-            FwkException("In DoRandomEntryOperation() caught excption {0}.",ex);
-          }
-          Thread.Sleep(3000);
-          
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoRandomEntryOperation() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoRandomEntryOperation() complete.");
-    }
-    public void doPopulateNewEntry()
-    {
-      IRegion<TKey,TVal> aRegion = GetRegion();
-      ResetKey("distinctKeys");
-      int numkeys = GetUIntValue("distinctKeys");
-      for(int i = 0;i<numkeys;i++)
-        addEntry(aRegion);
-    }
-    public void verifyFromSnapshot()
-    {
-      verifyFromSnapshotOnly();
-      //verifyInternalPRState();
-    }
-    public void verifyFromSnapshotOnly()
-    {
-      IRegion<TKey, TVal> aRegion = GetRegion();
-      if (isEmptyClient)
-      {
-        verifyServerKeysFromSnapshot();
-        return;
-      }/*
-      else if (isThinClient)
-      {
-        //verifyThinClientFromSnapshot();
-        verifyServerKeysFromSnapshot();
-        return;
-      }*/
-      StringBuilder aStr = new StringBuilder();
-      regionSnapshot = (Dictionary<TKey, TVal>)Util.BBGet("RegionSnapshot", "regionSnapshot");
-      int snapshotSize = regionSnapshot.Count;
-      int regionSize = 0;
-      if (isEmptyClient || m_istransaction)
-        regionSize = aRegion.Count;
-      else
-        regionSize = aRegion.GetLocalView().Count;
-      //int regionSize = aRegion.Count;// rjk this need to be uncommented if transaction is true.
-      //int regionSize = aRegion.GetLocalView().Count;
-      FwkInfo("Verifying from snapshot containing " + snapshotSize + " entries...");
-      if (snapshotSize != regionSize)
-      {
-        aStr.Append("Expected region " + aRegion.FullPath + " to be size " + snapshotSize +
-             ", but it is " + regionSize.ToString() + "\n");
-      }
-      foreach( KeyValuePair<TKey, TVal> kvp in regionSnapshot )
-      {
-        TKey key = kvp.Key;
-        TVal expectedValue = kvp.Value;
-        try
-        {
-          verifyContainsKey(aRegion, key, true);
-        }
-        catch (Exception e)
-        {
-          aStr.Append(e.Message + "\n");
-          //         anyFailures = true;
-        }
-        bool containsValueForKey = aRegion.GetLocalView().ContainsValueForKey(key);
-        try
-        {
-          verifyContainsValueForKey(aRegion, key, (expectedValue != null));
-        }
-        catch (Exception e)
-        {
-          aStr.Append(e.Message + "\n");
-        }
-
-        // do a get on the partitioned region if a loader won't get invoked; test its value
-        if (containsValueForKey)
-        {
-          // loader won't be invoked if we have a value for this key (whether or not a loader
-          // is installed), or if we don't have a loader at all
-          try
-          {
-            TVal actualValue = aRegion[key];
-            //if (!EqualityComparer<TVal>.Default.Equals(actualValue, default(TVal)))
-            //{
-            if (!actualValue.Equals(expectedValue))
-            {
-              FwkException("verifyFromSnapshotOnly: expected value {0} is not same as actual value {1} for key {3}",
-                expectedValue, actualValue, key);
-            }
-            //}
-          }
-          catch (Apache.Geode.Client.KeyNotFoundException)
-          {
-          }
-          catch (Exception e)
-          {
-            aStr.Append(e.Message + "\n");
-          }
-        }
-      }
-      if (isSerialExecution)
-      {
-        // check that destroyedKeys are not in the region
-        destroyedKeys = (List<TKey>)Util.BBGet("DestroyedKeys", "destroyedKeys");
-        for (int i = 0; i < destroyedKeys.Count; i++)
-        {
-          TKey key = destroyedKeys[i];
-          try
-          {
-            verifyContainsKey(aRegion, key, false);
-          }
-          catch (Exception e)
-          {
-            aStr.Append(e.Message + "\n");
-          }
-        }
-      }
-        try
-        {
-          verifyServerKeysFromSnapshot();
-        }
-        catch (Exception e)
-        {
-          aStr.Append(e.Message + "\n");
-        }
-      
-      if (aStr.Length > 0)
-      {
-        // shutdownHook will cause all members to dump partitioned region info
-        throw new Exception(aStr.ToString());
-      }
-      FwkInfo("Done verifying from snapshot containing " + snapshotSize.ToString() + " entries...");
-    }
-    
-    public void verifyServerKeysFromSnapshot()
-    {
-      IRegion<TKey, TVal> aRegion = GetRegion();
-      StringBuilder aStr = new StringBuilder();
-      regionSnapshot = (Dictionary<TKey, TVal>)Util.BBGet("RegionSnapshot", "regionSnapshot");
-      if(isSerialExecution)
-        destroyedKeys = (List<TKey>)Util.BBGet("DestroyedKeys", "destroyedKeys");
-      ICollection<TKey> serverKeys = new System.Collections.ObjectModel.Collection<TKey>();
-      foreach (TKey key in aRegion.Keys)
-        serverKeys.Add(key);
-
-      int snapshotSize = regionSnapshot.Count;
-      int numServerKeys = serverKeys.Count;
-      //int numServerKeys = aRegion.Count;
-      FwkInfo("Verifying server keys from snapshot containing " + snapshotSize.ToString() + " entries...");
-      if (snapshotSize != numServerKeys)
-      {
-        aStr.Append("Expected number of keys on server to be " + snapshotSize.ToString() + ", but it is " + numServerKeys.ToString() + "\n");
-      }
-      foreach (KeyValuePair<TKey, TVal> kvp in regionSnapshot)
-      { // iterating the expected keys
-        TKey key = kvp.Key;
-        TVal expectedValue = kvp.Value;
-        if (!serverKeys.Contains(key))
-        {
-          aStr.Append("Expected key " + key + " to be in server keys set, but it is missing\n");
-        }
-        else
-        {
-          // only do a get if we will not invoke the silence listener on a get
-          if ((!isThinClient && !isEmptyClient) ||
-              (isThinClient && aRegion.GetLocalView().ContainsKey(key)))
-          {
-            try
-            {
-            TVal valueOnServer = aRegion[key];
-            //if (!EqualityComparer<TVal>.Default.Equals(valueOnServer, default(TVal)))
-              //{
-                if (!valueOnServer.Equals(expectedValue))
-                {
-                  FwkException("verifyFromSnapshotOnly: expected value {0} is not same as actual value {1} for key {2}",
-                    expectedValue, valueOnServer,key);
-                }
-              //}
-            }
-            catch (Apache.Geode.Client.KeyNotFoundException)
-            {
-            }
-            catch (Exception e)
-            {
-              aStr.Append(e.Message + "\n");
-            }
-          }
-        }
-      }
-
-      // check that destroyedKeys are not in the server keys
-      if (isSerialExecution)
-      {
-        destroyedKeys = (List<TKey>)Util.BBGet("DestroyedKeys", "destroyedKeys");
-        for (int i = 0; i < destroyedKeys.Count; i++)
-        {
-          TKey key = destroyedKeys[i];
-          if (serverKeys.Contains(key))
-          {
-            aStr.Append("Destroyed key " + key + " was returned as a server key\n");
-          }
-        }
-
-
-        foreach (TKey key in regionSnapshot.Keys)
-        {
-          FwkInfo("IsReadOnly {0}", serverKeys.IsReadOnly);
-          FwkInfo("serverKeys  key {0}", key);
-          serverKeys.Remove(key);
-        }
-        if (serverKeys.Count != 0)
-        {
-          foreach (TKey key in serverKeys)
-          {
-            aStr.Append("Found the following unexpected keys in server keys: " +
-                        ": " + key + "\n");
-          }
-        }
-      }
-      if (aStr.Length > 0)
-      {
-        // shutdownHook will cause all members to dump partitioned region info
-        throw new Exception(aStr.ToString());
-      }
-      FwkInfo("Done verifying server keys from snapshot containing " + snapshotSize.ToString() + " entries...");
-    }
-    public void dumpDataOnBB()
-    {
-      IRegion<TKey, TVal> aRegion = GetRegion();
-      ICollection<TKey> serverkeys = aRegion.Keys;
-      //int expectedKeys = GetUIntValue("expectedKeys");
-      //if (expectedKeys != aRegion.Count)
-      //{
-      //  FwkException("CacheServerTest::dumpDataOnBB(): region count {0} is not same as expected size {0}", aRegion.Count, expectedKeys);
-      //}
-      regionSnapshot = new Dictionary<TKey, TVal>();
-      foreach (TKey key in serverkeys)
-      {
-          TVal value = default(TVal);;
-          try
-          {
-              value = aRegion[key];
-          }catch(Apache.Geode.Client.KeyNotFoundException){
-              value = default(TVal);
-          }
-          regionSnapshot[key] = value;
-      }
-      Util.BBSet("RegionSnapshot", "regionSnapshot", regionSnapshot);
-    }
-    // Tx code end
-    public void DoEntryOperations()
-    {
-      FwkInfo("CacheServer.DoEntryOperations() called.");
-
-      int opsSec = GetUIntValue(OpsSecond);
-      opsSec = (opsSec < 1) ? 0 : opsSec;
-
-      int entryCount = GetUIntValue(EntryCount);
-      entryCount = (entryCount < 1) ? 10000 : entryCount;
-
-      int secondsToRun = GetTimeValue(WorkTime);
-      secondsToRun = (secondsToRun < 1) ? 30 : secondsToRun;
-
-      int valSize = GetUIntValue(ValueSizes);
-      int minValSize = (int)(sizeof(int) + sizeof(long) + 4);
-      valSize = ((valSize < minValSize) ? minValSize : valSize);
-
-      bool isCq = GetBoolValue("cq");
-          
-      DateTime now = DateTime.Now;
-      DateTime end = now.AddSeconds(secondsToRun);
-
-      TKey key;
-      TVal value;
-      TVal tmpValue;
-      //TVal valBuf = (TVal)(object)Encoding.ASCII.GetBytes(new string('A', valSize));
-      byte[] valBuf = Encoding.ASCII.GetBytes(new string('A', valSize));
-      string opcode = null;
-
-      Int32 creates = 0, puts = 0, gets = 0, dests = 0, invals = 0, query = 0, putAll = 0, getAll = 0;
-      IRegion<TKey,TVal> region = GetRegion();
-      if (region == null)
-      {
-        FwkSevere("CacheServer.DoEntryOperations(): No region to perform operations on.");
-        now = end; // Do not do the loop
-      }
-
-      FwkInfo("CacheServer.DoEntryOperations() will work for {0}secs " +
-        "using {1} byte values.", secondsToRun, valSize);
-
-      PaceMeter pm = new PaceMeter(opsSec);
-      string objectType = GetStringValue(ObjectType);
-      bool multiRegion = GetBoolValue("multiRegion");
-      while (now < end)
-      {
-        try
-        {
-          opcode = GetStringValue(EntryOps);
-          if (opcode == null || opcode.Length == 0) 
-          {
-            opcode = "no-op";
-          }
-          if (multiRegion)
-          {
-            region = GetRegion();
-            if (region == null)
-            {
-              FwkException("CacheServerTest::doEntryOperations(): No region to perform operation {0}" , opcode);
-            }
-          }
-
-          key = (TKey)(object)GetKey(entryCount);
-          if (opcode == "add")
-          {
-              if (isCq)
-              {
-                  if (region.ContainsKey(key))
-                  {
-                      if (objectType != null && objectType.Length > 0)
-                      {
-                          tmpValue = GetUserObject(objectType);
-                      }
-                      else
-                      {
-                          int keyVal = int.Parse(key.ToString());
-                          int val = BitConverter.ToInt32(valBuf, 0);
-                          val = (val == keyVal) ? keyVal + 1 : keyVal;  // alternate the value so that it can be validated later.
-                          BitConverter.GetBytes(val).CopyTo(valBuf, 0);
-                          BitConverter.GetBytes(DateTime.Now.Ticks).CopyTo(valBuf, 4);
-                          tmpValue = (TVal)(object)valBuf;
-                      }
-                      region[key] = tmpValue;
-                      puts++;
-                      
-                  }
-                  else
-                  {
-                      if (objectType != null && objectType.Length > 0)
-                      {
-                          tmpValue = (TVal)(object)GetUserObject(objectType);
-                      }
-                      else
-                      {
-                          tmpValue = (TVal)(object)valBuf;
-                      }
-                      try
-                      {
-                          region.Add(key, tmpValue);
-                          creates++;
-                      }
-                      catch (EntryExistsException ex)
-                      {
-                          FwkInfo("CacheServer.DoEntryOperations() Caught non-fatal " +
-                               "exception in add: {0}", ex.Message);
-                      }
-                  }
-              }
-          }
-          else
-          {
-            if (opcode == "update")
-            {
-              if (objectType != null && objectType.Length > 0)
-              {
-                tmpValue = GetUserObject(objectType);
-              }
-              else
-              {
-                int keyVal = int.Parse(key.ToString());
-                int val = BitConverter.ToInt32(valBuf, 0);
-                val = (val == keyVal) ? keyVal + 1 : keyVal;  // alternate the value so that it can be validated later.
-                BitConverter.GetBytes(val).CopyTo(valBuf, 0);
-                BitConverter.GetBytes(DateTime.Now.Ticks).CopyTo(valBuf, 4);
-                tmpValue = (TVal)(object)valBuf;
-              }
-              region[key] = tmpValue;
-              puts++;
-            }
-            else if (opcode == "invalidate")
-            {
-                if (isCq)
-                {
-                    if (region.ContainsKey(key))
-                    {
-                        if (region.ContainsValueForKey(key))
-                        {
-                            try
-                            {
-                                region.Invalidate(key);
-                                invals++;
-                            }
-                            catch (EntryNotFoundException ex)
-                            {
-                                FwkInfo("CacheServer.DoEntryOperations() Caught non-fatal " +
-                                  "exception in invalidate: {0}", ex.Message);
-                            }
-                        }
-
-                    }
-                }
-                else
-                {
-                  try
-                  {
-                    region.Invalidate(key);
-                    invals++;
-                  }
-                  catch (EntryNotFoundException ex)
-                  {
-                    FwkInfo("CacheServer.DoEntryOperations() Caught non-fatal " +
-                      "exception in invalidate: {0}", ex.Message);
-                  }
-                }
-            }
-            else if (opcode == "destroy")
-            {
-              try
-              {
-                region.Remove(key);
-                dests++;
-              }
-              catch (EntryNotFoundException ex)
-              {
-                FwkInfo("CacheServer.DoEntryOperations() Caught non-fatal " +
-                  "exception in destroy: {0}", ex.Message);
-              }
-            }
-            else if (opcode == "read")
-            {
-              try {
-                value = (TVal)region[key];
-                gets++;
-              }
-              catch (EntryNotFoundException ex) {
-                FwkInfo("CacheServer.DoEntryOperations() Caught non-fatal " +
-                  "exception in read: {0}", ex.Message);
-              }
-              catch (Apache.Geode.Client.KeyNotFoundException ex) {
-                FwkInfo("CacheServer.DoEntryOperations() Caught non-fatal " +
-                  "exception in read: {0}", ex.Message);
-              }
-            }
-            else if (opcode == "read+localdestroy")
-            {
-              value = region[key];
-              gets++;
-              try
-              {
-                region.GetLocalView().Remove(key);
-                dests++;
-              }
-              catch (EntryNotFoundException ex)
-              {
-                FwkInfo("CacheServer.DoEntryOperations() Caught non-fatal " +
-                  "exception in localDestroy: {0}", ex.Message);
-              }
-            }
-            else if (opcode == "query")
-            {
-              RunQuery();
-              query += 4;
-            }
-            else if (opcode == "putAll")
-            {
-              PutAllOps();
-              putAll++;
-            }
-            else if (opcode == "getAll")
-            {
-              GetAllOps();
-              getAll++;
-            }
-            else
-            {
-              FwkException("CacheServer.DoEntryOperations() Invalid operation " +
-                "specified: {0}", opcode);
-            }
-          }
-        }
-        catch (Exception ex)
-        {
-          FwkException("CacheServer.DoEntryOperations() Caught unexpected " +
-            "exception during entry '{0}' operation: {1}.", opcode, ex);
-        }
-        pm.CheckPace();
-        now = DateTime.Now;
-      }
-      key = default(TKey);
-      value = default(TVal);
-
-      FwkInfo("CacheServer.DoEntryOperations() did {0} creates, {1} puts, " +
-        "{2} gets, {3} invalidates, {4} destroys, {5} querys, {6} putAll, {7} getAll.",
-        creates, puts, gets, invals, dests, query, putAll, getAll);
-      Util.BBSet("OpsBB","CREATES",creates);
-      Util.BBSet("OpsBB","UPDATES",puts);
-      Util.BBSet("OpsBB","DESTROYS",dests);
-      Util.BBSet("OpsBB","GETS",gets);
-      Util.BBSet("OpsBB","INVALIDATES",invals);
-    }
-
-    
-
-    public void DoEntryOperationsForSecurity()
-    {
-      FwkInfo("CacheServer.DoEntryOperationsForSecurity() called.");
-      Util.RegisterTestCompleteDelegate(TestComplete);
-
-      int opsSec = GetUIntValue(OpsSecond);
-      opsSec = (opsSec < 1) ? 0 : opsSec;
-
-      int entryCount = GetUIntValue(EntryCount);
-      entryCount = (entryCount < 1) ? 10000 : entryCount;
-
-      int secondsToRun = GetTimeValue(WorkTime);
-      secondsToRun = (secondsToRun < 1) ? 30 : secondsToRun;
-
-      int valSize = GetUIntValue(ValueSizes);
-      int minValSize = (int)(sizeof(int) + sizeof(long) + 4);
-      valSize = ((valSize < minValSize) ? minValSize : valSize);
-
-      DateTime now = DateTime.Now;
-      DateTime end = now.AddSeconds(secondsToRun);
-
-      TKey key;
-      TVal value;
-      TVal tmpValue;
-      byte[] valBuf = Encoding.ASCII.GetBytes(new string('A', valSize));
-
-      string opCode = null;
-
-      IRegion<TKey,TVal> region = GetRegion();
-      if (region == null)
-      {
-        FwkException("CacheServer.DoEntryOperationsForSecurity(): " +
-          "No region to perform operations on.");
-      }
-
-      FwkInfo("CacheServer.DoEntryOperationsForSecurity() will work for {0}secs " +
-        "using {1} byte values.", secondsToRun, valSize);
-
-      int cnt = 0;
-      int creates = 0, puts = 0, gets = 0, dests = 0, invals = 0, query = 0;
-      PaceMeter pm = new PaceMeter(opsSec);
-      string objectType = GetStringValue(ObjectType);
-      while (now < end)
-      {
-        int addOps = 1;
-        opCode = GetStringValue(EntryOps);
-        
-        try
-        {
-          UpdateOperationsMap(opCode, 1);
-          if (opCode == null || opCode.Length == 0)
-          {
-            opCode = "no-op";
-          }
-
-          key = GetKey(entryCount);
-          if (opCode == "create")
-          {
-            if (objectType != null && objectType.Length > 0)
-            {
-              tmpValue = GetUserObject(objectType);
-            }
-            else
-            {
-              tmpValue = (TVal)(object)valBuf;
-            }
-            region.Add(key, tmpValue);
-            creates++;
-          }
-          else
-          {
-            if (opCode == "update")
-            {
-              if (objectType != null && objectType.Length > 0)
-              {
-                tmpValue = (TVal)(object)GetUserObject(objectType);
-              }
-              else
-              {
-                int keyVal = int.Parse(key.ToString());
-                int val = BitConverter.ToInt32(valBuf, 0);
-                val = (val == keyVal) ? keyVal + 1 : keyVal;  // alternate the value so that it can be validated later.
-                BitConverter.GetBytes(val).CopyTo(valBuf, 0);
-                BitConverter.GetBytes(DateTime.Now.Ticks).CopyTo(valBuf, 4);
-                tmpValue = (TVal)(object)valBuf;
-              }
-              region[key] = tmpValue;
-              puts++;
-            }
-            else if (opCode == "invalidate")
-            {
-              region.Invalidate(key);
-              invals++;
-            }
-            else if (opCode == "destroy")
-            {
-              region.Remove(key);
-              dests++;
-            }
-            else if (opCode == "get")
-            {
-              value = (TVal)(object)region[key];
-              gets++;
-            }
-
-            else if (opCode == "getServerKeys")
-            {
-              ICollection<TKey> serverKeys = region.Keys;
-            }
-
-            else if (opCode == "read+localdestroy")
-            {
-              value = region[key];
-              gets++;
-              region.GetLocalView().Remove(key);
-              dests++;
-            }
-            else if (opCode == "regNUnregInterest")
-            {
-              TKey[] keys = new TKey[] { key };
-                region.GetSubscriptionService().RegisterKeys(keys);
-                region.GetSubscriptionService().UnregisterKeys(keys);
-            }
-            else if (opCode == "query")
-            {
-              var qs = CheckQueryService();
-              Query<object> qry = qs.NewQuery<object>("select distinct * from /Portfolios where FALSE");
-              ISelectResults<object> result = qry.Execute(TimeSpan.FromSeconds(600));
-              query++;
-            }
-            else if (opCode == "cq")
-            {
-              string cqName = String.Format("cq-{0}-{1}", Util.ClientId ,cnt++);
-              var qs = CheckQueryService();
-              CqAttributesFactory<TKey, object> cqFac = new CqAttributesFactory<TKey, object>();
-              ICqListener<TKey, object> cqLstner = new MyCqListener<TKey, object>();
-              cqFac.AddCqListener(cqLstner);
-              CqAttributes<TKey, object> cqAttr = cqFac.Create();
-              CqQuery<TKey, object> cq = qs.NewCq(cqName, "select * from /Portfolios where FALSE", cqAttr, false);
-              cq.Execute();
-              cq.Stop();
-              cq.Execute();
-              cq.Close();
-            }
-            else
-            {
-              FwkException("CacheServer.DoEntryOperationsForSecurity() " +
-                "Invalid operation specified: {0}", opCode);
-            }
-          }
-        }
-        catch (NotAuthorizedException)
-        {
-          //FwkInfo("Got expected NotAuthorizedException for operation {0}: {1}",
-          //  opCode, ex.Message);
-          UpdateExceptionsMap(opCode, 1);
-        }
-        catch (EntryExistsException)
-        {
-          addOps = -1;
-          UpdateOperationsMap(opCode, addOps);
-        }
-        catch (EntryNotFoundException)
-        {
-          addOps = -1;
-          UpdateOperationsMap(opCode, addOps);
-        }
-        catch (EntryDestroyedException)
-        {
-          addOps = -1;
-          UpdateOperationsMap(opCode, addOps);
-        }
-        catch (Apache.Geode.Client.KeyNotFoundException)
-        {
-          addOps = -1;
-          UpdateOperationsMap(opCode, addOps);
-        }
-        catch (TimeoutException ex)
-        {
-          FwkSevere("Caught unexpected timeout exception during entry {0} " +
-            " operation: {1}; continuing with test.", opCode, ex.Message);
-        }
-        catch (Exception ex)
-        {
-          FwkException("CacheServer.DoEntryOperationsForSecurity() Caught " +
-            "unexpected exception during entry '{0}' operation: {1}.",
-            opCode, ex);
-        }
-        pm.CheckPace();
-        now = DateTime.Now;
-      }
-      key = default(TKey);
-      value = default(TVal);
-      FwkInfo("CacheServer.DoEntryOperationsForSecurity() did {0} creates, {1} puts, " +
-        "{2} gets, {3} invalidates, {4} destroys, {5} querys.",
-        creates, puts, gets, invals, dests, query);
-    }
-
-    public void DoValidateEntryOperationsForSecurity()
-    {
-      bool isExpectedPass = GetBoolValue("isExpectedPass");
-      string opCode;
-      while ((opCode = GetStringValue(EntryOps)) != null)
-      {
-        int numOps = GetOpsFromMap(OperationsMap, opCode);
-        int notAuthzCount = GetOpsFromMap(ExceptionsMap, opCode);
-        if (isExpectedPass)
-        {
-          if (numOps != 0 && notAuthzCount == 0)
-          {
-            FwkInfo("Task passed sucessfully for operation {0} with total " +
-              "operations = {1}", opCode, numOps);
-          }
-          else
-          {
-            FwkException("{0} NotAuthorizedExceptions found for operation {1} " +
-              "while expected 0", notAuthzCount, opCode);
-          }
-        }
-        else
-        {
-          if (numOps == notAuthzCount)
-          {
-            FwkInfo("Operation {0} passed sucessfully and got the expected " +
-              "number of incorrect authorizations: {1}", opCode, numOps);
-          }
-          else
-          {
-            FwkException("For operation {0} expected number of " +
-              "NotAuthorizedExceptions is {1} but found {2}", opCode,
-              numOps, notAuthzCount);
-          }
-        }
-      }
-    }
-    //------------------------------------------------doOps for rvv -----------------
-      
-      public void DoRegisterInterestList()
-      {
-          FwkInfo("In DoRegisterInterestList()");
-          try
-          {
-              int entryCount = GetUIntValue("entryCount");
-              int numNewKeys = GetUIntValue("NumNewKeys");
-            /*
-              TKey[] registerKeyList = new TKey[entryCount + numNewKeys + NUM_EXTRA_KEYS];
-              for (int i = 0; i < entryCount + numNewKeys + NUM_EXTRA_KEYS; i++)
-              {
-                  registerKeyList[i] = m_KeysA[i];
-              }*/
-              IRegion<TKey, TVal> region = GetRegion();
-              FwkInfo("DoRegisterAllKeys() region name is {0}", region.Name);
-              bool isDurable = GetBoolValue("isDurableReg");
-              ResetKey("getInitialValues");
-              bool isGetInitialValues = GetBoolValue("getInitialValues");
-              bool isReceiveValues = true;
-              bool checkReceiveVal = GetBoolValue("checkReceiveVal");
-              if (checkReceiveVal)
-              {
-                  ResetKey("receiveValue");
-                  isReceiveValues = GetBoolValue("receiveValue");
-              }
-              ResetKey("sleepBeforeRegisterInterest");
-              int sleepTime = GetUIntValue("sleepBeforeRegisterInterest");
-              sleepTime = sleepTime > 0 ? sleepTime : 0;
-              FwkInfo("Sleeping for " + sleepTime + " millis");
-              Thread.Sleep(sleepTime);
-              region.GetSubscriptionService().RegisterKeys(m_KeysA, isDurable, isGetInitialValues, isReceiveValues);
-              String durableClientId = CacheHelper<TKey, TVal>.DCache.SystemProperties.DurableClientId;
-              if (durableClientId.Length > 0)
-              {
-                  CacheHelper<TKey, TVal>.DCache.ReadyForEvents();
-              }
-          }
-          catch (Exception ex)
-          {
-              FwkException("DoRegisterInterestList() Caught Exception: {0}", ex);
-          }
-          FwkInfo("DoRegisterInterestList() complete.");
-      }
-
-      public void DoRegisterSingleKey()
-      {
-          FwkInfo("In DoRegisterSingleKey()");
-          try
-          {
-              
-            ExpectedRegionContents expected = null;
-               
-            string expectedcontentsRI_noops = GetStringValue("expectedRegionContents");
-            if(expectedcontentsRI_noops == "static_RI_noops_keysValues")
-                expected = expectedRgnContents[0];
-            else
-                expected = expectedRgnContents[2];
-              
-              int entryCount = GetUIntValue("entryCount");
-              int numNewKeys = GetUIntValue("NumNewKeys");
-              IRegion<TKey, TVal> region = GetRegion();
-              FwkInfo("DoRegisterAllKeys() region name is {0}", region.Name);
-              bool isDurable = GetBoolValue("isDurableReg");
-              ResetKey("getInitialValues");
-              bool isGetInitialValues = GetBoolValue("getInitialValues");
-              bool isReceiveValues = true;
-              bool checkReceiveVal = GetBoolValue("checkReceiveVal");
-              if (checkReceiveVal)
-              {
-                  ResetKey("receiveValue");
-                  isReceiveValues = GetBoolValue("receiveValue");
-              }
-              ResetKey("sleepBeforeRegisterInterest");
-              int sleepTime = GetUIntValue("sleepBeforeRegisterInterest");
-              sleepTime = sleepTime > 0 ? sleepTime : 0;
-              FwkInfo("Sleeping for " + sleepTime + " millis");
-              Thread.Sleep(sleepTime);
-              //TKey[] registerKeyList = new TKey[entryCount + numNewKeys + NUM_EXTRA_KEYS];
-              List<TKey> templist = new List<TKey>();
-              for (int i = 0; i < entryCount + numNewKeys + NUM_EXTRA_KEYS; i++)
-              {
-                  templist.Add(m_KeysA[i]);
-                  region.GetSubscriptionService().RegisterKeys(templist, isDurable, isGetInitialValues, isReceiveValues);
-                  if (expected != null)
-                     verifyEntry(m_KeysA[i], expected);
-                  templist.Clear();
-              }
-              String durableClientId = CacheHelper<TKey, TVal>.DCache.SystemProperties.DurableClientId;
-              if (durableClientId.Length > 0)
-              {
-                  CacheHelper<TKey, TVal>.DCache.ReadyForEvents();
-              }
-          }
-          catch (Exception ex)
-          {
-              FwkException("DoRegisterSingleKey() Caught Exception: {0}", ex);
-          }
-          FwkInfo("DoRegisterSingleKey() complete.");
-      }
-
-    public void doFeedInt()
-    {
-      FwkInfo("CacheServer.doFeedInt() called.");
-
-      int entryCount = GetUIntValue("entryCount");
-      entryCount = (entryCount < 1) ? 10000 : entryCount;
-     try {
-        IRegion<TKey,TVal> region = GetRegion();
-        TVal value = default(TVal);
-        for(int i = 0;i < entryCount;i++){
-            value = GetValue((i + 1));
-            if (value != null)
-            {
-                if (region.ContainsKey(m_KeysA[i]))
-                    region[m_KeysA[i]] = value;
-                else 
-                region.Add(m_KeysA[i], value);
-            }
-        }
-      }catch(Exception ex)
-      {
-        FwkException("doFeedInt() Caught Exception: {0}", ex);
-      }
-      FwkInfo("doFeedInt() complete.");
-    }
-    private TVal GetValue()
-         {
-             return GetValue(null);
-         }
-
-    private TVal GetValue(object value)
-    {
-        TVal tmpValue = default(TVal);
-        FwkTest<TKey, TVal>.CurrentTest.ResetKey("valueSizes");
-        int size = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("valueSizes");
-        StringBuilder builder = new StringBuilder();
-        Random random = new Random();
-        char ch;
-        for (int j = 0; j < size; j++)
-        {
-            ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
-            builder.Append(ch);
-        }
-        FwkTest<TKey, TVal>.CurrentTest.ResetKey("objectType");
-        string m_objectType = FwkTest<TKey, TVal>.CurrentTest.GetStringValue("objectType");
-        //FwkTest<TKey, TVal>.CurrentTest.ResetKey("elementSize");
-        //int elementSize = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("elementSize");
-        FwkTest<TKey, TVal>.CurrentTest.ResetKey("versionNum");
-        int m_versionNum = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("versionNum"); //random.Next(2) + 1;// (counter++ % 2) + 1;
-        string sharedpath = (string)Util.BBGet("SharedPath", "sharedDir");
-        string m_sharePath = Path.Combine(sharedpath, "framework/csharp/bin");
-        if (typeof(TVal) == typeof(string))
-        {
-            tmpValue = (TVal)(object)builder.ToString();
-        }
-        else if (typeof(TVal) == typeof(byte[]))
-        {
-            tmpValue = (TVal)(object)(Encoding.ASCII.GetBytes(builder.ToString()));
-        }
-        else if (m_objectType != null)
-        {
-            if (m_objectType.Equals("PdxVersioned") && m_versionNum == 1)
-            {
-                PdxTests<TKey, TVal>.m_pdxVersionOneAsm = Assembly.LoadFrom(Path.Combine(m_sharePath, "PdxVersion1Lib.dll"));
-                Type pt = PdxTests<TKey, TVal>.m_pdxVersionOneAsm.GetType("PdxVersionTests.PdxVersioned", true, true);
-                tmpValue = (TVal)pt.InvokeMember("PdxVersioned", BindingFlags.CreateInstance, null, null, new object[] { value.ToString() });
-            }
-            else if (m_objectType.Equals("PdxVersioned") && m_versionNum == 2)
-            {
-                PdxTests<TKey, TVal>.m_pdxVersionTwoAsm = Assembly.LoadFrom(Path.Combine(m_sharePath, "PdxVersion2Lib.dll"));
-                Type pt = PdxTests<TKey, TVal>.m_pdxVersionTwoAsm.GetType("PdxVersionTests.PdxVersioned", true, true);
-                tmpValue = (TVal)pt.InvokeMember("PdxVersioned", BindingFlags.CreateInstance, null, null, new object[] { value.ToString() });
-            }
-            else if (m_objectType.Equals("Nested"))
-            {
-
-                tmpValue = (TVal)(object)new NestedPdx();
-            }
-            else if (m_objectType.Equals("PdxType"))
-            {
-                tmpValue = (TVal)(object)new PdxType();
-            }
-            /*else if (m_objectType.Equals("PdxInstanceFactory"))
-            {
-
-                tmpValue = createIpdxInstance();
-            }*/
-            else if (m_objectType.Equals("AutoSerilizer"))
-            {
-                tmpValue = (TVal)(object)new SerializePdx1(true);
-            }
-        }
-        else
-            tmpValue = (TVal)(object)value;
-        return tmpValue;
-
-    }
-    public void DoInitInstance() {
-	try {
-     ResetKey("entryCount");
-	int entryCount = GetUIntValue( "entryCount" );
-	entryCount = ( entryCount < 1 ) ? 10000 : entryCount;
-    ResetKey("NumNewKeys");
-	int numNewKeys = GetUIntValue( "NumNewKeys" );
-	//m_KeysA = new List<TKey>();
-	SetFisrtAndLastKeyOnBB(entryCount);
-	for(int cnt = 0;cnt < entryCount;cnt++){
-        m_KeysA.Add((TKey)(object)(cnt + 1));
-	}
-	 for (int i = entryCount; i < entryCount+numNewKeys; i++)
-         m_KeysA.Add((TKey)(object)(i + 1));
-	  // add some extra keys to the list that are never created by the test
-	 for (int i = entryCount+numNewKeys;i<entryCount+numNewKeys + NUM_EXTRA_KEYS; i++) // do a few more keys than we really need
-         m_KeysA.Add((TKey)(object)(i + 1));
-	 //static_RI_noops_keysValues 
-     //expectedRgnContents = new ExpectedRegionContents[4];
-     expectedRgnContents[0] = new ExpectedRegionContents(
-	       true,  true,  // none
-	       true,  true,  // invalidate
-	       true,  true,  // localInvalidate
-	       true,  true,  // destroy
-	       true,  true,  // localDestroy
-	       true,  true,  // update
-	       true,  true,  // get
-	       false, false, // newKey
-	       false,        // get allowed during validate
-           false);       // update has occurred
-        expectedRgnContents[0].exactSize(entryCount);
-	/* static_RI_noops_keys = new ExpectedRegionContents(
-	       true,  false,  // none
-	       true,  false,  // invalidate
-	       true,  false,  // localInvalidate
-	       true,  false,  // destroy
-	       true,  false,  // localDestroy
-	       true,  false,  // update
-	       true,  false,  // get
-	       false, false, // newKey
-	       false,        // get allowed during validate
-	       false);
-	 static_RI_noops_none = new ExpectedRegionContents(
-	       false, false,  // none
-	       false, false,  // invalidate
-	       false, false,  // localInvalidate
-	       false, false,  // destroy
-	       false, false,  // localDestroy
-	       false, false,  // update
-	       false, false,  // get
-	       false, false, // newKey
-	       false,        // get allowed during validate
-	       false);
-      */
-	 //static_RI_ops_keysValues 
-     expectedRgnContents[1] = new ExpectedRegionContents( // This is also valid for relicated function executions
-	 	       true,  true,  // none
-	 	       true,  false, // invalidate
-	 	       true,  true,  // localInvalidate
-	 	       false, false, // destroy
-	 	       true,  true,  // localDestroy
-	 	       true,  true,  // update
-	 	       true,  true,  // get
-	 	       true,  true,  // newKey
-	 	       true,         // get allowed during validate
-	 	       true);        // update has occurred
-     Int32 numDestroyed = (Int32)Util.BBGet("ImageBB", "Last_Destroy") - (Int32)Util.BBGet("ImageBB", "First_Destroy") + 1;
-     Int32 numInvalidated = (Int32)Util.BBGet("ImageBB", "Last_Invalidate") - (Int32)Util.BBGet("ImageBB", "First_Invalidate") + 1;
-     expectedRgnContents[1].exactSize(entryCount - numDestroyed + numNewKeys);
-	/* static_RI_ops_keys = new ExpectedRegionContents(
-	       true,  false, // none
-	       true,  false, // invalidate
-	       true,  false, // localInvalidate
-	       false, false, // destroy
-	       true,  false, // localDestroy
-	       true,  true,  // update
-	       true,  false, // get
-	       true,  true,  // newKey
-	       true,         // get allowed during validate
-	       true);        // update has occurred
-	 static_RI_ops_none = new ExpectedRegionContents(
-	       false, false, // none
-	       false, false, // invalidate
-	       false, false, // localInvalidate
-	       false, false, // destroy
-	       false, false, // localDestroy
-	       true,  true,  // update
-	       false, false, // get
-	       true,  true,  // newKey
-	       true,         // get allowed during validate
-	       true);        // update has occurred
-	       */
-	 //static_ops_RI_keysValues = 
-     expectedRgnContents[2] = new ExpectedRegionContents(
-	       true,  true,  // none
-	       true,  false, // invalidate
-	       true,  true,  // localInvalidate
-	       false, false, // destroy
-	       true,  true,  // localDestroy
-	       true,  true,  // update
-	       true,  true,  // get
-	       true,  true,  // newKey
-	       true,         // get allowed during validate
-	       true);        // update has occurred
-     expectedRgnContents[2].exactSize(entryCount - 2 * numDestroyed + numNewKeys + numInvalidated);
-	  //dynamicKeysValues
-           expectedRgnContents[3] = new ExpectedRegionContents(true, true, true);
-           expectedRgnContents[3].containsValue_invalidate(false);
-           expectedRgnContents[3].containsKey_destroy(false);
-           expectedRgnContents[3].containsValue_destroy(false);
-           expectedRgnContents[3].valueIsUpdated(true);
-           expectedRgnContents[3].exactSize(entryCount - numDestroyed + numNewKeys);
-
-           expectedRgnContents[4] = new ExpectedRegionContents( // Thit is for the same same client where we done ADD operation.
-              true, true,  // none
-              true, true,  // invalidate
-              true, true,  // localInvalidate
-              true, true,  // destroy
-              true, true,  // localDestroy
-              true, true,  // update
-              true, true,  // get
-              false, false, // newKey
-              true,        // get allowed during validate
-              false);       // update has occurred
-           expectedRgnContents[4].exactSize(entryCount);
-	 } catch ( Exception e ) {
-         FwkException("Caught unexpected exception during DoInitInstance " + e + " exiting task.");
-     }
-	 
-   }
-      public void DoResetImageBB()
-      {
-          ResetKey("entryCount");
-          int entryCount = GetUIntValue("entryCount");
-          SetFisrtAndLastKeyOnBB(entryCount);
-          Util.BBSet("ListenerBB", "lastEventTime", 0);
-    
-      }
-public void SetFisrtAndLastKeyOnBB(int entrycount  /* similar to numKeyIntervals on hydra*/)
-{
-        FwkInfo("In CacheServerTest::SetFisrtAndLastKeyOnBB");
-	   int count = 0; // 7 is num of ops ( create,update,get invalidate, local invalidate, destroy, local destroy )
-        bool m_istransaction = GetBoolValue( "useTransactions" );
-     if(m_istransaction){
-          count  = entrycount/5; // 5 is num of ops ( create,update,get invalidate,destroy )
-	  Util.BBSet("ImageBB", "First_LocalInvalidate",-1);
-	  Util.BBSet("ImageBB", "Last_LocalInvalidate",-1);
-	  Util.BBSet("ImageBB", "First_LocalDestroy",-1);
-	  Util.BBSet("ImageBB", "Last_LocalDestroy",-1);
-	  Util.BBSet("ImageBB","LASTKEY_LOCAL_INVALIDATE",1);
-	  Util.BBSet("ImageBB","LASTKEY_LOCAL_DESTROY",1);
-	  }
-        else {
-          count  = entrycount/7; // 7 is num of ops ( create,update,get invalidate, local invalidate, destroy, local destroy )
-          Util.BBSet("ImageBB", "First_LocalInvalidate",(5*count) +1);
-	  Util.BBSet("ImageBB", "Last_LocalInvalidate",6*count);
-	  Util.BBSet("ImageBB", "First_LocalDestroy",(6*count) +1);
-	  Util.BBSet("ImageBB", "Last_LocalDestroy",entrycount);
-	  Util.BBSet("ImageBB","LASTKEY_LOCAL_INVALIDATE",(5*count) +1);
-	  Util.BBSet("ImageBB","LASTKEY_LOCAL_DESTROY",(6*count) +1);
-	}
-	Util.BBSet("ImageBB", "First_None",1);
-	Util.BBSet("ImageBB", "Last_None",count);
-	Util.BBSet("ImageBB", "First_Invalidate",count +1);
-	Util.BBSet("ImageBB", "Last_Invalidate",2*count);
-    Util.BBSet("ImageBB", "First_Destroy",(2*count) +1);
-	Util.BBSet("ImageBB", "Last_Destroy",3*count);
-	Util.BBSet("ImageBB", "First_UpdateExistingKey",(3*count) +1);
-	Util.BBSet("ImageBB", "Last_UpdateExistingKey",4*count);
-	Util.BBSet("ImageBB", "First_Get",(4*count) +1);
-	Util.BBSet("ImageBB", "Last_Get",5*count);
-	Util.BBSet("ImageBB","NUM_NEW_KEYS_CREATED",1);
-	Util.BBSet("ImageBB","LASTKEY_UPDATE_EXISTING_KEY",(3*count) +1);
-	Util.BBSet("ImageBB","LASTKEY_INVALIDATE",(count) +1);
-	Util.BBSet("ImageBB","LASTKEY_DESTROY",(2*count) +1);
-	Util.BBSet("ImageBB","LASTKEY_GET",(4*count) +1);
-
-	FwkInfo(printKeyIntervalsBBData());
-}
-     
-public string printKeyIntervalsBBData( ) {
-    ResetKey("NumNewKeys");
-    ResetKey("entryCount");
-	int numNewKeys = GetUIntValue( "NumNewKeys" );
-	int numKeyIntervals = GetUIntValue( "entryCount" );
-    int numDestroyed = (int)Util.BBGet("ImageBB", "Last_Destroy") - (int)Util.BBGet("ImageBB", "First_Destroy") + 1;
-	totalNumKeys = numKeyIntervals + numNewKeys - numDestroyed;
-    StringBuilder attrsSB = new StringBuilder();
-    attrsSB.Append(Environment.NewLine + "keyIntervals read from blackboard = ");
-    attrsSB.Append(Environment.NewLine + "none: firstKey:" + Util.BBGet("ImageBB", "First_None") + 
-        ", lastKey: " + Util.BBGet("ImageBB", "Last_None"));
-    attrsSB.Append(Environment.NewLine + "invalidate: firstKey: " + Util.BBGet("ImageBB", "First_Invalidate") +
-        ", lastKey: " + Util.BBGet("ImageBB", "Last_Invalidate"));
-    attrsSB.Append(Environment.NewLine + "localInvalidate:  firstKey: " + Util.BBGet("ImageBB", "First_LocalInvalidate") +
-        ", lastKey: " + Util.BBGet("ImageBB", "Last_LocalInvalidate"));
-    attrsSB.Append(Environment.NewLine + "destroy: firstKey: " + Util.BBGet("ImageBB", "First_Destroy")+
-        ", lastKey: " + Util.BBGet("ImageBB", "Last_Destroy"));
-    attrsSB.Append(Environment.NewLine + "localDestroy: firstKey: " + Util.BBGet("ImageBB", "First_LocalDestroy") +
-        ", lastKey: " + Util.BBGet("ImageBB", "Last_LocalDestroy"));
-    attrsSB.Append(Environment.NewLine + "updateExistingKey: firstKey: " + Util.BBGet("ImageBB", "First_UpdateExistingKey") +
-        ", lastKey: " + Util.BBGet("ImageBB", "Last_UpdateExistingKey"));
-    attrsSB.Append(Environment.NewLine + "get: firstKey: " + Util.BBGet("ImageBB", "First_Get")+
-        ", lastKey: " + Util.BBGet("ImageBB", "Last_Get"));
-    attrsSB.Append(Environment.NewLine + "numKeyIntervals is  " + numKeyIntervals);
-    attrsSB.Append(Environment.NewLine + "numNewKeys is  " + numNewKeys);
-    attrsSB.Append(Environment.NewLine + "numDestroyed is " + numDestroyed);
-    attrsSB.Append(Environment.NewLine + "totalNumKeys is " + totalNumKeys);
-    attrsSB.Append(Environment.NewLine);
-
-    return attrsSB.ToString();
-}
-
-public void doRROps()
-{
-    FwkInfo("doRROps called.");
-    try
-    {
-      IRegion<TKey, TVal> region = GetRegion();
-      ResetKey("entryCount");
-      int entryCount = GetUIntValue("entryCount");
-      ResetKey("NumNewKeys");
-      int numNewKeys = GetUIntValue("NumNewKeys");
-      bool isdone = false;
-      Util.BBSet("RoundPositionBB", "done", false);
-      string clntid = null;
-      int roundPosition = 0;
-      bool isSerialEx = GetBoolValue("serialExecution");
-      if (isSerialEx)
-      {
-        Util.BBSet("RoundPositionBB", "roundPosition", 1);
-        roundPosition = (int)Util.BBGet("RoundPositionBB", "roundPosition");
-        clntid = String.Format("Client.{0}", roundPosition);
-      }
-      else
-      {
-        clntid = Util.ClientId;
-      }
-      int numClients = GetUIntValue("clientCount");
-      string dummyClntid = null;
-      ResetKey("numThreads");
-      int numThreads = GetUIntValue("numThreads");
-      while (true)
-      {
-        if (roundPosition > numClients)
-          break;
-        try
-        {
-            FwkInfo("clntid is = {0} Util.ClientId id is = {1} ",clntid,Util.ClientId);
-          if (clntid.Equals(Util.ClientId))
-          {
-            DoOpsTask<TKey, TVal> dooperation = new DoOpsTask<TKey, TVal>(region, m_istransaction);
-            if (isSerialEx)
-            {
-              RunTask(dooperation, numThreads, entryCount + numNewKeys + NUM_EXTRA_KEYS, -1, -1, null);
-              DoWaitForSilenceListenerComplete();
-              Util.BBSet("RegionSnapshot", "regionSnapshot", regionSnapshot);
-              Util.BBSet("DestroyedKeys", "destroyedKeys", destroyedKeys);
-              roundPosition = Util.BBIncrement("RoundPositionBB", "roundPosition");
-              Util.BBSet("RoundPositionBB", "roundPosition", roundPosition);
-              Util.BBSet("RoundPositionBB", "done", true);
-              Util.BBSet("RoundPositionBB", "VerifyCnt", 0);
-            }
-            else
-            {
-              RunTask(dooperation, numThreads, entryCount + numNewKeys + NUM_EXTRA_KEYS, -1, -1, null);
-              break;
-            }
-            FwkInfo("Done DoOpsTask operation");
-          }
-          else// if(!Util.ClientId.Equals(dummyClntid))
-          {
-            for (; ; )
-            {
-              isdone = (bool)Util.BBGet("RoundPositionBB", "done");
-              if (isdone)
-                 break;
-            }
-            if (isdone)
-            {
-              //Thread.Sleep(35000);
-              try
-              {
-                //verifyFromSnapshot();
-                DoVerifyQueryResult();
-                Util.BBSet("RoundPositionBB", "done", false);
-                Util.BBIncrement("RoundPositionBB", "VerifyCnt");
-              }
-              catch (Exception ex)
-              {
-                Util.BBSet("RoundPositionBB", "done", false);
-                Util.BBIncrement("RoundPositionBB", "VerifyCnt");
-                Util.BBSet("RoundPositionBB", "roundPosition", numClients + 1);
-                FwkException("In DoRandomEntryOperation() caught excption {0}.", ex.Message);
-              }
-            }
-            Thread.Sleep(100);
-            FwkInfo("Done Verification and verifyCount = {0}", (int)Util.BBGet("RoundPositionBB", "VerifyCnt"));
-          }
-          if (isSerialEx)
-          {
-            int verifyCnt = (int)Util.BBGet("RoundPositionBB", "VerifyCnt");
-            FwkInfo("DoRandomOperation: verifyCnt {0}, numclient {1}", verifyCnt, numClients);
-            while (verifyCnt < numClients - 1)
-            {
-              verifyCnt = (int)Util.BBGet("RoundPositionBB", "VerifyCnt");
-              Thread.Sleep(100);
-            }
-            roundPosition = (int)Util.BBGet("RoundPositionBB", "roundPosition");
-            clntid = String.Format("Client.{0}", roundPosition);
-            dummyClntid = String.Format("Client.{0}", (roundPosition - 1));
-          }
-          Thread.Sleep(3000);
-        }
-        catch (ClientTimeoutException)
-        {
-          Util.BBSet("RoundPositionBB", "done", true);
-          Util.BBSet("RoundPositionBB", "roundPosition", numClients + 1);
-          FwkException("In DoRandomEntryOperation()  Timed run timed out.");
-        }
-        catch (Exception ex)
-        {
-          Util.BBSet("RoundPositionBB", "done", true);
-          Util.BBSet("RoundPositionBB", "roundPosition", numClients + 1);
-          FwkException("In DoRandomEntryOperation() caught excption {0}.", ex.Message);
-        }
-        Thread.Sleep(3000);
-      }
-    }
-    catch (Exception ex)
-    {
-        FwkException("last DoRandomEntryOperation() Caught Exception: {0}", ex.Message);
-    }
-    FwkInfo("DoRandomEntryOperation() complete.");
-}
-
-public void doOps()
-{
-    FwkInfo("doOps called.");
-
-    ResetKey("entryCount");
-    int entryCount = GetUIntValue("entryCount");
-    ResetKey("NumNewKeys");
-    int numNewKeys = GetUIntValue("NumNewKeys");
-
-    //TestClient * clnt = TestClient::getTestClient();
-    IRegion<TKey, TVal> regionPtr = GetRegion();
-    if (regionPtr == null)
-    {
-        FwkSevere("CacheServerTest::doOps(): No region to perform operations on.");
-        //now = end; // Do not do the loop
-    }
-    ResetKey("useTransactions");
-    bool m_istransaction = GetBoolValue("useTransactions");
-    try
-    {
-        DoOpsTask<TKey, TVal> dooperation = new DoOpsTask<TKey, TVal>(regionPtr, m_istransaction);
-        ResetKey("numThreads");
-        int numThreads = GetUIntValue("numThreads");
-        RunTask(dooperation, numThreads, entryCount + numNewKeys + NUM_EXTRA_KEYS, -1, -1, null);
-    }
-    catch (ClientTimeoutException)
-    {
-        FwkException("In doOps()  Timed run timed out.");
-    }
-    catch (Exception e)
-    {
-        FwkException("Caught unexpected exception during doOps: " + e);
-    }
-    FwkInfo("Done in doOps");
-    Thread.Sleep(10000);
-}
-
-
-public void DoVerifyQueryResult()
-{
-  FwkInfo("verifyQueryResult() called");
-  string query = GetStringValue("query");
-  IRegion<TKey, TVal> region = GetRegion();
-  var resultSize = region.Count;
-  bool isSerial = GetBoolValue("serialExecution");
-  Int32 localInvalidate = 0;
-  if (isSerial)
-  { localInvalidate = (Int32)Util.BBGet("ImageBB", "Last_LocalInvalidate") - (Int32)Util.BBGet("ImageBB", "First_LocalInvalidate") + 1; }
-  FwkInfo("localInvalidate size is {0}", localInvalidate);
-  while (query != null && query.Length > 0)
-  {
-      var qs = CheckQueryService();
-      DateTime startTime;
-      TimeSpan elapsedTime;
-      ISelectResults<object> results;
-      string CqName = String.Format("_default{0}", query);
-      CqQuery<TKey, object> cq = qs.GetCq<TKey, object>(CqName);
-      try
-      {
-        if (cq.IsRunning())
-        {
-          cq.Stop();
-        }
-      }
-      catch (IllegalStateException ex)
-      {
-        FwkException("Caught {0} while stopping cq", ex.Message);
-      }
-      startTime = DateTime.Now;
-      results = cq.ExecuteWithInitialResults(QueryResponseTimeout);
-      elapsedTime = DateTime.Now - startTime;
-      if ((resultSize - localInvalidate) != (int) results.Size)
-      {
-        FwkSevere("ReadQueryString: Result size found {0}, expected {1}.",
-           results.Size, (resultSize - localInvalidate));
-      }
-      FwkInfo("ReadQueryString: Time Taken to execute the CqQuery [{0}]:" +
-        "{1}ms ResultSize Size = {2}", query, elapsedTime.TotalMilliseconds, results.Size);
-      FwkInfo("ReadQueryString: Got expected result size {0}.",
-          results.Size);
-      query = GetStringValue("query");
-    } 
- }
-
-
-/*public void doOps()
-{
-  FwkInfo( "doOps called." );
-
-  ResetKey("entryCount");
-  int entryCount = GetUIntValue( "entryCount" );
-  ResetKey("NumNewKeys");
-  int numNewKeys = GetUIntValue( "NumNewKeys" );
-
-  //TestClient * clnt = TestClient::getTestClient();
-  IRegion<TKey,TVal> regionPtr = GetRegion();
-   if (regionPtr == null) {
-    FwkSevere( "CacheServerTest::doOps(): No region to perform operations on." );
-    //now = end; // Do not do the loop
-  }
-  ResetKey("useTransactions");
-  bool m_istransaction = GetBoolValue("useTransactions");
-  try
-  {
-      DoOpsTask<TKey, TVal> dooperation = new DoOpsTask<TKey, TVal>(regionPtr, m_istransaction);
-      ResetKey("numThreads");
-      int numThreads = GetUIntValue("numThreads");
-      RunTask(dooperation, numThreads, entryCount+numNewKeys + NUM_EXTRA_KEYS, -1, -1, null);
-  }
-  catch (ClientTimeoutException)
-  {
-      FwkException("In doOps()  Timed run timed out.");
-  }
-  catch (Exception e)
-  {
-      FwkException("Caught unexpected exception during doOps: " + e);
-  }
- 
-
-  FwkInfo("Done in doOps");
-  Thread.Sleep( 10000 );
- }
-*/
-private CacheableHashSet verifyRegionSize(ExpectedRegionContents expectedRgnContents)
-{
-	IRegion<TKey,TVal> region = GetRegion();
-    int numKeys = region.GetLocalView().Count;
-	  //int expectedNumKeys = getIntValue( "expectedValue" );
-      ResetKey("entryCount");
-      ResetKey("NumNewKeys");
-	  int entryCount = GetUIntValue( "entryCount" );
-	  int numNewKeys = GetUIntValue( "NumNewKeys" );
-      FwkInfo("Expecting exact size of region " + expectedRgnContents.exactSize());
-      if (expectedRgnContents.exactSize() != numKeys)
-      {
-          FwkException("Expected " + expectedRgnContents.exactSize() + " keys, but there are " + numKeys);
-	  }
-    
-	  CacheableHashSet keysToCheck = CacheableHashSet.Create();
-	  for(int i = 0;i<entryCount+numNewKeys + NUM_EXTRA_KEYS;i++)
-		    keysToCheck.Add(m_KeysA[i]);// check all keys in the keyList (including "extra" keys not in server)
-
-	  ICollection<TKey> keyVec = region.GetLocalView().Keys;
-      foreach (TKey cKey in keyVec)
-	  	  keysToCheck.Add(cKey);// also check any keys in the region that are not in the keyList
-	  /*if (isGetInitialValues)
-	       expected = static_RI_ops_keysValues;
-	     else
-	       expected = static_RI_ops_none;
-      */
-	  return keysToCheck;
-}
-      public void DoVerifyRegionContentsBeforeOpsOnFeederClient()
-      {
-          FwkInfo("DoVerifyRegionContentsBeforeOpsOnFeederClient called.");
-          FwkInfo("DoVerifyRegionContentsBeforeOpsOnFeederClient called expected ." + expectedRgnContents[4].toString());
-          IRegion<TKey, TVal> region = GetRegion();
-          int numKeys = region.Count;
-          ResetKey("entryCount");
-          int entryCount = GetUIntValue("entryCount");
-          if (expectedRgnContents[4].exactSize() != numKeys)
-          {
-              FwkException("Expected " + expectedRgnContents[4].exactSize() + " keys, but there are " + numKeys);
-          }
-          CacheableHashSet keysToCheck = CacheableHashSet.Create();
-          for (int i = 0; i < entryCount; i++)
-              keysToCheck.Add(m_KeysA[i]);
-          foreach (TKey key in keysToCheck)
-          {
-              try
-              {
-                  verifyEntry(key, expectedRgnContents[4]);
-              }
-              catch (Exception e)
-              {
-                  FwkException("Caught unexpected exception for key " + key + " during DoVerifyRegionContentsBeforeOpsOnFeederClient " + e);
-              }
-          }
-
-      }
-
-public void DoVerifyRegionContentsBeforeOps()
-{
-  FwkInfo( "verifyRegionContentsBeforeOps called." );
-  FwkInfo("DoVerifyRegionContentsBeforeOps called expected ." + expectedRgnContents[0].toString());
-  CacheableHashSet keysToCheck = verifyRegionSize(expectedRgnContents[0]);
-  foreach (TKey key in keysToCheck)
-  {
-	  try {
-          verifyEntry(key, expectedRgnContents[0]);
-	   } catch (Exception e) {
-           FwkException("Caught unexpected exceptionfor key " + key + " during verifyRegionContentsBeforeOps " + e);
-	   }
-  }
- 
-}
-
-public void doVerifyRegionContentsAfterLateOps()
-{
-  FwkInfo( "verifyRegionContentsAfterLateOps called." );
-  FwkInfo("doVerifyRegionContentsAfterLateOps called expected ." + expectedRgnContents[1].toString());
-  CacheableHashSet keysToCheck = verifyRegionSize(expectedRgnContents[1]);
-
-  foreach (TKey key in keysToCheck)
-  {
-	  try {
-          verifyEntry(key, expectedRgnContents[1]);
-	   } catch (Exception e) {
-           FwkException("Caught unexpected exception  for key " + key + " during verifyRegionContentsAfterLateOps " + e);
-	   }
-  }
-}
-
-      public void doVerifyRegionContentsAfterOpsRI()
-      {
-          FwkInfo("doVerifyRegionContentsAfterOpsRI called.");
-          if (expectedRgnContents != null)
-              FwkInfo("doVerifyRegionContentsAfterOpsRI called expected ." + expectedRgnContents[2].toString());
-          else
-              FwkInfo("doVerifyRegionContentsAfterOpsRI called expected is null");
-          CacheableHashSet keysToCheck = verifyRegionSize(expectedRgnContents[2]);
-          foreach (TKey key in keysToCheck)
-          {
-              try
-              {
-                  verifyEntry(key, expectedRgnContents[2]);
-              }
-              catch (Exception e)
-              {
-                  FwkException("Caught unexpected exception  for key " + key + " during doVerifyRegionContentsAfterOpsRI " + e);
-              }
-          }
-      }
-      public void doVerifyRegionContentsDynamic()
-      {
-          FwkInfo("doVerifyRegionContentsDynamic called.");
-          FwkInfo("doVerifyRegionContentsDynamic called expected ." + expectedRgnContents[3].toString());
-          CacheableHashSet keysToCheck = verifyRegionSize(expectedRgnContents[3]);
-          foreach (TKey key in keysToCheck)
-          {
-              try
-              {
-                  verifyEntry(key, expectedRgnContents[3]);
-              }
-              catch (Exception e)
-              {
-                  FwkException("Caught unexpected exception  for key " + key + " during doVerifyRegionContentsDynamic " + e);
-              }
-          }
-      }
-
-      public void DoVerifyRegionContents()
-      {
-
-          ResetKey("entryCount");
-          ResetKey("NumNewKeys");
-          int numNewKeys = GetUIntValue("NumNewKeys");
-          int entryCount = GetUIntValue("entryCount");
-          Int32 numDestroyed = (Int32)Util.BBGet("ImageBB", "Last_Destroy") - (Int32)Util.BBGet("ImageBB", "First_Destroy") + 1;
-
-          totalNumKeys = entryCount + numNewKeys - numDestroyed;
-          IRegion<TKey, TVal> regionPtr = GetRegion();
- 
-          TKey[] keys = (TKey[])regionPtr.Keys;
-          //Int32 numKeys = regionPtr.Count;
-          if (totalNumKeys != keys.Length)
-          {
-              FwkException("Expected " + totalNumKeys + " keys, but there are " + keys.Length);
-          }
-          try
-          {
-              for (int ii = 0; ii < (entryCount + numNewKeys); ii++)
-              {
-                  TKey key = m_KeysA[ii];
-                  int i = ii + 1;
-                  if ((i >= (int)Util.BBGet("ImageBB", "First_None")) &&
-                            (i <= (int)Util.BBGet("ImageBB", "Last_None")) ||
-                            (i >= (int)Util.BBGet("ImageBB", "First_Get")) &&
-                             (i <= (int)Util.BBGet("ImageBB", "Last_Get")))
-                  {
-                      checkContainsKey(key, true, "key was untouched");
-                      checkContainsValueForKey(key, true, "key was untouched");
-                      TVal value = regionPtr[key];
-                      checkValue(key, value);
-
-                  }
-
-                  else if ((i >= (int)Util.BBGet("ImageBB", "First_Invalidate")) &&
-                          (i <= (int)Util.BBGet("ImageBB", "Last_Invalidate")))
-                  {
-                      checkContainsKey(key, true, "key was invalidated ");
-                      checkContainsValueForKey(key, false, "key was invalidated ");
-
-                  }
-                  else if ((i >= (int)Util.BBGet("ImageBB", "First_LocalInvalidate")) &&
-                        (i <= (int)Util.BBGet("ImageBB", "Last_LocalInvalidate")))
-                  {
-                      // this key was locally invalidated
-                      checkContainsKey(key, true, "key was locally invalidated");
-                      checkContainsValueForKey(key, true, "key was locally invalidated");
-
-                      try
-                      {
-                          TVal value = regionPtr[key];
-                          checkValue(key, value);
-                      }
-                      catch (Apache.Geode.Client.KeyNotFoundException)
-                      { }
-
-                  }
-                  else if ((i >= (int)Util.BBGet("ImageBB", "First_Destroy")) &&
-                     (i <= (int)Util.BBGet("ImageBB", "Last_Destroy")))
-                  {
-                      // this key was destroyed
-                      checkContainsKey(key, false, "key was destroyed");
-                      checkContainsValueForKey(key, false, "key was destroyed");
-
-                  }
-                  else if ((i >= (int)Util.BBGet("ImageBB", "First_LocalDestroy")) &&
-                        (i <= (int)Util.BBGet("ImageBB", "Last_LocalDestroy")))
-                  {
-                      // this key was locally destroyed
-                      checkContainsKey(key, true, "key was locally destroyed");
-                      checkContainsValueForKey(key, true, "key was locally destroyed");
-
-                      TVal value = regionPtr[key];
-                      checkValue(key, value);
-
-                  }
-                  else if ((i >= (int)Util.BBGet("ImageBB", "First_UpdateExistingKey")) &&
-                        (i <= (int)Util.BBGet("ImageBB", "Last_UpdateExistingKey")))
-                  {
-                      // this key was updated
-                      checkContainsKey(key, true, "key was updated");
-                      checkContainsValueForKey(key, true, "key was updated");
-
-                      TVal value = regionPtr[key];
-                      checkUpdatedValue(key, value);
-
-                  }
-                  else if ((i > entryCount) && (i <= (entryCount + numNewKeys)))
-                  {
-                      // key was newly added
-                      checkContainsKey(key, true, "key was new");
-                      checkContainsValueForKey(key, true, "key was new");
-
-                      TVal value = regionPtr[key];
-                      checkValue(key, value);
-
-                  }
-                  else
-                  { // key is outside of keyIntervals and new keys; it was never loaded
-                      // key was never loaded
-                      checkContainsKey(key, false, "key was never used");
-                      checkContainsValueForKey(key, false, "key was never used");
-                  }
-              }
-          }
-          catch (Exception e)
-          {
-              FwkException("Caught unexpected exception  during doVerifyRegionContents: " + e);
-          }
-      }
-      public void verifyEntry(TKey key, ExpectedRegionContents expectedRgnContents)
-      {
-        int i = 0;
-        if(typeof(TKey) == typeof(int))
-            i = (int)(object)key;
-        
-        
-        int numNewKeys = GetUIntValue( "NumNewKeys" );
-
-        int entryCount = GetUIntValue("entryCount");
-        ResetKey("entryCount");
-        ResetKey("NumNewKeys");
-        IRegion<TKey, TVal> regionPtr = GetRegion();
-        if ((i >= (int)Util.BBGet("ImageBB", "First_None")) &&
-                  (i <= (int)Util.BBGet("ImageBB", "Last_None")))
-        {
-            checkContainsKey(key, expectedRgnContents.containsKey_none(), "key was untouched");
-          checkContainsValueForKey(key, expectedRgnContents.containsValue_none(), "key was untouched");
-          if (expectedRgnContents.getAllowed_none())
-          {
-              TVal value = regionPtr[key];
-              checkValue(key, value);
-          }
-      }
-      else if ((i >= (int)Util.BBGet("ImageBB", "First_Get")) &&
-                   (i <= (int)Util.BBGet("ImageBB", "Last_Get")))
-      {
-          // this key was untouched after its creation
-          checkContainsKey(key, expectedRgnContents.containsKey_get(), "get key");
-          checkContainsValueForKey(key, expectedRgnContents.containsValue_get(), "get key");
-          if (expectedRgnContents.getAllowed_get())
-          {
-              TVal value = regionPtr[key];
-             checkValue(key, value);
-          }
-      }
-      else if ((i >= (int)Util.BBGet("ImageBB", "First_Invalidate")) &&
-    (i <= (int)Util.BBGet("ImageBB", "Last_Invalidate")))
-      {
-          checkContainsKey(key, expectedRgnContents.containsKey_invalidate(), "key was invalidated (Bug 35303)");
-          bool expectValue = expectedRgnContents.containsValue_invalidate();
-          checkContainsValueForKey(key, expectValue, "key was invalidated (Bug 35303)");
-          if (expectedRgnContents.getAllowed_invalidate())
-          {
-              try
-              {
-                  TVal value = regionPtr[key];
-                  if (expectValue)
-                  {
-                      checkValue(key, value);
-                  }
-                  else
-                  {
-                      if (value != null)
-                      {
-                          throw new Exception("Bug 35303, after calling get " + key.ToString() + ", expected invalidated value to be null but it is " + value.ToString());
-                      }
-                  }
-              }
-              catch (Apache.Geode.Client.KeyNotFoundException)
-              {}
-          }
-      }
-      else if ((i >= (int)Util.BBGet("ImageBB", "First_LocalInvalidate")) &&
-    (i <= (int)Util.BBGet("ImageBB", "Last_LocalInvalidate")))
-      {
-          // this key was locally invalidated
-          checkContainsKey(key, expectedRgnContents.containsKey_localInvalidate(), "key was locally invalidated");
-          checkContainsValueForKey(key, expectedRgnContents.containsValue_localInvalidate(), "key was locally invalidated");
-          if (expectedRgnContents.getAllowed_localInvalidate())
-          {
-              try
-              {
-                  TVal value = regionPtr[key];
-                  checkValue(key, value);
-              }
-              catch (Apache.Geode.Client.KeyNotFoundException)
-              { }
-          }
-      }
-      else if ((i >= (int)Util.BBGet("ImageBB", "First_Destroy")) &&
-    (i <= (int)Util.BBGet("ImageBB", "Last_Destroy")))
-      {
-          // this key was destroyed
-          checkContainsKey(key, expectedRgnContents.containsKey_destroy(), "key was destroyed");
-          bool expectValue = expectedRgnContents.containsValue_destroy();
-          checkContainsValueForKey(key, expectValue, "key was destroyed");
-          if (expectedRgnContents.getAllowed_destroy())
-          {
-              try
-              {
-                  TVal value = regionPtr[key];
-                  if (expectValue)
-                  {
-                      checkValue(key, value);
-                  }
-                  else
-                  {
-                      if (value != null)
-                      {
-                          throw new Exception("Expected value for " + key.ToString() + " to be null");
-                      }
-                  }
-              }
-              catch (Apache.Geode.Client.KeyNotFoundException)
-              { }
-          }
-      }
-      else if ((i >= (int)Util.BBGet("ImageBB", "First_LocalDestroy")) &&
-    (i <= (int)Util.BBGet("ImageBB", "Last_LocalDestroy")))
-      {
-          // this key was locally destroyed
-          checkContainsKey(key, expectedRgnContents.containsKey_localDestroy(), "key was locally destroyed");
-          checkContainsValueForKey(key, expectedRgnContents.containsValue_localDestroy(), "key was locally destroyed");
-          if (expectedRgnContents.getAllowed_localDestroy())
-          {
-              TVal value = regionPtr[key];
-             checkValue(key, value);
-          }
-      }
-      else if ((i >= (int)Util.BBGet("ImageBB", "First_UpdateExistingKey")) &&
-    (i <= (int)Util.BBGet("ImageBB", "Last_UpdateExistingKey")))
-      {
-          // this key was updated
-          checkContainsKey(key, expectedRgnContents.containsKey_update(), "key was updated");
-          checkContainsValueForKey(key, expectedRgnContents.containsValue_update(), "key was updated");
-          if (expectedRgnContents.getAllowed_update())
-          {
-              TVal value = regionPtr[key];
-              if (expectedRgnContents.valueIsUpdated())
-              {
-                checkUpdatedValue(key, value);
-             } else {
-                checkValue(key, value);
-             }
-          }
-       } else if ((i > entryCount) && (i <= (entryCount + numNewKeys))) {
-          // key was newly added
-           checkContainsKey(key, expectedRgnContents.containsKey_newKey(), "key was new");
-           checkContainsValueForKey(key, expectedRgnContents.containsValue_newKey(), "key was new");
-           if (expectedRgnContents.getAllowed_newKey())
-           {
-              TVal value = regionPtr[key];
-             checkValue(key, value);
-          }
-       } else { // key is outside of keyIntervals and new keys; it was never loaded
-         // key was never loaded
-         checkContainsKey(key, false, "key was never used");
-         checkContainsValueForKey(key, false, "key was never used");
-       }
-}
-
-private void checkContainsKey(TKey key, bool expected, string logStr){
-   IRegion<TKey,TVal> region = GetRegion();
-   bool containsKey = false;
-   if (region.Attributes.CachingEnabled == true)
-       containsKey = region.GetLocalView().ContainsKey(key);
-   else
-       containsKey = region.ContainsKey(key);
-   if (containsKey != expected) {
-	   FwkException("Expected containsKey(" + key.ToString() + ") to be " + expected +
-			   ", but it was " + containsKey + ": " + logStr);
-   }
-
-}
-private void checkContainsValueForKey(TKey key, bool expected,string logStr) {
-   IRegion<TKey,TVal> region = GetRegion();
-    bool containsValue = false;
-    if (region.Attributes.CachingEnabled == true)
-        containsValue = region.GetLocalView().ContainsValueForKey(key);
-    else
-        containsValue = region.ContainsValueForKey(key);
-   if (containsValue != expected){
-      FwkException("Expected containsValueForKey(" + key.ToString() + ") to be " + expected +
-                ", but it was " + containsValue + ": " + logStr);
-  }
-}
-
-private void checkValue(TKey key, TVal value)
-{
-    ResetKey("versionNum");
-    int versionnum = GetUIntValue("versionNum");
-    Type typ = value.GetType();
-    if (typ == typeof(int))
-    {
-        if (!key.Equals(value))
-            throw new Exception("Inconsistent Value for key " + key.ToString() + " Expected Value should be " + value.ToString());
-    }
-    else if (versionnum ==1 &&  (typ == PdxTests<TKey, TVal>.m_pdxVersionOneAsm.GetType("PdxVersionTests.PdxVersioned")))
-    {
-        string expectedValue = string.Format("PdxVersioned {0}",  key);
-        //typ val = (typ.)value;
-        object val = typ.GetProperty("PString").GetValue(value, null);
-        if (!expectedValue.Equals(val.ToString()))
-        {
-            throw new Exception("Inconsistent Value for key " + key.ToString() + " Expected Value should be " + expectedValue +
-                " but recevied value is " + val.ToString());
-        }
-    }
-    else if (versionnum == 2 && (typ == PdxTests<TKey, TVal>.m_pdxVersionTwoAsm.GetType("PdxVersionTests.PdxVersioned")))
-    {
-        string expectedValue = string.Format("PdxVersioned {0}", key);
-        //typ val = (typ.)value;
-        object val = typ.GetProperty("PString").GetValue(value, null);
-        if (!expectedValue.Equals(val.ToString()))
-        {
-            throw new Exception("Inconsistent Value for key " + key.ToString() + " Expected Value should be " + expectedValue +
-                " but recevied value is " + val.ToString());
-        }
-    }
-    else
-        throw new Exception("Expected Value for key " + key.ToString() + " is not the same type of " + typ);
-}
-
-private void checkUpdatedValue(TKey key, TVal value)
-{
-    ResetKey("versionNum");
-    int versionnum = GetUIntValue("versionNum");
-    Type typ = value.GetType();
-    if (typ == typeof(string))
-    {
-        string expectedStr = "updated_" + key;
-        if (!expectedStr.Equals(value))
-            throw new Exception("Inconsistent Value for key " + key.ToString() + " Expected Value should be " + expectedStr.ToString());
-    }
-    else if (versionnum == 1 && (typ == PdxTests<TKey, TVal>.m_pdxVersionOneAsm.GetType("PdxVersionTests.PdxVersioned")))
-    {
-        string expectedValue = string.Format("PdxVersioned updated_{0}", key);
-        //typ val = (typ.)value;
-        object val = typ.GetProperty("PString").GetValue(value, null);
-        if (!expectedValue.Equals(val.ToString()))
-        {
-            throw new Exception("Inconsistent Value for key " + key.ToString() + " Expected Value should be " + expectedValue +
-                " but recevied value is " + val.ToString());
-        }
-    }
-    else if (versionnum == 2 && (typ == PdxTests<TKey, TVal>.m_pdxVersionTwoAsm.GetType("PdxVersionTests.PdxVersioned")))
-    {
-        string expectedValue = string.Format("PdxVersioned updated_{0}", key);
-        //typ val = (typ.)value;
-        object val = typ.GetProperty("PString").GetValue(value, null);
-        if (!expectedValue.Equals(val.ToString()))
-        {
-            throw new Exception("Inconsistent Value for key " + key.ToString() + " Expected Value should be " + expectedValue +
-                " but recevied value is " + val.ToString());
-        }
-    }
-    else
-    {
-        throw new Exception("Expected Value for key " + key.ToString() + " is not the same type of " + typ);
-    }
-
-}
-      public void DoWaitForSilenceListenerComplete()
-      {
-          int desiredSilenceSec = 30;
-          int sleepMS = 2000;
-          FwkInfo("Waiting for a period of silence for " + desiredSilenceSec + " seconds...");
-          long desiredSilenceMS = desiredSilenceSec * 1000;
-          long silenceStartTime = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
-          long currentTime = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
-          long lastEventTime = (long)Util.BBGet("ListenerBB", "lastEventTime");
-
-          while (currentTime - silenceStartTime < desiredSilenceMS)
-          {
-              try
-              {
-                  Thread.Sleep(sleepMS);
-              }
-              catch (Exception e)
-              {
-                  FwkException("PerfTest::waitForSilence() Caught exception:" + e.Message);
-              }
-              lastEventTime = (long)Util.BBGet("ListenerBB", "lastEventTime");
-              if (lastEventTime > silenceStartTime)
-              {
-                  // restart the wait
-                  silenceStartTime = lastEventTime;
-              }
-              currentTime = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
-          }
-          long duration = currentTime - silenceStartTime;
-          FwkInfo("Done waiting, clients have been silent for " + duration + " ms");
-
-      }
-    //-------------------------------------------------doOps for rvv end-------------
-
-    public static void TestComplete()
-    {
-      OperationsMap.Clear();
-      ExceptionsMap.Clear();
-    }
-
-    #endregion
-  }
-
-  public class Multiusersecurity<TKey, TVal> : FwkTest<TKey, TVal>
-  {
-    #region Private constants and statics
-
-    private static Cache m_cache = null;
-    private const string RegionName = "regionName";
-    private const string ValueSizes = "valueSizes";
-    private const string MultipleUser = "MultiUsers";
-    private const string OpsSecond = "opsSecond";
-    private const string EntryCount = "entryCount";
-    private const string WorkTime = "workTime";
-    private const string EntryOps = "entryOps";
-    private const string isDurable = "isDurable";
-    //private const string MultiUserMode = "multiUserMode";
-    private const string KeyStoreFileProp = "security-keystorepath";
-    private const string KeyStoreAliasProp = "security-alias";
-    private const string KeyStorePasswordProp = "security-keystorepass";
-    private const CredentialGenerator.ClassCode DefaultSecurityCode =
-      CredentialGenerator.ClassCode.LDAP;
-    private static Dictionary<string, IRegion<TKey, TVal>> proxyRegionMap = new Dictionary<string, IRegion<TKey, TVal>>();
-    private static Dictionary<string, IRegionService> authCacheMap = new Dictionary<string, IRegionService>();
-    private static Dictionary<string, Dictionary<string, int>> operationMap=new Dictionary<string,Dictionary<string,int>>();
-    private static Dictionary<string, Dictionary<string, int>> exceptionMap=new Dictionary<string,Dictionary<string,int>>();
-
-    private static ArrayList userList, readerList, queryList, writerList, adminList;  
-    private static Dictionary<string, ArrayList> userToRolesMap=new Dictionary<string,ArrayList>();
-  
-     #endregion
-
-    #region Private utility methods
-
-    public virtual IRegion<TKey,TVal> DoCreateDCRegion()
-    {
-      FwkInfo("In DoCreateDCRegion() Durable");
-
-      ClearCachedKeys();
-
-      string rootRegionData = GetStringValue("regionSpec");
-      string tagName = GetStringValue("TAG");
-      string endpoints = Util.BBGet(JavaServerBB, EndPointTag + tagName)
-        as string;
-      if (rootRegionData != null && rootRegionData.Length > 0)
-      {
-        string rootRegionName;
-        rootRegionName = GetRegionName(rootRegionData);
-        if (rootRegionName != null && rootRegionName.Length > 0)
-        {
-          IRegion<TKey, TVal> region;
-          if ((region = CacheHelper<TKey, TVal>.GetRegion(rootRegionName)) == null)
-          {
-            bool isDC = GetBoolValue("isDurable");
-            string m_isPool = null;
-            // Check if this is a thin-client region; if so set the endpoints
-            int redundancyLevel = 0;
-            if (endpoints != null && endpoints.Length > 0)
-            {
-              redundancyLevel = GetUIntValue(RedundancyLevelKey);
-              if (redundancyLevel < 0)
-                redundancyLevel = 0;
-              string conflateEvents = GetStringValue(ConflateEventsKey);
-              string durableClientId = "";
-              int durableTimeout = 300;
-              if (isDC)
-              {
-                durableTimeout = GetUIntValue("durableTimeout");
-                bool isFeeder = GetBoolValue("isFeeder");
-                if (isFeeder)
-                {
-                  durableClientId = "Feeder";
-                  // VJR: Setting FeederKey because listener cannot read boolean isFeeder
-                  // FeederKey is used later on by Verify task to identify feeder's key in BB
-                  Util.BBSet("DURABLEBB", "FeederKey", "ClientName_" + Util.ClientNum + "_Count");
-                }
-                else
-                {
-                  durableClientId = String.Format("ClientName_{0}", Util.ClientNum);
-                }
-              }
-              FwkInfo("DurableClientID is {0} and DurableTimeout is {1}", durableClientId, durableTimeout);
-              CacheHelper<TKey, TVal>.InitConfigForPoolDurable(durableClientId, durableTimeout, conflateEvents, false);
-              
-
-            }
-            RegionFactory rootAttrs = CacheHelper<TKey, TVal>.DCache.CreateRegionFactory(RegionShortcut.PROXY);
-            SetRegionAttributes(rootAttrs, rootRegionData, ref m_isPool);
-            rootAttrs = CreatePool(rootAttrs, redundancyLevel);
-            FwkInfo("Entering CacheHelper.CreateRegion()");
-            region = CacheHelper<TKey, TVal>.CreateRegion(rootRegionName, rootAttrs);
-            Apache.Geode.Client.RegionAttributes<TKey, TVal> regAttr = region.Attributes;
-            FwkInfo("Region attributes for {0}: {1}", rootRegionName,
-              CacheHelper<TKey, TVal>.RegionAttributesToString(regAttr));
-            if (isDC)
-            {
-              CacheHelper<TKey, TVal>.DCache.ReadyForEvents();
-            }
-          }
-          return region;
-        }
-        
-      }
-      else
-      {
-        FwkSevere("DoCreateDCRegion() failed to create region");
-      }
-
-      FwkInfo("DoCreateDCRegion() complete.");
-      return null;
-    }
-
-    public virtual void DoCreateRegion()
-    {
-      FwkInfo("In DoCreateRegion()");
-      try
-      {
-        IRegion<TKey, TVal> region;
-        if (operationMap.Count > 0 || exceptionMap.Count > 0)
-        {
-          operationMap.Clear();
-          exceptionMap.Clear();
-        }
-        ResetKey(isDurable);
-        bool isDC = GetBoolValue(isDurable);
-        if (isDC)
-        {
-          region = DoCreateDCRegion();
-        }
-        else
-        {
-          region = CreateRootRegion();
-        }
-        FwkInfo("The region name is {0}",region.Name);
-
-        if (region != null)
-        {
-          string poolName = region.Attributes.PoolName;
-
-          if (poolName != null)
-          {
-            Pool pool = CacheHelper<TKey, TVal>.DCache.GetPoolManager().Find(poolName);
-            if (pool.MultiuserAuthentication)
-            {
-              FwkInfo("pool is in multiuser mode and entering CreateMultiUserCacheAndRegion");
-              CreateMultiUserCacheAndRegion(pool, region);
-            }
-            else
-              FwkInfo(" pool is not in multiuser mode ");
-          }
-          else
-            FwkInfo("poolName is null ");
-        }
-        else 
-          FwkInfo(" returing null region");
-        //return null;
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoCreateRegion() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoCreateRegion() complete.");
-    }
-
-    void CreateMultiUserCacheAndRegion(Pool pool,IRegion<TKey,TVal> region) 
-    {
-      FwkInfo("In CreateMultiUserCacheAndRegion()");
-      string userName;
-      CredentialGenerator gen = GetCredentialGenerator();
-      CredentialGenerator.ClassCode SecurityCode = gen.GetClassCode();
-      gen = CredentialGenerator.Create(SecurityCode, true);
-      if (gen == null)
-      {
-        FwkInfo("Skipping security scheme {0} with no generator. Using  default security scheme.{1}", SecurityCode, DefaultSecurityCode);
-        SecurityCode = DefaultSecurityCode;
-      }
-      string scheme = SecurityCode.ToString();
-      string user = GetStringValue(SecurityCode.ToString());
-      string regionName=region.Name;
-      ResetKey(MultipleUser);
-      Int32 numOfMU = GetUIntValue(MultipleUser);
-      userList = new ArrayList();
-     //populating the list with no. of multiusers.
-      for (Int32 i = 1; i <= numOfMU; i++)
-      {
-        string userStr = string.Format("{0}{1}",user,i);
-        userList.Add(userStr);
-      }
-
-      Int32 userSize=userList.Count;
-      if (SecurityCode == CredentialGenerator.ClassCode.LDAP)
-      {
-        for (Int32 i = 0; i < userSize; i++)
-        {
-          Properties<string, string> userProp = new Properties<string, string>();
-          userName = (String)userList[i];
-
-          userProp.Insert("security-username", userName);
-          userProp.Insert("security-password", userName);
-          IRegionService mu_cache = CacheHelper<TKey, TVal>.DCache.CreateAuthenticatedView(CacheHelper<TKey, TVal>.GetPkcsCredentialsForMU(userProp), pool.Name);
-          authCacheMap[userName] = mu_cache;
-          //mu_cache = pool.CreateSecureUserCache(userProp);
-          IRegion<TKey,TVal> m_region = mu_cache.GetRegion<TKey,TVal>(regionName);
-          proxyRegionMap[userName] =  m_region;
-          Dictionary<string, int> opMAP=new Dictionary<string,int>();
-          Dictionary<string, int> expMAP=new Dictionary<string,int>();
-          operationMap[userName] = opMAP;
-          exceptionMap[userName] = expMAP;
-          Utility.GetClientProperties(gen.AuthInit, null, ref userProp);
-          FwkInfo("Security properties entries: {0}", userProp);
-          switch (i)
-          {
-            case 0:
-            case 1:
-              setAdminRole(userName);
-             break;
-            case 2:
-            case 3:
-            case 4:
-              setReaderRole(userName);
-              break;
-            case 5:
-            case 6:
-            case 7:
-              setWriterRole(userName);
-              break;
-            case 8:
-            case 9:
-              setQueryRole(userName);
-              break;
-          };
-        }
-      }
-    }
-
-    public string GetKeyStoreDir(string dataDir)
-    {
-      string keystoreDir = dataDir;
-      if (keystoreDir != null && keystoreDir.Length > 0)
-      {
-        keystoreDir += "/keystore/";
-      }
-      return keystoreDir;
-    }
-
-
-    public void setAdminRole(string userName)
-    {
-      adminList = new ArrayList();
-      adminList.Add("create");
-      adminList.Add("update");
-      adminList.Add("get");
-      adminList.Add("getServerKeys");
-      adminList.Add("destroy");
-      adminList.Add("query");
-      adminList.Add("cq");
-      adminList.Add("putAll");
-      adminList.Add("executefunction");
-      userToRolesMap.Add(userName,adminList);
-    }
-
-    public void setReaderRole(string userName)
-    {
-      readerList = new ArrayList();
-      readerList.Add("get");
-      readerList.Add("getServerKeys");  
-      readerList.Add("cq");
-      userToRolesMap.Add(userName,readerList);
-    }
-
-    public void setWriterRole(string userName)
-    {
-      writerList = new ArrayList();
-      writerList.Add("create");
-      writerList.Add("update");
-      writerList.Add("destroy");
-      writerList.Add("putAll");
-      writerList.Add("executefunction");
-      userToRolesMap.Add(userName, writerList);
-    }
-
-    public void setQueryRole(string userName)
-    {
-      queryList = new ArrayList();
-      queryList.Add("query");
-      queryList.Add("cq");
-      userToRolesMap.Add(userName, queryList);
-    }
-   
-       #region Public methods
-   
-    public void DoFeedTask()
-    {
-      FwkInfo("MultiUserSecurity.DoFeed() called.");
-     
-      int entryCount = GetUIntValue(EntryCount);
-      entryCount = (entryCount < 1) ? 10000 : entryCount;
-
-      int cnt = 0;
-      string userName=(String)userList[0];
-      IRegion<TKey,TVal> region= proxyRegionMap[userName];
-      while (cnt++ < entryCount)
-      {
-        string keyStr = cnt.ToString();
-        string value = "Value";
-        TKey key = (TKey)(object)keyStr;
-        TVal val = (TVal)(object)value;
-        region[key] = val;
-      }
-      FwkInfo("MultiUserSecurity.DoFeed() completed");
-    }
-
-    public void DoCqForMU()
-    {
-      FwkInfo("MultiUserSecurity.DoCqForMU() called ");
-      CqQuery<TKey, object> cq;
-      string uName = (String)userList[1];
-      IRegion<TKey,TVal> region = proxyRegionMap[uName];
-      IRegionService authCache = authCacheMap[uName];
-      for (Int32 i = 0; i < userList.Count; i++)
-      {
-        string userName = (String)userList[i];
-        string cqName = String.Format("cq-{0}", userName);
-        var qs = authCache.GetQueryService();
-        CqAttributesFactory<TKey, object> cqFac = new CqAttributesFactory<TKey, object>();
-        ICqListener<TKey, object> cqLstner = new MyCqListener<TKey, object>();
-        cqFac.AddCqListener(cqLstner);
-        CqAttributes<TKey, object> cqAttr = cqFac.Create();
-        cq = qs.NewCq(cqName, "select * from /Portfolios where TRUE", cqAttr, true);
-        cq.Execute();
-      }
-      FwkInfo("MultiUserSecurity.DoCqForMU() completed");
-    }
-
-    public void DoCloseCacheAndReInitialize() {
-      FwkInfo("MultiUserSecurity.DoCloseCacheAndReInitialize() called");
-      try
-      {
-        //if (mu_cache != null)
-        {
-          IRegion<TKey, TVal>[] vregion = CacheHelper<TKey, TKey>.DCache.RootRegions<TKey, TVal>();
-          try
-          {
-            for (Int32 i = 0; i < vregion.Length; i++)
-            {
-              IRegion<TKey, TVal> region = (IRegion<TKey, TVal>)vregion.GetValue(i);
-              region.GetLocalView().DestroyRegion();
-            }
-          }
-          catch (RegionDestroyedException ignore)
-          {
-            string message = ignore.Message;
-            Util.Log(message);
-          }
-          catch (Exception ex)
-          {
-            FwkException("Caught unexpected exception during region local destroy {0}", ex);
-          }
-          bool keepalive = GetBoolValue("keepAlive");
-          bool isDurable = GetBoolValue("isDurable");
-          if (isDurable)
-          {
-            FwkInfo("KeepAlive is {0}", keepalive);
-            CacheHelper<TKey, TVal>.DCache.Close(keepalive);
-            //m_cache.Close(keepalive);            
-          }
-          else
-            m_cache.Close();
-          m_cache = null;
-          FwkInfo("Cache Close");
-        }
-        proxyRegionMap.Clear();
-        authCacheMap.Clear();
-        operationMap.Clear();
-        exceptionMap.Clear();
-        userToRolesMap.Clear();
-        userList.Clear();
-        CacheHelper<TKey, TVal>.Close();
-          DoCreateRegion();
-        bool isCq = GetBoolValue("cq");
-        if (isCq)
-          DoCqForMU();
-      }
-      catch (CacheClosedException ignore)
-      {
-        string message = ignore.Message;
-        Util.Log(message);
-      }
-      catch (Exception ex)
-      {
-        FwkException("Caught unexpected exception during CacheClose {0}", ex);
-      }
-    }
-
-    public void DoValidateCqOperationsForPerUser() {
-      FwkInfo("MultiUserSecurity.DoValidateCqOperationsForPerUser() called.");
-      try
-      {
-        string uName = (String)userList[0];
-        IRegion<TKey, TVal> region = proxyRegionMap[uName];
-        IRegionService authCache = authCacheMap[uName];
-        var qs = authCache.GetQueryService();
-        ICqListener<TKey, object> cqLstner = new MyCqListener<TKey, object>();
-        for (Int32 i = 0; i < userList.Count; i++)
-        {
-          string userName = (String)userList[i];
-          string cqName = String.Format("cq-{0}", userName);
-          CqQuery<TKey, object> cq = qs.GetCq<TKey, object>(cqName);
-          CqStatistics cqStats = cq.GetStatistics();
-          CqAttributes<TKey, object> cqAttr = cq.GetCqAttributes();
-          ICqListener<TKey, object>[] vl = cqAttr.getCqListeners();
-          cqLstner = vl[0];
-          MyCqListener<TKey, object> myLisner = (MyCqListener<TKey, object>)cqLstner;
-          Util.Log("My count for cq {0} Listener : NumInserts:{1}, NumDestroys:{2}, NumUpdates:{3}, NumEvents:{4}", cq.Name, myLisner.NumInserts(), myLisner.NumDestroys(), myLisner.NumUpdates(), myLisner.NumEvents());
-          Util.Log("Cq {0} from CqStatistics : NumInserts:{1}, NumDestroys:{2}, NumUpdates:{3}, NumEvents:{4} ", cq.Name, cqStats.numInserts(), cqStats.numDeletes(), cqStats.numUpdates(), cqStats.numEvents());
-          if (myLisner.NumInserts() == cqStats.numInserts() && myLisner.NumUpdates() == cqStats.numUpdates() && myLisner.NumDestroys() == cqStats.numDeletes() && myLisner.NumEvents() == cqStats.numEvents())
-            Util.Log("Accumulative event count is correct");
-          else
-            Util.Log("Accumulative event count is incorrect");
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("Query.DoVerifyCQListenerInvoked() Caught Exception : {0}", ex);
-      }
-    }
-
-    public void DoEntryOperationsForMU()
-    {
-      FwkInfo("MultiUserSecurity.DoEntryOperationsForMU() called.");
-      Util.RegisterTestCompleteDelegate(TestComplete);
-      // string bb = "GFE_BB" ;
-     // string ky="scheme" ;
-    //  string securitySch=(String)Util.BBGet(bb,ky);
-      
-      int opsSec = GetUIntValue(OpsSecond);
-      opsSec = (opsSec < 1) ? 0 : opsSec;
-
-      int entryCount = GetUIntValue(EntryCount);
-      entryCount = (entryCount < 1) ? 10000 : entryCount;
-
-      int secondsToRun = GetTimeValue(WorkTime);
-      secondsToRun = (secondsToRun < 1) ? 30 : secondsToRun;
-
-      DateTime now = DateTime.Now;
-      DateTime end = now.AddSeconds(secondsToRun);
-
-      TKey key;
-      TVal value;
-      //ISerializable val;
-
-      CqQuery<TKey, object> cq = null;
-      string opCode = null;
-
-      PaceMeter pm = new PaceMeter(opsSec);
-      while (now < end)
-      {
-        int addOps = 1;
-        Random rdm = new Random();
-        int userSize = userList.Count;
-        string userName = (String)userList[(rdm.Next(userSize))];
-        FwkInfo("The userName is {0}",userName);
-        IRegion<TKey,TVal> region = proxyRegionMap[userName];
-        IRegionService authCache = authCacheMap[userName];
-        opCode = GetStringValue(EntryOps);
-        try
-        {
-          UpdateOperationMap(opCode,userName,1);
-          if (opCode == null || opCode.Length == 0)
-          {
-            opCode = "no-op";
-          }
-
-          if (opCode == "create")
-          {
-            key = (TKey)(object)(rdm.Next(entryCount).ToString());
-            string tempval = "Value";
-            value = (TVal)(object)tempval;
-            region.Add(key, value);
-          }
-          else
-          {
-            key = (TKey)(object)(rdm.Next(entryCount).ToString());
-            if (opCode == "update")
-            {
-              value = (TVal)(object)"Value_";
-              region[key] = value;
-            }
-            else if (opCode == "destroy")
-            {
-              region.Remove(key);
-            }  
-           
-            else if (opCode == "get")
-            {
-                try
-                {
-                   value = region[key];
-                }
-                catch (EntryNotFoundException ex)
-                {
-                    FwkInfo("MultiUser.DoEntryOperationsForMU() Caught non-fatal " +
-                      "ex-ception in read: {0}", ex.Message);
-                }
-                catch (Apache.Geode.Client.KeyNotFoundException ex)
-                {
-                    FwkInfo("MultiUser.DoEntryOperationsForMU() Caught non-fatal " +
-                      "ex-ception in read: {0}", ex.Message);
-                }
-            }
-
-            else if (opCode == "getServerKeys")
-            {
-              ICollection<TKey> serverKeys = region.Keys;
-            }
-             
-            else if (opCode == "query")
-            {
-              var qs = authCache.GetQueryService();
-              Query<object> qry = qs.NewQuery<object>("select distinct * from /Portfolios where FALSE");
-              ISelectResults<object> result = qry.Execute(TimeSpan.FromSeconds(600));
-            }
-            else if (opCode == "cq")
-            {
-              string cqName = String.Format("cq-{0}",userName);
-              var qs = authCache.GetQueryService();
-              CqAttributesFactory<TKey, object> cqFac = new CqAttributesFactory<TKey, object>();
-              ICqListener<TKey, object> cqLstner = new MyCqListener<TKey, object>();
-              cqFac.AddCqListener(cqLstner);
-              CqAttributes<TKey, object> cqAttr = cqFac.Create();
-              cq = qs.NewCq(cqName, "select * from /Portfolios where FALSE", cqAttr, false);
-              cq.Execute();
-              cq.Stop();
-              cq.Execute();
-              cq.Close();
-            }
-            else if (opCode == "executefunction")
-            {
-              string funcName = null;
-              Random rdn = new Random();
-              int num = rdn.Next(3);
-              Apache.Geode.Client.Execution<object> exc = null;
-              ICollection<object> executeFunctionResult = null;
-              ArrayList args = new ArrayList();
-              Object[] filterObj = new Object[1];
-              filterObj[0] = rdm.Next(entryCount).ToString();
-              //args.Add(filterObj[0]);
-              Util.Log("Inside FE num = {0}",num);
-              if (num == 0)
-              {
-                args.Add(filterObj[0]);
-                args.Add("addKey"); 
-                funcName = "RegionOperationsFunction";
-                exc = Client.FunctionService<object>.OnRegion(region);
-                executeFunctionResult = exc.WithArgs(args).WithFilter(filterObj).Execute(funcName, TimeSpan.FromSeconds(15)).GetResult();
-              }
-              else if (num == 1)
-              {
-                args.Add(filterObj[0]);
-                funcName = "ServerOperationsFunction";
-                //exc = region.Cache.GetFunctionService().OnServer();
-                exc = Client.FunctionService<object>.OnServer(authCache);
-                executeFunctionResult = exc.WithArgs(args).Execute(funcName, TimeSpan.FromSeconds(15)).GetResult();
-              }
-              else
-              {
-                try
-                {
-                  args.Add(filterObj[0]);
-                  funcName = "ServerOperationsFunction";
-                  //exc = region.Cache.GetFunctionService().OnServers();
-                  exc = Client.FunctionService<object>.OnServers(authCache);
-                  executeFunctionResult = exc.WithArgs(args).Execute(funcName, TimeSpan.FromSeconds(15)).GetResult();
-                }
-                catch (FunctionExecutionException)
-                {
-                  //expected exception
-                  Util.Log("Inside FunctionExecutionException");
-                }
-              }
-            }
-            else if (opCode == "putAll")
-            {
-              IDictionary<TKey, TVal> map = new Dictionary<TKey, TVal>();
-              for (int count = 0; count < 200; count++)
-              {
-                key = (TKey)(object)count.ToString();
-                value = (TVal)(object)"Value_";
-                map.Add(key, value);
-              }
-              region.PutAll(map);
-            }
-            else
-            {
-              FwkException("CacheServer.DoEntryOperationsForSecurity() " +
-                "Invalid operation specified: {0}", opCode);
-            }
-          }
-        }
-        catch (NotAuthorizedException ex)
-        {
-         
-          FwkInfo("Got expected NotAuthorizedException for operation {0}: {1}",
-            opCode, ex.Message);
-          if (opCode == "cq")
-          {
-            if (cq.IsStopped())
-              cq.Close();
-          }
-          UpdateExceptionMap(opCode,userName,1);
-        }
-        catch (EntryExistsException)
-        {
-          addOps = -1;
-          
-       UpdateOperationMap(opCode,userName,addOps);
-        }
-        catch (EntryNotFoundException)
-        {
-          addOps = -1;
-        UpdateExceptionMap(opCode,userName,addOps);
-        }
-        catch (EntryDestroyedException)
-        {
-          addOps = -1;
-          UpdateExceptionMap(opCode, userName, addOps);
-        }
-        catch (CqExistsException)
-        {
-          Util.Log("Inside CqExistsException ");
-        }
-        catch (TimeoutException ex)
-        {
-          FwkSevere("Caught unexpected timeout exception during entry {0} " +
-            " operation: {1}; continuing with test.", opCode, ex.Message);
-        }
-        catch (Exception ex)
-        {
-          FwkException("MultiUserSecurity.DoEntryOperationsForSecurity() Caught " +
-            "unexpected exception during entry '{0}' operation: {1}.",
-            opCode, ex);
-        }
-        pm.CheckPace();
-        now = DateTime.Now;
-      }
-      key = default(TKey);
-      value = default(TVal);
-      FwkInfo("MultiUserSecurity.DoEntryOperationsForSecurity() complete");
-    }
-
-    public void UpdateOperationMap(string opcode, string userName,int numOps)
-    {
-      FwkInfo("Inside updateOperationMap");
-      lock (((IDictionary)operationMap).SyncRoot)
-      {
-        Dictionary<string, int> opMap = operationMap[userName];
-        int currentOps;
-        if (!opMap.TryGetValue(opcode, out currentOps))
-        {
-          currentOps = 0;
-        }
-        opMap[opcode] = currentOps + numOps;
-        operationMap[userName] = opMap;
-      }
-    }
-
-    public void UpdateExceptionMap(string opcode, string userName, int numOps)
-    {
-      lock (((IDictionary)operationMap).SyncRoot)
-
-      {
-        Dictionary<string, int> expMap = exceptionMap[userName];
-        int currentOps;
-        if (!expMap.TryGetValue(opcode, out currentOps))
-        {
-          currentOps = 0;
-        }
-        expMap[opcode] = currentOps + numOps;
-        exceptionMap[userName]=expMap;
-      }
-    }
-    public int GetOpsFromMap(Dictionary<string, int> map, string opCode)
-    {
-      int numOps;
-      lock (((ICollection)map).SyncRoot)
-      {
-        if (!map.TryGetValue(opCode, out numOps))
-        {
-          numOps = 0;
-        }
-      }
-      return numOps;
-    }
-
-    public void DoValidateEntryOperationsForPerUser()
-    {
-      FwkInfo("Multiusersecurity.DoValidateEntryOperationsForPerUser() started");
-      bool opFound = false;
-      for (int i = 0; i < userList.Count; i++)
-      {
-        Dictionary<string, int> validateOpMap;
-        Dictionary<string, int> validateExpMap;
-        string userName = (String)userList[i];
-        validateOpMap = operationMap[userName];
-        validateExpMap = exceptionMap[userName];
-        foreach (string opcode in validateOpMap.Keys) 
-        {
-          FwkInfo("opcode is {0} for user {1}", opcode,userName);
-          int totalOpCnt = GetOpsFromMap(validateOpMap,opcode);
-          int totalNotAuthCnt = GetOpsFromMap(validateExpMap, opcode);
-          ArrayList roleList = new ArrayList();
-          roleList = userToRolesMap[userName];
-          for (int j = 0; j < roleList.Count; j++)
-          {
-            if ((String)roleList[j] == opcode)
-            {
-              opFound = true;
-              break;
-            }
-            else
-              opFound = false;
-          }
-          if (opFound)
-          {
-            if ((totalOpCnt != 0) && (totalNotAuthCnt == 0))
-            {
-              FwkInfo("Task passed sucessfully with total operation = {0} for user {1}", totalOpCnt, userName);
-            }
-            else
-            {
-              FwkException("Task failed for user {0} NotAuthorizedException found for operation = {1} while expected was 0", userName, totalNotAuthCnt);
-            }
-          }
-          else
-          {
-            if (totalOpCnt == totalNotAuthCnt)
-            {
-              FwkInfo("Task passed sucessfully and got the expected number of notAuth exception = {0} with total number of operation = {1}", totalOpCnt, totalNotAuthCnt);
-            }
-            else
-            {
-              FwkException("Task failed ,Expected NotAuthorizedException cnt to be = {0} but found = {1}",totalOpCnt,totalNotAuthCnt);
-            }
-          }
-        }
-      }
-    }
-
-    public void DoCloseCache()
-    {
-      FwkInfo("DoCloseCache()  Closing cache and disconnecting from" +
-        " distributed system.");
-      userToRolesMap.Clear();
-      proxyRegionMap.Clear();
-      authCacheMap.Clear();
-      CacheHelper<TKey,TVal>.Close();
-    }
-    public static void TestComplete()
-    {
-      operationMap.Clear();
-      exceptionMap.Clear();
-    }
-
-    #endregion
- 
-  }
-   #endregion
- 
-}
-
diff --git a/tests/cli/NewFwkLib/DeltaTest/DeltaClientValidationListener.cs b/tests/cli/NewFwkLib/DeltaTest/DeltaClientValidationListener.cs
deleted file mode 100644
index 87b591c..0000000
--- a/tests/cli/NewFwkLib/DeltaTest/DeltaClientValidationListener.cs
+++ /dev/null
@@ -1,190 +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.
- */
-
-using System;
-using System.Threading;
-using System.Collections.Generic;
-
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.DUnitFramework;
-  using Apache.Geode.Client.Tests;
-  using Apache.Geode.Client;
-  public class DeltaClientValidationListener<TKey, TVal> : CacheListenerAdapter<TKey, TVal>
-  {
-    private IDictionary<TKey, Int32> m_latestValues;
-    private IDictionary<TKey, Int64> m_ValidateMap;
-    private long m_numAfterCreate;
-    private long m_numAfterUpdate;
-    private long m_numAfterInvalidate;
-    private long m_numAfterDestroy;
-    
-    public DeltaClientValidationListener()
-    {
-      m_numAfterCreate = 0;
-      m_numAfterUpdate = 0;
-      m_numAfterInvalidate = 0;
-      m_numAfterDestroy = 0;
-      m_latestValues = new Dictionary<TKey, Int32>();
-      m_ValidateMap = new Dictionary<TKey, Int64>();
-    }
-
-    public static ICacheListener<TKey, TVal> Create()
-    {
-      return new DeltaClientValidationListener<TKey, TVal>();
-    }
-    ~DeltaClientValidationListener() { }
-
-    #region ICacheListener Members
-
-    public override void AfterCreate(EntryEvent<TKey, TVal> ev)
-    {
-      m_numAfterCreate++;
-      TKey key = (TKey)ev.Key;
-      DeltaTestImpl value = ev.NewValue as DeltaTestImpl;
-      if (value == null)
-      {
-        FwkTest<TKey, TVal>.CurrentTest.FwkException(" Value in afterCreate cannot be null : key = {0} ", key.ToString());
-        return;
-      }
-      if( value.GetIntVar() != 0 && value.GetFromDeltaCounter() != 0)
-      {
-         ValidateIncreamentByOne(key,value);
-      }
-      Int32 mapValue = value.GetIntVar();
-      Int64 deltaValue = value.GetFromDeltaCounter();
-      m_latestValues[key] = mapValue;
-      m_ValidateMap[key] = deltaValue;
-    }
-
-    public override void AfterUpdate(EntryEvent<TKey, TVal> ev)
-    {
-      m_numAfterUpdate++;
-      TKey key = ev.Key;
-      DeltaTestImpl oldValue = ev.OldValue as DeltaTestImpl;
-      DeltaTestImpl newValue = ev.NewValue as DeltaTestImpl;
-      if (newValue == null)
-      {
-        FwkTest<TKey, TVal>.CurrentTest.FwkException(" newValue in afterUpdate cannot be null : key = {0} ", key.ToString());
-        return;
-      }
-       if (oldValue == null)
-        {
-          ValidateIncreamentByOne(key, newValue);
-        }
-        else
-        {
-          Int32 mapValue1;
-          m_latestValues.TryGetValue(key, out mapValue1);
-          Int32 mapValue2 = mapValue1;
-          // CacheableInt32 mapValue2 = m_latestValues[key] as CacheableInt32;
-          Int32 diff = newValue.GetIntVar() - mapValue2;
-          if (diff != 1)
-          {
-            FwkTest<TKey, TVal>.CurrentTest.FwkException("difference expected in newValue and oldValue is 1 , but it was not" +
-              " for key {0} & newVal = {1} oldValue = {2} map count = {3} : {4}", key.ToString(), newValue.GetIntVar(), mapValue2, m_latestValues.Count, m_latestValues.ToString());
-            return;
-          }
-        }
-        Int32 mapValue = newValue.GetIntVar();
-        Int64 deltaValue = newValue.GetFromDeltaCounter();
-        m_latestValues[key] = mapValue;
-        m_ValidateMap[key] = deltaValue;
-    }
-
-    public override void AfterRegionLive(RegionEvent<TKey, TVal> ev) 
-    {
-    }
-
-    public override void AfterDestroy(EntryEvent<TKey, TVal> ev)
-    {
-      m_numAfterDestroy++;
-      TKey key = ev.Key;
-      DeltaTestImpl oldValue=ev.OldValue as DeltaTestImpl;
-      if (oldValue != null)
-      {
-        Int32 mapValue = oldValue.GetIntVar();
-        m_latestValues.Remove(key);
-        //m_ValidateMap.Remove(key);
-      }
-    }
-
-    public override void AfterInvalidate(EntryEvent<TKey, TVal> ev)
-    {
-      m_numAfterInvalidate++;
-      TKey key = ev.Key;
-      DeltaTestImpl oldValue = ev.OldValue as DeltaTestImpl;
-      if(oldValue==null)
-      {
-        FwkTest<TKey, TVal>.CurrentTest.FwkException("oldValue cannot be null key = {0}", key.ToString());
-        return;
-      }
-      Int32 mapValue = oldValue.GetIntVar();
-      m_latestValues[key] = 0;
-      
-    }
-
-    public override void AfterRegionDestroy(RegionEvent<TKey, TVal> ev)
-    {
-      dumbToBB(ev.Region);
-    }
-
-    public override void AfterRegionInvalidate(RegionEvent<TKey, TVal> ev)
-    {
-    }
-
-    public override void Close(Apache.Geode.Client.IRegion<TKey, TVal> region)
-    {
-    }
-
-    public override void AfterRegionDisconnected(Apache.Geode.Client.IRegion<TKey, TVal> region)
-    {
-    }
-    public override void AfterRegionClear(RegionEvent<TKey, TVal> ev)
-    {
-      // Do nothing.
-    }
-
-    public IDictionary<TKey, Int64> getMap() 
-    {
-      return m_ValidateMap;
-    }
-    private void dumbToBB(IRegion<TKey, TVal> region)
-    {
-      Util.BBSet("DeltaBB", "AFTER_CREATE_COUNT_" + Util.ClientId + "_" + region.Name, m_numAfterCreate);
-      Util.BBSet("DeltaBB", "AFTER_UPDATE_COUNT_" + Util.ClientId + "_" + region.Name, m_numAfterUpdate);
-      Util.BBSet("DeltaBB", "AFTER_INVALIDATE_COUNT_" + Util.ClientId + "_" + region.Name, m_numAfterInvalidate);
-      Util.BBSet("DeltaBB", "AFTER_DESTROY_COUNT_" + Util.ClientId + "_" + region.Name, m_numAfterDestroy);
-    }
-
-    public void ValidateIncreamentByOne(TKey key, DeltaTestImpl newValue)
-    {
-      Int32 oldValue =  m_latestValues[key];
-      if (oldValue == 0)
-      {
-        FwkTest<TKey, TVal>.CurrentTest.FwkException("oldValue in latestValues cannot be null: key = {0} & newVal = {1} ", key, newValue.ToString());
-      }
-      Int32 diff = newValue.GetIntVar() - oldValue;
-      if (diff != 1)
-      {
-        FwkTest<TKey, TVal>.CurrentTest.FwkException("defference expected in newValue and oldValue is 1 , but it was {0}" +
-          " for key {1} & newVal = {2}", diff, key, newValue.ToString());
-      }
-    } 
-    #endregion
-  }
-}
diff --git a/tests/cli/NewFwkLib/DeltaTest/DeltaTest.cs b/tests/cli/NewFwkLib/DeltaTest/DeltaTest.cs
deleted file mode 100644
index e3fc098..0000000
--- a/tests/cli/NewFwkLib/DeltaTest/DeltaTest.cs
+++ /dev/null
@@ -1,749 +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.
- */
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using System.Threading;
-using System.Xml.Serialization;
-using Apache.Geode.Client.Tests;
-
-
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.DUnitFramework;
-  using Apache.Geode.Client.Tests;
-  using Apache.Geode.Client;
-  public class PutTask<TKey, TVal> : ClientTask
-  {
-    #region Private members
-
-    private IRegion<TKey, TVal> m_region;
-    private int m_MaxKeys;
-    private List<IDictionary<TKey, TVal>> m_maps;
-    private Int32 m_update;
-    private Int32 m_cnt;
-    private bool m_isCreate;
-    
-    #endregion
-
-    public PutTask(IRegion<TKey, TVal> region, int keyCnt, List<IDictionary<TKey, TVal>> maps, bool isCreate)
-      : base()
-    {
-      m_region = region;
-      m_MaxKeys = keyCnt;
-      m_maps = maps;
-      m_update = 0;
-      m_cnt = 0;
-      m_isCreate = isCreate;
-    }
-
-    public override void DoTask(int iters, object data)
-    {
-      FwkTest<TKey, TVal>.CurrentTest.FwkInfo("PutTask::DoTask:");
-      Int32 localcnt = m_cnt;
-      Interlocked.Increment(ref m_cnt);
-      int offset = Util.Rand(m_MaxKeys);
-      int count = offset;
-      while (Running && (iters-- != 0))
-      {
-        int idx = count % m_MaxKeys;
-        TKey key = default(TKey);
-        try
-        {
-          key = (TKey)(object)("AAAAAA" + localcnt + idx.ToString("D10"));
-          DeltaTestImpl oldVal = (m_maps[localcnt])[key] as DeltaTestImpl;
-          if (oldVal == null)
-          {
-            Util.Log(Util.LogLevel.Error, "oldDelta Cannot be null");
-          }
-          DeltaTestImpl obj = new DeltaTestImpl(oldVal);
-          obj.SetIntVar(oldVal.GetIntVar() + 1);
-          m_region[key] = (TVal)(object)obj;
-          Interlocked.Increment(ref m_update);
-          Util.BBSet("ToDeltaBB", key.ToString(), oldVal.GetToDeltaCounter());
-          bool removeKey = (m_maps[localcnt]).Remove(key);
-          if (removeKey)
-          {
-            (m_maps[localcnt]).Add(key, (TVal)(object)obj);
-          }
-        }
-        catch (Exception ex)
-        {
-          Util.Log(Util.LogLevel.Error,
-            "Exception while putting key[{0}] for region {1} in iteration " +
-            "{2}: {3}", key, m_region.Name, (count - offset), ex);
-          throw;
-        }
-        count++;
-        //if ((count % 1000) == 0)
-        //{
-        //  Util.Log("PutsTask::DoTask: Intermediate: Ran for 1000 iterations.");
-        //}
-      }
-      //Util.Log("PutsTask::DoTask: Ran for {0} iterations.", count);
-      Interlocked.Add(ref m_iters, count - offset);
-    }
-    public void dumpToBB()
-    {
-      Int32 localcnt = m_cnt;
-      Int32 size = m_maps.Count;
-      Int32 count = 0;
-      Int32 i = 0;
-      while (i < size)
-      {
-        count += m_maps[i].Count;
-        foreach (KeyValuePair<TKey, TVal> item in m_maps[i])
-        {
-          TKey key = (TKey)(object)item.Key;
-          DeltaTestImpl value = item.Value as DeltaTestImpl; ;
-          Util.BBSet("ToDeltaBB", key.ToString(), value.GetToDeltaCounter());
-        }
-        i++;
-      }
-      Util.BBSet("MapCount", "size", count);
-      Util.BBSet("DeltaBB", "UPDATECOUNT", m_update);
-    }
-  }
-
-  public class CreateTask<TKey, TVal> : ClientTask
-  {
-    #region Private members
-
-    private IRegion<TKey, TVal> m_region;
-    private int m_MaxKeys;
-    private List<IDictionary<TKey, TVal>> m_maps;
-    private Int32 m_create;
-    private Int32 m_cnt;
-
-
-    #endregion
-
-    public CreateTask(IRegion<TKey, TVal> region, int keyCnt, List<IDictionary<TKey, TVal>> maps)
-      : base()
-    {
-      m_region = region;
-      m_MaxKeys = keyCnt;
-      m_maps = maps;
-      m_create = 0;
-      m_cnt = 0;
-    }
-
-    public override void DoTask(int iters, object data)
-    {
-      Int32 localcnt = m_cnt;
-      Interlocked.Increment(ref m_cnt);
-      IDictionary<TKey, TVal> hmoc = new Dictionary<TKey, TVal>();
-      lock (m_maps)
-      {
-        m_maps.Add(hmoc);
-      }
-      int offset = Util.Rand(m_MaxKeys);
-      int count = offset;
-      Util.Log("CreateTask::DoTask: starting {0} iterations.", iters);
-      while (Running && (iters-- != 0))
-      {
-        int idx = count % m_MaxKeys;
-        TKey key = default(TKey);
-        try
-        {
-          key = (TKey)(object)("AAAAAA" + localcnt + idx.ToString("D10"));
-          TVal obj = (TVal)(object)(new DeltaTestImpl(0, "delta"));
-          m_region.Add(key, obj);
-          Interlocked.Increment(ref m_create);
-          (m_maps[localcnt]).Add(key, obj);
-        }
-        catch (Exception ex)
-        {
-          Util.Log(Util.LogLevel.Error,
-            "Exception while creating key[{0}] for region {1} in iteration " +
-            "{2}: {3}", key, m_region.Name, (count - offset), ex);
-          throw;
-        }
-        count++;
-      }
-      Interlocked.Add(ref m_iters, count - offset);
-    }
-    public void dumpToBB()
-    {
-      Util.BBSet("DeltaBB", "CREATECOUNT", m_create);
-      Util.BBSet("DeltaBB", "DESTROYCOUNT", 0);
-    }
-  }
-
-  public class EntryTask<TKey, TVal> : ClientTask
-  {
-    #region Private members
-
-    private IRegion<TKey, TVal> m_region;
-    private int m_MaxKeys;
-    private List<IDictionary<TKey, TVal>> m_maps;
-    private Int32 m_create;
-    private Int32 m_update;
-    private Int32 m_destroy;
-    private Int32 m_invalidate;
-    private Int32 m_cnt;
-    bool m_isDestroy;
-    private object CLASS_LOCK = new object();
-    
-    #endregion
-
-    public EntryTask(IRegion<TKey, TVal> region, int keyCnt, List<IDictionary<TKey, TVal>> maps)
-      : base()
-    {
-      m_region = region;
-      m_MaxKeys = keyCnt;
-      m_maps = maps;
-      m_create = 0;
-      m_update = 0;
-      m_destroy = 0;
-      m_invalidate = 0;
-      m_cnt = 0;
-      m_isDestroy = true;
-    }
-
-    DeltaTestImpl getLatestDelta(TKey key, Int32 localcnt, bool isCreate)
-    {
-      DeltaTestImpl oldValue = (m_maps[localcnt])[key] as DeltaTestImpl;
-      if (oldValue == null)
-      {
-        FwkTest<TKey, TVal>.CurrentTest.FwkInfo("oldDelta cannot be null");
-      }
-      DeltaTestImpl obj = new DeltaTestImpl(oldValue.GetIntVar() + 1, "delta");
-      if (!isCreate)
-      {
-        obj.SetIntVar(oldValue.GetIntVar() + 1);
-      }
-      return obj;
-    }
-
-    public override void DoTask(int iters, object data)
-    {
-      Int32 localcnt = m_cnt;
-      Interlocked.Increment(ref m_cnt);
-      IDictionary<TKey, TVal> hmoc = new Dictionary<TKey, TVal>();
-      lock (m_maps)
-      {
-        m_maps.Add(hmoc);
-      }
-      int offset = Util.Rand(m_MaxKeys);
-      int count = offset;
-      TKey key = default(TKey);
-      Util.Log("EntryTask::DoTask: starting {0} iterations.", iters);
-      while (Running && (iters-- != 0))
-      {
-        int idx = count % m_MaxKeys;
-        key = (TKey)(object)("AAAAAA" + localcnt + idx.ToString("D10"));
-        string opcode = FwkTest<TKey, TVal>.CurrentTest.GetStringValue("entryOps");
-        if (opcode == null) opcode = "no-opcode";
-        if (opcode == "put")
-        {
-          lock (CLASS_LOCK)
-          {
-            DeltaTestImpl newValue = null;
-            if (m_region.ContainsKey(key))
-            {
-              DeltaTestImpl oldValue = m_region[key] as DeltaTestImpl;
-              if (oldValue == null)
-              {
-                newValue = getLatestDelta(key, localcnt, false);
-                m_region[key] = (TVal)(object)newValue;
-              }
-              else
-              {
-                newValue = new DeltaTestImpl(oldValue);
-                newValue.SetIntVar(oldValue.GetIntVar() + 1);
-                m_region[key] = (TVal)(object)newValue;
-              }
-              Interlocked.Increment(ref m_update);
-              //Util.BBSet("ToDeltaBB", key.ToString(), newValue.GetToDeltaCounter());
-            }
-            else
-            {
-              newValue = getLatestDelta(key, localcnt, true);
-              m_region.Add(key, (TVal)(object)newValue);
-              Interlocked.Increment(ref m_create);
-            }
-            //(m_maps[localcnt]).Add(key, newValue);
-            m_maps[localcnt][key] = (TVal)(object)newValue;
-          }
-        }
-        else if (opcode == "destroy")
-        {
-          DeltaTestImpl oldValue = null;
-          if (m_region.ContainsKey(key))
-          {
-            if ((oldValue = m_region[key] as DeltaTestImpl) == null)
-            {
-              if (m_isDestroy)
-              {
-                 m_region.Remove(key);
-                (m_maps[localcnt]).Remove(key);
-              }
-            }
-            else
-            {
-              m_maps[localcnt][key] = (TVal)(object)oldValue;
-              m_region.Remove(key);
-              //(m_maps[localcnt]).Remove(key);
-            }
-            Interlocked.Increment(ref m_destroy);
-           } 
-        }
-        else if (opcode == "invalidate")
-        {
-          DeltaTestImpl oldValue = null;
-          if (m_region.ContainsKey(key))
-          {
-            if ((oldValue = m_region[key] as DeltaTestImpl) != null)
-            {
-              m_maps[localcnt].Add(key, (TVal)(object)oldValue);
-              m_region.Invalidate(key);
-              Interlocked.Increment(ref m_invalidate);
-              m_maps[localcnt].Add(key, default(TVal));
-            }
-          }
-        }
-      }
-      Interlocked.Add(ref m_iters, count - offset);
-    }
-
-    public void dumpToBB()
-    {
-      Int32 localcnt = m_cnt;
-      Int32 size = m_maps.Count;
-      Int32 count = 0;
-      Int32 i = 0;
-      while(i < size)
-      {
-        count += m_maps[i].Count;
-        foreach (KeyValuePair<TKey, TVal> item in m_maps[i])
-        {
-          TKey key = (TKey)(object)item.Key;
-          DeltaTestImpl value = item.Value as DeltaTestImpl;
-          Util.BBSet("ToDeltaBB", key.ToString(), value.GetToDeltaCounter());
-         }
-         i++;
-      }
-      Util.BBSet("MapCount", "size", count);
-      Int32 createCnt = (Int32)Util.BBGet("DeltaBB", "CREATECOUNT");
-      Util.BBSet("DeltaBB", "CREATECOUNT", createCnt + m_create);
-      Util.BBSet("DeltaBB", "UPDATECOUNT", m_update);
-      Util.BBSet("DeltaBB", "DESTROYCOUNT", m_destroy);
-    }
-
-  }
-
-  public class DeltaTest<TKey, TVal> : FwkTest<TKey, TVal>
-  {
-    protected TKey[] m_keysA;
-    protected int m_maxKeys;
-    protected int m_keyIndexBegin;
-
-    protected TVal[] m_cValues;
-    protected int m_maxValues;
-
-    protected const string ClientCount = "clientCount";
-    protected const string TimedInterval = "timedInterval";
-    protected const string DistinctKeys = "distinctKeys";
-    protected const string NumThreads = "numThreads";
-    protected const string ValueSizes = "valueSizes";
-    protected const string OpsSecond = "opsSecond";
-    protected const string KeyType = "keyType";
-    protected const string KeySize = "keySize";
-    protected const string KeyIndexBegin = "keyIndexBegin";
-    protected const string RegisterKeys = "registerKeys";
-    protected const string RegisterRegex = "registerRegex";
-    protected const string UnregisterRegex = "unregisterRegex";
-    protected const string ExpectedCount = "expectedCount";
-    protected const string InterestPercent = "interestPercent";
-    protected const string KeyStart = "keyStart";
-    protected const string KeyEnd = "keyEnd";
-    protected char m_keyType = 'i';
-    protected static List<IDictionary<TKey, TVal>> mapList = new List<IDictionary<TKey, TVal>>();
-    private static bool isObjectRegistered = false;
-
-
-    protected void ClearKeys()
-    {
-      if (m_keysA != null)
-      {
-        for (int i = 0; i < m_keysA.Length; i++)
-        {
-          if (m_keysA[i] != null)
-          {
-            //m_keysA[i].Dispose();
-            m_keysA[i] = default(TKey);
-          }
-        }
-        m_keysA = null;
-        m_maxKeys = 0;
-      }
-    }
-
-    protected int InitKeys(bool useDefault)
-    {
-      string typ = GetStringValue(KeyType); // int is only value to use
-      char newType = (typ == null || typ.Length == 0) ? 's' : typ[0];
-
-      int low = GetUIntValue(KeyIndexBegin);
-      low = (low > 0) ? low : 0;
-      int numKeys = GetUIntValue(DistinctKeys);  // check distinct keys first
-      if (numKeys <= 0)
-      {
-        if (useDefault)
-        {
-          numKeys = 5000;
-        }
-        else
-        {
-          //FwkSevere("Failed to initialize keys with numKeys: {0}", numKeys);
-          return numKeys;
-        }
-      }
-      int high = numKeys + low;
-      FwkInfo("InitKeys:: numKeys: {0}; low: {1}", numKeys, low);
-      if ((newType == m_keyType) && (numKeys == m_maxKeys) &&
-        (m_keyIndexBegin == low))
-      {
-        return numKeys;
-      }
-
-      ClearKeys();
-      m_maxKeys = numKeys;
-      m_keyIndexBegin = low;
-      m_keyType = newType;
-      if (m_keyType == 'i')
-      {
-        InitIntKeys(low, high);
-      }
-      else
-      {
-        int keySize = GetUIntValue(KeySize);
-        keySize = (keySize > 0) ? keySize : 10;
-        string keyBase = new string('A', keySize);
-        InitStrKeys(low, high, keyBase);
-      }
-      for (int j = 0; j < numKeys; j++)
-      {
-        int randIndx = Util.Rand(numKeys);
-        if (randIndx != j)
-        {
-          TKey tmp = m_keysA[j];
-          m_keysA[j] = m_keysA[randIndx];
-          m_keysA[randIndx] = tmp;
-        }
-      }
-      return m_maxKeys;
-    }
-
-    protected int InitKeys()
-    {
-      return InitKeys(true);
-    }
-
-    protected void InitStrKeys(int low, int high, string keyBase)
-    {
-      m_keysA = (TKey[])(object)new String[m_maxKeys];
-      FwkInfo("m_maxKeys: {0}; low: {1}; high: {2}",
-        m_maxKeys, low, high);
-      for (int i = low; i < high; i++)
-      {
-        m_keysA[i - low] = (TKey)(object)(keyBase + i.ToString("D10"));
-      }
-    }
-
-    protected void InitIntKeys(int low, int high)
-    {
-      m_keysA = (TKey[])(object)new Int32[m_maxKeys];
-      FwkInfo("m_maxKeys: {0}; low: {1}; high: {2}",
-        m_maxKeys, low, high);
-      for (int i = low; i < high; i++)
-      {
-        m_keysA[i - low] = (TKey)(object)i;
-      }
-    }
-    protected IRegion<TKey,TVal> GetRegion()
-    {
-      return GetRegion(null);
-    }
-
-    protected IRegion<TKey, TVal> GetRegion(string regionName)
-    {
-      IRegion<TKey, TVal> region;
-      if (regionName == null)
-      {
-        region = GetRootRegion();
-        if (region == null)
-        {
-          IRegion<TKey, TVal>[] rootRegions = CacheHelper<TKey, TVal>.DCache.RootRegions<TKey, TVal>();
-          if (rootRegions != null && rootRegions.Length > 0)
-          {
-            region = rootRegions[Util.Rand(rootRegions.Length)];
-          }
-        }
-      }
-      else
-      {
-        region = CacheHelper<TKey, TVal>.GetRegion(regionName);
-      }
-      return region;
-    }
-    public DeltaTest()
-    {
-      //FwkInfo("In DeltaTest()");
-    }
-    public static ICacheListener<TKey, TVal> CreateDeltaValidationCacheListener()
-    {
-      return new DeltaClientValidationListener<TKey, TVal>();
-    }
-
-   public virtual void DoCreateRegion()
-    {
-      FwkInfo("In DoCreateRegion()");
-      try
-      {
-        if (!isObjectRegistered)
-        {
-
-          CacheHelper<TKey, TVal>.DCache.TypeRegistry.RegisterType(DeltaTestImpl.CreateDeserializable, 0x1E);
-          CacheHelper<TKey, TVal>.DCache.TypeRegistry.RegisterType(TestObject1.CreateDeserializable, 0x1F);
-          isObjectRegistered = true;
-        }
-          IRegion<TKey, TVal> region = CreateRootRegion();
-          if (region == null)
-          {
-            FwkException("DoCreateRegion()  could not create region.");
-          }
-          FwkInfo("DoCreateRegion()  Created region '{0}'", region.Name);
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoCreateRegion() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoCreateRegion() complete.");
-    }
-
-    public virtual void DoCreatePool()
-    {
-      FwkInfo("In DoCreatePool()");
-      try
-      {
-        CreatePool();
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoCreatePool() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoCreatePool() complete.");
-    }
-
-    public void DoRegisterAllKeys()
-    {
-      FwkInfo("In DoRegisterAllKeys()");
-      try
-      {
-        IRegion<TKey, TVal> region = GetRegion();
-        FwkInfo("DoRegisterAllKeys() region name is {0}", region.Name);
-        bool isDurable = GetBoolValue("isDurableReg");
-        ResetKey("getInitialValues");
-        bool isGetInitialValues = GetBoolValue("getInitialValues");
-        region.GetSubscriptionService().RegisterAllKeys(isDurable, isGetInitialValues);
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoRegisterAllKeys() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoRegisterAllKeys() complete.");
-    }
-    public void DoPuts()
-    {
-      FwkInfo("In DoPuts()");
-      try
-      {
-        IRegion<TKey, TVal> region = GetRegion();
-        int numClients = GetUIntValue(ClientCount);
-        string label = CacheHelper<TKey, TVal>.RegionTag(region.Attributes);
-        int timedInterval = GetTimeValue(TimedInterval) * 1000;
-        if (timedInterval <= 0)
-        {
-          timedInterval = 5000;
-        }
-        int maxTime = 10 * timedInterval;
-
-        // Loop over key set sizes
-        ResetKey(DistinctKeys);
-        int numKeys;
-        while ((numKeys = InitKeys(false)) > 0)
-        { // keys loop
-          // Loop over value sizes
-
-          ResetKey(NumThreads);
-          int numThreads;
-          while ((numThreads = GetUIntValue(NumThreads)) > 0)
-          {
-            PutTask<TKey, TVal> puts = new PutTask<TKey, TVal>(region, numKeys / numThreads, mapList, true);
-            FwkInfo("Running timed task ");
-            try
-            {
-              RunTask(puts, numThreads, -1, timedInterval, maxTime, null);
-            }
-            catch (ClientTimeoutException)
-            {
-              FwkException("In DoPuts()  Timed run timed out.");
-            }
-            puts.dumpToBB();
-            Thread.Sleep(3000); // Put a marker of inactivity in the stats
-          }
-          Thread.Sleep(3000); // Put a marker of inactivity in the stats
-        } // keys loop
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoPuts() Caught Exception: {0}", ex);
-      }
-      Thread.Sleep(3000); // Put a marker of inactivity in the stats
-      FwkInfo("DoPuts() complete.");
-    }
-
-    public void DoPopulateRegion()
-    {
-      FwkInfo("In DoPopulateRegion()");
-      try
-      {
-        IRegion<TKey, TVal> region = GetRegion();
-        ResetKey(DistinctKeys);
-        int numKeys = InitKeys();
-        ResetKey(NumThreads);
-        int numThreads = GetUIntValue(NumThreads);
-        CreateTask<TKey, TVal> creates = new CreateTask<TKey, TVal>(region, (numKeys / numThreads), mapList);
-        FwkInfo("Populating region.");
-        RunTask(creates, numThreads, (numKeys / numThreads), -1, -1, null);
-        creates.dumpToBB();
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoPopulateRegion() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoPopulateRegion() complete.");
-    }
-
-    public void DoEntryOperation()
-    {
-      FwkInfo("In DoEntryOperation");
-      try
-      {
-        IRegion<TKey, TVal> region = GetRegion();
-        int numClients = GetUIntValue(ClientCount);
-        string label = CacheHelper<TKey, TVal>.RegionTag(region.Attributes);
-        int timedInterval = GetTimeValue(TimedInterval) * 1000;
-        {
-          timedInterval = 5000;
-        }
-        int maxTime = 10 * timedInterval;
-
-        // Loop over key set sizes
-        ResetKey(DistinctKeys);
-        int numKeys = GetUIntValue(DistinctKeys);
-        ResetKey(NumThreads);
-        int numThreads;
-        while ((numThreads = GetUIntValue(NumThreads)) > 0)
-        {
-          EntryTask<TKey, TVal> entrytask = new EntryTask<TKey, TVal>(region, numKeys / numThreads, mapList);
-          FwkInfo("Running timed task ");
-          try
-          {
-            RunTask(entrytask, numThreads, -1, timedInterval, maxTime, null);
-          }
-          catch (ClientTimeoutException)
-          {
-            FwkException("In DoPuts()  Timed run timed out.");
-          }
-          Thread.Sleep(3000);
-          entrytask.dumpToBB();
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoEntryOperation() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoEntryOperation() complete.");
-    }
-
-    public void DoCloseCache()
-    {
-      FwkInfo("DoCloseCache()  Closing cache and disconnecting from" +
-        " distributed system.");
-      CacheHelper<TKey, TVal>.Close();
-    }
-    public void DoValidateDeltaTest()
-    {
-      FwkInfo("DoValidateDeltaTest() called.");
-      try
-      {
-        IRegion<TKey, TVal> region = GetRegion();
-        region.GetLocalView().DestroyRegion();
-        TKey key = default(TKey);
-        Int32 expectedAfterCreateEvent = (Int32)Util.BBGet("DeltaBB", "CREATECOUNT");
-        Int32 expectedAfterUpdateEvent = (Int32)Util.BBGet("DeltaBB", "UPDATECOUNT");
-        Int32 expectedAfterDestroyEvent = (Int32)Util.BBGet("DeltaBB", "DESTROYCOUNT");
-        long eventAfterCreate = (long)Util.BBGet("DeltaBB", "AFTER_CREATE_COUNT_" + Util.ClientId + "_" + region.Name);
-        long eventAfterUpdate = (long)Util.BBGet("DeltaBB", "AFTER_UPDATE_COUNT_" + Util.ClientId + "_" + region.Name);
-        long eventAfterDestroy = (long)Util.BBGet("DeltaBB", "AFTER_DESTROY_COUNT_" + Util.ClientId + "_" + region.Name);
-        FwkInfo("DoValidateDeltaTest() -- eventAfterCreate {0} ,eventAfterUpdate {1} ,eventAfterDestroy {2}", eventAfterCreate, eventAfterUpdate, eventAfterDestroy);
-        FwkInfo("DoValidateDeltaTest() -- expectedAfterCreateEvent {0} ,expectedAfterUpdateEvent {1}, expectedAfterDestroyEvent {2} ", expectedAfterCreateEvent, expectedAfterUpdateEvent, expectedAfterDestroyEvent);
-        if (expectedAfterCreateEvent == eventAfterCreate && expectedAfterUpdateEvent == eventAfterUpdate && expectedAfterDestroyEvent == eventAfterDestroy)
-        {
-          DeltaClientValidationListener<TKey, TVal> cs = (region.Attributes.CacheListener) as DeltaClientValidationListener<TKey, TVal>;
-          IDictionary<TKey, Int64> map = cs.getMap();
-          Int32 mapCount = map.Count;
-          Int32 toDeltaMapCount = (Int32)Util.BBGet("MapCount", "size");
-          if (mapCount == toDeltaMapCount)
-          {
-            foreach (KeyValuePair<TKey, Int64> item in map)
-            {
-              key = (TKey)(object)item.Key;
-              Int64 value = item.Value;
-              long fromDeltaCount = (long)value;
-              long toDeltaCount = (long)Util.BBGet("ToDeltaBB", key.ToString());
-              if (toDeltaCount == fromDeltaCount)
-              {
-                FwkInfo("DoValidateDeltaTest() Delta Count Validation success with fromDeltaCount: {0} = toDeltaCount: {1}", fromDeltaCount, toDeltaCount);
-              }
-            }
-            FwkInfo("DoValidateDeltaTest() Validation success.");
-          }
-          else
-          {
-            FwkException("Validation Failed() as fromDeltaMapCount: {0} is not equal to toDeltaMapCount: {1}",mapCount,toDeltaMapCount);
-          }
-        }
-        else
-        {
-          FwkException("Validation Failed()for Region: {0} Expected were expectedAfterCreateEvent {1} expectedAfterUpdateEvent {2} expectedAfterDestroyEvent {3} eventAfterCreate {4}, eventAfterUpdate {5} ", region.Name, expectedAfterCreateEvent, expectedAfterUpdateEvent,expectedAfterDestroyEvent, eventAfterCreate, eventAfterUpdate ,eventAfterDestroy);
-        }
-
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoValidateDeltaTest() Caught Exception: {0}", ex);
-        FwkInfo("DoValidateDeltaTest() complete.");
-      }
-    }
-  }
-}//DeltaTest end
diff --git a/tests/cli/NewFwkLib/DurableTest/DurableClientTests.cs b/tests/cli/NewFwkLib/DurableTest/DurableClientTests.cs
deleted file mode 100644
index 8551969..0000000
--- a/tests/cli/NewFwkLib/DurableTest/DurableClientTests.cs
+++ /dev/null
@@ -1,389 +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.
- */
-
-using System;
-using System.Text;
-using System.Threading;
-
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.DUnitFramework;
-  using Apache.Geode.Client;
-
-  public class DurableClientTests<TKey,TVal> : PerfTests<TKey,TVal>
-  {
-    #region Private constants
-
-    private const string KeepAlive = "keepAlive";
-    private const string IsDurable = "isDurable";
-    private const string RestartTime = "restartTime";
-    private const string UpdateReceiveTime = "updateReceiveTime";
-    private const string SleepTime = "sleepTime";
-    private const string RegisterType = "registerType";
-    private const string MissedEvents = "missedEvents";
-    private const string ValueStart = "valueStart";
-    private const string ValueEnd = "valueEnd";
-
-    private static ICacheListener<TKey,TVal> g_listener = null;
-    private static ICacheListener<TKey,TVal> g_perflistener = null;
-    //private static bool isReady = false;
-
-    #endregion
-
-    #region Public methods
-
-    //bool isReady = false;
-
-    public static ICacheListener<TKey,TVal> CreateDurableCacheListener()
-    {
-      g_listener = new DurableListener<TKey,TVal>();
-      return g_listener;
-    }
-    public static ICacheListener<TKey, TVal> CreateConflationTestCacheListenerDC()
-    {
-      g_listener = new ConflationTestCacheListenerDC<TKey,TVal>();
-      return g_listener;
-    }
-    public static ICacheListener<TKey, TVal> CreateDurablePerfListener()
-    {
-      g_perflistener = new DurablePerfListener<TKey,TVal>();
-      return g_perflistener;
-    }
-
-    public void DoIncrementalPuts()
-    {
-      FwkInfo("In DoIncrementalPuts()");
-      try
-      {
-        IRegion<TKey, TVal> region = GetRegion();
-
-        string keyType = GetStringValue(KeyType); // int is only type to use
-        int keySize = GetUIntValue(KeySize);
-        int numKeys = GetUIntValue(DistinctKeys);
-        Int32 valStart = GetUIntValue(ValueStart);
-        int valEnd = GetUIntValue(ValueEnd);
-
-        // validate the above tags
-
-        char typ = keyType[0] == 'i' ? 'i' : 's';
-
-        Int32 currVal = valStart > 1 ? valStart : 1;
-
-        if (numKeys <= 0)
-        {
-          FwkSevere("Error reading distinctKeys");
-        }
-
-        if (valEnd <= 0)
-        {
-          FwkSevere("Error reading valueEnd");
-        }
-
-        int keyIndex = 0;
-     
-
-        while (true)
-        {
-          if (keyIndex == numKeys)
-          {
-            keyIndex = 1; // start over
-          }
-          else
-          {
-            keyIndex++; // next key
-          }
-
-          if (typ == 'i')
-          {
-            TKey key = (TKey)(object)keyIndex;
-            TVal value =(TVal)(object)currVal;
-            region[key] = value;
-          }
-          else
-          {
-            keySize = keySize > 0 ? keySize : 10;
-            string keyBase = new string('A', keySize);
-            string keyFull = String.Format("{0}{1}", keyBase, keyIndex.ToString("D10"));
-            TKey key = (TKey)(object)(keyFull.ToString());
-            TVal value = (TVal)(object)currVal;
-            region[key] = value;
-          }
-
-          if (++currVal > valEnd)
-          {
-            break;
-          }
-
-          if (currVal % 1000 == 1)
-          {
-            FwkInfo("DurableClientTest: Putting {0}st...", currVal);
-          }
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkSevere("DoIncrementalPuts() Caught Exception: {0}", ex);
-        throw;
-      }
-      FwkInfo("DoIncrementalPuts() complete.");
-    }
-
-    public void DoLogDurablePerformance()
-    {
-      DurablePerfListener<TKey, TVal> perflistener = g_perflistener as DurablePerfListener<TKey, TVal>;
-      if (perflistener != null)
-      {
-        FwkInfo("Logging durable performance.");
-        perflistener.logPerformance();
-      }
-    }
-
-    public void DoDurableCloseCache()
-    {
-      FwkInfo("In DoDurableCloseCache()");
-      try
-      {
-        bool keepalive = GetBoolValue(KeepAlive);
-        bool isDurable = GetBoolValue(IsDurable);
-        FwkInfo("KeepAlive is {0}, isDurable is {1}", keepalive, isDurable);
-        if (isDurable && keepalive)
-        {
-          CacheHelper<TKey, TVal>.CloseKeepAlive();
-        }
-        else
-        {
-          CacheHelper<TKey, TVal>.Close();
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkSevere("DoDurableCloseCache() Caught Exception: {0}", ex);
-        throw;
-      }
-      FwkInfo("DoDurableCloseCache() complete.");
-    }
-
-    public override void DoCreateRegion()
-    {
-      FwkInfo("In DoCreateRegion() Durable");
-
-      ClearCachedKeys();
-
-      string rootRegionData = GetStringValue("regionSpec");
-      string tagName = GetStringValue("TAG");
-      string endpoints = Util.BBGet(JavaServerBB, EndPointTag + tagName)
-        as string;
-      if (rootRegionData != null && rootRegionData.Length > 0)
-      {
-        string rootRegionName;
-        rootRegionName = GetRegionName(rootRegionData);
-        if (rootRegionName != null && rootRegionName.Length > 0)
-        {
-          IRegion<TKey, TVal> region;
-          if ((region = CacheHelper<TKey, TVal>.GetRegion(rootRegionName)) == null)
-          {
-            bool isDC = GetBoolValue("isDurable");
-            string m_isPool = null;
-            try
-             {
-              // Check if this is a thin-client region; if so set the endpoints
-              int redundancyLevel = 0;
-              if (endpoints != null && endpoints.Length > 0)
-              {
-                redundancyLevel = GetUIntValue(RedundancyLevelKey);
-                if (redundancyLevel < 0)
-                  redundancyLevel = 0;
-                if (redundancyLevel < 0)
-                  redundancyLevel = 0;
-                string conflateEvents = GetStringValue(ConflateEventsKey);
-                string durableClientId = "";
-                int durableTimeout = 300;
-                if (isDC)
-                {
-                  durableTimeout = GetUIntValue("durableTimeout");
-                  bool isFeeder = GetBoolValue("isFeeder");
-                  if (isFeeder)
-                  {
-                    durableClientId = "Feeder";
-                    // VJR: Setting FeederKey because listener cannot read boolean isFeeder
-                    // FeederKey is used later on by Verify task to identify feeder's key in BB
-                    Util.BBSet("DURABLEBB", "FeederKey", "ClientName_" + Util.ClientNum + "_Count");
-                  }
-                  else
-                  {
-                    durableClientId = String.Format("ClientName_{0}", Util.ClientNum);
-                  }
-                }
-                FwkInfo("DurableClientID is {0} and DurableTimeout is {1}", durableClientId, durableTimeout);
-                ResetKey("sslEnable");
-                bool isSslEnable = GetBoolValue("sslEnable");
-                CacheHelper<TKey, TVal>.InitConfigForPoolDurable(durableClientId, durableTimeout, conflateEvents, isSslEnable);
-               }
-              RegionFactory rootAttrs = CacheHelper<TKey, TVal>.DCache.CreateRegionFactory(RegionShortcut.PROXY);
-              SetRegionAttributes(rootAttrs, rootRegionData, ref m_isPool);
-              rootAttrs = CreatePool(rootAttrs, redundancyLevel);
-              region = CacheHelper<TKey, TVal>.CreateRegion(rootRegionName, rootAttrs);
-              Apache.Geode.Client.RegionAttributes<TKey, TVal> regAttr = region.Attributes;
-              FwkInfo("Region attributes for {0}: {1}", rootRegionName,
-                CacheHelper<TKey, TVal>.RegionAttributesToString(regAttr));
-
-            }
-            catch (Exception ex)
-            {
-              FwkSevere("Caught Exception: {0}", ex);
-            }
-          }
-        }
-        else
-        {
-          FwkSevere("DoCreateRegion() failed to create region");
-        }
-
-      }
-      FwkInfo("DoCreateRegion() complete.");
-    }
-
-    public void DoCloseCacheAndReInitialize()
-    {
-      FwkInfo("In DoCloseCacheAndReInitialize()");
-
-      DoDurableCloseCache();
-
-      //isReady = false;
-      DoRestartClientAndRegInt();
-
-      FwkInfo("DoCloseCacheAndReInitialize() complete.");
-    }
-
-    public void DoRestartClientAndRegInt()
-    {
-      FwkInfo("In DoRestartClientAndRegInt()");
-
-      ClearCachedKeys();
-
-      int sleepSec = GetUIntValue(RestartTime);
-      if (sleepSec > 0)
-      {
-        Thread.Sleep(sleepSec * 1000);
-        FwkInfo("Sleeping for {0} seconds before DoCreateRegion()", sleepSec);
-      }      
-
-      DoCreateRegion();
-
-      string regType = GetStringValue(RegisterType);
-
-      if (regType == "All")
-      {
-        DoRegisterAllKeys();
-      }
-      else if (regType == "List")
-      {
-        DoRegisterInterestList();
-      }
-      else
-      {
-        DoRegisterRegexList();
-      }
-      //isReady = true;
-      int waitSec = GetUIntValue(UpdateReceiveTime);
-      if (waitSec > 0)
-      {
-        Thread.Sleep(waitSec * 1000);
-        FwkInfo("Sleeping for {0} seconds after DoCreateRegion()", sleepSec);
-      }
-
-      FwkInfo("DoRestartClientAndRegInt() complete.");
-    }
-
-    public void DoVerifyEventCount()
-    {
-      FwkInfo("In DoVerifyEventCount()");
-
-      try
-      {
-        bool failed = false;
-
-        string name = String.Format("ClientName_{0}", Util.ClientNum);
-        string operkey = name + "_Count";
-        //string feedkey = "Feeder_Count";
-        string feedkey = (string) Util.BBGet("DURABLEBB", "FeederKey");
-        Int32 currcnt = 0;
-        Int32 feedcnt = 0;
-
-        try
-        {
-          currcnt = (Int32)Util.BBGet("DURABLEBB", operkey);
-        }
-        catch (Apache.Geode.DUnitFramework.KeyNotFoundException)
-        {
-          FwkInfo("Key not found for DURABLEBB {0}", operkey);
-        }
-
-        try
-        {
-          feedcnt = (Int32)Util.BBGet("DURABLEBB", feedkey);
-        }
-        catch (Apache.Geode.DUnitFramework.KeyNotFoundException)
-        {
-          FwkInfo("Key not found for DURABLEBB {0}", feedkey);
-        }
-
-        FwkInfo("DoVerifyEventCount: Feeder is " + feedcnt + ", Actual is " + currcnt);
-
-        bool missedEvents = GetBoolValue(MissedEvents);
-
-        if (!missedEvents && currcnt != feedcnt)
-        {
-          string clientErrorKey = name + "_ErrMsg";
-          string errorMsg = null;
-          try
-          {
-            errorMsg = (string)Util.BBGet("DURABLEBB", clientErrorKey);
-          }
-          catch (Apache.Geode.DUnitFramework.KeyNotFoundException)
-          {
-            errorMsg = "unknown";
-            FwkInfo("Key not found for DURABLEBB {0}", clientErrorKey);
-          }
-          FwkSevere("DoVerifyEventCount: Failed. # Missed = {0}, Err: {1}", feedcnt-currcnt, errorMsg);
-          failed = true;
-        }
-        else if (missedEvents && currcnt > feedcnt)
-        {
-          FwkSevere("DoVerifyEventCount: Failed: Few events should have been missed.");
-          failed = true;
-        }
-
-        FwkAssert(!failed, "DoVerifyEventCount() verification failed");
-      }
-      catch (Exception ex)
-      {
-        FwkSevere("DoVerifyEventCount() Caught Exception: {0}", ex);
-        throw;
-      }
-
-      FwkInfo("DoVerifyEventCount() complete.");
-    }
-
-    public void DoDummyTask()
-    {
-      FwkInfo("DoDummyTask() called.");
-    }
-
-    #endregion
-  }
-}
diff --git a/tests/cli/NewFwkLib/DurableTest/DurableListener.cs b/tests/cli/NewFwkLib/DurableTest/DurableListener.cs
deleted file mode 100644
index aa7cb90..0000000
--- a/tests/cli/NewFwkLib/DurableTest/DurableListener.cs
+++ /dev/null
@@ -1,256 +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.
- */
-
-using System;
-using System.Collections.Generic;
-
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.DUnitFramework;
-  using Apache.Geode.Client;
-
-  public class DurableListener<TKey, TVal> : CacheListenerAdapter<TKey, TVal>, IDisposable
-  {
-    #region Private members
-
-    int m_ops = 0;
-    string m_clientName = null;
-    Int32 m_prevValue = 0;
-    bool m_result = true;
-    string m_err;
-
-    #endregion
-
-    #region Private methods
-
-    private void check(EntryEvent<TKey, TVal> ev)
-    {
-      FwkTest<TKey, TVal> currTest = FwkTest<TKey, TVal>.CurrentTest;
-
-     // CacheableInt32 value = ev.NewValue as CacheableInt32;
-      Int32 value = (Int32)(object)ev.NewValue;
-
-      if (value <= m_prevValue) // duplicate
-      {
-        //currTest.FwkInfo("DurableListener : duplicate value: " + value.Value);
-      }
-      else if (value == m_prevValue + 1) // desired
-      {
-        m_ops++;
-        m_prevValue++;
-      }
-      else // event missed
-      {
-        currTest.FwkInfo("Missed event, expected {0}, actual {1}", m_prevValue + 1, value);
-        m_prevValue = value;
-        m_ops++;
-        if (m_result)
-        {
-          m_result = false;
-          m_err = String.Format("Missed event with value {0}", value);
-          currTest.FwkInfo("Missed event, expected {0}, actual {1}", m_prevValue + 1, value);
-        }
-      }
-    }
-    
-    private void dumpToBB()
-    {
-      FwkTest<TKey, TVal> currTest = FwkTest<TKey, TVal>.CurrentTest;
-      currTest.FwkInfo("DurableListener: updating blackboard, ops = {0}, prev = {1}", m_ops, m_prevValue);
-
-      // increment count
-      string bbkey = m_clientName + "_Count";
-      Int32 current = 0;
-      try
-      {
-        current = (Int32)Util.BBGet("DURABLEBB", bbkey);
-      }
-      catch (Apache.Geode.DUnitFramework.KeyNotFoundException)
-      {
-        currTest.FwkInfo("Key not found for DURABLEBB {0}", bbkey);
-      }
-      current += m_ops;
-      Util.BBSet("DURABLEBB", bbkey, current);
-      currTest.FwkInfo("Current count for " + bbkey + " is " + current);
-
-      // set current index
-      string clientIndexKey = m_clientName + "_IDX";
-      Util.BBSet("DURABLEBB", clientIndexKey, m_prevValue);
-
-      // store error message
-      if (!m_result && m_err != null && m_err.Length > 0)
-      {
-        string clientErrorKey = m_clientName + "_ErrMsg";
-        string clientErrorVal = null;
-        try
-        {
-          clientErrorVal = (string)Util.BBGet("DURABLEBB", clientErrorKey);
-        }
-        catch (Apache.Geode.DUnitFramework.KeyNotFoundException)
-        {
-          currTest.FwkInfo("Key not found for DURABLEBB {0}", clientErrorKey);
-        }
-        if (clientErrorVal == null || clientErrorVal.Length <= 0)
-        {
-          Util.BBSet("DURABLEBB", clientErrorKey, m_err);
-        }
-      }
-    }
-
-    #endregion
-
-    #region ICacheListener Members
-
-    public override void AfterCreate(EntryEvent<TKey,TVal> ev)
-    {
-      check(ev);
-    }
-
-    public override void AfterRegionLive(RegionEvent<TKey, TVal> ev)
-    {
-      FwkTest<TKey, TVal> currTest = FwkTest<TKey, TVal>.CurrentTest;
-      currTest.FwkInfo("DurableListener: AfterRegionLive invoked");
-    }
-
-    public override void AfterUpdate(EntryEvent<TKey, TVal> ev)
-    {
-      check(ev);
-    }
-
-    public override void Close(IRegion<TKey, TVal> region)
-    {
-      dumpToBB();
-    }
-    public override void AfterRegionDisconnected(IRegion<TKey, TVal> region)
-    {
-    }
-    #endregion
-
-    protected virtual void Dispose(bool disposing)
-    {
-    }
-
-    #region IDisposable Members
-
-    public void Dispose()
-    {
-      Dispose(true);
-      GC.SuppressFinalize(this);
-    }
-
-    #endregion
-
-    public DurableListener()
-    {
-      FwkTest<TKey, TVal> currTest = FwkTest<TKey, TVal>.CurrentTest; 
-      m_clientName = String.Format("ClientName_{0}", Util.ClientNum);
-      string clientIndexKey = m_clientName + "_IDX";
-      try
-      {
-        m_prevValue = (Int32)Util.BBGet("DURABLEBB", clientIndexKey);
-      }
-      catch (Apache.Geode.DUnitFramework.KeyNotFoundException)
-      {
-        m_prevValue = 0;
-        currTest.FwkInfo("Key not found for DURABLEBB {0}", clientIndexKey);
-      }
-      currTest.FwkInfo("DurableListener created for client {0} with prev val {1}", m_clientName, m_prevValue);
-    }
-
-    ~DurableListener()
-    {
-      Dispose(false);
-    }
-  }
-
-  public class ConflationTestCacheListenerDC<TKey, TVal> : ICacheListener<TKey, TVal>
-  {
-    int m_numAfterCreate;
-    int m_numAfterUpdate;
-    int m_numAfterInvalidate;
-    int m_numAfterDestroy;
-
-    public ConflationTestCacheListenerDC()
-    {
-      FwkTest<TKey, TVal>.CurrentTest.FwkInfo("Calling durable client ConflationTestCacheListener");
-      m_numAfterCreate = 0;
-      m_numAfterUpdate = 0;
-      m_numAfterInvalidate = 0;
-      m_numAfterDestroy = 0;
-    }
-
-    public static ICacheListener<TKey, TVal> Create()
-    {
-      return new ConflationTestCacheListenerDC<TKey, TVal>();
-    }
-    ~ConflationTestCacheListenerDC() { }
-    
-    #region ICacheListener Members
-
-    public void AfterCreate(EntryEvent<TKey, TVal> ev)
-    {
-      ++m_numAfterCreate;
-    }
-
-    public void AfterUpdate(EntryEvent<TKey, TVal> ev)
-    {
-      ++m_numAfterUpdate;
-    }
-    public void AfterRegionLive(RegionEvent<TKey, TVal> ev)
-    {
-      FwkTest<TKey, TVal>.CurrentTest.FwkInfo("ConflationTestCacheListener: AfterRegionLive invoked");
-    }
-    public void AfterDestroy(EntryEvent<TKey, TVal> ev)
-    {
-      ++m_numAfterDestroy;
-    }
-
-    public void AfterInvalidate(EntryEvent<TKey, TVal> ev)
-    {
-      ++m_numAfterInvalidate;
-    }
-
-    public void AfterRegionDestroy(RegionEvent<TKey, TVal> ev)
-    {
-      dumpToBB(ev.Region);
-    }
-
-    public void AfterRegionClear(RegionEvent<TKey, TVal> ev)
-    {
-    }
-
-    public void AfterRegionInvalidate(RegionEvent<TKey, TVal> ev)
-    {
-    }
-
-    public void Close(IRegion<TKey, TVal> region)
-    {
-    }
-    public void AfterRegionDisconnected(IRegion<TKey, TVal> region)
-    {
-    }
-    private void dumpToBB(IRegion<TKey, TVal> region)
-    {
-      FwkTest<TKey, TVal>.CurrentTest.FwkInfo("dumping durable client data on BB for ConflationTestCacheListener");
-      Util.BBSet("ConflationCacheListener", "AFTER_CREATE_COUNT_" + Util.ClientId + "_" + region.Name, m_numAfterCreate);
-      Util.BBSet("ConflationCacheListener", "AFTER_UPDATE_COUNT_" + Util.ClientId + "_" + region.Name, m_numAfterUpdate);
-      Util.BBSet("ConflationCacheListener", "AFTER_DESTROY_COUNT_" + Util.ClientId + "_" + region.Name, m_numAfterDestroy);
-      Util.BBSet("ConflationCacheListener", "AFTER_INVALIDATE_COUNT_" + Util.ClientId + "_" + region.Name, m_numAfterInvalidate);
-    }
-    #endregion
-  }
-}
diff --git a/tests/cli/NewFwkLib/DurableTest/DurablePerfListener.cs b/tests/cli/NewFwkLib/DurableTest/DurablePerfListener.cs
deleted file mode 100644
index 5d7f105..0000000
--- a/tests/cli/NewFwkLib/DurableTest/DurablePerfListener.cs
+++ /dev/null
@@ -1,135 +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.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Threading;
-
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.DUnitFramework;
-  using Apache.Geode.Client;
-
-
-  public class DurablePerfListener<TKey, TVal> : CacheListenerAdapter<TKey, TVal>, IDisposable
-  {
-    #region Private members
-
-    long m_ops = 0;
-    long m_minTime;
-    DateTime m_prevTime;
-    DateTime m_startTime;
-    
-    #endregion
-
-    #region Private methods
-
-    private void recalculate(EntryEvent<TKey, TVal> ev)
-    {
-      if (m_ops == 0)
-      {
-        m_startTime = DateTime.Now;
-      }
-
-      m_ops++;
-
-      if (m_ops % 1000 == 0)
-      {
-        FwkTest<TKey, TVal> currTest = FwkTest<TKey, TVal>.CurrentTest;
-        currTest.FwkInfo("DurablePerfListener : m_ops = " + m_ops);
-      }
-
-      DateTime currTime = DateTime.Now;
-      TimeSpan elapsedTime = currTime - m_prevTime;
-
-      long diffTime = elapsedTime.Milliseconds;
-
-      if (diffTime < m_minTime)
-      {
-        m_minTime = diffTime;
-      }
-
-      m_prevTime = currTime;
-    }
-    
-    #endregion
-
-    #region ICacheListener Members
-
-    public override void AfterCreate(EntryEvent<TKey, TVal> ev)
-    {
-      recalculate(ev);
-    }
-
-
-    public override void AfterRegionLive(RegionEvent<TKey, TVal> ev)
-    {
-      FwkTest<TKey, TVal> currTest = FwkTest<TKey, TVal>.CurrentTest;
-      currTest.FwkInfo("DurablePerfListener: AfterRegionLive invoked.");
-    }
-
-    public override void AfterUpdate(EntryEvent<TKey, TVal> ev)
-    {
-      recalculate(ev);
-    }
-
-    public override void Close(IRegion<TKey, TVal> region)
-    {
-    }
-    public override void AfterRegionDisconnected(IRegion<TKey, TVal> region)
-    {
-    }
-    #endregion
-
-    protected virtual void Dispose(bool disposing)
-    {
-    }
-
-    #region IDisposable Members
-
-    public void Dispose()
-    {
-      Dispose(true);
-      GC.SuppressFinalize(this);
-    }
-
-    #endregion
-
-    public void logPerformance()
-    {
-      TimeSpan totalTime = m_prevTime - m_startTime;
-      double averageRate = m_ops / totalTime.TotalSeconds;
-      double maxRate = 1000.0 / m_minTime;
-      FwkTest<TKey, TVal> currTest = FwkTest<TKey, TVal>.CurrentTest;
-      currTest.FwkInfo("DurablePerfListener: # events = {0}, max rate = {1} events per second.", m_ops, maxRate);
-      currTest.FwkInfo("DurablePerfListener: average rate = {0} events per second, total time {1} seconds", averageRate, totalTime.TotalSeconds);
-    }
-
-    public DurablePerfListener()
-    {
-      FwkTest<TKey, TVal> currTest = FwkTest<TKey, TVal>.CurrentTest;
-      currTest.FwkInfo("DurablePerfListener: created");
-      m_minTime = 99999999;
-      m_prevTime = DateTime.Now;
-    }
-
-    ~DurablePerfListener()
-    {
-      Dispose(false);
-    }
-  }
-}
diff --git a/tests/cli/NewFwkLib/EventTest/ETCacheListener.cs b/tests/cli/NewFwkLib/EventTest/ETCacheListener.cs
deleted file mode 100644
index 94644a8..0000000
--- a/tests/cli/NewFwkLib/EventTest/ETCacheListener.cs
+++ /dev/null
@@ -1,83 +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.
- */
-
-using System;
-
-namespace Apache.Geode.Client.FwkLib
-{
-
-  using Apache.Geode.DUnitFramework;
-
-  public class ETCacheListener : ICacheListener
-  {
-    public static ICacheListener Create()
-    {
-      return new ETCacheListener();
-    }
-
-    #region ICacheListener Members
-
-    public void AfterCreate(EntryEvent ev)
-    {
-      Util.BBIncrement(EventTest.EventCountersBB, "AFTER_CREATE_COUNT");
-    }
-
-    public void AfterDestroy(EntryEvent ev)
-    {
-      Util.BBIncrement(EventTest.EventCountersBB, "AFTER_DESTROY_COUNT");
-    }
-
-    public void AfterInvalidate(EntryEvent ev)
-    {
-      Util.BBIncrement(EventTest.EventCountersBB, "AFTER_INVALIDATE_COUNT");
-    }
-
-    public void AfterRegionDestroy(RegionEvent ev)
-    {
-      //Util.BBIncrement("AFTER_REGION_DESTROY_COUNT");
-    }
-
-    public void AfterRegionInvalidate(RegionEvent ev)
-    {
-      Util.BBIncrement(EventTest.EventCountersBB, "AFTER_REGION_INVALIDATE_COUNT");
-    }
-    public void AfterRegionClear(RegionEvent ev)
-    {
-      Util.BBIncrement(EventTest.EventCountersBB, "AFTER_REGION_CLEAR_COUNT");
-    }
-
-
-    public void AfterUpdate(EntryEvent ev)
-    {
-      Util.BBIncrement(EventTest.EventCountersBB, "AFTER_UPDATE_COUNT");
-    }
-
-    public virtual void AfterRegionLive(RegionEvent ev)
-    {
-      //Util.BBIncrement("AFTER_REGION_LIVE_COUNT");
-    }
-
-    public void Close(Region region)
-    {
-      Util.BBIncrement(EventTest.EventCountersBB, "CLOSE_COUNT");
-    }
-    public void AfterRegionDisconnected(Region region)
-    {
-    }
-    #endregion
-  }
-}
diff --git a/tests/cli/NewFwkLib/EventTest/ETCacheLoader.cs b/tests/cli/NewFwkLib/EventTest/ETCacheLoader.cs
deleted file mode 100644
index 3b63629..0000000
--- a/tests/cli/NewFwkLib/EventTest/ETCacheLoader.cs
+++ /dev/null
@@ -1,49 +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.
- */
-
-using System;
-
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.DUnitFramework;
-
-  public class ETCacheLoader : ICacheLoader
-  {
-    public static ICacheLoader Create()
-    {
-      return new ETCacheLoader();
-    }
-
-    #region ICacheLoader Members
-
-    public ISerializable Load(Region rp, ICacheableKey key, ISerializable helper)
-    {
-      Util.BBIncrement(EventTest.EventCountersBB, "LOAD_CACHEABLE_STRING_COUNT");
-      byte[] buffer = new byte[2000];
-      Util.RandBytes(buffer);
-      CacheableBytes value = CacheableBytes.Create(buffer);
-      return value;
-    }
-
-    public void Close(Region rp)
-    {
-      Util.BBIncrement(EventTest.EventCountersBB, "CLOSE_COUNT");
-    }
-
-    #endregion
-  }
-}
diff --git a/tests/cli/NewFwkLib/EventTest/ETCacheWriter.cs b/tests/cli/NewFwkLib/EventTest/ETCacheWriter.cs
deleted file mode 100644
index 090185c..0000000
--- a/tests/cli/NewFwkLib/EventTest/ETCacheWriter.cs
+++ /dev/null
@@ -1,69 +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.
- */
-
-using System;
-
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.DUnitFramework;
-
-  public class ETCacheWriter : ICacheWriter
-  {
-    public static ICacheWriter Create()
-    {
-      return new ETCacheWriter();
-    }
-
-    #region ICacheWriter Members
-
-    public bool BeforeUpdate(EntryEvent ev)
-    {
-      Util.BBIncrement(EventTest.EventCountersBB, "BEFORE_UPDATE_COUNT");
-      return true;
-    }
-
-    public bool BeforeCreate(EntryEvent ev)
-    {
-      Util.BBIncrement(EventTest.EventCountersBB, "BEFORE_CREATE_COUNT");
-      return true;
-    }
-
-    public bool BeforeDestroy(EntryEvent ev)
-    {
-      Util.BBIncrement(EventTest.EventCountersBB, "BEFORE_DESTROY_COUNT");
-      return true;
-    }
-    public bool BeforeRegionClear(RegionEvent rv)
-    {
-      Util.BBIncrement(EventTest.EventCountersBB, "BEFORE_REGION_CLEAR_COUNT");
-      return true;
-    }
-
-    public bool BeforeRegionDestroy(RegionEvent rv)
-    {
-      Util.BBIncrement(EventTest.EventCountersBB, "BEFORE_REGION_DESTROY_COUNT");
-      return true;
-    }
-
-    public void Close(Region rv)
-    {
-      Util.BBIncrement(EventTest.EventCountersBB, "CLOSE_COUNT");
-    }
-
-    #endregion
-  }
-}
diff --git a/tests/cli/NewFwkLib/EventTest/EventTests.cs b/tests/cli/NewFwkLib/EventTest/EventTests.cs
deleted file mode 100644
index cf04918..0000000
--- a/tests/cli/NewFwkLib/EventTest/EventTests.cs
+++ /dev/null
@@ -1,1774 +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.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.DUnitFramework;
-  using System.Threading;
-  using System.Xml.Serialization;
-  using System.IO;
-  using System.Reflection;
-
-  public class EventTest : FwkTest
-  {
-    public const string EventCountersBB = "EventCountersBB";
-
-    #region Private members
-
-    private List<CacheableKey> m_keysVec = new List<CacheableKey>();
-
-    #endregion
-
-    #region Private utility methods
-
-    private int percentDifferent()
-    {
-      string testRegionName = GetStringValue("regionName");
-      if (testRegionName.Length == 0)
-      {
-        throw new FwkException("Data not provided for regionname failing");
-      }
-      int bbExpected = 0;
-      int expected = GetUIntValue("expectedKeyCount");
-      if (expected < 0)
-      {
-        bbExpected = (int)Util.BBGet(EventCountersBB, "CREATE_COUNT");
-        if (bbExpected <= 0)
-        {
-          throw new FwkException("Data not provided for expectedKeyCount failing");
-        }
-        expected = bbExpected;
-      }
-      Region testReg = CacheHelper.GetRegion(testRegionName);
-      ISerializable[] keys = testReg.GetKeys();
-      int keyCount = keys.Length;
-      double diff = 0;
-      if (keyCount > expected)
-      {
-        diff = keyCount - expected;
-      }
-      else
-      {
-        diff = expected - keyCount;
-      }
-      int retval = (int)((diff / ((double)expected + 1.0)) * 100.0);
-      FwkInfo("Expected to have " + expected + " keys, found " + keyCount + " keys, percent Difference: " + retval);
-      return retval;
-    }
-
-    private void doEntryTest(string opcode)
-    {
-      FwkInfo("Calling doEntryTest inside getRandomregion");
-      Region reg = GetRandomRegion(true);
-      FwkInfo("After getrandomregion inside doentrytest");
-      if (reg == null)
-      {
-        FwkInfo("Check in side doEntryTest ... No region to operate on");
-        throw new FwkException("No reion to operate on");
-      }
-
-      lock (this)
-      {
-        FwkInfo("After getrandomregion inside doentrytest Check 1");
-        if (reg.Attributes.CachingEnabled == false)
-        {
-          return;
-        }
-        ISerializable[] keys = reg.GetKeys();
-        int maxkeys = GetUIntValue("distinctKeys");
-        int balanceEntries = GetUIntValue("balanceEntries");
-        FwkInfo("After getrandomregion inside doentrytest Check 2 balance entries = {0}", balanceEntries);
-        if (balanceEntries > 0)
-        {
-          if (keys.Length >= maxkeys)
-          {
-            FwkInfo("Balancing cache content by destroying excess entries.");
-            int dcnt = 0;
-            for (uint i = 100; i > 0; i--)
-            {
-              try
-              {
-                destroyObject(reg, true);
-              }
-              catch (Exception e)
-              {
-                // ignore the exception ... TODO print the message
-                FwkSevere(e.Message);
-              }
-            }
-            FwkInfo("Cache balancing complete, did " + dcnt + " destroys.");
-          }
-          else if (keys.Length == 0)
-          {
-            FwkInfo("Balancing cache content by creating entries.");
-            int ccnt = 0;
-            for (int i = 100; i > 0; i--)
-            {
-              try
-              {
-                addObject(reg, true, null, null);
-                ccnt++;
-              }
-              catch (TimeoutException e)
-              {
-                FwkSevere("Caught unexpected timeout exception during entry " + opcode
-                  + " operation: " + e.Message + " continuing with test.");
-              }
-              catch (Exception e)
-              {
-                // Ignore other exception ... @TODO
-                FwkInfo("Ignoring exception " + e.Message);
-              }
-            }
-            FwkInfo("Cache balancing complete, did " + ccnt + " creates.");
-          }
-        }
-        else
-        {
-          FwkInfo("Balance entries less than zero");
-        }
-      }
-      FwkInfo("After getrandomregion inside doentrytest Check 4 before switch opcode = {0}", opcode);
-      //opcode = "read";
-      FwkInfo("opcode = " + opcode.ToString() + " " + opcode);
-
-
-      switch (opcode)
-      {
-        case "add":
-          addObject(reg, true, null, null);
-          break;
-
-        case "update":
-          updateObject(reg);
-          break;
-
-        case "invalidate":
-          invalidateObject(reg, false);
-          break;
-
-        case "destroy":
-          destroyObject(reg, false);
-          break;
-
-        case "read":
-          readObject(reg);
-          break;
-
-        case "localInvalidate":
-          invalidateObject(reg, true);
-          break;
-
-        case "localDestroy":
-          destroyObject(reg, true);
-          break;
-
-        default:
-          FwkSevere("Invalid operation specified: " + opcode);
-          break;
-
-      }
-    }
-
-    private void doRegionTest(string opcode, int iMaxRegions)
-    {
-      Region randomRegion;
-      lock (this)
-      {
-        int iRegionCount = getAllRegionCount();
-        if (iRegionCount >= iMaxRegions)
-        {
-          while (iRegionCount > iMaxRegions / 2)
-          {
-            try
-            {
-              randomRegion = GetRandomRegion(true);
-              if (randomRegion == null)
-              {
-                FwkException("expected to get a valid random region, get a null region instead");
-              }
-              else
-              {
-                destroyRegion(randomRegion, false);
-              }
-              iRegionCount = getAllRegionCount();
-              FwkInfo("Inside doregiontest ... iregioncount = {0}", iRegionCount);
-            }
-            catch (Exception ignore)
-            {
-              FwkInfo(ignore.Message);
-            }
-          }
-        }
-        else if (iRegionCount <= 0)
-        {
-          for (Int32 i = iMaxRegions / 2; i > 0; i--)
-          {
-            try
-            {
-              addRegion();
-            }
-            catch (Exception ignore)
-            {
-              FwkInfo(ignore.Message);
-            }
-          }
-        }
-        FwkInfo("Inside doregiontest after else");
-      }
-
-      FwkInfo("Again GetRandomRegion");
-      randomRegion = GetRandomRegion(true);
-      if (randomRegion == null)
-      {
-        //need to create a region
-        opcode = "addRegion";
-      }
-      FwkInfo("Do region test: " + opcode);
-      switch (opcode)
-      {
-        case "addRegion":
-          addRegion();
-          break;
-        case "clearRegion":
-          clearRegion(randomRegion, false);
-          break;
-
-        case "invalidateRegion":
-          invalidateRegion(randomRegion, false);
-          break;
-
-        case "destroyRegion":
-          destroyRegion(randomRegion, false);
-          break;
-
-        case "localClearRegion":
-          clearRegion(randomRegion, true);
-          break;
-
-        case "localInvalidateRegion":
-          invalidateRegion(randomRegion, true);
-          break;
-
-        case "localDestroyRegion":
-          destroyRegion(randomRegion, true);
-          break;
-
-        default:
-          FwkSevere("Invalid operation specified: " + opcode);
-          break;
-      }
-    }
-
-    private string getNextRegionName(Region region)
-    {
-      string regionName = null;
-      int count = 0;
-      string path;
-      do
-      {
-        path = GetStringValue("regionPaths");
-        if (path.Length == 0)
-        {
-          FwkException("No regionPaths defined in the xml file. Needed for region event test");
-        }
-        do
-        {
-          int length = path.Length;
-          try
-          {
-            region = CacheHelper.GetRegion(path);
-          }
-          catch (Exception e)
-          {
-            FwkSevere(e.Message);
-          }
-          if (region == null)
-          {
-            int pos = path.LastIndexOf('/');
-            regionName = path.Substring(pos + 1, path.Length - pos);
-            path = path.Substring(0, pos);
-          }
-        } while ((region == null) && path.Length == 0);
-      } while ((++count < 5) && regionName.Length != 0);
-      return regionName;
-    }
-
-    public void measureMemory(string s, double vs, double rs)
-    {
-    }
-
-    public CacheableKey findKeyNotInCache(Region region)
-    {
-      CacheableKey key;
-      if (m_keysVec.Count == 0)
-      {
-        lock (this)
-        {
-          int numKeys = GetUIntValue("distinctKeys");
-          for (int i = 0; i < numKeys; i++)
-          {
-            string skey = i.ToString();
-            key = new CacheableString(skey);
-            //int pos = m_keysVec.Length;
-            m_keysVec.Add(key);
-          }
-        }
-      }
-      key = null;
-
-      int start = Util.Rand(m_keysVec.Count);
-      bool wrapped = false;
-      int cur = start;
-      while ((cur != start) || !wrapped)
-      {
-        if (cur >= m_keysVec.Count)
-        {
-          cur = 0;
-          wrapped = true;
-        }
-        else
-        {
-          if (!region.ContainsKey(m_keysVec[cur]))
-          {
-            key = m_keysVec[cur];
-            cur = start;
-            wrapped = true;
-          }
-          else
-          {
-            cur++;
-          }
-        }
-      }
-      return key;
-    }
-
-    #endregion
-
-    #region Public methods
-
-    public void DoEntryOperations()
-    {
-      Util.Log("Calling doeventoperations");
-      doEventOperations();
-    }
-
-
-    public void doEventOperations()
-    {
-      UInt32 counter = 0;
-      string taskID = "begin";
-      // Clear up everything from previous test.
-      // Make sure we have one root region.
-      {
-        // TODO: Lock and task id business
-        // ACE_Guard<ACE_Thread_Mutex> guard( *testLock);
-        //if ((taskID != null) && (this.getn != taskID))
-        {
-          // TODO
-          CacheHelper.DestroyAllRegions(true);
-          //destroyAllRegions();
-
-          CreateRootRegion();
-          if (taskID != null)
-          {
-            //(taskID);
-          }
-          //  FWKINFO( "DBG doEventOperations set id" );
-          //taskID = strdup(getTaskId().c_str());
-        }
-        //  FWKINFO( "DBG doEventOperations release lock" );
-      }
-      int workTime = GetUIntValue("workTime");
-      FwkInfo("doEventOperations will work for " + workTime + " seconds. ");
-
-      int skipCounter = GetUIntValue("skipCount");
-      skipCounter = (skipCounter > 0) ? skipCounter : 100;
-
-      int iMaxRegions = GetUIntValue("maxRegions");
-      // TODO: DEFAULT_MAX_REGION
-      int DEFAULT_MAX_REGION = 10;
-      iMaxRegions = (iMaxRegions > 0) ? iMaxRegions : DEFAULT_MAX_REGION;
-
-      // TODO: check the correctness.
-      DateTime endTime = DateTime.Now + TimeSpan.FromMilliseconds((double)workTime);
-
-      int opsSecond = GetUIntValue("opsSecond");
-      opsSecond = (opsSecond > 0) ? opsSecond : 0;
-      PaceMeter pm = new PaceMeter(opsSecond);
-
-      int logSize = GetUIntValue("logSize");
-
-      int opCount = 0;
-
-      DateTime now = new DateTime();
-      string opcode = string.Empty;
-      bool isDone = false;
-      FwkInfo("Entering event loop.");
-      do
-      {
-        FwkInfo("Before getRegionCount");
-        if (logSize == 1)
-        {
-          int cnt = getRegionCount();
-          FwkInfo(cnt + ((cnt == 1) ? " region " : " regions ") + opCount);
-        }
-        FwkInfo("After getRegionCount");
-        int randomOP = GetUIntValue("randomOP");
-        if (randomOP == 5)
-        {
-          opcode = GetStringValue("regionOps");
-        }
-        else
-        {
-          opcode = GetStringValue("entryOps");
-        }
-        FwkInfo("Check 1");
-        if (opcode.Length != 0)
-        {
-          bool skipTest = false;
-          if (opcode == "abort")
-          {
-            skipTest = true;
-            if (--skipCounter == 0)
-            {
-              // TODO: definitely wrong. what is intended is unclear.
-              //char * segv = NULL;
-              //strcpy( segv, "Forcing segv" );
-            }
-          }
-          else if (opcode == "exit")
-          {
-            skipTest = true;
-            if (--skipCounter == 0)
-            {
-              Environment.Exit(0);
-            }
-          }
-          else if (opcode == "done")
-          {
-            skipTest = true;
-            if (--skipCounter == 0)
-            {
-              isDone = true;
-            }
-          }
-
-          if (!skipTest)
-          {
-            FwkInfo("Check 2 doRegionTest");
-            if (randomOP == 5)
-            {
-              doRegionTest(opcode, iMaxRegions);
-            }
-            else
-            {
-              FwkInfo("Check 3 doEntryTest");
-              doEntryTest(opcode);
-              FwkInfo("Check 4 doentrytest over");
-            }
-            opCount++;
-            pm.CheckPace();
-          }
-          counter++;
-          if ((counter % 1000) == 0)
-          {
-            FwkInfo("Performed " + counter + " operations.");
-          }
-          Util.BBIncrement(EventCountersBB, "CURRENT_OPS_COUNT");
-        }
-        else
-        {
-          FwkSevere("NULL operation specified." + "randomOP: " + randomOP);
-        }
-        now = DateTime.Now;
-        FwkInfo("do while end in doeventoperations");
-      } while ((now < endTime) && !isDone);
-
-      FwkInfo("Event loop complete.");
-      FwkInfo("doEventOperations() performed " + counter + " operations.");
-    }
-
-    public void doIterate()
-    {
-      FwkInfo("doIterate()");
-      uint ulKeysInRegion = 0;
-      uint ulNoneNullValuesInRegion = 0;
-      string sError = null;
-
-      Region[] rootRegionArray;
-      Region rootRegion;
-      RegionAttributes attr;
-
-      rootRegionArray = CacheHelper<TKey, TVal>.DCache.RootRegions();
-
-      int ulRegionCount = rootRegionArray.Length;
-
-      for (int ulIndex = 0; ulIndex < ulRegionCount; ulIndex++)
-      {
-        rootRegion = rootRegionArray[ulIndex];
-        attr = rootRegion.Attributes;
-
-        bool bHasInvalidateAction = attr.EntryIdleTimeoutAction == ExpirationAction.Invalidate ||
-          (attr.EntryTimeToLiveAction == ExpirationAction.Invalidate);
-
-        iterateRegion(rootRegion, true, bHasInvalidateAction, ulKeysInRegion, ulNoneNullValuesInRegion, sError);
-
-        if (sError.Length > 0)
-        {
-          FwkException(sError);
-        }
-      }
-    }
-
-    public void doMemoryMeasurement()
-    {
-      // TODO Later
-
-    }
-
-    public void verifyKeyCount()
-    {
-      int percentDiff = percentDifferent();
-      if (percentDiff > 10)
-      {
-        FwkSevere("Actual number of keys does not match expected number.");
-      }
-    }
-
-    public void addEntry()
-    {
-      string testRegionName = GetStringValue("regionName");
-      if (testRegionName.Length == 0)
-      {
-        FwkException("Data not provided for 'regionName', failing.");
-      }
-      Region region = CacheHelper<TKey, TVal>.DCache.GetRegion(testRegionName);
-
-      int usePid = GetUIntValue("usePID");
-      int pid = Util.PID;
-
-      int opsSecond = GetUIntValue("opsSecond");
-      if (opsSecond < 0)
-      {
-        opsSecond = 0; // No throttle
-      }
-      PaceMeter pm = new PaceMeter(opsSecond);
-
-      int entryCount = GetUIntValue("EntryCount");
-      if (entryCount <= 0)
-      {
-        entryCount = 100;
-      }
-      FwkInfo("addEntry: Adding " + entryCount + " entries to the cache.");
-
-      for (Int32 count = 0; count < entryCount; count++)
-      {
-        string sKey;
-        Serializable sValue;
-
-        if (usePid == 1)
-        {
-          sKey = pid.ToString();
-        }
-        else
-        {
-          sKey = string.Empty;
-        }
-
-        sKey += count.ToString();
-        // get value size
-        int vsize = GetUIntValue("valueSizes");
-        if (vsize < 0)
-        {
-          vsize = 1000;
-        }
-
-        byte[] buffer = new byte[vsize];
-        Util.RandBytes(buffer);
-        sValue = CacheableBytes.Create(buffer);
-
-        // TODO: check
-        CacheableKey key = new CacheableString(sKey);
-        Serializable value = sValue;
-
-        if (key == null)
-        {
-          FwkSevere("EventTest::addObject null keyPtr generated.");
-        }
-
-        FwkInfo("created entry with key: " + key.ToString());
-        region.Put(key as CacheableKey, value);
-        Util.BBIncrement(EventCountersBB, "CREATE_COUNT");
-        pm.CheckPace();
-      }
-      FwkInfo("addEntry: Complete.");
-    }
-
-    public void addOrDestroyEntry()
-    {
-      string testRegionName = GetStringValue("regionName");
-      if (testRegionName.Length == 0)
-      {
-        FwkException("Data not provided for 'regionName', failing.");
-      }
-      Region region = CacheHelper<TKey, TVal>.DCache.GetRegion(testRegionName);
-
-      int usePid = GetUIntValue("usePID");
-      int pid = Util.PID;
-
-      int entryCount = GetUIntValue("EntryCount");
-      if (entryCount <= 0)
-      {
-        entryCount = 100;
-      }
-      FwkInfo("addOrDestroyEntry: Adding or Destroying ( if present )" + entryCount + " entries to the cache.");
-      for (int count = 0; count < entryCount; count++)
-      {
-        string sKey;
-
-        if (usePid == 1)
-        {
-          sKey = pid.ToString();
-        }
-        else
-        {
-          sKey = string.Empty;
-        }
-
-        sKey += count.ToString();
-        // get value size
-        int vsize = GetUIntValue("valueSizes");
-        if (vsize < 0)
-        {
-          vsize = 1000;
-        }
-        byte[] buffer = new byte[vsize];
-        Util.RandBytes(buffer);
-        CacheableKey key = new CacheableString(sKey);
-        CacheableBytes value = CacheableBytes.Create(buffer);
-
-        if (key == null)
-        {
-          FwkSevere("EventTest::addObject null keyPtr generated.");
-        }
-
-        string op = GetStringValue("popOp");
-        if (op == "put")
-        {
-          region.Put(key as CacheableKey, value);
-        }
-        else
-        {
-          region.Destroy(key as CacheableKey);
-        }
-
-        Util.BBIncrement(EventCountersBB, "CREATE_COUNT");
-      }
-      FwkInfo("addOrDestroyEntry: Complete.");
-    }
-
-    public void validateCacheContent()
-    {
-      FwkInfo("validateCacheContent()");
-      string testRegionName = GetStringValue("testRegion");
-      string validateRegionName = GetStringValue("validateRegion");
-      Region testRegion = CacheHelper<TKey, TVal>.DCache.GetRegion(testRegionName);
-      Region validateRegion = CacheHelper<TKey, TVal>.DCache.GetRegion(validateRegionName);
-      ICacheableKey[] keyVector;
-
-      keyVector = testRegion.GetKeys();
-      int ulKeysInRegion = keyVector.Length;
-      if (ulKeysInRegion == 0)
-      {
-        FwkSevere("zero keys in testRegion " + testRegion.Name);
-      }
-
-      ICacheableKey key;
-      ISerializable value;
-
-      int entryPassCnt = 0;
-      int entryFailCnt = 0;
-
-      for (int ulIndex = 0; ulIndex < ulKeysInRegion; ulIndex++)
-      {
-        key = keyVector[ulIndex];
-        value = testRegion.Get(key);
-
-        if (TestEntryPropagation(validateRegion, key as CacheableString, value as CacheableBytes))
-        {
-          entryFailCnt++;
-        }
-        else
-        {
-          entryPassCnt++;
-        }
-      }
-      FwkInfo("entryFailCnt is " + entryFailCnt + " entryPassCnt is " + entryPassCnt);
-      if (entryFailCnt == 0)
-      {
-        FwkInfo("validateCacheContent() - TEST ENDED, RESULT = SUCCESSFUL ");
-      }
-      else
-      {
-        FwkSevere("validateCacheContent() - TEST ENDED, RESULT = FAILED ");
-      }
-    }
-
-    public void validateRegionContent()
-    {
-      FwkInfo("validateRegionContent()");
-      string testRegionName = GetStringValue("testRegion");
-      string validateRegionName = GetStringValue("validateRegion");
-      string regionName = GetStringValue("regionName");
-      Region testRegion = CacheHelper<TKey, TVal>.DCache.GetRegion(testRegionName);
-      Region validateRegion = CacheHelper<TKey, TVal>.DCache.GetRegion(validateRegionName);
-
-      FwkInfo("localDestroyRegion region name is " + testRegion.Name);
-      // destroy the region
-      int iBeforeCounter = (int)Util.BBGet(EventCountersBB,
-        "numAfterRegionDestroyEvents_isNotExp");
-
-      testRegion.LocalDestroyRegion();
-      CreateRootRegion();
-      Region region = CacheHelper<TKey, TVal>.DCache.GetRegion(regionName);
-
-      FwkInfo(" Recreated Region name is " + region.Name);
-
-      ICacheableKey[] keyVector;
-      ICacheableKey[] keyVectorValidateRegion;
-
-      keyVector = region.GetKeys();
-      keyVectorValidateRegion = validateRegion.GetKeys();
-      int ulKeysInRegion = keyVector.Length;
-      int ulKeysInValidateRegion = keyVectorValidateRegion.Length;
-      if (ulKeysInRegion != ulKeysInValidateRegion)
-      {
-        FwkSevere("Region Key count is not equal, Region " + region.Name + " key count is " + ulKeysInRegion + " and Region " +
-           validateRegion.Name + " key count is " + ulKeysInValidateRegion);
-      }
-
-      ICacheableKey key;
-      ISerializable value;
-
-      int entryPassCnt = 0;
-      int entryFailCnt = 0;
-      for (int ulIndex = 0; ulIndex < ulKeysInRegion; ulIndex++)
-      {
-        key = keyVector[ulIndex];
-        value = region.Get(key);
-
-        if (TestEntryPropagation(validateRegion, key as CacheableString, value as CacheableBytes))
-        {
-          entryFailCnt++;
-        }
-        else
-        {
-          entryPassCnt++;
-        }
-      }
-      FwkInfo("entryFailCnt is " + entryFailCnt + " entryPassCnt is " + entryPassCnt);
-      if (entryFailCnt == 0)
-      {
-        FwkInfo("validateRegionContent() - TEST ENDED, RESULT = SUCCESSFUL ");
-      }
-      else
-      {
-        FwkSevere("validateRegionContent() - TEST ENDED, RESULT = FAILED ");
-      }
-    }
-
-    public void doCreateObject()
-    {
-      // Not implemented.
-    }
-
-    public void doIterateOnEntry()
-    {
-      FwkInfo("doIterateOnEntry()");
-      string testRegionName = GetStringValue("testRegion");
-      string validateRegionName = GetStringValue("validateRegion");
-      Region testRegion = CacheHelper<TKey, TVal>.DCache.GetRegion(testRegionName);
-      Region validateRegion = CacheHelper<TKey, TVal>.DCache.GetRegion(validateRegionName);
-
-      ICacheableKey[] keyVector = null;
-      int keysInRegion = 1;
-      int lastCount = 0;
-      int tryCount = 30;
-      int tries = 0;
-
-      while ((keysInRegion != lastCount) && (tries++ < tryCount))
-      {
-        Thread.Sleep(10000); // sleep for 10 seconds.
-        lastCount = keysInRegion;
-        keyVector = testRegion.GetKeys();
-        keysInRegion = keyVector.Length;
-      }
-
-      if ((keysInRegion == 0) || (tries >= tryCount))
-      {
-        FwkException("After " + tries + " tries, counted " + keysInRegion + " keys in the region.");
-      }
-
-      FwkInfo("After " + tries + " tries, counted " + keysInRegion + " keys in the region.");
-
-      CacheableKey key;
-      Serializable value;
-
-      for (int index = 0; index < keysInRegion; index++)
-      {
-        key = keyVector[index] as CacheableKey;
-        value = testRegion.Get(key) as Serializable;
-        validateRegion.Create(key, value);
-      }
-    }
-
-    public void feedEntries()
-    {
-      string testRegionName = GetStringValue("regionName");
-      if (testRegionName.Length == 0)
-      {
-        FwkException("Data not provided for 'regionName', failing.");
-      }
-      Region region = CacheHelper<TKey, TVal>.DCache.GetRegion(testRegionName);
-
-      int opsSecond = GetUIntValue("opsSecond");
-      if (opsSecond < 0)
-      {
-        opsSecond = 0; // No throttle
-      }
-      PaceMeter pm = new PaceMeter(opsSecond);
-
-      int secondsToRun = GetUIntValue("workTime");
-      secondsToRun = (secondsToRun < 1) ? 100 : secondsToRun;
-      FwkInfo("feedEntries: Will add entries for " + secondsToRun + " seconds.");
-      DateTime end = DateTime.Now + TimeSpan.FromSeconds((double)secondsToRun);
-      DateTime now = DateTime.Now;
-
-      int count = 0;
-      while (now < end)
-      {
-        string key = (++count).ToString();
-
-        // get value size
-        int vsize = GetUIntValue("valueSizes");
-        if (vsize < 0)
-        {
-          vsize = 1000;
-        }
-        byte[] buffer = new byte[vsize];
-        Util.RandBytes(buffer);
-
-        CacheableKey skey = new CacheableString(key);
-        Serializable value = CacheableBytes.Create(buffer);
-
-        if (key == null)
-        {
-          FwkSevere("EventTest::feedEntries null keyPtr generated.");
-          now = end;
-        }
-
-        region.Put(skey, value);
-        Util.BBIncrement(EventCountersBB, "CREATE_COUNT");
-        pm.CheckPace();
-        now = DateTime.Now;
-      }
-    }
-
-
-    public void doBasicTest()
-    {
-      Region region = GetRandomRegion(true);
-      int numKeys = GetUIntValue("distinctKeys");
-      numKeys = numKeys > 0 ? numKeys : 1000;
-      CacheableKey[] keys = new CacheableKey[numKeys];
-      Serializable[] values = new Serializable[numKeys];
-
-      for (int i = 0; i < numKeys; ++i)
-      {
-        int ksize = GetUIntValue("valueSizes");
-        ksize = ksize > 0 ? ksize : 12;
-        int vsize = GetUIntValue("valueSizes");
-        vsize = vsize > 0 ? vsize : 100;
-
-        string kStr = "key_";
-        byte[] buffer = new byte[vsize];
-        Util.RandBytes(buffer);
-        CacheableKey key = new CacheableString(kStr);
-        Serializable value = CacheableBytes.Create(buffer);
-        keys[i] = key;
-        values[i] = value;
-        region.Create(key, value);
-      }
-      ICacheableKey[] expectKeys = region.GetKeys();
-
-      if (expectKeys.Length != numKeys)
-      {
-        FwkSevere("Expect " + numKeys + " keys after create, got " + expectKeys.Length + " keys");
-      }
-
-      for (int i = 0; i < numKeys; ++i)
-      {
-        region.LocalInvalidate(keys[i]);
-      }
-
-      expectKeys = region.GetKeys();
-      if (expectKeys.Length != numKeys)
-      {
-        FwkSevere("Expect " + numKeys + " keys after localInvalidate, got " + expectKeys.Length + " keys");
-      }
-
-      for (int i = 0; i < numKeys; ++i)
-      {
-        ISerializable val = region.Get(keys[i]);
-
-        if (val.ToString() != values[i].ToString())
-        {
-          FwkSevere("Expect " + values[i].ToString() + ", got " + val.ToString());
-        }
-      }
-
-      expectKeys = region.GetKeys();
-
-      if (expectKeys.Length != numKeys)
-      {
-        FwkSevere("Expect " + numKeys + " keys after first get, got " + expectKeys.Length + " keys");
-      }
-
-      for (int i = 0; i < numKeys; ++i)
-      {
-        region.LocalDestroy(keys[i]);
-      }
-
-      expectKeys = region.GetKeys();
-      if ((expectKeys.Length) != 0)
-      {
-        FwkSevere("Expect 0 keys after localDestroy, got " + expectKeys.Length + " keys");
-      }
-
-      for (int i = 0; i < numKeys; ++i)
-      {
-        ISerializable val = region.Get(keys[i]);         // get
-
-        if (val.ToString() != values[i].ToString())
-        {
-          FwkSevere("Expect " + values[i].ToString() + ", got " + val.ToString());
-        }
-      }
-
-      expectKeys = region.GetKeys();
-      if (expectKeys.Length != numKeys)
-      {
-        FwkSevere("Expect " + numKeys + " keys after second get, got " + expectKeys.Length + " keys");
-      }
-
-      for (int i = 0; i < numKeys; ++i)
-      {
-        region.Invalidate(keys[i]);
-      }
-
-      expectKeys = region.GetKeys();
-      if (expectKeys.Length != numKeys)
-      {
-        FwkSevere("Expect " + numKeys + " keys after invalidate, got " + expectKeys.Length + " keys");
-      }
-
-      for (int i = 0; i < numKeys; ++i)
-      {
-        region.Get(keys[i]);
-      }
-
-      expectKeys = region.GetKeys();
-      if (expectKeys.Length != numKeys)
-      {
-        FwkSevere("Expect " + numKeys + " keys after invalidate all entries in server, got " + expectKeys.Length + " keys");
-      }
-
-      for (int i = 0; i < numKeys; ++i)
-      {
-        region.Put(keys[i], values[i]);
-      }
-
-      expectKeys = region.GetKeys();
-      if (expectKeys.Length != numKeys)
-      {
-        FwkSevere("Expect " + numKeys + " keys after put, got " + expectKeys.Length + " keys");
-      }
-
-      for (int i = 0; i < numKeys; ++i)
-      {
-        region.Destroy(keys[i]);
-      }
-
-      expectKeys = region.GetKeys();
-      if (expectKeys.Length != 0)
-      {
-        FwkSevere("Expect 0 keys after destroy, got " + expectKeys.Length + " keys");
-      }
-
-      int excepCount = 0;
-      for (int i = 0; i < numKeys; ++i)
-      {
-        try
-        {
-          region.Get(keys[i]);
-        }
-        catch (EntryNotFoundException e)
-        {
-          FwkInfo(e.Message);
-          ++excepCount;
-        }
-      }
-
-      expectKeys = region.GetKeys();
-      if (expectKeys.Length != 0)
-      {
-        FwkSevere("Expect 0 keys because all entries are destoyed in server, got " + expectKeys.Length + " keys");
-      }
-
-      if (excepCount != numKeys)
-      {
-        FwkSevere("Expect " + numKeys + " exceptions because all entries are destoyed in server, got " + excepCount + " exceptions");
-      }
-
-      for (int i = 0; i < numKeys; ++i)
-      {
-        region.Create(keys[i], values[i]);
-      }
-
-      expectKeys = region.GetKeys();
-      if (expectKeys.Length != numKeys)
-      {
-        FwkSevere("Expect " + numKeys + " keys after second create, got " + expectKeys.Length + " keys");
-      }
-
-      for (int i = 0; i < numKeys; ++i)
-      {
-        region.Get(keys[i]);
-      }
-
-      expectKeys = region.GetKeys();
-      if (expectKeys.Length != numKeys)
-      {
-        FwkSevere("Expect " + numKeys + " keys after invalidate all entries in server, got " + expectKeys.Length + " keys");
-      }
-    }
-
-
-    public void doTwinkleRegion()
-    {
-      int secondsToRun = GetUIntValue("workTime");
-      secondsToRun = (secondsToRun < 1) ? 10 : secondsToRun;
-      FwkInfo("Seconds to run: " + secondsToRun);
-
-      int end = DateTime.Now.Second + secondsToRun;
-      bool done = false;
-      bool regionDestroyed = false;
-      int errCnt = 0;
-
-      while (!done)
-      {
-        int sleepTime = GetUIntValue("sleepTime");
-        sleepTime = ((sleepTime < 1) || regionDestroyed) ? 10 : sleepTime;
-        FwkInfo("sleepTime is " + sleepTime + " seconds.");
-
-        DateTime now = DateTime.Now;
-        // TODO: 10 magic number to avoid compilation
-        if ((now.Second > end) || ((now.Second + 10) > end))
-        {
-          // TODO : Check DateTime usage in the entire file.
-          // FWKINFO( "Exiting loop, time is up." );
-          done = true;
-          continue;
-        }
-
-        FwkInfo("EventTest::doTwinkleRegion() sleeping for " + sleepTime + " seconds.");
-        Thread.Sleep(sleepTime * 1000);
-
-        if (regionDestroyed)
-        {
-          FwkInfo("EventTest::doTwinkleRegion() will create a region.");
-          CreateRootRegion();
-          regionDestroyed = false;
-          FwkInfo("EventTest::doTwinkleRegion() region created.");
-          int percentDiff = percentDifferent();
-          if (percentDiff > 10)
-          {
-            errCnt++;
-            FwkSevere("Actual number of keys is not within 10% of expected.");
-          }
-        }
-        else
-        {
-          FwkInfo("EventTest::doTwinkleRegion() will destroy a region.");
-          Region region = GetRandomRegion(true);
-          if (region != null)
-          {
-            region.LocalDestroyRegion();
-            region = null;
-          }
-          regionDestroyed = true;
-          FwkInfo("EventTest::doTwinkleRegion() local region destroy is complete.");
-        }
-      } // while
-
-      if (regionDestroyed)
-      {
-        CreateRootRegion();
-        FwkInfo("EventTest::doTwinkleRegion() region created.");
-      }
-
-      FwkInfo("EventTest::doTwinkleRegion() completed.");
-      if (errCnt > 0)
-      {
-        FwkException("Region key count was out of bounds on " + errCnt + " region creates.");
-      }
-    }
-
-    // TODO Entire method check.
-    public void checkTest(string taskId)
-    {
-      // TODO: For lock
-      // SpinLockGuard guard( m_lck );
-      // TODO: setTask(taskId)
-      if (CacheHelper<TKey, TVal>.DCache == null)
-      {
-        Properties pp = new Properties();
-        //TODO: Initialize? cacheInitialize( pp );
-        //string val = getStringValue( "EventBB" );
-        //if ( !val.empty() )
-        //{
-        //  m_sEventBB = val;
-        //}
-
-      }
-    }
-
-    public void createRootRegion(string regionName)
-    {
-      FwkInfo("In createRootRegion region");
-      Region rootRegion;
-
-      if (regionName == null)
-      {
-        rootRegion = CreateRootRegion();
-      }
-      else
-      {
-        rootRegion = CacheHelper.CreateRegion(regionName, null);
-      }
-
-      Util.BBIncrement(EventCountersBB, rootRegion.FullPath);
-      Util.BBIncrement(EventCountersBB, "ROOT_REGION_COUNT");
-
-      FwkInfo("In createRootRegion, Created root region: " + rootRegion.FullPath);
-    }
-
-    public bool TestEntryPropagation(Region region, CacheableString szKey, CacheableBytes szValue)
-    {
-      bool bEntryError = false;
-      bool bContainsKey = false;
-      bool bContainsValue = false;
-
-      bContainsKey = region.ContainsKey(szKey);
-      bContainsValue = region.ContainsValueForKey(szKey);
-
-      if (!bContainsKey || !bContainsValue)
-      {
-        FwkSevere("Key: " + szKey.Value + " not found in region " +
-          region.FullPath + ", mirroring is enabled");
-        bEntryError = true;
-      }
-      return bEntryError;
-    }
-
-    public void addObject(Region region, bool bLogAddition, string pszKey, string pszValue)
-    {
-      CacheableKey key;
-      if (pszKey == null)
-      {
-        key = findKeyNotInCache(region);
-      }
-      else
-      {
-        key = new CacheableString(pszKey);
-      }
-
-      if (key == null)
-      {
-        FwkInfo("EventTest::addObject null key generated for " + pszKey);
-        return;
-      }
-
-      Serializable value;
-
-      if (pszValue == null)
-      {
-        int vsize = GetUIntValue("valueSizes");
-        if (vsize < 0)
-        {
-          vsize = 1000;
-        }
-        byte[] buffer = new byte[vsize];
-        Util.RandBytes(buffer);
-        value = CacheableBytes.Create(buffer);
-      }
-      else
-      {
-        value = new CacheableString(pszValue);
-      }
-
-      if (value == null)
-      {
-        FwkInfo("EventTest::addObject null valuePtr generated.");
-        return;
-      }
-
-      region.Create(key, value);
-      Util.BBIncrement(EventCountersBB, "CREATE_COUNT");
-    }
-
-    public void invalidateObject(Region randomRegion, bool bIsLocalInvalidate)
-    {
-      CacheableKey keyP = getKey(randomRegion, false);
-      if (keyP == null)
-      {
-        Util.BBIncrement(EventCountersBB, "OPS_SKIPPED_COUNT");
-        return;
-      }
-
-      if (bIsLocalInvalidate)
-      {
-        randomRegion.LocalInvalidate(keyP);
-        Util.BBIncrement(EventCountersBB, "LOCAL_INVALIDATE_COUNT");
-      }
-      else
-      {
-        randomRegion.Invalidate(keyP);
-        Util.BBIncrement(EventCountersBB, "INVALIDATE_COUNT");
-      }
-    }
-
-    public void destroyObject(Region randomRegion, bool bIsLocalDestroy)
-    {
-      FwkInfo("EventTest::destroyObject");
-
-      CacheableKey keyP = getKey(randomRegion, true);
-
-      if (keyP == null)
-      {
-        Util.BBIncrement(EventCountersBB, "OPS_SKIPPED_COUNT");
-        return;
-      }
-
-      if (bIsLocalDestroy)
-      {
-        randomRegion.LocalDestroy(keyP);
-        Util.BBIncrement(EventCountersBB, "LOCAL_DESTROY_COUNT");
-      }
-      else
-      {
-        randomRegion.Destroy(keyP);
-        Util.BBIncrement(EventCountersBB, "DESTROY_COUNT");
-      }
-    }
-
-    public void updateObject(Region randomRegion)
-    {
-      CacheableKey keyP = getKey(randomRegion, true);
-      if (keyP == null)
-      {
-        FwkInfo("EventTest::updateObject key is null");
-        Util.BBIncrement(EventCountersBB, "OPS_SKIPPED_COUNT");
-        return;
-      }
-
-      ISerializable anObj = randomRegion.Get(keyP);
-
-      int vsize = GetUIntValue("valueSizes");
-      if (vsize < 0)
-      {
-        vsize = 1000;
-      }
-
-      byte[] buffer = new byte[vsize];
-      Util.RandBytes(buffer);
-
-      CacheableBytes newObj = CacheableBytes.Create(buffer);
-
-      randomRegion.Put(keyP, newObj);
-    }
-
-    public void readObject(Region randomRegion)
-    {
-      FwkInfo("Inside readObject randomregion = {0}", randomRegion.FullPath);
-      CacheableKey keyP = getKey(randomRegion, true);
-
-      FwkInfo("After getkey");
-      if (keyP == null)
-      {
-        Util.BBIncrement(EventCountersBB, "OPS_SKIPPED_COUNT");
-        FwkInfo("skipped and returned");
-        return;
-      }
-      FwkInfo("skipped and returned before Get");
-      CacheableBytes anObj = randomRegion.Get(keyP) as CacheableBytes;
-      FwkInfo("got anobj");
-      //byte[] b = anObj.Value;
-      //FwkInfo("byte array = " + b.ToString());
-    }
-
-    public void addRegion()
-    {
-      Region parentRegion = null;
-      string sRegionName = getNextRegionName(parentRegion);
-      if (sRegionName.Length == 0)
-      {
-        // nothing to do
-        return;
-      }
-
-      Region region;
-      FwkInfo("In addRegion, enter create region " + sRegionName);
-      if (parentRegion == null)
-      {
-        // TODO Is this right.
-        region = CacheHelper.CreateRegion(sRegionName, null);
-      }
-      else
-      {
-
-        string fullName = parentRegion.FullPath;
-        var regionAttributes = parentRegion.Attributes;
-        var regionAttributesFactory = new AttributesFactory(regionAttributes);
-        regionAttributes = regionAttributesFactory.Create();
-        region = parentRegion.CreateSubRegion(sRegionName, regionAttributes);
-        Util.BBSet(EventCountersBB, sRegionName, fullName);
-      }
-
-      int iInitRegionNumObjects = GetUIntValue("initRegionNumObjects");
-      // Create objects in the new region
-      for (int iIndex = 0; iIndex < iInitRegionNumObjects; iIndex++)
-      {
-        string skey = iIndex.ToString();
-        addObject(region, true, skey, null);
-      }
-      FwkInfo("In addRegion, exit create region " + sRegionName);
-    }
-    public void clearRegion(Region randomRegion, bool bIsLocalClear)
-    {
-      int iSubRegionCount = 0;
-      // invalidate the region
-      iSubRegionCount = getSubRegionCount(randomRegion) + 1;
-
-      //bbGet("EventCountersBB", // TODO
-      //  "numAfterRegionInvalidateEvents_isNotExp", &iBeforeCounter);
-      FwkInfo("In clearRegion, enter clear region " + randomRegion.Name);
-
-      string pszCounterName = "LOCAL_REGION_CLEAR_COUNT";
-      if (bIsLocalClear)
-      {
-        randomRegion.LocalClear();
-      }
-      else
-      {
-        pszCounterName = "REGION_CLEAR_COUNT";
-        randomRegion.Clear();
-      }
-      Util.BBAdd(EventCountersBB, pszCounterName, iSubRegionCount);
-      FwkInfo("In clearRegion, exit invalidate region " + randomRegion.Name);
-    }
-
-    public void invalidateRegion(Region randomRegion, bool bIsLocalInvalidate)
-    {
-      int iSubRegionCount = 0;
-      // invalidate the region
-      iSubRegionCount = getSubRegionCount(randomRegion) + 1;
-
-      //bbGet("EventCountersBB", // TODO
-      //  "numAfterRegionInvalidateEvents_isNotExp", &iBeforeCounter);
-      FwkInfo("In invalidateRegion, enter invalidate region " + randomRegion.Name);
-
-      string pszCounterName = "LOCAL_REGION_INVALIDATE_COUNT";
-      if (bIsLocalInvalidate)
-      {
-        randomRegion.LocalInvalidateRegion();
-      }
-      else
-      {
-        pszCounterName = "REGION_INVALIDATE_COUNT";
-        randomRegion.InvalidateRegion();
-      }
-      Util.BBAdd(EventCountersBB, pszCounterName, iSubRegionCount);
-      FwkInfo("In invalidateRegion, exit invalidate region " + randomRegion.Name);
-    }
-
-    public void destroyRegion(Region randomRegion, bool bIsLocalDestroy)
-    {
-      int iSubRegionCount = 0;
-      // destroy the region
-      //int iBeforeCounter = -1;
-      //bbGet( "EventCountersBB", "numAfterRegionDestroyEvents_isNotExp", &iBeforeCounter );//TODO
-
-      iSubRegionCount = getSubRegionCount(randomRegion) + 1;
-      string pszCounterName = "LOCAL_REGION_DESTROY_COUNT";
-      FwkInfo("In destroyRegion, enter destroy region " + randomRegion.Name);
-      if (bIsLocalDestroy)
-      {
-        randomRegion.LocalDestroyRegion();
-      }
-      else
-      {
-        pszCounterName = "REGION_DESTROY_COUNT";
-        randomRegion.DestroyRegion();
-      }
-      Util.BBIncrement(EventCountersBB, pszCounterName);
-      FwkInfo("In destroyRegion, exit destroy region " + randomRegion.Name);
-    }
-
-    public Region GetRandomRegion(bool bAllowRootRegion)
-    {
-      FwkInfo("Inside GetRandomRegion ... Check 1");
-      Region[] rootRegionVector = CacheHelper<TKey, TVal>.DCache.RootRegions();
-      int irootSize = rootRegionVector.Length;
-
-      Region[] subRegionVector;
-      FwkInfo("Inside GetRandomRegion ... Check 2");
-      int iRootSize = rootRegionVector.Length;
-
-      if (iRootSize == 0)
-      {
-        // TODO
-        return null;
-        //return RegionPtr();
-      }
-      FwkInfo("Inside GetRandomRegion ... Check 3 and irrotsize = {0}", irootSize);
-      Region[] choseRegionVector = new Region[1];
-
-      // if roots can be chosen, add them to candidates
-      if (bAllowRootRegion)
-      {
-        for (int iRootIndex = 0; iRootIndex < iRootSize; iRootIndex++)
-        {
-          FwkInfo("Inside GetRandomRegion ... Check 4.{0}", iRootIndex);
-          choseRegionVector[iRootIndex] = rootRegionVector[iRootIndex];
-        }
-      }
-
-      FwkInfo("Inside GetRandomRegion ... Check 4");
-      // add all subregions
-      for (int iRootIndex = 0; iRootIndex < iRootSize; iRootIndex++)
-      {
-        subRegionVector = rootRegionVector[iRootIndex].SubRegions(true);
-        int iSubSize = subRegionVector.Length;
-        for (int iSubIndex = 0; iSubIndex < iSubSize; iSubIndex++)
-        {
-          choseRegionVector[choseRegionVector.Length] = subRegionVector[iSubIndex];
-          //choseRegionVector.push_back(subRegionVector.at(iSubIndex));
-        }
-      }
-
-      FwkInfo("Inside GetRandomRegion ... Check 5");
-      int iChoseRegionSize = choseRegionVector.Length;
-      if (iChoseRegionSize == 0)
-      {
-        // TODO
-        return null;
-        //return RegionPtr();
-      }
-
-      FwkInfo("Inside GetRandomRegion ... Check 6");
-      int idx = Util.Rand(iChoseRegionSize);
-      //string regionName = choseRegionVector.at(idx)->getFullPath();
-      FwkInfo("Inside GetRandomRegion ... Check 7");
-      return choseRegionVector[idx];
-    }
-
-
-    public void handleExpectedException(Exception e)
-    {
-      FwkInfo("Caught and ignored: " + e.Message);
-    }
-
-    public void verifyObjectInvalidated(Region region, CacheableKey key)
-    {
-      if ((region == null) && (key == null))
-      {
-        return;
-      }
-      string error = null;
-
-      if (!region.ContainsKey(key))
-      {
-        error = "unexpected contains key";
-      }
-
-      if (region.ContainsValueForKey(key))
-      {
-        error = "Unexpected containsValueForKey ";
-      }
-
-      RegionEntry entry = region.GetEntry(key);
-
-      if (entry == null)
-      {
-        error = "getEntry returned null";
-      }
-      else
-      {
-        if (entry.Key != key)
-        {
-          error = "Keys are different";
-        }
-
-        if (entry.Value != null)
-        {
-          error = "Expected value to be null";
-        }
-      }
-
-      if (error.Length != 0)
-      {
-        FwkException(error);
-      }
-    }
-
-    public void verifyObjectDestroyed(Region region, CacheableKey key)
-    {
-      if ((region == null) && (key == null))
-      {
-        return;
-      }
-
-      string osError;
-      bool bContainsKey = region.ContainsKey(key);
-      if (bContainsKey)
-      {
-        // TODO key.ToString()
-        osError = "Unexpected containsKey " + bContainsKey +
-        " for key " + key.ToString() + " in region " + region.FullPath +
-        Environment.NewLine;
-      }
-
-      bool bContainsValueForKey = region.ContainsValueForKey(key);
-      if (bContainsValueForKey)
-      {
-        osError = "Unexpected containsValueForKey " + bContainsValueForKey +
-          " for key " + key.ToString() + " in region " + region.FullPath +
-          Environment.NewLine;
-      }
-
-      RegionEntry entry = region.GetEntry(key);
-      // TODO ... see this section
-      //if (entry != null)
-      //{
-      //  CacheableString entryKey = key.;
-      //  CacheableBytes entryValuePtr = entryPtr->getValue();
-
-      //  osError << "getEntry for key " << CacheableStringPtr( keyPtr )->asChar() <<
-      //" in region " << regionPtr->getFullPath() <<
-      //" returned was non-null; getKey is " << entryKeyPtr->asChar() <<
-      //", value is " << entryValuePtr->bytes() << "\n";
-      //}
-
-      //if (sError.size() > 0)
-      //{
-      //  FWKEXCEPTION(sError);
-      //}
-    }
-
-
-    public void iterateRegion(Region aRegion, bool bAllowZeroKeys, bool bAllowZeroNonNullValues,
-      uint ulKeysInRegion, uint ulNoneNullValuesInRegion,
-      string sError)
-    {
-      if (aRegion == null)
-      {
-        return;
-      }
-
-      ulKeysInRegion = 0;
-      ulNoneNullValuesInRegion = 0;
-
-      ICacheableKey[] keyVector = aRegion.GetKeys();
-
-      ulKeysInRegion = (uint)keyVector.Length;
-      if (ulKeysInRegion == 0)
-      {
-        if (!bAllowZeroKeys)
-        {
-          sError = "Region " + aRegion.FullPath + " has " +
-            ulKeysInRegion + " keys" + Environment.NewLine;
-        }
-      }
-
-      CacheableKey key = null;
-      ISerializable value = null;
-
-      for (uint ulIndex = 0; ulIndex < ulKeysInRegion; ulIndex++)
-      {
-        key = keyVector[ulIndex] as CacheableKey;
-
-        try
-        {
-          value = aRegion.Get(key);
-        }
-        catch (CacheLoaderException e)
-        {
-          FwkException("CacheLoaderException " + e.Message);
-        }
-        catch (TimeoutException e)
-        {
-          FwkException("TimeoutException " + e.Message);
-        }
-
-        if (value != null)
-        {
-          ulNoneNullValuesInRegion++;
-        }
-      }
-
-      if (ulNoneNullValuesInRegion == 0)
-      {
-        if (!bAllowZeroNonNullValues)
-        {
-          sError += "Region " + aRegion.FullPath + " has " +
-            ulNoneNullValuesInRegion + " non-null values" + Environment.NewLine;
-        }
-      }
-    }
-
-
-    public int getSubRegionCount(Region region)
-    {
-      Region[] subregions = region.SubRegions(true);
-      return subregions.Length;
-    }
-
-    public int getAllRegionCount()
-    {
-      if (CacheHelper<TKey, TVal>.DCache == null)
-      {
-        FwkSevere("Null cache pointer, no connection established.");
-        return 0;
-      }
-      Region[] rootRegions = CacheHelper<TKey, TVal>.DCache.RootRegions();
-      int iRootSize = rootRegions.Length;
-      int iTotalRegions = iRootSize;
-
-      for (int iIndex = 0; iIndex < iRootSize; iIndex++)
-      {
-        // TODO getSubRegionCount implementation
-        iTotalRegions += getSubRegionCount(rootRegions[iIndex]);
-      }
-      return iTotalRegions;
-    }
-
-    public CacheableKey getKey(Region region, bool bInvalidOK)
-    {
-      FwkInfo("random key check 1");
-      //int randomKey = int.Parse((string)Util.ReadObject("randomKey"));
-      int randomKey = GetUIntValue("randomKey");
-      CacheableKey keyP = null;
-      FwkInfo("random key check 2 ... randomkey = {0}", randomKey);
-      if (randomKey > 0)
-      {
-        string sKey = randomKey.ToString();
-        keyP = new CacheableString(sKey);
-        FwkInfo("random key check 2.1 .. keyP.tostring = {0}", keyP.ToString());
-        return keyP;
-      }
-      FwkInfo("random key check 3");
-
-      ICacheableKey[] keys = region.GetKeys();
-      int iKeySize = keys.Length;
-      if (iKeySize == 0)
-      {
-        return keyP;
-      }
-      FwkInfo("random key check 4");
-      int iStartAt = Util.Rand(iKeySize);
-      if (bInvalidOK)
-      {
-        return keys[iStartAt] as CacheableKey;
-      }
-      int iKeyIndex = iStartAt;
-      do
-      {
-        FwkInfo("random key check 5");
-        bool hasValue = region.ContainsValueForKey(keys[iKeyIndex]);
-        if (hasValue)
-        {
-          return keys[iKeyIndex] as CacheableKey;
-        }
-        iKeyIndex++;
-        if (iKeyIndex >= iKeySize)
-        {
-          iKeyIndex = 0;
-        }
-      } while (iKeyIndex != iStartAt);
-
-      FwkInfo("getKey: All values invalid in region");
-      return keyP;
-    }
-
-    public void setEventError(string pszMsg)
-    {
-      Util.BBSet(EventCountersBB, "EventErrorMessage", pszMsg);
-    }
-
-    public void removeRegion(Region region)
-    {
-      string name = region.FullPath;
-      FwkInfo("In removeRegion, local destroy on " + name);
-      region.LocalDestroyRegion();
-      Util.BBDecrement(EventCountersBB, name);
-    }
-
-    public Int32 getRegionCount()
-    {
-      FwkInfo("Check 1.1 Inside getRegionCount");
-      Region[] roots = CacheHelper<TKey, TVal>.DCache.RootRegions();
-      FwkInfo("Check 1.1 root region count = {0}", roots.Length);
-      return roots.Length;
-    }
-
-    #endregion
-
-    #region Callback create methods
-    public static ICacheWriter CreateETCacheWriter()
-    {
-      return new ETCacheWriter();
-    }
-    public static ICacheLoader CreateETCacheLoader()
-    {
-      return new ETCacheLoader();
-    }
-
-    public static ICacheListener CreateETCacheListener()
-    {
-      return new ETCacheListener();
-    }
-
-    #endregion
-  }
-}
diff --git a/tests/cli/NewFwkLib/FunctionExecution/FunctionExecution.cs b/tests/cli/NewFwkLib/FunctionExecution/FunctionExecution.cs
deleted file mode 100644
index 552637c..0000000
--- a/tests/cli/NewFwkLib/FunctionExecution/FunctionExecution.cs
+++ /dev/null
@@ -1,1375 +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.
- */
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using System.Threading;
-
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.DUnitFramework;
-  using Apache.Geode.Client;
-
-    //----------------------------------- DoOpsTask start ------------------------
-    public class DoFETask<TKey, TVal> : ClientTask
-    {
-        private IRegion<TKey, TVal> m_region;
-        private const int INVALIDATE = 1;
-        private const int LOCAL_INVALIDATE = 2;
-        private const int DESTROY = 3;
-        private const int LOCAL_DESTROY = 4;
-        private const int UPDATE_EXISTING_KEY = 5;
-        private const int GET = 6;
-        private const int ADD_NEW_KEY = 7;
-        private const int PUTALL_NEW_KEY = 8;
-        //private const int QUERY = 8;
-        private const int NUM_EXTRA_KEYS = 100;
-        private static bool m_istransaction = false;
-        private static string m_funcName;
-        CacheTransactionManager txManager = null;
-        private object CLASS_LOCK = new object();
-        private object SKIPS_LOCK = new object();
-        protected int[] operations = { INVALIDATE, LOCAL_INVALIDATE, DESTROY, LOCAL_DESTROY, UPDATE_EXISTING_KEY, GET, ADD_NEW_KEY, PUTALL_NEW_KEY };
-        public DoFETask(IRegion<TKey, TVal> region, bool istransaction)
-            : base()
-        {
-            m_region = region;
-            m_istransaction = istransaction;
-            m_funcName = FwkTest<TKey, TVal>.CurrentTest.GetStringValue("funcName");
-
-        }
-        public override void DoTask(int iters, object data)
-        {
-
-            Random random = new Random();
-            List<int> availableOps = new List<int>(operations);
-            lock (SKIPS_LOCK)
-            {
-                FwkTest<TKey, TVal>.CurrentTest.ResetKey("isSkipOps");
-                bool isSkipOps = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue("isSkipOps");
-                if (isSkipOps)
-                {
-                    availableOps.Remove(LOCAL_INVALIDATE);
-                    availableOps.Remove(LOCAL_DESTROY);
-                   
-                }
-            }
-            while (Running && (availableOps.Count != 0))
-            {
-                int opcode = -1;
-                lock (CLASS_LOCK)
-                {
-                    bool doneWithOps = false;
-                    int i = random.Next(0, availableOps.Count);
-                    try
-                    {
-                        opcode = availableOps[i];
-                        if (m_istransaction)
-                        {
-                            txManager = CacheHelper<TKey, TVal>.DCache.CacheTransactionManager;
-                            txManager.Begin();
-                        }
-                        switch (opcode)
-                        {
-                            case ADD_NEW_KEY:
-                                doneWithOps = addNewKeyFunction();
-                                break;
-                            /*case QUERY:
-                                doneWithOps = queryFunction();
-                                break;*/
-                            case PUTALL_NEW_KEY:
-                                doneWithOps = putAllNewKeyFunction();
-                                break;
-                            case INVALIDATE:
-                                doneWithOps = invalidateFunction();
-                                break;
-                            case DESTROY:
-                                doneWithOps = destroyFunction();
-                                break;
-                            case UPDATE_EXISTING_KEY:
-                                doneWithOps = updateExistingKeyFunction();
-                                break;
-                            case GET:
-                                doneWithOps = getFunction();
-                                break;
-                            case LOCAL_INVALIDATE:
-                                doneWithOps = localInvalidateFunction();
-                                break;
-                            case LOCAL_DESTROY:
-                                doneWithOps = localDestroyFunction();
-                                break;
-                            default:
-                                {
-                                    throw new Exception("Invalid operation specified:" + opcode);
-                                }
-                        }
-                        if (m_istransaction && (txManager != null) && (!doneWithOps))
-                        {
-                            try
-                            {
-                                txManager.Commit();
-                            }
-                            catch (CommitConflictException)
-                            {
-                                // can occur with concurrent execution
-                                Util.Log("Caught CommitConflictException. Expected with concurrent execution, continuing test.");
-                            }
-                            catch (TransactionDataNodeHasDepartedException e)
-                            {
-                                FwkTest<TKey, TVal>.CurrentTest.FwkException("Caught TransactionDataNodeHasDepartedException in doEntry : {0}", e);
-                            }
-                            catch (Exception ex)
-                            {
-                                FwkTest<TKey, TVal>.CurrentTest.FwkException("Caught unexpected in doEntry : {0}", ex);
-                            }
-                        }
-                    }
-                    catch (TimeoutException e)
-                    {
-                        FwkTest<TKey, TVal>.CurrentTest.FwkException("Caught unexpected timeout exception during entry operation: " + opcode + " " + e);
-                    }
-                    catch (IllegalStateException e)
-                    {
-                        FwkTest<TKey, TVal>.CurrentTest.FwkException("Caught IllegalStateException during entry operation:" + opcode + " " + e);
-                    }
-                    catch (Exception e)
-                    {
-                        FwkTest<TKey, TVal>.CurrentTest.FwkException("Caught exception during entry operation: " + opcode + "  exiting task.\n" + e);
-                    }
-                    if (doneWithOps)
-                    {
-                        if (m_istransaction && txManager != null)
-                        {
-                            try
-                            {
-                                txManager.Rollback();
-                            }
-                            catch (IllegalStateException e)
-                            {
-                                FwkTest<TKey, TVal>.CurrentTest.FwkException("Caught IllegalStateException during rollback: " + e);
-                            }
-                            catch (Exception e)
-                            {
-                                FwkTest<TKey, TVal>.CurrentTest.FwkException("Caught exception during entry operation: " + e + " exiting task.\n");
-                            }
-                        }
-                        availableOps.Remove(opcode);
-                    }
-                }
-            }
-        } //end doTask function
-       
-        private void checkContainsValueForKey(TKey key, bool expected, string logStr)
-        {
-            //RegionPtr regionPtr = getRegion();
-            bool containsValue = m_region.ContainsValueForKey(key);
-            if (containsValue != expected)
-                FwkTest<TKey, TVal>.CurrentTest.FwkException("DoOpsTask::checkContainsValueForKey: Expected containsValueForKey(" + key + ") to be " + expected +
-                         ", but it was " + containsValue + ": " + logStr);
-        }
-        
-        bool addNewKeyFunction()
-        {
-            int numNewKeysCreated = (int)Util.BBGet("ImageBB", "NUM_NEW_KEYS_CREATED");
-            Util.BBIncrement("ImageBB", "NUM_NEW_KEYS_CREATED");
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("NumNewKeys");
-            int numNewKeys = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("NumNewKeys");
-            if (numNewKeysCreated > numNewKeys)
-            {
-                FwkTest<TKey, TVal>.CurrentTest.FwkInfo("All new keys created; returning from addNewKey");
-                return true;
-            }
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("entryCount");
-            int entryCount = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("entryCount");
-            entryCount = (entryCount < 1) ? 10000 : entryCount;
-            TKey key = (TKey)(object)(entryCount + numNewKeysCreated);
-            checkContainsValueForKey(key, false, "before addNewKey");
-
-            Object[] filterObj = new Object[1];
-            filterObj[0] = (TKey)(object)key;
-            ArrayList args = new ArrayList();
-
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("isPdxObject");
-            bool pdxobject = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue("isPdxObject");
-            args.Add("addKey");
-            if (pdxobject)
-                args.Add(pdxobject);    
-            args.Add(filterObj[0]); 
-            Apache.Geode.Client.Execution<object> exc =
-                Client.FunctionService<object>.OnRegion<TKey, TVal>(m_region);
-            //FwkTest<TKey, TVal>.CurrentTest.FwkInfo("Going to do addKey execute");
-            ICollection<object> executeFunctionResult = null;
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("replicated");
-            bool isReplicate = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue("replicated");
-            if (!isReplicate){
-                executeFunctionResult = exc.WithArgs<ArrayList>(args).WithFilter<object>(filterObj).Execute(m_funcName).GetResult(); 
-            }else
-            {
-                executeFunctionResult = exc.WithArgs<ArrayList>(args).Execute(m_funcName).GetResult();      
-            }
-            verifyFEResult(executeFunctionResult, "addNewKeyFunction");
-            return (numNewKeysCreated >= numNewKeys);
-        }
-        bool putAllNewKeyFunction()
-        {
-            int numNewKeysCreated = (int)Util.BBGet("ImageBB", "NUM_NEW_KEYS_CREATED");
-            Util.BBIncrement("ImageBB", "NUM_NEW_KEYS_CREATED");
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("NumNewKeys");
-            int numNewKeys = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("NumNewKeys");
-            if (numNewKeysCreated > numNewKeys)
-            {
-                FwkTest<TKey, TVal>.CurrentTest.FwkInfo("All new keys created; returning from addNewKey");
-                return true;
-            }
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("entryCount");
-            int entryCount = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("entryCount");
-            entryCount = (entryCount < 1) ? 10000 : entryCount;
-            TKey key = (TKey)(object)(entryCount + numNewKeysCreated);
-            if(m_region.Attributes.CloningEnabled != false)
-              checkContainsValueForKey(key, false, "before addNewKey");
-            Object[] filterObj = new Object[1];
-            filterObj[0] = (TKey)(object)key;
-            ArrayList args = new ArrayList();
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("isPdxObject");
-            bool pdxobject = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue("isPdxObject");
-            args.Add("putAll");
-            if (pdxobject)
-                args.Add(pdxobject);
-            args.Add(filterObj[0]);
-            Apache.Geode.Client.Execution<object> exc =
-                Client.FunctionService<object>.OnRegion<TKey, TVal>(m_region);
-            //FwkTest<TKey, TVal>.CurrentTest.FwkInfo("Going to do addKey execute");
-            ICollection<object> executeFunctionResult = null;
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("replicated");
-            bool isReplicate = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue("replicated");
-            if (!isReplicate){
-                executeFunctionResult = exc.WithArgs<ArrayList>(args).WithFilter<object>(filterObj).Execute(m_funcName).GetResult(); 
-            }else
-            {
-                executeFunctionResult = exc.WithArgs<ArrayList>(args).Execute(m_funcName).GetResult();      
-            }
-            verifyFEResult(executeFunctionResult, "putAllNewKeyFunction");
-            return (numNewKeysCreated >= numNewKeys);
-        }
-        bool invalidateFunction()
-        {
-            int nextKey = (int)Util.BBGet("ImageBB", "LASTKEY_INVALIDATE");
-            Util.BBIncrement("ImageBB", "LASTKEY_INVALIDATE");
-            int firstKey = (int)Util.BBGet("ImageBB", "First_Invalidate");
-            int lastKey = (int)Util.BBGet("ImageBB", "Last_Invalidate");
-            if (!((nextKey >= firstKey) && (nextKey <= lastKey)))
-            {
-                FwkTest<TKey, TVal>.CurrentTest.FwkInfo("All existing keys invalidated; returning from invalidate");
-                return true;
-            }
-            TKey key = (TKey)(object)(nextKey);
-            Object[] filterObj = new Object[1];
-            filterObj[0] = (TKey)(object)key;
-            ArrayList args = new ArrayList();
-            bool pdxobject = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue("isPdxObject");
-            args.Add("invalidate");
-            if(pdxobject)
-                args.Add(pdxobject);      
-            args.Add(filterObj[0]); 
-            Apache.Geode.Client.Execution<object> exc =
-                Client.FunctionService<object>.OnRegion<TKey, TVal>(m_region);
-            //FwkTest<TKey, TVal>.CurrentTest.FwkInfo("Going to do invalidate execute");
-             ICollection<object> executeFunctionResult = null;
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("replicated");
-            bool isReplicate = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue("replicated");
-            if (!isReplicate){
-                executeFunctionResult = exc.WithArgs<ArrayList>(args).WithFilter<object>(filterObj).Execute(m_funcName).GetResult(); 
-            }else
-            {
-                executeFunctionResult = exc.WithArgs<ArrayList>(args).Execute(m_funcName).GetResult();      
-            }
-            verifyFEResult(executeFunctionResult, "invalidateFunction");
-            return (nextKey >= lastKey);
-        }
-        bool localInvalidateFunction()
-        {
-            int nextKey = (int)Util.BBGet("ImageBB", "LASTKEY_LOCAL_INVALIDATE");
-            Util.BBIncrement("ImageBB", "LASTKEY_LOCAL_INVALIDATE");
-            int firstKey = (int)Util.BBGet("ImageBB", "First_LocalInvalidate");
-            int lastKey = (int)Util.BBGet("ImageBB", "Last_LocalInvalidate");
-            if (!((nextKey >= firstKey) && (nextKey <= lastKey)))
-            {
-                FwkTest<TKey, TVal>.CurrentTest.FwkInfo("All local invalidates completed; returning from localInvalidate");
-                return true;
-            }
-            TKey key = (TKey)(object)(nextKey);
-            Object[] filterObj = new Object[1];
-            filterObj[0] = (TKey)(object)key;
-            ArrayList args = new ArrayList();
-            bool pdxobject = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue("isPdxObject");
-            args.Add("localinvalidate");
-            if (pdxobject)
-                args.Add(pdxobject);
-            args.Add(filterObj[0]); 
-            
-            Apache.Geode.Client.Execution<object> exc =
-                Client.FunctionService<object>.OnRegion<TKey, TVal>(m_region);
-            //FwkTest<TKey, TVal>.CurrentTest.FwkInfo("Going to do locally invalidate execute");
-             ICollection<object> executeFunctionResult = null;
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("replicated");
-            bool isReplicate = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue("replicated");
-            if (!isReplicate){
-                executeFunctionResult = exc.WithArgs<ArrayList>(args).WithFilter<object>(filterObj).Execute(m_funcName).GetResult(); 
-            }else
-            {
-                executeFunctionResult = exc.WithArgs<ArrayList>(args).Execute(m_funcName).GetResult();      
-            }
-            verifyFEResult(executeFunctionResult, "localInvalidateFunction");
-            return (nextKey >= lastKey);
-        }
-        bool destroyFunction()
-        {
-            int nextKey = (int)Util.BBGet("ImageBB", "LASTKEY_DESTROY");
-            Util.BBIncrement("ImageBB", "LASTKEY_DESTROY");
-            int firstKey = (int)Util.BBGet("ImageBB", "First_Destroy");
-            int lastKey = (int)Util.BBGet("ImageBB", "Last_Destroy");
-            if (!((nextKey >= firstKey) && (nextKey <= lastKey)))
-            {
-                FwkTest<TKey, TVal>.CurrentTest.FwkInfo("All destroys completed; returning from destroy");
-                return true;
-            }
-            TKey key = (TKey)(object)(nextKey);
-            Object[] filterObj = new Object[1];
-            filterObj[0] = (TKey)(object)key;
-            ArrayList args = new ArrayList();
-            bool pdxobject = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue("isPdxObject");
-            args.Add("destroy");
-            if (pdxobject)
-                args.Add(pdxobject);
-            args.Add(filterObj[0]); 
-           
-            Apache.Geode.Client.Execution<object> exc =
-                Client.FunctionService<object>.OnRegion<TKey, TVal>(m_region);
-            //FwkTest<TKey, TVal>.CurrentTest.FwkInfo("Going to do destroy execute");
-             ICollection<object> executeFunctionResult = null;
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("replicated");
-            bool isReplicate = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue("replicated");
-            if (!isReplicate){
-                executeFunctionResult = exc.WithArgs<ArrayList>(args).WithFilter<object>(filterObj).Execute(m_funcName).GetResult(); 
-            }else
-            {
-                executeFunctionResult = exc.WithArgs<ArrayList>(args).Execute(m_funcName).GetResult();      
-            }
-            verifyFEResult(executeFunctionResult, "destroyFunction");
-            return (nextKey >= lastKey);
-        }
-        bool localDestroyFunction()
-        {
-            int nextKey = (int)Util.BBGet("ImageBB", "LASTKEY_LOCAL_DESTROY");
-            Util.BBIncrement("ImageBB", "LASTKEY_LOCAL_DESTROY");
-            int firstKey = (int)Util.BBGet("ImageBB", "First_LocalDestroy");
-            int lastKey = (int)Util.BBGet("ImageBB", "Last_LocalDestroy");
-            if (!((nextKey >= firstKey) && (nextKey <= lastKey)))
-            {
-                FwkTest<TKey, TVal>.CurrentTest.FwkInfo("All local destroys completed; returning from localDestroy");
-                return true;
-            }
-            TKey key = (TKey)(object)(nextKey);
-            Object[] filterObj = new Object[1];
-            filterObj[0] = (TKey)(object)key;
-            ArrayList args = new ArrayList();
-            bool pdxobject = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue("isPdxObject");
-            args.Add("localdestroy");
-            if (pdxobject)
-                args.Add(pdxobject);
-            args.Add(filterObj[0]); 
-           
-            Apache.Geode.Client.Execution<object> exc =
-                Client.FunctionService<object>.OnRegion<TKey, TVal>(m_region);
-            //FwkTest<TKey, TVal>.CurrentTest.FwkInfo("Going to do local destroy execute");
-             ICollection<object> executeFunctionResult = null;
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("replicated");
-            bool isReplicate = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue("replicated");
-            if (!isReplicate){
-                executeFunctionResult = exc.WithArgs<ArrayList>(args).WithFilter<object>(filterObj).Execute(m_funcName).GetResult(); 
-            }else
-            {
-                executeFunctionResult = exc.WithArgs<ArrayList>(args).Execute(m_funcName).GetResult();      
-            }
-            verifyFEResult(executeFunctionResult, "localDestroyFunction");
-            return (nextKey >= lastKey);
-        }
-        bool updateExistingKeyFunction()
-        {
-            int nextKey = (int)Util.BBGet("ImageBB", "LASTKEY_UPDATE_EXISTING_KEY");
-            Util.BBIncrement("ImageBB", "LASTKEY_UPDATE_EXISTING_KEY");
-            int firstKey = (int)Util.BBGet("ImageBB", "First_UpdateExistingKey");
-            int lastKey = (int)Util.BBGet("ImageBB", "Last_UpdateExistingKey");
-            if (!((nextKey >= firstKey) && (nextKey <= lastKey)))
-            {
-                FwkTest<TKey, TVal>.CurrentTest.FwkInfo("All existing keys updated; returning from updateExistingKey");
-                return true;
-            }
-            TKey key = (TKey)(object)(nextKey);
-
-            Object[] filterObj = new Object[1];
-            filterObj[0] = (TKey)(object)key;
-            ArrayList args = new ArrayList();
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("isPdxObject");
-            bool pdxobject = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue("isPdxObject");
-            args.Add("update");
-            if (pdxobject)
-                args.Add(pdxobject);
-            args.Add(filterObj[0]); 
-            
-            Apache.Geode.Client.Execution<object> exc =
-                Client.FunctionService<object>.OnRegion<TKey, TVal>(m_region);
-            //FwkTest<TKey, TVal>.CurrentTest.FwkInfo("Going to do update execute");
-             ICollection<object> executeFunctionResult = null;
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("replicated");
-            bool isReplicate = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue("replicated");
-            if (!isReplicate){
-                executeFunctionResult = exc.WithArgs<ArrayList>(args).WithFilter<object>(filterObj).Execute(m_funcName).GetResult(); 
-            }else
-            {
-                executeFunctionResult = exc.WithArgs<ArrayList>(args).Execute(m_funcName).GetResult();      
-            }
-            verifyFEResult(executeFunctionResult, "updateExistingKeyFunction");
-            return (nextKey >= lastKey);
-        }
-        bool getFunction()
-        {
-            int nextKey = (int)Util.BBGet("ImageBB", "LASTKEY_GET");
-            Util.BBIncrement("ImageBB", "LASTKEY_GET");
-            int firstKey = (int)Util.BBGet("ImageBB", "First_Get");
-            int lastKey = (int)Util.BBGet("ImageBB", "Last_Get");
-            if (!((nextKey >= firstKey) && (nextKey <= lastKey)))
-            {
-                FwkTest<TKey, TVal>.CurrentTest.FwkInfo("All gets completed; returning from get");
-                return true;
-            }
-            TKey key = (TKey)(object)(nextKey);
-            Object[] filterObj = new Object[1];
-            filterObj[0] = (TKey)(object)key;
-            ArrayList args = new ArrayList();
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("isPdxObject");
-            bool pdxobject = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue("isPdxObject");
-            args.Add("get");
-            if (pdxobject)
-                args.Add(pdxobject);
-            args.Add(filterObj[0]); 
-            
-            Apache.Geode.Client.Execution<object> exc =
-                Client.FunctionService<object>.OnRegion<TKey, TVal>(m_region);
-            //FwkTest<TKey, TVal>.CurrentTest.FwkInfo("Going to do get execute");
-             ICollection<object> executeFunctionResult = null;
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("replicated");
-            bool isReplicate = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue("replicated");
-            if (!isReplicate){
-                executeFunctionResult = exc.WithArgs<ArrayList>(args).WithFilter<object>(filterObj).Execute(m_funcName).GetResult(); 
-            }else
-            {
-                executeFunctionResult = exc.WithArgs<ArrayList>(args).Execute(m_funcName).GetResult();      
-            }
-            verifyFEResult(executeFunctionResult, "getFunction");
-            return (nextKey >= lastKey);
-        }
-        bool queryFunction()
-        {
-            int numNewKeysCreated = (int)Util.BBGet("ImageBB", "NUM_NEW_KEYS_CREATED");
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("NumNewKeys");
-            int numThread = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("numThreads");
-            numNewKeysCreated = numNewKeysCreated - (numThread - 1);
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("NumNewKeys");
-            int numNewKeys = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("NumNewKeys");
-            if (numNewKeysCreated > numNewKeys)
-            {
-                FwkTest<TKey, TVal>.CurrentTest.FwkInfo("All query executed; returning from addNewKey");
-                return true;
-            }
-            int entryCount = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("entryCount");
-            entryCount = (entryCount < 1) ? 10000 : entryCount;
-            TKey key = (TKey)(object)(entryCount + numNewKeysCreated);
-            checkContainsValueForKey(key, false, "before addNewKey");
-            //TVal value = GetValue((TVal)(object)(entryCount + numNewKeysCreated));
-            //GetValue(value);
-            //m_region.Add(key, value);
-            Object[] filterObj = new Object[1];
-            filterObj[0] = (TKey)(object)key;
-            ArrayList args = new ArrayList();
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("isPdxObject");
-            bool pdxobject = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue("isPdxObject");
-            args.Add("query");
-            if (pdxobject)
-                args.Add(pdxobject);
-            args.Add(filterObj[0]); 
-            
-            Apache.Geode.Client.Execution<object> exc =
-                Client.FunctionService<object>.OnRegion<TKey, TVal>(m_region);
-            //FwkTest<TKey, TVal>.CurrentTest.FwkInfo("Going to do query execute");
-             ICollection<object> executeFunctionResult = null;
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("replicated");
-            bool isReplicate = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue("replicated");
-            if (!isReplicate){
-                executeFunctionResult = exc.WithArgs<ArrayList>(args).WithFilter<object>(filterObj).Execute(m_funcName).GetResult(); 
-            }else
-            {
-                executeFunctionResult = exc.WithArgs<ArrayList>(args).Execute(m_funcName).GetResult();      
-            }
-            verifyFEResult(executeFunctionResult, "queryFunction");
-            return (numNewKeysCreated >= numNewKeys);
-        }
-        private void verifyFEResult(ICollection<object> exefuncResult, string funcName)
-        {
-            if (exefuncResult != null)
-            {
-                foreach (object item in exefuncResult)
-                {
-                    if ((bool)item != true)
-                    {
-                        FwkTest<TKey, TVal>.CurrentTest.FwkException("DoFETask::" + funcName + "failed, last result is not true");
-                    }
-                }
-            }
-        }
-           
-    }
-
-    //------------------------------------DoOpsTask end --------------------------
-
-
-  public class FunctionExecution<TKey,TVal> : FwkTest<TKey, TVal>
-
-  {
-    private const int NUM_EXTRA_KEYS = 100;
-    private static bool m_istransaction = false;
-    private static List<TKey> destroyedKeys = new List<TKey>();
-    protected IRegion<TKey,TVal> GetRegion()
-    {
-      return GetRegion(null);
-    }
-
-    protected IRegion<TKey,TVal> GetRegion(string regionName)
-    {
-      IRegion<TKey, TVal> region;
-      if (regionName == null)
-      {
-        region = GetRootRegion();
-        if (region == null)
-        {
-          IRegion<TKey, TVal>[] rootRegions = CacheHelper<TKey, TVal>.DCache.RootRegions<TKey, TVal>();
-         
-          if (rootRegions != null && rootRegions.Length > 0)
-          {
-            region = rootRegions[Util.Rand(rootRegions.Length)];
-          }
-        }
-      }
-      else
-      {
-        region = CacheHelper<TKey, TVal>.GetRegion(regionName);
-      }
-      return region;
-    }
-    public virtual void DoCreateRegion()
-    {
-      FwkInfo("In DoCreateRegion()");
-      try
-      {
-        IRegion<TKey, TVal> region = CreateRootRegion();
-        ResetKey("useTransactions");
-        m_istransaction = GetBoolValue("useTransactions");
-        if (region == null)
-        {
-          FwkException("DoCreateRegion()  could not create region.");
-        }
-        FwkInfo("DoCreateRegion()  Created region '{0}'", region.Name);
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoCreateRegion() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoCreateRegion() complete.");
-    }
-    public void DoCloseCache()
-    {
-      FwkInfo("DoCloseCache()  Closing cache and disconnecting from" +
-        " distributed system.");
-      CacheHelper<TKey, TVal>.Close();
-    }
-      public virtual void DoClearRegion()
-      {
-          FwkInfo("In DoClearRegion()");
-          try
-          {
-              IRegion<TKey, TVal> region = GetRegion();
-              region.Clear();
-          }
-          catch (Exception ex)
-          {
-              FwkException("DoClearRegion() Caught Exception: {0}", ex);
-          }
-          FwkInfo("DoClearRegion() complete.");
-      }
-    public void DoLoadRegion()
-    {
-      FwkInfo("In DoLoadRegion()");
-      try
-      {
-       IRegion<TKey, TVal> region = GetRegion();
-        ResetKey("distinctKeys");
-        int numKeys = GetUIntValue("distinctKeys");
-        bool isUpdate = GetBoolValue("update");
-        //string key = null;
-        //string value = null;
-        TKey key;
-        TVal value;
-        for (int j = 1; j < numKeys; j++)
-        {
-          string k = "key-" + j;
-          string v = null;
-          key = (TKey)(object)(k.ToString());
-          if (isUpdate)
-          {
-            v = "valueUpdate-" + j;
-            value = (TVal)(object)(v.ToString());
-          }
-          else
-          {
-            v = "valueCreate-" + j;
-            value = (TVal)(object)(v.ToString());
-          }
-         // region.Put(key, value);
-          region[key] = value;
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoLoadRegion() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoLoadRegion() complete.");
-    }
-    public void DoAddDestroyNewKeysFunction()
-    {
-      FwkInfo("In DoAddDestroyNewKeysFunction()");
-      IRegion<TKey, TVal> region = GetRegion();
-      ResetKey("distinctKeys");
-      Int32 numKeys = GetUIntValue("distinctKeys");
-      int clientNum = Util.ClientNum;
-      //ISerializable[] filterObj = new ISerializable[numKeys];
-      Object[] filterObj = new Object[numKeys];
-      try
-      {
-        for(int j = 0; j < numKeys; j++)
-        {
-          //filterObj[j] = new CacheableString("KEY--" + clientNum + "--" + j);
-          filterObj[j] = "KEY--" + clientNum + "--" + j;
-        }
-        string opcode = GetStringValue( "entryOps" );
-        if(opcode == "destroy")
-          ExecuteFunction(filterObj, "destroy");
-        else
-          ExecuteFunction(filterObj,"addKey");
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoAddDestroyNewKeysFunction() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoAddDestroyNewKeysFunction() complete.");
-    }
-    private void ExecuteFunction(Object[] filterObj, string ops)
-    {
-      FwkInfo("In ExecuteFunction() ops is {0}", ops);
-      try
-      {
-        ResetKey( "getResult" );
-        Boolean getresult = GetBoolValue("getResult");
-        ResetKey( "replicated" );
-        bool isReplicate = GetBoolValue("replicated");
-        ResetKey( "distinctKeys" );
-        Int32 numKeys = GetUIntValue( "distinctKeys" );
-       // CacheableVector args = new CacheableVector();
-        ArrayList args = new ArrayList();
-        if (filterObj == null)
-        {
-          int clntId = Util.ClientNum;
-          filterObj = new Object[1];
-          //filterObj = new ISerializable[1];
-          Random rnd = new Random();
-          //filterObj[0] = new CacheableString("KEY--" + clntId + "--" + rnd.Next(numKeys));
-          filterObj[0] = "KEY--" + clntId + "--" + rnd.Next(numKeys);
-          args.Add(filterObj[0]);
-        }
-        else
-        {
-          for (int i = 0; i < filterObj.Length; i++)
-          {
-            args.Add(filterObj[i]);
-          }
-        }
-        if (ops.Equals("destroy"))
-        {
-          for (int i = 0; i < filterObj.Length; i++)
-          {
-            destroyedKeys.Add((TKey)filterObj[i]);
-          }
-        }
-        //Execution<object> exc = null;
-        Apache.Geode.Client.Execution<object> exc = null;
-        //Execution exc = null;
-        Pool/*<TKey, TVal>*/ pptr = null;
-        IRegion<TKey, TVal> region = GetRegion();
-        ResetKey("executionMode");
-        string executionMode = GetStringValue( "executionMode" );
-        ResetKey("poolName");
-        string poolname = GetStringValue( "poolName" );
-        string funcName = null;
-        if(executionMode == "onServers" || executionMode  == "onServer"){
-          pptr = CacheHelper<TKey, TVal>.DCache.GetPoolManager().Find(poolname);
-          if(getresult)
-            funcName = "ServerOperationsFunction";
-          else
-            funcName = "ServerOperationsWithOutResultFunction";
-        }
-        if ( executionMode == "onServers") {
-          /*exc = Client.FunctionService.OnServers<TKey,TVal,object>(pptr);*/
-          exc = Client.FunctionService<object>.OnServers(pptr);
-        } if ( executionMode == "onServer"){
-          exc = Client.FunctionService<object>.OnServer(pptr);
-        }else if( executionMode == "onRegion"){
-          exc = Client.FunctionService<object>.OnRegion<TKey, TVal>(region);
-          if(getresult)
-            funcName = "RegionOperationsFunction";
-          else
-            funcName = "RegionOperationsWithOutResultFunction";
-        }
-        //FwkInfo("ExecuteFunction - function name is{0} ", funcName);
-        //ISerializable[] executeFunctionResult = null;
-        ICollection<object> executeFunctionResult = null;
-        if(!isReplicate){
-          if(getresult == true){
-            if(executionMode == "onRegion"){
-              executeFunctionResult = exc.WithArgs<string>(ops).WithFilter<object>(filterObj).Execute(funcName, TimeSpan.FromSeconds(15)).GetResult();
-            }else{
-              args.Add(ops);
-              executeFunctionResult = exc.WithArgs<ArrayList>(args).Execute(funcName, TimeSpan.FromSeconds(15)).GetResult();
-            }
-          }else {
-            if(executionMode == "onRegion"){
-              exc.WithArgs<string>(ops).WithFilter<object>(filterObj).Execute(funcName, TimeSpan.FromSeconds(15));
-            } else {
-              args.Add(ops);
-              exc.WithArgs<ArrayList>(args).Execute(funcName, TimeSpan.FromSeconds(15));
-            }
-          }
-        } else {
-          args.Add(ops);
-          if (getresult)
-          {
-            executeFunctionResult = exc.WithArgs<ArrayList>(args).Execute(funcName, TimeSpan.FromSeconds(15)).GetResult();
-          }
-          else
-          {
-            executeFunctionResult = exc.WithArgs<ArrayList>(args).Execute(funcName, TimeSpan.FromSeconds(15)).GetResult();
-          }       
-        }
-        Thread.Sleep(30000);
-        if (ops == "addKey")
-        {
-          VerifyAddNewResult(executeFunctionResult, filterObj);
-        }
-        else
-        {
-          VerifyResult(executeFunctionResult, filterObj, ops);
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("ExecuteFunction() Caught Exception: {0}", ex);
-      }
-      FwkInfo("ExecuteFunction() complete.");
-    }
-    public void VerifyAddNewResult(ICollection<object> exefuncResult, Object[] filterObj)
-    {
-      FwkInfo("In VerifyAddNewResult()");
-      try
-      {
-        Thread.Sleep(30000);
-        IRegion<TKey, TVal> region = GetRegion();
-        //CacheableString value = null;
-        string value = null;
-        if (filterObj != null)
-        {
-          for (int i = 0; i < filterObj.Length; i++)
-          {
-           // CacheableKey key = filterObj[i] as CacheableKey;
-            TKey key = (TKey)filterObj[i];
-            for (int cnt = 0; cnt < 100; cnt++)
-            {
-             // value = region.Get(key) as CacheableString;
-              value = region[key].ToString();
-            }
-            //CacheableString expectedVal = filterObj[i] as CacheableString;
-            string expectedVal = (String)filterObj[i];
-            if (!(expectedVal.Equals(value)))
-            {
-              FwkException("VerifyAddNewResult Failed: expected value is {0} and found {1} for key {2}", expectedVal, value, key.ToString());
-            }
-          }
-        }
-      }
-      catch (Apache.Geode.Client.KeyNotFoundException ex)
-      {
-        FwkInfo("VerifyAddNewResult() caught exception: {0}", ex);
-      }
-      catch (Exception ex)
-      {
-        FwkException("VerifyAddNewResult() Caught Exception: {0}", ex);
-      }
-      FwkInfo("VerifyAddNewResult() complete.");
-    }
-    public void VerifyResult(ICollection<object> exefuncResult, Object[] filterObj, string ops)
-    {
-      FwkInfo("In VerifyResult()");
-      Boolean getresult = GetBoolValue("getResult");
-      FwkInfo("In VerifyResult() getresult = {0} ", getresult);
-      try
-      {
-        IRegion<TKey, TVal> region = GetRegion();
-        string buf = null;
-        if(exefuncResult != null)
-        {
-          IEnumerator<object> enm = exefuncResult.GetEnumerator();
-          enm.MoveNext();
-          Boolean lastResult = (Boolean)enm.Current; //exefuncResult[0];
-          if (lastResult!= true)
-          FwkException("FunctionExecution::VerifyResult failed, last result is not true");
-        }
-        string value = null;
-        if(filterObj != null )
-        {
-            //CacheableKey key = filterObj[0] as CacheableKey;
-            TKey key = (TKey)filterObj[0];
-            for (int i = 0; i<50;i++){
-              try
-              {
-                value = region[key].ToString();
-              }
-              catch (Apache.Geode.Client.KeyNotFoundException)
-              {
-                if(ops.Equals("destroy") && destroyedKeys.Remove(key))
-                {
-                  FwkInfo("FunctionExecution.VerifyResults() key {0} has been destroyed " +
-                " in read for index {1} ", key,i);
-                  break;
-                }
-                else
-                {
-                  if (getresult)
-                  {
-                    FwkException("FunctionExecution.VerifyResults() Caught KeyNotFoundException " +
-                      " in read for key: {0} for index {1}", key, i);
-                  }
-                  else
-                  {
-                    FwkInfo("FunctionExecution.VerifyResults() key {0} Caught KeyNotFoundException for getResult false" +
-                      " in read for index {1} ", key, i);
-                    break;
-                  }
-                }
-              }
-            }
-            if(ops == "update" || ops == "get"){
-              if (value != null)
-              {
-                if (value.IndexOf("update_") == 0)
-                  buf = "update_" + key.ToString();
-                else
-                  buf = key.ToString();
-                  if (!(buf.Equals(value)))
-                    FwkException("VerifyResult Failed: expected value is {0} and found {1} for key {2} for operation {3}", buf, value, key.ToString(), ops);
-              }
-            } else if(ops == "destroy"){
-                if(value == null){
-                  ExecuteFunction(filterObj,"addKey");
-                }else{
-                  FwkException("FunctionExecution::VerifyResult failed to destroy key {0}",key.ToString());
-                }
-            } else if(ops == "invalidate"){
-              if(value == null)
-              {
-                ExecuteFunction(filterObj,"update");
-              }else {
-                FwkException("FunctionExecution::VerifyResult Failed for invalidate key {0}" ,key.ToString());
-              }
-            }
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("VerifyResult() Caught Exception: {0}", ex);
-      }
-      FwkInfo("VerifyResult() complete.");
-    }
-    public void DoExecuteFunctions()
-    {
-      FwkInfo("In DoExecuteFunctions()");
-      int secondsToRun = GetTimeValue("workTime");
-      secondsToRun = (secondsToRun < 1) ? 30 : secondsToRun;
-      DateTime now = DateTime.Now;
-      DateTime end = now.AddSeconds(secondsToRun);
-      string opcode = null;
-      bool rolledback = false;
-      CacheTransactionManager txManager = null;
-      while (now < end)
-      {
-        try
-        {
-          if (m_istransaction)
-          {
-            txManager = CacheHelper<TKey, TVal>.DCache.CacheTransactionManager;
-            txManager.Begin();
-          }
-          opcode = GetStringValue("entryOps");
-          ExecuteFunction(null, opcode);
-          if (m_istransaction && !rolledback)
-          {
-            try
-            {
-              txManager.Commit();
-            }
-            catch (CommitConflictException)
-            {
-              // can occur with concurrent execution
-              Util.Log("Caught CommitConflictException. Expected with concurrent execution, continuing test.");
-            }
-            catch (Exception ex)
-            {
-              throw new Exception("Caught unexpected in doEntry : {0}", ex);
-            }
-          }
-        }
-        catch (Exception ex)
-        {
-          FwkException("DoExecuteFunctions() Caught Exception: {0}", ex);
-        }
-        now = DateTime.Now;
-      }
-      FwkInfo("DoExecuteFunctions() complete.");
-    }
-    public void DoExecuteExceptionHandling()
-    {
-      FwkInfo("In DoExecuteExceptionHandling()");
-      int secondsToRun = GetTimeValue("workTime");
-      secondsToRun = (secondsToRun < 1) ? 30 : secondsToRun;
-      DateTime now = DateTime.Now;
-      DateTime end = now.AddSeconds(secondsToRun);
-      string opcode = null;
-      bool rolledback = false;
-      CacheTransactionManager txManager = null;
-      while (now < end)
-      {
-        try
-        {
-          if (m_istransaction)
-          {
-            txManager = CacheHelper<TKey, TVal>.DCache.CacheTransactionManager;
-            txManager.Begin();
-          }
-          opcode = GetStringValue("entryOps");
-          if(opcode == "ParitionedRegionFunctionExecution")
-          {
-            DoParitionedRegionFunctionExecution();
-          }
-          else if (opcode == "ReplicatedRegionFunctionExecution")
-          {
-            DoReplicatedRegionFunctionExecution();
-          }
-          else if (opcode == "FireAndForgetFunctionExecution")
-          {
-            DoFireAndForgetFunctionExecution();
-          }
-          else if (opcode == "OnServersFunctionExcecution")
-          {
-            DoOnServersFunctionExcecution();
-          }
-          if (m_istransaction && !rolledback)
-          {
-            try
-            {
-              txManager.Commit();
-            }
-            catch (CommitConflictException)
-            {
-              // can occur with concurrent execution
-              Util.Log("Caught CommitConflictException. Expected with concurrent execution, continuing test.");
-            }
-            catch (Exception ex)
-            {
-              throw new Exception("Caught unexpected in doEntry : {0}", ex);
-            }
-          }
-        }
-        catch (Exception ex)
-        {
-          FwkException( "Caught unexpected {0} during exception handling for {1} operation: {2} : exiting task." ,ex.ToString(), opcode,ex.Message);
-
-        }
-        now = DateTime.Now;
-      }
-      FwkInfo("DoExecuteExceptionHandling() complete.");
-    }
-    public void DoParitionedRegionFunctionExecution()
-    {
-      FwkInfo("In DoParitionedRegionFunctionExecution()");
-      Apache.Geode.Client.Execution<object> exc = null;
-      IRegion<TKey, TVal> region = GetRegion("partitionedRegion");
-      try
-      {
-        exc = Client.FunctionService<object>.OnRegion<TKey, TVal>(region);
-         MyResultCollector<object> myRC = new MyResultCollector<object>();
-         Random rnd = new Random();
-         if(rnd.Next(100) % 2 == 0)
-         {
-           //Execution on partitionedRegion with no filter
-           exc = exc.WithCollector(myRC);
-         }
-         else
-         {
-           //Execution on partitionedRegion with filter
-          // ICacheableKey<TKey>[]keys = region.GetKeys();
-           ICollection<TKey> keys = region.GetLocalView().Keys;
-                      
-           //ISerializable[] filterObj = new ISerializable[keys.Count];
-           Object[] filterObj = new Object[keys.Count];
-           for (int i = 0; i < keys.Count; i++)
-           {
-             //filterObj[i] = (ISerializable)keys;
-             filterObj[i] = keys;
-           }
-           exc = exc.WithFilter(filterObj).WithCollector(myRC);
-         }
-         // execute function
-         Client.IResultCollector<object> rc = exc.Execute("ExceptionHandlingFunction", TimeSpan.FromSeconds(30));
-
-      }
-      catch (Apache.Geode.Client.FunctionExecutionException)
-      {
-        //expected exception
-      }
-      catch (Apache.Geode.Client.TimeoutException)
-      {
-        //expected exception
-      }
-      FwkInfo("DoParitionedRegionFunctionExecution() complete.");
-    }
-    public void DoReplicatedRegionFunctionExecution()
-    {
-      FwkInfo("In DoReplicatedRegionFunctionExecution()");
-      Apache.Geode.Client.Execution<object> exc = null;
-      IRegion<TKey, TVal> region = GetRegion("replicatedRegion");
-      try
-      {
-        exc = Client.FunctionService<object>.OnRegion<TKey, TVal>(region);
-        MyResultCollector<object> myRC = new MyResultCollector<object>();
-        exc = exc.WithCollector(myRC);
-        // execute function
-        Client.IResultCollector<object> rc = exc.Execute("ExceptionHandlingFunction", TimeSpan.FromSeconds(30));
-      }
-      catch (Apache.Geode.Client.FunctionExecutionException)
-      {
-        //expected exception
-      }
-      catch (Apache.Geode.Client.TimeoutException)
-      {
-        //expected exception
-      }
-      FwkInfo("DoReplicatedRegionFunctionExecution() complete.");
-    }
-    public void DoFireAndForgetFunctionExecution()
-    {
-      FwkInfo("In DoFireAndForgetFunctionExecution()");
-      string name = null;
-      Random rnd = new Random();
-      if(rnd.Next(100) % 2 == 0){
-        //Execution Fire and forget on partitioned region
-        name = "partitionedRegion";
-      }
-      else
-      {
-        //Execution Fire and forget on replicated region
-        name = "replicatedRegion";
-      }
-      IRegion<TKey, TVal> region = GetRegion(name);
-      try
-      {
-        MyResultCollector<object> myRC = new MyResultCollector<object>();
-        Apache.Geode.Client.Execution<object> exc = Client.FunctionService<object>.OnRegion<TKey, TVal>(region).WithCollector(myRC);
-        // execute function
-        Client.IResultCollector<object> rc = exc.Execute("FireNForget", TimeSpan.FromSeconds(30));
-      }
-      catch (Apache.Geode.Client.FunctionExecutionException)
-      {
-        //expected exception
-      }
-      catch (Apache.Geode.Client.TimeoutException)
-      {
-        //expected exception
-      }
-      FwkInfo("DoFireAndForgetFunctionExecution() complete.");
-    }
-    public void DoOnServersFunctionExcecution()
-    {
-      FwkInfo("In DoOnServersFunctionExcecution()");
-      ResetKey("poolName");
-      string poolname = GetStringValue("poolName");
-      Apache.Geode.Client.Execution<object> exc = null;
-      try
-      {
-        Pool/*<TKey, TVal>*/ pptr = CacheHelper<TKey, TVal>.DCache.GetPoolManager().Find(poolname);
-        MyResultCollector<object> myRC = new MyResultCollector<object>();
-        exc = Client.FunctionService<object>.OnServers(pptr).WithCollector(myRC);
-        // execute function
-        Client.IResultCollector<object> rc = exc.Execute("ExceptionHandlingFunction", TimeSpan.FromSeconds(30));
-      }
-      catch (Apache.Geode.Client.FunctionExecutionException)
-      {
-        //expected exception
-      }
-      catch (Apache.Geode.Client.TimeoutException)
-      {
-        //expected exception
-      }
-      FwkInfo("DoOnServersFunctionExcecution() complete.");
-    }
-
-    public void DoExecuteFunctionsHA()
-    {
-      ResetKey("getResult");
-      bool getresult = GetBoolValue("getResult");
-      ResetKey("distinctKeys");
-      int numKeys = GetUIntValue("distinctKeys");
-      IRegion<TKey, TVal> region = GetRegion();
-      ICollection<object> executeFunctionResult = null;
-      string funcName = "GetFunctionExeHA";
-      Apache.Geode.Client.Execution<object> exc = Client.FunctionService<object>.OnRegion<TKey, TVal>(region);
-      MyResultCollectorHA<object> myRC = new MyResultCollectorHA<object>();
-      exc = exc.WithCollector(myRC);
-      Client.IResultCollector<object>  rc = exc.Execute(funcName, TimeSpan.FromSeconds(120));
-      executeFunctionResult = myRC.GetResult();
-      if (executeFunctionResult != null)
-      {
-        IEnumerator<object> enmtor = executeFunctionResult.GetEnumerator();
-        enmtor.MoveNext();
-        //Boolean lastResult = (Boolean)enmtor.Current; //exefuncResult[0];
-        //Boolean lastResult = (Boolean)executeFunctionResult[0];
-       // if (lastResult!= true) 
-       //   FwkException("FunctionExecution::DoExecuteFunctionHA failed, last result is not true");
-        ICollection<object> resultListColl = myRC.GetResult(TimeSpan.FromSeconds(60));
-        string[] resultList = new string[resultListColl.Count];
-        resultList.CopyTo(resultList, 0);
-        //FwkInfo("FunctionExecution::DoExecuteFunctionHA GetClearResultCount {0} GetGetResultCount {1} GetAddResultCount {2}", myRC.GetClearResultCount(), myRC.GetGetResultCount(), myRC.GetAddResultCount());
-        if (resultList != null)
-        {
-          if (numKeys == resultList.Length)
-          {
-            for (int i = 1; i < numKeys; i++)
-            {
-              int count = 0;
-              string key = "key-" + i;
-              
-              for (int j = 0; j < resultList.Length; j++)
-              {
-                if ((key.Equals(resultList[j])))
-                {
-                  count++;
-                  if (count > 1)
-                  {
-                    FwkException("FunctionExecution::DoExecuteFunctionHA: duplicate entry found for key {0} ", key);
-                  }
-                } 
-              }
-              
-              if(count == 0) {
-                  FwkException("FunctionExecution::DoExecuteFunctionHA failed: key is missing in result list {0}", key);
-                }
-              }
-            }
-          }
-          else
-          {
-            FwkException("FunctionExecution::DoExecuteFunctionHA failed: result size {0} doesn't match with number of keys {1}", resultList.Length, numKeys);
-          }
-        }
-        else {
-          FwkException("FunctionExecution::DoExecuteFunctionHA executeFunctionResult is null");
-        }
-        
-      }
-      public void DoGetServerKeys()
-      {
-          try
-          {
-              FwkInfo("FunctionExecution:DoGetServerKeys");
-              IRegion<TKey, TVal> region = GetRegion();
-              TKey[] keys = (TKey[])(object)region.Keys;
-              bool pdxobject = GetBoolValue("isPdxObject");
-              ArrayList args = new ArrayList();
-              args.Add("get");
-              if (pdxobject)
-                  args.Add(pdxobject);
-              //args.Add("pdxobject");
-              for (int i = 0; i < keys.Length; i++)
-                  args.Add(keys[i]);
-              string funcName = GetStringValue("funcName");
-              Apache.Geode.Client.Execution<object> exc =
-                  Client.FunctionService<object>.OnRegion<TKey, TVal>(region);
-              //FwkInfo("Going to do get execute");
-              ICollection<object> executeFunctionResult = null;
-              ResetKey("replicated");
-              bool isReplicate = GetBoolValue("replicated");
-              if (!isReplicate)
-              {
-                  executeFunctionResult = exc.WithArgs<ArrayList>(args).WithFilter<TKey>(keys).Execute(funcName).GetResult();
-              }
-              else
-              {
-                  executeFunctionResult = exc.WithArgs<ArrayList>(args).Execute(funcName).GetResult();
-              }
-              if (executeFunctionResult != null)
-              {
-                  foreach (object item in executeFunctionResult)
-                  {
-                      if ((bool)item != true)
-                          FwkException("FunctionExecution:DoGetServerKeys:: failed, last result is not true");
-                  }
-
-              }
-
-          }
-          catch (CacheServerException ex)
-          {
-              FwkException("DoGetServerKeys() Caught CacheServerException: {0}", ex);
-          }
-          catch (Exception ex)
-          {
-              FwkException("DoGetServerKeys() Caught Exception: {0}", ex);
-          }
-       
-      }
-      public void DoUpdateServerKeys()
-      {
-          try
-          {
-              FwkInfo("FunctionExecution:DoGetServerKeys");
-              IRegion<TKey, TVal> region = GetRegion();
-              TKey[] keys = (TKey[])(object)region.Keys;
-              bool pdxobject = GetBoolValue("isPdxObject");
-              ArrayList args = new ArrayList();
-              args.Add("update");
-              if (pdxobject)
-                  args.Add(pdxobject);
-              //args.Add("pdxobject");
-              for (int i = 0; i < keys.Length; i++)
-                  args.Add(keys[i]);
-              string funcName = GetStringValue("funcName");
-              Apache.Geode.Client.Execution<object> exc =
-                  Client.FunctionService<object>.OnRegion<TKey, TVal>(region);
-              //FwkInfo("Going to do get execute");
-              ICollection<object> executeFunctionResult = null;
-              ResetKey("replicated");
-              bool isReplicate = GetBoolValue("replicated");
-              if (!isReplicate)
-              {
-                  executeFunctionResult = exc.WithArgs<ArrayList>(args).WithFilter<TKey>(keys).Execute(funcName).GetResult();
-              }
-              else
-              {
-                  executeFunctionResult = exc.WithArgs<ArrayList>(args).Execute(funcName).GetResult();
-              }
-              if (executeFunctionResult != null)
-              {
-                  foreach (object item in executeFunctionResult)
-                  {
-                      if ((bool)item != true)
-                          FwkException("FunctionExecution:DoGetServerKeys:: failed, last result is not true");
-                  }
-
-              }
-
-          }
-          catch (CacheServerException ex)
-          {
-              FwkException("DoGetServerKeys() Caught CacheServerException: {0}", ex);
-          }
-          catch (Exception ex)
-          {
-              FwkException("DoGetServerKeys() Caught Exception: {0}", ex);
-          }
-
-      }
-      public void doOps()
-      {
-          FwkInfo("FunctionExcution:doOps called.");
-
-          int opsSec = GetUIntValue("opsSecond");
-          opsSec = (opsSec < 1) ? 0 : opsSec;
-
-          int secondsToRun = GetTimeValue("workTime");
-          secondsToRun = (secondsToRun < 1) ? 30 : secondsToRun;
-
-          int valSize = GetUIntValue("valueSizes");
-          valSize = ((valSize < 0) ? 32 : valSize);
-          ResetKey("entryCount");
-          int entryCount = GetUIntValue("entryCount");
-          ResetKey("NumNewKeys");
-          int numNewKeys = GetUIntValue("NumNewKeys");
-
-          //TestClient * clnt = TestClient::getTestClient();
-          IRegion<TKey, TVal> regionPtr = GetRegion();
-          if (regionPtr == null)
-          {
-              FwkSevere("FunctionExcution:doOps(): No region to perform operations on.");
-              //now = end; // Do not do the loop
-          }
-          ResetKey("useTransactions");
-          bool m_istransaction = GetBoolValue("useTransactions");
-          try
-          {
-              DoFETask<TKey, TVal> dooperation = new DoFETask<TKey, TVal>(regionPtr, m_istransaction);
-              ResetKey("numThreads");
-              int numThreads = GetUIntValue("numThreads");
-              RunTask(dooperation, numThreads, entryCount + numNewKeys + NUM_EXTRA_KEYS, -1, -1, null);
-          }
-          catch (ClientTimeoutException)
-          {
-              FwkException("In FunctionExcution:doOps()  Timed run timed out.");
-          }
-          catch (FwkException e)
-          {
-              FwkException("Caught Exception exception during FunctionExcution:doOps: " + e);
-          }
-          catch (Exception e)
-          {
-              FwkException("Caught unexpected exception during FunctionExcution:doOps: " + e);
-          }
-         
-          
-
-
-          FwkInfo("Done in FunctionExcution:doOps");
-          Thread.Sleep(10000);
-      }
-    }
-  }
diff --git a/tests/cli/NewFwkLib/FunctionExecution/MyResultCollector.cs b/tests/cli/NewFwkLib/FunctionExecution/MyResultCollector.cs
deleted file mode 100644
index f886f41..0000000
--- a/tests/cli/NewFwkLib/FunctionExecution/MyResultCollector.cs
+++ /dev/null
@@ -1,175 +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.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Threading;
-
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.DUnitFramework;
-  using Apache.Geode.Client;
-  public class MyResultCollector<TResult> : Client.IResultCollector<TResult>
-  {
-    #region Private members
-    private Boolean m_resultReady = false;
-    //private CacheableVector m_results = null;
-    ICollection<TResult> m_results = null;
-    private int m_addResultCount = 0;
-    private int m_getResultCount = 0;
-    private int m_endResultCount = 0;
-    #endregion
-    public int GetAddResultCount()
-    {
-      return m_addResultCount;
-    }
-    public int GetGetResultCount()
-    {
-      return m_getResultCount;
-    }
-    public int GetEndResultCount()
-    {
-      return m_endResultCount;
-    }
-    public MyResultCollector()
-    {
-      m_results = new List<TResult>();
-    }
-    public void AddResult(TResult result)
-    {
-      m_addResultCount++;
-      m_results.Add(result);
-    }
-    public ICollection<TResult> GetResult()
-    {
-      return GetResult(TimeSpan.FromSeconds(50));
-    }
-    public ICollection<TResult> GetResult(TimeSpan timeout)
-    {
-      m_getResultCount++;
-
-      lock(this)
-      {
-        if (!m_resultReady)
-        {
-          if (timeout > TimeSpan.Zero) {
-            if (!Monitor.Wait(this, timeout)) {
-              throw new FunctionExecutionException("Timeout waiting for result.");
-            }
-          } else {
-            throw new FunctionExecutionException("Results not ready.");
-          }
-        }
-      }
-
-      return m_results;
-    }
-
-    public void EndResults()
-    {
-      m_endResultCount++;
-
-      lock (this) {
-        m_resultReady = true;
-        Monitor.Pulse(this);
-      }
-    }
-
-    public void ClearResults(/*bool unused*/)
-    {
-      m_results.Clear();
-      m_resultReady = false;
-    }
-
-  }
-  public class MyResultCollectorHA<TResult> : Client.IResultCollector<TResult>
-  {
-    #region Private members
-    private bool m_resultReady = false;
-    //private CacheableVector m_results = null;
-    ICollection<TResult> m_results = null;
-    private int m_addResultCount = 0;
-    private int m_getResultCount = 0;
-    private int m_endResultCount = 0;
-    private int m_clearResultCount = 0;
-    #endregion
-    public int GetAddResultCount()
-    {
-      return m_addResultCount;
-    }
-    public int GetGetResultCount()
-    {
-      return m_getResultCount;
-    }
-    public int GetEndResultCount()
-    {
-      return m_endResultCount;
-    }
-    public int GetClearResultCount()
-    {
-      return m_clearResultCount;
-    }
-    public MyResultCollectorHA()
-    {
-      m_results = new List<TResult>();
-    }
-    public void AddResult(TResult result)
-    {
-      //m_addResultCount++;
-      ////CacheableString rs = result as CacheableString;
-      //string rs = result.ToString();
-      m_results.Add(result);
-    }
-    public ICollection<TResult> GetResult()
-    {
-      return GetResult(TimeSpan.FromSeconds(50));
-    }
-    public ICollection<TResult> GetResult(TimeSpan timeout)
-    {
-      m_getResultCount++;
-
-      lock (this) {
-        if (!m_resultReady) {
-          if (timeout > TimeSpan.Zero) {
-            if (!Monitor.Wait(this, timeout)) {
-              throw new FunctionExecutionException("Timeout waiting for result.");
-            }
-          } else {
-            throw new FunctionExecutionException("Results not ready.");
-          }
-        }
-      }
-
-      return m_results;
-    }
-    public void ClearResults(/*bool unused*/)
-    {
-      m_clearResultCount++;
-      m_results.Clear();
-      m_resultReady = false;
-    }
-    public void EndResults()
-    {
-      m_endResultCount++;
-      lock (this) {
-        m_resultReady = true;
-        Monitor.Pulse(this);
-      }
-    }
-
-  }
-}
diff --git a/tests/cli/NewFwkLib/FwkTask.cs b/tests/cli/NewFwkLib/FwkTask.cs
deleted file mode 100644
index a48fc77..0000000
--- a/tests/cli/NewFwkLib/FwkTask.cs
+++ /dev/null
@@ -1,532 +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.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Reflection;
-using System.Text;
-using System.Xml;
-
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.DUnitFramework;
-
-  public class FwkTask
-  {
-    #region Private members
-
-    private Delegate m_delegate;
-    private Delegate m_pushTaskNameDelegate;
-    private Delegate m_endDelegate;
-    private List<string> m_clients;
-    private TimeBomb m_timeBomb;
-    private string m_class;
-    private int m_timeoutMillis;
-    private int m_timesToRun;
-    private int m_threadCount;
-    private bool m_parallel;
-    private bool m_continueOnError;
-    private ClientGroup m_clientGroup;
-    private List<string> m_localDataNames;
-    private UnitFnMethod<FwkTask, ClientBase> m_taskStartedHandler;
-    private UnitFnMethod<FwkTask, ClientBase, Exception> m_taskDoneHandler;
-    private bool m_taskStatus;
-
-    #endregion
-
-    #region Private constants and static members
-
-    private const string PushTaskNameMethod = "PushTaskName";
-    private const string EndTaskMethod = "EndTask";
-    private const int DefaultTimeoutMillis = 600000;
-    private static string[] ThreadCountKeys = { "threadCount", "numThreads" };
-    private static Dictionary<string, int> m_GlobalTaskNames =
-      new Dictionary<string, int>();
-    private static Dictionary<string, Assembly> m_AssemblyMap =
-      new Dictionary<string, Assembly>();
-    private const string ClientCountKey = "clientCount";
-
-    private const string NameAttrib = "name";
-    private const string MethodAttrib = "action";
-    private const string ClassAttrib = "class";
-    private const string ContainerAttrib = "container";
-    private const string WaitTimeAttrib = "waitTime";
-    private const string TimesToRunAttrib = "timesToRun";
-    private const string ThreadCountAttrib = "threadCount";
-    private const string ParallelAttrib = "parallel";
-    private const string ContinueAttrib = "continueOnError";
-    private const string ArgTypes = "argTypes";
-
-    #endregion
-
-    #region Public accessors
-
-    public static Dictionary<string, int> GlobalTaskNames
-    {
-      get
-      {
-        return m_GlobalTaskNames;
-      }
-    }
-
-    public List<string> ClientNames
-    {
-      get
-      {
-        return m_clients;
-      }
-    }
-
-    public string Name
-    {
-      get
-      {
-        return (m_timeBomb == null ? null : m_timeBomb.TaskName);
-      }
-    }
-
-    public string Class
-    {
-      get
-      {
-        return m_class;
-      }
-    }
-
-    public int Timeout
-    {
-      get
-      {
-        return m_timeoutMillis;
-      }
-    }
-
-    public int TimesToRun
-    {
-      get
-      {
-        return m_timesToRun;
-      }
-    }
-
-    public int ThreadCount
-    {
-      get
-      {
-        return m_threadCount;
-      }
-    }
-
-    public bool Parallel
-    {
-      get
-      {
-        return m_parallel;
-      }
-    }
-
-    public bool ContinueOnError
-    {
-      get
-      {
-        return m_continueOnError;
-      }
-    }
-
-    #endregion
-
-    #region Private methods
-
-    private void HandleTaskStarted(ClientBase client)
-    {
-      if (m_taskStartedHandler != null)
-      {
-        m_taskStartedHandler(this, client);
-      }
-    }
-
-    private void HandleTaskDone(ClientBase client, Exception ex)
-    {
-      if (m_taskDoneHandler != null)
-      {
-        m_taskStatus = (ex == null);
-        m_taskDoneHandler(this, client, ex);
-      }
-    }
-
-    #endregion
-
-    #region Public methods
-
-    public FwkTask(XmlNode node, string testName,
-      UnitFnMethod<FwkTask, ClientBase> taskStartedHandler,
-      UnitFnMethod<FwkTask, ClientBase, Exception> taskDoneHandler)
-    {
-      if (node == null)
-      {
-        throw new IllegalArgException("Null node for FwkTask constructor.");
-      }
-
-      #region Read the attributes
-
-      string taskName = string.Empty;
-      string containerStr = null;
-      string methodName = null;
-      string typeAttrib = null;
-      m_timesToRun = 1;
-      m_threadCount = 1;
-      m_parallel = false;
-      m_timeoutMillis = DefaultTimeoutMillis;
-      m_continueOnError = false;
-      m_class = null;
-
-      XmlAttributeCollection xmlAttribs = node.Attributes;
-      if (xmlAttribs != null)
-      {
-        foreach (XmlAttribute xmlAttrib in xmlAttribs)
-        {
-          switch (xmlAttrib.Name)
-          {
-            case NameAttrib:
-              taskName = xmlAttrib.Value;
-              break;
-            case ArgTypes:
-              typeAttrib = xmlAttrib.Value;
-              break;
-            case ContainerAttrib:
-              containerStr = xmlAttrib.Value;
-              break;
-            case MethodAttrib:
-              methodName = xmlAttrib.Value;
-              break;
-            case TimesToRunAttrib:
-              m_timesToRun = XmlNodeReaderWriter.String2Int(xmlAttrib.Value, 1);
-              break;
-            case ThreadCountAttrib:
-              m_threadCount = XmlNodeReaderWriter.String2Int(xmlAttrib.Value, 1);
-              break;
-            case ParallelAttrib:
-              m_parallel = XmlNodeReaderWriter.String2Bool(xmlAttrib.Value, false);
-              break;
-            case WaitTimeAttrib:
-              m_timeoutMillis = XmlNodeReaderWriter.String2Seconds(xmlAttrib.Value,
-                DefaultTimeoutMillis) * 1000;
-              break;
-            case ContinueAttrib:
-              m_continueOnError = XmlNodeReaderWriter.String2Bool(xmlAttrib.Value, false);
-              break;
-            case ClassAttrib:
-              m_class = xmlAttrib.Value;
-              break;
-            default:
-              throw new IllegalArgException("Unknown attribute '" +
-                xmlAttrib.Name + "' found in '" + node.Name +
-                "' node.");
-          }
-        }
-      }
-      int taskNum = 1;
-      if (m_GlobalTaskNames.ContainsKey(taskName))
-      {
-        taskNum = m_GlobalTaskNames[taskName] + 1;
-      }
-      m_GlobalTaskNames[taskName] = taskNum;
-      taskName += '_' + taskNum.ToString();
-
-      #endregion
-
-      m_timeBomb = new TimeBomb();
-      m_timeBomb.TaskName = testName + '.' + taskName;
-
-      #region Create a delegate by loading the assembly
-
-      Assembly loadAssmb = null;
-      string typeName = null;
-      if (containerStr != null && methodName != null)
-      {
-        object inst = null;
-        int dotIndx;
-        if ((dotIndx = containerStr.IndexOf('.')) < 0)
-        {
-          Type myType = this.GetType();
-          loadAssmb = myType.Assembly;
-          typeName = myType.Namespace + '.' + containerStr;
-          Util.Log(Util.LogLevel.Info, "Assembly {0} loaded and typename is {1}", loadAssmb, typeName);
-        }
-        else
-        {
-          string assmbName = containerStr.Substring(0, dotIndx);
-          if (!m_AssemblyMap.TryGetValue(assmbName, out loadAssmb))
-          {
-            try
-            {
-              loadAssmb = Assembly.Load(assmbName);
-              Util.Log(Util.LogLevel.Info, "Assembly {0} loaded ", assmbName);
-            }
-            catch (Exception e)
-            {
-              throw new IllegalArgException("Cannot load assembly '" +
-                assmbName + "' for task: " + m_timeBomb.TaskName +
-                " exception: " + e);
-            }
-            m_AssemblyMap.Add(assmbName, loadAssmb);
-          }
-          typeName = containerStr.Substring(dotIndx + 1);
-        }
-        //string typeAttrib;
-        if (loadAssmb != null)
-        {
-            if (typeAttrib == null)
-            {
-              inst = loadAssmb.CreateInstance(typeName, true);
-            }
-            else
-            {
-              //typeAttrib = "Apache.Geode.Client.Tests.ArrayOfByte,Apache.Geode.Client.Tests.ArrayOfByte";
-              //typeAttrib = "System.int,System.Int32";
-              string[] typeNames = typeAttrib.Split(',');
-              string mangledName = typeName + "`" + typeNames.Length.ToString();
-
-              //Type type = loadAssmb.GetType(mangledName, true, true);
-              Type[] types = new Type[typeNames.Length];
-             for (int index = 0; index < typeNames.Length; ++index)
-              {
-                string typName = typeNames[index].Trim();
-                if (typName == "int" || typName == "Int32" || typName == "string" ||
-                  typName == "String" || typName == "byte[]" || typName == "Byte[]"
-                  || typName == "string[]" || typName == "String[]" || typName == "Object" 
-                  || typName == "object")
-                {
-                  if (typName.Equals("int"))
-                    typName = "Int32";
-                  else if (typName.Equals("string"))
-                    typName = "String";
-                  else if (typName.Equals("string[]"))
-                    typName = "String[]";
-                  else if (typName.Equals("byte[]"))
-                    typName = "Byte[]";
-                  else if (typName.Equals("object"))
-                    typName = "Object";
-                  typName = "System." + typName;
-                  //Util.Log("rjk: FwkTask: typeAttrib 33 argname {0}", typName);
-                  types[index] = Type.GetType(typName.Trim());
-                  //Util.Log("rjk: FwkTask: typeAttrib 34 argname {0}", typName);
-                }
-                else
-                {
-                  typName = "Apache.Geode.Client.Tests." + typName;
-                  types[index] = loadAssmb.GetType(typName.Trim(), true, true);
-                  //Util.Log("rjk: FwkTask: typeAttrib for userobject 34 argname {0}", typName);
-                }
-              }
-
-              Type type = loadAssmb.GetType(mangledName, true, true).MakeGenericType(types);
-              inst = type.GetConstructor(System.Type.EmptyTypes).Invoke(null);
-              
-            }
-          
-        }
-        if (inst != null)
-        {
-          try
-          {
-            MethodInfo mInfo = inst.GetType().GetMethod(methodName,
-              BindingFlags.IgnoreCase | BindingFlags.Public |
-              BindingFlags.Static | BindingFlags.FlattenHierarchy |
-              BindingFlags.Instance);
-            m_delegate = Delegate.CreateDelegate(typeof(UnitFnMethod), inst,
-              mInfo, true);
-          }
-          catch (Exception ex)
-          {
-            throw new IllegalArgException(
-              "Exception while creating delegate [" + methodName + "]: " + ex);
-          }
-          m_pushTaskNameDelegate = Delegate.CreateDelegate(
-            typeof(UnitFnMethod<string>), inst, PushTaskNameMethod, true);
-          m_endDelegate = Delegate.CreateDelegate(
-            typeof(UnitFnMethod), inst, EndTaskMethod, true);
-        }
-      }
-      if (m_delegate == null)
-      {
-        throw new IllegalArgException("Cannot create delegate '" +
-          methodName + "' for task: " + m_timeBomb.TaskName);
-      }
-
-      #endregion
-
-      #region Add the clients
-
-      m_clients = new List<string>();
-      m_clientGroup = new ClientGroup(false);
-      m_clients = FwkClient.ReadClientNames(node, false);
-      List<ClientBase> clients = FwkClient.GetClients(m_clients);
-      m_clientGroup.Add(clients);
-      m_timeBomb.AddClients(new ClientBase[] { m_clientGroup });
-      m_taskStartedHandler = taskStartedHandler;
-      m_taskDoneHandler = taskDoneHandler;
-      int clientCount = m_clients.Count;
-
-      #endregion
-
-      #region Add any data
-
-      m_localDataNames = new List<string>();
-      Dictionary<string, FwkData> data = FwkData.ReadDataNodes(node);
-      // Task specific data is written as <taskname>.<key> to avoid
-      // overwriting the global data, since that needs to be preserved
-      // across tasks.
-      if (m_threadCount > 1)
-      {
-        // We shall treat 'threadCount' and 'numThreads' as equivalent,
-        // i.e. if 'threadCount' is defined for a task then 'numThreads'
-        // shall also be written as data.
-        foreach (string threadKey in ThreadCountKeys)
-        {
-          m_localDataNames.Add(threadKey);
-          Util.BBSet(Name, threadKey,
-            new FwkData(m_threadCount.ToString(), null, DataKind.String));
-        }
-      }
-      if (clientCount > 0)
-      {
-        // Overwrite the clientCount (if any) with the actual value.
-        Util.BBSet(Name, ClientCountKey,
-        new FwkData(clientCount.ToString(), null, DataKind.String));
-      }
-      foreach (KeyValuePair<string, FwkData> pair in data)
-      {
-        m_localDataNames.Add(pair.Key);
-        Util.BBSet(Name, pair.Key, pair.Value);
-      }
-
-      #endregion
-    }
-
-    public void AddClients(params ClientBase[] clients)
-    {
-      m_clientGroup.Add(clients);
-    }
-
-    public void SetClients(params ClientBase[] clients)
-    {
-      m_clientGroup.Clients.Clear();
-      m_clientGroup.Add(clients);
-    }
-
-    public bool Execute()
-    {
-      m_taskStatus = true;
-      m_timeBomb.Start(m_timeoutMillis);
-      try
-      {
-        if (m_pushTaskNameDelegate != null)
-        {
-          m_clientGroup.CallFn(m_pushTaskNameDelegate,
-              new object[] { m_timeBomb.TaskName });
-        }
-        if (m_taskStartedHandler != null || m_taskDoneHandler != null)
-        {
-          m_clientGroup.AddTaskHandlers(HandleTaskStarted, HandleTaskDone);
-        }
-        FwkReadData read = new FwkReadData();
-        read.PushTaskName(Name);
-        string appDomain = read.GetStringValue("appdomain");
-        if (appDomain != null && appDomain.Length > 0) {
-          m_clientGroup.CallFn(m_delegate, new object[] { Util.AppDomainPrefix
-          + appDomain });
-        }
-        else {
-          m_clientGroup.CallFn(m_delegate, null);
-        }
-        if (m_taskStartedHandler != null || m_taskDoneHandler != null)
-        {
-          m_clientGroup.RemoveTaskHandlers(HandleTaskStarted, HandleTaskDone);
-        }
-      }
-      finally
-      {
-        m_timeBomb.Diffuse();
-      }
-      return m_taskStatus;
-    }
-
-    public void ClearData()
-    {
-      foreach (string dataName in m_localDataNames)
-      {
-        Util.BBRemove(Name, dataName);
-      }
-    }
-
-    public void EndTask()
-    {
-      if (m_endDelegate != null)
-      {
-        m_clientGroup.CallFn(m_endDelegate, null);
-      }
-      m_clientGroup.RemoveObject(m_delegate.Target);
-    }
-
-    public void SetLogFile(string logPath)
-    {
-      m_clientGroup.SetNameLogFile(logPath);
-    }
-
-    public void SetLogLevel(Util.LogLevel logLevel)
-    {
-      m_clientGroup.SetLogLevel(logLevel);
-    }
-
-    public string Dump()
-    {
-      StringBuilder dumpStr = new StringBuilder();
-
-      dumpStr.Append(Environment.NewLine + "The task name is: " +
-        m_timeBomb.TaskName);
-      dumpStr.Append(string.Format("{0}The function to be executed: " +
-        "'{1}' in class '{2}'", Environment.NewLine, m_delegate.Method.Name,
-        m_delegate.Method.ReflectedType.FullName));
-      dumpStr.Append(Environment.NewLine + "The class of the task: " +
-        m_class);
-      dumpStr.Append(Environment.NewLine + "The threadCount is: " +
-        m_threadCount);
-      dumpStr.Append(Environment.NewLine + "Parallel attribute is: " +
-        m_parallel);
-      dumpStr.Append(Environment.NewLine + "Times to run is: " +
-        m_timesToRun);
-      dumpStr.Append(Environment.NewLine + "The clients are: ");
-      foreach (string clientName in m_clients)
-      {
-        dumpStr.Append(Environment.NewLine + "\t" + clientName);
-      }
-      dumpStr.Append(Environment.NewLine + "Continue on error is: " +
-        m_continueOnError);
-      dumpStr.Append(Environment.NewLine + "The local data names are: ");
-      foreach (string dataName in m_localDataNames)
-      {
-        dumpStr.Append(Environment.NewLine + '\t' + dataName);
-      }
-      dumpStr.Append(Environment.NewLine + "The timeout is: " +
-        m_timeoutMillis);
-      return dumpStr.ToString();
-    }
-
-    #endregion
-  }
-}
diff --git a/tests/cli/NewFwkLib/FwkTest.cs b/tests/cli/NewFwkLib/FwkTest.cs
deleted file mode 100644
index 4ab34ce..0000000
--- a/tests/cli/NewFwkLib/FwkTest.cs
+++ /dev/null
@@ -1,1509 +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.
- */
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Runtime.Serialization;
-using System.Text;
-using System.Xml;
-
-#pragma warning disable 618
-
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.DUnitFramework;
-  using Apache.Geode.Client.Tests;
-  using Apache.Geode.Client;
-  using NEWAPI = Apache.Geode.Client.Tests;
-  //using Region = Apache.Geode.Client.IRegion<Object, Object>;
-
-
-  /// <summary>
-  /// Exception thrown when 'Call' is invoked on a client thread/process/...
-  /// that has already exited (either due to some error/exception on the
-  /// client side or due to its 'Dispose' function being called).
-  /// </summary>
-  [Serializable]
-  public class FwkException : Exception
-  {
-    /// <summary>
-    /// Constructor to create an exception object with empty message.
-    /// </summary>
-    public FwkException()
-      : base()
-    {
-    }
-
-    /// <summary>
-    /// Constructor to create an exception object with the given message.
-    /// </summary>
-    /// <param name="message">The exception message.</param>
-    public FwkException(string message)
-      : base(message)
-    {
-    }
-
-    /// <summary>
-    /// Constructor to create an exception object with the given message
-    /// and with the given inner Exception.
-    /// </summary>
-    /// <param name="message">The exception message.</param>
-    /// <param name="innerException">The inner Exception object.</param>
-    public FwkException(string message, Exception innerException)
-      : base(message, innerException)
-    {
-    }
-
-    /// <summary>
-    /// Constructor to allow deserialization of this exception by .Net remoting
-    /// </summary>
-    public FwkException(SerializationInfo info, StreamingContext context)
-      : base(info, context)
-    {
-    }
-  }
-
-  [Serializable]
-  public struct FwkTaskData
-  {
-    #region Private members
-
-    private string m_regionTag;
-    private string m_name;
-    private int m_numClients;
-    private int m_numKeys;
-    private int m_valueSize;
-    private int m_numThreads;
-
-    #endregion
-
-    #region Constructor
-
-    public FwkTaskData(string regionTag, string name, int numClients,
-      int numKeys, int valueSize, int numThreads)
-    {
-      m_regionTag = regionTag;
-      m_name = name;
-      m_numClients = numClients;
-      m_numKeys = numKeys;
-      m_valueSize = valueSize;
-      m_numThreads = numThreads;
-    }
-
-    #endregion
-
-    #region Public methods and accessors
-
-    public string RegionTag
-    {
-      get
-      {
-        return m_regionTag;
-      }
-    }
-
-    public string Name
-    {
-      get
-      {
-        return m_name;
-      }
-    }
-
-    public int NumClients
-    {
-      get
-      {
-        return m_numClients;
-      }
-    }
-
-    public int NumKeys
-    {
-      get
-      {
-        return m_numKeys;
-      }
-    }
-
-    public int ValueSize
-    {
-      get
-      {
-        return m_valueSize;
-      }
-    }
-
-    public int NumThreads
-    {
-      get
-      {
-        return m_numThreads;
-      }
-    }
-
-    public string GetLogString()
-    {
-      return string.Format("{0}-{1}-Clients-{2}-Keys-{3}-VSize-{4}-Threads-{5}",
-        m_regionTag, m_name, m_numClients, m_numKeys, m_valueSize, m_numThreads);
-    }
-
-    public string GetCSVString()
-    {
-      return string.Format("{0},{1},{2},{3},{4},{5}",
-        m_regionTag, m_name, m_numClients, m_numKeys, m_valueSize, m_numThreads);
-    }
-
-    #endregion
-  }
-
-  public abstract class FwkTest<TKey, TVal> : FwkReadData
-  {
-    #region Private members
-
-    private static FwkTest<TKey, TVal> m_currentTest = null;
-    private FwkTaskData m_taskData;
-    private List<string> m_taskRecords;
-    private const NEWAPI.CredentialGenerator.ClassCode DefaultSecurityCode =
-      NEWAPI.CredentialGenerator.ClassCode.LDAP;
-
-    #endregion
-
-    #region Public accessors and constants
-
-    public static FwkTest<TKey, TVal> CurrentTest
-    {
-      get
-      {
-        return m_currentTest;
-      }
-    }
-
-    public const string JavaServerBB = "Cacheservers";
-    public const string EndPointTag = "ENDPOINT:";
-    public const string HeapLruLimitKey = "heapLruLimit";
-    public const string RedundancyLevelKey = "redundancyLevel";
-    public const string ConflateEventsKey = "conflateEvents";
-    public const string SecurityParams = "securityParams";
-    public const string SecurityScheme = "securityScheme";
-    public const string JavaServerEPCountKey = "ServerEPCount";
-    public const string EndPoints = "EndPoints";
-
-    public static Properties<string, string> PER_CLIENT_FOR_MULTIUSER = null;
-    #endregion
-
-    #region Protected members
-
-    protected FwkTaskData TaskData
-    {
-      get
-      {
-        return m_taskData;
-      }
-    }
-
-    #endregion
-
-    #region Public methods
-
-    public FwkTest()
-      : base()
-    {
-      m_currentTest = this;
-      m_taskData = new FwkTaskData();
-      m_taskRecords = new List<string>();
-    }
-
-    public virtual void FwkException(string message)
-    {
-      FwkSevere(message);
-      throw new FwkException(message);
-    }
-
-    public virtual void FwkException(string fmt, params object[] paramList)
-    {
-      FwkException(string.Format(fmt, paramList));
-    }
-
-    public virtual void FwkSevere(string message)
-    {
-      Util.Log(Util.LogLevel.Error, "FWKLIB:: Task[{0}] Severe: {1}",
-        TaskName, message);
-    }
-
-    public virtual void FwkSevere(string fmt, params object[] paramList)
-    {
-      FwkSevere(string.Format(fmt, paramList));
-    }
-
-    public virtual void FwkWarn(string message)
-    {
-      Util.Log(Util.LogLevel.Warning, "FWKLIB:: Task[{0}]: {1}",
-        TaskName, message);
-    }
-
-    public virtual void FwkWarn(string fmt, params object[] paramList)
-    {
-      FwkWarn(string.Format(fmt, paramList));
-    }
-
-    public virtual void FwkInfo(string message)
-    {
-      Util.Log(Util.LogLevel.Info, "FWKLIB:: Task[{0}]: {1}",
-        TaskName, message);
-    }
-
-    public virtual void FwkInfo(string fmt, params object[] paramList)
-    {
-      FwkInfo(string.Format(fmt, paramList));
-    }
-
-    public virtual void FwkAssert(bool condition, string message)
-    {
-      if (!condition)
-      {
-        FwkException(message);
-      }
-    }
-
-    public virtual void FwkAssert(bool condition, string fmt,
-      params object[] paramList)
-    {
-      if (!condition)
-      {
-        FwkException(fmt, paramList);
-      }
-    }
-
-    public static void LogException(string message)
-    {
-      throw new FwkException(message);
-    }
-
-    public static void LogException(string fmt, params object[] paramList)
-    {
-      LogException(string.Format(fmt, paramList));
-    }
-
-    public static void LogSevere(string message)
-    {
-      Util.Log(Util.LogLevel.Error, "FWKLIB:: Severe: {0}", message);
-    }
-
-    public static void LogSevere(string fmt, params object[] paramList)
-    {
-      LogSevere(string.Format(fmt, paramList));
-    }
-
-    public static void LogWarn(string message)
-    {
-      Util.Log(Util.LogLevel.Warning, "FWKLIB:: {0}", message);
-    }
-
-    public static void LogWarn(string fmt, params object[] paramList)
-    {
-      LogWarn(string.Format(fmt, paramList));
-    }
-
-    public static void LogInfo(string message)
-    {
-      Util.Log(Util.LogLevel.Info, "FWKLIB:: {0}", message);
-    }
-
-    public static void LogInfo(string fmt, params object[] paramList)
-    {
-      LogInfo(string.Format(fmt, paramList));
-    }
-
-    public static void LogAssert(bool condition, string message)
-    {
-      if (!condition)
-      {
-        LogException(message);
-      }
-    }
-
-    public static void LogAssert(bool condition, string fmt,
-      params object[] paramList)
-    {
-      if (!condition)
-      {
-        LogException(fmt, paramList);
-      }
-    }
-
-    public virtual IRegion<TKey, TVal> GetRootRegion()
-    {
-      string rootRegionData = GetStringValue("regionSpec");
-      //rootRegionData = rootRegionData + "New";
-      if (rootRegionData == null)
-      {
-        return null;
-      }
-      string rootRegionName = GetRegionName(rootRegionData);
-      try
-      {
-        return CacheHelper<TKey, TVal>.GetVerifyRegion(rootRegionName);
-      }
-      catch
-      {
-        return null;
-      }
-    }
-    
-    public CredentialGenerator GetCredentialGenerator()
-    {
-      int schemeNumber;
-      try
-      {
-        schemeNumber = (int)Util.BBGet(string.Empty,
-          FwkReadData.TestRunNumKey);
-      }
-      catch (Exception)
-      {
-        schemeNumber = 1;
-      }
-      int schemeSkip = 1;
-      string securityScheme;
-      string bb = "GFE_BB";
-      string key = "scheme";
-      do
-      {
-        securityScheme = GetStringValue(SecurityScheme);
-        Util.BBSet(bb, key, securityScheme);
-      }
-      while (++schemeSkip <= schemeNumber);
-      NEWAPI.CredentialGenerator.ClassCode secCode;
-      try
-      {
-        secCode = (NEWAPI.CredentialGenerator.ClassCode)Enum.Parse(typeof(
-          NEWAPI.CredentialGenerator.ClassCode), securityScheme, true);
-      }
-      catch (Exception)
-      {
-        FwkWarn("Skipping unknown security scheme {0}. Using default " +
-          "security scheme {1}.", securityScheme, DefaultSecurityCode);
-        secCode = DefaultSecurityCode;
-      }
-      if (secCode == NEWAPI.CredentialGenerator.ClassCode.None)
-      {
-        return null;
-      }
-      NEWAPI.CredentialGenerator gen = NEWAPI.CredentialGenerator.Create(secCode, false);
-      if (gen == null)
-      {
-        FwkWarn("Skipping security scheme {0} with no generator. Using " +
-          "default security scheme.", secCode, DefaultSecurityCode);
-        secCode = DefaultSecurityCode;
-        gen = NEWAPI.CredentialGenerator.Create(secCode, false);
-      }
-
-      return gen;
-    }
-
-    public void GetClientSecurityProperties(ref Properties<string, string> props,
-      string regionName)
-    {
-      string securityParams = GetStringValue(SecurityParams);
-      NEWAPI.CredentialGenerator gen;//= GetCredentialGenerator();
-      if (securityParams == null || securityParams.Length == 0 ||
-        (gen = GetCredentialGenerator()) == null)
-      {
-        FwkInfo("Security is DISABLED.");
-        return;
-      }
-
-      FwkInfo("Security params is: " + securityParams);
-      FwkInfo("Security scheme: " + gen.GetClassCode());
-      string dataDir = Util.GetFwkLogDir(Util.SystemType) + "/data";
-      gen.Init(dataDir, dataDir);
-
-      if (props == null)
-      {
-        props = new Properties<string, string>();
-      }
-
-      Properties<string, string> credentials;
-      Random rnd = new Random();
-      if (securityParams.Equals("valid"))
-      {
-        FwkInfo("Getting valid credentials");
-        credentials = gen.GetValidCredentials(rnd.Next());
-      }
-      else if (securityParams.Equals("invalid"))
-      {
-        FwkInfo("Getting invalid credentials");
-        credentials = gen.GetInvalidCredentials(rnd.Next());
-      }
-      else
-      {
-        FwkInfo("Getting credentials for a list of operations");
-        List<OperationCode> opCodes = new List<OperationCode>();
-        while (securityParams != null && securityParams.Length > 0)
-        {
-          securityParams = securityParams.ToLower().Replace("_", "");
-          OperationCode opCode;
-          if (securityParams == "create" || securityParams == "update")
-          {
-            opCode = OperationCode.Put;
-          }
-          else
-          {
-            opCode = (OperationCode)Enum.Parse(typeof(
-              OperationCode), securityParams, true);
-          }
-          opCodes.Add(opCode);
-          securityParams = GetStringValue(SecurityParams);
-          FwkInfo("Next security params: {0}", securityParams);
-        }
-        // For now only XML based authorization is supported
-        NEWAPI.AuthzCredentialGenerator authzGen = new NEWAPI.XmlAuthzCredentialGenerator();
-        authzGen.Init(gen);
-        List<string> regionNameList = new List<string>();
-        if (regionName == null || regionName.Length == 0)
-        {
-          regionName = GetStringValue("regionPaths");
-        }
-        while (regionName != null && regionName.Length > 0)
-        {
-          regionNameList.Add(regionName);
-          regionName = GetStringValue("regionPaths");
-        }
-        string[] regionNames = null;
-        if (regionNameList.Count > 0)
-        {
-          regionNames = regionNameList.ToArray();
-        }
-        credentials = authzGen.GetAllowedCredentials(opCodes.ToArray(),
-          regionNames, rnd.Next());
-      }
-      PER_CLIENT_FOR_MULTIUSER = credentials;
-      NEWAPI.Utility.GetClientProperties(gen.AuthInit, credentials, ref props);
-      FwkInfo("Security properties entries: {0}", props);
-    }
-    private string[] GetRoundRobinEP()
-    {
-      int contactnum = GetUIntValue("contactNum");
-      string label = "EndPoints";
-      int epCount = (int)Util.BBGet(JavaServerBB, JavaServerEPCountKey);
-      //int epCount = (int)Util.BBGet("GFE_BB", "EP_COUNT");
-      if (contactnum < 0)
-        contactnum = epCount;
-      string[] rbEP = new string[contactnum];
-      string currEPKey = "CURRENTEP_COUNT";
-      int currentEP = (int)Util.BBIncrement("GFERR_BB", currEPKey);
-      for (int i = 0; i < contactnum; i++)
-      {
-        if (currentEP > epCount)
-        {
-          Util.BBSet("GFERR_BB", currEPKey, 0);
-          currentEP = (int)Util.BBIncrement("GFERR_BB", currEPKey);
-        }
-        string key = label + "_" + currentEP.ToString();
-        string ep = (string)Util.BBGet(JavaServerBB, key);
-        rbEP[i] = ep;
-        FwkInfo("GetRoundRobinEP = {0} key = {1} currentEP =  {2}", ep, key, currentEP);
-        //  rbEP[i] = ep;
-      }
-      return rbEP;
-    }
-    private void XMLParseEndPoints(string ep, bool isServer, PoolFactory pf)
-    {
-      string[] eps = ep.Split(',');
-      if (isServer)
-      {
-        bool disableShufflingEP = GetBoolValue("disableShufflingEP"); // smoke perf test
-        if (disableShufflingEP)
-        {
-          string[] rbep = GetRoundRobinEP();
-          for (int cnt = 0; cnt < rbep.Length; cnt++)
-          {
-            FwkInfo("round robin endpoint = {0}", rbep[cnt]);
-            //string[] rep = rbep[cnt].Split(',');
-            //foreach (string endpoint in eps)
-            //{
-              string hostName = rbep[cnt].Split(':')[0];
-              int portNum = int.Parse(rbep[cnt].Split(':')[1]);
-              pf.AddServer(hostName, portNum);
-            //}
-          }
-        }
-        else
-        {
-          foreach (string endpoint in eps)
-          {
-            string hostName = endpoint.Split(':')[0];
-            int portNum = int.Parse(endpoint.Split(':')[1]);
-            pf.AddServer(hostName, portNum);
-          }
-        }
-      }
-      else
-      {
-        foreach (string endpoint in eps)
-        {
-          string hostName = endpoint.Split(':')[0];
-          int portNum = int.Parse(endpoint.Split(':')[1]);
-          pf.AddLocator(hostName, portNum);
-        }
-      }
-    }
-
-     
-      private void CreateCache()
-    {
-      Properties<string,string> dsProps = new Properties<string,string>();
-      ResetKey("PdxReadSerialized");
-      bool pdxReadSerialized = GetBoolValue("PdxReadSerialized");
-      ResetKey("isDurable");
-      bool isDC = GetBoolValue("isDurable");
-      ResetKey("durableTimeout");
-      int durableTimeout = 300;
-      string durableClientId = "";
-      string conflateEvents = GetStringValue(ConflateEventsKey);
-      if (isDC)
-      {
-        durableTimeout = GetUIntValue("durableTimeout");
-        bool isFeeder = GetBoolValue("isFeeder");
-        if (isFeeder)
-        {
-          durableClientId = "Feeder";
-          // VJR: Setting FeederKey because listener cannot read boolean isFeeder
-          // FeederKey is used later on by Verify task to identify feeder's key in BB
-          durableClientId = String.Format("ClientName_{0}_Count", Util.ClientNum);
-       }
-        else
-        {
-          durableClientId = String.Format("ClientName_{0}", Util.ClientNum);
-        }
-        //Util.BBSet("DURABLEBB", durableClientId,0);
-        CacheHelper<TKey, TVal>.InitConfigForPoolDurable(durableClientId, durableTimeout, conflateEvents, false);
-      }
-      else if (pdxReadSerialized)
-      {
-          CacheHelper<TKey, TVal>.InitConfigPdxReadSerialized(dsProps, pdxReadSerialized);
-      }
-      else
-          CacheHelper<TKey, TVal>.InitConfigPool(dsProps);
-    }
-    public void CreateCacheConnect()
-    {
-      CreateCache();
-    }
-    public virtual void CreatePool()
-    {
-      CreateCache();
-      PoolFactory pf =  CacheHelper<TKey, TVal>.DCache.GetPoolFactory();
-      ResetKey("poolSpec");
-      string poolRegionData = GetStringValue("poolSpec");
-      FwkInfo("PoolSpec is :{0}", poolRegionData);
-      string poolName = null;
-      SetPoolAttributes(pf, poolRegionData, ref poolName);
-      
-      if (CacheHelper<TKey, TVal>.DCache.GetPoolManager().Find(poolName) == null)
-      {
-        Pool pool = pf.Create(poolName);
-        FwkInfo("Pool attributes are {0}:", PoolAttributesToString(pool));
-      }
-    }
-    public void SetPoolAttributes(PoolFactory pf, string spec, ref string poolName)
-    {
-      ReadXmlData(null, pf, spec, ref poolName);
-    }
-    private void SetThisPoolAttributes(PoolFactory pf,string key, string value)
-    {
-      switch (key)
-      {
-        case "free-connection-timeout":
-          int fct = int.Parse(value);
-           pf.SetFreeConnectionTimeout(TimeSpan.FromSeconds(fct));
-           break;
-        case "idle-timeout":
-          int it = int.Parse(value);
-            pf.SetIdleTimeout(TimeSpan.FromSeconds(it));
-            break;
-        case "load-conditioning-interval":
-          int lci = int.Parse(value);
-            pf.SetLoadConditioningInterval(TimeSpan.FromSeconds(lci));
-          break;
-        case "max-connections":
-          int mxc = int.Parse(value);
-            pf.SetMaxConnections(mxc);
-            break;
-        case "min-connections":
-          int minc = int.Parse(value);
-           pf.SetMinConnections(minc);
-           break;
-        case "ping-interval":
-          int pi = int.Parse(value);
-            pf.SetPingInterval(TimeSpan.FromSeconds(pi));
-            break;
-        case "read-timeout":
-          int rt = int.Parse(value);
-           pf.SetReadTimeout(TimeSpan.FromSeconds(rt));
-           break;
-        case "retry-attempts":
-          int ra = int.Parse(value);
-            pf.SetRetryAttempts(ra);
-            break;
-        case "server-group":
-           pf.SetServerGroup(value);
-          break;
-        case "socket-buffer-size":
-          int bs = int.Parse(value);
-          pf.SetSocketBufferSize(bs);
-          break;
-        case "subscription-ack-interval":
-           int acki = int.Parse(value);
-            pf.SetSubscriptionAckInterval(TimeSpan.FromSeconds(acki));
-            break;
-        case "subscription-enabled":
-           if (value == "true")
-            {
-              pf.SetSubscriptionEnabled(true);
-            }
-            else
-            {
-              pf.SetSubscriptionEnabled(false);
-            }
-          break;
-        case "thread-local-connections":
-          if (value == "true")
-          {
-              pf.SetThreadLocalConnections(true);
-          }
-          else
-          {
-              pf.SetThreadLocalConnections(false);
-          }
-          break;
-        case "subscription-message-tracking-timeout":
-            int smtt = int.Parse(value);
-            pf.SetSubscriptionMessageTrackingTimeout(TimeSpan.FromSeconds(smtt));
-            break;
-        case "subscription-redundancy":
-            int sr = int.Parse(value);
-            pf.SetSubscriptionRedundancy(sr);
-            break;
-        case "locators":
-          string locatorAddress = (string)Util.BBGet(string.Empty, "LOCATOR_ADDRESS_POOL");
-            XMLParseEndPoints(locatorAddress, false, pf);
-            break;
-        case "servers":
-            string ServerEndPoints = (string)Util.BBGet("Cacheservers", "ENDPOINT:");
-            XMLParseEndPoints(ServerEndPoints, true, pf);
-            break;
-      }
-    }
-    /*
-    public PoolFactory CreatePoolFactoryAndSetAttribute()
-    {
-      PoolFactory pf = PoolManager.CreateFactory();
-      ResetKey("poolSpec");
-      string poolRegionData = GetStringValue("poolSpec");
-      //FwkInfo("PoolSpec is :{0}", poolRegionData);
-      //Properties prop = GetNewPoolAttributes(poolRegionData);
-      staing poolName = null;
-      SetPoolAttributes(pf, poolRegionData,poolName);
-      return pf;
-    }*/
-    private void ReadXmlData(RegionFactory af, PoolFactory pf,string spec, ref string poolname)
-    {
-      const string DriverNodeName = "test-driver";
-      string xmlFile = Util.BBGet(string.Empty, "XMLFILE") as string;
-      XmlNode node = XmlNodeReaderWriter.GetInstance(xmlFile).GetNode(
-           '/' + DriverNodeName);
-      XmlNodeList xmlNodes = node.SelectNodes("data");
-      if (xmlNodes != null)
-      {
-        foreach (XmlNode xmlNode in xmlNodes)
-        {
-          XmlAttribute tmpattr = xmlNode.Attributes["name"];
-          if(tmpattr.Value == spec)
-          {
-          if (xmlNode.FirstChild.Name == "snippet")
-          {
-            string regionName;
-            if (xmlNode.FirstChild.FirstChild.Name == "region")
-            {
-              XmlAttribute nameattr = xmlNode.FirstChild.FirstChild.Attributes["name"];
-              regionName = nameattr.Value;
-              XmlNode attrnode = xmlNode.FirstChild.FirstChild.FirstChild;
-
-              if (attrnode.Name == "region-attributes")
-              {
-                XmlAttributeCollection attrcoll = attrnode.Attributes;
-                if (attrcoll != null)
-                {
-                  foreach (XmlAttribute eachattr in attrcoll)
-                  {
-                    SetThisAttribute(eachattr.Name, eachattr, af, ref poolname);
-                   }
-                }
-                if (attrnode.ChildNodes != null)
-                {
-                  foreach (XmlNode tmpnode in attrnode.ChildNodes)
-                  {
-                    SetThisAttribute(tmpnode.Name, tmpnode, af, ref poolname);
-                  }
-                }
-                else
-                {
-                  throw new IllegalArgException("The xml file passed has an unknown format");
-                }
-              }
-            }
-            else if (xmlNode.FirstChild.FirstChild.Name == "pool")
-            {
-              XmlAttribute nameattr = xmlNode.FirstChild.FirstChild.Attributes["name"];
-              poolname = nameattr.Value;
-              // Now collect the pool atributes
-              Properties<string,string> prop = new Properties<string,string>();
-              XmlAttributeCollection attrcoll = xmlNode.FirstChild.FirstChild.Attributes;
-              if (attrcoll != null)
-              {
-                foreach (XmlAttribute eachattr in attrcoll)
-                {
-                  SetThisPoolAttributes(pf, eachattr.Name, eachattr.Value);
-                }
-              }
-              else
-              {
-                throw new IllegalArgException("The xml file passed has an unknown format");
-              }
-            }
-          }
-        }
-        }
-      }
-    }
-    private static ExpirationAction StrToExpirationAction(string str)
-    {
-      return (ExpirationAction)Enum.Parse(typeof(ExpirationAction),
-        str.Replace("-", string.Empty), true);
-    }
-    public void SetRegionAttributes(RegionFactory af, string spec, ref string poolname)
-    {
-      ReadXmlData(af, null,spec, ref poolname);
-    }
-    public static void SetThisAttribute(string name, XmlNode node, RegionFactory af, ref string poolname)
-    {
-      string value = node.Value;
-      switch (name)
-      {
-        case "caching-enabled":
-          if (value == "true")
-          {
-            af.SetCachingEnabled(true);
-          }
-          else
-          {
-            af.SetCachingEnabled(false);
-          }
-          break;
-
-        case "load-factor":
-          float lf = float.Parse(value);
-          af.SetLoadFactor(lf);
-          break;
-
-        case "concurrency-level":
-          int cl = int.Parse(value);
-          af.SetConcurrencyLevel(cl);
-          break;
-
-        case "lru-entries-limit":
-          uint lel = uint.Parse(value);
-          af.SetLruEntriesLimit(lel);
-          break;
-
-        case "initial-capacity":
-          int ic = int.Parse(value);
-          af.SetInitialCapacity(ic);
-          break;
-
-        case "disk-policy":
-          if (value == "none")
-          {
-            af.SetDiskPolicy(DiskPolicyType.None);
-          }
-          else if (value == "overflows")
-          {
-            af.SetDiskPolicy(DiskPolicyType.Overflows);
-          }
-          else
-          {
-            throw new IllegalArgException("Unknown disk policy");
-          }
-          break;
-      case "concurrency-checks-enabled":
-          bool cce = bool.Parse(value);
-          af.SetConcurrencyChecksEnabled(cce);
-          break;
-      case "pool-name":
-          if (value.Length != 0)
-          {
-            af.SetPoolName(value);
-          }
-          else
-          {
-            af.SetPoolName(value);
-          }
-          poolname = value;
-          break;
-        
-        case "region-time-to-live":
-          XmlNode nlrttl = node.FirstChild;
-          if (nlrttl.Name == "expiration-attributes")
-          {
-            XmlAttributeCollection exAttrColl = nlrttl.Attributes;
-            ExpirationAction action = StrToExpirationAction(exAttrColl["action"].Value);
-            string rttl = exAttrColl["timeout"].Value;
-            af.SetRegionTimeToLive(action, TimeSpan.FromSeconds(uint.Parse(rttl)));
-          }
-          else
-          {
-            throw new IllegalArgException("The xml file passed has an unknowk format");
-          }
-          break;
-
-        case "region-idle-time":
-          XmlNode nlrit = node.FirstChild;
-          if (nlrit.Name == "expiration-attributes")
-          {
-            XmlAttributeCollection exAttrColl = nlrit.Attributes;
-            ExpirationAction action = StrToExpirationAction(exAttrColl["action"].Value);
-            string rit = exAttrColl["timeout"].Value;
-            af.SetRegionIdleTimeout(action, TimeSpan.FromSeconds(uint.Parse(rit)));
-          }
-          else
-          {
-            throw new IllegalArgException("The xml file passed has an unknowk format");
-          }
-          break;
-
-        case "entry-time-to-live":
-          XmlNode nlettl = node.FirstChild;
-          if (nlettl.Name == "expiration-attributes")
-          {
-            XmlAttributeCollection exAttrColl = nlettl.Attributes;
-            ExpirationAction action = StrToExpirationAction(exAttrColl["action"].Value);
-            string ettl = exAttrColl["timeout"].Value;
-            af.SetEntryTimeToLive(action, TimeSpan.FromSeconds(uint.Parse(ettl)));
-          }
-          else
-          {
-            throw new IllegalArgException("The xml file passed has an unknowk format");
-          }
-          break;
-
-        case "entry-idle-time":
-          XmlNode nleit = node.FirstChild;
-          if (nleit.Name == "expiration-attributes")
-          {
-            XmlAttributeCollection exAttrColl = nleit.Attributes;
-            ExpirationAction action = StrToExpirationAction(exAttrColl["action"].Value);
-            string eit = exAttrColl["timeout"].Value;
-            af.SetEntryIdleTimeout(action, TimeSpan.FromSeconds(uint.Parse(eit)));
-          }
-          else
-          {
-            throw new IllegalArgException("The xml file passed has an unknowk format");
-          }
-          break;
-
-        case "cache-loader":
-          XmlAttributeCollection loaderattrs = node.Attributes;
-          string loaderlibrary = null;
-          string loaderfunction = null;
-          foreach (XmlAttribute tmpattr in loaderattrs)
-          {
-            if (tmpattr.Name == "library")
-            {
-              loaderlibrary = tmpattr.Value;
-            }
-            else if (tmpattr.Name == "function")
-            {
-              loaderfunction = tmpattr.Value;
-            }
-            else
-            {
-              throw new IllegalArgException("cahe-loader attributes in improper format");
-            }
-          }
-          if (loaderlibrary != null && loaderfunction != null)
-          {
-            if (loaderfunction.IndexOf('.') < 0)
-            {
-              Type myType = typeof(FwkTest<TKey, TVal>);
-              loaderfunction = myType.Namespace + '.' +
-                loaderlibrary + "<" + typeof(TKey) + "," + typeof(TVal) + ">." + loaderfunction;
-              loaderlibrary = myType.Assembly.FullName;
-
-              ICacheLoader<TKey, TVal> loader = null;
-
-              String createCacheLoader = myType.Namespace + '.' +
-                loaderlibrary + "<" + typeof(TKey) + "," + typeof(TVal) + ">." + "createCacheLoader";
-
-              Util.Log(Util.LogLevel.Info, "Instantiated Loader = {0} ", loaderfunction);
-              af.SetCacheLoader(loader);
-            }
-            //af.SetCacheLoader(loaderlibrary, loaderfunction);
-          }
-          break;
-
-        case "cache-listener":
-          XmlAttributeCollection listenerattrs = node.Attributes;
-          string listenerlibrary = null;
-          string listenerfunction = null;
-          foreach (XmlAttribute tmpattr in listenerattrs)
-          {
-            if (tmpattr.Name == "library")
-            {
-              listenerlibrary = tmpattr.Value;
-            }
-            else if (tmpattr.Name == "function")
-            {
-              listenerfunction = tmpattr.Value;
-            }
-            else
-            {
-              throw new IllegalArgException("cahe-listener attributes in improper format");
-            }
-          }
-          if (listenerlibrary != null && listenerfunction != null)
-          {
-            if (listenerfunction.IndexOf('.') < 0)
-            {
-              Type myType = typeof(FwkTest<TKey, TVal>);
-              listenerfunction = myType.Namespace + '.' +
-                listenerlibrary + "<" + typeof(TKey) + "," + typeof(TVal) + ">." + listenerfunction;
-              //Util.Log(Util.LogLevel.Info, "rjk1 cache listener in fwktest: myType.Namespace {0} " +
-              //          " listenerlibrary {1} listenerfunction {2}", myType.Namespace, listenerlibrary, listenerfunction);
-              //listenerlibrary = myType.Assembly.FullName;
-              //Util.Log(Util.LogLevel.Info, "rjk cache listener in fwktest inside if condition: listenerlibrary {0} listenerfunction {1}", listenerlibrary, listenerfunction);
-
-              Util.Log(Util.LogLevel.Info, "listenerlibrary is {0} and listenerfunction is {1}", listenerlibrary, listenerfunction);
-              ICacheListener<TKey, TVal> listener = null;
-
-              String perfTestCacheListener = myType.Namespace + '.' +
-                  listenerlibrary + "<" + typeof(TKey) + "," + typeof(TVal) + ">." + "createPerfTestCacheListener";
-              String conflationTestCacheListener = myType.Namespace + '.' +
-                  listenerlibrary + "<" + typeof(TKey) + "," + typeof(TVal) + ">." + "createConflationTestCacheListener";
-              String latencyListener = myType.Namespace + '.' +
-                  listenerlibrary + "<" + typeof(TKey) + "," + typeof(TVal) + ">." + "createLatencyListenerP";
-              String dupChecker = myType.Namespace + '.' +
-                  listenerlibrary + "<" + typeof(TKey) + "," + typeof(TVal) + ">." + "createDupChecker";
-              String createDurableCacheListener = myType.Namespace + '.' +
-                  listenerlibrary + "<" + typeof(TKey) + "," + typeof(TVal) + ">." + "createDurableCacheListener";
-              String createConflationTestCacheListenerDC = myType.Namespace + '.' +
-                  listenerlibrary + "<" + typeof(TKey) + "," + typeof(TVal) + ">." + "createConflationTestCacheListenerDC";
-              String createDurablePerfListener = myType.Namespace + '.' +
-                  listenerlibrary + "<" + typeof(TKey) + "," + typeof(TVal) + ">." + "createDurablePerfListener";              
-              String CreateDurableCacheListenerSP = myType.Namespace + '.' +
-                  listenerlibrary + "<" + typeof(TKey) + "," + typeof(TVal) + ">." + "createDurableCacheListenerSP";
-              String createLatencyListener = myType.Namespace + '.' +
-                  listenerlibrary + "<" + typeof(TKey) + "," + typeof(TVal) + ">." + "createLatencyListener";
-              String createSilenceListener = myType.Namespace + '.' +
-                  listenerlibrary + "<" + typeof(TKey) + "," + typeof(TVal) + ">." + "createSilenceListener";
-              String createDeltaValidationCacheListener = myType.Namespace + '.' +
-                  listenerlibrary + "<" + typeof(TKey) + "," + typeof(TVal) + ">." + "createDeltaValidationCacheListener";
-              String createSilenceListenerPdx = myType.Namespace + '.' +
-                                listenerlibrary + "<" + typeof(TKey) + "," + typeof(TVal) + ">." + "createSilenceListenerPdx";
-
-              if (String.Compare(listenerfunction, perfTestCacheListener, true) == 0) {                
-                listener = new PerfTestCacheListener<TKey, TVal>();
-              }
-              else if (String.Compare(listenerfunction, conflationTestCacheListener, true) == 0) {                
-                listener = new ConflationTestCacheListener<TKey, TVal>();
-              }
-              else if (String.Compare(listenerfunction, latencyListener, true) == 0) {                
-                listener = new LatencyListener<TKey, TVal>();
-              }
-              else if (String.Compare(listenerfunction, dupChecker, true) == 0) {                
-                listener = new DupChecker<TKey, TVal>();
-              }
-              else if (String.Compare(listenerfunction, createDurableCacheListener, true) == 0) {                
-                listener = new DurableListener<TKey, TVal>();
-              }
-              else if (String.Compare(listenerfunction, createConflationTestCacheListenerDC, true) == 0) {                
-                listener = new ConflationTestCacheListenerDC<TKey, TVal>();
-              }
-              else if (String.Compare(listenerfunction, createDurablePerfListener, true) == 0) {                
-                listener = new DurablePerfListener<TKey, TVal>();
-              }              
-              else if (String.Compare(listenerfunction, createSilenceListener, true) == 0)
-              {
-                listener = new SilenceListener<TKey, TVal>();
-              }
-              else if (String.Compare(listenerfunction, createSilenceListenerPdx, true) == 0)
-              {
-                  listener = new PDXSilenceListener<TKey, TVal>();
-              }
-              else if (String.Compare(listenerfunction, createDeltaValidationCacheListener, true) == 0)
-              {
-                listener = new DeltaClientValidationListener<TKey, TVal>();
-              }
-              Util.Log(Util.LogLevel.Info, "Instantiated Listener = {0} ", listenerfunction);
-              af.SetCacheListener(listener);              
-            }                       
-            //af.SetCacheListener(listenerlibrary, listenerfunction);
-          }
-          break;
-
-        case "cache-writer":
-          XmlAttributeCollection writerattrs = node.Attributes;
-          string writerlibrary = null;
-          string writerfunction = null;
-          foreach (XmlAttribute tmpattr in writerattrs)
-          {
-            if (tmpattr.Name == "library")
-            {
-              writerlibrary = tmpattr.Value;
-            }
-            else if (tmpattr.Name == "function")
-            {
-              writerfunction = tmpattr.Value;
-            }
-            else
-            {
-              throw new IllegalArgException("cahe-loader attributes in improper format");
-            }
-          }
-          if (writerlibrary != null && writerfunction != null)
-          {
-            if (writerfunction.IndexOf('.') < 0)
-            {
-              Type myType = typeof(FwkTest<TKey, TVal>);
-              writerfunction = myType.Namespace + '.' +
-                writerlibrary + "<" + typeof(TKey) + "," + typeof(TVal) + ">." + writerfunction;
-              writerlibrary = myType.Assembly.FullName;
-            }
-            af.SetCacheWriter(writerlibrary, writerfunction);
-          }
-          break;
-
-        case "persistence-manager":
-          string pmlibrary = null;
-          string pmfunction = null;
-          Properties<string, string> prop = new Properties<string, string>();
-          XmlAttributeCollection pmattrs = node.Attributes;
-          foreach (XmlAttribute attr in pmattrs)
-          {
-            if (attr.Name == "library")
-            {
-                pmlibrary = attr.Value;
-            }
-            else if (attr.Name == "function")
-            {
-                pmfunction = attr.Value;
-            }
-            else
-            {
-              throw new IllegalArgException("Persistence Manager attributes in wrong format: " + attr.Name);
-            }
-          }
-
-          if (node.FirstChild.Name == "properties")
-          {
-            XmlNodeList pmpropnodes = node.FirstChild.ChildNodes;
-            foreach (XmlNode propnode in pmpropnodes)
-            {
-              if (propnode.Name == "property")
-              {
-                XmlAttributeCollection keyval = propnode.Attributes;
-                XmlAttribute keynode = keyval["name"];
-                XmlAttribute valnode = keyval["value"];
-
-                if (keynode.Value == "PersistenceDirectory" || keynode.Value == "EnvironmentDirectory")
-                {
-                  prop.Insert(keynode.Value, valnode.Value);
-                }
-                else if (keynode.Value == "CacheSizeGb" || keynode.Value == "CacheSizeMb"
-                         || keynode.Value == "PageSize" || keynode.Value == "MaxFileSize")
-                {
-                  prop.Insert(keynode.Value, valnode.Value);
-                }
-              }
-            }
-          }
-          af.SetPersistenceManager(pmlibrary, pmfunction, prop);
-          break;
-      }
-    }
-      private static string ConvertStringArrayToString(string[] array)
-      {
-          //
-          // Concatenate all the elements into a StringBuilder.
-          //
-          StringBuilder builder = new StringBuilder();
-          foreach (string value in array)
-          {
-              builder.Append(value);
-              builder.Append('.');
-          }
-          return builder.ToString();
-      }
-
-      private string PoolAttributesToString(Pool attrs)
-      {
-          StringBuilder attrsSB = new StringBuilder();
-          attrsSB.Append(Environment.NewLine + "poolName: " +
-            attrs.Name);
-          attrsSB.Append(Environment.NewLine + "FreeConnectionTimeout: " +
-            attrs.FreeConnectionTimeout);
-          attrsSB.Append(Environment.NewLine + "LoadConditioningInterval: " +
-           attrs.LoadConditioningInterval);
-          attrsSB.Append(Environment.NewLine + "SocketBufferSize: " +
-            attrs.SocketBufferSize);
-          attrsSB.Append(Environment.NewLine + "ReadTimeout: " +
-            attrs.ReadTimeout);
-          attrsSB.Append(Environment.NewLine + "MinConnections: " +
-            attrs.MinConnections);
-          attrsSB.Append(Environment.NewLine + "MaxConnections: " +
-            attrs.MaxConnections);
-          attrsSB.Append(Environment.NewLine + "StatisticInterval: " +
-            attrs.StatisticInterval);
-          attrsSB.Append(Environment.NewLine + "RetryAttempts: " +
-            attrs.RetryAttempts);
-          attrsSB.Append(Environment.NewLine + "SubscriptionEnabled: " +
-            attrs.SubscriptionEnabled);
-          attrsSB.Append(Environment.NewLine + "SubscriptionRedundancy: " +
-            attrs.SubscriptionRedundancy);
-          attrsSB.Append(Environment.NewLine + "SubscriptionAckInterval: " +
-            attrs.SubscriptionAckInterval);
-          attrsSB.Append(Environment.NewLine + "SubscriptionMessageTrackingTimeout: " +
-            attrs.SubscriptionMessageTrackingTimeout);
-          attrsSB.Append(Environment.NewLine + "ServerGroup: " +
-            attrs.ServerGroup);
-          attrsSB.Append(Environment.NewLine + "IdleTimeout: " +
-            attrs.IdleTimeout);
-          attrsSB.Append(Environment.NewLine + "PingInterval: " +
-            attrs.PingInterval);
-          attrsSB.Append(Environment.NewLine + "ThreadLocalConnections: " +
-            attrs.ThreadLocalConnections);
-          attrsSB.Append(Environment.NewLine + "MultiuserAuthentication: " +
-            attrs.MultiuserAuthentication);
-          attrsSB.Append(Environment.NewLine + "PRSingleHopEnabled: " +
-            attrs.PRSingleHopEnabled);
-          attrsSB.Append(Environment.NewLine + "Locators: " );
-          if (attrs.Locators != null && attrs.Locators.Length > 0)
-          {
-              foreach (string value in attrs.Locators)
-              {
-                  attrsSB.Append(value);
-                  attrsSB.Append(',');
-              }
-          }
-          attrsSB.Append(Environment.NewLine + "Servers: " );
-          if (attrs.Servers != null && attrs.Servers.Length > 0)
-          {
-              foreach (string value in attrs.Servers)
-              {
-                  attrsSB.Append(value);
-                  attrsSB.Append(',');
-              }
-          }
-          attrsSB.Append(Environment.NewLine);
-          return attrsSB.ToString();
-      }
-    public virtual IRegion<TKey,TVal> CreateRootRegion()
-    {
-      return CreateRootRegion(null);
-    }
-
-    public virtual IRegion<TKey, TVal> CreateRootRegion(string regionName)
-    {
-      string rootRegionData = GetStringValue("regionSpec");
-      return CreateRootRegion(regionName, rootRegionData);
-    }
-
-    public virtual IRegion<TKey, TVal> CreateRootRegion(string regionName,
-      string rootRegionData)
-    {
-      string tagName = GetStringValue("TAG");
-      string endpoints = Util.BBGet(JavaServerBB, EndPointTag + tagName)
-        as string;
-      return CreateRootRegion(regionName, rootRegionData, endpoints);
-    }
-
-    public virtual IRegion<TKey, TVal> CreateRootRegion(string regionName,
-      string rootRegionData, string endpoints)
-    {
-      if (rootRegionData != null && rootRegionData.Length > 0)
-      {
-        string rootRegionName;
-        if (regionName == null || regionName.Length == 0)
-        {
-          rootRegionName = GetRegionName(rootRegionData);
-        }
-        else
-        {
-          rootRegionName = regionName;
-        }
-        if (rootRegionName != null && rootRegionName.Length > 0)
-        {
-          IRegion<TKey, TVal> region;
-          if ((region = CacheHelper<TKey, TVal>.GetRegion(rootRegionName)) == null)
-          {
-            Properties<string,string> dsProps = new Properties<string,string>();
-            GetClientSecurityProperties(ref dsProps, rootRegionName); 
-            
-            // Check for any setting of heap LRU limit
-            int heapLruLimit = GetUIntValue(HeapLruLimitKey);
-            if (heapLruLimit > 0)
-            {
-              dsProps.Insert("heap-lru-limit", heapLruLimit.ToString());
-            }
-            string conflateEvents = GetStringValue(ConflateEventsKey);
-            if (conflateEvents != null && conflateEvents.Length > 0)
-            {
-              dsProps.Insert("conflate-events", conflateEvents);
-            }
-            
-            ResetKey("sslEnable");
-            bool isSslEnable = GetBoolValue("sslEnable");
-            if (isSslEnable)
-            {
-              dsProps.Insert("ssl-enabled", "true");
-              string keyStorePath = Util.GetFwkLogDir(Util.SystemType) + "/data/keystore";
-              string pubkey = keyStorePath + "/client_truststore.pem";
-              string privkey = keyStorePath + "/client_keystore.pem";
-              dsProps.Insert("ssl-keystore", privkey);
-              dsProps.Insert("ssl-truststore", pubkey);
-            }
-            //Properties rootAttrs = GetNewRegionAttributes(rootRegionData);
-            // Check if this is a thin-client region; if so set the endpoints
-            RegionFactory rootAttrs = null; 
-            //RegionFactory rootAttrs = CacheHelper<TKey, TVal>.DCache.CreateRegionFactory(RegionShortcut.PROXY);
-            string m_isPool = null;
-              //SetRegionAttributes(rootAttrs, rootRegionData, ref m_isPool);
-            int redundancyLevel = 0;
-            redundancyLevel = GetUIntValue(RedundancyLevelKey);
-            //string m_isPool = rootAttrs.Find("pool-name");
-            string mode = Util.GetEnvironmentVariable("POOLOPT");
-            if (endpoints != null && endpoints.Length > 0)
-            {
-              //redundancyLevel = GetUIntValue(RedundancyLevelKey);
-              //if (redundancyLevel > 0)
-              //{
-                if (mode == "poolwithendpoints" || mode == "poolwithlocator" )//|| m_isPool != null)
-                {
-                  FwkInfo("Setting the pool-level configurations");
-                  CacheHelper<TKey, TVal>.InitConfigPool(dsProps);
-                }
-                try
-                {
-                    rootAttrs = CacheHelper<TKey, TVal>.DCache.CreateRegionFactory(RegionShortcut.PROXY);
-                }
-                catch (Exception e)
-                {
-                    FwkException("GOT this {0}",e.Message);
-                }
-              FwkInfo("Creating region factory");
-              SetRegionAttributes(rootAttrs, rootRegionData, ref m_isPool);
-            
-            }
-            rootAttrs = CreatePool(rootAttrs, redundancyLevel);
-            ResetKey("NumberOfRegion");
-            int numRegions = GetUIntValue("NumberOfRegion");
-            if (numRegions < 1)
-              numRegions = 1;
-            for (int i = 0; i < numRegions; i++)
-            {
-              if(i>0)
-               region = CacheHelper<TKey, TVal>.CreateRegion(rootRegionName+"_"+i, rootAttrs);
-              else
-               region = CacheHelper<TKey, TVal>.CreateRegion(rootRegionName, rootAttrs);
-            }
-            Apache.Geode.Client.RegionAttributes<TKey, TVal> regAttr = region.Attributes;
-            FwkInfo("Region attributes for {0}: {1}", rootRegionName,
-              CacheHelper<TKey, TVal>.RegionAttributesToString(regAttr));
-          }
-          return region;
-        }
-      }
-      return null;
-    }
-    private void ParseEndPoints(string ep, bool isServer, int redundancyLevel)
-    {
-      string poolName = "_Test_Pool";
-      PoolFactory pf = CacheHelper<TKey, TVal>.DCache.GetPoolFactory();
-      string[] eps = ep.Split(',');
-      foreach (string endpoint in eps)
-      {
-        string hostName = endpoint.Split(':')[0];
-        int portNum = int.Parse(endpoint.Split(':')[1]);
-        if (isServer)
-        {
-          FwkInfo("adding pool host port for server");
-          pf.AddServer(hostName, portNum);
-        }
-        else
-        {
-          FwkInfo("adding pool host port for server");
-          pf.AddLocator(hostName, portNum);
-        }
-      }
-
-      pf.SetSubscriptionEnabled(true);
-
-      ResetKey("multiUserMode");
-      bool multiUserMode = GetBoolValue("multiUserMode");
-      if (multiUserMode)
-      {
-        pf.SetMultiuserAuthentication(true);
-        FwkInfo("MultiUser Mode is set to true");
-      }
-      else
-      {
-        pf.SetMultiuserAuthentication(false);
-        FwkInfo("MultiUser Mode is set to false");
-      }
-      pf.SetFreeConnectionTimeout(TimeSpan.FromMilliseconds(180000));
-      pf.SetReadTimeout(TimeSpan.FromMilliseconds(180000));
-      pf.SetMinConnections(20);
-      pf.SetMaxConnections(30);
-
-      if (redundancyLevel > 0)
-        pf.SetSubscriptionRedundancy(redundancyLevel);
-      if (CacheHelper<TKey, TVal>.DCache.GetPoolManager().Find(poolName) == null)
-      {
-        Pool pool = pf.Create(poolName);
-        FwkInfo("Pool attributes are {0}:", PoolAttributesToString(pool));
-      }
-      FwkInfo("Create Pool complete with poolName= {0}", poolName);
-    }
-   
-    public virtual RegionFactory CreatePool(RegionFactory attr, int redundancyLevel)
-    {
-      string mode = Util.GetEnvironmentVariable("POOLOPT");
-      if (mode == "poolwithendpoints")
-      {
-        string EndPoints = Util.BBGet(JavaServerBB, EndPointTag) as string;
-        ParseEndPoints(EndPoints, true, redundancyLevel);
-        attr = attr.SetPoolName("_Test_Pool");
-      }
-      else if (mode == "poolwithlocator")
-      {
-        string locatorAddress = (string)Util.BBGet(string.Empty, "LOCATOR_ADDRESS_POOL");
-        ParseEndPoints(locatorAddress, false, redundancyLevel);
-        attr = attr.SetPoolName("_Test_Pool");
-      }
-      return attr;
-    }
-   
-    // TODO: format an appropriate line for logging.
-    public virtual void SetTaskRunInfo(string regionTag, string taskName,
-      int numKeys, int numClients, int valueSize, int numThreads)
-    {
-      m_taskData = new FwkTaskData(regionTag, taskName, numKeys, numClients,
-        valueSize, numThreads);
-    }
-
-    public virtual void AddTaskRunRecord(int iters, TimeSpan elapsedTime)
-    {
-      double opsPerSec = iters / elapsedTime.TotalSeconds;
-      double micros = elapsedTime.TotalMilliseconds * 1000;
-      string recordStr = string.Format("{0} -- {1}ops/sec, {2} ops, {3} micros",
-        m_taskData.GetLogString(), opsPerSec, iters, micros);
-      lock (((ICollection)m_taskRecords).SyncRoot)
-      {
-        m_taskRecords.Add(recordStr);
-      }
-      Util.RawLog(string.Format("[PerfSuite] {0}{1}", recordStr,
-        Environment.NewLine));
-      Util.RawLog(string.Format("[PerfData],{0},{1},{2},{3},{4}{5}",
-        m_taskData.GetCSVString(), opsPerSec, iters, micros,
-        DateTime.Now.ToString("G"), Environment.NewLine));
-    }
-
-    public virtual void RunTask(ClientTask task, int numThreads,
-      int iters, int timedInterval, int maxTime, object data)
-    {
-      ClientBase client = null;
-      try
-      {
-        if (numThreads > 1)
-        {
-          client = ClientGroup.Create(UnitThread.Create, numThreads);
-        }
-        else
-        {
-          client = new UnitThread();
-        }
-        UnitFnMethod<UnitFnMethod<int, object>, int, object> taskDeleg =
-          new UnitFnMethod<UnitFnMethod<int, object>, int, object>(
-          client.Call<int, object>);
-        task.StartRun();
-        IAsyncResult taskRes = taskDeleg.BeginInvoke(
-          task.DoTask, iters, data, null, null);
-        if (timedInterval > 0)
-        {
-          System.Threading.Thread.Sleep(timedInterval);
-          task.EndRun();
-        }
-        if (maxTime <= 0)
-        {
-          taskRes.AsyncWaitHandle.WaitOne();
-        }
-        else if (!taskRes.AsyncWaitHandle.WaitOne(maxTime, false))
-        {
-          throw new ClientTimeoutException("RunTask() timed out.");
-        }
-        taskDeleg.EndInvoke(taskRes);
-        task.EndRun();
-      }
-      finally
-      {
-        if (client != null)
-        {
-          client.Dispose();
-        }
-      }
-    }
-
-    public virtual void EndTask()
-    {
-      lock (((ICollection)m_taskRecords).SyncRoot)
-      {
-        if (m_taskRecords.Count > 0)
-        {
-          StringBuilder summarySB = new StringBuilder();
-          foreach (string taskRecord in m_taskRecords)
-          {
-            summarySB.Append(Environment.NewLine + '\t' + taskRecord);
-          }
-          FwkInfo("TIMINGS:: Summary: {0}", summarySB.ToString());
-          m_taskRecords.Clear();
-        }
-      }
-      ClearCachedKeys();
-      PopTaskName();
-    }
-
-    public QueryService CheckQueryService()
-    {
-      string mode = Util.GetEnvironmentVariable("POOLOPT");
-      Pool/*<TKey, TVal>*/ pool = CacheHelper<TKey, TVal>.DCache.GetPoolManager().Find("_Test_Pool");
-      return pool.GetQueryService();
-    }
-
-    #endregion
-  }
-}
diff --git a/tests/cli/NewFwkLib/NewFwkLib.csproj.in b/tests/cli/NewFwkLib/NewFwkLib.csproj.in
deleted file mode 100644
index 71abeff..0000000
--- a/tests/cli/NewFwkLib/NewFwkLib.csproj.in
+++ /dev/null
@@ -1,266 +0,0 @@
-<?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.
--->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
-  <PropertyGroup>
-    <CMAKE_SOURCE_DIR>${CMAKE_SOURCE_DIR_NATIVE}</CMAKE_SOURCE_DIR>
-    <CMAKE_CURRENT_SOURCE_DIR>${CMAKE_CURRENT_SOURCE_DIR_NATIVE}</CMAKE_CURRENT_SOURCE_DIR>
-	<CMAKE_BINARY_DIR>${CMAKE_BINARY_DIR_NATIVE}</CMAKE_BINARY_DIR>
-	<CMAKE_CURRENT_BINARY_DIR>${CMAKE_CURRENT_BINARY_DIR_NATIVE}</CMAKE_CURRENT_BINARY_DIR>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">x64</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{3DAA5FF5-9FA3-3543-9293-7197636A16C3}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Apache.Geode.Client.FwkLib</RootNamespace>
-    <AssemblyName>NewFwkLib</AssemblyName>
-    <SignAssembly>${STRONG_NAME_KEY_ENABLED}</SignAssembly>
-    <AssemblyOriginatorKeyFile>${STRONG_NAME_KEY}</AssemblyOriginatorKeyFile>
-    <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
-    <FileUpgradeFlags>
-    </FileUpgradeFlags>
-    <OldToolsVersion>2.0</OldToolsVersion>
-    <UpgradeBackupLocation />
-    <PublishUrl>publish\</PublishUrl>
-    <Install>true</Install>
-    <InstallFrom>Disk</InstallFrom>
-    <UpdateEnabled>false</UpdateEnabled>
-    <UpdateMode>Foreground</UpdateMode>
-    <UpdateInterval>7</UpdateInterval>
-    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
-    <UpdatePeriodically>false</UpdatePeriodically>
-    <UpdateRequired>false</UpdateRequired>
-    <MapFileExtensions>true</MapFileExtensions>
-    <ApplicationRevision>0</ApplicationRevision>
-    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
-    <IsWebBootstrapper>false</IsWebBootstrapper>
-    <UseApplicationTrust>false</UseApplicationTrust>
-    <BootstrapperEnabled>true</BootstrapperEnabled>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
-    <DebugSymbols>true</DebugSymbols>
-    <Optimize>false</Optimize>
-    <IntermediateOutputPath>Debug</IntermediateOutputPath>
-    <OutputPath>Debug</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DebugType>full</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <WarningLevel>4</WarningLevel>
-    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <IntermediateOutputPath>Release</IntermediateOutputPath>
-    <OutputPath>Release</OutputPath>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <NoWarn>618</NoWarn>
-    <WarningLevel>4</WarningLevel>
-    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' ">
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <IntermediateOutputPath>RelWithDebInfo</IntermediateOutputPath>
-    <OutputPath>RelWithDebInfo</OutputPath>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <WarningLevel>4</WarningLevel>
-    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="nunit.framework">
-      <HintPath>${NUNIT}\bin\framework\nunit.framework.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
-    <ProjectReference Include="$(CMAKE_BINARY_DIR)\clicache\src\Apache.Geode.vcxproj">
-      <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
-    </ProjectReference>   
-    <Reference Include="System" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\DUnitFramework\DUnitFramework.csproj">
-      <Project>{796727E8-3A6A-46BE-A2DB-584A4774CD51}</Project>
-      <Name>DUnitFramework</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\FwkUtil\FwkUtil.csproj">
-      <Project>{0DDB5AAF-C707-4F65-9000-659A24504D36}</Project>
-      <Name>FwkUtil</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\PdxClassLibrary\PdxClassLibrary.csproj">
-      <Project>{10613802-A371-4C27-8F66-CE79BFCAC3F2}</Project>
-      <Name>PdxClassLibrary</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\PdxVersion1Lib\PdxVersion1Lib.csproj">
-      <Project>{97F9965D-6B3D-44F6-92B3-5880A3C7178E}</Project>
-      <Name>PdxVersion1Lib</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\PdxVersion2Lib\PdxVersion2Lib.csproj">
-      <Project>{5055633B-6D1C-488D-B934-1AC482C915F7}</Project>
-      <Name>PdxVersion2Lib</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\QueryHelper\QueryWrapper.vcxproj">
-      <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
-      <Name>QueryWrapper</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\SecurityUtil\SecurityUtil.csproj">
-      <Project>{29CFC13C-1D6C-4FE8-B56E-A5E7BA7F849F}</Project>
-      <Name>SecurityUtil</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\AssemblyInfo.cs">
-      <Link>AssemblyInfo.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\CacheHelper.cs">
-      <Link>CacheHelper.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\FwkTest.cs">
-      <Link>FwkTest.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\DeltaTest\DeltaClientValidationListener.cs">
-      <Link>DeltaTest\DeltaClientValidationListener.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\DeltaTest\DeltaTest.cs">
-      <Link>DeltaTest\DeltaTest.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\PdxTest\PdxTests.cs">
-      <Link>PdxTest\PdxTests.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\PerfTest\DupChecker.cs">
-      <Link>PerfTest\DupChecker.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\PerfTest\LatencyListener.cs">
-      <Link>PerfTest\LatencyListener.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\PerfTest\PerfTasks.cs">
-      <Link>PerfTest\PerfTasks.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\PerfTest\PerfTestCacheListener.cs">
-      <Link>PerfTest\PerfTestCacheListener.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\PerfTest\PerfTests.cs">
-      <Link>PerfTest\PerfTests.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\CacheServer.cs">
-      <Link>CacheServer.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\DurableTest\DurableClientTests.cs">
-      <Link>DurableTest\DurableClientTests.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\DurableTest\DurableListener.cs">
-      <Link>DurableTest\DurableListener.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\DurableTest\DurablePerfListener.cs">
-      <Link>DurableTest\DurablePerfListener.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\FunctionExecution\FunctionExecution.cs">
-      <Link>FunctionExecution\FunctionExecution.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\FunctionExecution\MyResultCollector.cs">
-      <Link>FunctionExecution\MyResultCollector.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\FwkTask.cs">
-      <Link>FwkTask.cs</Link>
-    </Compile>
-    <!--Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\EventTest\ETCacheListener.cs">
-      <Link>EventTest\ETCacheListener.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\EventTest\ETCacheLoader.cs">
-      <Link>EventTest\ETCacheLoader.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\EventTest\ETCacheWriter.cs">
-      <Link>EventTest\ETCacheWriter.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\EventTest\EventTasks.cs">
-      <Link>EventTest\EventTasks.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\EventTest\EventTests.cs">
-      <Link>EventTest\EventTests.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\QueryTest\QueryTests.cs">
-      <Link>QueryTest\QueryTests.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\SecurityTest\Security.cs">
-      <Link>SecurityTest\Security.cs</Link>
-    </Compile-->
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\QueryTest\QueryTests.cs">
-      <Link>QueryTest\QueryTests.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\ResumableTx\ResumableTx.cs">
-      <Link>ResumableTx\ResumableTx.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\ResumableTx\TxInfo.cs">
-      <Link>ResumableTx\TxInfo.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewFwkLib\Utils.cs">
-      <Link>Utils.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewTestObject\DeltaTestImpl.cs">
-      <Link>DeltaTest\DeltaTestImpl.cs</Link>
-    </Compile>
-
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewTestObject\PdxAutoSerializerObj.cs">
-      <Link>PdxTest\PdxAutoSerializerObj.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewTestObject\Portfolio.cs">
-      <Link>QueryTest\Portfolio.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewTestObject\PortfolioPdx.cs">
-      <Link>QueryTest\PortfolioPdx.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewTestObject\Position.cs">
-      <Link>QueryTest\Position.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewTestObject\PositionPdx.cs">
-      <Link>QueryTest\PositionPdx.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\NewTestObject\TestObject1.cs">
-      <Link>DeltaTest\TestObject1.cs</Link>
-    </Compile>
-   <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\QueryHelper\QueryHelperN.cs">
-      <Link>QueryTest\QueryHelperN.cs</Link>
-    </Compile>
-  </ItemGroup>
-  <ItemGroup>
-    <Folder Include="DurableTest\" />
-    <Folder Include="FunctionExecution\" />
-    <Folder Include="PerfTest\" />
-    <Folder Include="ResumableTx\" />
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-</Project>
diff --git a/tests/cli/NewFwkLib/PdxTest/PdxTests.cs b/tests/cli/NewFwkLib/PdxTest/PdxTests.cs
deleted file mode 100644
index 9d93468..0000000
--- a/tests/cli/NewFwkLib/PdxTest/PdxTests.cs
+++ /dev/null
@@ -1,3067 +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.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Collections;
-using System.Collections.ObjectModel;
-using System.Text;
-using System.Threading;
-using System.Reflection;
-using PdxTests;
-
-
-namespace Apache.Geode.Client.FwkLib
-{
-    using Apache.Geode.DUnitFramework;
-    using Apache.Geode.Client.Tests;
-    using Apache.Geode.Client;
-    using QueryCategory = Apache.Geode.Client.Tests.QueryCategory;
-    using QueryStrings = Apache.Geode.Client.Tests.QueryStrings;
-    using QueryStatics = Apache.Geode.Client.Tests.QueryStatics;
-    using System.IO;
-
-    public class PDXSilenceListener<TKey, TVal> : CacheListenerAdapter<TKey, TVal>
-    {
-        long currentTimeInMillies()
-        {
-            long curruntMillis = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
-            return curruntMillis;
-        }
-        public override void AfterCreate(EntryEvent<TKey, TVal> ev)
-        {
-
-            Util.BBSet("ListenerBB", "lastEventTime", currentTimeInMillies());
-        }
-        public override void AfterUpdate(EntryEvent<TKey, TVal> ev)
-        {
-            Util.BBSet("ListenerBB", "lastEventTime", currentTimeInMillies());
-        }
-        public override void AfterDestroy(EntryEvent<TKey, TVal> ev)
-        {
-            Util.BBSet("ListenerBB", "lastEventTime", currentTimeInMillies());
-        }
-        public override void AfterInvalidate(EntryEvent<TKey, TVal> ev)
-        {
-            Util.BBSet("ListenerBB", "lastEventTime", currentTimeInMillies());
-        }
-    }
-    public class PDXMyCqListener<TKey, TResult> : ICqListener<TKey, TResult>
-    {
-        private UInt32 m_updateCnt;
-        private UInt32 m_createCnt;
-        private UInt32 m_destroyCnt;
-        private UInt32 m_eventCnt;
-
-        public PDXMyCqListener()
-        {
-            m_updateCnt = 0;
-            m_createCnt = 0;
-            m_destroyCnt = 0;
-            m_eventCnt = 0;
-        }
-
-        public UInt32 NumInserts()
-        {
-            return m_createCnt;
-        }
-
-        public UInt32 NumUpdates()
-        {
-            return m_updateCnt;
-        }
-
-        public UInt32 NumDestroys()
-        {
-            return m_destroyCnt;
-        }
-
-        public UInt32 NumEvents()
-        {
-            return m_eventCnt;
-        }
-
-        public virtual void UpdateCount(CqEvent<TKey, TResult> ev)
-        {
-            m_eventCnt++;
-            CqOperation opType = ev.getQueryOperation();
-            if (opType == CqOperation.OP_TYPE_CREATE)
-            {
-                m_createCnt++;
-            }
-            else if (opType == CqOperation.OP_TYPE_UPDATE)
-            {
-                m_updateCnt++;
-            }
-            else if (opType == CqOperation.OP_TYPE_DESTROY)
-            {
-                m_destroyCnt++;
-            }
-
-        }
-        public virtual void OnError(CqEvent<TKey, TResult> ev)
-        {
-            UpdateCount(ev);
-        }
-
-        public virtual void OnEvent(CqEvent<TKey, TResult> ev)
-        {
-            UpdateCount(ev);
-        }
-
-        public virtual void Close()
-        {
-        }
-    }
-    public class PdxEntryTask<TKey, TVal> : ClientTask
-    {
-        #region Private members
-        /*
-        private IRegion<TKey, TVal> m_region;
-        private int m_MaxKeys;
-        private List<IDictionary<TKey, TVal>> m_maps;
-        private Int32 m_create;
-        private Int32 m_update;
-        private Int32 m_destroy;
-        private Int32 m_invalidate;
-        private Int32 m_cnt;
-        bool m_isDestroy;
-        private object CLASS_LOCK = new object();
-        */
-        private IRegion<TKey, TVal> m_region;
-        private int m_MaxKeys;
-        private static bool m_istransaction = false;
-        private static bool isSerialExecution = false;
-        protected static bool isEmptyClient = false;  // true if this is a bridge client with empty dataPolicy
-        protected static bool isThinClient = false; // true if this is a bridge client with eviction to keep it small
-        private static Dictionary<TKey, TVal> regionSnapshot = null;
-        private static List<TKey> destroyedKeys = null;// = new List<TKey>();
-        private static int keyCount = 0;
-        private static string m_sharePath;
-        private Int32 create;
-        private Int32 update;
-        private Int32 destroy;
-        private Int32 invalidate;
-        private Int32 localdestroy;
-        private Int32 localinvalidate;
-        private Int32 putall;
-        private Int32 get;
-        private string m_objectType;
-        private int m_versionNum;
-        private object CLASS_LOCK = new object();
-        #endregion
-
-        public PdxEntryTask(IRegion<TKey, TVal> region, int keyCnt,
-            Dictionary<TKey, TVal> maps, List<TKey> listval, bool serialexe,
-            string objecttype, int versionnum)
-            : base()
-        {
-            m_region = region;
-            m_MaxKeys = keyCnt;
-            regionSnapshot = maps;
-            destroyedKeys = listval;
-            isSerialExecution = serialexe;
-            create = 0;
-            update = 0;
-            destroy = 0;
-            invalidate = 0;
-            localdestroy = 0;
-            localinvalidate = 0;
-            putall = 0;
-            get = 0;
-            m_objectType = objecttype;
-            m_versionNum = versionnum;
-
-        }
-        protected TVal createIpdxInstance()
-        {
-            PdxType pt = new PdxType();
-
-            IPdxInstanceFactory pif = CacheHelper<TKey, TVal>.DCache.CreatePdxInstanceFactory("PdxType");
-
-            pif.WriteInt("m_int32", pt.Int32);
-            pif.WriteString("m_string", pt.PString);
-            pif.WriteObject("m_arraylist", pt.Arraylist);
-            pif.WriteChar("m_char", pt.Char);
-            pif.WriteBoolean("m_bool", pt.Bool);
-            pif.WriteByte("m_sbyte", pt.Sbyte);
-            pif.WriteByte("m_byte", pt.Byte);
-            pif.WriteShort("m_int16", pt.Int16);
-            pif.WriteByteArray("m_byteArray", pt.ByteArray);
-            pif.WriteLong("m_long", pt.Long);
-            pif.WriteFloat("m_float", pt.Float);
-            pif.WriteDouble("m_double", pt.Double);
-            pif.WriteBooleanArray("m_boolArray", pt.BoolArray);
-            pif.WriteByteArray("m_sbyteArray", pt.SbyteArray);
-            pif.WriteCharArray("m_charArray", pt.CharArray);
-            pif.WriteDate("m_dateTime", pt.DateTime);
-            pif.WriteShortArray("m_int16Array", pt.Int16Array);
-            pif.WriteIntArray("m_int32Array", pt.Int32Array);
-            pif.WriteLongArray("m_longArray", pt.LongArray);
-            pif.WriteFloatArray("m_floatArray", pt.FloatArray);
-            pif.WriteDoubleArray("m_doubleArray", pt.DoubleArray);
-            pif.WriteArrayOfByteArrays("m_byteByteArray", pt.ByteByteArray);
-            pif.WriteStringArray("m_stringArray", pt.StringArray);
-            pif.WriteObject("m_map", pt.Map);
-            pif.WriteObject("m_hashtable", pt.Hashtable);
-            pif.WriteObject("m_vector", pt.Vector);
-            pif.WriteObject("m_chs", pt.Chs);
-            pif.WriteObject("m_clhs", pt.Clhs);
-            pif.WriteInt("m_uint32", pt.Uint32);
-            pif.WriteLong("m_ulong", pt.Ulong);
-            pif.WriteShort("m_uint16", pt.Uint16);
-            pif.WriteIntArray("m_uint32Array", pt.Uint32Array);
-            pif.WriteLongArray("m_ulongArray", pt.UlongArray);
-            pif.WriteShortArray("m_uint16Array", pt.Uint16Array);
-            pif.WriteByteArray("m_byte252", pt.Byte252);
-            pif.WriteByteArray("m_byte253", pt.Byte253);
-            pif.WriteByteArray("m_byte65535", pt.Byte65535);
-            pif.WriteByteArray("m_byte65536", pt.Byte65536);
-            pif.WriteObject("m_pdxEnum", pt.PdxEnum);
-
-            pif.WriteObject("m_address", pt.AddressArray);
-            pif.WriteObjectArray("m_objectArray", pt.ObjectArray);
-            IPdxInstance pi = pif.Create();
-            return (TVal)(object)pi;
-        }
-        private TVal GetValue()
-        {
-            return GetValue(null);
-        }
-
-        private TVal GetValue(object value)
-        {
-            TVal tmpValue = default(TVal);
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("valueSizes");
-            int size = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("valueSizes");
-            StringBuilder builder = new StringBuilder();
-            Random random = new Random();
-            char ch;
-            for (int j = 0; j < size; j++)
-            {
-                ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
-                builder.Append(ch);
-            }
-            string sharedpath = (string)Util.BBGet("SharedPath", "sharedDir");
-            m_sharePath = Path.Combine(sharedpath ,"framework/csharp/bin");
-            if (typeof(TVal) == typeof(string))
-            {
-                tmpValue = (TVal)(object)builder.ToString();
-            }
-            else if (typeof(TVal) == typeof(byte[]))
-            {
-                tmpValue = (TVal)(object)(Encoding.ASCII.GetBytes(builder.ToString()));
-            }
-            else if (m_objectType != null)
-            {
-                if (m_objectType.Equals("PdxVersioned") && m_versionNum == 1)
-                {
-                    PdxTests<TKey,TVal>.m_pdxVersionOneAsm = Assembly.LoadFrom(Path.Combine(m_sharePath ,"PdxVersion1Lib.dll"));
-                    Type pt = PdxTests<TKey,TVal>.m_pdxVersionOneAsm.GetType("PdxVersionTests.PdxVersioned", true, true);
-                    tmpValue = (TVal)pt.InvokeMember("PdxVersioned", BindingFlags.CreateInstance, null, null, new object[] { value.ToString() });
-                }
-                else if (m_objectType.Equals("PdxVersioned") && m_versionNum == 2)
-                {
-                    PdxTests<TKey, TVal>.m_pdxVersionTwoAsm = Assembly.LoadFrom(Path.Combine(m_sharePath, "PdxVersion2Lib.dll"));
-                    Type pt = PdxTests<TKey, TVal>.m_pdxVersionTwoAsm.GetType("PdxVersionTests.PdxVersioned", true, true);
-                    tmpValue = (TVal)pt.InvokeMember("PdxVersioned", BindingFlags.CreateInstance, null, null, new object[] { value.ToString() });
-                }
-                else if (m_objectType.Equals("Nested"))
-                {
-
-                    tmpValue = (TVal)(object)new NestedPdx();
-                }
-                else if (m_objectType.Equals("PdxType"))
-                {
-                    tmpValue = (TVal)(object)new PdxType();
-                }
-                else if (m_objectType.Equals("PdxInstanceFactory"))
-                {
-
-                    tmpValue = createIpdxInstance();
-                }
-                else if (m_objectType.Equals("AutoSerilizer"))
-                {
-                    tmpValue = (TVal)(object)new SerializePdx1(true);
-                }
-            }
-            else
-                tmpValue = (TVal)(object)value;
-            return tmpValue;
-
-        }
-        protected void verifyContainsKey(IRegion<TKey, TVal> m_region, TKey key, bool expected)
-        {
-            bool containsKey = false;
-            if (isEmptyClient || m_istransaction)
-            {
-                containsKey = m_region.ContainsKey(key);
-            }
-            else
-            {
-                containsKey = m_region.GetLocalView().ContainsKey(key);
-            }
-            if (containsKey != expected)
-            {
-                throw new Exception("Expected ContainsKey() for " + key + " to be " + expected +
-                          " in " + m_region.FullPath + ", but it is " + containsKey);
-            }
-        }
-
-        protected void verifyContainsValueForKey(IRegion<TKey, TVal> m_region, TKey key, bool expected)
-        {
-
-           bool containsValueForKey = false;
-            if (isEmptyClient || m_istransaction)
-                containsValueForKey = m_region.ContainsValueForKey(key);
-            else
-                containsValueForKey = m_region.GetLocalView().ContainsValueForKey(key);
-            if (containsValueForKey != expected)
-            {
-                throw new Exception("Expected ContainsValueForKey() for " + key + " to be " + expected +
-                          " in " + m_region.FullPath + ", but it is " + containsValueForKey);
-            }
-
-        }
-        protected void verifySize(IRegion<TKey, TVal> m_region, int expectedSize)
-        {
-            int size = 0;
-            if (isEmptyClient || m_istransaction)
-                size = m_region.Count;
-            else
-                size = m_region.GetLocalView().Count;
-            if (size != expectedSize)
-            {
-                if (size < 1000)
-                {
-                    StringBuilder sb = new StringBuilder();
-                    sb.Append("region has wrong size (").Append(size)
-                      .Append(").  Dump of region follows:")
-                      .Append("\n");
-                    ICollection<RegionEntry<TKey, TVal>> regionentry = m_region.GetEntries(false);
-                    foreach (RegionEntry<TKey, TVal> kvp in regionentry)
-                    {
-                        TKey key = kvp.Key;
-                        TVal Value = kvp.Value;
-                        sb.Append(key).Append(") -> ").Append(Value)
-                           .Append("\n");
-                    }
-                    FwkTest<TKey, TVal>.CurrentTest.FwkInfo(sb.ToString());
-                }
-                throw new Exception("Expected size of " + m_region.FullPath + " to be " +
-                   expectedSize + ", but it is " + size);
-            }
-            
-        }
-        
-        protected TKey GetNewKey()
-        {
-                FwkTest<TKey, TVal>.CurrentTest.ResetKey("distinctKeys");
-                int numKeys = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("distinctKeys");
-                String keybuf = String.Format("Key-{0}", keyCount);
-                TKey key = (TKey)(object)(keybuf);
-                keyCount++;
-                return key;
-            
-        }
-        protected TKey GetExistingKey(bool useServerKeys, int index)
-        {
-            IRegion<TKey, TVal> region = m_region;
-            TKey key = default(TKey);
-            TKey[] keys = null;
-            int size = 0;
-            if (useServerKeys)
-            {
-                size = region.Count;
-                keys = (TKey[])region.Keys;
-                index = Util.Rand(0, keys.Length);
-                try
-                {
-                  if (keys.Length > 0)
-                  {
-                    key = keys[index];
-                  }
-                }
-                catch (Exception e) { FwkTest<TKey, TVal>.CurrentTest.FwkException("Caught {0} during GetExistingKey()",e.Message); }
-            }
-            else
-            {
-                size = region.GetLocalView().Count;
-                keys = (TKey[])region.GetLocalView().Keys;
-                index = Util.Rand(0, keys.Length);
-                if (keys.Length > 0)
-                {
-                  key = keys[index];
-                }
-            }
-           
-            return key;
-        }
-        protected void validate(TKey key,TVal value,int beforeSize)
-        {
-            if (isSerialExecution)
-            {
-                if (isEmptyClient)
-                {
-                    if (!CacheHelper<TKey, TVal>.DCache.CacheTransactionManager.Exists())
-                    {
-                        verifySize(m_region, 0);
-                    }
-                }
-                else if (isThinClient)
-                {
-                    if (!CacheHelper<TKey, TVal>.DCache.CacheTransactionManager.Exists())
-                    {
-                        // new entry should be in the local region
-                        verifyContainsKey(m_region, key, true);
-                        verifyContainsValueForKey(m_region, key, true);
-                    }
-                }
-                else
-                { // region has all keys/values
-                    verifyContainsKey(m_region, key, true);
-                    verifyContainsValueForKey(m_region, key, true);
-                    verifySize(m_region, beforeSize);
-                }
-                regionSnapshot[key] = value;
-                destroyedKeys.Remove(key);
-            }
-        }
-        protected void addEntry(IRegion<TKey, TVal> m_region, int index)
-        {
-                object keybuf = null;
-                if (typeof(TKey) == typeof(int))
-                    keybuf = (int)(object)index;
-                else
-                keybuf = String.Format("Key-{0}", index);
-                TKey key = (TKey)(object)(keybuf);
-                TVal value = GetValue(key);
-                int beforeSize = 0;
-                if (isEmptyClient || m_istransaction)
-                    beforeSize = m_region.Count;
-                else
-                    beforeSize = m_region.GetLocalView().Count;
-
-               if (!m_region.ContainsKey(key))
-                m_region.Add(key, value);
-               else
-                {
-                    value = GetValue(("updated_" + key));
-                    m_region[key] = value;
-                }
-                // validation
-                validate(key,value,beforeSize+1);
-            
-       
-        }
-        
-        protected void updateEntry(IRegion<TKey, TVal> r,int index)
-        {
-            TKey key = GetExistingKey(isEmptyClient || isThinClient, index);
-            if (EqualityComparer<TKey>.Default.Equals(key, default(TKey)))
-            {
-                int size = r.Count;
-                if (isSerialExecution && (size != 0))
-                    throw new Exception("getExistingKey returned " + key + ", but region size is " + size);
-                FwkTest<TKey, TVal>.CurrentTest.FwkInfo("updateEntry: No keys in region");
-                return;
-            }
-            int beforeSize = 0;
-            if (isEmptyClient || m_istransaction)
-                beforeSize = r.Count;
-            else
-                beforeSize = r.GetLocalView().Count;
-            TVal value = GetValue(("updated_" + key));
-            r[key] = value;
-
-            // validation
-            // cannot validate return value from put due to bug 36436; in peer configurations
-            // we do not make any guarantees about the return value
-            validate(key,value,beforeSize);
-           
-        }
-        
-        protected void invalidateEntry(IRegion<TKey, TVal> m_region, bool isLocalInvalidate, int index)
-        {
-            int beforeSize = 0;
-            if (isEmptyClient || m_istransaction)
-                beforeSize = m_region.Count;
-            else
-                beforeSize = m_region.GetLocalView().Count;
-            TKey key = GetExistingKey(isEmptyClient || isThinClient, index);
-            if (EqualityComparer<TKey>.Default.Equals(key, default(TKey)))
-            {
-                if (isSerialExecution && (beforeSize != 0))
-                    throw new Exception("getExistingKey returned " + key + ", but region size is " + beforeSize);
-                FwkTest<TKey, TVal>.CurrentTest.FwkInfo("invalidateEntry: No keys in region");
-                return;
-            }
-            bool containsKey = m_region.GetLocalView().ContainsKey(key);
-            bool containsValueForKey = m_region.GetLocalView().ContainsValueForKey(key);
-            try
-            {
-                if (isLocalInvalidate)
-                { // do a local invalidate
-                    m_region.GetLocalView().Invalidate(key);
-                }
-                else
-                { // do a distributed invalidate
-                    m_region.Invalidate(key);
-                }
-
-                // validation
-                if (isSerialExecution)
-                {
-                    if (isEmptyClient)
-                    {
-                        if (!CacheHelper<TKey, TVal>.DCache.CacheTransactionManager.Exists())
-                        {
-                            verifySize(m_region, 0);
-                        }
-                    }
-                    else if (isThinClient)
-                    { // we have eviction
-                        if (!CacheHelper<TKey, TVal>.DCache.CacheTransactionManager.Exists())
-                        {
-                            verifySize(m_region, beforeSize);
-                        }
-                    }
-                    else
-                    { // region has all keys/values
-                        verifyContainsKey(m_region, key, true);
-                        verifyContainsValueForKey(m_region, key, false);
-                        verifySize(m_region, beforeSize);
-                    }
-                    regionSnapshot[key] = default(TVal);
-                    //regionSnapshot.Remove(key);
-                    destroyedKeys.Remove(key);
-                }
-            }
-            catch (EntryNotFoundException e)
-            {
-                if (isSerialExecution)
-                    throw new Exception(e.StackTrace);
-                else
-                {
-                    Util.Log("Caught {0} (expected with concurrent execution); continuing with test", e);
-                    return;
-                }
-            }
-            catch (Exception e)
-            {
-                FwkTest<TKey, TVal>.CurrentTest.FwkException("Invalide operation caught {0}",e.Message);
-            }
-        }
-        /** Get an existing key in the given region if one is available,
-         *  otherwise get a new key. 
-         *
-         *  @param aRegion The region to use for getting an entry.
-         */
-        protected void getKey(IRegion<TKey, TVal> aRegion,int index)
-        {
-            TKey key = GetExistingKey(isEmptyClient || isThinClient,index);
-            if (EqualityComparer<TKey>.Default.Equals(key, default(TKey)))
-            { // no existing keys; get a new key then
-                int size = aRegion.Count;
-                if (isSerialExecution && (size != 0))
-                    throw new Exception("getExistingKey returned " + key + ", but region size is " + size);
-                FwkTest<TKey, TVal>.CurrentTest.FwkInfo("getKey: No keys in region");
-                return;
-            }
-            int beforeSize = 0;
-            if (isEmptyClient || m_istransaction)
-                beforeSize = aRegion.Count;
-            else
-                beforeSize = aRegion.GetLocalView().Count;
-            bool beforeContainsValueForKey = aRegion.ContainsValueForKey(key);
-            bool beforeContainsKey = aRegion.ContainsKey(key);
-            TVal anObj = default(TVal);
-            try
-            {
-                anObj = (TVal)aRegion[key];
-            }
-            catch (Apache.Geode.Client.KeyNotFoundException)
-            {
-                if (!EqualityComparer<TVal>.Default.Equals(anObj, default(TVal)))
-                {
-                    throw new Apache.Geode.Client.KeyNotFoundException();
-                }
-
-            }
-
-            // validation 
-            if (isSerialExecution)
-            {
-                if (isEmptyClient)
-                {
-                    if (!CacheHelper<TKey, TVal>.DCache.CacheTransactionManager.Exists())
-                    {
-                        verifySize(aRegion, 0);
-                    }
-                }
-                else if (isThinClient)
-                { // we have eviction
-                    if (!CacheHelper<TKey, TVal>.DCache.CacheTransactionManager.Exists())
-                    {
-                        verifyContainsKey(aRegion, key, true);
-                    }
-                }
-                else
-                { // we have all keys/values
-                    verifyContainsKey(aRegion, key, true);
-                    verifyContainsValueForKey(aRegion, key, (beforeContainsValueForKey));
-
-                    // check the expected value of the get
-                    TVal actualValue = anObj;
-                    TVal expectedValue = default(TVal);
-                    foreach (KeyValuePair<TKey, TVal> kvp in regionSnapshot)
-                    {
-                        TKey mapkey = kvp.Key;
-
-                        if (key.Equals(mapkey))
-                        {
-                            expectedValue = kvp.Value;
-                            if (!EqualityComparer<TVal>.Default.Equals(actualValue, default(TVal)))
-                            {
-                                if (!actualValue.Equals(expectedValue))
-                                {
-                                    FwkTest<TKey, TVal>.CurrentTest.FwkException("getKey: expected value {0} is not same as actual value {1} for key {2}",
-                                  expectedValue, actualValue, key);
-                                }
-                            }
-                        }
-                    }
-                    verifySize(aRegion, beforeSize);
-                }
-
-                // record the current state
-                // in case the get works like a put because there is a cacheLoader
-                regionSnapshot[key] = anObj;
-                destroyedKeys.Remove(key);
-            }
-        }
-        protected void destroyEntry(IRegion<TKey, TVal> m_region, bool isLocalDestroy, int index)
-        {
-            TKey key = GetExistingKey(isEmptyClient || isThinClient, index);
-            if (EqualityComparer<TKey>.Default.Equals(key, default(TKey)))
-            {
-                int size = m_region.Count;
-                if (isSerialExecution && (size != 0))
-                    throw new Exception("getExistingKey returned " + key + ", but region size is " + size);
-                FwkTest<TKey, TVal>.CurrentTest.FwkInfo("destroyEntry: No keys in region");
-                return;
-            }
-            int beforeSize = 0;
-            if (isEmptyClient || m_istransaction)
-                beforeSize = m_region.Count;
-            else
-                beforeSize = m_region.GetLocalView().Count;
-            try
-            {
-                if (isLocalDestroy)
-                { // do a local invalidate
-                    m_region.GetLocalView().Remove(key);
-                }
-                else
-                { // do a distributed invalidate
-                    m_region.Remove(key);
-                }
-
-                // validation
-                if (isSerialExecution)
-                {
-                    if (isEmptyClient)
-                    {
-                        if (!CacheHelper<TKey, TVal>.DCache.CacheTransactionManager.Exists())
-                        {
-                            verifySize(m_region, 0);
-                        }
-                    }
-                    else if (isThinClient)
-                    { // we have eviction
-                        if (!CacheHelper<TKey, TVal>.DCache.CacheTransactionManager.Exists())
-                        {
-                            verifyContainsKey(m_region, key, false);
-                            verifyContainsValueForKey(m_region, key, false);
-                            int afterSize = m_region.Count;
-                            if ((afterSize != beforeSize) && (afterSize != beforeSize - 1))
-                            {
-                                throw new Exception("Expected region size " + afterSize + " to be either " +
-                                    beforeSize + " or " + (beforeSize - 1));
-                            }
-                        }
-                    }
-                    else
-                    { // region has all keys/values
-                        verifyContainsKey(m_region, key, false);
-                        verifyContainsValueForKey(m_region, key, false);
-                        verifySize(m_region, beforeSize - 1);
-                    }
-                    regionSnapshot.Remove(key);
-                    destroyedKeys.Add(key);
-                }
-            }
-            catch (EntryNotFoundException e)
-            {
-                if (isSerialExecution)
-                    throw new Exception(e.StackTrace);
-                else
-                {
-                    Util.Log("Caught {0} (expected with concurrent execution); continuing with test", e);
-                    return;
-                }
-            }
-        }
-        protected void putAll(IRegion<TKey, TVal> r, int index)
-        {
-            // determine the number of new keys to put in the putAll
-            int beforeSize = 0;
-            if (isEmptyClient || m_istransaction)
-                beforeSize = r.Count;
-            else
-                beforeSize = r.GetLocalView().Count;
-            int localBeforeSize = r.GetLocalView().Count;
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("numPutAllExistingKeys");
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey("numPutAllNewKeys");
-            int numNewKeysToPut = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("numPutAllNewKeys");
-            // get a map to put
-            IDictionary<TKey, TVal> mapToPut = new Dictionary<TKey, TVal>();
-            int valSize = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("valueSizes");
-            int minValSize = (int)(sizeof(int) + sizeof(long) + 4);
-            valSize = ((valSize < minValSize) ? minValSize : valSize);
-            string valBuf = null;
-            valBuf = new string('A', valSize);
-            StringBuilder newKeys = new StringBuilder();
-            for (int i = 0; i < numNewKeysToPut; i++)
-            {
-                TKey key = GetNewKey();
-                TVal value = GetValue(key);
-                mapToPut[key] = value;
-                newKeys.Append(key + " ");
-                if ((i % 10) == 0)
-                {
-                    newKeys.Append("\n");
-                }
-            }
-
-
-            // add existing keys to the map
-            int numPutAllExistingKeys = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("numPutAllExistingKeys");
-            StringBuilder existingKeys = new StringBuilder();
-            if (numPutAllExistingKeys > 0)
-            {
-                for (int i = 0; i < numPutAllExistingKeys; i++)
-                { // put existing keys
-                    TKey key = GetExistingKey(isEmptyClient || isThinClient,i);
-                    TVal anObj = GetValue(key);
-                    mapToPut[key] = anObj;
-                    existingKeys.Append(key + " ");
-                    if (((i + 1) % 10) == 0)
-                    {
-                        existingKeys.Append("\n");
-                    }
-                }
-            }
-            FwkTest<TKey, TVal>.CurrentTest.FwkInfo("PR size is " + beforeSize + ", local region size is " +
-                localBeforeSize + ", map to use as argument to putAll is " +
-                mapToPut.GetType().Name + " containing " + numNewKeysToPut + " new keys and " +
-                numPutAllExistingKeys + " existing keys (updates); total map size is " + mapToPut.Count +
-                "\nnew keys are: " + newKeys + "\n" + "existing keys are: " + existingKeys);
-   
-            // do the putAll
-            FwkTest<TKey, TVal>.CurrentTest.FwkInfo("putAll: calling putAll with map of " + mapToPut.Count + " entries");
-            r.PutAll(mapToPut, TimeSpan.FromSeconds(60));
-
-            FwkTest<TKey, TVal>.CurrentTest.FwkInfo("putAll: done calling putAll with map of " + mapToPut.Count + " entries");
-
-            // validation
-            if (isSerialExecution)
-            {
-                if (isEmptyClient)
-                {
-                    if (!CacheHelper<TKey, TVal>.DCache.CacheTransactionManager.Exists())
-                    {
-                        verifySize(r, 0);
-                    }
-                }
-                else
-                { // we have all keys/values in the local region
-                    verifySize(r, beforeSize + numNewKeysToPut);
-                }
-                foreach (KeyValuePair<TKey, TVal> kvp in regionSnapshot)
-                {
-                    TKey key = kvp.Key;
-                    TVal value = kvp.Value;
-                    if (!isEmptyClient && !isThinClient)
-                    {
-                        verifyContainsKey(r, key, true);
-                        verifyContainsValueForKey(r, key, true);
-                    }
-                    regionSnapshot[key] = value;
-                    destroyedKeys.Remove(key);
-                }
-            }
-        }
-        public override void DoTask(int iters, object data)
-        {
-
-            int offset = Util.Rand(m_MaxKeys);
-            int count = offset;
-            int size = 0;
-            Util.Log("PdxEntryTask::DoTask: starting {0} iterations and maxkey {1} count {2}.", iters, m_MaxKeys, count);
-            isEmptyClient = !(m_region.Attributes.CachingEnabled);
-            isThinClient = m_region.Attributes.CachingEnabled;
-            while (Running && (iters-- != 0))
-            {
-                int idx = count % m_MaxKeys;
-                
-                size = m_region.Count;
-               
-                //FwkTest<TKey, TVal>.CurrentTest.ResetKey("entryOps");
-                string opcode = FwkTest<TKey, TVal>.CurrentTest.GetStringValue("entryOps");
-                Util.Log("OpCode is {0}",opcode);
-                lock (CLASS_LOCK)
-                {
-                    //if (((size < 1) && (opcode != "create")) || (opcode == "create"))
-                    if(opcode == "create")
-                    {
-                        try
-                        {
-                            addEntry(m_region, idx+1);
-                            create++;
-                        }
-                        catch (EntryExistsException e)
-                        {
-                            if (isSerialExecution)
-                        {
-                                FwkTest<TKey, TVal>.CurrentTest.FwkException(e.Message);
-                            }
-                            else
-                                FwkTest<TKey, TVal>.CurrentTest.FwkInfo("Got {0} which is expected with concurrent execution",e.Message);
-                        }
-                    }
-                    else if (opcode == "update")
-                    {
-                        updateEntry(m_region, idx);
-                        update++;
-                    }
-                    else if (opcode == "destroy")
-                    {
-                        destroyEntry(m_region, false, idx);
-                        destroy++;
-                    }
-                    else if (opcode == "localDestroy")
-                    {
-                        destroyEntry(m_region, true, idx);
-                        localdestroy++;
-                    }
-                    else if (opcode == "invalidate")
-                    {
-                        invalidateEntry(m_region, false, idx);
-                        invalidate++;
-                   }
-                    else if (opcode == "localInvalidate")
-                    {
-                        invalidateEntry(m_region, true, idx);
-                        localinvalidate++;
-                    }
-                    else if (opcode == "putAll")
-                    {
-                        putAll(m_region, idx);
-                        putall++;
-                    }
-                    else if (opcode == "get")
-                    {
-                        getKey(m_region, idx);
-                        get++;
-                    }
-                    else
-                    {
-                        FwkTest<TKey, TVal>.CurrentTest.FwkException("PdxEntryTask:DoTask() Invalid operation " +
-                        "specified: {0}", opcode);
-                    }
-                }
-                count++;
-            }
-            Interlocked.Add(ref m_iters, count - offset);
-            FwkTest<TKey, TVal>.CurrentTest.FwkInfo("DoEntryOP: create = {0}, update = {1}, destroy = {2}, localdestroy = {3},"
-                + "invalidate = {4},localinvalidate = {5}, get = {6}, putall = {7} and RegionSize = {8}",
-                create, update, destroy, localinvalidate, invalidate, localinvalidate, get, putall,m_region.Count);
-        }
-
-    }
-
-    public class PdxTypeMapper : IPdxTypeMapper
-    {
-
-        public string ToPdxTypeName(string localTypeName)
-        {
-            return localTypeName;
-        }
-
-        public string FromPdxTypeName(string pdxTypeName)
-        {
-            Util.Log("pdxTypeName = {0}", pdxTypeName);
-            if (pdxTypeName.Equals("PdxTests.PdxVersioned"))
-            {
-               return "PdxVersionTests.PdxVersioned";
-
-            }
-            else if (pdxTypeName.Equals("PdxTests.pdxEnumTest"))
-            {
-               return "PdxVersionTests.pdxEnumTest";
-            }
-            else
-                return pdxTypeName;
-        }
-    }
-
-    public class PdxTests<TKey, TVal> : FwkTest<TKey, TVal>
-    {
-        #region Private constants and statics
-
-        protected const string ClientCount = "clientCount";
-        protected const string TimedInterval = "timedInterval";
-        protected const string DistinctKeys = "distinctKeys";
-        protected const string NumThreads = "numThreads";
-        protected const string ValueSizes = "valueSizes";
-        protected const string KeyType = "keyType";
-        protected const string KeySize = "keySize";
-        private const string RegionName = "regionName";
-        private const string OpsSecond = "opsSecond";
-        private const string EntryCount = "entryCount";
-        private const string WorkTime = "workTime";
-        private const string EntryOps = "entryOps";
-        private const string LargeSetQuery = "largeSetQuery";
-        private const string UnsupportedPRQuery = "unsupportedPRQuery";
-        private const string ObjectType = "objectType";
-        
-        private static Dictionary<string, int> OperationsMap =
-          new Dictionary<string, int>();
-        private static Dictionary<string, int> ExceptionsMap =
-          new Dictionary<string, int>();
-        private static bool m_istransaction = false;
-        private static bool isSerialExecution = false;
-        protected static bool isEmptyClient = false;  // true if this is a bridge client with empty dataPolicy
-        protected static bool isThinClient = false; // true if this is a bridge client with eviction to keep it small
-        private static Dictionary<TKey, TVal> regionSnapshot = null;
-        private static List<TKey> destroyedKeys = null;// = new List<TKey>();
-        public static Assembly m_pdxVersionOneAsm;
-        public static Assembly m_pdxVersionTwoAsm;
-        private static string m_sharePath;
-
-        protected static string objectType = null;
-        protected static int versionnum = 1;
-        #endregion
-
-        #region Private utility methods
-
-        private IRegion<TKey, TVal> GetRegion()
-        {
-            return GetRegion(null);
-        }
-
-        protected IRegion<TKey, TVal> GetRegion(string regionName)
-        {
-            IRegion<TKey, TVal> region;
-            if (regionName == null)
-            {
-                regionName = GetStringValue("regionName");
-            }
-            if (regionName == null)
-            {
-                region = (IRegion<TKey, TVal>)GetRootRegion();
-                if (region == null)
-                {
-                    IRegion<TKey, TVal>[] rootRegions = CacheHelper<TKey, TVal>.DCache.RootRegions<TKey, TVal>();
-                    if (rootRegions != null && rootRegions.Length > 0)
-                    {
-                        region = rootRegions[Util.Rand(rootRegions.Length)];
-                    }
-                }
-            }
-            else
-            {
-                region = CacheHelper<TKey, TVal>.GetRegion(regionName);
-            }
-            return region;
-        }
-
-        private void AddValue(IRegion<TKey, TVal> region, int count, byte[] valBuf)
-        {
-            if (region == null)
-            {
-                FwkSevere("CacheServer::AddValue(): No region to perform add on.");
-                return;
-            }
-            TKey key = (TKey)(object)count.ToString();
-            TVal value = (TVal)(object)valBuf;
-            BitConverter.GetBytes(count).CopyTo(valBuf, 0);
-            BitConverter.GetBytes(DateTime.Now.Ticks).CopyTo(valBuf, 4);
-            try
-            {
-                region.Add(key, value);
-                //FwkInfo("key: {0}  value: {1}", key, Encoding.ASCII.GetString(value.Value));
-            }
-            catch (Exception ex)
-            {
-                FwkException("CacheServer.AddValue() caught Exception: {0}", ex);
-            }
-        }
-
-        private TKey GetKey(int max)
-        {
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey(ObjectType);
-            string objectType = GetStringValue(ObjectType);
-            QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
-            int numSet = 0;
-            int setSize = 0;
-            if (objectType != null && objectType == "Portfolio")
-            {
-                setSize = qh.PortfolioSetSize;
-                numSet = max / setSize;
-                return (TKey)(object)String.Format("port{0}-{1}", Util.Rand(numSet), Util.Rand(setSize));
-            }
-            else if (objectType != null && objectType == "Position")
-            {
-                setSize = qh.PositionSetSize;
-                numSet = max / setSize;
-                return (TKey)(object)String.Format("pos{0}-{1}", Util.Rand(numSet), Util.Rand(setSize));
-            }
-            return (TKey)(object)Util.Rand(max).ToString();
-        }
-
-        private TVal GetUserObject(string objType)
-        {
-            TVal usrObj = default(TVal);
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey(EntryCount);
-            int numOfKeys = GetUIntValue(EntryCount);
-            FwkTest<TKey, TVal>.CurrentTest.ResetKey(ValueSizes);
-            int objSize = GetUIntValue(ValueSizes);
-            QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
-            int numSet = 0;
-            int setSize = 0;
-            if (objType != null && objType == "Portfolio")
-            {
-                setSize = qh.PortfolioSetSize;
-                numSet = numOfKeys / setSize;
-                usrObj = (TVal)(object)new Portfolio(Util.Rand(setSize), objSize);
-            }
-            else if (objType != null && objType == "Position")
-            {
-                setSize = qh.PositionSetSize;
-                numSet = numOfKeys / setSize;
-                int numSecIds = Portfolio.SecIds.Length;
-                usrObj = (TVal)(object)new Position(Portfolio.SecIds[setSize % numSecIds], setSize * 100);
-            }
-            return usrObj;
-        }
-
-        private bool AllowQuery(QueryCategory category, bool haveLargeResultset,
-      bool islargeSetQuery, bool isUnsupportedPRQuery)
-        {
-            if (category == QueryCategory.Unsupported)
-            {
-                return false;
-            }
-            else if (haveLargeResultset != islargeSetQuery)
-            {
-                return false;
-            }
-            else if (isUnsupportedPRQuery &&
-                     ((category == QueryCategory.MultiRegion) ||
-                      (category == QueryCategory.NestedQueries)))
-            {
-                return false;
-            }
-            else
-            {
-                return true;
-            }
-        }
-        private void remoteQuery(QueryStrings currentQuery, bool isLargeSetQuery, 
-      bool isUnsupportedPRQuery, int queryIndex,bool isparam,bool isStructSet)
-        {
-            DateTime startTime;
-            DateTime endTime;
-            TimeSpan elapsedTime;
-            var qs = CheckQueryService();
-            if (AllowQuery(currentQuery.Category, currentQuery.IsLargeResultset,
-                  isLargeSetQuery, isUnsupportedPRQuery))
-            {
-                string query = currentQuery.Query;
-                FwkInfo("CacheServer.RunQuery: ResultSet Query Category [{0}], " +
-                  "String [{1}].", currentQuery.Category, query);
-                Query<object> qry = qs.NewQuery<object>(query);
-                object[] paramList = null;
-                if (isparam)
-                {
-                    Int32 numVal = 0;
-                    if (isStructSet)
-                    {
-                        paramList = new object[QueryStatics.NoOfQueryParamSS[queryIndex]];
-
-                        for (Int32 ind = 0; ind < QueryStatics.NoOfQueryParamSS[queryIndex]; ind++)
-                        {
-                            try
-                            {
-                                numVal = Convert.ToInt32(QueryStatics.QueryParamSetSS[queryIndex][ind]);
-                                paramList[ind] = numVal;
-                            }
-                            catch (FormatException)
-                            {
-                                paramList[ind] = (System.String)QueryStatics.QueryParamSetSS[queryIndex][ind];
-                            }
-                        }
-                    }
-                    else
-                    {
-                        paramList = new object[QueryStatics.NoOfQueryParam[queryIndex]];
-                        for (Int32 ind = 0; ind < QueryStatics.NoOfQueryParam[queryIndex]; ind++)
-                        {
-                            try
-                            {
-                                numVal = Convert.ToInt32(QueryStatics.QueryParamSet[queryIndex][ind]);
-                                paramList[ind] = numVal;
-                            }
-                            catch (FormatException)
-                            {
-                                paramList[ind] = (System.String)QueryStatics.QueryParamSet[queryIndex][ind];
-                            }
-                        }
-                    }
-                }
-                ISelectResults<object> results = null;
-                startTime = DateTime.Now;
-                if (isparam)
-                {
-                    results = qry.Execute(paramList, TimeSpan.FromSeconds(600));
-                }
-                else
-                {
-                    results = qry.Execute(TimeSpan.FromSeconds(600));
-                }
-                endTime = DateTime.Now;
-                elapsedTime = endTime - startTime;
-                FwkInfo("CacheServer.RunQuery: Time Taken to execute" +
-                  " the query [{0}]: {1}ms", query, elapsedTime.TotalMilliseconds);
-            }
-        }
-
-        private void RunQuery()
-        {
-            FwkInfo("In CacheServer.RunQuery");
-
-            try
-            {
-                FwkTest<TKey, TVal>.CurrentTest.ResetKey(EntryCount);
-                int numOfKeys = GetUIntValue(EntryCount);
-                QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
-                int setSize = qh.PortfolioSetSize;
-                if (numOfKeys < setSize)
-                {
-                    setSize = numOfKeys;
-                }
-                int i = Util.Rand(QueryStrings.RSsize);
-                ResetKey(LargeSetQuery);
-                ResetKey(UnsupportedPRQuery);
-                bool isLargeSetQuery = GetBoolValue(LargeSetQuery);
-                bool isUnsupportedPRQuery = GetBoolValue(UnsupportedPRQuery);
-                QueryStrings currentQuery = QueryStatics.ResultSetQueries[i];
-                remoteQuery(currentQuery, isLargeSetQuery, isUnsupportedPRQuery, i, false, false);
-                i = Util.Rand(QueryStrings.SSsize);
-                currentQuery = QueryStatics.StructSetQueries[i];
-                remoteQuery(currentQuery, isLargeSetQuery, isUnsupportedPRQuery, i, false, false);
-                i = Util.Rand(QueryStrings.RSPsize);
-                currentQuery = QueryStatics.ResultSetParamQueries[i];
-                remoteQuery(currentQuery, isLargeSetQuery, isUnsupportedPRQuery, i, true, false);
-                i = Util.Rand(QueryStrings.SSPsize);
-                currentQuery = QueryStatics.StructSetParamQueries[i];
-                remoteQuery(currentQuery, isLargeSetQuery, isUnsupportedPRQuery, i, true, true);
-            }
-            catch (Exception ex)
-            {
-                FwkException("CacheServer.RunQuery: Caught Exception: {0}", ex);
-            }
-            FwkInfo("CacheServer.RunQuery complete.");
-        }
-
-        private void UpdateOperationsMap(string opCode, int numOps)
-        {
-            UpdateOpsMap(OperationsMap, opCode, numOps);
-        }
-
-        private void UpdateExceptionsMap(string opCode, int numOps)
-        {
-            UpdateOpsMap(ExceptionsMap, opCode, numOps);
-        }
-
-        private void UpdateOpsMap(Dictionary<string, int> map, string opCode,
-      int numOps)
-        {
-            lock (((ICollection)map).SyncRoot)
-            {
-                int currentOps;
-                if (!map.TryGetValue(opCode, out currentOps))
-                {
-                    currentOps = 0;
-                }
-                map[opCode] = currentOps + numOps;
-            }
-        }
-
-        private int GetOpsFromMap(Dictionary<string, int> map, string opCode)
-        {
-            int numOps;
-            lock (((ICollection)map).SyncRoot)
-            {
-                if (!map.TryGetValue(opCode, out numOps))
-                {
-                    numOps = 0;
-                }
-            }
-            return numOps;
-        }
-        private void PutAllOps()
-        {
-            IRegion<TKey, TVal> region = GetRegion();
-            IDictionary<TKey, TVal> map = new Dictionary<TKey, TVal>();
-            int valSize = GetUIntValue(ValueSizes);
-            int minValSize = (int)(sizeof(int) + sizeof(long) + 4);
-            valSize = ((valSize < minValSize) ? minValSize : valSize);
-            string valBuf = null;
-            ResetKey(ObjectType);
-            string objectType = GetStringValue(ObjectType);
-            if (objectType != null)
-            {
-                Int32 numSet = 0;
-                Int32 setSize = 0;
-                QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
-                TVal port;
-                setSize = qh.PortfolioSetSize;
-                numSet = 200 / setSize;
-                for (int set = 1; set <= numSet; set++)
-                {
-                    for (int current = 1; current <= setSize; current++)
-                    {
-                        port = (TVal)(object)new Portfolio(current, valSize);
-                        string Id = String.Format("port{0}-{1}", set, current);
-                        TKey key = (TKey)(object)Id.ToString();
-                        map.Add(key, port);
-                    }
-                }
-            }
-            else
-            {
-                valBuf = new string('A', valSize);
-                for (int count = 0; count < 200; count++)
-                {
-                    TKey key = (TKey)(object)count.ToString();
-                    TVal value = (TVal)(object)Encoding.ASCII.GetBytes(valBuf);
-                    map.Add(key, value);
-                }
-            }
-            region.PutAll(map, TimeSpan.FromSeconds(60));
-        }
-
-        private void GetAllOps()
-        {
-            IRegion<TKey, TVal> region = GetRegion();
-            List<TKey> keys = new List<TKey>();
-            keys.Clear();
-            for (int count = 0; count < 200; count++)
-            {
-                TKey key = (TKey)(object)count.ToString();
-                keys.Add(key);
-            }
-            IDictionary<TKey, TVal> values = new Dictionary<TKey, TVal>();
-            values.Clear();
-            region.GetAll(keys.ToArray(), values, null, false);
-        }
-        #endregion
-
-        #region Public methods
-        public static ICacheListener<TKey, TVal> CreateSilenceListenerPdx()
-        {
-            return new PDXSilenceListener<TKey, TVal>();
-        }
-        public virtual void DoCreatePool()
-        {
-            FwkInfo("In DoCreatePool()");
-            try
-            {
-                CreatePool();
-            }
-            catch (Exception ex)
-            {
-                FwkException("DoCreatePool() Caught Exception: {0}", ex);
-            }
-            FwkInfo("DoCreatePool() complete.");
-        }
-
-        public virtual void DoCreateRegion()
-        {
-            FwkInfo("In DoCreateRegion()");
-            try
-            {
-                IRegion<TKey, TVal> region = CreateRootRegion();
-                ResetKey("useTransactions");
-                m_istransaction = GetBoolValue("useTransactions");
-                isEmptyClient = !(region.Attributes.CachingEnabled);
-                isThinClient = region.Attributes.CachingEnabled;
-                objectType = GetStringValue(ObjectType);
-                versionnum = GetUIntValue("versionNum");
-                string sharedpath = (string)Util.BBGet("SharedPath", "sharedDir");
-                m_sharePath = Path.Combine(sharedpath , "framework/csharp/bin");
-                if (objectType != null)
-                {
-                    var typeRegistry = CacheHelper<TKey, TVal>.DCache.TypeRegistry;
-                    if (objectType.Equals("PdxVersioned") && versionnum == 1)
-                    {
-                        m_pdxVersionOneAsm = Assembly.LoadFrom(Path.Combine(m_sharePath, "PdxVersion1Lib.dll"));
-                        typeRegistry.RegisterPdxType(registerPdxTypeOne);
-                        typeRegistry.PdxTypeMapper = new PdxTypeMapper();
-                    }
-                    else if (objectType.Equals("PdxVersioned") && versionnum == 2)
-                    {
-                       m_pdxVersionTwoAsm = Assembly.LoadFrom(Path.Combine(m_sharePath, "PdxVersion2Lib.dll"));
-                       typeRegistry.RegisterPdxType(registerPdxTypeTwo);
-                       typeRegistry.PdxTypeMapper = new PdxTypeMapper();
-                    }
-                    else if (objectType.Equals("Nested"))
-                    {
-                        typeRegistry.RegisterPdxType(NestedPdx.CreateDeserializable);
-                        typeRegistry.RegisterPdxType(PdxTypes1.CreateDeserializable);
-                        typeRegistry.RegisterPdxType(PdxTypes2.CreateDeserializable);
-                        typeRegistry.RegisterPdxType(PdxTypes3.CreateDeserializable);
-                        typeRegistry.RegisterPdxType(PdxTypes4.CreateDeserializable);
-                        typeRegistry.RegisterPdxType(PdxTypes5.CreateDeserializable);
-                        typeRegistry.RegisterPdxType(PdxTypes6.CreateDeserializable);
-                        typeRegistry.RegisterPdxType(PdxTypes7.CreateDeserializable);
-                        typeRegistry.RegisterPdxType(PdxTypes8.CreateDeserializable);
-                    }
-                    else if (objectType.Equals("PdxType"))
-                    {
-                        typeRegistry.RegisterPdxType(PdxType.CreateDeserializable);
-                    }
-                    else if (objectType.Equals("AutoSerilizer"))
-                    {
-                        typeRegistry.PdxSerializer = new ReflectionBasedAutoSerializer();
-                    }
-                }
-                isSerialExecution = GetBoolValue("serialExecution");
-                if (isSerialExecution)
-                {
-                    regionSnapshot = new Dictionary<TKey, TVal>();
-                    destroyedKeys = new List<TKey>();
-                }
-                if (region == null)
-                {
-                    FwkException("DoCreateRegion()  could not create region.");
-                }
-
-                FwkInfo("DoCreateRegion()  Created region '{0}'", region.Name);
-            }
-            catch (Exception ex)
-            {
-                FwkException("DoCreateRegion() Caught Exception: {0}", ex);
-            }
-            FwkInfo("DoCreateRegion() complete.");
-        }
-        IPdxSerializable registerPdxTypeOne()
-        {
-            Type pt = m_pdxVersionOneAsm.GetType("PdxVersionTests.PdxVersioned");
-
-            object ob = pt.InvokeMember("CreateDeserializable", BindingFlags.Default | BindingFlags.InvokeMethod, null, null, null);
-
-            return (IPdxSerializable)ob;
-        }
-        IPdxSerializable registerPdxTypeTwo()
-        {
-            Type pt = m_pdxVersionTwoAsm.GetType("PdxVersionTests.PdxVersioned");
-
-            object ob = pt.InvokeMember("CreateDeserializable", BindingFlags.Default | BindingFlags.InvokeMethod, null, null, null);
-
-            return (IPdxSerializable)ob;
-        }
-        public void DoCloseCache()
-        {
-            FwkInfo("DoCloseCache()  Closing cache and disconnecting from" +
-              " distributed system.");
-            CacheHelper<TKey, TVal>.Close();
-        }
-        public void DoRegisterAllKeys()
-        {
-            FwkInfo("In DoRegisterAllKeys()");
-            try
-            {
-                IRegion<TKey, TVal> region = GetRegion();
-                FwkInfo("DoRegisterAllKeys() region name is {0}", region.Name);
-                bool isDurable = GetBoolValue("isDurableReg");
-                ResetKey("getInitialValues");
-                bool isGetInitialValues = GetBoolValue("getInitialValues");
-                bool checkReceiveVal = GetBoolValue("checkReceiveVal");
-                bool isReceiveValues = true;
-                if (checkReceiveVal)
-                {
-                    ResetKey("receiveValue");
-                    isReceiveValues = GetBoolValue("receiveValue");
-                }
-                region.GetSubscriptionService().RegisterAllKeys(isDurable, isGetInitialValues, isReceiveValues);
-            }
-            catch (Exception ex)
-            {
-                FwkException("DoRegisterAllKeys() Caught Exception: {0}", ex);
-            }
-            FwkInfo("DoRegisterAllKeys() complete.");
-        }
-        public void DoFeed()
-        {
-            FwkInfo("CacheServer.DoFeed() called.");
-
-            int opsSec = GetUIntValue(OpsSecond);
-            opsSec = (opsSec < 1) ? 0 : opsSec;
-
-            int entryCount = GetUIntValue(EntryCount);
-            entryCount = (entryCount < 1) ? 10000 : entryCount;
-
-            int cnt = 0;
-            int valSize = GetUIntValue(ValueSizes);
-            int minValSize = (int)(sizeof(int) + sizeof(long) + 4);
-            valSize = ((valSize < minValSize) ? minValSize : valSize);
-            string valBuf = new string('A', valSize);
-
-            IRegion<TKey, TVal> region = GetRegion();
-            PaceMeter pm = new PaceMeter(opsSec);
-            while (cnt++ < entryCount)
-            {
-                AddValue(region, cnt, Encoding.ASCII.GetBytes(valBuf));
-                pm.CheckPace();
-            }
-        }
-
-        // ----------------------- begin pdx test related tasks -----------
-
-        /*
-        protected void removeDuplicates(List<TKey> destroyedKeys)
-        {
-          List<TKey> myStringList = new List<TKey>();
-          foreach (TKey s in destroyedKeys)
-          {
-            if (!myStringList.Contains(s))
-            {
-              myStringList.Add(s);
-            }
-          }
-          destroyedKeys = myStringList;
-          //return myStringList;
-        }
-        protected TVal GetValue()
-        {
-            TVal tmpValue = default(TVal);
-            ResetKey("valueSizes");
-            int size = GetUIntValue("valueSizes");
-            StringBuilder builder = new StringBuilder();
-            Random random = new Random();
-            char ch;
-            for (int j = 0; j < size; j++)
-            {
-              ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
-              builder.Append(ch);
-            }
-            ResetKey("objectType");
-            string objectType = GetStringValue(ObjectType);
-            ResetKey("elementSize");
-            int elementSize = GetUIntValue("elementSize");
-            ResetKey("versionNum");
-            int versionnum = GetUIntValue("versionNum"); //random.Next(2) + 1;// (counter++ % 2) + 1;
-            if (typeof(TVal) == typeof(string))
-            {
-              tmpValue = (TVal)(object)builder.ToString();
-            }
-            else if (typeof(TVal) == typeof(byte[]))
-            {
-              tmpValue = (TVal)(object)(Encoding.ASCII.GetBytes(builder.ToString()));
-            }
-            else if (objectType.Equals("PdxVersioned") && versionnum == 1)
-            {
-              FwkInfo("rjk ---11222 {0}", elementSize);
-              m_pdxVesionOneAsm = Assembly.LoadFrom(m_sharePath + "/PdxVersion1Lib.dll");
-              Type pt = m_pdxVesionOneAsm.GetType("PdxVersionTests.PdxVersioned", true, true);
-              FwkInfo("rjk ---11223");
-              tmpValue = (TVal)pt.InvokeMember("PdxVersioned", BindingFlags.CreateInstance, null, null, null);
-              FwkInfo("rjk ---11224 {0}", tmpValue);
-            }
-            else if (objectType.Equals("PdxVersioned") && versionnum == 2)
-            {
-              m_pdxVesionTwoAsm = Assembly.LoadFrom(m_sharePath + "/PdxVersion2Lib.dll");
-              Type pt = m_pdxVesionTwoAsm.GetType("PdxVersionTests.PdxVersioned", true, true);
-              tmpValue = (TVal)pt.InvokeMember("PdxVersioned", BindingFlags.CreateInstance, null, null, null);
-             }
-             FwkInfo("rjk: PdxVersioned {0}", versionnum);
-            return tmpValue;
-      
-        }
-           */
-        protected void verifyContainsKey(IRegion<TKey, TVal> m_region, TKey key, bool expected)
-        {
-            //bool containsKey = m_region.GetLocalView().ContainsKey(key);
-
-            bool containsKey = false;
-            if (isEmptyClient || m_istransaction)
-            {
-                containsKey = m_region.ContainsKey(key);
-            }
-            else
-            {
-                containsKey = m_region.GetLocalView().ContainsKey(key);
-            }
-            if (containsKey != expected)
-            {
-                throw new Exception("Expected ContainsKey() for " + key + " to be " + expected +
-                          " in " + m_region.FullPath + ", but it is " + containsKey);
-            }
-        }
-
-        protected void verifyContainsValueForKey(IRegion<TKey, TVal> m_region, TKey key, bool expected)
-        {
-
-            //bool containsValueForKey = m_region.GetLocalView().ContainsValueForKey(key);
-            bool containsValueForKey = false;
-            if (isEmptyClient || m_istransaction)
-                containsValueForKey = m_region.ContainsValueForKey(key);
-            else
-                containsValueForKey = m_region.GetLocalView().ContainsValueForKey(key);
-            Util.Log("Expected val is {0} and containsValueForKey is {1}", expected, containsValueForKey);
-            if (containsValueForKey != expected)
-            {
-                throw new Exception("Expected ContainsValueForKey() for " + key + " to be " + expected +
-                          " in " + m_region.FullPath + ", but it is " + containsValueForKey);
-            }
-
-        }
-        protected void verifySize(IRegion<TKey, TVal> m_region, int expectedSize)
-        {
-            int size = 0;
-            if (isEmptyClient || m_istransaction)
-                size = m_region.Count;
-            else
-                size = m_region.GetLocalView().Count;
-            if (size != expectedSize)
-            {
-                if (size < 1000)
-                {
-                    StringBuilder sb = new StringBuilder();
-                    sb.Append("region has wrong size (").Append(size)
-                      .Append(").  Dump of region follows:")
-                      .Append("\n");
-                    ICollection<RegionEntry<TKey, TVal>> regionentry = m_region.GetEntries(false);
-                    foreach (RegionEntry<TKey, TVal> kvp in regionentry)
-                    {
-                        TKey key = kvp.Key;
-                        TVal Value = kvp.Value;
-                        sb.Append(key).Append(") -> ").Append(Value)
-                           .Append("\n");
-                    }
-                    FwkInfo(sb.ToString());
-                }
-                throw new Exception("Expected size of " + m_region.FullPath + " to be " +
-                   expectedSize + ", but it is " + size);
-            }
-        }
-
-        public void DoWaitForSilenceListenerComplete()
-        {
-            int desiredSilenceSec = 30;
-            int sleepMS = 2000;
-            FwkInfo("Waiting for a period of silence for " + desiredSilenceSec + " seconds...");
-            long desiredSilenceMS = desiredSilenceSec * 1000;
-            long silenceStartTime = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
-            long currentTime = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
-            long lastEventTime = (long)Util.BBGet("ListenerBB", "lastEventTime");
-
-            while (currentTime - silenceStartTime < desiredSilenceMS)
-            {
-                try
-                {
-                    Thread.Sleep(sleepMS);
-                }
-                catch (Exception e)
-                {
-                    FwkException("PerfTest::waitForSilence() Caught exception:" + e.Message);
-                }
-                lastEventTime = (long)Util.BBGet("ListenerBB", "lastEventTime");
-                if (lastEventTime > silenceStartTime)
-                {
-                    // restart the wait
-                    silenceStartTime = lastEventTime;
-                }
-                currentTime = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
-            }
-            long duration = currentTime - silenceStartTime;
-            FwkInfo("Done waiting, clients have been silent for " + duration + " ms");
-
-        }
-        public void DoRandomEntryOperation()
-        {
-            FwkInfo("In DoRandomEntryOperation");
-            try
-            {
-                IRegion<TKey, TVal> region = GetRegion();
-                int timedInterval = GetTimeValue("timedInterval") * 1000;
-                if (timedInterval <= 0)
-                {
-                    timedInterval = 5000;
-                }
-                int maxTime = 10 * timedInterval;
-
-                // Loop over key set sizes
-                ResetKey("distinctKeys");
-                int numKeys = GetUIntValue("distinctKeys");
-                bool isdone = false;
-                Util.BBSet("RoundPositionBB", "done", false);
-                string clntid = null;
-                int roundPosition = 0;
-                if (isSerialExecution)
-                {
-                    Util.BBSet("RoundPositionBB", "roundPosition", 1);
-                    roundPosition = (int)Util.BBGet("RoundPositionBB", "roundPosition");
-                    clntid = String.Format("Client.{0}", roundPosition);
-
-                }
-                else
-                {
-                    clntid = Util.ClientId;
-                }
-                int numClients = GetUIntValue("clientCount");
-                string dummyClntid = null;
-                ResetKey("numThreads");
-                int numThreads = GetUIntValue("numThreads");
-                while (true)
-                {
-                  if (roundPosition > numClients)
-                  break;
-                  try
-                  {
-                    if (clntid.Equals(Util.ClientId))
-                    {
-                      PdxEntryTask<TKey, TVal> entrytask = new PdxEntryTask<TKey, TVal>(region, numKeys, regionSnapshot,
-                                destroyedKeys, isSerialExecution, objectType, versionnum);
-                      if (isSerialExecution)
-                              {
-                                  RunTask(entrytask, numThreads, -1, timedInterval, maxTime, null);
-                                  DoWaitForSilenceListenerComplete();
-                                  Util.BBSet("RegionSnapshot", "regionSnapshot", regionSnapshot);
-                                  Util.BBSet("DestroyedKeys", "destroyedKeys", destroyedKeys);
-
-                                  roundPosition = Util.BBIncrement("RoundPositionBB", "roundPosition");
-                                  Util.BBSet("RoundPositionBB", "roundPosition", roundPosition);
-                                  Util.BBSet("RoundPositionBB", "done", true);
-                                  Util.BBSet("RoundPositionBB", "VerifyCnt", 0);
-                              }
-                              else
-                              {
-                                  RunTask(entrytask, numThreads, -1, timedInterval, maxTime, null);
-                                  break;
-                              }
-                              FwkInfo("Done PdxEntryTask operation");
-
-                       }
-                        else// if(!Util.ClientId.Equals(dummyClntid))
-                        {
-                            for (; ; )
-                            {
-                                isdone = (bool)Util.BBGet("RoundPositionBB", "done");
-                                if (isdone)
-                                    break;
-                            }
-                                if (isdone)
-                                {
-                                    //Thread.Sleep(35000);
-                                    try
-                                    {
-                                        verifyFromSnapshot();
-                                        Util.BBSet("RoundPositionBB", "done", false);
-                                        Util.BBIncrement("RoundPositionBB", "VerifyCnt");
-                                    }
-                                    catch (Exception ex)
-                                    {
-                                        Util.BBSet("RoundPositionBB", "done", false);
-                                        Util.BBIncrement("RoundPositionBB", "VerifyCnt");
-                                        Util.BBSet("RoundPositionBB", "roundPosition", numClients + 1);
-                                        FwkException("In DoRandomEntryOperation() caught excption {0}.", ex.Message);                                  
-                                    }
-
-                                }
-                                Thread.Sleep(100);
-                                FwkInfo("Done Verification and verifyCount = {0}",(int)Util.BBGet("RoundPositionBB", "VerifyCnt"));
-                            
-                        }
-                        if (isSerialExecution)
-                        {
-                            int verifyCnt = (int)Util.BBGet("RoundPositionBB", "VerifyCnt");
-                            FwkInfo("DoRandomOperation: verifyCnt {0}, numclient {1}", verifyCnt, numClients);
-                            while (verifyCnt < numClients - 1)
-                            {
-                                verifyCnt = (int)Util.BBGet("RoundPositionBB", "VerifyCnt");
-                                Thread.Sleep(100);
-                            }
-                            roundPosition = (int)Util.BBGet("RoundPositionBB", "roundPosition");
-                            clntid = String.Format("Client.{0}", roundPosition);
-                            dummyClntid = String.Format("Client.{0}", (roundPosition - 1));
-                        }
-                            Thread.Sleep(3000);
-                        
-                    }
-                    catch (ClientTimeoutException)
-                    {
-                        Util.BBSet("RoundPositionBB", "done", true);
-                        Util.BBSet("RoundPositionBB", "roundPosition", numClients + 1);
-                        FwkException("In DoRandomEntryOperation()  Timed run timed out.");
-                    }
-                    catch (Exception ex)
-                    {
-                        Util.BBSet("RoundPositionBB", "done", true);
-                        Util.BBSet("RoundPositionBB", "roundPosition", numClients + 1);
-                        FwkException("In DoRandomEntryOperation() caught excption {0}.", ex.Message);
-                    }
-                    Thread.Sleep(3000);
-
-                }
-            }
-            catch (Exception ex)
-            {
-                FwkException("last DoRandomEntryOperation() Caught Exception: {0}", ex.Message);
-            }
-            FwkInfo("DoRandomEntryOperation() complete.");
-        }
-        public void verifyFromSnapshot()
-        {
-            try
-            {
-                verifyFromSnapshotOnly();
-            }
-            catch (Exception e)
-            {
-                FwkException(e.Message);
-            }
-            //verifyInternalPRState();
-        }
-        public void verifyFromSnapshotOnly()
-        {
-            IRegion<TKey, TVal> aRegion = GetRegion();
-            if (isEmptyClient)
-            {
-                verifyServerKeysFromSnapshot();
-                return;
-            }
-            StringBuilder aStr = new StringBuilder();
-            regionSnapshot = (Dictionary<TKey, TVal>)Util.BBGet("RegionSnapshot", "regionSnapshot");
-            int snapshotSize = regionSnapshot.Count;
-            int regionSize = 0;
-            if (isEmptyClient || m_istransaction)
-                regionSize = aRegion.Count;
-            else
-                regionSize = aRegion.GetLocalView().Count;
-            //int regionSize = aRegion.GetLocalView().Count;
-            FwkInfo("Verifying from snapshot containing " + snapshotSize + " entries...");
-            if (snapshotSize != regionSize)
-            {
-                FwkException("Expected region " + aRegion.FullPath + " to be size " + snapshotSize +
-                     ", but it is " + regionSize.ToString() + "\n");
-            }
-            foreach (KeyValuePair<TKey, TVal> kvp in regionSnapshot)
-            {
-                TKey key = kvp.Key;
-                TVal expectedValue = kvp.Value;
-                try
-                {
-                    verifyContainsKey(aRegion, key, true);
-                }
-                catch (Exception e)
-                {
-                    aStr.Append(e.Message + "\n");
-                    //         anyFailures = true;
-                }
-                bool containsValueForKey = aRegion.GetLocalView().ContainsValueForKey(key);
-                try
-                {
-                    verifyContainsValueForKey(aRegion, key, !(EqualityComparer<TVal>.Default.Equals(expectedValue, default(TVal))));
-                }
-                catch (Exception e)
-                {
-                    FwkException(e.Message + "\n");
-                }
-
-                // do a get on the partitioned region if a loader won't get invoked; test its value
-                if (containsValueForKey)
-                {
-                    // loader won't be invoked if we have a value for this key (whether or not a loader
-                    // is installed), or if we don't have a loader at all
-                    try
-                    {
-                        TVal actualValue = aRegion[key];
-                        if (!actualValue.Equals(expectedValue))
-                        {
-                            FwkException("verifyFromSnapshotOnly: expected value {0} is not same as actual value {1} for key {3}",
-                              expectedValue, actualValue, key);
-                        }
-                       
-                    }
-                    catch (Apache.Geode.Client.KeyNotFoundException)
-                    {
-                    }
-                    catch (Exception e)
-                    {
-                        aStr.Append(e.Message + "\n");
-                    }
-                }
-            }
-            if (isSerialExecution)
-            {
-                // check that destroyedKeys are not in the region
-                destroyedKeys = (List<TKey>)Util.BBGet("DestroyedKeys", "destroyedKeys");
-                for (int i = 0; i < destroyedKeys.Count; i++)
-                {
-                    TKey key = destroyedKeys[i];
-                    try
-                    {
-                        verifyContainsKey(aRegion, key, false);
-                    }
-                    catch (Exception e)
-                    {
-                        aStr.Append(e.Message + "\n");
-                    }
-                }
-            }
-            try
-            {
-                verifyServerKeysFromSnapshot();
-            }
-            catch (Exception e)
-            {
-                aStr.Append(e.Message + "\n");
-            }
-
-            if (aStr.Length > 0)
-            {
-                // shutdownHook will cause all members to dump partitioned region info
-                throw new Exception(aStr.ToString());
-            }
-            FwkInfo("Done verifying from snapshot containing " + snapshotSize.ToString() + " entries...");
-        }
-        public void dumpDataOnBB()
-        {
-            IRegion<TKey, TVal> aRegion = GetRegion();
-            ICollection<TKey> serverkeys = aRegion.Keys;
-            regionSnapshot = new Dictionary<TKey, TVal>();
-            foreach (TKey key in serverkeys)
-            {
-                TVal value = default(TVal); ;
-                try
-                {
-                    value = aRegion[key];
-                }
-                catch (Apache.Geode.Client.KeyNotFoundException)
-                {
-                    value = default(TVal);
-                }
-                regionSnapshot[key] = value;
-            }
-            Util.BBSet("RegionSnapshot", "regionSnapshot", regionSnapshot);
-        }
-        public void verifyServerKeysFromSnapshot()
-        {
-            IRegion<TKey, TVal> aRegion = GetRegion();
-            StringBuilder aStr = new StringBuilder();
-            regionSnapshot = (Dictionary<TKey, TVal>)Util.BBGet("RegionSnapshot", "regionSnapshot");
-            destroyedKeys = (List<TKey>)Util.BBGet("DestroyedKeys", "destroyedKeys");
-            ICollection<TKey> serverKeys = new System.Collections.ObjectModel.Collection<TKey>();
-            foreach (TKey key in aRegion.Keys)
-                serverKeys.Add(key);
-
-            int snapshotSize = regionSnapshot.Count;
-            int numServerKeys = serverKeys.Count;
-            //int numServerKeys = aRegion.Count;
-            FwkInfo("Verifying server keys from snapshot containing " + snapshotSize.ToString() + " entries...");
-            if (snapshotSize != numServerKeys)
-            {
-                aStr.Append("Expected number of keys on server to be " + snapshotSize.ToString() + ", but it is " + numServerKeys.ToString() + "\n");
-            }
-            foreach (KeyValuePair<TKey, TVal> kvp in regionSnapshot)
-            { // iterating the expected keys
-                TKey key = kvp.Key;
-                TVal expectedValue = (TVal)(Object)kvp.Value;
-                if (!serverKeys.Contains(key))
-                {
-                    aStr.Append("Expected key " + key + " to be in server keys set, but it is missing\n");
-                }
-                else
-                {
-                    // only do a get if we will not invoke the silence listener on a get
-                    if ((!isThinClient && !isEmptyClient) ||
-                        (isThinClient && aRegion.GetLocalView().ContainsKey(key)))
-                    {
-                        try
-                        {
-                            TVal valueOnServer = (TVal)(Object)aRegion[key];
-
-                            //if (!EqualityComparer<TVal>.Default.Equals(valueOnServer, default(TVal)))
-                            //{
-                            if (!valueOnServer.Equals(expectedValue))
-                            {
-                                FwkException("verifyServerKeysFromSnapshot: expected value {0} is not same as actual value {1} for key {2}",
-                                  expectedValue, valueOnServer, key);
-                            }
-                            FwkInfo("verifyServerKeysFromSnapshot: expected value {0} is same as actual value {1} for key {2}",
-                                expectedValue, valueOnServer, key);
-                            //}
-                        }
-                        catch (Apache.Geode.Client.KeyNotFoundException)
-                        {
-                        }
-                        catch (EntryNotFoundException)
-                        {
-                        }
-                        catch (Exception e)
-                        {
-                            aStr.Append(e.Message + "\n");
-                        }
-                    }
-                }
-            }
-
-            // check that destroyedKeys are not in the server keys
-            if (isSerialExecution)
-            {
-                destroyedKeys = (List<TKey>)Util.BBGet("DestroyedKeys", "destroyedKeys");
-                for (int i = 0; i < destroyedKeys.Count; i++)
-                {
-                    TKey key = destroyedKeys[i];
-                    if (serverKeys.Contains(key))
-                    {
-                        aStr.Append("Destroyed key " + key + " was returned as a server key\n");
-                    }
-                }
-
-
-                foreach (TKey key in regionSnapshot.Keys)
-                {
-                    FwkInfo("IsReadOnly {0}", serverKeys.IsReadOnly);
-                    FwkInfo("serverKeys  key {0}", key);
-                    serverKeys.Remove(key);
-                }
-                if (serverKeys.Count != 0)
-                {
-                    foreach (TKey key in serverKeys)
-                    {
-                        aStr.Append("Found the following unexpected keys in server keys: " +
-                                    ": " + key + "\n");
-                    }
-                }
-            }
-            if (aStr.Length > 0)
-            {
-                // shutdownHook will cause all members to dump partitioned region info
-                throw new Exception(aStr.ToString());
-            }
-            FwkInfo("Done verifying server keys from snapshot containing " + snapshotSize.ToString() + " entries...");
-        }
-        
-        public void DoPopulateRegion()
-        {
-            FwkInfo("In DoPopulateRegion()");
-            try
-            {
-                IRegion<TKey, TVal> region = GetRegion();
-                ResetKey("distinctKeys");
-                int numKeys = GetUIntValue("distinctKeys");
-                ResetKey("versionNum");
-                versionnum = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("versionNum");
-                PdxEntryTask<TKey, TVal> addtask = new PdxEntryTask<TKey, TVal>(region, numKeys,
-                    regionSnapshot, destroyedKeys, isSerialExecution, objectType, versionnum);
-                FwkInfo("Populating region for {0} keys.", numKeys);
-                RunTask(addtask, 1, numKeys, -1, -1, null);
-                Util.BBSet("RegionSnapshot", "regionSnapshot", regionSnapshot);
-                Util.BBSet("DestroyedKeys", "destroyedKeys", destroyedKeys);
-            }
-            catch (Exception ex)
-            {
-                FwkException("DoPopulateRegion() Caught Exception: {0}", ex);
-            }
-            FwkInfo("DoPopulateRegion() complete.");
-        }
-
-        public void DoPuts()
-        {
-            FwkInfo("In DoPuts()");
-            try
-            {
-                IRegion<TKey, TVal> region = GetRegion();
-                int timedInterval = GetTimeValue("timedInterval") * 1000;
-                if (timedInterval <= 0)
-                {
-                    timedInterval = 5000;
-                }
-                int maxTime = 10 * timedInterval;
-
-                // Loop over key set sizes
-                ResetKey("versionNum");
-                versionnum = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("versionNum");
-                ResetKey(DistinctKeys);
-                int numKeys;
-                while ((numKeys = GetUIntValue(DistinctKeys)) > 0)
-                { // keys loop
-                    // Loop over value sizes
-                    ResetKey(ValueSizes);
-                    int valSize;
-                    while ((valSize = GetUIntValue(ValueSizes)) > 0)
-                    { // value loop
-                        // Loop over threads
-                        ResetKey(NumThreads);
-                        int numThreads;
-                        while ((numThreads = GetUIntValue(NumThreads)) > 0)
-                        {
-                            try
-                            {
-                              PdxEntryTask<TKey, TVal> puts = new PdxEntryTask<TKey, TVal>(region, numKeys,
-                                    regionSnapshot, destroyedKeys, isSerialExecution, objectType, versionnum);
-
-                                FwkInfo("Running warmup task for {0} iterations.", numKeys);
-                                RunTask(puts, 1, numKeys, -1, -1, null);
-                                // Running the warmup task
-                                Thread.Sleep(3000);
-                                // And we do the real work now
-                                FwkInfo("Running timed task for {0} secs and {1} threads; numKeys[{2}]",
-                                  timedInterval / 1000, numThreads, numKeys);
-                                //SetTaskRunInfo(label, "Puts", m_maxKeys, numClients,
-                                //  valSize, numThreads);
-                                RunTask(puts, numThreads, -1, timedInterval, maxTime, null);
-                                Util.BBSet("RegionSnapshot", "regionSnapshot", regionSnapshot);
-                                Util.BBSet("DestroyedKeys", "destroyedKeys", destroyedKeys);
-                                //AddTaskRunRecord(puts.Iterations, puts.ElapsedTime);
-
-                            }
-                            catch (ClientTimeoutException)
-                            {
-                                FwkException("In DoPuts()  Timed run timed out.");
-                            }
-                            Thread.Sleep(3000); // Put a marker of inactivity in the stats
-                        }
-                        Thread.Sleep(3000); // Put a marker of inactivity in the stats
-                    } // value loop
-                    Thread.Sleep(3000); // Put a marker of inactivity in the stats
-                } // keys loop
-            }
-            catch (Exception ex)
-            {
-                FwkException("DoPuts() Caught Exception: {0}", ex);
-            }
-            Thread.Sleep(3000); // Put a marker of inactivity in the stats
-            FwkInfo("DoPuts() complete.");
-        }
-        public void DoGets()
-        {
-            FwkInfo("In DoGets()");
-            try
-            {
-                IRegion<TKey, TVal> region = GetRegion();
-                int numClients = GetUIntValue(ClientCount);
-                string label = CacheHelper<TKey, TVal>.RegionTag(region.Attributes);
-                int timedInterval = GetTimeValue(TimedInterval) * 1000;
-                if (timedInterval <= 0)
-                {
-                    timedInterval = 5000;
-                }
-                int maxTime = 10 * timedInterval;
-
-                ResetKey(DistinctKeys);
-                int numKeys = GetUIntValue(DistinctKeys);
-                ResetKey("versionNum");
-                versionnum = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("versionNum");
-                
-                int valSize = GetUIntValue(ValueSizes);
-                // Loop over threads
-                ResetKey(NumThreads);
-                int numThreads;
-                while ((numThreads = GetUIntValue(NumThreads)) > 0)
-                { // thread loop
-
-                    // And we do the real work now
-                    PdxEntryTask<TKey, TVal> gets = new PdxEntryTask<TKey, TVal>(region, numKeys,
-                        regionSnapshot, destroyedKeys, isSerialExecution, objectType, versionnum);
-                    FwkInfo("Running warmup task for {0} iterations.", numKeys);
-                    RunTask(gets, 1, numKeys, -1, -1, null);
-                    region.GetLocalView().InvalidateRegion();
-                    Thread.Sleep(3000);
-                    FwkInfo("Running timed task for {0} secs and {1} threads.",
-                      timedInterval / 1000, numThreads);
-                    //SetTaskRunInfo(label, "Gets", m_maxKeys, numClients, valSize, numThreads);
-                    try
-                    {
-                        RunTask(gets, numThreads, -1, timedInterval, maxTime, null);
-                    }
-                    catch (ClientTimeoutException)
-                    {
-                        FwkException("In DoGets()  Timed run timed out.");
-                    }
-                    //AddTaskRunRecord(gets.Iterations, gets.ElapsedTime);
-                    // real work complete for this pass thru the loop
-                    Util.BBSet("RegionSnapshot", "regionSnapshot", regionSnapshot);
-                    Util.BBSet("DestroyedKeys", "destroyedKeys", destroyedKeys);
-                    Thread.Sleep(3000);
-                } // thread loop
-            }
-            catch (Exception ex)
-            {
-                FwkException("DoGets() Caught Exception: {0}", ex);
-            }
-            Thread.Sleep(3000);
-            FwkInfo("DoGets() complete.");
-        }
-
-        void doAccessPdxInstanceAndVerify()
-        {
-            CacheHelper<TKey, TVal>.DCache.TypeRegistry.RegisterPdxType(PdxType.CreateDeserializable);
-            FwkInfo("In doAccessPdxInstanceAndVerify");
-            IRegion<TKey, TVal> region0 = GetRegion();
-            PdxType dPdxType = new PdxType();
-            ResetKey(DistinctKeys);
-            int numKeys = GetUIntValue(DistinctKeys);
-            int size = region0.Keys.Count;
-            TKey[] keys = (TKey[])region0.Keys;
-            TKey key = default(TKey);
-            try
-            {
-                if(size != numKeys){
-                    FwkException("doAccessPdxInstanceAndVerify() number of entries {0} on server is not same as expected {1}", size, numKeys);
-                }
-                for (int index = 0; index < numKeys; index++)
-                {
-                    key = keys[index];
-                    bool containsValueForKey = false;
-                    if (isEmptyClient || m_istransaction)
-                        containsValueForKey = region0.ContainsValueForKey(key);
-                    else
-                        containsValueForKey = region0.GetLocalView().ContainsValueForKey(key);
-                    IPdxInstance ret = (IPdxInstance)region0[key];
-                    string retStr = (string)ret.GetField("m_string");
-                    PdxType.GenericValCompare(dPdxType.PString, retStr);
-
-                    PdxType.GenericValCompare((char)ret.GetField("m_char"), dPdxType.Char);
-
-                    byte[][] baa = (byte[][])ret.GetField("m_byteByteArray");
-                    PdxType.compareByteByteArray(baa, dPdxType.ByteByteArray);
-
-                    PdxType.GenericCompare((char[])ret.GetField("m_charArray"), dPdxType.CharArray);
-
-                    bool bl = (bool)ret.GetField("m_bool");
-                    PdxType.GenericValCompare(bl, dPdxType.Bool);
-                    PdxType.GenericCompare((bool[])ret.GetField("m_boolArray"), dPdxType.BoolArray);
-
-                    PdxType.GenericValCompare((sbyte)ret.GetField("m_byte"), dPdxType.Byte);
-                    PdxType.GenericCompare((byte[])ret.GetField("m_byteArray"), dPdxType.ByteArray);
-
-
-                    List<object> tmpl = (List<object>)ret.GetField("m_arraylist");
-
-                    PdxType.compareCompareCollection(tmpl, dPdxType.Arraylist);
-
-                    IDictionary<object, object> tmpM = (IDictionary<object, object>)ret.GetField("m_map");
-                    if (tmpM.Count != dPdxType.Map.Count)
-                        throw new IllegalStateException("Not got expected value for type: " + dPdxType.Map.GetType().ToString());
-
-                    Hashtable tmpH = (Hashtable)ret.GetField("m_hashtable");
-
-                    if (tmpH.Count != dPdxType.Hashtable.Count)
-                        throw new IllegalStateException("Not got expected value for type: " + dPdxType.Hashtable.GetType().ToString());
-
-                    ArrayList arrAl = (ArrayList)ret.GetField("m_vector");
-
-                    if (arrAl.Count != dPdxType.Vector.Count)
-                        throw new IllegalStateException("Not got expected value for type: " + dPdxType.Vector.GetType().ToString());
-
-                    CacheableHashSet rmpChs = (CacheableHashSet)ret.GetField("m_chs");
-
-                    if (rmpChs.Count != dPdxType.Chs.Count)
-                        throw new IllegalStateException("Not got expected value for type: " + dPdxType.Chs.GetType().ToString());
-
-                    CacheableLinkedHashSet rmpClhs = (CacheableLinkedHashSet)ret.GetField("m_clhs");
-
-                    if (rmpClhs.Count != dPdxType.Clhs.Count)
-                        throw new IllegalStateException("Not got expected value for type: " + dPdxType.Clhs.GetType().ToString());
-
-
-                    PdxType.GenericValCompare((string)ret.GetField("m_string"), dPdxType.String);
-
-                    PdxType.compareData((DateTime)ret.GetField("m_dateTime"), dPdxType.DateTime);
-
-                    PdxType.GenericValCompare((double)ret.GetField("m_double"), dPdxType.Double);
-
-                    PdxType.GenericCompare((long[])ret.GetField("m_longArray"), dPdxType.LongArray);
-                    PdxType.GenericCompare((Int16[])ret.GetField("m_int16Array"), dPdxType.Int16Array);
-                    PdxType.GenericValCompare((sbyte)ret.GetField("m_sbyte"), dPdxType.Sbyte);
-                    PdxType.GenericCompare((byte[])ret.GetField("m_sbyteArray"), dPdxType.SbyteArray);
-                    PdxType.GenericCompare((string[])ret.GetField("m_stringArray"), dPdxType.StringArray);
-                    PdxType.GenericValCompare((Int16)ret.GetField("m_uint16"), dPdxType.Uint16);
-                    PdxType.GenericValCompare((int)ret.GetField("m_uint32"), dPdxType.Uint32);
-                    PdxType.GenericValCompare((long)ret.GetField("m_ulong"), dPdxType.Ulong);
-                    PdxType.GenericCompare((int[])ret.GetField("m_uint32Array"), dPdxType.Uint32Array);
-
-                    PdxType.GenericCompare((double[])ret.GetField("m_doubleArray"), dPdxType.DoubleArray);
-                    PdxType.GenericValCompare((float)ret.GetField("m_float"), dPdxType.Float);
-                    PdxType.GenericCompare((float[])ret.GetField("m_floatArray"), dPdxType.FloatArray);
-                    PdxType.GenericValCompare((Int16)ret.GetField("m_int16"), dPdxType.Int16);
-                    PdxType.GenericValCompare((Int32)ret.GetField("m_int32"), dPdxType.Int32);
-                    PdxType.GenericValCompare((long)ret.GetField("m_long"), dPdxType.Long);
-                    PdxType.GenericCompare((int[])ret.GetField("m_int32Array"), dPdxType.Int32Array);
-
-                    PdxType.GenericCompare((long[])ret.GetField("m_ulongArray"), dPdxType.UlongArray);
-                    PdxType.GenericCompare((Int16[])ret.GetField("m_uint16Array"), dPdxType.Uint16Array);
-
-                    byte[] retbA = (byte[])ret.GetField("m_byte252");
-                    if (retbA.Length != 252)
-                        throw new Exception("Array len 252 not found");
-
-                    retbA = (byte[])ret.GetField("m_byte253");
-                    if (retbA.Length != 253)
-                        throw new Exception("Array len 253 not found");
-
-                    retbA = (byte[])ret.GetField("m_byte65535");
-                    if (retbA.Length != 65535)
-                        throw new Exception("Array len 65535 not found");
-
-                    retbA = (byte[])ret.GetField("m_byte65536");
-                    if (retbA.Length != 65536)
-                        throw new Exception("Array len 65536 not found");
-
-                    pdxEnumTest ev = (pdxEnumTest)ret.GetField("m_pdxEnum");
-                    if (ev != dPdxType.PdxEnum)
-                        throw new Exception("Pdx enum is not equal");
-
-                    IPdxInstance[] addreaaPdxI = (IPdxInstance[])ret.GetField("m_address");
-                    if (addreaaPdxI.Length != dPdxType.AddressArray.Length)
-                        throw new Exception("Address array not mateched ");
-                    
-
-                    List<object> objArr = (List<object>)ret.GetField("m_objectArray");
-                    
-                    if (objArr.Count != dPdxType.ObjectArray.Count)
-                       throw new Exception("Object array not mateched ");
-                    
-
-                }
-            }
-            catch (Exception ex)
-            {
-                FwkException("doAccessPdxInstanceAndVerify() Caught Exception: {0}", ex);
-            }
-        }
-        public void exceptionThrow(IPdxInstance newpdxins, IPdxInstance pdxins)
-        {
-            if (pdxins.Equals(newpdxins))
-            {
-                throw new Exception("PdxInstance should not be equal");
-            }
-        }
-        public void doModifyPdxInstance()
-        {
-            FwkInfo("In doModifyPdxInstance");
-            IRegion<TKey, TVal> region0 = GetRegion();
-            int size;
-            if (isEmptyClient || m_istransaction)
-            {
-                size = region0.Keys.Count;
-            }
-            else
-            {
-                size = region0.Count;
-            }
-            ResetKey(DistinctKeys);
-            int numKeys = GetUIntValue(DistinctKeys);
-            //int size = region0.Count;
-            TKey[] keys = (TKey[])region0.Keys;
-            TKey key = default(TKey);
-            try
-            {
-                if(size != numKeys){
-                    FwkException("doModifyPdxInstance() number of entries {0} on server is not same as expected {1}",size,numKeys);
-                }
-                for (int index = 0; index < numKeys; index++)
-                {
-                    
-                    key = keys[index];
-                    IPdxInstance newpdxins;
-                    IPdxInstance pdxins = (IPdxInstance)region0[key];
-
-                    int oldVal = (int)pdxins.GetField("m_int32");
-                    IWritablePdxInstance iwpi = pdxins.CreateWriter();
-                    StringBuilder builder = new StringBuilder();
-                    Random random = new Random();
-                    char ch;
-                    for (int j = 0; j < 10; j++)
-                    {
-                        ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
-                        builder.Append(ch);
-                    }
-                    string changeStr = builder.ToString();
-                    //string changeStr = "change the string";
-                    iwpi.SetField("m_int32", oldVal + 1);
-                    iwpi.SetField("m_string", changeStr);
-                    region0[key] =(TVal)(object)iwpi;
-
-                    newpdxins = (IPdxInstance)region0[key];
-
-                    int newVal = (int)newpdxins.GetField("m_int32");
-                    if ((oldVal + 1) != newVal)
-                    {
-                        throw new Exception("PdxInstance field m_int32 of PdxType not get modified and " +
-                            "the previous value was " + oldVal + " and new value is " + newVal);
-                    }
-
-                    string cStr = (string)newpdxins.GetField("m_string");
-                    if (!cStr.Equals(changeStr))
-                    {
-                        throw new Exception("PdxInstance field m_string of PdxType not get modified and " +
-                            "the previous value was " + changeStr + " and new value is " + cStr);
-                    }
-
-                    List<object> arr = (List<object>)newpdxins.GetField("m_arraylist");
-                    exceptionThrow(newpdxins, pdxins);
-
-                    
-                    //int num = random.Next(0, 26); // Zero to 25
-                    //char newChar = (char)('a' + num);
-                    /*
-                    char oldChar = (char)pdxins.GetField("m_char");
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_char", 'D');
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    char newChar = (char)newpdxins.GetField("m_char");
-                    if (!(newChar.Equals('D')))
-                    {
-                        throw new Exception("PdxInstance field m_char of PdxType not get modified and " +
-                            "the previous value was " + oldChar + " and new value is " + newChar);
-                    }
-                    expcetionThrow(newpdxins, pdxins);
-                    */
-                    bool beforeValue = (bool)pdxins.GetField("m_bool");
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_bool", false);
-                    region0[key] = (TVal)(object)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    bool updateValue = (bool)newpdxins.GetField("m_bool");
-                    if(updateValue)
-                    {
-                        throw new Exception("PdxInstance field m_bool is not equal");
-                    }
-                    exceptionThrow(newpdxins, pdxins);
-                    /*
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_byte", (sbyte)0x75);
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual((sbyte)newpdxins.GetField("m_byte"), (sbyte)0x75, "sbyte is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_sbyte", (sbyte)0x57);
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual((sbyte)newpdxins.GetField("m_sbyte"), (sbyte)0x57, "sbyte is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_int16", (short)0x5678);
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual((Int16)newpdxins.GetField("m_int16"), (short)0x5678, "int16 is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_long", (long)0x56787878);
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual((long)newpdxins.GetField("m_long"), (long)0x56787878, "long is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_float", 18389.34f);
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual((float)newpdxins.GetField("m_float"), 18389.34f, "float is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_float", 18389.34f);
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual((float)newpdxins.GetField("m_float"), 18389.34f, "float is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_double", 18389.34d);
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual((double)newpdxins.GetField("m_double"), 18389.34d, "double is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_boolArray", new bool[] { true, false, true, false, true, true, false, true });
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual((bool[])newpdxins.GetField("m_boolArray"), new bool[] { true, false, true, false, true, true, false, true }, "bool array is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_byteArray", new byte[] { 0x34, 0x64, 0x34, 0x64 });
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual((byte[])newpdxins.GetField("m_byteArray"), new byte[] { 0x34, 0x64, 0x34, 0x64 }, "byte array is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_charArray", new char[] { 'c', 'v', 'c', 'v' });
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual((char[])newpdxins.GetField("m_charArray"), new char[] { 'c', 'v', 'c', 'v' }, "char array is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-
-                    iwpi = pdxins.CreateWriter();
-                    long ticks = 634460644691580000L;
-                    DateTime tdt = new DateTime(ticks);
-                    iwpi.SetField("m_dateTime", tdt);
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual((DateTime)newpdxins.GetField("m_dateTime"), tdt, "datetime is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_int16Array", new short[] { 0x2332, 0x4545, 0x88, 0x898 });
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual((Int16[])newpdxins.GetField("m_int16Array"), new short[] { 0x2332, 0x4545, 0x88, 0x898 }, "short array is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_int32Array", new int[] { 23, 676868, 34343 });
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual((Int32[])newpdxins.GetField("m_int32Array"), new int[] { 23, 676868, 34343 }, "int32 array is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_longArray", new Int64[] { 3245435, 3425435 });
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual((long[])newpdxins.GetField("m_longArray"), new Int64[] { 3245435, 3425435 }, "long array is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_floatArray", new float[] { 232.565f, 234323354.67f });
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual((float[])newpdxins.GetField("m_floatArray"), new float[] { 232.565f, 234323354.67f }, "float array is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_doubleArray", new double[] { 23423432d, 43242354315d });
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual((double[])newpdxins.GetField("m_doubleArray"), new double[] { 23423432d, 43242354315d }, "double array is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-
-                    byte[][] tmpbb = new byte[][]{new byte[] {0x23},
-                    new byte[]{0x34, 0x55},
-                    new byte[] {0x23},
-                    new byte[]{0x34, 0x55}
-                    };
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_byteByteArray", tmpbb);
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    byte[][] retbb = (byte[][])newpdxins.GetField("m_byteByteArray");
-
-                    PdxType.compareByteByteArray(tmpbb, retbb);
-
-                    expcetionThrow(newpdxins, pdxins);
-
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_stringArray", new string[] { "one", "two", "eeeee" });
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual((string[])newpdxins.GetField("m_stringArray"), new string[] { "one", "two", "eeeee" }, "string array is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-
-                    List<object> tl = new List<object>();
-                    tl.Add(new PdxType());
-                    tl.Add(new byte[] { 0x34, 0x55 });
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_arraylist", tl);
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual(((List<object>)newpdxins.GetField("m_arraylist")).Count, tl.Count, "list<object> is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-                    Dictionary<object, object> map = new Dictionary<object, object>();
-                    map.Add(1, new bool[] { true, false, true, false, true, true, false, true });
-                    map.Add(2, new string[] { "one", "two", "eeeee" });
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_map", map);
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual(((Dictionary<object, object>)newpdxins.GetField("m_map")).Count, map.Count, "map is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-                    Hashtable hashtable = new Hashtable();
-                    hashtable.Add(1, new string[] { "one", "two", "eeeee" });
-                    hashtable.Add(2, new int[] { 23, 676868, 34343 });
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_hashtable", hashtable);
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual(((Hashtable)newpdxins.GetField("m_hashtable")).Count, hashtable.Count, "hashtable is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_pdxEnum", pdxEnumTest.pdx1);
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual(((pdxEnumTest)newpdxins.GetField("m_pdxEnum")), pdxEnumTest.pdx1, "pdx enum is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-                    ArrayList vector = new ArrayList();
-                    vector.Add(1);
-                    vector.Add(2);
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_vector", vector);
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual(((ArrayList)newpdxins.GetField("m_vector")).Count, vector.Count, "vector is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-                    CacheableHashSet chm = CacheableHashSet.Create();
-                    chm.Add(1);
-                    chm.Add("jkfdkjdsfl");
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_chs", chm);
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual((CacheableHashSet)newpdxins.GetField("m_chs"), chm, "CacheableHashSet is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-                    CacheableLinkedHashSet clhs = CacheableLinkedHashSet.Create();
-                    clhs.Add(111);
-                    clhs.Add(111343);
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_clhs", clhs);
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual((CacheableLinkedHashSet)newpdxins.GetField("m_clhs"), clhs, "CacheableLinkedHashSet is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-                    PdxTests.Address[] aa = new PdxTests.Address[2];
-                    for (int i = 0; i < aa.Length; i++)
-                    {
-                        aa[i] = new PdxTests.Address(i + 1, "street" + i.ToString(), "city" + i.ToString());
-                    }
-
-                    iwpi = pdxins.CreateWriter();
-
-                    iwpi.SetField("m_address", aa);
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    IPdxInstance[] iaa = (IPdxInstance[])newpdxins.GetField("m_address");
-                    Assert.AreEqual(iaa.Length, aa.Length, "address array length should equal");
-                    expcetionThrow(newpdxins, pdxins);
-
-                    List<object> oa = new List<object>();
-                    oa.Add(new PdxTests.Address(1, "1", "12"));
-                    oa.Add(new PdxTests.Address(1, "1", "12"));
-
-                    iwpi = pdxins.CreateWriter();
-                    iwpi.SetField("m_objectArray", oa);
-                    region0[key] = (TVal)iwpi;
-                    newpdxins = (IPdxInstance)region0[key];
-                    Assert.AreEqual(((List<object>)newpdxins.GetField("m_objectArray")).Count, oa.Count, "Object arary is not equal");
-                    expcetionThrow(newpdxins, pdxins);
-                    */
-         
-                }
-            }
-            catch (Exception ex)
-            {
-                FwkException("doModifyPdxInstance() Caught Exception: {0}", ex);
-            }
-                
-        }
-
-        public void doVerifyAndModifyPdxInstance()
-        {
-            try
-            {
-                doAccessPdxInstanceAndVerify();
-                doModifyPdxInstance();
-            }
-            catch (Exception ex)
-            {
-                FwkException("doModifyPdxInstance() Caught Exception: {0}", ex);
-            }
-        }
-
-
-        // ------------------------------ end pdx ralated task ----------------
-        public void DoEntryOperations()
-        {
-            FwkInfo("CacheServer.DoEntryOperations() called.");
-
-            int opsSec = GetUIntValue(OpsSecond);
-            opsSec = (opsSec < 1) ? 0 : opsSec;
-
-            int entryCount = GetUIntValue(EntryCount);
-            entryCount = (entryCount < 1) ? 10000 : entryCount;
-
-            int secondsToRun = GetTimeValue(WorkTime);
-            secondsToRun = (secondsToRun < 1) ? 30 : secondsToRun;
-
-            int valSize = GetUIntValue(ValueSizes);
-            int minValSize = (int)(sizeof(int) + sizeof(long) + 4);
-            valSize = ((valSize < minValSize) ? minValSize : valSize);
-
-            DateTime now = DateTime.Now;
-            DateTime end = now.AddSeconds(secondsToRun);
-
-            TKey key;
-            TVal value;
-            TVal tmpValue;
-            //TVal valBuf = (TVal)(object)Encoding.ASCII.GetBytes(new string('A', valSize));
-            byte[] valBuf = Encoding.ASCII.GetBytes(new string('A', valSize));
-            string opcode = null;
-
-            int creates = 0, puts = 0, gets = 0, dests = 0, invals = 0, query = 0, putAll = 0, getAll = 0;
-            IRegion<TKey, TVal> region = GetRegion();
-            if (region == null)
-            {
-                FwkSevere("CacheServer.DoEntryOperations(): No region to perform operations on.");
-                now = end; // Do not do the loop
-            }
-
-            FwkInfo("CacheServer.DoEntryOperations() will work for {0}secs " +
-              "using {1} byte values.", secondsToRun, valSize);
-
-            PaceMeter pm = new PaceMeter(opsSec);
-            string objectType = GetStringValue(ObjectType);
-            bool multiRegion = GetBoolValue("multiRegion");
-            while (now < end)
-            {
-                try
-                {
-                    opcode = GetStringValue(EntryOps);
-                    if (opcode == null || opcode.Length == 0)
-                    {
-                        opcode = "no-op";
-                    }
-                    if (multiRegion)
-                    {
-                        region = GetRegion();
-                        if (region == null)
-                        {
-                            FwkException("CacheServerTest::doEntryOperations(): No region to perform operation {0}", opcode);
-                        }
-                    }
-
-                    key = (TKey)(object)GetKey(entryCount);
-                    if (opcode == "add")
-                    {
-                        if (objectType != null && objectType.Length > 0)
-                        {
-                            tmpValue = (TVal)(object)GetUserObject(objectType);
-                        }
-                        else
-                        {
-                            tmpValue = (TVal)(object)valBuf;
-                        }
-                        try
-                        {
-                            region.Add(key, tmpValue);
-                            creates++;
-                        }
-                        catch (EntryExistsException ex)
-                        {
-                            FwkInfo("CacheServer.DoEntryOperations() Caught non-fatal " +
-                                 "ex-ception in add: {0}", ex.Message);
-                        }
-                    }
-                    else
-                    {
-                        if (opcode == "update")
-                        {
-                            if (objectType != null && objectType.Length > 0)
-                            {
-                                tmpValue = GetUserObject(objectType);
-                            }
-                            else
-                            {
-                                int keyVal = int.Parse(key.ToString());
-                                int val = BitConverter.ToInt32(valBuf, 0);
-                                val = (val == keyVal) ? keyVal + 1 : keyVal;  // alternate the value so that it can be validated later.
-                                BitConverter.GetBytes(val).CopyTo(valBuf, 0);
-                                BitConverter.GetBytes(DateTime.Now.Ticks).CopyTo(valBuf, 4);
-                                tmpValue = (TVal)(object)valBuf;
-                            }
-                            region[key] = tmpValue;
-                            puts++;
-                        }
-                        else if (opcode == "invalidate")
-                        {
-                            try
-                            {
-                                region.Invalidate(key);
-                                invals++;
-                            }
-                            catch (EntryNotFoundException ex)
-                            {
-                                FwkInfo("CacheServer.DoEntryOperations() Caught non-fatal " +
-                                  "ex-ception in invalidate: {0}", ex.Message);
-                            }
-                        }
-                        else if (opcode == "destroy")
-                        {
-                            try
-                            {
-                                region.Remove(key);
-                                dests++;
-                            }
-                            catch (EntryNotFoundException ex)
-                            {
-                                FwkInfo("CacheServer.DoEntryOperations() Caught non-fatal " +
-                                  "ex-ception in destroy: {0}", ex.Message);
-                            }
-                        }
-                        else if (opcode == "read")
-                        {
-                            try
-                            {
-                                value = (TVal)region[key];
-                                gets++;
-                            }
-                            catch (EntryNotFoundException ex)
-                            {
-                                FwkInfo("CacheServer.DoEntryOperations() Caught non-fatal " +
-                                  "ex-ception in read: {0}", ex.Message);
-                            }
-                            catch (Apache.Geode.Client.KeyNotFoundException ex)
-                            {
-                                FwkInfo("CacheServer.DoEntryOperations() Caught non-fatal " +
-                                  "ex-ception in read: {0}", ex.Message);
-                            }
-                        }
-                        else if (opcode == "read+localdestroy")
-                        {
-                            value = region[key];
-                            gets++;
-                            try
-                            {
-                                region.GetLocalView().Remove(key);
-                                dests++;
-                            }
-                            catch (EntryNotFoundException ex)
-                            {
-                                FwkInfo("CacheServer.DoEntryOperations() Caught non-fatal " +
-                                  "ex-ception in localDestroy: {0}", ex.Message);
-                            }
-                        }
-                        else if (opcode == "query")
-                        {
-                            RunQuery();
-                            query += 4;
-                        }
-                        else if (opcode == "putAll")
-                        {
-                            PutAllOps();
-                            putAll++;
-                        }
-                        else if (opcode == "getAll")
-                        {
-                            GetAllOps();
-                            getAll++;
-                        }
-                        else
-                        {
-                            FwkException("CacheServer.DoEntryOperations() Invalid operation " +
-                              "specified: {0}", opcode);
-                        }
-                    }
-                }
-                catch (Exception ex)
-                {
-                    FwkException("CacheServer.DoEntryOperations() Caught unexpected " +
-                      "exception during entry '{0}' operation: {1}.", opcode, ex);
-                }
-                pm.CheckPace();
-                now = DateTime.Now;
-            }
-            key = default(TKey);
-            value = default(TVal);
-
-            FwkInfo("CacheServer.DoEntryOperations() did {0} creates, {1} puts, " +
-              "{2} gets, {3} invalidates, {4} destroys, {5} querys, {6} putAll, {7} getAll.",
-              creates, puts, gets, invals, dests, query, putAll, getAll);
-        }
-
-        public void DoEntryOperationsForSecurity()
-        {
-            FwkInfo("CacheServer.DoEntryOperationsForSecurity() called.");
-            Util.RegisterTestCompleteDelegate(TestComplete);
-
-            int opsSec = GetUIntValue(OpsSecond);
-            opsSec = (opsSec < 1) ? 0 : opsSec;
-
-            int entryCount = GetUIntValue(EntryCount);
-            entryCount = (entryCount < 1) ? 10000 : entryCount;
-
-            int secondsToRun = GetTimeValue(WorkTime);
-            secondsToRun = (secondsToRun < 1) ? 30 : secondsToRun;
-
-            int valSize = GetUIntValue(ValueSizes);
-            int minValSize = (int)(sizeof(int) + sizeof(long) + 4);
-            valSize = ((valSize < minValSize) ? minValSize : valSize);
-
-            DateTime now = DateTime.Now;
-            DateTime end = now.AddSeconds(secondsToRun);
-
-            TKey key;
-            TVal value;
-            TVal tmpValue;
-            byte[] valBuf = Encoding.ASCII.GetBytes(new string('A', valSize));
-
-            string opCode = null;
-
-            IRegion<TKey, TVal> region = GetRegion();
-            if (region == null)
-            {
-                FwkException("CacheServer.DoEntryOperationsForSecurity(): " +
-                  "No region to perform operations on.");
-            }
-
-            FwkInfo("CacheServer.DoEntryOperationsForSecurity() will work for {0}secs " +
-              "using {1} byte values.", secondsToRun, valSize);
-
-            int cnt = 0;
-            PaceMeter pm = new PaceMeter(opsSec);
-            string objectType = GetStringValue(ObjectType);
-            while (now < end)
-            {
-                int addOps = 1;
-                opCode = GetStringValue(EntryOps);
-                try
-                {
-                    UpdateOperationsMap(opCode, 1);
-                    if (opCode == null || opCode.Length == 0)
-                    {
-                        opCode = "no-op";
-                    }
-
-                    key = GetKey(entryCount);
-                    if (opCode == "create")
-                    {
-                        if (objectType != null && objectType.Length > 0)
-                        {
-                            tmpValue = GetUserObject(objectType);
-                        }
-                        else
-                        {
-                            tmpValue = (TVal)(object)valBuf;
-                        }
-                        region.Add(key, tmpValue);
-                    }
-                    else
-                    {
-                        if (opCode == "update")
-                        {
-                            if (objectType != null && objectType.Length > 0)
-                            {
-                                tmpValue = (TVal)(object)GetUserObject(objectType);
-                            }
-                            else
-                            {
-                                int keyVal = int.Parse(key.ToString());
-                                int val = BitConverter.ToInt32(valBuf, 0);
-                                val = (val == keyVal) ? keyVal + 1 : keyVal;  // alternate the value so that it can be validated later.
-                                BitConverter.GetBytes(val).CopyTo(valBuf, 0);
-                                BitConverter.GetBytes(DateTime.Now.Ticks).CopyTo(valBuf, 4);
-                                tmpValue = (TVal)(object)valBuf;
-                            }
-                            region[key] = tmpValue;
-                        }
-                        else if (opCode == "invalidate")
-                        {
-                            region.Invalidate(key);
-                        }
-                        else if (opCode == "destroy")
-                        {
-                            region.Remove(key);
-                        }
-                        else if (opCode == "get")
-                        {
-                            value = region[key];
-                        }
-                        else if (opCode == "read+localdestroy")
-                        {
-                            value = region[key];
-                            region.GetLocalView().Remove(key);
-                        }
-                        else if (opCode == "regNUnregInterest")
-                        {
-                            TKey[] keys = new TKey[] { key };
-                            region.GetSubscriptionService().RegisterKeys(keys);
-                            region.GetSubscriptionService().UnregisterKeys(keys);
-                        }
-                        else if (opCode == "query")
-                        {
-                            var qs = CheckQueryService();
-                            Query<object> qry = qs.NewQuery<object>("select distinct * from /Portfolios where FALSE");
-                            ISelectResults<object> result = qry.Execute(TimeSpan.FromSeconds(600));
-                        }
-                        else if (opCode == "cq")
-                        {
-                            string cqName = String.Format("cq-{0}-{1}", Util.ClientId, cnt++);
-                            var qs = CheckQueryService();
-                            CqAttributesFactory<TKey, object> cqFac = new CqAttributesFactory<TKey, object>();
-                            ICqListener<TKey, object> cqLstner = new MyCqListener<TKey, object>();
-                            cqFac.AddCqListener(cqLstner);
-                            CqAttributes<TKey, object> cqAttr = cqFac.Create();
-                            CqQuery<TKey, object> cq = qs.NewCq(cqName, "select * from /Portfolios where FALSE", cqAttr, false);
-                            cq.Execute();
-                            cq.Stop();
-                            cq.Execute();
-                            cq.Close();
-                        }
-                        else
-                        {
-                            FwkException("CacheServer.DoEntryOperationsForSecurity() " +
-                              "Invalid operation specified: {0}", opCode);
-                        }
-                    }
-                }
-                catch (NotAuthorizedException)
-                {
-                    //FwkInfo("Got expected NotAuthorizedException for operation {0}: {1}",
-                    //  opCode, ex.Message);
-                    UpdateExceptionsMap(opCode, 1);
-                }
-                catch (EntryExistsException)
-                {
-                    addOps = -1;
-                    UpdateOperationsMap(opCode, addOps);
-                }
-                catch (EntryNotFoundException)
-                {
-                    addOps = -1;
-                    UpdateOperationsMap(opCode, addOps);
-                }
-                catch (EntryDestroyedException)
-                {
-                    addOps = -1;
-                    UpdateOperationsMap(opCode, addOps);
-                }
-                catch (TimeoutException ex)
-                {
-                    FwkSevere("Caught unexpected timeout exception during entry {0} " +
-                      " operation: {1}; continuing with test.", opCode, ex.Message);
-                }
-                catch (Exception ex)
-                {
-                    FwkException("CacheServer.DoEntryOperationsForSecurity() Caught " +
-                      "unexpected exception during entry '{0}' operation: {1}.",
-                      opCode, ex);
-                }
-                pm.CheckPace();
-                now = DateTime.Now;
-            }
-            key = default(TKey);
-            value = default(TVal);
-        }
-
-        public void DoValidateEntryOperationsForSecurity()
-        {
-            bool isExpectedPass = GetBoolValue("isExpectedPass");
-            string opCode;
-            while ((opCode = GetStringValue(EntryOps)) != null)
-            {
-                int numOps = GetOpsFromMap(OperationsMap, opCode);
-                int notAuthzCount = GetOpsFromMap(ExceptionsMap, opCode);
-                if (isExpectedPass)
-                {
-                    if (numOps != 0 && notAuthzCount == 0)
-                    {
-                        FwkInfo("Task passed sucessfully for operation {0} with total " +
-                          "operations = {1}", opCode, numOps);
-                    }
-                    else
-                    {
-                        FwkException("{0} NotAuthorizedExceptions found for operation {1} " +
-                          "while expected 0", notAuthzCount, opCode);
-                    }
-                }
-                else
-                {
-                    if (numOps == notAuthzCount)
-                    {
-                        FwkInfo("Operation {0} passed sucessfully and got the expected " +
-                          "number of incorrect authorizations: {1}", opCode, numOps);
-                    }
-                    else
-                    {
-                        FwkException("For operation {0} expected number of " +
-                          "NotAuthorizedExceptions is {1} but found {2}", opCode,
-                          numOps, notAuthzCount);
-                    }
-                }
-            }
-        }
-
-        public static void TestComplete()
-        {
-            OperationsMap.Clear();
-            ExceptionsMap.Clear();
-        }
-
-        #endregion
-    }
-}
-
diff --git a/tests/cli/NewFwkLib/PerfTest/DupChecker.cs b/tests/cli/NewFwkLib/PerfTest/DupChecker.cs
deleted file mode 100644
index 49da89b..0000000
--- a/tests/cli/NewFwkLib/PerfTest/DupChecker.cs
+++ /dev/null
@@ -1,132 +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.
- */
-
-using System;
-using System.Collections.Generic;
-
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.DUnitFramework;
-  using Apache.Geode.Client;
-  //using Region = Apache.Geode.Client.IRegion<Object, Object>;
-
-
-  public class DupChecker<TKey, TVal> : CacheListenerAdapter<TKey, TVal>, IDisposable
-  {
-    /*
-  
-    Note:
-  
-    Currently, for failoverTestHAEventIDMap.xml, PerfTests.DoSerialPuts has a hardcoded
-    keycount of 1000 and values are put serially from 1 to 1000.
-  
-    */
-
-    #region Private members
-
-    int m_ops = 0;
-    Dictionary<TKey, TVal> m_map = new Dictionary<TKey, TVal>();
-    
-    #endregion
-
-    #region Private methods
-
-    private void check(EntryEvent<TKey, TVal> ev)
-    {
-      m_ops++;
-
-      TKey key = ev.Key;
-      TVal value = ev.NewValue;
-
-      FwkTest<TKey, TVal> currTest = FwkTest<TKey, TVal>.CurrentTest;
-
-      if (m_map.ContainsKey((TKey)key))
-      {
-        TVal old = m_map[(TKey)key];
-
-        currTest.FwkAssert(value.Equals(old) , "DupChecker: Duplicate detected. Existing value is {0}, New value is {1}",
-          old, value);
-      }
-
-      m_map[(TKey)key] = value;
-    }
-    
-    private void validate()
-    {
-      FwkTest<TKey, TVal> currTest = FwkTest<TKey, TVal>.CurrentTest;
-
-      currTest.FwkInfo("DupChecker: got {0} keys.", m_map.Count);
-
-      currTest.FwkAssert(m_map.Count == 1000, "DupChecker: Expected 1000 keys for the region, actual is {0}.", m_map.Count);
-
-      currTest.FwkInfo("DupChecker: got {0} ops.", m_ops);
-
-      currTest.FwkAssert(m_ops == 1000000, "DupChecker: Expected 1,000,000 events (1000 per key) for the region, actual is {0}.",
-        m_ops);
-
-      foreach (object item in m_map.Values)
-      {
-        int checkval = (int)item;
-        currTest.FwkAssert(checkval == 1000, "DupChecker: Expected 1000 as final value, actual is {0}.", checkval);
-      }
-    }
-
-    #endregion
-
-    #region ICacheListener Members
-
-    public override void AfterCreate(EntryEvent<TKey, TVal> ev)
-    {
-      check(ev);
-    }
-
-    public override void AfterUpdate(EntryEvent<TKey, TVal> ev)
-    {
-      check(ev);
-    }
-
-    #endregion
-
-    protected virtual void Dispose(bool disposing)
-    {
-      FwkTest<TKey, TVal> currTest = FwkTest<TKey, TVal>.CurrentTest;
-      currTest.FwkInfo("DupChecker: validating");
-      validate();
-    }
-
-    #region IDisposable Members
-
-    public void Dispose()
-    {
-      Dispose(true);
-      GC.SuppressFinalize(this);
-    }
-
-    #endregion
-
-    public DupChecker()
-    {
-      FwkTest<TKey, TVal> currTest = FwkTest<TKey, TVal>.CurrentTest;
-      currTest.FwkInfo("DupChecker: created");
-    }
-    
-    ~DupChecker()
-    {
-      Dispose(false);
-    }
-  }
-}
diff --git a/tests/cli/NewFwkLib/PerfTest/LatencyListener.cs b/tests/cli/NewFwkLib/PerfTest/LatencyListener.cs
deleted file mode 100644
index 532672c..0000000
--- a/tests/cli/NewFwkLib/PerfTest/LatencyListener.cs
+++ /dev/null
@@ -1,134 +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.
- */
-
-using System;
-
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.DUnitFramework;
-  using Apache.Geode.Client;
-  //using Region = Apache.Geode.Client.IRegion<Object, Object>;
-
-  public class LatencyListener<TKey, TVal> : CacheListenerAdapter<TKey, TVal>, IDisposable
-  {
-    #region Private members
-
-    long m_maxLatency;
-    long m_minLatency = long.MaxValue;
-    long m_totLatency;
-    int m_samples;
-    int m_numAfterCreate;
-    int m_numAfterUpdate;
-
-    #endregion
-
-    #region Private methods
-
-    private void UpdateLatency(EntryEvent<TKey, TVal> ev)
-    {
-      long now = DateTime.Now.Ticks;
-      TVal newVal = ev.NewValue;
-      byte[] buffer = newVal as byte[];
-      if (buffer != null && buffer.Length >= (int)(sizeof(int) + sizeof(long)))
-      {
-        uint mark = BitConverter.ToUInt32(buffer, 0);
-        if ((mark == LatencyPutsTask<TKey, TVal>.LatMark))
-        {
-          long sendTime = BitConverter.ToInt64(buffer, 4);
-          long latency = Math.Abs(DateTime.Now.Ticks - sendTime);
-          m_minLatency = Math.Min(latency, m_minLatency);
-          m_maxLatency = Math.Max(latency, m_maxLatency);
-          m_totLatency += latency;
-          m_samples++;
-          //FwkTest.CurrentTest.FwkInfo("LatencyListener::Average: {0}",
-          //  (int)(m_totLatency / (long)m_samples));
-        }
-      }
-    }
-
-    #endregion
-
-    #region ICacheListener Members
-
-    public override void AfterCreate(EntryEvent<TKey, TVal> ev)
-    {
-      ++m_numAfterCreate;
-      UpdateLatency(ev);
-    }
-
-    public override void AfterUpdate(EntryEvent<TKey, TVal> ev)
-    {
-      ++m_numAfterUpdate;
-      UpdateLatency(ev);
-    }
-
-    
-    #endregion
-
-    protected virtual void Dispose(bool disposing)
-    {
-      string tag;
-      try
-      {
-        FwkTaskData taskData = (FwkTaskData)Util.BBGet(
-          "LatencyBB", "LatencyTag");
-        tag = taskData.GetLogString();
-      }
-      catch (Apache.Geode.DUnitFramework.KeyNotFoundException)
-      {
-        tag = null;
-      }
-      if (tag == null)
-      {
-        tag = "No tag found";
-      }
-      long avgLatency = 0;
-      FwkTest<TKey, TVal> currTest = FwkTest<TKey, TVal>.CurrentTest;
-      if (m_samples != 0)
-      {
-        avgLatency = m_totLatency / (long)m_samples;
-        currTest.FwkInfo("LatencyCSV,MinMaxAvgSamples,{0},{1},{2},{3},{4}",
-          tag, m_minLatency, m_maxLatency, avgLatency, m_samples);
-        currTest.FwkInfo("LatencySuite: {0} results: {1} min, {2} max, {3} avg, {4} samples. {5}",
-          tag, m_minLatency, m_maxLatency, avgLatency, m_samples, m_totLatency);
-        currTest.FwkInfo("Latency listener counters for {0}  afterCreate: {1}, afterUpdate: {2}",
-          tag, m_numAfterCreate, m_numAfterUpdate);
-      }
-      else
-      {
-        currTest.FwkInfo("LatencySuite: {0} results: NO DATA SAMPLES TO REPORT ON.", tag);
-        currTest.FwkInfo("Latency listener counters for {0}  afterCreate: {1}, afterUpdate: {2}",
-          tag, m_numAfterCreate, m_numAfterUpdate);
-      }
-    }
-
-    #region IDisposable Members
-
-    public void Dispose()
-    {
-      Dispose(true);
-      GC.SuppressFinalize(this);
-    }
-
-    #endregion
-
-    ~LatencyListener()
-    {
-      Dispose(false);
-    }
-  }
-}
diff --git a/tests/cli/NewFwkLib/PerfTest/PerfTasks.cs b/tests/cli/NewFwkLib/PerfTest/PerfTasks.cs
deleted file mode 100644
index 7543204..0000000
--- a/tests/cli/NewFwkLib/PerfTest/PerfTasks.cs
+++ /dev/null
@@ -1,338 +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.
- */
-
-using System;
-using System.Threading;
-
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.DUnitFramework;
-  using Apache.Geode.Client;
-  //using Region = Apache.Geode.Client.IRegion<Object, Object>;
-  //using IntRegion = Apache.Geode.Client.IRegion<int, byte[]>;
-  //using StringRegion = Apache.Geode.Client.IRegion<string, byte[]>;
-
-  public class PutsTask<TKey, TVal> : ClientTask
-  {
-    #region Private members
-
-    private IRegion<TKey, TVal> m_region;
-    private TKey[] m_keys;
-    private TVal[] m_values;
-
-    #endregion
-
-    #region Public accessors
-
-    public TVal[] Values
-    {
-      get
-      {
-        return m_values;
-      }
-      set
-      {
-        m_values = value;
-      }
-    }
-
-    #endregion
-
-    public PutsTask(IRegion<TKey, TVal> region, TKey[] keys,
-      TVal[] values)
-      : base()
-    {
-      m_region = region as IRegion<TKey, TVal>;
-      m_keys = keys as TKey[];
-      m_values = values as TVal[];
-    }
-
-    public override void DoTask(int iters, object data)
-    {
-      if (m_keys != null && m_keys.Length > 0)
-      {
-        int numKeys = m_keys.Length;
-        int offset = Util.Rand(numKeys);
-        int count = offset;
-        Util.Log("PutsTask::DoTask: starting {0} iterations.", iters);
-        while (Running && (iters-- != 0))
-        {
-          int idx = count % numKeys;
-          try
-          {
-            m_region[m_keys[idx]] = m_values[idx];
-            //Util.Log("rjk: puttask ---- idx = {0} key is {1} and value is {2} size of {3}", idx, m_keys[idx], m_values[idx].ToString(), m_values[idx].ToString().Length);
-          }
-          catch (Exception ex)
-          {
-            Util.Log(Util.LogLevel.Error,
-              "Exception while putting key[{0}] for region {1} in iteration " +
-              "{2}: {3}", idx, m_region.Name, (count - offset), ex);
-            throw;
-          }
-          count++;
-          //if ((count % 1000) == 0)
-          //{
-          //  Util.Log("PutsTask::DoTask: Intermediate: Ran for 1000 iterations.");
-          //}
-        }
-        //Util.Log("PutsTask::DoTask: Ran for {0} iterations.", count);
-        Interlocked.Add(ref m_iters, count - offset);
-      }
-    }
-  }
-
-  public class LatencyPutsTask<TKey, TVal> : ClientTask
-  {
-    #region Private members
-
-    private IRegion<TKey, TVal> m_region;
-    private TKey[] m_keys;
-    private TVal[] m_values;
-    private int m_opsSec;
-
-    #endregion
-
-    #region Public accessors
-
-    public TVal[] Values
-    {
-      get
-      {
-        return m_values;
-      }
-      set
-      {
-        m_values = value;
-      }
-    }
-
-    #endregion
-
-    public const uint LatMark = 0x55667788;
-
-    public LatencyPutsTask(IRegion<TKey, TVal> region, TKey[] keys,
-      TVal[] values, int opsSec)
-      : base()
-    {
-      m_region = region;
-      m_keys = keys;
-      m_values = values;
-      m_opsSec = opsSec;
-    }
-
-    public override void DoTask(int iters, object data)
-    {
-      if (m_keys != null && m_keys.Length > 0)
-      {
-        TKey key = m_keys[0];
-        TVal buffer = m_values[0];
-        //TVal[] buffer = value;
-        int count = 0;
-        PaceMeter pm = new PaceMeter(m_opsSec);
-        while (Running && (iters-- != 0))
-        {
-          /*
-          if (buffer.Length >= (int)(sizeof(int) + sizeof(long)))
-          {
-            BitConverter.GetBytes(LatMark).CopyTo(buffer, 0);
-            BitConverter.GetBytes(DateTime.Now.Ticks).CopyTo(buffer, (int)(sizeof(int)));
-          }
-          */
-          try
-          {
-            m_region[key] = buffer;
-          }
-          catch (Exception ex)
-          {
-            Util.Log(Util.LogLevel.Error,
-              "Exception while putting key[{0}] for region {1} in iteration " +
-              "{2}: {3}", 0, m_region.Name, count, ex);
-            throw;
-          }
-          count++;
-          pm.CheckPace();
-        }
-        Interlocked.Add(ref m_iters, count);
-      }
-    }
-  }
-
-  public class MeteredPutsTask<TKey, TVal> : ClientTask
-  {
-    #region Private members
-
-    private IRegion<TKey, TVal> m_region;
-    private TKey[] m_keys;
-    private TVal[] m_values;
-    private int m_opsSec;
-
-    #endregion
-
-    #region Public accessors
-
-    public TVal[] Values
-    {
-      get
-      {
-        return m_values;
-      }
-      set
-      {
-        m_values = value;
-      }
-    }
-
-    #endregion
-
-    public MeteredPutsTask(IRegion<TKey, TVal> region, TKey[] keys, TVal[] values, int opsSec)
-      : base()
-    {
-      m_region = region;
-      m_keys = keys;
-      m_values = values;
-      m_opsSec = opsSec;
-    }
-
-    public override void DoTask(int iters, object data)
-    {
-      if (m_keys != null && m_keys.Length > 0)
-      {
-        int numKeys = m_keys.Length;
-        int offset = Util.Rand(numKeys);
-        int count = offset;
-        int idx;
-        PaceMeter pm = new PaceMeter(m_opsSec);
-        while (Running && (iters-- != 0))
-        {
-          idx = count % numKeys;
-          try
-          {
-            m_region[m_keys[idx]] = m_values[idx];
-          }
-          catch (Exception ex)
-          {
-            Util.Log(Util.LogLevel.Error,
-              "Exception while putting key[{0}] for region {1} in iteration " +
-              "{2}: {3}", idx, m_region.Name, (count - offset), ex);
-            throw;
-          }
-          count++;
-          pm.CheckPace();
-        }
-        Interlocked.Add(ref m_iters, count - offset);
-      }
-    }
-  }
-
-  public class GetsTask<TKey, TVal> : ClientTask
-  {
-    #region Private members
-
-    private IRegion<TKey, TVal> m_region;
-    private TKey[] m_keys;
-
-    #endregion
-
-    public GetsTask(IRegion<TKey, TVal> region, TKey[] keys)
-      : base()
-    {
-      m_region = region;
-      m_keys = keys;
-    }
-
-    public override void DoTask(int iters, object data)
-    {
-      if (m_keys != null && m_keys.Length > 0)
-      {
-        int numKeys = m_keys.Length;
-        int offset = Util.Rand(numKeys);
-        int count = offset;
-        while (Running && (iters-- != 0))
-        {
-          TVal val = default(TVal); ;
-          int idx = count % numKeys;
-          try
-          {
-            val = m_region[m_keys[idx]];
-            //Util.Log("rjk: ---- idx = {0} key is {1} and value is {2} size of {3}", idx, m_keys[idx], val.ToString(),val.ToString().Length) ;
-          }
-          catch (Exception ex)
-          {
-            Util.Log(Util.LogLevel.Error,
-              "Exception while getting key[{0}] for region {1} in iteration " +
-              "{2}: {3}", idx, m_region.Name, (count - offset), ex);
-            throw;
-          }
-          if (val == null)
-          {
-            string exStr = string.Format("Key[{0}] not found in region {1}",
-              m_keys[idx], m_region.Name);
-            Util.Log(Util.LogLevel.Error, exStr);
-            throw new EntryNotFoundException(exStr);
-          }
-          count++;
-        }
-        Interlocked.Add(ref m_iters, count - offset);
-      }
-    }
-  }
-
-  public class DestroyTask<TKey, TVal> : ClientTask
-  {
-    #region Private members
-
-    private IRegion<TKey, TVal> m_region;
-    private TKey[] m_keys;
-
-    #endregion
-
-    public DestroyTask(IRegion<TKey, TVal> region, TKey[] keys)
-      : base()
-    {
-      m_region = region;
-      m_keys = keys;
-    }
-
-    public override void DoTask(int iters, object data)
-    {
-      if (m_keys != null && m_keys.Length > 0)
-      {
-        int i = 0;
-        int numKeys = m_keys.Length;
-        while (Running && i < numKeys)
-        {
-          try
-          {
-            m_region.Remove(m_keys[i++]);
-          }
-          catch (EntryNotFoundException)
-          {
-          }
-          catch (Exception ex)
-          {
-            Util.Log(Util.LogLevel.Error,
-              "Exception while destroying key[{0}] for region {1}: {2}",
-              i, m_region.Name, ex);
-            throw;
-          }
-        }
-        Interlocked.Add(ref m_iters, i);
-      }
-    }
-  }
-}
diff --git a/tests/cli/NewFwkLib/PerfTest/PerfTestCacheListener.cs b/tests/cli/NewFwkLib/PerfTest/PerfTestCacheListener.cs
deleted file mode 100644
index 4ba0d29..0000000
--- a/tests/cli/NewFwkLib/PerfTest/PerfTestCacheListener.cs
+++ /dev/null
@@ -1,216 +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.
- */
-
-using System;
-using System.Threading;
-
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.DUnitFramework;
-  using Apache.Geode.Client;
-  //using Region = Apache.Geode.Client.IRegion<Object, Object>;
-
-  public class PerfTestCacheListener<TKey, TVal> : CacheListenerAdapter<TKey, TVal>, IDisposable
-  {
-    #region Private members
-
-    int m_numAfterCreate;
-    int m_numAfterUpdate;
-    int m_numAfterInvalidate;
-    int m_numAfterDestroy;
-    int m_numAfterRegionInvalidate;
-    int m_numAfterRegionClear;
-    int m_numAfterRegionDestroy;
-    int m_numClose;
-    int m_sleep;
-
-    #endregion
-
-    #region ICacheListener Members
-
-    public override void AfterCreate(EntryEvent<TKey, TVal> ev)
-    {
-      if (m_sleep > 0)
-      {
-        Thread.Sleep(m_sleep);
-      }
-      ++m_numAfterCreate;
-    }
-
-    public override void AfterDestroy(EntryEvent<TKey, TVal> ev)
-    {
-      if (m_sleep > 0)
-      {
-        Thread.Sleep(m_sleep);
-      }
-      ++m_numAfterDestroy;
-
-    }
-
-    public override void AfterInvalidate(EntryEvent<TKey, TVal> ev)
-    {
-      if (m_sleep > 0)
-      {
-        Thread.Sleep(m_sleep);
-      }
-      ++m_numAfterInvalidate;
-    }
-
-    public override void AfterRegionClear(RegionEvent<TKey, TVal> ev)
-    {
-      if (m_sleep > 0)
-      {
-        Thread.Sleep(m_sleep);
-      }
-      ++m_numAfterRegionClear;
-    }
-
-    public override void AfterRegionDestroy(RegionEvent<TKey, TVal> ev)
-    {
-      if (m_sleep > 0)
-      {
-        Thread.Sleep(m_sleep);
-      }
-      ++m_numAfterRegionDestroy;
-    }
-
-    public override void AfterRegionInvalidate(RegionEvent<TKey, TVal> ev)
-    {
-      if (m_sleep > 0)
-      {
-        Thread.Sleep(m_sleep);
-      }
-      ++m_numAfterRegionInvalidate;
-    }
-
-    public override void AfterUpdate(EntryEvent<TKey, TVal> ev)
-    {
-      if (m_sleep > 0)
-      {
-        Thread.Sleep(m_sleep);
-      }
-      ++m_numAfterUpdate;
-    }
-
-    public override void Close(IRegion<TKey, TVal> region)
-    {
-      if (m_sleep > 0)
-      {
-        Thread.Sleep(m_sleep);
-      }
-      ++m_numClose;
-    }
-  
-    public void Reset(int sleepTime)
-    {
-      m_sleep = sleepTime;
-      m_numAfterCreate = m_numAfterUpdate = m_numAfterInvalidate = 0;
-      m_numAfterDestroy = m_numAfterRegionClear = m_numAfterRegionInvalidate =
-        m_numAfterRegionDestroy = m_numClose = 0;
-    }
-
-    #endregion
-
-    protected virtual void Dispose(bool disposing)
-    {
-      FwkTest<TKey, TVal>.CurrentTest.FwkInfo("PerfTestCacheListener invoked afterCreate: {0}," +
-        " afterUpdate: {1}, afterInvalidate: {2}, afterDestroy: {3}," +
-        " afterRegionInvalidate: {4}, afterRegionDestroy: {5}, region close: {6}, afterRegionClear: {7}",
-        m_numAfterCreate, m_numAfterUpdate, m_numAfterInvalidate, m_numAfterDestroy,
-        m_numAfterRegionInvalidate, m_numAfterRegionDestroy, m_numClose,
-	m_numAfterRegionClear);
-    }
-
-    #region IDisposable Members
-
-    public void Dispose()
-    {
-      Dispose(true);
-      GC.SuppressFinalize(this);
-    }
-
-    #endregion
-
-    ~PerfTestCacheListener()
-    {
-      Dispose(false);
-    }
-  }
-  public class ConflationTestCacheListener<TKey, TVal> : CacheListenerAdapter<TKey, TVal>
-  {
-    int m_numAfterCreate;
-    int m_numAfterUpdate;
-    int m_numAfterInvalidate;
-    int m_numAfterDestroy;
-    
-    public ConflationTestCacheListener() 
-    {
-      FwkTest<TKey, TVal>.CurrentTest.FwkInfo("Calling non durable client ConflationTestCacheListener");
-      m_numAfterCreate = 0;
-      m_numAfterUpdate = 0;
-      m_numAfterInvalidate = 0;
-      m_numAfterDestroy = 0;
-      
-    }
-
-    public static ICacheListener<TKey, TVal> Create()
-    {
-      return new ConflationTestCacheListener<TKey, TVal>();
-    }
-    ~ConflationTestCacheListener() { }
-    
-    #region ICacheListener Members
-
-    public override void AfterCreate(EntryEvent<TKey, TVal> ev)
-    {
-      ++m_numAfterCreate;
-    }
-
-    public override void AfterUpdate(EntryEvent<TKey, TVal> ev)
-    {
-      ++m_numAfterUpdate;
-     }
-    public override void AfterRegionLive(RegionEvent<TKey, TVal> ev)
-    {
-      FwkTest<TKey, TVal>.CurrentTest.FwkInfo("ConflationTestCacheListener: AfterRegionLive invoked");
-    }
-    public override void AfterDestroy(EntryEvent<TKey, TVal> ev)
-    {
-      ++m_numAfterDestroy;
-    }
-
-    public override void AfterInvalidate(EntryEvent<TKey, TVal> ev)
-    {
-      ++m_numAfterInvalidate;
-    }
-
-    public override void AfterRegionDestroy(RegionEvent<TKey, TVal> ev)
-    {
-      dumpToBB(ev.Region);
-    }
-
-    private void dumpToBB(IRegion<TKey, TVal> region)
-    {
-      FwkTest<TKey, TVal>.CurrentTest.FwkInfo("dumping non durable client data on BB for ConflationTestCacheListener");
-      Util.BBSet("ConflationCacheListener", "AFTER_CREATE_COUNT_" + Util.ClientId + "_" + region.Name, m_numAfterCreate);
-      Util.BBSet("ConflationCacheListener", "AFTER_UPDATE_COUNT_" + Util.ClientId + "_" + region.Name, m_numAfterUpdate);
-      Util.BBSet("ConflationCacheListener", "AFTER_DESTROY_COUNT_" + Util.ClientId + "_" + region.Name, m_numAfterDestroy);
-      Util.BBSet("ConflationCacheListener", "AFTER_INVALIDATE_COUNT_" + Util.ClientId + "_" + region.Name, m_numAfterInvalidate);
-    }
-    #endregion
-  }
-}
diff --git a/tests/cli/NewFwkLib/PerfTest/PerfTests.cs b/tests/cli/NewFwkLib/PerfTest/PerfTests.cs
deleted file mode 100644
index f02422c..0000000
--- a/tests/cli/NewFwkLib/PerfTest/PerfTests.cs
+++ /dev/null
@@ -1,1483 +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.
- */
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using System.Threading;
-
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.DUnitFramework;
-  using Apache.Geode.Client;
-  //using Region = Apache.Geode.Client.IRegion<Object, Object>;
-  //using IntRegion = Apache.Geode.Client.IRegion<int, byte[]>;
-  //using StringRegion = Apache.Geode.Client.IRegion<string, byte[]>;
-  public class PerfTests<TKey, TVal> : FwkTest<TKey, TVal>
-  {
-    #region Protected members
-    protected TKey[] m_keysA;
-    protected int m_maxKeys;
-    protected int m_keyIndexBegin;
-
-    protected TVal[] m_cValues;
-    protected int m_maxValues;
-
-    public char m_keyType = 'i';
-
-    #endregion
-
-    #region Protected constants
-
-    protected const string ClientCount = "clientCount";
-    protected const string TimedInterval = "timedInterval";
-    protected const string DistinctKeys = "distinctKeys";
-    protected const string NumThreads = "numThreads";
-    protected const string ValueSizes = "valueSizes";
-    protected const string OpsSecond = "opsSecond";
-    protected const string KeyType = "keyType";
-    protected const string KeySize = "keySize";
-    protected const string KeyIndexBegin = "keyIndexBegin";
-    protected const string RegisterKeys = "registerKeys";
-    protected const string RegisterRegex = "registerRegex";
-    protected const string UnregisterRegex = "unregisterRegex";
-    protected const string ExpectedCount = "expectedCount";
-    protected const string InterestPercent = "interestPercent";
-    protected const string KeyStart = "keyStart";
-    protected const string KeyEnd = "keyEnd";
-
-    #endregion
-    
-    #region Protected utility methods
-
-    protected void ClearKeys()
-    {
-      if (m_keysA != null)
-      {
-        for (int i = 0; i < m_keysA.Length; i++)
-        {
-          if (m_keysA[i] != null)
-          {
-            //m_keysA[i];
-            m_keysA[i] = default(TKey);
-          }
-        }
-        m_keysA = null;
-        m_maxKeys = 0;
-      }
-    }
-
-    protected int InitKeys(bool useDefault)
-    {
-      string typ = GetStringValue(KeyType); // int is only value to use
-      char newType = (typ == null || typ.Length == 0) ? 's' : typ[0];
-
-      int low = GetUIntValue(KeyIndexBegin);
-      low = (low > 0) ? low : 0;
-      //ResetKey(DistinctKeys);
-      int numKeys = GetUIntValue(DistinctKeys);  // check distinct keys first
-      if (numKeys <= 0)
-      {
-        if (useDefault)
-        {
-          numKeys = 5000;
-        }
-        else
-        {
-          //FwkSevere("Failed to initialize keys with numKeys: {0}", numKeys);
-          return numKeys;
-        }
-      }
-      int high = numKeys + low;
-      FwkInfo("InitKeys:: numKeys: {0}; low: {1}", numKeys, low);
-      if ((newType == m_keyType) && (numKeys == m_maxKeys) &&
-        (m_keyIndexBegin == low))
-      {
-        return numKeys;
-      }
-
-      ClearKeys();
-      m_maxKeys = numKeys;
-      m_keyIndexBegin = low;
-      m_keyType = newType;
-      if (m_keyType == 'i')
-      {
-        InitIntKeys(low, high);
-      }
-      else
-      {
-        int keySize = GetUIntValue(KeySize);
-        keySize = (keySize > 0) ? keySize : 10;
-        string keyBase = new string('A', keySize);
-        InitStrKeys(low, high, keyBase);
-      }
-      for (int j = 0; j < numKeys; j++)
-      {
-        int randIndx = Util.Rand(numKeys);
-        if (randIndx != j)
-        {
-          TKey tmp = m_keysA[j];
-          m_keysA[j] = m_keysA[randIndx];
-          m_keysA[randIndx] = tmp;
-        }
-      }
-      return m_maxKeys;
-    }
-
-    protected int InitKeys()
-    {
-      return InitKeys(true);
-    }
-
-    protected void InitStrKeys(int low, int high, string keyBase)
-    {
-      m_keysA = (TKey[])(object) new String[m_maxKeys];
-      FwkInfo("m_maxKeys: {0}; low: {1}; high: {2}",
-        m_maxKeys, low, high);
-      for (int i = low; i < high; i++)
-      {
-        m_keysA[i - low] = (TKey)(object)(keyBase.ToString()  + i.ToString("D10"));
-      }
-    }
-
-    protected void InitIntKeys(int low, int high)
-    {
-      m_keysA = (TKey[])(object) new Int32[m_maxKeys];
-      FwkInfo("m_maxKeys: {0}; low: {1}; high: {2}",
-        m_maxKeys, low, high);
-      for (int i = low; i < high; i++)
-      {
-        m_keysA[i - low] = (TKey)(object)i;
-      }
-    }
-
-    protected int InitValues(int numKeys)
-    {
-      return InitValues(numKeys, 0);
-    }
-
-    protected int InitValues(int numKeys, int size)
-    {
-      if (size <= 0)
-      {
-        size = GetUIntValue(ValueSizes);
-      }
-      if (size <= 0)
-      {
-        //FwkSevere("Failed to initialize values with valueSize: {0}", size);
-        return size;
-      }
-      if (numKeys <= 0)
-      {
-        numKeys = 500;
-      }
-      m_maxValues = numKeys;
-      if (m_cValues != null)
-      {
-        for (int i = 0; i < m_cValues.Length; i++)
-        {
-          if (m_cValues[i] != null)
-          {
-            //m_cValues[i].Dispose();
-            m_cValues[i] = default(TVal);
-          }
-        }
-        m_cValues = null;
-      }
-
-      m_cValues = new TVal[m_maxValues];
-
-      FwkInfo("InitValues()  payload size: {0}", size);
-      //byte[] createPrefix = Encoding.ASCII.GetBytes("Create ");
-      //byte[] buffer = new byte[size];
-      for (int i = 0; i < m_maxValues; i++)
-      {
-        
-        StringBuilder builder = new StringBuilder();
-        Random random = new Random();
-        char ch;
-        for (int j = 0; j < size; j++)
-        {
-          ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
-          builder.Append(ch);
-        }
-
-        //FwkInfo("rjk: InitValues()   value {0}", builder.ToString());
-        //Util.RandBytes(buffer);
-        //createPrefix.CopyTo(buffer, 0);
-        //string tmp = buffer;
-        if (typeof(TVal) == typeof(string))
-        {
-          m_cValues[i] = (TVal)(object)builder.ToString();
-          //FwkInfo("rjk: InitValues()   value {0} size is {1}", m_cValues[i].ToString(), m_cValues[i].ToString().Length);
-        }
-        else if (typeof(TVal) == typeof(byte[]))
-        {
-          //Encoding.ASCII.GetBytes(buffer);
-          //Util.RandBytes(buffer);
-          //createPrefix.CopyTo(buffer, 0);
-          m_cValues[i] = (TVal)(object)(Encoding.ASCII.GetBytes(builder.ToString()));
-          //FwkInfo("rjk: InitValues() type is byte[]  value {0} size is {1}", m_cValues[i].ToString(), ((byte[])(object)m_cValues[i]).Length);
-        }
-         
-        /*
-        Util.RandBytes(buffer);
-        createPrefix.CopyTo(buffer, 0);
-        if (typeof(TVal) == typeof(string))
-        {
-          String MyString;
-          //Encoding ASCIIEncod = new Encoding();
-          MyString = Encoding.ASCII.GetString(buffer);
-          m_cValues[i] = (TVal)(MyString as object);
-          FwkInfo("rjk: InitValues()   value {0} size is {1}", MyString.ToString(), m_cValues[i].ToString().Length);
-        }
-        else if (typeof(TVal) == typeof(byte[]))
-        {
-          Util.RandBytes(buffer);
-          createPrefix.CopyTo(buffer, 0);
-          m_cValues[i] = (TVal)(buffer as object);
-        }
-         * */
-        //for (int ii = 0; ii < buffer.Length; ++ii)
-        //{
-        //  FwkInfo("rjk: InitValues() index is {0} value is {1} buffer = {2}", i, m_cValues[ii], buffer[ii]);
-        //}
-      }
-      return size;
-    }
-
-    protected IRegion<TKey, TVal> GetRegion()
-    {
-      return GetRegion(null);
-     
-    }
-
-
-    protected IRegion<TKey, TVal> GetRegion(string regionName)
-    {
-      IRegion<TKey, TVal> region;
-      if (regionName == null)
-      {
-          regionName = GetStringValue("regionName");
-      }
-      if (regionName == null)
-      {
-        region = GetRootRegion();
-        if (region == null)
-        {
-          IRegion<TKey, TVal>[] rootRegions = CacheHelper<TKey, TVal>.DCache.RootRegions<TKey, TVal>();
-          if (rootRegions != null && rootRegions.Length > 0)
-          {
-            region = rootRegions[Util.Rand(rootRegions.Length)];
-          }
-        }
-      }
-      else
-      {
-        region = CacheHelper<TKey, TVal>.GetRegion(regionName);
-      }
-      return region;
-    }
-
-    #endregion
-
-    #region Public methods
-
-    public static ICacheListener<TKey, TVal> CreatePerfTestCacheListener()
-    {
-      return new PerfTestCacheListener<TKey, TVal>();
-    }
-    public static ICacheListener<TKey, TVal> CreateConflationTestCacheListener()
-    {
-      return new ConflationTestCacheListener<TKey, TVal>();
-    }
-    public static ICacheListener<TKey, TVal> CreateLatencyListenerP()
-    {
-      return new LatencyListener<TKey, TVal>();
-    }
-
-    public static ICacheListener<TKey, TVal> CreateDupChecker()
-    {
-      return new DupChecker<TKey, TVal>();
-    }
-
-    public virtual void DoCreateRegion()
-    {
-      FwkInfo("In DoCreateRegion()");
-      try
-      {
-        IRegion<TKey,TVal> region = null;
-
-        FwkInfo("Tkey = {0} , Val = {1}", typeof(TKey).Name, typeof(TVal));
-        
-        region = CreateRootRegion();
-        if (region == null)
-        {
-          FwkException("DoCreateRegion()  could not create region.");
-        }
-        FwkInfo("DoCreateRegion()  Created region '{0}'", region.Name);
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoCreateRegion() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoCreateRegion() complete.");
-    }
-
-    public void DoCloseCache()
-    {
-      FwkInfo("DoCloseCache()  Closing cache and disconnecting from" +
-        " distributed system.");
-      CacheHelper<TKey,TVal>.Close();
-    }
-
-    public void DoPuts()
-    {
-      FwkInfo("In DoPuts()");
-      try
-      {
-        IRegion<TKey, TVal> region = GetRegion();
-        int numClients = GetUIntValue(ClientCount);
-        string label = CacheHelper<TKey, TVal>.RegionTag(region.Attributes);
-        int timedInterval = GetTimeValue(TimedInterval) * 1000;
-        if (timedInterval <= 0)
-        {
-          timedInterval = 5000;
-        }
-        int maxTime = 10 * timedInterval;
-
-        // Loop over key set sizes
-        ResetKey(DistinctKeys);
-        int numKeys;
-        while ((numKeys = InitKeys(false)) > 0)
-        { // keys loop
-          // Loop over value sizes
-          ResetKey(ValueSizes);
-          int valSize;
-          while ((valSize = InitValues(numKeys)) > 0)
-          { // value loop
-            // Loop over threads
-            ResetKey(NumThreads);
-            int numThreads;
-            while ((numThreads = GetUIntValue(NumThreads)) > 0)
-            {
-              try
-              {
-                //if (m_keyType == 's')
-                //{
-                  //StringRegion sregion = region as StringRegion;
-                  PutsTask<TKey, TVal> puts = new PutsTask<TKey, TVal>(region, m_keysA, m_cValues);
-                  FwkInfo("Running warmup task for {0} iterations.", numKeys);
-                  RunTask(puts, 1, numKeys, -1, -1, null);
-                  // Running the warmup task
-                  Thread.Sleep(3000);
-                  // And we do the real work now
-                  FwkInfo("Running timed task for {0} secs and {1} threads; numKeys[{2}]",
-                    timedInterval / 1000, numThreads, numKeys);
-                  SetTaskRunInfo(label, "Puts", m_maxKeys, numClients,
-                    valSize, numThreads);
-                  RunTask(puts, numThreads, -1, timedInterval, maxTime, null);
-                  AddTaskRunRecord(puts.Iterations, puts.ElapsedTime);
-
-              }
-              catch (ClientTimeoutException)
-              {
-                FwkException("In DoPuts()  Timed run timed out.");
-              }
-              Thread.Sleep(3000); // Put a marker of inactivity in the stats
-            }
-            Thread.Sleep(3000); // Put a marker of inactivity in the stats
-          } // value loop
-          Thread.Sleep(3000); // Put a marker of inactivity in the stats
-        } // keys loop
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoPuts() Caught Exception: {0}", ex);
-      }
-      Thread.Sleep(3000); // Put a marker of inactivity in the stats
-      FwkInfo("DoPuts() complete.");
-    }
-    public void DoPopulateRegion()
-    {
-      FwkInfo("In DoPopulateRegion()");
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        ResetKey(DistinctKeys);
-        int numKeys = InitKeys();
-        InitValues(numKeys);
-
-        PutsTask<TKey, TVal> puts = new PutsTask<TKey, TVal>(region, m_keysA, m_cValues);
-        FwkInfo("Populating region.");
-        RunTask(puts, 1, m_maxKeys, -1, -1, null);
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoPopulateRegion() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoPopulateRegion() complete.");
-    }
-    
-    public void DoSerialPuts()
-    {
-      FwkInfo("In DoSerialPuts()");
-      try
-      {
-        IRegion<int, int> region = (IRegion<int, int>)GetRegion();
-
-        int keyStart = GetUIntValue(KeyStart);
-        int keyEnd = GetUIntValue(KeyEnd);
-
-        for (Int32 keys = keyStart; keys <= keyEnd; keys++)
-        {
-          if (keys % 50 == 1)
-          {
-            FwkInfo("DoSerialPuts() putting 1000 values for key " + keys);
-          }
-
-          Int32 key = keys;
-          for (Int32 values = 1; values <= 1000; values++)
-          {
-            Int32 value = values;
-            region[key] =  value;
-          }
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoSerialPuts() Caught Exception: {0}", ex);
-      }
-      Thread.Sleep(3000); // Put a marker of inactivity in the stats
-      FwkInfo("DoSerialPuts() complete.");
-    }
-
-    public void DoPutBursts()
-    {
-      FwkInfo("In DoPutBursts()");
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        int numClients = GetUIntValue(ClientCount);
-        string label = CacheHelper<TKey,TVal>.RegionTag(region.Attributes);
-
-        int timedInterval = GetTimeValue(TimedInterval) * 1000;
-        if (timedInterval <= 0)
-        {
-          timedInterval = 5000;
-        }
-        int burstMillis = GetUIntValue("burstMillis");
-        if (burstMillis <= 0)
-        {
-          burstMillis = 500;
-        }
-        int burstPause = GetTimeValue("burstPause") * 1000;
-        if (burstPause <= 0)
-        {
-          burstPause = 1000;
-        }
-        int opsSec = GetUIntValue(OpsSecond);
-        if (opsSec <= 0)
-        {
-          opsSec = 100;
-        }
-
-        // Loop over key set sizes
-        ResetKey(DistinctKeys);
-        int numKeys;
-        while ((numKeys = InitKeys(false)) > 0)
-        { // keys loop
-          // Loop over value sizes
-          ResetKey(ValueSizes);
-          int valSize;
-          while ((valSize = InitValues(numKeys)) > 0)
-          { // value loop
-            // Loop over threads
-            ResetKey(NumThreads);
-            int numThreads;
-            while ((numThreads = GetUIntValue(NumThreads)) > 0)
-            { // thread loop
-              // And we do the real work now
-              MeteredPutsTask<TKey, TVal> mputs = new MeteredPutsTask<TKey, TVal>(region, m_keysA,
-                m_cValues, opsSec);
-              FwkInfo("Running warmup metered task for {0} iterations.", m_maxKeys);
-              RunTask(mputs, 1, m_maxKeys, -1, -1, null);
-              Thread.Sleep(10000);
-              PutsTask<TKey, TVal> puts = new PutsTask<TKey, TVal>(region, m_keysA, m_cValues);
-              int loopIters = (timedInterval / burstMillis) + 1;
-              FwkInfo("Running timed task for {0} secs and {1} threads.",
-                timedInterval/1000, numThreads);
-              SetTaskRunInfo(label, "PutBursts", numKeys, numClients,
-                valSize, numThreads);
-              int totIters = 0;
-              TimeSpan totTime = TimeSpan.Zero;
-              for (int i = loopIters; i > 0; i--)
-              {
-                try
-                {
-                  RunTask(puts, numThreads, -1, burstMillis, 30000, null);
-                }
-                catch (ClientTimeoutException)
-                {
-                  FwkException("In DoPutBursts()  Timed run timed out.");
-                }
-                totIters += puts.Iterations;
-                totTime += puts.ElapsedTime;
-                double psec = (totIters * 1000.0) / totTime.TotalMilliseconds;
-                FwkInfo("PerfSuite interim: {0} {1} {2}", psec, totIters, totTime);
-                Thread.Sleep(burstPause);
-              }
-              AddTaskRunRecord(totIters, totTime);
-              // real work complete for this pass thru the loop
-
-              Thread.Sleep(3000); // Put a marker of inactivity in the stats
-            } // thread loop
-            Thread.Sleep(3000); // Put a marker of inactivity in the stats
-          } // value loop
-          Thread.Sleep(3000); // Put a marker of inactivity in the stats
-        } // keys loop
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoPutBursts() Caught Exception: {0}", ex);
-      }
-      Thread.Sleep(3000); // Put a marker of inactivity in the stats
-      FwkInfo("DoPutBursts() complete.");
-    }
-
-    public void DoLatencyPuts()
-    {
-      FwkInfo("In DoLatencyPuts()");
-
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        int numClients = GetUIntValue(ClientCount);
-        string label = CacheHelper<TKey, TVal>.RegionTag(region.Attributes);
-        int timedInterval = GetTimeValue(TimedInterval) * 1000;
-        if (timedInterval <= 0)
-        {
-          timedInterval = 5000;
-        }
-        int maxTime = 10 * timedInterval;
-
-        int opsSec = GetUIntValue(OpsSecond);
-        if (opsSec < 0)
-        {
-          opsSec = 100;
-        }
-        // Loop over key set sizes
-        ResetKey(DistinctKeys);
-        int numKeys;
-        while ((numKeys = InitKeys(false)) > 0)
-        { // keys loop
-          // Loop over value sizes
-          ResetKey(ValueSizes);
-          int valSize;
-          while ((valSize = InitValues(numKeys)) > 0)
-          { // value loop
-            // Loop over threads
-            ResetKey(NumThreads);
-            int numThreads;
-            while ((numThreads = GetUIntValue(NumThreads)) > 0)
-            {
-              LatencyPutsTask<TKey, TVal> puts = new LatencyPutsTask<TKey, TVal>(region, m_keysA,
-                m_cValues, opsSec);
-              // Running the warmup task
-              FwkInfo("Running warmup task for {0} iterations.", numKeys);
-              RunTask(puts, 1, numKeys, -1, -1, null);
-              Thread.Sleep(3000);
-              // And we do the real work now
-              FwkInfo("Running timed task for {0} secs and {1} threads.",
-                timedInterval/1000, numThreads);
-              SetTaskRunInfo(label, "LatencyPuts", numKeys, numClients, valSize, numThreads);
-              Util.BBSet("LatencyBB", "LatencyTag", TaskData);
-              try
-              {
-                RunTask(puts, numThreads, -1, timedInterval, maxTime, null);
-              }
-              catch (ClientTimeoutException)
-              {
-                FwkException("In DoLatencyPuts()  Timed run timed out.");
-              }
-              AddTaskRunRecord(puts.Iterations, puts.ElapsedTime);
-              // real work complete for this pass thru the loop
-              Thread.Sleep(3000); // Put a marker of inactivity in the stats
-            } // thread loop
-            Thread.Sleep(3000); // Put a marker of inactivity in the stats
-          } // value loop
-          Thread.Sleep(3000); // Put a marker of inactivity in the stats
-        } // keys loop
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoLatencyPuts() Caught Exception: {0}", ex);
-      }
-      Thread.Sleep(3000); // Put a marker of inactivity in the stats
-      FwkInfo("DoLatencyPuts() complete.");
-    }
-
-    public void DoGets()
-    {
-      FwkInfo("In DoGets()");
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        FwkInfo("rjk:DoGets region name is {0} ", region.Name); 
-        int numClients = GetUIntValue(ClientCount);
-        string label = CacheHelper<TKey, TVal>.RegionTag(region.Attributes);
-        int timedInterval = GetTimeValue(TimedInterval) * 1000;
-        if (timedInterval <= 0)
-        {
-          timedInterval = 5000;
-        }
-        int maxTime = 10 * timedInterval;
-
-        ResetKey(DistinctKeys);
-        InitKeys();
-
-        int valSize = GetUIntValue(ValueSizes);
-        FwkInfo("rjk:DoGets number of keys in region is {0} .", region.Keys.Count);
-        // Loop over threads
-        ResetKey(NumThreads);
-        int numThreads;
-        while ((numThreads = GetUIntValue(NumThreads)) > 0)
-        { // thread loop
-
-          // And we do the real work now
-          GetsTask<TKey, TVal> gets = new GetsTask<TKey, TVal>(region, m_keysA);
-          FwkInfo("Running warmup task for {0} iterations.", m_maxKeys);
-          RunTask(gets, 1, m_maxKeys, -1, -1, null);
-          region.GetLocalView().InvalidateRegion();
-          Thread.Sleep(3000);
-          FwkInfo("Running timed task for {0} secs and {1} threads.",
-            timedInterval/1000, numThreads);
-          SetTaskRunInfo(label, "Gets", m_maxKeys, numClients, valSize, numThreads);
-          try
-          {
-            RunTask(gets, numThreads, -1, timedInterval, maxTime, null);
-          }
-          catch (ClientTimeoutException)
-          {
-            FwkException("In DoGets()  Timed run timed out.");
-          }
-          AddTaskRunRecord(gets.Iterations, gets.ElapsedTime);
-          // real work complete for this pass thru the loop
-
-          Thread.Sleep(3000);
-        } // thread loop
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoGets() Caught Exception: {0}", ex);
-      }
-      Thread.Sleep(3000);
-      FwkInfo("DoGets() complete.");
-    }
-
-    public void DoPopServers()
-    {
-      FwkInfo("In DoPopServers()");
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        ResetKey(DistinctKeys);
-        int numKeys = InitKeys();
-
-        ResetKey(ValueSizes);
-        InitValues(numKeys);
-
-        int opsSec = GetUIntValue(OpsSecond);
-
-        MeteredPutsTask<TKey, TVal> mputs = new MeteredPutsTask<TKey, TVal>(region, m_keysA,
-          m_cValues, opsSec);
-        RunTask(mputs, 1, m_maxKeys, -1, -1, null);
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoPopServers() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoPopServers() complete.");
-    }
-
-    public void DoPopClient()
-    {
-      FwkInfo("In DoPopClient()");
-
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        ResetKey(DistinctKeys);
-        InitKeys();
-
-        GetsTask<TKey, TVal> gets = new GetsTask<TKey, TVal>(region, m_keysA);
-        RunTask(gets, 1, m_maxKeys, -1, -1, null);
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoPopClient() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DopopClient() complete.");
-    }
-
-    public void DoPopClientMS()
-    {
-      FwkInfo("In DoPopClientMS()");
-
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        ResetKey(DistinctKeys);
-        int numKeys = GetUIntValue(DistinctKeys);
-        int clientCount = GetUIntValue(ClientCount);
-        int interestPercent = GetUIntValue(InterestPercent);
-        if (interestPercent <= 0)
-        {
-          if (clientCount <= 0)
-          {
-            interestPercent = 100;
-          }
-          else
-          {
-            interestPercent = (100 / clientCount);
-          }
-        }
-        int myNumKeys = (numKeys * interestPercent) / 100;
-        int myNum = Util.ClientNum;
-        int myStart = myNum * myNumKeys;
-        int myValSize = 10;
-        m_maxKeys = numKeys;
-        InitIntKeys(myStart, myStart + myNumKeys);
-        InitValues(myNumKeys, myValSize);
-
-        FwkInfo("DoPopClientMS() Client number: {0}, Client count: {1}, " +
-          "MaxKeys: {2}", myNum, clientCount, m_maxKeys);
-        PutsTask<TKey, TVal> puts = new PutsTask<TKey, TVal>(region, m_keysA, m_cValues);
-        RunTask(puts, 1, m_maxKeys, -1, -1, null);
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoPopClientMS() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoPopClientMS() complete.");
-    }
-
-    public void DoDestroys()
-    {
-      FwkInfo("In DoDestroys()");
-
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        int numClients = GetUIntValue(ClientCount);
-        FwkInfo("DoDestroys() numclients set to {0}", numClients);
-        string label = CacheHelper<TKey, TVal>.RegionTag(region.Attributes);
-        int timedInterval = GetTimeValue(TimedInterval) * 1000;
-        if (timedInterval <= 0)
-        {
-          timedInterval = 5000;
-        }
-        int maxTime = 10 * timedInterval;
-
-        // always use only one thread for destroys.
-        int numKeys;
-        // Loop over distinctKeys
-        while ((numKeys = InitKeys(false)) > 0)
-        { // thread loop
-          int valSize = InitValues(numKeys);
-          // And we do the real work now
-
-          //populate the region
-          PutsTask<TKey, TVal> puts = new PutsTask<TKey, TVal>(region, m_keysA, m_cValues);
-          FwkInfo("DoDestroys() Populating region.");
-          RunTask(puts, 1, m_maxKeys, -1, -1, null);
-          DestroyTask<TKey, TVal> destroys = new DestroyTask<TKey, TVal>(region, m_keysA);
-          FwkInfo("Running timed task for {0} iterations and {1} threads.",
-            numKeys, 1);
-          SetTaskRunInfo(label, "Destroys", numKeys, numClients, valSize, 1);
-          try
-          {
-            RunTask(destroys, 1, numKeys, -1, maxTime, null);
-          }
-          catch (ClientTimeoutException)
-          {
-            FwkException("In DoDestroys()  Timed run timed out.");
-          }
-          AddTaskRunRecord(destroys.Iterations, destroys.ElapsedTime);
-          // real work complete for this pass thru the loop
-
-          Thread.Sleep(3000);
-        } // distinctKeys loop
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoDestroys() Caught Exception: {0}", ex);
-      }
-      Thread.Sleep(3000);
-      FwkInfo("DoDestroys() complete.");
-    }
-
-    public void DoCheckValues()
-    {
-      FwkInfo("In DoCheckValues()");
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        ICollection<TVal> vals = region.Values;
-        int creates = 0;
-        int updates = 0;
-        int unknowns = 0;
-        if (vals != null)
-        {
-          byte[] createPrefix = Encoding.ASCII.GetBytes("Create ");
-          byte[] updatePrefix = Encoding.ASCII.GetBytes("Update ");
-          foreach (object val in vals)
-          {
-            byte[] valBytes = val as byte[];
-            if (Util.CompareArraysPrefix(valBytes, createPrefix))
-            {
-              creates++;
-            }
-            else if (Util.CompareArraysPrefix(valBytes, updatePrefix))
-            {
-              updates++;
-            }
-            else
-            {
-              unknowns++;
-            }
-          }
-          FwkInfo("DoCheckValues()  Found {0} values from creates, " +
-            "{1} values from updates, and {2} unknown values.",
-            creates, updates, unknowns);
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoCheckValues() Caught Exception: {0}", ex);
-      }
-    }
-
-    public void DoLocalDestroyEntries()
-    {
-      FwkInfo("In DoLocalDestroyEntries()");
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        ICollection<TKey> keys = region.GetLocalView().Keys;
-        if (keys != null)
-        {
-          foreach (TKey key in keys)
-          {
-            region.GetLocalView().Remove(key);
-          }
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoLocalDestroyEntries() Caught Exception: {0}", ex);
-      }
-    }
-
-    public void DoDestroyRegion()
-    {
-      FwkInfo("In DoDestroyRegion");
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        region.DestroyRegion();
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoDestroyRegion() caught exception: {0}" , ex);
-      }
-    }
-
-    public void DoLocalDestroyRegion()
-    {
-      FwkInfo("In DoLocalDestroyRegion()");
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        region.GetLocalView().DestroyRegion();
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoLocalDestroyRegion() Caught Exception: {0}", ex);
-      }
-    }
-
-    public void DoPutAll()
-    {
-      FwkInfo("In DoPutAll()");
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        ResetKey(DistinctKeys);
-        int numKeys = InitKeys();
-
-        ResetKey(ValueSizes);
-        InitValues(numKeys);
-        IDictionary<TKey, TVal> map = new Dictionary<TKey, TVal>();
-        map.Clear();
-        Int32 i = 0;
-        while (i < numKeys)
-        {
-          map.Add(m_keysA[i], m_cValues[i]);
-          i++;
-        }
-        DateTime startTime;
-        DateTime endTime;
-        TimeSpan elapsedTime;
-        startTime = DateTime.Now;
-        region.PutAll(map, TimeSpan.FromSeconds(60));
-        endTime = DateTime.Now;
-        elapsedTime = endTime - startTime;
-        FwkInfo("PerfTests.DoPutAll: Time Taken to execute" +
-                " the putAll for {0}: is {1}ms", numKeys,
-                elapsedTime.TotalMilliseconds);
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoPutAll() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoPutAll() complete.");
-    }
-
-    public void DoGetAllAndVerification()
-    {
-      FwkInfo("In DoGetAllAndVerification()");
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        ResetKey(DistinctKeys);
-        ResetKey(ValueSizes);
-        ResetKey("addToLocalCache");
-        ResetKey("inValidateRegion");
-        int numKeys = InitKeys(false);
-        Int32 i = 0;
-        bool isInvalidateRegion = GetBoolValue("isInvalidateRegion");
-        if (isInvalidateRegion)
-        {
-          region.GetLocalView().InvalidateRegion();
-        }
-        List<TKey> keys = new List<TKey>();
-        keys.Clear();
-        while (i < numKeys)
-        {
-          keys.Add(m_keysA[i]);
-          i++;
-        }
-        bool isAddToLocalCache = GetBoolValue("addToLocalCache");
-        Dictionary<TKey, TVal> values = new Dictionary<TKey, TVal>();
-        values.Clear();
-        DateTime startTime;
-        DateTime endTime;
-        TimeSpan elapsedTime;
-        startTime = DateTime.Now;
-        region.GetAll(keys.ToArray(), values, null, isAddToLocalCache);
-        endTime = DateTime.Now;
-        elapsedTime = endTime - startTime;
-        FwkInfo("PerfTests.DoGetAllAndVerification: Time Taken to execute" +
-                " the getAll for {0}: is {1}ms", numKeys,
-                elapsedTime.TotalMilliseconds);
-        int payload = GetUIntValue("valueSizes");
-        FwkInfo("PerfTests.DoGetAllAndVerification: keyCount = {0}" + " valueCount = {1} ",
-                 keys.Count, values.Count);
-        if (values.Count == keys.Count)
-        {
-          foreach (KeyValuePair<TKey, TVal> entry in values)
-          {
-            TVal item = entry.Value;
-            //if (item != payload) // rjk Need to check how to verify
-            //{
-            //  FwkException("PerfTests.DoGetAllAndVerification: value size {0} is not equal to " +
-            //                "expected payload size {1} for key : {2}", item.Length, payload, entry.Key);
-            //}
-          }
-        }
-        if (isAddToLocalCache)
-        {
-          if (keys.Count != region.Count)
-          {
-            FwkException("PerfTests.DoGetAllAndVerification: number of keys in region do not" +
-                 " match expected number");
-          }
-        }
-        else
-        {
-          if (region.Count != 0)
-          {
-            FwkException("PerfTests.DoGetAllAndVerification: expected zero keys in region");
-          }
-        }
-
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoGetAllAndVerification() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoGetAllAndVerification() complete.");
-    }
-    public void DoResetListener()
-    {
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        int sleepTime = GetUIntValue("sleepTime");
-        PerfTestCacheListener<TKey,TVal> listener =
-          region.Attributes.CacheListener as PerfTestCacheListener<TKey, TVal>;
-        if (listener != null)
-        {
-          listener.Reset(sleepTime);
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkSevere("DoResetListener() Caught Exception: {0}", ex);
-      }
-      Thread.Sleep(3000);
-      FwkInfo("DoResetListener() complete.");
-    }
-
-    public void DoRegisterInterestList()
-    {
-      FwkInfo("In DoRegisterInterestList()");
-      try
-      {
-        ResetKey(DistinctKeys);
-        ResetKey(KeyIndexBegin);
-        ResetKey(RegisterKeys);
-        string typ = GetStringValue(KeyType); // int is only value to use
-        char newType = (typ == null || typ.Length == 0) ? 's' : typ[0];
-
-        IRegion<TKey,TVal> region = GetRegion();
-        int numKeys = GetUIntValue(DistinctKeys);  // check distince keys first
-        if (numKeys <= 0)
-        {
-          FwkSevere("DoRegisterInterestList() Failed to initialize keys " +
-            "with numKeys: {0}", numKeys);
-          return;
-        }
-        int low = GetUIntValue(KeyIndexBegin);
-        low = (low > 0) ? low : 0;
-        int numOfRegisterKeys = GetUIntValue(RegisterKeys);
-        int high = numOfRegisterKeys + low;
-        ClearKeys();
-        m_maxKeys = numOfRegisterKeys;
-        m_keyIndexBegin = low;
-        m_keyType = newType;
-        if (m_keyType == 'i')
-        {
-          InitIntKeys(low, high);
-        }
-        else
-        {
-          int keySize = GetUIntValue(KeySize);
-          keySize = (keySize > 0) ? keySize : 10;
-          string keyBase = new string('A', keySize);
-          InitStrKeys(low, high, keyBase);
-        }
-
-        FwkInfo("DoRegisterInterestList() registering interest for {0} to {1}",
-          low, high);
-        TKey[] registerKeyList = new TKey[high - low];
-        for (int j = low; j < high; j++)
-        {
-          if (m_keysA[j - low] != null)
-          {
-            registerKeyList[j - low] = m_keysA[j - low];
-          }
-          else
-          {
-            FwkInfo("DoRegisterInterestList() key[{0}] is null.", (j - low));
-          }
-        }
-        bool isDurable = GetBoolValue("isDurableReg");
-        ResetKey("getInitialValues"); 
-        bool isGetInitialValues = GetBoolValue("getInitialValues");
-        bool isReceiveValues = true;
-        bool checkReceiveVal = GetBoolValue("checkReceiveVal");
-        if (checkReceiveVal)
-        {
-          ResetKey("receiveValue");
-          isReceiveValues = GetBoolValue("receiveValue");
-        }
-        region.GetSubscriptionService().RegisterKeys(registerKeyList, isDurable, isGetInitialValues, isReceiveValues);
-        String durableClientId = CacheHelper<TKey, TVal>.DCache.SystemProperties.DurableClientId;
-        if (durableClientId.Length > 0)
-        {
-          CacheHelper<TKey, TVal>.DCache.ReadyForEvents();
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoRegisterInterestList() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoRegisterInterestList() complete.");
-    }
-
-    public void DoRegisterAllKeys()
-    {
-      FwkInfo("In DoRegisterAllKeys()");
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        FwkInfo("DoRegisterAllKeys() region name is {0}", region.Name);
-        bool isDurable = GetBoolValue("isDurableReg");
-        ResetKey("getInitialValues");
-        bool isGetInitialValues = GetBoolValue("getInitialValues");
-        bool checkReceiveVal = GetBoolValue("checkReceiveVal");
-        bool isReceiveValues = true;
-        if (checkReceiveVal)
-        {
-          ResetKey("receiveValue");
-          isReceiveValues = GetBoolValue("receiveValue");
-        }
-        region.GetSubscriptionService().RegisterAllKeys(isDurable, isGetInitialValues,isReceiveValues);
-        String durableClientId = CacheHelper<TKey, TVal>.DCache.SystemProperties.DurableClientId;
-        if (durableClientId.Length > 0)
-        {
-          CacheHelper<TKey, TVal>.DCache.ReadyForEvents();
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoRegisterAllKeys() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoRegisterAllKeys() complete.");
-    }
-
-    public void DoVerifyInterestList()
-    {
-      FwkInfo("In DoVerifyInterestList()");
-      try
-      {
-        int countUpdate = 0;
-        IRegion<TKey,TVal> region = GetRegion();
-        InitKeys();
-        ResetKey(RegisterKeys);
-        int numOfRegisterKeys = GetUIntValue(RegisterKeys);
-        int payload = GetUIntValue(ValueSizes);
-
-        
-        ICollection<TKey> keys = region.GetLocalView().Keys;
-
-        byte[] value;
-        int valueSize;
-        if (keys != null)
-        {
-          foreach (TKey key in keys)
-          {
-             bool containsValue = region.ContainsValueForKey(key);
-             RegionEntry<TKey,TVal> entry = region.GetEntry(key);
-             if(!containsValue)
-             {
-                FwkInfo("Skipping check for key {0}",key);
-             }
-             else
-             {
-               if (entry == null)
-               {
-                 FwkException("Failed to find entry for key [{0}] in local cache", key);
-               }
-               value = entry.Value as byte[];
-               if (value == null)
-               {
-                 FwkException("Failed to find value for key [{0}] in local cache", key);
-               }
-               valueSize = (value == null ? -1 : value.Length);
-               if (valueSize == payload)
-               {
-                 ++countUpdate;
-               }
-             }   
-             GC.KeepAlive(entry);
-          }
-        }
-        if (countUpdate != numOfRegisterKeys)
-        {
-          FwkException("DoVerifyInterestList() update interest list " +
-            "count {0} is not equal to number of register keys {1}",
-            countUpdate, numOfRegisterKeys);
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoVerifyInterestList() Caught Exception: {0} : {1}",ex.GetType().Name, ex);
-      }
-      FwkInfo("DoVerifyInterestList() complete.");
-    }
-
-    public void DoRegisterRegexList()
-    {
-      FwkInfo("In DoRegisterRegexList()");
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        string regex = GetStringValue(RegisterRegex);
-        FwkInfo("DoRegisterRegexList() region name is {0}; regex is {1}",
-          region.Name, regex);
-        bool isDurable = GetBoolValue("isDurableReg");
-        ResetKey("getInitialValues");
-        bool isGetInitialValues = GetBoolValue("getInitialValues");
-        bool isReceiveValues = true;
-        bool checkReceiveVal = GetBoolValue("checkReceiveVal");
-        if (checkReceiveVal)
-        {
-          ResetKey("receiveValue");
-          isReceiveValues = GetBoolValue("receiveValue");
-        }
-        region.GetSubscriptionService().RegisterRegex(regex, isDurable, isGetInitialValues, isReceiveValues);
-        String durableClientId = CacheHelper<TKey, TVal>.DCache.SystemProperties.DurableClientId;
-        if (durableClientId.Length > 0)
-        {
-          CacheHelper<TKey, TVal>.DCache.ReadyForEvents();
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoRegisterRegexList() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoRegisterRegexList() complete.");
-    }
-
-    public void DoUnRegisterRegexList()
-    {
-      FwkInfo("In DoUnRegisterRegexList()");
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        string regex = GetStringValue(UnregisterRegex);
-        FwkInfo("DoUnRegisterRegexList() region name is {0}; regex is {1}",
-          region.Name, regex);
-        region.GetSubscriptionService().UnregisterRegex(regex);
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoUnRegisterRegexList() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoUnRegisterRegexList() complete.");
-    }
-
-    public void DoDestroysKeys()
-    {
-      FwkInfo("In PerfTest::DoDestroyKeys()");
-      try
-      {
-        IRegion<TKey,TVal> region=GetRegion();
-        ResetKey("distinctKeys");
-        InitValues(InitKeys());
-        DestroyTask<TKey, TVal> destroys = new DestroyTask<TKey, TVal>(region, m_keysA);
-        RunTask(destroys,1,m_maxKeys,-1,-1,null);
-      }
-      catch(Exception e)
-      {
-        FwkException("PerfTest caught exception: {0}", e);
-      }
-      FwkInfo("In PerfTest::DoDestroyKeys()complete");
-    }
-
-    public void DoServerKeys()
-    {
-      FwkInfo("In DoServerKeys()");
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        FwkAssert(region != null,
-          "DoServerKeys() No region to perform operations on.");
-        FwkInfo("DoServerKeys() region name is {0}", region.Name);
-
-        int expectedKeys = GetUIntValue(ExpectedCount);
-        ICollection<TKey> serverKeys = region.Keys;
-        int foundKeys = (serverKeys == null ? 0 : serverKeys.Count);
-        FwkAssert(expectedKeys == foundKeys,
-          "DoServerKeys() expected {0} keys but found {1} keys.",
-          expectedKeys, foundKeys);
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoServerKeys() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoServerKeys() complete.");
-    }
-
-    public void DoIterateInt32Keys() 
-    {
-      FwkInfo("DoIterateInt32Keys() called.");
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        FwkAssert(region != null,
-          "DoIterateInt32Keys() No region to perform operations on.");
-        FwkInfo("DoIterateInt32Keys() region name is {0}", region.Name);
-
-        ICollection<TKey> serverKeys = region.Keys;
-        FwkInfo("DoIterateInt32Keys() GetServerKeys() returned {0} keys.",
-          (serverKeys != null ? serverKeys.Count : 0));
-
-        if (serverKeys != null)
-        {
-          foreach (TKey intKey in serverKeys)
-          {
-            FwkInfo("ServerKeys: {0}", intKey);
-          }
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoIterateInt32Keys() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoIterateInt32Keys() complete.");
-    }
-    public void DoValidateQConflation()
-    {
-      FwkInfo("DoValidateQConflation() called.");
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        region.GetLocalView().DestroyRegion();
-        int expectedAfterCreateEvent = GetUIntValue("expectedAfterCreateCount");
-        int expectedAfterUpdateEvent = GetUIntValue("expectedAfterUpdateCount");
-        bool isServerConflateTrue = GetBoolValue("isServerConflateTrue");
-        Int32 eventAfterCreate = (Int32)Util.BBGet("ConflationCacheListener", "AFTER_CREATE_COUNT_" + Util.ClientId + "_" + region.Name);
-        Int32 eventAfterUpdate = (Int32)Util.BBGet("ConflationCacheListener", "AFTER_UPDATE_COUNT_" + Util.ClientId + "_" + region.Name);
-        
-        FwkInfo("DoValidateQConflation() -- eventAfterCreate {0} and eventAfterUpdate {1}", eventAfterCreate, eventAfterUpdate);
-        String conflateEvent = CacheHelper<TKey, TVal>.DCache.SystemProperties.ConflateEvents;
-        String durableClientId = CacheHelper<TKey, TVal>.DCache.SystemProperties.DurableClientId;
-        Int32 totalCount = 3500;
-        if(durableClientId.Length > 0) {
-          FwkInfo("DoValidateQConflation() Validation for Durable client .");
-          if (conflateEvent.Equals("true") && ((eventAfterCreate + eventAfterUpdate) < totalCount +10))
-          {  
-            FwkInfo("DoValidateQConflation() Conflate Events is true complete.");
-          }
-          else if (conflateEvent.Equals("false") && ((eventAfterCreate + eventAfterUpdate) == totalCount +10))
-          {
-            FwkInfo("DoValidateQConflation() Conflate Events is false complete.");
-          }
-          else if (conflateEvent.Equals("server") && isServerConflateTrue && ((eventAfterCreate + eventAfterUpdate) <= totalCount + 10))
-          {
-            FwkInfo("DoValidateQConflation() Conflate Events is server=true complete.");
-          }
-          else if (conflateEvent.Equals("server") && !isServerConflateTrue && ((eventAfterCreate + eventAfterUpdate) == totalCount + 10))
-          {
-            FwkInfo("DoValidateQConflation() Conflate Events is server=false complete.");
-          }
-          else
-          {
-            FwkException("DoValidateQConflation() ConflateEvent setting is {0} and Expected AfterCreateCount to have {1} keys and " +
-               " found {2} . Expected AfterUpdateCount to have {3} keys, found {4} keys", conflateEvent, expectedAfterCreateEvent
-             , eventAfterCreate, expectedAfterUpdateEvent, eventAfterUpdate);
-          }
-        }
-        else {
-          if (conflateEvent.Equals("true") && ((eventAfterCreate == expectedAfterCreateEvent) &&
-            (((eventAfterUpdate >= expectedAfterUpdateEvent)) && eventAfterUpdate < totalCount)))
-          {
-            FwkInfo("DoValidateQConflation() Conflate Events is true complete.");
-          }
-          else if (conflateEvent.Equals("false") && ((eventAfterCreate == expectedAfterCreateEvent) &&
-            (eventAfterUpdate == expectedAfterUpdateEvent)))
-          {
-            FwkInfo("DoValidateQConflation() Conflate Events is false complete.");
-          }
-          else if (conflateEvent.Equals("server") && isServerConflateTrue && ((eventAfterCreate == expectedAfterCreateEvent) &&
-            (((eventAfterUpdate >= expectedAfterUpdateEvent)) && eventAfterUpdate < totalCount)))
-          {
-            FwkInfo("DoValidateQConflation() Conflate Events is server=true complete.");
-          }
-          else if (conflateEvent.Equals("server") && !isServerConflateTrue && ((eventAfterCreate == expectedAfterCreateEvent) &&
-            (eventAfterUpdate == expectedAfterUpdateEvent)))
-          {
-            FwkInfo("DoValidateQConflation() Conflate Events is server=false complete.");
-          }
-          else
-          {
-            FwkException("DoValidateQConflation() ConflateEvent setting is {0} and Expected AfterCreateCount to have {1} keys and " +
-               " found {2} . Expected AfterUpdateCount to have {3} keys, found {4} keys" , conflateEvent,expectedAfterCreateEvent
-             , eventAfterCreate,expectedAfterUpdateEvent, eventAfterUpdate);
-          }
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoValidateQConflation() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoValidateQConflation() complete.");
-    }
-
-    public void DoCreateUpdateDestroy()
-    {
-      FwkInfo("DoCreateUpdateDestroy() called.");
-      try
-      {
-        DoPopulateRegion();
-        DoPopulateRegion();
-        DoDestroysKeys();
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoCreateUpdateDestroy() Caught Exception: {0}", ex);
-      }
-        FwkInfo("DoCreateUpdateDestroy() complete.");
-    }
-
-    public void DoValidateBankTest()
-    {
-      FwkInfo("DoValidateBankTest() called.");
-      try
-      {
-        IRegion<TKey,TVal> region = GetRegion();
-        region.GetLocalView().DestroyRegion();
-        int expectedAfterCreateEvent = GetUIntValue("expectedAfterCreateCount");
-        int expectedAfterUpdateEvent = GetUIntValue("expectedAfterUpdateCount");
-        int expectedAfterInvalidateEvent = GetUIntValue("expectedAfterInvalidateCount");
-        int expectedAfterDestroyEvent = GetUIntValue("expectedAfterDestroyCount");
-        Int32 eventAfterCreate = (Int32)Util.BBGet("ConflationCacheListener", "AFTER_CREATE_COUNT_" + Util.ClientId + "_" + region.Name);
-        Int32 eventAfterUpdate = (Int32)Util.BBGet("ConflationCacheListener", "AFTER_UPDATE_COUNT_" + Util.ClientId + "_" + region.Name);
-        Int32 eventAfterInvalidate = (Int32)Util.BBGet("ConflationCacheListener", "AFTER_INVALIDATE_COUNT_" + Util.ClientId + "_" + region.Name);
-        Int32 eventAfterDestroy = (Int32)Util.BBGet("ConflationCacheListener", "AFTER_DESTROY_COUNT_" + Util.ClientId + "_" + region.Name);
-
-
-        FwkInfo("DoValidateBankTest() -- eventAfterCreate {0} ,eventAfterUpdate {1} ," +
-          "eventAfterInvalidate {2} , eventAfterDestroy {3}", eventAfterCreate, eventAfterUpdate,eventAfterInvalidate,eventAfterDestroy);
-
-        if (expectedAfterCreateEvent == eventAfterCreate && expectedAfterUpdateEvent == eventAfterUpdate &&
-           expectedAfterInvalidateEvent == eventAfterInvalidate && expectedAfterDestroyEvent == eventAfterDestroy)
-        {
-          FwkInfo("DoValidateBankTest() Validation success.");
-        }
-        else
-        {
-          FwkException("Validation Failed() Region: {0} eventAfterCreate {1}, eventAfterUpdate {2} " +
-             "eventAfterInvalidate {3}, eventAfterDestroy {4}  ",region.Name, eventAfterCreate, eventAfterUpdate
-             , eventAfterInvalidate, eventAfterDestroy);
-        }
-              
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoValidateBankTest() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoValidateBankTest() complete.");
-    }
-    #endregion 
-  }
-}
diff --git a/tests/cli/NewFwkLib/QueryTest/QueryTests.cs b/tests/cli/NewFwkLib/QueryTest/QueryTests.cs
deleted file mode 100644
index 99380d4..0000000
--- a/tests/cli/NewFwkLib/QueryTest/QueryTests.cs
+++ /dev/null
@@ -1,1936 +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.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-using Apache.Geode.Client.Tests; // for Portfolio and Position classes
-
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.DUnitFramework;
-  using Apache.Geode.Client.Tests;
-  using Apache.Geode.Client;
-  using QueryCategory = Apache.Geode.Client.Tests.QueryCategory;
-  using QueryStrings = Apache.Geode.Client.Tests.QueryStrings;
-  using QueryStatics = Apache.Geode.Client.Tests.QueryStatics;
-  using System.Threading;
-  using System.Xml.Serialization;
-  using System.IO;
-  using System.Reflection;
-
-  public class MyCq1Listener<TKey, TResult> : ICqListener<TKey, TResult>
-  {
-    private UInt32 m_updateCnt;
-    private UInt32 m_createCnt;
-    private UInt32 m_destroyCnt;
-    private UInt32 m_eventCnt;
-    
-    public MyCq1Listener()
-    {
-      m_updateCnt = 0;
-      m_createCnt = 0;
-      m_destroyCnt = 0;
-      m_eventCnt = 0;
-    }
-
-    public UInt32 NumInserts()
-    {
-      return m_createCnt;
-    }
-
-    public UInt32 NumUpdates()
-    {
-      return m_updateCnt;
-    }
-
-    public UInt32 NumDestroys()
-    {
-      return m_destroyCnt;
-    }
-
-    public UInt32 NumEvents()
-    {
-      return m_eventCnt;
-    }
-
-    public virtual void UpdateCount(CqEvent<TKey, TResult> ev)
-    {
-      m_eventCnt++;
-      CqOperation opType = ev.getQueryOperation();
-      if (opType == CqOperation.OP_TYPE_CREATE)
-      {
-          Util.Log("ML:INSERT invoked");
-        m_createCnt++;
-      }
-      else if (opType == CqOperation.OP_TYPE_UPDATE)
-      {
-          Util.Log("ML:UPDATE invoked");
-        m_updateCnt++;
-      }
-      else if (opType == CqOperation.OP_TYPE_DESTROY)
-      {
-          Util.Log("ML:DESTROY invoked");
-        m_destroyCnt++;
-      }
- 
-    }
-    public virtual void OnError(CqEvent<TKey, TResult> ev)
-    {
-      UpdateCount(ev);
-    }
-
-    public virtual void OnEvent(CqEvent<TKey, TResult> ev)
-    {
-      UpdateCount(ev);
-    }
-
-    public virtual void Close()
-    { 
-    }
-
-  }
-
-  public class QueryTests<TKey, TVal> : FwkTest<TKey, TVal>
-   {
-    public QueryTests()
-      : base()
-    {
-    }
-
-    #region Private constants
-
-    private static TimeSpan QueryResponseTimeout = TimeSpan.FromSeconds(600);
-    
-    private const string QueryBB = "QueryBB";
-    private const string DistinctKeys = "distinctKeys";
-    private const string DestroyKeys = "destroyKeys";
-    private const string InvalidateKeys = "invalidateKeys";
-    private const string ObjectType = "objectType";
-    private const string NumThreads = "numThreads";
-    private const string ValueSizes = "valueSizes";
-    private const string QueryString = "query";
-    private const string QueryResultType = "queryResultType";
-    private const string CategoryType = "categoryType";
-    private const string ResultSize = "resultSize";
-    private const string RegionPaths = "regionPaths";
-    private const string RegionName = "regionName";
-    private const string LargeSetQuery = "largeSetQuery";
-    private const string IsDurable = "isDurable";
-    private const string WorkTime = "workTime";
-    private const string RegisterAndExecuteCq = "registerAndExecuteCQs";
-    private const string CqState = "cqState";
-    private static Cache m_cache = null;
-    private static bool isObjectRegistered = false;
-    private static bool m_istransaction = false;
-    private CacheTransactionManager txManager = null;
-   
-    #endregion
-
-    #region Private utility methods
-
-    private string GetNextRegionName(ref IRegion<TKey, TVal> region)
-    {
-      string regionName = string.Empty;
-      int count = 0;
-      string path = string.Empty;
-
-      do
-      {
-        path = GetStringValue(RegionPaths);
-
-        if (path == null || path.Length <= 0)
-        {
-          return path;
-        }
-
-        FwkInfo("QueryTestGetNextRegionName() RegionPath is " + path);
-        do
-        {
-          int length = path.Length;
-
-          try
-          {
-            region = (IRegion<TKey, TVal>)CacheHelper<TKey, TVal>.DCache.GetRegion<TKey, TVal>(path);
-          }
-          catch (Exception)
-          {
-          }
-
-          if (region == null)
-          {
-            int pos = path.LastIndexOf('/');
-            regionName = path.Substring(pos+1);
-            path = path.Substring(0, pos);
-          }
-        }
-        while (region == null && path.Length > 0);
-      }
-      while ((++count < 5) && regionName.Length <= 0);
-
-      return regionName;
-    }
-
-    protected IRegion<TKey, TVal> GetRegion()
-    {
-      return GetRegion(null);
-    }
-
-    protected IRegion<TKey, TVal> GetRegion(string regionName)
-    {
-      IRegion<TKey, TVal> region;
-      if (regionName == null)
-      {
-        region = GetRootRegion();
-      }
-      else
-      {
-        region = CacheHelper<TKey, TVal>.GetRegion(regionName);
-      }
-      return region;
-    }
-
-    private bool VerifyResultSet()
-    {
-      return VerifyResultSet(0);
-    }
-
-    private bool VerifyResultSet(int distinctKeys)
-    {
-      bool result = false;
-      int numOfKeys;
-      if (distinctKeys > 0)
-      {
-        numOfKeys = distinctKeys;
-      }
-      else
-      {
-        ResetKey(DistinctKeys);
-        numOfKeys = GetUIntValue(DistinctKeys);
-      }
-      QueryHelper<TKey,TVal> qh = QueryHelper<TKey,TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
-      int setSize = qh.PortfolioSetSize;
-      FwkInfo("QueryTests.VerifyResultSet: numOfKeys [{0}], setSize [{1}].",
-        numOfKeys, setSize);
-      if (numOfKeys < setSize)
-      {
-        setSize = numOfKeys;
-      }
-      int numSet = numOfKeys / setSize;
-
-      var qs = CheckQueryService();
-
-      ResetKey(CategoryType);
-      int category;
-
-      ResetKey(LargeSetQuery);
-      bool isLargeSetQuery = bool.Parse(GetStringValue(LargeSetQuery));
-      ResetKey("cq");
-      bool isCq = GetBoolValue("cq");
-      ResetKey("paramquery");
-      bool isParamquery = GetBoolValue("paramquery");
-      int RSsize = 0;
-      if (isCq)
-        RSsize = QueryStrings.CQRSsize;
-      else if(isParamquery)
-        RSsize = QueryStrings.RSPsize;
-      else
-        RSsize = QueryStrings.RSsize;
-      while ((category = GetUIntValue(CategoryType)) > 0)
-      {
-        for (int index = 0; index < RSsize; index++)
-        {
-          
-          try
-          {
-            if (isCq)
-            {
-              if ((int)QueryStatics.CqResultSetQueries[index].Category == category - 1 &&
-                QueryStatics.CqResultSetQueries[index].Category != QueryCategory.Unsupported &&
-                QueryStatics.CqResultSetQueries[index].IsLargeResultset == isLargeSetQuery)
-              {
-                string CqQuery = QueryStatics.CqResultSetQueries[index].Query;
-                FwkInfo("QueryTests.VerifyResultSet: Query Category [{0}]," +
-              " CqQueryString [{1}], NumSet [{2}].", category - 1, CqQuery, numSet);
-
-                ISelectResults<object> results = ContinuousQuery(qs, QueryStatics.CqResultSetQueries[index].Query, index);
-
-                if ((category - 1 != (int)QueryCategory.Unsupported) 
-                  && (!qh.VerifyRS(results, qh.IsExpectedRowsConstantCQRS(index) ?
-                   QueryStatics.CqResultSetRowCounts[index] :
-                   QueryStatics.CqResultSetRowCounts[index] * numSet)))
-                {
-                  FwkSevere("QueryTests.VerifyStructSet: Query verify failed" +
-                    " for query index {0}", index);
-                  return false;
-                }
-                else
-                {
-                  result = true;
-                }
-              }
-            }
-            else if (isParamquery)
-            {
-              if ((int)QueryStatics.ResultSetParamQueries[index].Category == category - 1 &&
-                QueryStatics.ResultSetParamQueries[index].Category != QueryCategory.Unsupported &&
-                QueryStatics.ResultSetParamQueries[index].IsLargeResultset == isLargeSetQuery)
-              {
-                string query = QueryStatics.ResultSetParamQueries[index].Query;
-                FwkInfo("QueryTests.VerifyResultSet: Query Category [{0}]," +
-                " QueryString [{1}], NumSet [{2}].", category - 1, query, numSet);
-                //ISerializable[] paramList = new ISerializable[QueryStatics.NoOfQueryParam[index]];
-                object[] paramList = new object[QueryStatics.NoOfQueryParam[index]];
-                Int32 numVal = 0;
-                for (Int32 ind = 0; ind < QueryStatics.NoOfQueryParam[index]; ind++)
-                {
-                  try
-                  {
-                    numVal = Convert.ToInt32(QueryStatics.QueryParamSet[index][ind]);
-                    //paramList[ind] = new CacheableInt32(numVal);
-                    paramList[ind] = numVal;
-                  }
-                  catch (FormatException)
-                  {
-                    paramList[ind] = (System.String)QueryStatics.QueryParamSet[index][ind];
-                  }
-                }
-                Query<object> qry = qs.NewQuery<object>(query);
-                DateTime startTime;
-                DateTime endTime;
-                TimeSpan elapsedTime;
-                startTime = DateTime.Now;
-                ISelectResults<object> results = qry.Execute(paramList, QueryResponseTimeout);
-                endTime = DateTime.Now;
-                elapsedTime = endTime - startTime;
-                FwkInfo("QueryTests.VerifyResultSet: Time Taken to execute" +
-                  " the query [{0}]: {1}ms", query,
-                  elapsedTime.TotalMilliseconds);
-
-                FwkInfo("QueryTests.VerifyResultSet: ResultSet size [{0}]," +
-                  " numSet [{1}], setRowCount [{2}]", results.Size, numSet,
-                  QueryStatics.ResultSetRowCounts[index]);
-                if ((category - 1 != (int)QueryCategory.Unsupported) &&
-                  (!qh.VerifyRS(results, qh.IsExpectedRowsConstantPQRS(index) ?
-                  QueryStatics.ResultSetPQRowCounts[index] :
-                  QueryStatics.ResultSetPQRowCounts[index] * numSet)))
-                {
-                  FwkSevere("QueryTests.VerifyStructSet: Param Query verify failed" +
-                    " for query index {0}", index);
-                  return false;
-                }
-                else
-                {
-                  result = true;
-                }
-              }
-            }
-            else
-            {
-              if ((int)QueryStatics.ResultSetQueries[index].Category == category - 1 &&
-                QueryStatics.ResultSetQueries[index].Category != QueryCategory.Unsupported &&
-                QueryStatics.ResultSetQueries[index].IsLargeResultset == isLargeSetQuery)
-              {
-                string query = QueryStatics.ResultSetQueries[index].Query;
-                FwkInfo("QueryTests.VerifyResultSet: Query Category [{0}]," +
-                " QueryString [{1}], NumSet [{2}].", category - 1, query, numSet);
-
-                ISelectResults<object> results = RemoteQuery(qs, QueryStatics.ResultSetQueries[index].Query);
-
-                FwkInfo("QueryTests.VerifyResultSet: ResultSet size [{0}]," +
-                  " numSet [{1}], setRowCount [{2}]", results.Size, numSet,
-                  QueryStatics.ResultSetRowCounts[index]);
-                if ((category - 1 != (int)QueryCategory.Unsupported) &&
-                  (!qh.VerifyRS(results, qh.IsExpectedRowsConstantRS(index) ?
-                  QueryStatics.ResultSetRowCounts[index] :
-                  QueryStatics.ResultSetRowCounts[index] * numSet)))
-                {
-                  FwkSevere("QueryTests.VerifyResultSet: Query verify failed" +
-                    " for query index {0}", index);
-                  return false;
-                }
-                else
-                {
-                  result = true;
-                }
-              }
-            }
-          }
-          catch (Exception)
-          {
-            if (category - 1 != (int)QueryCategory.Unsupported)
-            {
-              throw;
-            }
-          }
-        }
-        category = GetUIntValue("categoryType");
-        GC.Collect();
-        GC.WaitForPendingFinalizers();
-      }
-      return result;
-    }
-   
-    private bool VerifyStructSet()
-    {
-      return VerifyStructSet(0);
-    }
-
-    private bool VerifyStructSet(int distinctKeys)
-    {
-      bool result = false;
-      int numOfKeys;
-      if (distinctKeys > 0)
-      {
-        numOfKeys = distinctKeys;
-      }
-      else
-      {
-        ResetKey(DistinctKeys);
-        numOfKeys = GetUIntValue(DistinctKeys);
-      }
-      QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
-      int setSize = qh.PortfolioSetSize;
-      FwkInfo("QueryTests.VerifyStructSet: numOfKeys [{0}], setSize [{1}].",
-        numOfKeys, setSize);
-      if (numOfKeys < setSize)
-      {
-        setSize = numOfKeys;
-      }
-      int numSet = numOfKeys / setSize;
-
-      var qs = CheckQueryService();
-
-      DateTime startTime;
-      DateTime endTime;
-      TimeSpan elapsedTime;
-      ResetKey(CategoryType);
-      int category;
-      string objectType = GetStringValue(ObjectType);
-      ResetKey(LargeSetQuery);
-      bool isLargeSetQuery = bool.Parse(GetStringValue(LargeSetQuery));
-      ResetKey( "paramquery" );
-      bool isParamquery = GetBoolValue( "paramquery" );
-      int SSsize = 0;
-      if(isParamquery)
-        SSsize = QueryStrings.SSPsize;
-      else
-        SSsize = QueryStrings.SSsize;
-      while ((category = GetUIntValue(CategoryType)) > 0)
-      {
-        for (int index = 0; index < SSsize; index++)
-        {
-          if(isParamquery) {
-          if ((int)QueryStatics.StructSetParamQueries[index].Category == category - 1 &&
-            QueryStatics.StructSetParamQueries[index].Category != QueryCategory.Unsupported &&
-            QueryStatics.StructSetParamQueries[index].IsLargeResultset == isLargeSetQuery)
-          {
-            string query = QueryStatics.StructSetParamQueries[index].Query;
-            FwkInfo("QueryTests.VerifyStructSet: Query Category [{0}]," +
-              " String [{1}], NumSet [{2}].", category - 1, query, numSet);
-            try
-            {
-              Query<object> qry = qs.NewQuery<object>(query);
-              object[] paramList = new object[QueryStatics.NoOfQueryParamSS[index]];
-
-              Int32 numVal = 0;
-              for (Int32 ind = 0; ind < QueryStatics.NoOfQueryParamSS[index]; ind++)
-              {
-                try
-                {
-                  numVal = Convert.ToInt32(QueryStatics.QueryParamSetSS[index][ind]);
-                  paramList[ind] = numVal;
-               }
-                catch (FormatException )
-                {
-                  paramList[ind] = (System.String)QueryStatics.QueryParamSetSS[index][ind];
-                }
-              }
-              startTime = DateTime.Now;
-              ISelectResults<object> results = qry.Execute(paramList, QueryResponseTimeout);
-              endTime = DateTime.Now;
-              elapsedTime = endTime - startTime;
-              FwkInfo("QueryTests.VerifyStructSet: Time Taken to execute" +
-                " the query [{0}]: {1}ms", query,
-                elapsedTime.TotalMilliseconds);
-              FwkInfo("QueryTests.VerifyStructSet: StructSet size [{0}]," +
-                " numSet [{1}], setRowCount [{2}]", results.Size, numSet,
-                QueryStatics.StructSetPQRowCounts[index]);
-              if ((category - 1 != (int)QueryCategory.Unsupported) &&
-                (!qh.VerifySS(results, qh.IsExpectedRowsConstantPQSS(index) ?
-                QueryStatics.StructSetPQRowCounts[index] :
-                QueryStatics.StructSetPQRowCounts[index] * numSet,
-                QueryStatics.StructSetPQFieldCounts[index])))
-              {
-                FwkSevere("QueryTests.VerifyStructSet: Param Query verify failed" +
-                  " for query index {0}", index);
-                return false;
-              }
-              else
-              {
-                result = true;
-              }
-            }
-            catch
-            {
-              if (category - 1 != (int)QueryCategory.Unsupported)
-              {
-                throw;
-              }
-            }
-          }//}
-        }
-          else {
-          if ((int)QueryStatics.StructSetQueries[index].Category == category-1 &&
-            QueryStatics.StructSetQueries[index].Category != QueryCategory.Unsupported &&
-            QueryStatics.StructSetQueries[index].IsLargeResultset == isLargeSetQuery)
-          {
-            int [] a = new int[] {4,6,7,9,12,14,15,16};
-            if ((typeof(TVal).Equals(typeof(Apache.Geode.Client.Tests.PortfolioPdx))||
-              (typeof(TVal).Equals(typeof(Apache.Geode.Client.Tests.PositionPdx)))) && ((IList<int>)a).Contains(index))
-            {
-              FwkInfo("Skiping Query for pdx object [{0}]", QueryStatics.StructSetQueries[index].Query);
-            }
-            else {
-            string query = QueryStatics.StructSetQueries[index].Query;
-            FwkInfo("QueryTests.VerifyStructSet: Query Category [{0}]," +
-              " String [{1}], NumSet [{2}].", category-1, query, numSet);
-            try
-            {
-              Query<object> qry = qs.NewQuery<object>(query);
-              startTime = DateTime.Now;
-              ISelectResults<object> results = qry.Execute(QueryResponseTimeout);
-              endTime = DateTime.Now;
-              elapsedTime = endTime - startTime;
-              FwkInfo("QueryTests.VerifyStructSet: Time Taken to execute" +
-                " the query [{0}]: {1}ms", query,
-                elapsedTime.TotalMilliseconds);
-              FwkInfo("QueryTests.VerifyStructSet: StructSet size [{0}]," +
-                " numSet [{1}], setRowCount [{2}]", results.Size, numSet,
-                QueryStatics.StructSetRowCounts[index]);
-              if ((category-1 != (int)QueryCategory.Unsupported) &&
-                (!qh.VerifySS(results, qh.IsExpectedRowsConstantSS(index) ?
-                QueryStatics.StructSetRowCounts[index] :
-                QueryStatics.StructSetRowCounts[index] * numSet,
-                QueryStatics.StructSetFieldCounts[index])))
-              {
-                FwkSevere("QueryTests.VerifyStructSet: Query verify failed" +
-                  " for query index {0}", index);
-                return false;
-              }
-              else
-              {
-                result = true;
-              }
-            }
-            catch
-            {
-              if (category - 1 != (int)QueryCategory.Unsupported)
-              {
-                throw;
-              }
-            }
-           }
-          }
-        }
-          GC.Collect();
-          GC.WaitForPendingFinalizers();
-        }
-      }
-      return result;
-    }
-
-    private bool ReadQueryString(ref String query)
-    {
-      bool isCq = GetBoolValue("cq");
-      do
-      {
-        var resultSize = (ulong) GetUIntValue(ResultSize);  // set the query result size in xml
-        FwkInfo("ReadQueryString: Query String is: {0}, resultSize: {1}",
-          query, resultSize);
-        if (resultSize < 0)
-        {
-          FwkSevere("ReadQueryString: ResultSize is not defined in xml.");
-          return false;
-        }
-        var qs = CheckQueryService();
-        DateTime startTime;
-        TimeSpan elapsedTime;
-        ISelectResults<object> results;
-        if (isCq)
-        {
-          string CqName = String.Format("_default{0}",query);
-          CqQuery<TKey, object> cq = qs.GetCq<TKey, object>(CqName);
-          startTime = DateTime.Now;
-          results = cq.ExecuteWithInitialResults(QueryResponseTimeout);
-          elapsedTime = DateTime.Now - startTime;
-          FwkInfo("ReadQueryString: Time Taken to execute the CqQuery [{0}]:" +
-          "{1}ms ResultSize Size = {2}", query, elapsedTime.TotalMilliseconds ,results.Size);
-        }
-        else
-        {
-          startTime = DateTime.Now;
-          Query<object> qry = qs.NewQuery<object>(query);
-          results = qry.Execute(QueryResponseTimeout);
-          elapsedTime = DateTime.Now - startTime;
-          FwkInfo("ReadQueryString: Time Taken to execute the query [{0}]:" +
-            "{1}ms", query, elapsedTime.TotalMilliseconds);
-        }
-        if (resultSize != results.Size)
-        {
-          FwkSevere("ReadQueryString: Result size found {0}, expected {1}.",
-            results.Size, resultSize);
-          return false;
-        }
-        FwkInfo("ReadQueryString: Got expected result size {0}.",
-          results.Size);
-      } while ((query = GetStringValue(QueryString)) != null &&
-        query.Length > 0);
-      return true;
-    }
-
-    #endregion
-
-    #region Public methods
-    public void DoCreateDCRegion()
-    {
-      FwkInfo("In DoCreateDCRegion() Durable");
-
-      ClearCachedKeys();
-
-      string rootRegionData = GetStringValue("regionSpec");
-      string tagName = GetStringValue("TAG");
-      string endpoints = Util.BBGet(JavaServerBB, EndPointTag + tagName)
-        as string;
-      if (rootRegionData != null && rootRegionData.Length > 0)
-      {
-        string rootRegionName;
-        rootRegionName = GetRegionName(rootRegionData);
-        if (rootRegionName != null && rootRegionName.Length > 0)
-        {
-          IRegion<TKey, TVal> region;
-          if ((region = CacheHelper<TKey, TVal>.GetRegion(rootRegionName)) == null)
-          {
-            bool isDC = GetBoolValue("isDurable");
-            RegionFactory rootAttrs = null;
-            string m_isPool = null;
-            // Check if this is a thin-client region; if so set the endpoints
-            int redundancyLevel = 0;
-            if (endpoints != null && endpoints.Length > 0)
-            {
-              redundancyLevel = GetUIntValue(RedundancyLevelKey);
-              if (redundancyLevel < 0)
-                redundancyLevel = 0;
-              string conflateEvents = GetStringValue(ConflateEventsKey);
-              string durableClientId = "";
-              int durableTimeout = 300;
-              if (isDC)
-              {
-                durableTimeout = GetUIntValue("durableTimeout");
-                bool isFeeder = GetBoolValue("isFeeder");
-                if (isFeeder)
-                {
-                  durableClientId = "Feeder";
-                  // VJR: Setting FeederKey because listener cannot read boolean isFeeder
-                  // FeederKey is used later on by Verify task to identify feeder's key in BB
-                  Util.BBSet("DURABLEBB", "FeederKey", "ClientName_" + Util.ClientNum + "_Count");
-                }
-                else
-                {
-                  durableClientId = String.Format("ClientName_{0}", Util.ClientNum);
-                }
-              }
-              FwkInfo("DurableClientID is {0} and DurableTimeout is {1}", durableClientId, durableTimeout);
-              ResetKey("sslEnable");
-              bool isSslEnable = GetBoolValue("sslEnable");
-              CacheHelper<TKey, TVal>.InitConfigForPoolDurable(durableClientId, durableTimeout, conflateEvents, isSslEnable);
-              rootAttrs = CacheHelper<TKey, TVal>.DCache.CreateRegionFactory(RegionShortcut.PROXY);
-              SetRegionAttributes(rootAttrs, rootRegionData, ref m_isPool);
-            }
-            rootAttrs = CreatePool(rootAttrs, redundancyLevel);
-            region = CacheHelper<TKey, TVal>.CreateRegion(rootRegionName, rootAttrs);
-            Apache.Geode.Client.RegionAttributes<TKey, TVal> regAttr = region.Attributes;
-            FwkInfo("Region attributes for {0}: {1}", rootRegionName,
-              CacheHelper<TKey, TVal>.RegionAttributesToString(regAttr));
-            if (isDC)
-            {
-                CacheHelper<TKey, TVal>.DCache.ReadyForEvents();
-            }
-          }
-        }
-      }
-      else
-      {
-        FwkSevere("DoCreateDCRegion() failed to create region");
-      }
-
-      FwkInfo("DoCreateDCRegion() complete.");
-    }
-    public void DoCreateUserDefineRegion()
-    {
-      FwkInfo("In QueryTest.DoCreateUserDefineRegion()");
-      try
-      {
-          FwkInfo("isObjectRegistered value is {0}",isObjectRegistered);
-        if (!isObjectRegistered)
-        {
-          CacheHelper<TKey, TVal>.DCache.TypeRegistry.RegisterType(Portfolio.CreateDeserializable, 8);
-          FwkInfo("Completed Portfolio registeration");
-          CacheHelper<TKey, TVal>.DCache.TypeRegistry.RegisterType(Position.CreateDeserializable, 7);
-          CacheHelper<TKey, TVal>.DCache.TypeRegistry.RegisterPdxType(PortfolioPdx.CreateDeserializable);
-          CacheHelper<TKey, TVal>.DCache.TypeRegistry.RegisterPdxType(PositionPdx.CreateDeserializable);
-          FwkInfo("Completed other object registeration");
-          isObjectRegistered = true;
-        }
-        string regionName = GetStringValue(RegionName);
-        bool isDurable = GetBoolValue("isDurable");
-        if (isDurable)
-        {
-          DoCreateDCRegion();
-        }
-        else
-        {
-          IRegion<TKey, TVal> region = CreateRootRegion(regionName);
-
-          string key = region.Name;
-          Util.BBIncrement(QueryBB, key);
-
-          FwkInfo("QueryTest.DoCreateUserDefineRegion() Created Region " +
-            region.Name);
-        }
-        
-      }
-      catch (Exception ex)
-      {
-        FwkException("QueryTest.DoCreateUserDefineRegion() Caught Exception: {0}", ex);
-      }
-    }
-    
-    public void DoRegisterCq()
-    {
-      FwkInfo("In Query.DoRegisterCq()");
-      try
-      {
-        int cqNum=0;
-        string qryStr = GetStringValue(QueryString);
-        string clientId = Util.ClientId;
-        string key = "CQLISTENER_" + clientId;
-        while (qryStr != null)
-        {
-          var qs = CheckQueryService();
-          CqAttributesFactory<TKey, object> cqFac = new CqAttributesFactory<TKey, object>();
-          ICqListener<TKey, object> cqLstner = new MyCq1Listener<TKey, object>();
-          cqFac.AddCqListener(cqLstner);
-          CqAttributes<TKey, object> cqAttr = cqFac.Create();
-          string CqName = String.Format("cq-{0}", cqNum++);
-          FwkInfo("Reading Query from xml {0} for cq {1}", qryStr, CqName);
-          CqQuery<TKey, object> qry = qs.NewCq(CqName, qryStr, cqAttr, false);
-          ISelectResults<object> results = qry.ExecuteWithInitialResults(QueryResponseTimeout);
-          Util.BBIncrement("CqListenerBB", key);
-        }
-      }
-      catch(Exception ex)
-      {
-        FwkException("Query.DoRegisterCq() Caught Exception: {0}", ex);
-      }
-    }
-
-    public void DoRegisterCqForConc()
-    {
-      FwkInfo("In Query.DoRegisterCqForConc()");
-      try
-      {
-        string qryStr = GetStringValue(QueryString);
-        string clientId = Util.ClientId;
-        string key = "CQLISTENER_" + clientId;
-        ResetKey("isDurableC");
-        bool isdurable = GetBoolValue("isDurableC");
-        while (qryStr != null)
-        {
-          var qs = CheckQueryService();
-          CqAttributesFactory<TKey, object> cqFac = new CqAttributesFactory<TKey, object>();
-          ICqListener<TKey, object> cqLstner = new MyCq1Listener<TKey, object>();
-          cqFac.AddCqListener(cqLstner);
-          CqAttributes<TKey, object> cqAttr = cqFac.Create();
-          CqQuery<TKey, object> qry=null ;
-          qry = qs.NewCq(qryStr, cqAttr, isdurable);
-          FwkInfo("Registered Cq {0} with query {1} and isDurable {2} ", qry.Name, qryStr, isdurable);
-          ResetKey(RegisterAndExecuteCq);
-          ResetKey("executeWithIR");
-          bool regAndExcCq = GetBoolValue(RegisterAndExecuteCq);
-          bool isExecuteWithIR = GetBoolValue("executeWithIR");
-          FwkInfo("Registered Cq with regAndExcCq {0} and with isExecuteWithIR {1} and with QueryState = {2} ", regAndExcCq, isExecuteWithIR, qry.GetState());
-          if (regAndExcCq)
-             qry.Execute();
-          if (isExecuteWithIR)
-              qry.ExecuteWithInitialResults(QueryResponseTimeout);
-          qryStr = GetStringValue(QueryString);
-          Util.BBIncrement("CqListenerBB", key);
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("Query.DoRegisterCqForConc() Caught Exception: {0}", ex);
-      }
-    }
-
-    public void DoValidateCq()
-    {
-        FwkInfo("In QueryTest.DoValidateCq()");
-        try
-        {
-          var qs = CheckQueryService();
-          ResetKey("isDurableC");
-          bool isdurable = GetBoolValue("isDurableC");
-          ResetKey("NoCqs");
-          int numCqs = GetUIntValue("NoCqs");
-          
-          CqServiceStatistics cqSvcStats = qs.GetCqStatistics();
-          FwkInfo("Number of Cqs created is {0} number of Cqs active is {1} number of Cqs Closed is {2} number of Cqs onClient is {3} number of Cqs stopped is {4} ", cqSvcStats.numCqsCreated(), cqSvcStats.numCqsActive(), cqSvcStats.numCqsClosed(), cqSvcStats.numCqsOnClient(), cqSvcStats.numCqsStopped());
-          System.Collections.Generic.List<string> durableCqList = qs.GetAllDurableCqsFromServer();
-
-          int actualCqs = durableCqList.Count;
-          UInt32 expectedCqs = cqSvcStats.numCqsCreated() - cqSvcStats.numCqsClosed();
-
-          if (isdurable)
-          {
-              if (expectedCqs == actualCqs)
-               {
-                   FwkInfo("No of durableCqs on DC client is {0}  which is equal to the number of expected Cqs {1}", actualCqs, expectedCqs);
-               }
-             else
-                  FwkException("No of durableCqs on DC client is {0} is not equal to the number of expected Cqs {1} ", actualCqs, expectedCqs);
-          }
-          else
-          {
-              if (durableCqList.Count == 0)
-             {
-                FwkInfo("No. of durable Cqs for NDC is {0}", durableCqList.Count);
-             }
-             else
-               FwkException("Client is not durable, hence durableCqs for this client should have, had been 0,but it is{0}", durableCqList.Count);
-          }
-          FwkInfo("Cq durable list is {0}",durableCqList.Count);
-        }
-        catch (Exception ex)
-        {
-            FwkException("Query.DoValidateCq() Caught Exception : {0}", ex);
-        }
-    }
-
-    public void DoVerifyCQListenerInvoked()
-    {
-      FwkInfo("In QueryTest.DoVerifyCQListenerInvoked()");
-      try
-      {
-        var qs = CheckQueryService();
-        ICqListener<TKey, object> cqLstner = new MyCq1Listener<TKey, object>();
-        CqQuery<TKey, object>[] vcq = qs.GetCqs<TKey, object>();
-        System.Collections.Generic.List<string> durableCqList = qs.GetAllDurableCqsFromServer();
-        FwkInfo("Durable Cq count is {0} and all cq count is {1}", durableCqList.Count, vcq.Length);
-        //Validate Cq by name
-                 
-        for (int i = 0; i < vcq.Length; i++)
-        {
-          CqQuery<TKey, object> cq = (CqQuery<TKey, object>)vcq.GetValue(i);
-          
-          CqServiceStatistics cqSvcStats = qs.GetCqStatistics();
-          FwkInfo("Number of Cqs created is {0} number of Cqs active is {1} number of Cqs Closed is {2} number of Cqs onClient is {3} number of Cqs stopped is {4} ", cqSvcStats.numCqsCreated(),cqSvcStats.numCqsActive(),cqSvcStats.numCqsClosed(),cqSvcStats.numCqsOnClient(),cqSvcStats.numCqsStopped());
-         
-          CqStatistics cqStats = cq.GetStatistics();
-          CqAttributes<TKey, object> cqAttr = cq.GetCqAttributes();
-          ICqListener<TKey, object>[] vl = cqAttr.getCqListeners();
-          cqLstner = vl[0];
-          MyCq1Listener<TKey, object> myLisner = (MyCq1Listener<TKey, object>)cqLstner;
-          Util.BBSet("CQLISTNERBB", "CQ",myLisner.NumEvents());
-          ResetKey("checkEvents");
-          bool isCheckEvents = GetBoolValue("checkEvents");
-          Util.Log("My count for cq {0} Listener : NumInserts:{1}, NumDestroys:{2}, NumUpdates:{3}, NumEvents:{4}", cq.Name, myLisner.NumInserts(), myLisner.NumDestroys(), myLisner.NumUpdates(), myLisner.NumEvents());
-          if (isCheckEvents)
-          {
-              Int32 createCnt = (Int32)Util.BBGet("OpsBB", "CREATES");
-              Int32 updateCnt = (Int32)Util.BBGet("OpsBB", "UPDATES");
-              Int32 destCnt = (Int32)Util.BBGet("OpsBB", "DESTROYS");
-              Int32 invalCnt = (Int32)Util.BBGet("OpsBB", "INVALIDATES");
-              Int32 totalEvent = createCnt + updateCnt + destCnt + invalCnt;
-
-              ResetKey("invalidate");
-              bool isInvalidate = GetBoolValue("invalidate");
-              ResetKey("stopped");
-              bool isStoped = GetBoolValue("stopped");
-              ResetKey("execute");
-              bool isExecute = GetBoolValue("execute");
-
-              FwkInfo("BB cnt are create = {0} update = {1} destroy = {2} invalidate = {3} TotalEvent = {4} ",createCnt , updateCnt ,destCnt, invalCnt ,totalEvent);
-              if ((!cq.IsStopped()) && isExecute)
-              {
-                  if (isInvalidate)
-                  {
-                      if (myLisner.NumEvents() == totalEvent)
-                          FwkInfo("Events count match ");
-                      else
-                          FwkException(" Total event count incorrect");
-                  }
-                  else
-                  {
-                      if (myLisner.NumInserts() == createCnt && myLisner.NumUpdates() == updateCnt && myLisner.NumDestroys() == destCnt && myLisner.NumEvents() == totalEvent)
-                          FwkInfo("Events count match ");
-                      else
-                          FwkException(" accumulative event count incorrect");
-                  }
-              }
-              else if (isStoped)
-              {
-                  if (cqStats.numEvents() == 0)
-                      FwkInfo("");
-                  else
-                      FwkException("Cq is stopped before entry operation,hence events should not have been received.");
-              }
-
-          }
-          else
-          {
-            //if (myLisner.NumEvents() > 0)
-            {
-              if (myLisner.NumInserts() == cqStats.numInserts() && myLisner.NumUpdates() == cqStats.numUpdates() && myLisner.NumDestroys() == cqStats.numDeletes() && myLisner.NumEvents() == cqStats.numEvents())
-                Util.Log("Accumulative event count is correct");
-              else
-                FwkException("Accumulative event count is incorrect");
-            }
-            //else
-              //FwkException("The listener should have processed some events:");
-          }
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("Query.DoVerifyCQListenerInvoked() Caught Exception : {0}", ex);
-      }
-    }
-
-    public void DoValidateEvents()
-    {
-        FwkInfo("validateEvents() called");
-        try
-        {
-          DoVerifyCQListenerInvoked();
-          ResetKey("distinctKeys");
-          ResetKey("NumNewKeys");
-          Int32 numKeys = GetUIntValue("distinctKeys");
-          Int32 numNewKeys = GetUIntValue("NumNewKeys");
-          FwkInfo("NUMKEYS = {0}", numKeys);
-          Int32 clntCnt = GetUIntValue("clientCount");
-          Int32 totalEvents = 0;
-          UInt32 listnEvent = 0;
-          Int32 numDestroyed = (Int32)Util.BBGet("ImageBB", "Last_Destroy") - (Int32)Util.BBGet("ImageBB", "First_Destroy") + 1;
-          Int32 numInvalide = (Int32)Util.BBGet("ImageBB", "Last_Invalidate") - (Int32)Util.BBGet("ImageBB", "First_Invalidate") + 1;
-          Int32 updateCount = (Int32)Util.BBGet("ImageBB", "Last_UpdateExistingKey") - (Int32)Util.BBGet("ImageBB", "First_UpdateExistingKey") + 1;
-          
-            //As CqListener is not invoked when events like "get,localDEstroy and localInvalidate" happen,hence not adding those  events count for correct validation.
-          totalEvents = numNewKeys + numDestroyed +  numInvalide+ updateCount;
-          FwkInfo("TOTALEVENTS = {0}" , totalEvents);
-          listnEvent = (UInt32)Util.BBGet("CQLISTNERBB", "CQ");
-          if (listnEvent == totalEvents)
-          {
-            FwkInfo("ListenerEvents and RegionEvents are equal i.e ListenerEvents = {0} ,RegionEvents = {1}",listnEvent ,totalEvents);
-          }
-          else
-            FwkException("Events mismatch Listner event = {0} and entry event = {1}", listnEvent, totalEvents);
-        }
-        catch (Exception e)
-        { 
-          FwkException("QueryTest::validateEvents() FAILED caught exception  {0}", e.Message);
-        }
-    }
-
-    public void DoVerifyCqDestroyed()
-    {
-      FwkInfo("In QueryTest.DoVerifyCQDestroy()");
-      try
-      {
-        var qs = CheckQueryService();
-        CqQuery<TKey, object>[] vcq = qs.GetCqs<TKey, object>();
-        if (vcq.Length != 0)
-        {
-          FwkException("cqs should have been removed after close");
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("Query.DoVerifyCQDestroy() Caught exception {0}",ex);
-      }
-    }
-
-    public void DoCQState()
-    {
-      FwkInfo("In QueryTest.DoCQState()");
-      string opcode=null;
-      try
-      {
-        opcode = GetStringValue(CqState);
-        var qs = CheckQueryService();
-        CqQuery<TKey, object>[] vcq = qs.GetCqs<TKey, object>();
-        FwkInfo("QueryTest.DoCQState - number of cqs is {0} ", vcq.Length); 
-        for (int i = 0; i < vcq.Length; i++)
-        {
-          CqQuery<TKey, object> cq = (CqQuery<TKey, object>)vcq.GetValue(i);
-          if (opcode == "stopped")
-              cq.Stop();
-          else if (opcode == "closed")
-              cq.Close();
-          else if (opcode == "execute")
-              if (cq.IsStopped())
-              {
-                  cq.Execute();
-              }
-              else
-                  FwkInfo("Cq has not been stopped,it is still running");
-          else
-              FwkException("Invalid operation specified:");
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("Caught unexpected exception during cq {0} operation {1} exiting task ",opcode,ex);
-      }
-    }
-
-    public void DoCQOperation()
-    {
-      FwkInfo("In QueryTest.DoCQOperation()");
-      IRegion<TKey, TVal> region = GetRegion();
-      Int32 secondsToRun = GetTimeValue(WorkTime);
-      secondsToRun = (secondsToRun < 1) ? 30 : secondsToRun;
-      Int32 opsSec = GetUIntValue("opsSecond");
-      opsSec = (opsSec < 1) ? 0 : opsSec;
-      DateTime now = DateTime.Now;
-      DateTime end = now.AddSeconds(secondsToRun);
-      string opCode = null;
-      Int32 getCQAttributes = 0, getCQName = 0, getQuery = 0, getQueryString = 0, getStatistics = 0, stopCq = 0, closeCq = 0, executeCq = 0, executeCqWithIR = 0;
-      FwkInfo("Operation will work for : {0}" ,secondsToRun);
-      PaceMeter pm = new PaceMeter(opsSec);
-      var qs = CheckQueryService();
-      while (now < end)
-      {
-        try 
-        {
-          opCode=GetStringValue("cqOps");
-          CqQuery<TKey, object>[] vcq = qs.GetCqs<TKey, object>();
-          CqQuery<TKey, object> cqs = (CqQuery<TKey, object>)vcq.GetValue(Util.Rand(vcq.Length));
-          FwkInfo("Performing {0} on cq named {1}",opCode,cqs.Name);
-          if (opCode == null || opCode.Length == 0)
-          {
-            opCode = "no-op";
-          }
-          if(opCode=="getCQAttributes")
-          {
-            cqs.GetCqAttributes();
-            getCQAttributes++;
-          }
-          else if (opCode == "getCQName")
-          {
-            string name = cqs.Name;
-            getCQName++;
-          }
-          else if (opCode == "getQuery")
-          {
-            cqs.GetQuery();
-            getQuery++;
-          }
-          else if (opCode == "getQueryString")
-          {
-            string queryString = cqs.QueryString;
-            getQueryString++;
-          }
-          else if (opCode == "getStatistics")
-          {
-            cqs.GetStatistics();
-            getStatistics++;
-          }
-          else if (opCode == "stopCq")
-          {
-            StopCQ(cqs);
-            stopCq++;
-          }
-          else if (opCode == "closeCQ")
-          {
-            CloseCQ(cqs);
-            closeCq++;
-          }
-          else if (opCode == "executeCQ")
-          {
-            ExecuteCQ(cqs);
-            executeCq++;
-          }
-          else if (opCode == "executeCQWithIR")
-          {
-            ExecuteCQWithIR(cqs);
-            executeCqWithIR++;
-          }
-          else
-          {
-            FwkException("Invalid operation specified {0}", opCode);
-          }
-        }
-        catch(Exception ex)
-        {
-          FwkException("QueryTest.CqOperations() Caught " +
-          "unexpected exception during entry '{0}' operation: {1}.",
-          opCode, ex);
-        }
-        pm.CheckPace();
-        now = DateTime.Now;
-      }
-      Util.Log("cqOperations did {0}getCQAttributes,{1} getCQName,{2}getQuery,{3}getQueryString,{4}getStatistics,{5}stopCQ,{6}closeCQ,{7}executeCQ,{8}executeCQWithIR ", getCQAttributes, getCQName, getQuery, getQueryString, getStatistics, stopCq, closeCq, executeCq, executeCqWithIR);
-    }
-
-    public void StopCQ(CqQuery<TKey, object> cq)
-    {
-      try 
-      {
-        if (cq.IsRunning())
-          cq.Stop();
-        else if (cq.IsStopped())
-        {
-          try
-          {
-            cq.Stop();
-            FwkException("QueryTest.StopCq : should have thrown IllegalStateException. executed stop() successfully on STOPPED CQ");
-          }
-          catch(IllegalStateException)
-          { }
-        }
-        else if (cq.IsClosed())
-        {
-          try
-          {
-            cq.Stop();
-            FwkException("QueryTest::stopCQ : should have thrown CQClosedException. executed stop() successfully on CLOSED CQ");
-          }
-          catch(Exception)
-          {
-            ReRegisterCQ(cq);
-          }
-        }
-      }
-      catch(Exception ex)
-      {
-        FwkException("QueryTest::stopCQ : Caught unexpected exception during cq stop operation :{0}",ex);
-      }
-    }
-
-    public void CloseCQ(CqQuery<TKey, object> cq)
-    {
-      try
-      {
-        if (cq.IsRunning() || cq.IsStopped())
-          cq.Close();
-        if (cq.IsClosed())
-        {
-          try
-          {
-            cq.Close();
-            FwkInfo("Cq {0} is closed ,hence reregistering it before execution");
-            ReRegisterCQ(cq);
-          }
-          catch( CacheClosedException )//should be CqClosedException
-          {
-            FwkException("QueryTest::CloseCQ : Should not have thrown CQClosedException. close() on CLOSED query is not successful");
-          }
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("QueryTest::closeCQ : Caught unexpected exception during cq close operation: {0}", ex);
-      }
-    }
-
-    public void ExecuteCQ(CqQuery<TKey, object> cq)
-    {
-      try
-      {
-        if (cq.IsStopped())
-          cq.Execute();
-        else if (cq.IsRunning())
-        {
-          try
-          {
-            cq.Execute();
-            FwkException("QueryTest.ExecuteCq : should have thrown IllegalStateException. Execute on RUNNING query is successful");
-          }
-          catch (IllegalStateException)
-          { }
-        }
-        if (cq.IsClosed())
-        {
-          try
-          {
-            cq.Execute();
-            FwkException( "QueryTest::ExecuteCQ : Should have thrown CQClosedException. execute() on CLOSED query is successful");
-          }
-          catch(CacheClosedException) //CqCloseException
-          {
-            FwkInfo("Cq {0} is destroyed ,hence registering it before execution",cq.Name);
-            ReRegisterCQ(cq);
-          }
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("QueryTest::ExecuteCQ : Caught unexpected exception during cq execute operation:{0} ",ex);
-      }
-    }
-
-    public void ExecuteCQWithIR(CqQuery<TKey, object> cq)
-    {
-      try
-      {
-        if (cq.IsStopped())
-        {
-          ISelectResults<object> results = cq.ExecuteWithInitialResults();
-          FwkInfo("Executed query {0} with initial results",cq.Name);
-        }
-        else if (cq.IsRunning())
-        {
-          try
-          {
-            cq.Execute();
-            FwkException("QueryTest::ExecuteCQWithIR : Should have thrown IllegalStateException. executeWithInitialResults on RUNNING query is successful");
-          }
-          catch (IllegalStateException)
-          {// expected
-          }
-        }
-        if (cq.IsClosed())
-        {
-          try
-          {
-            cq.ExecuteWithInitialResults();
-            FwkException( "QueryTest::ExecuteCQWithIR: Should have thrown CQClosedException. executeWithInitialResults() on CLOSED query is succussful");
-          }
-          catch (CacheClosedException) //CqClosedException
-          {
-            FwkInfo( "CQ:- {0} is closed hence registering it before executeWithInitialResults",cq.Name);
-            ReRegisterCQ(cq);
-          }
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("QueryTest::executeCQWithIR : Caught unexpected exception during cq executeWithIR operation: {0}",ex);
-      }
-     }
-
-    public void ReRegisterCQ(CqQuery<TKey, object> cq)
-    {
-      try
-      {
-        FwkInfo("re-registering Cq: {0}",cq.Name);
-        string query = cq.QueryString;
-        CqAttributesFactory<TKey, object> cqFac = new CqAttributesFactory<TKey, object>();
-        ICqListener<TKey, object> cqLstner = new MyCq1Listener<TKey, object>();
-        cqFac.AddCqListener(cqLstner);
-        CqAttributes<TKey, object> cqAttr = cqFac.Create();
-        var qs = CheckQueryService();
-        qs.NewCq(query, cqAttr,false);
-      }
-      catch (Exception ex)
-      {
-        FwkException("Caught unexpected exception during ReRegisterCq() {0}",ex);
-      }
-    }
-
-    public void DoCloseCacheAndReInitialize()
-    {
-      FwkInfo("In QueryTest.DoCloseCacheAndReInitialize()");
-      try
-      {
-        if (m_cache != null)
-        {
-          IRegion<TKey, TVal>[] vregion = CacheHelper<TKey, TVal>.DCache.RootRegions<TKey, TVal>();
-          try
-          {
-            for (Int32 i = 0; i < vregion.Length; i++)
-            {
-              IRegion<TKey, TVal> region = (IRegion<TKey, TVal>)vregion.GetValue(i);
-              region.GetLocalView().DestroyRegion();
-            }
-          }
-          catch (RegionDestroyedException ignore)
-          {
-            string message = ignore.Message;
-            Util.Log(message);
-          }
-          catch (Exception ex)
-          {
-            FwkException("Caught unexpected exception during region local destroy {0}", ex);
-          }
-          bool keepalive = GetBoolValue("keepAlive");
-          bool isDurable = GetBoolValue("isDurable");
-          if (isDurable)
-          {
-            FwkInfo("KeepAlive is {0}", keepalive);
-            m_cache.Close(keepalive);
-          }
-          else
-            m_cache.Close();
-          m_cache = null;
-          FwkInfo("Cache Close");
-        }
-        CacheHelper<TKey, TVal>.Close();
-          DoRestartClientAndRegInt();
-        bool isCq = GetBoolValue("cq");
-        if (isCq)
-          DoRegisterCqForConc();
-      }
-      catch (CacheClosedException ignore)
-      {
-        string message = ignore.Message;
-        Util.Log(message);
-      }
-      catch (Exception ex)
-      {
-        FwkException("Caught unexpected exception during CacheClose {0}",ex);
-      }
-    }
-
-    public void DoRestartClientAndRegInt()
-    {
-      int sleepSec = GetUIntValue("restartTime");
-      if (sleepSec > 0 )
-        Thread.Sleep(sleepSec * 1000);
-      DoCreateUserDefineRegion();
-      string name = GetStringValue("regionName");
-      IRegion<TKey, TVal> region = GetRegion(name);
-      bool isDurable = GetBoolValue("isDurableReg");
-      if (region == null)
-        FwkInfo("DoRestartClientAndRegInt() region is null");
-      else
-        FwkInfo("DoRestartClientAndRegInt()region not null");
-      region.GetSubscriptionService().RegisterAllKeys(isDurable);
-      int waitSec = GetUIntValue("updateReceiveTime");
-      if (waitSec > 0)
-        Thread.Sleep(waitSec * 1000);
-      FwkInfo("DoRestartClientAndRegInt() complete.");
-    }
-
-    public void DoRegisterAllKeys()
-    {
-      FwkInfo("In QueryTest.DoRegisterAllKeys");
-      try
-      {
-        IRegion<TKey, TVal> region = GetRegion();
-        FwkInfo("QueryTest::registerAllKeys region name is {0}",region.Name);
-        bool isDurable = GetBoolValue("isDurableReg");
-        region.GetSubscriptionService().RegisterAllKeys(isDurable);
-        if (isDurable)
-          CacheHelper<TKey, TVal>.DCache.ReadyForEvents();
-      }
-      catch (Exception ex)
-      {
-        FwkException("QueryTest.DoRegisterAllKeys() caught exception {0}",ex);
-      }
-    }
-
-    public ISelectResults<object> RemoteQuery(QueryService qs, string queryStr)
-    {
-      DateTime startTime;
-      DateTime endTime;
-      TimeSpan elapsedTime;
-      Query<object> qry = qs.NewQuery<object>(queryStr);
-      startTime = DateTime.Now;
-      ISelectResults<object> results = qry.Execute(QueryResponseTimeout);
-      endTime = DateTime.Now;
-      elapsedTime = endTime - startTime;
-      FwkInfo("QueryTest.RemoteQuery: Time Taken to execute" +
-            " the query [{0}]: {1}ms", queryStr, elapsedTime.TotalMilliseconds);
-      return results;
-    }
-
-    public ISelectResults<object> ContinuousQuery(QueryService qs, string queryStr, int cqNum)
-    {
-      DateTime startTime ,endTime;
-      TimeSpan elapsedTime;
-      CqAttributesFactory<TKey, object> cqFac = new CqAttributesFactory<TKey, object>();
-      ICqListener<TKey, object> cqLstner = new MyCq1Listener<TKey, object>();
-      cqFac.AddCqListener(cqLstner);
-      CqAttributes<TKey, object> cqAttr = cqFac.Create();
-      startTime = DateTime.Now;
-      string CqName = String.Format("cq-{0}", cqNum);
-      CqQuery<TKey, object> cq = qs.NewCq(CqName, queryStr, cqAttr, false);
-      ISelectResults<object> results = cq.ExecuteWithInitialResults(QueryResponseTimeout);
-      endTime = DateTime.Now;
-      elapsedTime = endTime - startTime;
-      return results;
-    }
-    
-    public void DoAddRootAndSubRegion()
-    {
-      FwkInfo("In QueryTest.DoAddRootAndSubRegion()");
-      ResetKey("subRegion");
-      bool createSubReg = GetBoolValue("subRegion");
-      try
-      {
-        string isTypeRegistered = GetStringValue("TypeId");
-        if (isTypeRegistered != "registered")
-        {
-          FwkInfo("Getting inside for registeration");
-          CacheHelper<TKey, TVal>.DCache.TypeRegistry.RegisterType(Position.CreateDeserializable, 7);
-          CacheHelper<TKey, TVal>.DCache.TypeRegistry.RegisterType(Portfolio.CreateDeserializable, 8);
-          CacheHelper<TKey, TVal>.DCache.TypeRegistry.RegisterPdxType(Apache.Geode.Client.Tests.PortfolioPdx.CreateDeserializable);
-          CacheHelper<TKey, TVal>.DCache.TypeRegistry.RegisterPdxType(Apache.Geode.Client.Tests.PositionPdx.CreateDeserializable);
-
-        }
-        IRegion<TKey, TVal> parentRegion = null;
-        ResetKey(RegionPaths);
-        string sRegionName;
-        string rootRegionData = GetStringValue("regionSpec");
-        string tagName = GetStringValue("TAG");
-        string endpoints = Util.BBGet(JavaServerBB, EndPointTag + tagName)
-          as string;
-        while ((sRegionName = GetNextRegionName(ref parentRegion)) != null &&
-          sRegionName.Length > 0)
-        {
-          IRegion<TKey, TVal> region;
-          if (parentRegion == null)
-          {
-            region = CreateRootRegion(sRegionName, rootRegionData, endpoints);
-          }
-          else
-          {
-            string fullName = parentRegion.FullPath;
-            Apache.Geode.Client.RegionAttributes<TKey, TVal> regattrs = parentRegion.Attributes;
-            parentRegion.CreateSubRegion(sRegionName, regattrs);
-            Util.BBSet(QueryBB, sRegionName, fullName); parentRegion.SubRegions(false);
-          }
-          if (createSubReg)
-          {
-              CreateSubRegion(sRegionName);
-          }
-      
-        }
-        ResetKey("useTransactions");
-        m_istransaction = GetBoolValue("useTransactions");
-
-      }
-      catch (Exception ex)
-      {
-        FwkException("QueryTest.DoAddRootAndSubRegion() Caught exception: {0}", ex);
-      }
-      
-    }
-
-    public void CreateSubRegion(string regName) 
-    {
-        IRegion<TKey, TVal> parentRegion = GetRegion();
-        IRegion<TKey, TVal> subRegion;
-        Apache.Geode.Client.RegionAttributes<TKey, TVal> regattrs = parentRegion.Attributes;
-        subRegion = parentRegion.CreateSubRegion(regName,regattrs);
-        ICollection<IRegion<TKey, TVal>> subRegions = parentRegion.SubRegions(true);
-        FwkInfo("subregions are {0}",subRegions.Count);
-    }
-
-    public void DoDestroyUserObject()
-    {
-      FwkInfo("In QueryTests.DoDestroyUserObject()");
-      try
-      {
-        string name = GetStringValue("regionName");
-        IRegion<TKey,TVal> region = GetRegion(name);
-        //string label = CacheHelper<TKey, TVal>.RegionTag(region.Attributes);
-        ResetKey(DistinctKeys);
-        int numOfKeys = GetUIntValue(DistinctKeys);
-        QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
-        string objectType = GetStringValue(ObjectType);
-        int setSize = qh.PortfolioSetSize;
-        int destroyKeys = GetUIntValue(DestroyKeys);
-        if (destroyKeys <= 0 && numOfKeys < setSize)
-        {
-          FwkException("QueryTests.DoDestroyUserObject() Number of keys should be multiple of 20");
-        }
-        else
-        {
-          numOfKeys = destroyKeys;
-        }
-
-        int numSet = numOfKeys / setSize;
-
-        FwkInfo("QueryTests.DoDestroyUserObject() Destroying " + numOfKeys + " keys, destroyKeys=" + destroyKeys +
-          ", setSize=" + setSize + ", numSet=" + numSet);
-        if (m_istransaction)
-        {
-          txManager = CacheHelper<TKey, TVal>.DCache.CacheTransactionManager;
-          txManager.Begin();
-        }
-        qh.DestroyPortfolioOrPositionData(region, setSize, numSet, objectType);
-        if (m_istransaction)
-          txManager.Commit();
-        FwkInfo("QueryTests.DoDestroyUserObject() Destroyed user objects.");
-      }
-      catch (Exception ex)
-      {
-        FwkException("QueryTests.DoDestroyUserObject() Caught Exception: {0}", ex);
-      }
-    }
-
-    public void DoInvalidateUserObject()
-    {
-      FwkInfo("In QueryTests.DoInvalidateUserObject().");
-      try
-      {
-        string name = GetStringValue("regionName");
-        IRegion<TKey, TVal> region = GetRegion(name);
-        //string label = CacheHelper<TKey, TVal>.RegionTag(region.Attributes);
-        ResetKey(DistinctKeys);
-        int numOfKeys = GetUIntValue(DistinctKeys);
-        QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
-        string objectType = GetStringValue(ObjectType);
-        int setSize = qh.PortfolioSetSize;
-        int invalidateKeys = GetUIntValue(InvalidateKeys);
-        if (invalidateKeys <= 0 && numOfKeys < setSize)
-        {
-          FwkException("QueryTests.DoInvalidateUserObject() Number of keys should be multiple of 20");
-        }
-        else
-        {
-          numOfKeys = invalidateKeys;
-        }
-
-        int numSet = numOfKeys / setSize;
-
-        FwkInfo("QueryTests.DoInvalidateUserObject() Invalidating " + numOfKeys +
-          " keys, invalidateKeys=" + invalidateKeys + ", setSize=" + setSize + ", numSet=" + numSet);
-        if (m_istransaction)
-        {
-          txManager = CacheHelper<TKey, TVal>.DCache.CacheTransactionManager;
-          txManager.Begin();
-        }
-        qh.InvalidatePortfolioOrPositionData(region, setSize, numSet, objectType);
-        if (m_istransaction)
-           txManager.Commit();
-        
-        FwkInfo("QueryTests.DoInvalidateUserObject() Destroyed user objects.");
-      }
-      catch (Exception ex)
-      {
-        FwkException("QueryTests.DoInvalidateUserObject() caught Exception: {0}", ex);
-      }
-    }
-
-    public void DoPopulateUserObject()
-    {
-      FwkInfo("In QueryTest.PopulateUserObject().");
-      try
-      {
-        string name = GetStringValue("regionName");
-        IRegion<TKey, TVal> region = GetRegion(name);
-        //string label = CacheHelper<TKey, TVal>.RegionTag(region.Attributes);
-        ResetKey(DistinctKeys);
-        int numOfKeys = GetUIntValue(DistinctKeys); // number of keys should be multiple of 20
-        QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
-        int numSet = 0;
-        int setSize = 0;
-        // Loop over value sizes
-        ResetKey(ValueSizes);
-        int objSize;
-        string objectType = GetStringValue(ObjectType);
-        
-        while ((objSize = GetUIntValue(ValueSizes)) > 0)
-        { // value sizes loop
-          if (m_istransaction)
-          {
-            txManager = CacheHelper<TKey, TVal>.DCache.CacheTransactionManager;
-            txManager.Begin();
-          }
-          if (objectType == "Portfolio")
-          {
-            setSize = qh.PortfolioSetSize;
-            if (numOfKeys < setSize)
-            {
-              FwkException("QueryTests.PopulateUserObject: Number of keys" +
-                " should be multiple of 20");
-            }
-            numSet = numOfKeys / setSize;
-            qh.PopulatePortfolioData(region, setSize, numSet, objSize);
-          }
-          else if (objectType == "Position")
-          {
-            setSize = qh.PositionSetSize;
-            if (numOfKeys < setSize)
-            {
-              FwkException("QueryTests.PopulateUserObject: Number of keys" +
-                " should be multiple of 20");
-            }
-            numSet = numOfKeys / setSize;
-            qh.PopulatePositionData(region, setSize, numSet);
-          }
-          if (objectType == "PortfolioPdx")
-          {
-            setSize = qh.PortfolioSetSize;
-            if (numOfKeys < setSize)
-            {
-              FwkException("QueryTests.PopulateUserObject: Number of keys" +
-                " should be multiple of 20");
-            }
-            numSet = numOfKeys / setSize;
-            qh.PopulatePortfolioPdxData(region, setSize, numSet, objSize);
-          }
-          else if (objectType == "PositionPdx")
-          {
-            setSize = qh.PositionSetSize;
-            if (numOfKeys < setSize)
-            {
-              FwkException("QueryTests.PopulateUserObject: Number of keys" +
-                " should be multiple of 20");
-            }
-            numSet = numOfKeys / setSize;
-            qh.PopulatePositionPdxData(region, setSize, numSet);
-          }
-          if(m_istransaction)
-            txManager.Commit();
-          FwkInfo("QueryTests.PopulateUserObject: Done populating {0} objects",
-            objectType);
-
-          Thread.Sleep(1000); // Put a marker of inactivity in the stats
-        } // valueSizes loop
-      }
-      catch (Exception ex)
-      {
-        FwkException("QueryTests.PopulateUserObject: Caught Exception: {0}", ex);
-      }
-      Thread.Sleep(3000); // Put a marker of inactivity in the stats
-      FwkInfo("QueryTests.PopulateUserObject complete.");
-    }
-
-    public void DoGetObject()
-    {
-      FwkInfo("In QueryTests.GetObject.");
-      try
-      {
-        IRegion<TKey, TVal> region = GetRegion();
-        ResetKey(DistinctKeys);
-        int numOfKeys = GetUIntValue(DistinctKeys);
-
-        string objectType = GetStringValue(ObjectType);
-        QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
-        int setSize = qh.PortfolioSetSize;
-        if (numOfKeys < setSize)
-        {
-          setSize = numOfKeys;
-        }
-        int numSets = numOfKeys / setSize;
-
-        TVal valuepos;
-        TKey keypos;
-        for (int set = 1; set <= numSets; set++)
-        {
-          for (int current = 1; current <= setSize; current++)
-          {
-            string posname = null;
-            if (objectType == "Portfolio" || (objectType == "PortfolioPdx"))
-            {
-              posname = string.Format("port{0}-{1}", set, current);
-            }
-            else if (objectType == "Position" || (objectType == "PositionPdx"))
-            {
-              posname = string.Format("pos{0}-{1}", set, current);
-            }
-            
-            keypos = (TKey)(object)posname;
-            if (m_istransaction)
-            {
-              txManager = CacheHelper<TKey, TVal>.DCache.CacheTransactionManager;
-              txManager.Begin();
-            }
-            valuepos = region[keypos];
-            if (m_istransaction)
-              txManager.Commit();
-            if (valuepos == null)
-            {
-              FwkException("QueryTests.GetObject: Could not find key [{0}]" +
-                " in region.", keypos);
-            }
-          }
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("QueryTests.GetObject: Caught Exception: {0}", ex);
-      }
-      FwkInfo("QueryTests.GetObject complete.");
-    }
-
-    public void DoRunQuery()
-    {
-      FwkInfo("In QueryTests.RunQuery");
-      try
-      {
-        string queryType = GetStringValue(QueryResultType);
-        string query = GetStringValue(QueryString); // set the query string in xml
-        if (queryType == "resultSet")
-        {
-          FwkInfo("QueryTests.RunQuery: Calling VerifyResultSet");
-          if (!VerifyResultSet())
-          {
-            FwkException("QueryTests.RunQuery: failed in VerifyResultSet");
-          }
-        }
-        else if (queryType == "structSet")
-        {
-          FwkInfo("QueryTests.RunQuery: Calling VerifyStructSet");
-          if (!VerifyStructSet())
-          {
-            FwkException("QueryTests.RunQuery: failed in VerifyStructSet");
-          }
-        }
-        else if (query != null && query.Length > 0)
-        {
-          FwkInfo("QueryTests.RunQuery: Reading query from xml: {0}",
-            query);
-          if (!ReadQueryString(ref query))
-          {
-            FwkException("QueryTests.RunQuery: Failed in ReadQueryString");
-          }
-        }
-        else
-        {
-          FwkException("QueryTests.RunQuery: Query type: {0} is not supported",
-            queryType);
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("QueryTests.RunQuery: Caught Exception: {0}", ex);
-      }
-      FwkInfo("QueryTests.RunQuery complete.");
-    }
-
-    public void DoRunQueryWithPayloadAndEntries()
-    {
-      try
-      {
-        QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
-        int numSet = 0;
-        int setSize = 0;
-        //populating data
-        ResetKey(DistinctKeys);
-        int numOfKeys; // number of key should be multiple of 20
-        while ((numOfKeys = GetUIntValue(DistinctKeys)) > 0)
-        { // distinctKeys loop
-          ResetKey(ValueSizes);
-          int objSize;
-          while ((objSize = GetUIntValue(ValueSizes)) > 0)
-          { // valueSizes loop
-            FwkInfo("DoRunQueryWithPayloadAndEntries() Populating {0} " +
-              "entries with {1} payload size", numOfKeys, objSize);
-            ResetKey(RegionName);
-            IRegion<TKey, TVal> region;
-            while ((region = GetRegion()) != null)
-            {
-              string regionName = region.Name;
-              if ((regionName == "Portfolios") ||
-                (regionName == "Portfolios2") ||
-                (regionName == "Portfolios3"))
-              {
-                FwkInfo("DoRunQueryWithPayloadAndEntries() " +
-                  "Populating Portfolio object to region " + region.FullPath);
-                setSize = qh.PortfolioSetSize;
-                if (numOfKeys < setSize)
-                {
-                  FwkException("doRunQueryWithPayloadAndEntries : " +
-                    "Number of keys should be multiple of 20");
-                }
-                numSet = numOfKeys / setSize;
-                qh.PopulatePortfolioData(region, setSize, numSet, objSize);
-              }
-              else if ((regionName == "Positions") ||
-                (regionName == "/Portfolios/Positions"))
-              {
-                FwkInfo("DoRunQueryWithPayloadAndEntries() " +
-                  "Populating Position object to region " + region.FullPath);
-                setSize = qh.PositionSetSize;
-                if (numOfKeys < setSize)
-                {
-                  FwkException("DoRunQueryWithPayloadAndEntries : " +
-                    "Number of keys should be multiple of 20");
-                }
-                numSet = numOfKeys / setSize;
-                qh.PopulatePositionData(region, setSize, numSet);
-              }
-            }
-            FwkInfo("Populated User objects");
-            Thread.Sleep(10000);
-            // running queries
-            FwkInfo("DoRunQueryWithPayloadAndEntries: " +
-              "Calling VerifyResultSet ");
-            if (!VerifyResultSet(numOfKeys))
-            {
-              FwkException("DoRunQueryWithPayloadAndEntries: " +
-                "Failed in VerifyResultSet");
-            }
-            FwkInfo("DoRunQueryWithPayloadAndEntries: " +
-              "Calling VerifyStructSet");
-            if (!VerifyStructSet(numOfKeys))
-            {
-              FwkException("DoRunQueryWithPayloadAndEntries: " +
-                "Failed in VerifyStructSet");
-            }
-            Thread.Sleep(3000); // Put a marker of inactivity in the stats
-          } // valueSizes loop
-          Thread.Sleep(2000);
-        }// distinctKeys loop
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoRunQueryWithPayloadAndEntries() Caught Exception: {0}", ex);
-      }
-      Thread.Sleep(4000); // Put a marker of inactivity in the stats
-      FwkInfo("DoRunQueryWithPayloadAndEntries() complete.");
-    }
-
-    public void DoCloseCache()
-    {
-      FwkInfo("In QueryTests.CloseCache");
-
-      CacheHelper<TKey, TVal>.Close();
-
-      FwkInfo("QueryTests.CloseCache complete.");
-    }
-
-    public void DoPopulateRangePositions()
-    {
-      FwkInfo("In QueryTests.DoPopulateRangePositions");
-      try
-      {
-        IRegion<TKey, TVal> region = GetRegion();
-
-        int rangeStart = GetUIntValue("range-start");
-        int rangeEnd = GetUIntValue("range-end");
-
-        QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
-        if (m_istransaction)
-        {
-          txManager = CacheHelper<TKey, TVal>.DCache.CacheTransactionManager;
-          txManager.Begin();
-        }
-        qh.PopulateRangePositionData(region, rangeStart, rangeEnd);
-        if(m_istransaction)
-          txManager.Commit();
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoPopulateRangePositions() Caught Exception: {0}", ex);
-      }
-
-      FwkInfo("DoPopulateRangePositions() complete.");
-    }
-
-    public void DoGetAndComparePositionObjects()
-    {
-      FwkInfo("In QueryTests.DoGetAndComparePositionObjects");
-
-      try
-      {
-        IRegion<TKey, TVal> region = GetRegion();
-
-        int rangeStart = GetUIntValue("range-start");
-        int rangeEnd = GetUIntValue("range-end");
-
-        QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
-
-        for (int i = rangeStart; i <= rangeEnd; i++)
-        {
-          TVal cachedPos = qh.GetCachedPositionObject(region, i);
-          TVal generatedPos = qh.GetExactPositionObject(i);
-
-          if (!qh.CompareTwoPositionObjects(cachedPos, generatedPos))
-          {
-            FwkSevere("QueryTest:DoGetAndComparePositionObjects: objects not same for index " + i);
-          }
-        }
-
-        qh.PopulateRangePositionData(region, rangeStart, rangeEnd);
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoGetAndComparePositionObjects() Caught Exception: {0}", ex);
-      }
-
-      FwkInfo("DoGetAndComparePositionObjects() complete.");
-    }
-
-    public void DoUpdateRangePositions()
-    {
-      FwkInfo("In QueryTests.DoUpdateRangePositions");
-
-      try
-      {
-        int maxRange = GetUIntValue("range-max");
-        int secondsToRun = GetTimeValue("workTime");
-
-        DateTime nowTime = DateTime.Now;
-        DateTime endTime = DateTime.Now;
-        endTime = endTime.AddSeconds(secondsToRun);
-
-        IRegion<TKey, TVal> region = GetRegion();
-        QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
-
-        while (nowTime < endTime)
-        {
-          qh.PutExactPositionObject(region, Util.Rand(maxRange));
-          nowTime = DateTime.Now;
-        }        
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoUpdateRangePositions() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoUpdateRangePositions() complete.");
-    }
-
-    public void DoVerifyAllPositionObjects()
-    {
-      FwkInfo("In QueryTests.DoVerifyAllPositionObjects");
-
-      try
-      {
-        int maxRange = GetUIntValue("range-max");
-        IRegion<TKey, TVal> region = GetRegion();
-        QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
-
-        for (int i = 1; i <= maxRange; i++)
-        {
-          TVal pos1 = qh.GetCachedPositionObject(region, i);
-          TVal pos2 = qh.GetExactPositionObject(i);
-          if (!qh.CompareTwoPositionObjects(pos1, pos2))
-          {
-            FwkSevere("QueryTests.VerifyAllPositionObjects: objects not same for index " + i);
-          }
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoVerifyAllPositionObjects() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoVerifyAllPositionObjects() complete.");
-    }
-
-    #endregion
-
-  }
-}
diff --git a/tests/cli/NewFwkLib/ResumableTx/ResumableTx.cs b/tests/cli/NewFwkLib/ResumableTx/ResumableTx.cs
deleted file mode 100644
index 8ac30ca..0000000
--- a/tests/cli/NewFwkLib/ResumableTx/ResumableTx.cs
+++ /dev/null
@@ -1,1241 +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.
- */
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using System.Threading;
-
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.DUnitFramework;
-  using Apache.Geode.Client.Tests;
-  using Apache.Geode.Client;
-
-  public class EntryTxTask<TKey, TVal> : ClientTask
-  {
-    #region Private members
-
-    static protected int BEGIN_TX = 1001;
-    static protected int EXECUTE_TX_OPS = 1002;
-    static protected int EXECUTE_NONTX_OPS = 1003;
-    static protected int COMMIT_TX = 1004;
-    static protected int ROLLBACK_TX = 1005;
-
-
-    private IRegion<TKey, TVal> m_region;
-    private static int keyCount = 0;
-    private static int kCount = 0;
-    private int m_MaxKeys;
-    private static Dictionary<TransactionId, object> activeTxns;
-    private static Dictionary<IRegion<TKey, TVal>, Dictionary<TKey, TVal>> OpMap;
-    private object txlock = new object();
-    private List<TransactionId> keyList ;
-    private Int32 m_create;
-    private Int32 m_update;
-    private Int32 m_destroy;
-    //private Int32 m_invalidate;
-    private Int32 m_cnt;
-    //bool m_isDestroy;
-    bool m_finish;
-    bool m_beginTx;
-    bool m_commitTx;
-    private object CLASS_LOCK = new object();
-    private const string SerialExc = "isSerialExecution";
-    private const string ConcurrentExc = "isConcurrentExecution";
-    private const string WorkTime = "workTime";
-   
-    #endregion
-
-    private static String getClientIdString()
-    {
-      return "Cl_Id" + Util.ClientId + "_thr_" + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString();
-    }
-
-   public TxInfo begin(IRegion<TKey,TVal> region)
-    {
-      CacheTransactionManager txManager = null;
-      IRegion<TKey, TVal> reg = region;
-      TransactionId id = null;
-      TxInfo txInfo = new TxInfo();
-      txManager = CacheHelper<TKey, TVal>.DCache.CacheTransactionManager;
-      try
-      {
-        txManager.Begin();
-        try
-        {
-          kCount++;
-          TKey key = (TKey)(object)(kCount);
-          TVal value = GetValue();
-          reg[key] = value;
-          Util.Log("The Key is={0} and value={1}", key.ToString(),value.ToString());
-        }
-        catch (Exception e)
-        {
-          FwkTest<TKey, TVal>.CurrentTest.FwkException("Caught {0}", e);
-        }
-      }
-      catch (IllegalStateException e)
-      {
-        FwkTest<TKey, TVal>.CurrentTest.FwkException("Caught {0}", e);
-      }
-      try
-      {
-        id = txManager.Suspend();
-        Util.Log("Suspend() complete ");
-      }
-      catch (IllegalStateException e)
-      {
-        FwkTest<TKey, TVal>.CurrentTest.FwkException("Got {0}", e);
-      }
-      Util.Log("BEGIN_TX returning txId = {0}",id);
-      try
-      {
-       txInfo.setTxId(id);
-      }
-      catch (Exception e) 
-      {
-        FwkTest<TKey, TVal>.CurrentTest.FwkException("Got this {0}", e);
-      }
-     
-      return txInfo;
-    }
-
-    public bool commit(TxInfo txInfo)
-    {
-      TransactionId id = (TransactionId)(object)txInfo.getTxId();
-      bool commited = false;
-      CacheTransactionManager txManager = null;
-      txManager = CacheHelper<TKey, TVal>.DCache.CacheTransactionManager;
-      if (txManager.TryResume(id, TimeSpan.FromMilliseconds(30000)))
-      {
-        try
-        {
-          txManager.Commit();
-          commited = true;
-        }
-        catch (CommitConflictException ex)
-        {
-          //Expected exception with concurrent transactions.
-          Util.Log("Got expected exception {0}", ex);
-        }
-        catch (TransactionDataRebalancedException ex)
-        {
-          FwkTest<TKey, TVal>.CurrentTest.FwkException("Got {0}", ex);
-        }
-        catch (TransactionDataNodeHasDepartedException ex)
-        {
-          FwkTest<TKey, TVal>.CurrentTest.FwkException("Got {0}", ex);
-        }
-      }
-      else
-        Util.Log("TxId {0} is not suspended in this member with tryResume time limit, cannot commit.  Expected, continuing test.");
-      Util.Log("Commited returning {0}",commited);
-      return commited;
-     
-    }
-
-    public void rollback(TxInfo txInfo)
-    {
-      TransactionId id = (TransactionId)(object)txInfo.getTxId();
-      CacheTransactionManager txManager = null;
-      bool isRollBack = false;
-      txManager = CacheHelper<TKey, TVal>.DCache.CacheTransactionManager;
-      if (txManager.TryResume(id, TimeSpan.FromMilliseconds(30000)))
-      {
-         txManager.Rollback();
-         isRollBack = true;
-      }
-      else
-        Util.Log("TxId {0} is not suspended in this member with tryResume time limit, cannot rollback.  Expected with concurrent execution, continuing test.");
-      Util.Log("RollbackTx returning {0}",isRollBack);
-   
-    }
-
-    public void executeTxOps(TxInfo txInfo)
-    {
-      //This will do a resume+doOps+suspend
-      TransactionId id = (TransactionId)(object)txInfo.getTxId();
-      CacheTransactionManager txManager = null;
-      txManager = CacheHelper<TKey, TVal>.DCache.CacheTransactionManager;
-      bool executedOps = false;
-      int numOfOpsToDo = 5;
-      if (txManager.TryResume(id, TimeSpan.FromMilliseconds(30000)))
-      {
-        try
-        {
-          doEntryOps(numOfOpsToDo);
-          executedOps = true;
-        }
-        catch (TransactionDataNodeHasDepartedException ex)
-        {
-          FwkTest<TKey, TVal>.CurrentTest.FwkException("Caught {0}", ex);
-        }
-        catch (TransactionDataRebalancedException ex)
-        {
-          FwkTest<TKey, TVal>.CurrentTest.FwkException("Caught {0}", ex);
-        }
-        catch (Exception ex)
-        {
-          FwkTest<TKey, TVal>.CurrentTest.FwkException("Caught unexpected exception during doEntryOps task {0}", ex.Message);
-        }
-        finally
-        {
-          id = txManager.Suspend();
-          Util.Log("Suspend() complete txId is {0}", id);
-        }
-      }
-      Util.Log("EXECUTE_TX returned  {0}", executedOps);
-    }
-
-    public void doEntryOps(int numOfOpsToDo)
-    {
-      int numOpsCompleted = 0;
-      string opcode = null;
-      List<string> opList = new List<string>();
-      IRegion<TKey, TVal> region = m_region;
-      int size = 0;
-      int create = 0, update = 0, destroy = 0, invalidate = 0, localdestroy = 0, /*localinvalidate = 0,*/
-        get = 0/*, putall = 0*/;
-      try
-        {
-          size = region.Count;
-          opcode = FwkTest<TKey, TVal>.CurrentTest.GetStringValue("entryOps");
-          Util.Log("Op code is {0} and numOf opsCompleted is {1} and Regionsize is {2}", opcode, numOpsCompleted, size);
-          if (opcode == null) opcode = "no-opcode";
-          if (((size < 1) && (opcode != "create")) || (opcode == "create"))
-          {
-            opcode = "create";
-            addEntry(region);
-            Interlocked.Increment(ref m_create);
-            create++;
-          }
-          else if (opcode == "update")
-          {
-            updateEntry(region);
-            Interlocked.Increment(ref m_update);
-            update++;
-          }
-          else if (opcode == "destroy")
-          {
-            destroyEntry(region, false);
-            Interlocked.Increment(ref m_destroy);
-            destroy++;
-          }
-          else if (opcode == "localDestroy")
-          {
-            destroyEntry(region, true);
-            //Interlocked.Increment();
-            localdestroy++;
-          }
-          else if (opcode == "get")
-          {
-            getKey(region);
-            get++;
-          }
-          else if (opcode == "invalidate")
-          {
-            invalidateEntry(region,false);
-            invalidate++;
-          }
-          else
-          {
-            FwkTest<TKey, TVal>.CurrentTest.FwkException("CacheServer.doEntryOps() Invalid operation " +
-             "specified: {0}", opcode);
-          }
-          numOpsCompleted++;
-          opList.Add(opcode);
-          
-        }
-        catch (Exception ex)
-        {
-          FwkTest<TKey, TVal>.CurrentTest.FwkException("CacheServer.doEntryOps() Caught unexpected " +
-            "exception during entry '{0}' operation: {1}.", opcode, ex);
-        }
-        Util.Log("DoEntryOP: create = {0}, update = {1}, destroy = {2},get = {3} invalidate={4}, num of Ops ={5}",
-        m_create, m_update, m_destroy, get, invalidate, numOpsCompleted);
-    }
-    
-    protected TKey addEntry(IRegion<TKey, TVal> m_region)
-    {
-      TKey key = GetNewKey();
-      TVal value = GetValue();
-      //int beforeSize = 0;
-      bool isSerialExecution = false;
-      Dictionary<TKey, TVal> addMap = new Dictionary<TKey, TVal>();
-      try
-      {
-        m_region.Add(key, value);
-        addMap[key] = value;
-        OpMap[m_region] = addMap;
-        doEdgeClientValidation();
-      }
-      catch (EntryExistsException ex)
-      {
-        if (isSerialExecution)
-        {
-          // cannot get this exception; nobody else can have this key
-          throw new Exception(ex.StackTrace);
-        }
-        else
-        {
-          Util.Log("Caught {0} (expected with concurrent execution); continuing with test", ex);
-        }
-      }
-      return key;
-    }
-
-    protected void updateEntry(IRegion<TKey, TVal> r)
-    {
-      TKey key = GetExistingKey(true,r);
-      TVal value = GetValue();
-      Dictionary<TKey, TVal> updateMap = new Dictionary<TKey, TVal>();
-      r[key] = value;
-      updateMap[key] = value;
-      OpMap[m_region] = updateMap;
-      doEdgeClientValidation();
-    }
-
-    protected void invalidateEntry(IRegion<TKey, TVal> r, bool isLocalInvalidate)
-    {
-      TKey key = GetExistingKey(true,r);
-      bool containsKey = m_region.GetLocalView().ContainsKey(key);
-      bool containsValueForKey = m_region.GetLocalView().ContainsValueForKey(key);
-      Util.Log("containsKey for " + key + ": " + containsKey);
-      Util.Log("containsValueForKey for " + key + ": " + containsValueForKey);
-      try
-      {
-        if (isLocalInvalidate)
-        { // do a local invalidate
-          m_region.GetLocalView().Invalidate(key);
-        }
-        else
-        { // do a distributed invalidate
-          m_region.Invalidate(key);
-        }
-      }
-      catch (EntryNotFoundException e)
-      {
-         Util.Log("Caught {0} (expected); continuing with test", e);
-          return;
-        
-      }
-    }
-
-    protected void destroyEntry(IRegion<TKey, TVal> m_region, bool isLocalDestroy)
-    {
-      TKey key = GetExistingKey(true, m_region);
-      bool isSerialExecution = false;
-      try
-      {
-        if (isLocalDestroy)
-        { // do a local invalidate
-          m_region.GetLocalView().Remove(key);
-        }
-        else
-        { // do a distributed invalidate
-          m_region.Remove(key);
-        }
-      }
-      catch (EntryNotFoundException e)
-      {
-        if (isSerialExecution)
-          throw new Exception(e.StackTrace);
-        else
-        {
-          Util.Log("Caught {0} (expected with concurrent execution); continuing with test", e);
-          return;
-        }
-      }
-    }
-
-    protected void getKey(IRegion<TKey, TVal> aRegion)
-    {
-      TKey key = GetExistingKey(true,aRegion);
-      TVal anObj = default(TVal);
-      try
-      {
-        anObj = aRegion[key];
-      }
-      catch (Apache.Geode.Client.KeyNotFoundException)
-      {
-        if (!EqualityComparer<TVal>.Default.Equals(anObj, default(TVal)))
-        {
-          throw new Apache.Geode.Client.KeyNotFoundException();
-        }
-
-      }
-    }
-
-    protected TKey GetExistingKey(bool useServerKeys,IRegion<TKey,TVal> region)
-    {
-      TKey key = default(TKey);
-        if (useServerKeys)
-        {
-          int size = region.Count;
-          TKey[] keys = (TKey[])region.Keys;
-          key = keys[Util.Rand(0, size)];
-        }
-        else
-        {
-          int size = region.GetLocalView().Count;
-          TKey[] keys = (TKey[])region.GetLocalView().Keys;
-          key = keys[Util.Rand(0, size)];
-        }
-        return key;
-    }
-
-    protected TKey GetNewKey()
-    {
-      keyCount++;
-      FwkTest<TKey, TVal>.CurrentTest.ResetKey("distinctKeys");
-      int numKeys = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("distinctKeys");
-     // String keybuf = String.Format("Key-{0}-{1}-{2}", Util.PID, Util.ThreadID, keyCount);
-      TKey key = (TKey)(object)(keyCount);
-    //  keyCount++;
-      return key;
-    }
-
-    protected TVal GetValue()
-    {
-      TVal tmpValue = default(TVal);
-      FwkTest<TKey,TVal>.CurrentTest.ResetKey("valueSizes");
-      int size = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("valueSizes");
-      StringBuilder builder = new StringBuilder();
-      Random random = new Random();
-      char ch;
-      for (int j = 0; j < size; j++)
-      {
-        ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
-        builder.Append(ch);
-      }
-      if (typeof(TVal) == typeof(string))
-      {
-        tmpValue = (TVal)(object)builder.ToString();
-      }
-      else if (typeof(TVal) == typeof(byte[]))
-      {
-        tmpValue = (TVal)(object)(Encoding.ASCII.GetBytes(builder.ToString()));
-      }
-      return tmpValue;
-    }
-
-    public void doTransactions(IRegion<TKey,TVal> region)//,Dictionary<TransactionId, object> m_maps)
-    {
-      Util.Log("Inside ResumableTx:doTransactions()");
-      TransactionId txId = null;
-      //String txIdStr = "";
-      TxInfo txInfo = null;
-      IRegion<TKey, TVal> reg = region;
-      int action = 0;
-      FwkTest<TKey, TVal>.CurrentTest.ResetKey("minExecutions");
-      int minExecutions = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("minExecutions");
-      int numExecutions = 0;
-      Util.Log("activeTx map count is {0}",activeTxns.Count);
-      if (activeTxns.Count > 0)
-      {
-        try
-        {
-          keyList = new List<TransactionId>(activeTxns.Keys);
-        }
-        catch (Exception e) { FwkTest<TKey, TVal>.CurrentTest.FwkException("Inside keylist exception  {0}", e); }
-      }
-      FwkTest<TKey, TVal>.CurrentTest.ResetKey("numThreads");
-      string NUMTHREADS = "numThreads";
-      FwkTest<TKey, TVal>.CurrentTest.ResetKey(NUMTHREADS);
-      int numActiveThd = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue(NUMTHREADS);
-      int numActiveTx = activeTxns.Count;
-      try
-      {
-        Util.Log("numAvtiveTx is {0} and no of AvtiveThread = {1} and activemap count= {2}", numActiveTx, numActiveThd,activeTxns.Count);
-      }
-      catch (Exception e) { FwkTest<TKey, TVal>.CurrentTest.FwkException("Caught exception {0}",e); }
-      lock (CLASS_LOCK)
-      {
-      if (numActiveTx < numActiveThd)
-        {
-          action = BEGIN_TX;
-        }
-        else
-        {
-          for (int i = 0; i < keyList.Count; i++)
-          {
-            txId = (TransactionId)(object)keyList[i];
-            txInfo = (TxInfo)(object)activeTxns[txId];
-           
-            numExecutions = txInfo.getNumExecutions();
-            if (numExecutions > minExecutions)
-            {
-              bool isCommit = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue("TxBool");
-              if (isCommit)
-              {
-                action = COMMIT_TX;
-              }
-              else
-              {
-                action = ROLLBACK_TX;
-              }
-              break;
-            }
-          }
-          if (action == 0)
-          {
-            action = EXECUTE_TX_OPS;
-            Random random = new Random();
-            int rant = random.Next(0, keyList.Count - 1);
-            txId = (TransactionId)(object)keyList[rant];
-            txInfo = (TxInfo)(object)activeTxns[txId];
-          }
-        }
-      }
-       Boolean success = false;
-       try
-       {
-         lock (txlock)
-         {
-           switch (action)
-           {
-             case (1001):
-               txInfo = begin(reg);
-               txId = txInfo.getTxId();
-               activeTxns[txId] = (Object)txInfo;
-               break;
-             case (1002):
-               executeTxOps(txInfo);
-               txId = txInfo.getTxId();
-               txInfo = (TxInfo)(object)activeTxns[txId];
-               if(txInfo != null)
-               {  // could happen if tx committed, entry removed
-                 txInfo.incrementNumExecutions();
-                 activeTxns[txId] = (Object)txInfo;
-               }
-               break;
-             case (1004):
-               success = commit(txInfo);
-               break;
-             case (1005):
-               rollback(txInfo);
-               txId = txInfo.getTxId();
-               activeTxns.Remove(txId);
-               break;
-           }
-         }
-       }
-       catch (Exception e)
-       {
-         FwkTest<TKey, TVal>.CurrentTest.FwkException("The Test Threw this exception {0}", e);
-       }
-    }
-
-    public void doSerialExecution(IRegion<TKey, TVal> region)
-    {
-       Util.Log("Inside ResumableTX doSerialExecution()");
-       keyList = new List<TransactionId>(activeTxns.Keys);
-       TxInfo txInfo;
-       TransactionId txId = null;
-       for (int i = 0; i < keyList.Count; i++)
-       {
-         txInfo = (TxInfo)activeTxns[keyList[i]];
-         txId = (TransactionId)(object)txInfo.getTxId();
-         //bool executedOps;
-         try
-         {
-           executeTxOps(txInfo);
-         }
-         catch (Exception ex)
-         {
-           Util.Log("Caught {0} while executing tx ops", ex);
-           //executedOps = false;
-         }
-         txInfo.incrementNumExecutions();
-         activeTxns[txId] = (Object)txInfo;
-       }
-     }
-
-    public void doEdgeClientValidation()
-    {
-      //Validate the number of expected key/values and no. of destroyed entries.
-      Util.Log("Verifying expected keys/values");
-      Util.Log("Region count is {0} and local region count is {1}",m_region.Count,m_region.GetLocalView().Count);
-      TKey key;
-      TVal val;
-      bool success = true;
-      lock (OpMap)
-      {
-        foreach (KeyValuePair<IRegion<TKey, TVal>, Dictionary<TKey, TVal>> kvp in OpMap)
-        {
-          IRegion<TKey, TVal> myregion = (IRegion<TKey, TVal>)kvp.Key;
-          Dictionary<TKey, TVal> mapp = (Dictionary<TKey, TVal>)kvp.Value;
-          foreach (KeyValuePair<TKey, TVal> sp in mapp)
-          {
-            key = sp.Key;
-            val = sp.Value;
-            if (!m_region.ContainsKey(key))
-            {
-              FwkTest<TKey, TVal>.CurrentTest.FwkException("Expected containsKey() to be true for key {0} ,but it was false", key);
-              success = false;
-            }
-            if (val != null && !m_region.ContainsValueForKey(key))
-            {
-              FwkTest<TKey, TVal>.CurrentTest.FwkException("Expected containsValueForKey() to be true for key {0} ,but it was false", key);
-              success = false;
-            }
-          }
-        }
-      }
-      if (!success)
-        FwkTest<TKey, TVal>.CurrentTest.FwkException("edge client validation failed");
-      else
-        Util.Log("Done executing doEdgeClientValidation - validation successful");
-        
-    }
-
-    public void finishAllActiveTx(Dictionary<TransactionId,object> activeTX,Boolean isCommit)
-    {
-      lock (CLASS_LOCK)
-      {
-        Util.Log("In Finish active map count is {0}",activeTX.Count);
-        keyList = new List<TransactionId>(activeTX.Keys);
-        bool txCompleted = false;
-        for (int i = 0; i < keyList.Count; i++)
-        {
-          TransactionId txId = (TransactionId)(object)keyList[i];
-          TxInfo txInfo = (TxInfo)(object)activeTX[txId];
-          try
-          {
-            txCompleted = commit(txInfo);
-            Util.Log("Commit got {0}",txCompleted);
-          }
-          catch (Exception e)
-          {
-            FwkTest<TKey, TVal>.CurrentTest.FwkException("Got this exception {0}", e);
-          }
-          finally 
-          { 
-            activeTX.Remove(txId);
-          }
-          Util.Log("After commit/update the Active Map is {0}", activeTX.Count);
-        }
-      }
-      
-    }
-
-    public EntryTxTask(IRegion<TKey, TVal> region, int keyCnt, Dictionary<TransactionId, object> maps,Dictionary<IRegion<TKey,TVal>,Dictionary<TKey,TVal>>omaps, Boolean finish,Boolean isBeginTx,Boolean isCommitTx)
-      : base()
-    {
-      m_region = region;
-      m_MaxKeys = keyCnt;
-      activeTxns = maps;
-      OpMap = omaps;
-      m_create = 0;
-      m_update = 0;
-      m_destroy = 0;
-      //m_invalidate = 0;
-      m_cnt = 0;
-      //m_isDestroy = true;
-      m_finish = finish;
-      m_beginTx = isBeginTx;
-      m_commitTx = isCommitTx;
-    }
-    public override void DoTask(int iters, object data)
-    {
-      Int32 localcnt = m_cnt;
-      Interlocked.Increment(ref m_cnt);
-      int offset = Util.Rand(m_MaxKeys);
-      int count = offset;
-      //TKey key = default(TKey);
-      //TVal value = default(TVal);
-      FwkTest<TKey, TVal>.CurrentTest.ResetKey(SerialExc);
-      bool isSerialExecution = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue(SerialExc);
-   
-      FwkTest<TKey, TVal>.CurrentTest.ResetKey(ConcurrentExc);
-      bool isConcExecution = FwkTest<TKey, TVal>.CurrentTest.GetBoolValue(ConcurrentExc);
-      int Thrd = FwkTest<TKey, TVal>.CurrentTest.GetUIntValue("numThreads");
-      Util.Log("EntryTask::DoTask: starting {0} iterations. and isSerialExecution is {1}", iters,isSerialExecution);
-      while (Running && (iters-- != 0))
-      {
-        if (isConcExecution && !m_finish)
-        {
-          doTransactions(m_region);
-        }
-        if (isSerialExecution && !m_finish)
-        {
-          lock (CLASS_LOCK)
-          {            
-           doSerialExecution(m_region);
-          }
-        }
-        if (m_finish && !m_commitTx)
-        {          
-          finishAllActiveTx(activeTxns,false);
-        }
-        if (m_beginTx)
-        {
-          lock (txlock)
-          {
-            TxInfo txInfo;
-            TransactionId txId = null;
-            txInfo = begin(m_region);
-            txId = (TransactionId)(object)txInfo.getTxId();
-            activeTxns[txId] = (Object)txInfo;
-          }
-        }
-
-        if (m_commitTx && m_finish)
-        {
-          finishAllActiveTx(activeTxns, m_commitTx);
-        }
-      }
-      Interlocked.Add(ref m_iters, count - offset);
-    }
-  }
-
-  public class ResumableTx<TKey,TVal> : FwkTest<TKey,TVal>
-  {
-    // Tx actions (for concurrent resumable transactions with function execution)
-    static protected int BEGIN_TX          = 1001;
-    static protected int EXECUTE_TX_OPS    = 1002;
-    static protected int EXECUTE_NONTX_OPS = 1003;
-    static protected int COMMIT            = 1004;
-    static protected int ROLLBACK          = 1005;
-    #region Private constants and statics
-
-    static protected int SUSPEND = 2;
-    static protected int RESUME = 3;
- 
-    private static Dictionary<string, Dictionary<TKey, TVal>> BeforeTxMap = new Dictionary<string, Dictionary<TKey, TVal>>();
-    private static Dictionary<string, Dictionary<TKey, TVal>> AfterTxMap = new Dictionary<string, Dictionary<TKey, TVal>>();
-    protected static Dictionary<TransactionId, object> activeTxns = null;
-    protected static Dictionary<IRegion<TKey,TVal>,Dictionary<TKey, TVal>> OpMap = null;
-    //private List<TransactionId> keyList;
-    //private static int globalTxId = 0;
-    //private static int ExecutionNo = 0;
-    //private static string RRName = null;
-       
-    private object CLASS_LOCK = new object();
-    
-    #endregion
-
-    private const string RegionName = "regionName";
-    private const string ValueSizes = "valueSizes";
-    private const string OpsSecond = "opsSecond";
-    private const string EntryCount = "entryCount";
-    private const string WorkTime = "workTime";
-    private const string EntryOps = "entryOps";
-    private const string LargeSetQuery = "largeSetQuery";
-    private const string UnsupportedPRQuery = "unsupportedPRQuery";
-    private const string ObjectType = "objectType";
-    protected const string NumThreads = "numThreads";
-    protected const string TimedInterval = "timedInterval";
-    protected const string DistinctKeys = "distinctKeys";
-    protected const string BEGINTX = "isBeginTX";
-    protected const string COMMITTX = "isCommitTX";
-
-    public class SilenceListener<TKey1, TVal1> : CacheListenerAdapter<TKey1,TVal1>
-    {
-      public override void AfterCreate(EntryEvent<TKey1, TVal1> ev)
-      {
-        FwkTest<TKey, TVal>.CurrentTest.FwkInfo("SilenceListener: AfterCreate key");
-        FwkTest<TKey, TVal>.CurrentTest.FwkInfo("SilenceListener: AfterCreate key = {0} value = {1}", ev.Key, ev.NewValue);
-      }
-      public override void AfterUpdate(EntryEvent<TKey1, TVal1> ev)
-      {
-        FwkTest<TKey, TVal>.CurrentTest.FwkInfo("SilenceListener: AfterUpdate");
-        FwkTest<TKey, TVal>.CurrentTest.FwkInfo("SilenceListener: AfterUpdate key = {0} value = {1}", ev.Key, ev.NewValue);
-      }
-      public override void AfterDestroy(EntryEvent<TKey1, TVal1> ev)
-      {
-        FwkTest<TKey, TVal>.CurrentTest.FwkInfo("SilenceListener: AfterDestroy");
-      }
-      public override void AfterInvalidate(EntryEvent<TKey1, TVal1> ev)
-      {
-        FwkTest<TKey, TVal>.CurrentTest.FwkInfo("SilenceListener: AfterInvalidate");
-      }
-    }
-
-    #region Private utility methods
-
-    private IRegion<TKey, TVal> GetRegion()
-    {
-      return GetRegion(null);
-    }
-
-    protected IRegion<TKey, TVal> GetRegion(string regionName)
-    {
-      IRegion<TKey, TVal> region;
-      if (regionName == null)
-      {
-        regionName = GetStringValue("regionName");
-      }
-      if (regionName == null)
-      {
-        region = (IRegion<TKey, TVal>)GetRootRegion();
-        if (region == null)
-        {
-          IRegion<TKey, TVal>[] rootRegions = CacheHelper<TKey, TVal>.DCache.RootRegions<TKey, TVal>();
-          if (rootRegions != null && rootRegions.Length > 0)
-          {
-            region = rootRegions[Util.Rand(rootRegions.Length)];
-          }
-        }
-      }
-      else
-      {
-        region = CacheHelper<TKey, TVal>.GetRegion(regionName);
-      }
-      return region;
-    }
-    #endregion
-
-    #region Public Methods
-
-    public static ICacheListener<TKey, TVal> CreateSilenceListener()
-    {
-      return new SilenceListener<TKey, TVal>();
-    }
-
-    public virtual void DoCreatePool()
-    {
-      FwkInfo("In DoCreatePool()");
-      try
-      {
-        CreatePool();
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoCreatePool() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoCreatePool() complete.");
-    }
-
-
-    public virtual void DoCreateRegion()
-    {
-      FwkInfo("ResumableTx:DoCreateRegion()");
-      try
-      {
-        IRegion<TKey, TVal> region = CreateRootRegion();
-        ResetKey("useTransactions");
-        if (region == null)
-        {
-          FwkException("ResumableTx:DoCreateRegion()  could not create region.");
-        }
-        FwkInfo("ResumableTx:DoCreateRegion()  Created region '{0}'", region.Name);
-      }
-      catch (Exception ex)
-      {
-        FwkException("ResumableTx:DoCreateRegion() Caught Exception: {0}", ex);
-      }
-      FwkInfo("ResumableTx:DoCreateRegion() complete.");
-    }
-
-    public void DoCloseCache()
-    {
-      FwkInfo("DoCloseCache()  Closing cache and disconnecting from" +
-        " distributed system.");
-      CacheHelper<TKey, TVal>.Close();
-    }
-
-    public void DoRegisterAllKeys()
-    {
-      FwkInfo("In DoRegisterAllKeys()");
-      try
-      {
-        IRegion<TKey, TVal> region = GetRegion();
-        FwkInfo("DoRegisterAllKeys() region name is {0}", region.Name);
-        bool isDurable = GetBoolValue("isDurableReg");
-        ResetKey("getInitialValues");
-        bool isGetInitialValues = GetBoolValue("getInitialValues");
-        bool checkReceiveVal = GetBoolValue("checkReceiveVal");
-        bool isReceiveValues = true;
-        if (checkReceiveVal)
-        {
-          ResetKey("receiveValue");
-          isReceiveValues = GetBoolValue("receiveValue");
-        }
-        region.GetSubscriptionService().RegisterAllKeys(isDurable, isGetInitialValues, isReceiveValues);
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoRegisterAllKeys() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoRegisterAllKeys() complete.");
-    }
-
-    public void DoSerialTxWithOps()
-    {
-      FwkInfo("Inside DoSerialTxWithOps ActiveMap count is {0}", activeTxns.Count);
-      IRegion<TKey, TVal> region = GetRegion();
-      int entryCount = GetUIntValue(EntryCount);
-      entryCount = (entryCount < 1) ? 10000 : entryCount;
-      OpMap = new Dictionary<IRegion<TKey, TVal>, Dictionary<TKey, TVal>>();
-
-      int timedInterval = GetTimeValue("timedInterval") * 1000;
-      int maxTime = 10 * timedInterval;
-      // Loop over key set sizes
-      ResetKey("distinctKeys");
-      int numKeys = GetUIntValue("distinctKeys");
-      
-      ResetKey(NumThreads);
-      int numThreads;
-      while ((numThreads = GetUIntValue(NumThreads)) > 0)
-      {
-        EntryTxTask<TKey, TVal> entrytask = new EntryTxTask<TKey, TVal>(region, numKeys / numThreads, activeTxns, OpMap,false,false,false);
-        FwkInfo("Running timed task ");
-        try
-        {
-          RunTask(entrytask, numThreads, -1, timedInterval, maxTime, null);
-        }
-        catch (ClientTimeoutException)
-        {
-          FwkException("In DoSerialTxWithOps()  Timed run timed out.");
-        }
-        FwkInfo("Completed timed task ");
-        Thread.Sleep(3000);
-        //entrytask.dumpToBB();
-      }
-    }
-
-    public void DoConcTxWithOps()
-    {
-      FwkInfo("Inside ResumableTx:DoConcTxWithOps()");
-      IRegion<TKey, TVal> region = GetRegion();
-      activeTxns = new Dictionary<TransactionId, object>();
-      OpMap = new Dictionary<IRegion<TKey, TVal>, Dictionary<TKey, TVal>>();
-      int entryCount = GetUIntValue(EntryCount);
-      entryCount = (entryCount < 1) ? 10000 : entryCount;
-
-      int secondsToRun = GetTimeValue(WorkTime);
-      secondsToRun = (secondsToRun < 1) ? 10 : secondsToRun;
-
-      DateTime now = DateTime.Now;
-      DateTime end = now.AddSeconds(secondsToRun);
-
-      int timedInterval = GetTimeValue(TimedInterval) * 1000;
-      int maxTime = 10 * timedInterval; 
-      // Loop over key set sizes
-      ResetKey(DistinctKeys);
-      int numKeys = GetUIntValue(DistinctKeys);
-
-      ResetKey(NumThreads);
-      int numThreads;
-      while ((numThreads = GetUIntValue(NumThreads)) > 0)
-      {
-        EntryTxTask<TKey, TVal> entrytask = new EntryTxTask<TKey, TVal>(region, numKeys / numThreads, activeTxns,OpMap,false,false,false);
-        FwkInfo("Running timed task ");
-        try
-        {
-          RunTask(entrytask, numThreads, -1, timedInterval, maxTime, null);
-        }
-        catch (ClientTimeoutException)
-        {
-          FwkException("In DoConcTxWithOps()  Timed run timed out.");
-        }
-        Thread.Sleep(3000);
-        //entrytask.dumpToBB();
-      }
-      FwkInfo("Completed timed task ");
-    }
-
-    public void DoBeginTx()
-    {
-      IRegion<TKey, TVal> region = GetRegion();
-      activeTxns = new Dictionary<TransactionId, object>();
-      int timedInterval = GetTimeValue(TimedInterval) * 1000;
-      int maxTime = 10 * timedInterval;
-      ResetKey(DistinctKeys);
-
-      ResetKey(BEGINTX);
-      bool isBeginTx = GetBoolValue(BEGINTX);
-     
-      int numKeys = GetUIntValue(DistinctKeys);
-       ResetKey(NumThreads);
-      int numThreads;
-      while ((numThreads = GetUIntValue(NumThreads)) > 0)
-      {
-        EntryTxTask<TKey, TVal> entrytask = new EntryTxTask<TKey, TVal>(region, numKeys / numThreads, activeTxns,OpMap, false, isBeginTx, false);
-        FwkInfo("Running timed task ");
-        try
-        {
-          RunTask(entrytask, numThreads, -1, timedInterval, maxTime, null);
-        }
-        catch (ClientTimeoutException)
-        {
-          FwkException("In DoBeginTx()  Timed run timed out.");
-        }
-        Thread.Sleep(3000);
-        //entrytask.dumpToBB();
-      }
-
-    }
-
-    public void DoFinishAllActiveTx()
-    {
-      FwkInfo("Inside DoFinishActiveTx ActiveMap count is {0}",activeTxns.Count);
-      Dictionary<TKey, TVal> tempmap = new Dictionary<TKey, TVal>();
-      IRegion<TKey, TVal> region = GetRegion();
-      int timedInterval = GetTimeValue(TimedInterval) * 1000;
-      int maxTime = 10 * timedInterval;
-      // Loop over key set sizes
-      ResetKey(DistinctKeys);
-      int numKeys = GetUIntValue(DistinctKeys);
-
-      ResetKey(COMMITTX);
-      bool isCommitTx = GetBoolValue(COMMITTX);
-      //bool Finish=true;
-      ResetKey(NumThreads);
-      int numThreads;
-      while ((numThreads = GetUIntValue(NumThreads)) > 0)
-      {
-        EntryTxTask<TKey, TVal> entrytask = new EntryTxTask<TKey, TVal>(region, numKeys / numThreads, activeTxns,OpMap, true,false,isCommitTx);
-        FwkInfo("Running timed task ");
-        try
-        {
-          RunTask(entrytask, numThreads, -1, timedInterval, maxTime, null);
-        }
-        catch (ClientTimeoutException)
-        {
-          FwkException("In DoFinishAllActiveTx()  Timed run timed out.");
-        }
-        Thread.Sleep(3000);
-        //entrytask.dumpToBB();
-      }
-
-    }
-
-    public void DoPopulateRegion() 
-    {
-      CacheTransactionManager txManager = CacheHelper<TKey, TVal>.DCache.CacheTransactionManager; 
-      //TransactionId txId = CacheHelper<TKey, TVal>.DCache.CacheTransactionManager; 
-      IRegion<TKey, TVal> reg = GetRegion();
-      for (int i = 0; i < 5; i++)
-      {
-        TKey key = (TKey)(object)(i);
-        TVal value = (TVal)(object)"Value_";
-        txManager.Begin();
-        reg[key] = value;
-        txManager.Commit();
-        Util.Log("The Key is={0} and value={1}", key.ToString(), value.ToString());
-      }
-    }
-
-    public void DoGet()
-    {
-      IRegion<TKey, TVal> reg = GetRegion();
-      for (int i = 0; i < 5; i++)
-      {
-        TKey key = (TKey)(object)(i);
-        try
-        {
-          TVal val = reg[key];
-          Util.Log("The Key is={0} and value={1}", key.ToString(), val.ToString());
-        }
-        catch (Exception e) { FwkException("SP:Caught {0}",e); }
-      }
-    }
-
-    public void DoBasicTX()
-    {
-      FwkInfo("Inside ResumableTx:DoBasicTX()");
-      IRegion<TKey, TVal> region = GetRegion();
-      string opcode = null;
-      int action = 0;
-      int minNoEx = GetUIntValue("minExecutions");
-
-      if (region == null)
-      {
-        FwkSevere("ResumableTx:DoBasicTX(): No region to perform operations on.");
-      }
-      CacheTransactionManager txManager = null;
-      TransactionId txId = null;
-
-      int numOfEx = 0;
-      try
-      {
-        txManager = CacheHelper<TKey, TVal>.DCache.CacheTransactionManager;
-        if (numOfEx == 0)
-        {
-          FwkInfo("Begin.() tx numOfEx={0} and minNoEx={1}", numOfEx, minNoEx);
-          txManager.Begin();
-          action = BEGIN_TX;
-          doValidateTxOps(txId, action);
-        }
-        while (!(numOfEx > minNoEx))
-        {
-          try
-          {
-            FwkInfo("numOfEx={0} and minNoEx={1}", numOfEx, minNoEx);
-            txId = txManager.Suspend();
-            action = SUSPEND;
-            doValidateTxOps(txId, action);
-
-            txManager.Resume(txId);
-            int numKeys = 100;
-            Dictionary<TKey, TVal> keyValMap = new Dictionary<TKey, TVal>();
-            TKey key;
-            TVal value;
-            for (int i = 0; i < numKeys; i++)
-            {
-              string keyName = String.Format("key_{0}", i);
-              key = (TKey)(object)keyName.ToString();
-              value = (TVal)(object)"Value_";
-              region[key] = value;
-              keyValMap[key] = value;
-              AfterTxMap["put"] = keyValMap;
-            }
-            action = RESUME;
-            FwkInfo("keyValMap count={0} and region count is {1}",keyValMap.Count,region.Keys.Count);
-            doValidateTxOps(txId, action);
-          }
-          catch (IllegalStateException ex)
-          {
-            FwkException("Got {0}", ex.Message);
-          }
-          catch (CommitConflictException ex)
-          {
-            FwkException("Got {0}", ex.Message);
-          }
-          numOfEx++;
-        }
-        if (numOfEx > minNoEx)
-        {
-          try
-          {
-            txManager.Commit();
-          }
-          catch (CommitConflictException)
-          {
-            FwkInfo("Got Expected exception as there was a write conflict");
-          }
-          action = COMMIT;
-          doValidateTxOps(txId, action);
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("ResumableTx.DoEntryOpsWithTX() Caught unexpected " +
-         "exception during entry '{0}' operation: {1}.", opcode, ex);
-      }
-    }
-
-    public void doValidateTxOps(TransactionId txId, int txState)
-    {
-      FwkInfo("Inside Resumabletx:DoValidateTxOps");
-      FwkInfo("Transactional Id is {0} and transaction state is={1}",txId,txState);
-      //int cnt =0;
-      //TKey key;
-      int txnState = txState;
-      TransactionId txnId = txId;
-      ResetKey("entryCount");
-      int EntryCount=GetUIntValue("entryCount");
-      CacheTransactionManager txManager = CacheHelper<TKey, TVal>.DCache.CacheTransactionManager;
-      try 
-      {
-        switch (txnState)
-        {
-          case 1001:
-            FwkInfo("...txnState is Begin ...");
-            checkContainsKey(txnState);
-            break;
-          case 2:
-            FwkInfo("...txnState is Suspend...");
-            if (!txManager.IsSuspended(txId) && !txManager.Exists(txId))
-            {
-              FwkException("After Suspend(),the Transaction should have been Suspended and should still exist");
-            }
-            checkContainsKey(txnState);
-            break;
-          case 3:
-            FwkInfo("...txnState is Resume...");
-            if (txManager.IsSuspended(txnId))
-            {
-              FwkException("After Resume(),the Transaction should NOT have been Suspended");
-            }
-            if (!txManager.Exists(txnId))
-            {
-              FwkException("After Resume(),the Transaction should still exist");
-            }
-            checkContainsKey(txnState);
-            break;
-          case 1004:
-            FwkInfo("...txnState is Commit...");
-            if (txManager.IsSuspended(txnId))
-            {
-              FwkException("After Commit(),the Transaction should NOT have been Suspended");
-            }
-            if (txManager.Exists(txnId))
-            {
-              FwkException("After Commit(),the Transaction should Not exist");
-            }
-            if (txManager.TryResume(txnId))
-            {
-              FwkException("After Commit(),the Transaction should Not be resumed");
-            }
-            checkContainsKey(txnState);
-            FwkInfo("Commit BeforeTxMap.Count={0} ", BeforeTxMap.Count);
-            break;
-        }
-
-      }
-      catch(Exception ex) 
-      {
-        FwkException("doValidateTxOps caught exception {0}",ex.Message);
-      }
-    }
-
-    public void checkContainsKey(int txnState)
-    {
-      IRegion<TKey, TVal> region = GetRegion();
-      Dictionary<TKey, TVal> BfTxOpMap = new Dictionary<TKey, TVal>();
-      Dictionary<TKey, TVal> AfTxOpMap = new Dictionary<TKey, TVal>();
-      try
-      {
-        if (txnState == 3)
-        {
-          BfTxOpMap = BeforeTxMap["put"];
-          AfTxOpMap = AfterTxMap["put"];
-        }
-        else
-          BfTxOpMap = BeforeTxMap["put"];
-        
-      }
-      catch (Exception e) 
-      {
-        FwkException("Throwing this exception {0} BMap cpunt={1} AfMap Count={2}", e.Message, BfTxOpMap.Count, AfTxOpMap.Count); 
-      }
-      FwkInfo("BfTxOpmap count is {0} and AfterTxMap is {1}", BfTxOpMap.Count, AfTxOpMap.Count);
-      foreach (KeyValuePair<TKey, TVal> bkp in BfTxOpMap)
-      {
-        FwkInfo("Inside BfTxOpMap");
-        TKey BfTxKey = bkp.Key;
-        if (!region.ContainsKey(BfTxKey))
-          FwkException("getKey: expected key {0} is not present in the region key set", bkp.Key.ToString());
-      }
-      foreach (KeyValuePair<TKey, TVal> akp in AfTxOpMap)
-      {
-        FwkInfo("Inside AfTxOpMap");
-        TKey AfTxKey = akp.Key;
-        if (!region.ContainsKey(AfTxKey))
-          FwkException("getKey: expected key {0} is not present in the region key set", akp.Key.ToString());
-      }
-    }
-
-   #endregion
-  }
-}
-
diff --git a/tests/cli/NewFwkLib/ResumableTx/TxInfo.cs b/tests/cli/NewFwkLib/ResumableTx/TxInfo.cs
deleted file mode 100644
index 97218b4..0000000
--- a/tests/cli/NewFwkLib/ResumableTx/TxInfo.cs
+++ /dev/null
@@ -1,168 +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.

- */

-

-using System;

-using System.Collections;

-using System.Collections.Generic;

-using System.Text;

-using System.Threading;

-

-namespace Apache.Geode.Client.FwkLib  

-{

-  using Apache.Geode.DUnitFramework;

-  using Apache.Geode.Client.Tests;

-  using Apache.Geode.Client;

-  

-

-//[Serializable]

-//  public class TxInfo<Tkey,TVal>

-//  {

-//    TransactionId txId;

-//    int numExecutions;

-//    String regionName;

-//    Object key;

-//    //ModRoutingObject routingObject;

-

-//    public TxInfo()

-//    {

-//      this.numExecutions = 0;

-//    }

-

-//    public String getTxId()

-//    {

-//      return this.txId;

-//    }

-

-//    public int getNumExecutions()

-//    {

-//      return this.numExecutions;

-//    }

-

-//    public String getRegionName()

-//    {

-//      return this.regionName;

-//    }

-

-//    public Object getKey()

-//    {

-//      return this.key;

-//    }

-

-//    //public ModRoutingObject getRoutingObject()

-//    //{

-//    //  return this.routingObject;

-//    //}

-

-//    public void setTxId(String txId)

-//    {

-//      this.txId = txId;

-//    }

-

-//    public void setNumExecutions(int executions)

-//    {

-//      this.numExecutions = executions;

-//    }

-

-//    public void incrementNumExecutions()

-//    {

-//      //this.numExecutions = numExecutions++;

-//      setNumExecutions(this.numExecutions++);

-//      Util.Log("Inside TXInfo numExecutionis {0}", this.numExecutions++);

-

-//    }

-

-//    public void setRegionName(String regionName)

-//    {

-//      this.regionName = regionName;

-//    }

-

-//    public void setKey(Object aKey)

-//    {

-//      this.key = aKey;

-//    }

-

-//    //public void setRoutingObject(ModRoutingObject aRoutingObject)

-//    //{

-//    //  this.routingObject = aRoutingObject;

-//    //}

-

-//    public String toString()

-//    {

-//      string aStr = "";

-//      //StringBuffer aStr = new StringBuffer();

-//      //aStr.append("TxInfo {" + txId + ", numExecutions: " + numExecutions + ", FilterInfo {" + regionName + ", " + key + ", " + routingObject + "}");

-//      return aStr;

-//    }

-//  }

-  [Serializable]

-  public class TxInfo //: IPdxSerializable

-  {

-    TransactionId txId;

-   // Object txId;

-    int numExecutions;

-    //String regionName;

-     

-    public TxInfo()

-     {

-       this.numExecutions = 0;

-     }

-

-    public TransactionId getTxId()

-    {

-      return this.txId;

-    }

-

-    //public Object getTxId()

-    //{

-    //  return this.txId;

-    //}

-     public int getNumExecutions()

-     {

-       return this.numExecutions;

-     }

-

-     //public String getRegionName()

-     //{

-     //  return this.regionName;

-     //}

-

-    public void setTxId(TransactionId txId)

-    {

-      this.txId = txId;

-    }

-

-    //public void setTxId(Object txId)

-    //{

-    //  this.txId = txId;

-    //}

-

-     public void setNumExecutions(int executions)

-     {

-       this.numExecutions = executions;

-     }

-

-     public void incrementNumExecutions()

-     {

-       //this.numExecutions = numExecutions++;

-       setNumExecutions(this.numExecutions++);

-       Util.Log("Inside TXInfo numExecutionis {0}", this.numExecutions++);

-

-     }

-  

-  }

-}

-

diff --git a/tests/cli/NewFwkLib/SecurityTest/Security.cs b/tests/cli/NewFwkLib/SecurityTest/Security.cs
deleted file mode 100644
index fcafd5a..0000000
--- a/tests/cli/NewFwkLib/SecurityTest/Security.cs
+++ /dev/null
@@ -1,518 +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.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Threading;
-
-namespace Apache.Geode.Client.FwkLib
-{
-  using Apache.Geode.Client.Tests;
-  using Apache.Geode.DUnitFramework;
-
-  public class Security : PerfTests
-  {
-
-    #region Protected constants
-
-    protected const string EntryCount = "entryCount";
-    protected const string WorkTime = "workTime";
-    protected const string ObjectType = "objectType";
-    protected const string EntryOps = "entryOps";
-    protected const string LargeSetQuery = "largeSetQuery";
-    protected const string UnsupportedPRQuery = "unsupportedPRQuery";
-
-    #endregion
-
-    #region Utility methods
-
-    private CacheableKey GetKey(int max)
-    {
-      ResetKey(ObjectType);
-      string objectType = GetStringValue(ObjectType);
-      QueryHelper qh = QueryHelper.GetHelper();
-      int numSet = 0;
-      int setSize = 0;
-      if (objectType != null && objectType == "Portfolio")
-      {
-        setSize = qh.PortfolioSetSize;
-        numSet = max / setSize;
-        return new CacheableString(String.Format("port{0}-{1}",
-          Util.Rand(numSet), Util.Rand(setSize)));
-      }
-      else if (objectType != null && objectType == "Position")
-      {
-        setSize = qh.PositionSetSize;
-        numSet = max / setSize;
-        return new CacheableString(String.Format("pos{0}-{1}",
-          Util.Rand(numSet), Util.Rand(setSize)));
-      }
-      else
-      {
-        return m_keysA[Util.Rand(m_maxKeys)];
-      }
-    }
-
-    private ISerializable GetUserObject(string objType)
-    {
-      ISerializable usrObj = null;
-      ResetKey(EntryCount);
-      int numOfKeys = GetUIntValue(EntryCount);
-      ResetKey(ValueSizes);
-      int objSize = GetUIntValue(ValueSizes);
-      QueryHelper qh = QueryHelper.GetHelper();
-      int numSet = 0;
-      int setSize = 0;
-      if (objType != null && objType == "Portfolio")
-      {
-        setSize = qh.PortfolioSetSize;
-        numSet = numOfKeys / setSize;
-        usrObj = new Portfolio(Util.Rand(setSize), objSize);
-      }
-      else if (objType != null && objType == "Position")
-      {
-        setSize = qh.PositionSetSize;
-        numSet = numOfKeys / setSize;
-        int numSecIds = Portfolio.SecIds.Length;
-        usrObj = new Position(Portfolio.SecIds[setSize % numSecIds], setSize * 100);
-      }
-      return usrObj;
-    }
-
-    private bool AllowQuery(QueryCategory category, bool haveLargeResultset,
-      bool islargeSetQuery, bool isUnsupportedPRQuery)
-    {
-      if (category == QueryCategory.Unsupported)
-      {
-        return false;
-      }
-      else if (haveLargeResultset != islargeSetQuery)
-      {
-        return false;
-      }
-      else if (isUnsupportedPRQuery &&
-               ((category == QueryCategory.MultiRegion) ||
-                (category == QueryCategory.NestedQueries)))
-      {
-        return false;
-      }
-      else
-      {
-        return true;
-      }
-    }
-
-    private void RunQuery(ref int queryCnt)
-    {
-      FwkInfo("In Security.RunQuery");
-
-      try
-      {
-        ResetKey(EntryCount);
-        int numOfKeys = GetUIntValue(EntryCount);
-        QueryHelper qh = QueryHelper.GetHelper();
-        int setSize = qh.PortfolioSetSize;
-        if (numOfKeys < setSize)
-        {
-          setSize = numOfKeys;
-        }
-        int index = Util.Rand(QueryStrings.RSsize);
-        DateTime startTime;
-        DateTime endTime;
-        TimeSpan elapsedTime;
-        QueryService qs = CacheHelper<TKey, TVal>.DCache.GetQueryService();
-        ResetKey(LargeSetQuery);
-        ResetKey(UnsupportedPRQuery);
-        bool isLargeSetQuery = GetBoolValue(LargeSetQuery);
-        bool isUnsupportedPRQuery = GetBoolValue(UnsupportedPRQuery);
-        QueryStrings currentQuery = QueryStatics.ResultSetQueries[index];
-        if (AllowQuery(currentQuery.Category, currentQuery.IsLargeResultset,
-            isLargeSetQuery, isUnsupportedPRQuery))
-        {
-          string query = currentQuery.Query;
-          FwkInfo("Security.RunQuery: ResultSet Query Category [{0}], " +
-            "String [{1}].", currentQuery.Category, query);
-          Query qry = qs.NewQuery(query);
-          startTime = DateTime.Now;
-          ISelectResults results = qry.Execute(600);
-          endTime = DateTime.Now;
-          elapsedTime = endTime - startTime;
-          FwkInfo("Security.RunQuery: Time Taken to execute" +
-            " the query [{0}]: {1}ms", query, elapsedTime.TotalMilliseconds);
-          ++queryCnt;
-        }
-        index = Util.Rand(QueryStrings.SSsize);
-        currentQuery = QueryStatics.StructSetQueries[index];
-        if (AllowQuery(currentQuery.Category, currentQuery.IsLargeResultset,
-            isLargeSetQuery, isUnsupportedPRQuery))
-        {
-          string query = currentQuery.Query;
-          FwkInfo("Security.RunQuery: StructSet Query Category [{0}], " +
-            "String [{1}].", currentQuery.Category, query);
-          Query qry = qs.NewQuery(query);
-          startTime = DateTime.Now;
-          ISelectResults results = qry.Execute(600);
-          endTime = DateTime.Now;
-          elapsedTime = endTime - startTime;
-          FwkInfo("Security.RunQuery: Time Taken to execute" +
-            " the query [{0}]: {1}ms", query, elapsedTime.TotalMilliseconds);
-          ++queryCnt;
-        }
-      }
-      catch (Exception ex)
-      {
-        FwkException("Security.RunQuery: Caught Exception: {0}", ex);
-      }
-      FwkInfo("Security.RunQuery complete.");
-    }
-
-    #endregion
-
-    #region Public methods
-
-    public new void DoRegisterInterestList()
-    {
-      FwkInfo("In DoRegisterInterestList()");
-      try
-      {
-        Region region = GetRegion();
-        int numKeys = GetUIntValue(DistinctKeys);  // check distince keys first
-        if (numKeys <= 0)
-        {
-          FwkSevere("DoRegisterInterestList() Failed to initialize keys " +
-            "with numKeys: {0}", numKeys);
-          return;
-        }
-        int low = GetUIntValue(KeyIndexBegin);
-        low = (low > 0) ? low : 0;
-        int numOfRegisterKeys = GetUIntValue(RegisterKeys);
-        int high = numOfRegisterKeys + low;
-        ClearKeys();
-        m_maxKeys = numOfRegisterKeys;
-        m_keyIndexBegin = low;
-        int keySize = GetUIntValue(KeySize);
-        keySize = (keySize > 0) ? keySize : 10;
-        string keyBase = new string('A', keySize);
-        InitStrKeys(low, high, keyBase);
-
-        FwkInfo("DoRegisterInterestList() registering interest for {0} to {1}",
-          low, high);
-        CacheableKey[] registerKeyList = new CacheableKey[high - low];
-        for (int j = low; j < high; j++)
-        {
-          if (m_keysA[j - low] != null)
-          {
-            registerKeyList[j - low] = m_keysA[j - low];
-          }
-          else
-          {
-            FwkInfo("DoRegisterInterestList() key[{0}] is null.", (j - low));
-          }
-        }
-        FwkInfo("DoRegisterInterestList() region name is {0}", region.Name);
-        region.RegisterKeys(registerKeyList);
-      }
-      catch (Exception ex)
-      {
-        FwkException("DoRegisterInterestList() Caught Exception: {0}", ex);
-      }
-      FwkInfo("DoRegisterInterestList() complete.");
-    }
-
-    public void DoEntryOperations()
-    {
-      FwkInfo("DoEntryOperations called.");
-
-      int opsSec = GetUIntValue(OpsSecond);
-      opsSec = (opsSec < 1) ? 0 : opsSec;
-
-      int entryCount = GetUIntValue(EntryCount);
-      entryCount = (entryCount < 1) ? 10000 : entryCount;
-
-      int secondsToRun = GetTimeValue(WorkTime);
-      secondsToRun = (secondsToRun < 1) ? 30 : secondsToRun;
-
-      int valSize = GetUIntValue(ValueSizes);
-      valSize = ((valSize < 0) ? 32 : valSize);
-
-      DateTime now = DateTime.Now;
-      DateTime end = now + TimeSpan.FromSeconds(secondsToRun);
-
-      byte[] valBuf = Encoding.ASCII.GetBytes(new string('A', valSize));
-
-      string opcode = null;
-
-      int creates = 0, puts = 0, gets = 0, dests = 0, invals = 0, queries = 0;
-      Region region = GetRegion();
-      if (region == null)
-      {
-        FwkSevere("Security.DoEntryOperations: No region to perform operations on.");
-        now = end; // Do not do the loop
-      }
-
-      FwkInfo("DoEntryOperations will work for {0} secs using {1} byte values.", secondsToRun, valSize);
-
-      CacheableKey key;
-      ISerializable value;
-      ISerializable tmpValue;
-      PaceMeter meter = new PaceMeter(opsSec);
-      string objectType = GetStringValue(ObjectType);
-      while (now < end)
-      {
-        try
-        {
-          opcode = GetStringValue(EntryOps);
-          if (opcode == null || opcode.Length == 0) opcode = "no-op";
-
-          if (opcode == "add")
-          {
-            key = GetKey(entryCount);
-            if (objectType != null && objectType.Length > 0)
-            {
-              tmpValue = GetUserObject(objectType);
-            }
-            else
-            {
-              tmpValue = CacheableBytes.Create(valBuf);
-            }
-            region.Create(key, tmpValue);
-            creates++;
-          }
-          else
-          {
-            key = GetKey(entryCount);
-            if (opcode == "update")
-            {
-              if (objectType != null && objectType.Length > 0)
-              {
-                tmpValue = GetUserObject(objectType);
-              }
-              else
-              {
-                int keyVal = int.Parse(key.ToString());
-                int val = BitConverter.ToInt32(valBuf, 0);
-                val = (val == keyVal) ? keyVal + 1 : keyVal;  // alternate the value so that it can be validated later.
-                BitConverter.GetBytes(val).CopyTo(valBuf, 0);
-                BitConverter.GetBytes(DateTime.Now.Ticks).CopyTo(valBuf, 4);
-                tmpValue = CacheableBytes.Create(valBuf);
-              }
-              region.Put(key, tmpValue);
-              puts++;
-            }
-            else if (opcode == "invalidate")
-            {
-              region.Invalidate(key);
-              invals++;
-            }
-            else if (opcode == "destroy")
-            {
-              region.Destroy(key);
-              dests++;
-            }
-            else if (opcode == "read")
-            {
-              value = region.Get(key);
-              gets++;
-            }
-            else if (opcode == "read+localdestroy")
-            {
-              value = region.Get(key);
-              gets++;
-              region.LocalDestroy(key);
-              dests++;
-            }
-            else if (opcode == "query")
-            {
-              RunQuery(ref queries);
-            }
-            else
-            {
-              FwkSevere("Invalid operation specified: {0}", opcode);
-            }
-          }
-        }
-        catch (TimeoutException ex)
-        {
-          FwkSevere("Security: Caught unexpected timeout exception during entry " +
-            "{0} operation; continuing with the test: {1}", opcode, ex);
-        }
-        catch (EntryExistsException)
-        {
-        }
-        catch (EntryNotFoundException)
-        {
-        }
-        catch (EntryDestroyedException)
-        {
-        }
-        catch (Exception ex)
-        {
-          end = DateTime.Now;
-          FwkException("Security: Caught unexpected exception during entry " +
-            "{0} operation; exiting task: {1}", opcode, ex);
-        }
-        meter.CheckPace();
-        now = DateTime.Now;
-      }
-      FwkInfo("DoEntryOperations did {0} creates, {1} puts, {2} gets, " +
-        "{3} invalidates, {4} destroys, {5} queries.", creates, puts, gets,
-        invals, dests, queries);
-    }
-
-    public void DoEntryOperationsMU()
-    {
-      FwkInfo("DoEntryOperations called.");
-
-      int opsSec = GetUIntValue(OpsSecond);
-      opsSec = (opsSec < 1) ? 0 : opsSec;
-
-      int entryCount = GetUIntValue(EntryCount);
-      entryCount = (entryCount < 1) ? 10000 : entryCount;
-
-      int secondsToRun = GetTimeValue(WorkTime);
-      secondsToRun = (secondsToRun < 1) ? 30 : secondsToRun;
-
-      int valSize = GetUIntValue(ValueSizes);
-      valSize = ((valSize < 0) ? 32 : valSize);
-
-      DateTime now = DateTime.Now;
-      DateTime end = now + TimeSpan.FromSeconds(secondsToRun);
-
-      byte[] valBuf = Encoding.ASCII.GetBytes(new string('A', valSize));
-
-      string opcode = null;
-
-      int creates = 0, puts = 0, gets = 0, dests = 0, invals = 0, queries = 0;
-      Region region = GetRegion();
-      if (region == null)
-      {
-        FwkSevere("Security.DoEntryOperations: No region to perform operations on.");
-        now = end; // Do not do the loop
-      }
-
-      FwkInfo("DoEntryOperations will work for {0} secs using {1} byte values.", secondsToRun, valSize);
-
-      CacheableKey key;
-      ISerializable value;
-      ISerializable tmpValue;
-      PaceMeter meter = new PaceMeter(opsSec);
-      string objectType = GetStringValue(ObjectType);
-      while (now < end)
-      {
-        try
-        {
-          opcode = GetStringValue(EntryOps);
-          if (opcode == null || opcode.Length == 0) opcode = "no-op";
-
-          if (opcode == "add")
-          {
-            key = GetKey(entryCount);
-            if (objectType != null && objectType.Length > 0)
-            {
-              tmpValue = GetUserObject(objectType);
-            }
-            else
-            {
-              tmpValue = CacheableBytes.Create(valBuf);
-            }
-            region.Create(key, tmpValue);
-            creates++;
-          }
-          else
-          {
-            key = GetKey(entryCount);
-            if (opcode == "update")
-            {
-              if (objectType != null && objectType.Length > 0)
-              {
-                tmpValue = GetUserObject(objectType);
-              }
-              else
-              {
-                int keyVal = int.Parse(key.ToString());
-                int val = BitConverter.ToInt32(valBuf, 0);
-                val = (val == keyVal) ? keyVal + 1 : keyVal;  // alternate the value so that it can be validated later.
-                BitConverter.GetBytes(val).CopyTo(valBuf, 0);
-                BitConverter.GetBytes(DateTime.Now.Ticks).CopyTo(valBuf, 4);
-                tmpValue = CacheableBytes.Create(valBuf);
-              }
-              region.Put(key, tmpValue);
-              puts++;
-            }
-            else if (opcode == "invalidate")
-            {
-              region.Invalidate(key);
-              invals++;
-            }
-            else if (opcode == "destroy")
-            {
-              region.Destroy(key);
-              dests++;
-            }
-            else if (opcode == "read")
-            {
-              value = region.Get(key);
-              gets++;
-            }
-            else if (opcode == "read+localdestroy")
-            {
-              value = region.Get(key);
-              gets++;
-              region.LocalDestroy(key);
-              dests++;
-            }
-            else if (opcode == "query")
-            {
-              RunQuery(ref queries);
-            }
-            else
-            {
-              FwkSevere("Invalid operation specified: {0}", opcode);
-            }
-          }
-        }
-        catch (TimeoutException ex)
-        {
-          FwkSevere("Security: Caught unexpected timeout exception during entry " +
-            "{0} operation; continuing with the test: {1}", opcode, ex);
-        }
-        catch (EntryExistsException)
-        {
-        }
-        catch (EntryNotFoundException)
-        {
-        }
-        catch (EntryDestroyedException)
-        {
-        }
-        catch (Exception ex)
-        {
-          end = DateTime.Now;
-          FwkException("Security: Caught unexpected exception during entry " +
-            "{0} operation; exiting task: {1}", opcode, ex);
-        }
-        meter.CheckPace();
-        now = DateTime.Now;
-      }
-      FwkInfo("DoEntryOperations did {0} creates, {1} puts, {2} gets, " +
-        "{3} invalidates, {4} destroys, {5} queries.", creates, puts, gets,
-        invals, dests, queries);
-    }
-    #endregion
-  }
-}
diff --git a/tests/cli/NewFwkLib/Utils.cs b/tests/cli/NewFwkLib/Utils.cs
deleted file mode 100644
index c645e3b..0000000
--- a/tests/cli/NewFwkLib/Utils.cs
+++ /dev/null
@@ -1,1457 +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.
- */
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using System.Text.RegularExpressions;
-using System.Threading;
-
-namespace Apache.Geode.Client.FwkLib
-{
-
-  using Apache.Geode.DUnitFramework;
-  using Apache.Geode.Client.Tests;
-  using Apache.Geode.Client;
-  using NEWAPI = Apache.Geode.Client.Tests;
-  [Serializable]
-  struct HostInfo
-  {
-    public bool Started;
-    public string HostType;
-    public string HostName;
-    public string ExtraServerArgs;
-
-    public HostInfo(bool started, string hostType, string hostName,
-      string extraServerArgs)
-    {
-      Started = started;
-      HostType = hostType;
-      HostName = hostName;
-      ExtraServerArgs = extraServerArgs;
-    }
-  }
-
-  public class Utils<TKey, TVal> : FwkTest<TKey, TVal>
-  {
-    private const char PathSep = '/';
-    private const int MaxWaitMillis = 1800000;
-    private const string SetupJSName = "setupJavaServers";
-    private const string StartJSName = "startJavaServers";
-    private const string StopJSName = "stopJavaServers";
-    private const string KillJSName = "killJavaServers";
-    private const string SleepTime = "sleepTime";
-    private const string MinServers = "minServers";
-    private const string JavaServerCountKey = "ServerCount";
-    private const string JavaServerMapKey = "ServerMap";
-    private const string JavaServerName = "cacheserver.bat";
-    private const string JavaServerOtherArgs =
-      " statistic-sampling-enabled=true" +
-      " statistic-archive-file=statArchive.gfs mcast-port=0";
-    private const string JavaServerJavaArgs =
-      " -J-Xmx1280m -J-Xms512m -J-DCacheClientProxy.MESSAGE_QUEUE_SIZE=100000";
-    private const string JavaServerJavaArgsUnix =
-      " -J-Xmx2048m -J-Xms1024m -J-XX:+HeapDumpOnOutOfMemoryError " +
-      "-J-DCacheClientProxy.MESSAGE_QUEUE_SIZE=100000";
-    private static string TempDir = Util.GetEnvironmentVariable("TMP");
-    // Constants for status
-    private const int GFNoError = 0;
-    private const int GFError = 1;
-    private const int GFTimeout = 2;
-
-    private static Dictionary<string, HostInfo> m_javaServerHostMap =
-      new Dictionary<string, HostInfo>();
-    private static int m_numServers = 1;
-    private static int locCount = 0;
-    private static volatile bool m_exiting = false;
-    private static bool m_firstRun = true;
-    private static string m_locatorHost = null;
-    private static string m_locatorType = null;
-
-    #region Private methods
-
-    private string[] ParseJavaServerArgs(string argStr, ref int numServers,
-      out int argIndx, out string extraServerArgs)
-    {
-      argIndx = 0;
-      extraServerArgs = string.Empty;
-      if (argStr != null && argStr.Length > 0)
-      {
-        string[] args = argStr.Split(' ');
-        while (args.Length > argIndx && args[argIndx][0] == '-')
-        {
-          FwkAssert(args.Length > (argIndx + 1),
-            "JavaServer() value not provided after option '{0}'.",
-            args[argIndx]);
-          string argName = args[argIndx];
-          string argValue = args[argIndx + 1];
-          switch (argName)
-          {
-            case "-t":
-              // Ignore the tagname; we now use the hostGroup name as the tag
-              break;
-            case "-N":
-              break;
-            case "-M":
-              break;
-            case "-X":
-              break;
-            case "-c":
-              numServers = int.Parse(argValue);
-              break;
-            case "-e":
-              // @TODO: this is C++ specific environment variables -- ignored for now
-              break;
-            case "-p":
-              extraServerArgs += (" " + argValue.Replace("\\", "").
-                Replace("\"", "").Replace("'", ""));
-              break;
-            default:
-              FwkException("JavaServer() Unknown option '{0}'", argName);
-              break;
-          }
-          argIndx += 2;
-        }
-        extraServerArgs += " ";
-        return args;
-      }
-      return new string[0];
-    }
-
-    private string GetHostGroup()
-    {
-      string hostGroup;
-      try
-      {
-        hostGroup = Util.BBGet(Util.ClientId,
-          FwkReadData.HostGroupKey) as string;
-      }
-      catch
-      {
-        hostGroup = null;
-      }
-      return (hostGroup == null ? string.Empty : hostGroup);
-    }
-
-    private static HostInfo GetHostInfo(string serverId)
-    {
-      HostInfo hostInfo = new HostInfo();
-      lock (((ICollection)m_javaServerHostMap).SyncRoot)
-      {
-        if (m_javaServerHostMap.Count == 0)
-        {
-          try
-          {
-            m_javaServerHostMap = Util.BBGet(JavaServerBB, JavaServerMapKey)
-              as Dictionary<string, HostInfo>;
-          }
-          catch
-          {
-          }
-        }
-        if (m_javaServerHostMap.ContainsKey(serverId))
-        {
-          hostInfo = m_javaServerHostMap[serverId];
-        }
-      }
-      return hostInfo;
-    }
-
-    private static string GetJavaStartDir(string serverId, string hostType)
-    {
-      return Util.GetLogBaseDir(hostType) + PathSep + "GFECS_" + serverId;
-    }
-    private static string GetLocatorStartDir(string locatorId, string hostType)
-    {
-      return Util.GetLogBaseDir(hostType) + PathSep + "GFELOC_" + locatorId;
-    }
-    private string GetJavaLocator()
-    {
-      try
-      {
-        return (string)Util.BBGet(string.Empty, "LOCATOR_ADDRESS");
-      }
-      catch
-      {
-        return null;
-      }
-    }
-    private string GetJavaLocatorForPoolAttri()
-    {
-      try
-      {
-        return (string)Util.BBGet(string.Empty, "LOCATOR_ADDRESS_POOL");
-      }
-      catch
-      {
-        return null;
-      }
-    }
-    private bool GetSetJavaLocator(string locatorHost,
-      out int locatorPort)
-    {
-      locatorPort = 0;
-      string locatorAddress = GetJavaLocator();
-      string locatorAddressForPool = GetJavaLocatorForPoolAttri();
-      if (locatorAddress == null || locatorAddress.Length == 0)
-      {
-        locatorPort = Util.Rand(31124, 54343);
-        locatorAddress = locatorHost + '[' + locatorPort + ']';
-        locatorAddressForPool = locatorHost + ':' + locatorPort;
-        Util.BBSet(string.Empty, "LOCATOR_ADDRESS", locatorAddress);
-        Util.BBSet(string.Empty, "LOCATOR_ADDRESS_POOL", locatorAddressForPool);
-        locCount++;
-        return true;
-      }
-      if (locatorAddress != null && locatorAddress.Length > 0 && locCount > 0)
-      {
-        locatorPort = Util.Rand(31124, 54343);
-        locatorAddress += ',' + locatorHost + '[' + locatorPort + ']';
-        locatorAddressForPool += ',' + locatorHost + ':' + locatorPort;
-        Util.BBSet(string.Empty, "LOCATOR_ADDRESS", locatorAddress);
-        Util.BBSet(string.Empty, "LOCATOR_ADDRESS_POOL", locatorAddressForPool);
-        locCount++;
-        return true;
-      }
-      return false;
-    }
-
-    private static int StartLocalGFExe(string exeName, string gfeDir,
-      string exeArgs, out string outStr)
-    {
-      int status = GFNoError;
-      Process javaProc;
-      string javaExePath = gfeDir + PathSep + "bin" + PathSep + exeName;
-      Util.ServerLog("Executing local Geode command {0} {1}", javaExePath,
-        exeArgs);
-      if (!Util.StartProcess(javaExePath, exeArgs, false, TempDir,
-        true, false, false, out javaProc))
-      {
-        outStr = null;
-        return GFError;
-      }
-
-      StreamReader outSr = javaProc.StandardOutput;
-      // Wait for process to start
-      bool started = javaProc.WaitForExit(MaxWaitMillis);
-      outStr = outSr.ReadLine();
-      outSr.Close();
-      if (!started)
-      {
-        try
-        {
-          javaProc.Kill();
-        }
-        catch
-        {
-        }
-        status = GFTimeout;
-      }
-      else if (javaProc.ExitCode != 0)
-      {
-        status = GFError;
-      }
-      return status;
-    }
-
-    private static string StartRemoteGFExe(string host, string hostType,
-      string exeName, string exeArgs)
-    {
-      string gfJavaDir = Util.GetEnvironmentVariable("GFE_DIR", hostType);
-      string gfClassPath = Util.GetEnvironmentVariable("CLASSPATH", hostType);
-      string gfJava = Util.GetEnvironmentVariable("GF_JAVA", hostType);
-
-      string javaCmd = gfJavaDir + "/bin/" + exeName + ' ' + exeArgs;
-      Dictionary<string, string> envVars = new Dictionary<string, string>();
-      if (gfClassPath != null && gfClassPath.Length > 0)
-      {
-        envVars["CLASSPATH"] = gfClassPath;
-      }
-      if (gfJava != null && gfJava.Length > 0)
-      {
-        envVars["GF_JAVA"] = gfJava;
-      }
-      return Util.RunClientShellTask(Util.ClientId, host, javaCmd, envVars);
-    }
-
-    private string GetWorkerId(string serverNum)
-    {
-      return "worker." + serverNum;
-    }
-
-    private string CreateWorkerTaskSpecification(string progName,
-      string serverNum, string extraArgs)
-    {
-      extraArgs = (extraArgs == null ? string.Empty : ' ' + extraArgs);
-      return string.Format("<task name=\"Deleg{1}\" action=\"doRunProcess\" " +
-        "container=\"utils\" waitTime=\"25m\">{0}<data name=\"program\">" +
-        "{1}</data>{0}" + "<data name=\"arguments\">{2}{3}</data>{0}" +
-        "<client-set name=\"{4}\">{0}<client name=\"{5}\"/>{0}" +
-        "</client-set>{0}</task>", Environment.NewLine, progName, serverNum,
-        extraArgs, Util.ClientId, GetWorkerId(serverNum));
-    }
-    private string GetSslProperty(string hostType, bool forServer,string startDir)
-    {
-      string sslCmdStr = null;
-      //if (!File.Exists(startDir + PathSep + "geode.properties"))
-      //{
-        TextWriter sw = new StreamWriter(startDir + PathSep + "geode.properties", false);
-        String locatorAddress = GetJavaLocator();
-        sw.WriteLine("locators={0}", locatorAddress);
-        ResetKey("sslEnable");
-        bool isSslEnable = GetBoolValue("sslEnable");
-        if (!isSslEnable)
-        {
-          sw.Close();
-          return string.Empty;
-        }
-        FwkInfo("ssl is enable");
-        if (!forServer)
-        {
-          //StreamWriter sw = new StreamWriter("geode.properties",false);
-          sw.WriteLine("ssl-enabled=true");
-          sw.WriteLine("ssl-require-authentication=true");
-          sw.WriteLine("mcast-port=0");
-          sw.WriteLine("ssl-ciphers=SSL_RSA_WITH_NULL_SHA");
-        }
-
-        sw.Close();
-
-        string keyStorePath = Util.GetFwkLogDir(hostType) + "/data/keystore/sslcommon.jks";
-        string trustStorePath = Util.GetFwkLogDir(hostType) + "/data/keystore/server_truststore.jks";
-        sslCmdStr = " -Djavax.net.ssl.keyStore=" + keyStorePath +
-          " -Djavax.net.ssl.keyStorePassword=gemstone -Djavax.net.ssl.trustStore=" + trustStorePath +
-          " -Djavax.net.ssl.trustStorePassword=gemstone";
-        //string securityParams = GetStringValue(SecurityParams);
-        if (forServer)
-        {
-          sslCmdStr = " -J-Djavax.net.ssl.keyStore=" + keyStorePath +
-            " -J-Djavax.net.ssl.keyStorePassword=gemstone -J-Djavax.net.ssl.trustStore=" + trustStorePath +
-            " -J-Djavax.net.ssl.trustStorePassword=gemstone " +
-            " ssl-enabled=true  ssl-require-authentication=true ssl-ciphers=SSL_RSA_WITH_NULL_SHA";
-        }
-      //}
-      return sslCmdStr;
-    }
-    private string GetServerSecurityArgs(string hostType)
-    {
-      string securityParams = GetStringValue(SecurityParams);
-      CredentialGenerator gen;
-      // no security means security params is not applicable
-      if (securityParams == null || securityParams.Length == 0 ||
-        (gen = GetCredentialGenerator()) == null)
-      {
-        FwkInfo("Security is DISABLED.");
-        return string.Empty;
-      }
-      string logDir = Util.GetFwkLogDir(hostType);
-      if (logDir == null || logDir.Length == 0)
-      {
-        logDir = Util.GetLogBaseDir(hostType);
-        logDir = logDir.Substring(0, logDir.LastIndexOf("/"));
-        logDir = logDir.Substring(0, logDir.LastIndexOf("/"));
-      }
-      string dataDir = logDir + "/data";
-      gen.Init(dataDir, dataDir);
-      Properties<string,string> extraProps = new Properties<string,string>();
-      if (gen.SystemProperties != null)
-      {
-        extraProps.AddAll(gen.SystemProperties);
-      }
-      // For now only XML based authorization is supported
-      AuthzCredentialGenerator authzGen = new XmlAuthzCredentialGenerator();
-      authzGen.Init(gen);
-      if (authzGen.SystemProperties != null)
-      {
-        extraProps.AddAll(authzGen.SystemProperties);
-      }
-      return Utility.GetServerArgs(gen.Authenticator,
-        authzGen.AccessControl, null, extraProps, gen.JavaProperties);
-    }
-
-    private void SetupJavaServers(string argStr)
-    {
-      int argIndx;
-      string endpoints = string.Empty;
-      m_numServers = 1;
-
-      string gfeDir = Util.GetEnvironmentVariable("GFE_DIR");
-
-      FwkAssert(gfeDir != null && gfeDir.Length != 0,
-        "SetupJavaServers() GFE_DIR is not set.");
-
-      string hostGroup = GetHostGroup();
-      Match mt;
-
-      if (argStr == "CPP")
-      {
-        // special string to denote that endpoints have to be obtained
-        // from C++ framework
-        string fwkBBPath = Util.AssemblyDir + "/../../bin/FwkBB";
-        string fwkBBArgs = "getInt GFE_BB EP_COUNT";
-        Process fwkBBProc;
-        if (!Util.StartProcess(fwkBBPath, fwkBBArgs, false, null,
-          true, false, false, out fwkBBProc))
-        {
-          FwkException("SetupJavaServers() Cannot start C++ FwkBB [{0}].",
-            fwkBBPath);
-        }
-        int numEndpoints = int.Parse(fwkBBProc.StandardOutput.ReadToEnd());
-        fwkBBProc.WaitForExit();
-        fwkBBProc.StandardOutput.Close();
-        for (int index = 1; index <= numEndpoints; index++)
-        {
-          fwkBBArgs = "get GFE_BB EndPoints_" + index;
-          if (!Util.StartProcess(fwkBBPath, fwkBBArgs, false, null,
-            true, false, false, out fwkBBProc))
-          {
-            FwkException("SetupJavaServers() Cannot start C++ FwkBB [{0}].",
-              fwkBBPath);
-          }
-          string endpoint = fwkBBProc.StandardOutput.ReadToEnd();
-          fwkBBProc.WaitForExit();
-          fwkBBProc.StandardOutput.Close();
-          if (endpoints.Length > 0)
-          {
-            endpoints += ',' + endpoint;
-          }
-          else
-          {
-            endpoints = endpoint;
-          }
-        }
-      }
-      else if ((mt = Regex.Match(gfeDir, "^[^:]+:[0-9]+(,[^:]+:[0-9]+)*$"))
-        != null && mt.Length > 0)
-      {
-        // The GFE_DIR is for a remote server; contains an end-point list
-        endpoints = gfeDir;
-      }
-      else
-      {
-        string extraServerArgs;
-        string[] args = ParseJavaServerArgs(argStr, ref m_numServers,
-          out argIndx, out extraServerArgs);
-        Util.BBSet(JavaServerBB, FwkTest<TKey,TVal>.JavaServerEPCountKey, m_numServers);
-        FwkAssert(args.Length == argIndx + 1, "SetupJavaServers() cache XML argument not correct");
-        string cacheXml = args[argIndx];
-        FwkAssert(cacheXml.Length > 0, "SetupJavaServers() cacheXml argument is empty.");
-
-        string xmlDir = Util.GetEnvironmentVariable("GFBASE") + "/framework/xml";
-        if (xmlDir != null && xmlDir.Length > 0)
-        {
-          cacheXml = Util.NormalizePath(xmlDir + PathSep + cacheXml);
-        }
-
-        int javaServerPort = Util.RandPort(21321, 29789);
-
-        List<string> targetHosts = Util.BBGet(FwkReadData.HostGroupKey,
-          hostGroup) as List<string>;
-        for (int serverNum = 1; serverNum <= m_numServers; serverNum++)
-        {
-          if (m_exiting)
-          {
-            return;
-          }
-          string serverId = hostGroup + '_' + serverNum;
-          string startDir = GetJavaStartDir(serverId, Util.SystemType);
-          if (!Directory.Exists(startDir))
-          {
-            Directory.CreateDirectory(startDir);
-          }
-
-          string targetHost;
-          int numHosts = (targetHosts == null ? 0 : targetHosts.Count);
-          int lruMemSizeMb = 700;
-          if (numHosts == 0)
-          {
-            targetHost = Util.HostName;
-            lock (((IDictionary)m_javaServerHostMap).SyncRoot)
-            {
-              m_javaServerHostMap[serverId] = new HostInfo();
-            }
-          }
-          else
-          {
-            int hostIndex;
-            if (numHosts > 1)
-            {
-              hostIndex = ((serverNum - 1) % (numHosts - 1)) + 1;
-            }
-            else
-            {
-              hostIndex = 0;
-            }
-            targetHost = targetHosts[hostIndex];
-            FwkInfo("Checking the type of host {0}.", targetHost);
-            string hostType = Util.RunClientShellTask(Util.ClientId,
-              targetHost, "uname", null);
-            hostType = Util.GetHostType(hostType);
-            FwkInfo("The host {0} is: {1}", targetHost, hostType);
-            if (hostType != "WIN")
-            {
-              lruMemSizeMb = 1400;
-            }
-            lock (((IDictionary)m_javaServerHostMap).SyncRoot)
-            {
-              m_javaServerHostMap[serverId] = new HostInfo(false,
-                hostType, targetHost, extraServerArgs);
-            }
-          }
-          // Create the cache.xml with correct port
-          javaServerPort++;
-          StreamReader cacheXmlReader = new StreamReader(cacheXml);
-          string cacheXmlContent = cacheXmlReader.ReadToEnd();
-          cacheXmlReader.Close();
-          cacheXmlContent = cacheXmlContent.Replace("$PORT_NUM",
-            javaServerPort.ToString()).Replace("$LRU_MEM",
-            lruMemSizeMb.ToString());
-          StreamWriter cacheXmlWriter = new StreamWriter(startDir +
-            PathSep + "cache.xml");
-          cacheXmlWriter.Write(cacheXmlContent);
-          cacheXmlWriter.Close();
-
-          Util.ServerLog("SetupJavaServers() added '{0}' for host '{1}'",
-            serverId, targetHost);
-          FwkInfo("SetupJavaServers() added '{0}' for host '{1}'",
-            serverId, targetHost);
-
-          if (serverNum == 1)
-          {
-            endpoints = targetHost + ':' + javaServerPort;
-          }
-          else
-          {
-            endpoints += ',' + targetHost + ':' + javaServerPort;
-          }
-          Util.BBSet(JavaServerBB, FwkTest<TKey,TVal>.EndPoints + "_" + serverNum.ToString(), targetHost + ':' + javaServerPort);
-        }
-
-
-        int[] locatorPort = new int[2];
-        int locatorPort1;
-        HostInfo locatorInfo = GetHostInfo(hostGroup + "_1");
-        string locatorHost = locatorInfo.HostName;
-        string locatorType = locatorInfo.HostType;
-        if (locatorHost == null)
-        {
-          locatorHost = Util.HostName;
-          locatorType = Util.SystemType;
-        }
-        if (locatorType == Util.SystemType)
-        {
-          locatorHost = Util.HostName;
-        }
-        //ResetKey("multiLocator");
-        //bool isMultiLocator = GetBoolValue("multiLocator");
-        //if (isMultiLocator)
-        //{
-        for (int i = 0; i < 2; i++)
-        {
-          GetSetJavaLocator(locatorHost, out locatorPort1);
-          locatorPort[i] = locatorPort1;
-        }
-        for (int i = 0; i < 2; i++)
-        {
-          //if (GetSetJavaLocator(locatorHost, out locatorPort))
-          //{
-          FwkInfo("SetupJavaServers() starting locator on host {0}",
-            locatorHost);
-
-          string locatorDir = GetLocatorStartDir((i + 1).ToString(), Util.SystemType);
-          if (!Directory.Exists(locatorDir))
-          {
-            Directory.CreateDirectory(locatorDir);
-          }
-          ResetKey("sslEnable");
-          bool isSslEnable = GetBoolValue("sslEnable");
-          /*
-          if (isSslEnable)
-          {
-            locatorDir = locatorDir + "/..";
-          }
-          */
-          string sslArg = GetSslProperty(locatorType, false, locatorDir);
-          locatorDir = GetLocatorStartDir((i + 1).ToString(), locatorType);
-            FwkInfo("ssl arguments: {0} {1}", sslArg, locatorDir);
-            string locatorArgs = "start-locator -port=" + locatorPort[i] +
-              " -dir=" + locatorDir + sslArg;
-            if (locatorType != Util.SystemType)
-            {
-              FwkInfo(StartRemoteGFExe(locatorHost, locatorType,
-                "geode", locatorArgs));
-            }
-            else
-            {
-              string outStr;
-              int status = StartLocalGFExe("geode.bat", gfeDir,
-                locatorArgs, out outStr);
-              if (status == GFTimeout)
-              {
-                FwkException("SetupJavaServers() Timed out while starting " +
-                  "locator. Please check the logs in {0}", locatorDir);
-              }
-              else if (status != GFNoError)
-              {
-                FwkException("SetupJavaServers() Error while starting " +
-                  "locator. Please check the logs in {0}", locatorDir);
-              }
-              FwkInfo(outStr);
-            }
-
-            if (isSslEnable)
-            {
-              Util.RegisterTestCompleteDelegate(TestCompleteWithSSL);
-            }
-            else
-            {
-              Util.RegisterTestCompleteDelegate(TestCompleteWithoutSSL);
-            }
-            m_locatorHost = locatorHost;
-            m_locatorType = locatorType;
-            FwkInfo("SetupJavaServers() started locator on host {0}.",
-              locatorHost);
-          //}
-        }
-        //}
-      }
-      FwkInfo("SetupJavaServers() endpoints: {0}", endpoints);
-      // Write the endpoints for both the tag and the cumulative one
-      string globalEndPoints;
-      try
-      {
-        globalEndPoints = Util.BBGet(string.Empty,
-          FwkTest<TKey, TVal>.EndPointTag) as string;
-      }
-      catch (Apache.Geode.DUnitFramework.KeyNotFoundException)
-      {
-        globalEndPoints = null;
-      }
-      if (globalEndPoints != null && globalEndPoints.Length > 0 &&
-        endpoints != null && endpoints.Length > 0)
-      {
-        globalEndPoints += ',' + endpoints;
-      }
-      else
-      {
-        globalEndPoints = endpoints;
-      }
-      Util.BBSet(JavaServerBB, FwkTest<TKey, TVal>.EndPointTag, globalEndPoints);
-      Util.BBSet(JavaServerBB, FwkTest<TKey, TVal>.EndPointTag + hostGroup, endpoints);
-      lock (((IDictionary)m_javaServerHostMap).SyncRoot)
-      {
-        Util.BBSet(JavaServerBB, JavaServerMapKey, m_javaServerHostMap);
-      }
-      FwkInfo("SetupJavaServers() completed.");
-    }
-
-    private void StartJavaServers(string argStr)
-    {
-      int numServers = -1;
-      int argIndx;
-      string extraServerArgs;
-      string[] args = ParseJavaServerArgs(argStr, ref numServers,
-        out argIndx, out extraServerArgs);
-
-      string gfeDir = Util.GetEnvironmentVariable("GFE_DIR");
-      string endpoints = string.Empty;
-      string locatorAddress = GetJavaLocator();
-
-      FwkAssert(gfeDir != null && gfeDir.Length != 0,
-        "StartJavaServers() GFE_DIR is not set.");
-      FwkAssert(locatorAddress != null && locatorAddress.Length > 0,
-        "StartJavaServers() LOCATOR_ADDRESS is not set.");
-
-      string hostGroup = GetHostGroup();
-
-      Match mt = Regex.Match(gfeDir, "^[^:]+:[0-9]+(,[^:]+:[0-9]+)*$");
-      if (mt == null || mt.Length == 0)
-      {
-        int startServer = 1;
-        int endServer;
-        if (args.Length == (argIndx + 1))
-        {
-          startServer = int.Parse(args[argIndx]);
-          endServer = (numServers == -1 ? startServer :
-            (startServer + numServers - 1));
-        }
-        else
-        {
-          endServer = (numServers == -1 ? m_numServers : numServers);
-        }
-        for (int serverNum = startServer; serverNum <= endServer; serverNum++)
-        {
-          if (m_exiting)
-          {
-            break;
-          }
-          string serverId = hostGroup + '_' + serverNum;
-          HostInfo hostInfo = GetHostInfo(serverId);
-          string targetHost = hostInfo.HostName;
-          string hostType = hostInfo.HostType;
-          string startDir = GetJavaStartDir(serverId, hostType);
-          extraServerArgs = hostInfo.ExtraServerArgs + ' ' + extraServerArgs;
-          string sslArg = GetSslProperty(hostType, true, startDir);
-          FwkInfo("ssl arguments for server: {0} ",sslArg);
-          string javaServerOtherArgs = GetServerSecurityArgs(hostType) + ' ' + sslArg;
-          if (javaServerOtherArgs != null && javaServerOtherArgs.Length > 0)
-          {
-            FwkInfo("StartJavaServers() Using security server args: {0}",
-              javaServerOtherArgs);
-          }
-          javaServerOtherArgs = JavaServerOtherArgs + ' ' + javaServerOtherArgs;
-          if (targetHost == null || targetHost.Length == 0 ||
-            Util.IsHostMyself(targetHost))
-          {
-            string cacheXml = startDir + PathSep + "cache.xml";
-            string javaServerArgs = "start" + JavaServerJavaArgs + " -dir=" +
-              startDir + " cache-xml-file=" + cacheXml + " locators=" +
-              locatorAddress + extraServerArgs + javaServerOtherArgs ;
-
-            // Assume the GFE_DIR is for starting a local server
-            FwkInfo("StartJavaServers() starting {0} with GFE_DIR {1} " +
-              "and arguments: {2}", JavaServerName, gfeDir, javaServerArgs);
-            string outStr;
-            int status = StartLocalGFExe(JavaServerName, gfeDir,
-              javaServerArgs, out outStr);
-            if (status == GFTimeout)
-            {
-              FwkException("StartJavaServers() Timed out waiting for Java " +
-                "cacheserver to start. Please check the server log in {0}.",
-                startDir);
-            }
-            else if (status != GFNoError)
-            {
-              FwkSevere("StartJavaServers() Error in starting Java " +
-                "cacheserver. Please check the server log in {0}.", startDir);
-              Thread.Sleep(60000);
-            }
-            FwkInfo("StartJavaServers() output from start script: {0}",
-              outStr);
-          }
-          else if (hostType != Util.SystemType)
-          {
-            FwkInfo("StartJavaServers() starting '{0}' on remote host " +
-              "'{1}' of type {2}", serverId, targetHost, hostType);
-
-            string javaCSArgs = "start" +
-              JavaServerJavaArgsUnix + " -dir=" + startDir +
-              " cache-xml-file=cache.xml locators=" + locatorAddress +
-              extraServerArgs + javaServerOtherArgs;
-            FwkInfo(StartRemoteGFExe(targetHost, hostType,
-              "cacheserver", javaCSArgs));
-          }
-          else
-          {
-            string taskSpec = CreateWorkerTaskSpecification(
-              "startJavaServers", serverNum.ToString(), null);
-            FwkInfo("StartJavaServers() starting '{0}' on host '{1}'",
-              serverId, targetHost);
-            Util.BBSet(Util.ClientId + '.' + GetWorkerId(
-              serverNum.ToString()), FwkReadData.HostGroupKey,
-              hostGroup);
-            if (!Util.RunClientWinTask(Util.ClientId, targetHost, taskSpec))
-            {
-              FwkException("StartJavaServers() failed to start '{0}' on host '{1}'",
-                serverId, targetHost);
-            }
-          }
-          lock (((IDictionary)m_javaServerHostMap).SyncRoot)
-          {
-            hostInfo.Started = true;
-            m_javaServerHostMap[serverId] = hostInfo;
-          }
-          Util.ServerLog("StartJavaServers() started '{0}' on host '{1}'",
-            serverId, targetHost);
-        }
-      }
-      ResetKey("sslEnable");
-      bool isSslEnabled = GetBoolValue("sslEnable");
-      if (isSslEnabled)
-      {
-        Util.RegisterTestCompleteDelegate(TestCompleteWithSSL);
-      }
-      else
-      {
-        Util.RegisterTestCompleteDelegate(TestCompleteWithoutSSL);
-      }
-      FwkInfo("StartJavaServers() completed.");
-    }
-
-    private void StopJavaServers(string argStr)
-    {
-      string gfeDir = Util.GetEnvironmentVariable("GFE_DIR");
-
-      FwkAssert(gfeDir != null && gfeDir.Length != 0,
-        "StopJavaServers() GFE_DIR is not set.");
-
-      Match mt = Regex.Match(gfeDir, "^[^:]+:[0-9]+(,[^:]+:[0-9]+)*$");
-      if (mt == null || mt.Length == 0)
-      {
-        int numServers = -1;
-        int argIndx;
-        string extraServerArgs;
-        string[] args = ParseJavaServerArgs(argStr, ref numServers,
-          out argIndx, out extraServerArgs);
-
-        string hostGroup = GetHostGroup();
-        string javaServerPath = gfeDir + PathSep + "bin" +
-          PathSep + JavaServerName;
-        // Assume the GFE_DIR is for stopping a local server
-        int startServer = 1;
-        int endServer;
-        if (args.Length == (argIndx + 1))
-        {
-          startServer = int.Parse(args[argIndx]);
-          endServer = (numServers == -1 ? startServer :
-            (startServer + numServers - 1));
-        }
-        else
-        {
-          endServer = (numServers == -1 ? m_numServers : numServers);
-        }
-        for (int serverNum = startServer; serverNum <= endServer; serverNum++)
-        {
-          if (m_exiting)
-          {
-            break;
-          }
-          string serverId = hostGroup + '_' + serverNum;
-          HostInfo hostInfo = GetHostInfo(serverId);
-          string targetHost = hostInfo.HostName;
-          string hostType = hostInfo.HostType;
-          string startDir = GetJavaStartDir(serverId, hostType);
-          string javaServerArgs = "stop -dir=" + startDir;
-          if (targetHost == null || targetHost.Length == 0 ||
-            Util.IsHostMyself(targetHost))
-          {
-            FwkInfo("StopJavaServers() stopping {0} with GFE_DIR {1} " +
-              "and arguments: {2}", JavaServerName, gfeDir, javaServerArgs);
-
-            string outStr;
-            int status = StartLocalGFExe(JavaServerName, gfeDir,
-              javaServerArgs, out outStr);
-            if (status != GFNoError)
-            {
-              if (status == GFTimeout)
-              {
-                FwkSevere("StopJavaServers() Timed out waiting for Java " +
-                  "cacheserver to stop. Please check the server log in {0}.",
-                  startDir);
-              }
-              else
-              {
-                Thread.Sleep(20000);
-              }
-              KillLocalJavaServer(serverId, "-9");
-            }
-          }
-          else if (hostType != Util.SystemType)
-          {
-            FwkInfo("StopJavaServers() stopping '{0}' on remote host " +
-              "'{1}' of type {2}", serverId, targetHost, hostType);
-            FwkInfo(StartRemoteGFExe(targetHost, hostType,
-              "cacheserver", javaServerArgs));
-          }
-          else
-          {
-            string taskSpec = CreateWorkerTaskSpecification(
-              "stopJavaServers", serverNum.ToString(), null);
-            FwkInfo("StopJavaServers() stopping '{0}' on host '{1}'",
-              serverId, targetHost);
-            if (!Util.RunClientWinTask(Util.ClientId, targetHost, taskSpec))
-            {
-              FwkSevere("StopJavaServers() failed to stop '{0}' on host '{1}'",
-                serverId, targetHost);
-            }
-            FwkInfo("StopJavaServers() stopped '{0}' on host '{1}'",
-              serverId, targetHost);
-          }
-          lock (((ICollection)m_javaServerHostMap).SyncRoot)
-          {
-            hostInfo.Started = false;
-            m_javaServerHostMap[serverId] = hostInfo;
-          }
-          Util.ServerLog("StopJavaServers() stopped '{0}' on host '{1}'",
-            serverId, targetHost);
-        }
-      }
-      FwkInfo("StopJavaServers() completed.");
-    }
-
-    private void KillJavaServers(string argStr)
-    {
-      string gfeDir = Util.GetEnvironmentVariable("GFE_DIR");
-
-      FwkAssert(gfeDir != null && gfeDir.Length != 0,
-        "KillJavaServers() GFE_DIR is not set.");
-
-      Match mt = Regex.Match(gfeDir, "^[^:]+:[0-9]+(,[^:]+:[0-9]+)*$");
-      if (mt == null || mt.Length == 0)
-      {
-        int numServers = -1;
-        int argIndx;
-        string extraServerArgs;
-        string[] args = ParseJavaServerArgs(argStr, ref numServers,
-          out argIndx, out extraServerArgs);
-
-        string hostGroup = GetHostGroup();
-        string javaServerPath = gfeDir + PathSep + "bin" +
-          PathSep + JavaServerName;
-        // Assume the GFE_DIR is for stopping a local server
-        int startServer = 1;
-        int endServer;
-        string signal = "15";
-        if (args.Length >= (argIndx + 1))
-        {
-          startServer = int.Parse(args[argIndx++]);
-          endServer = (numServers == -1 ? startServer :
-            (startServer + numServers - 1));
-          if (args.Length >= (argIndx + 1))
-          {
-            signal = args[argIndx];
-          }
-        }
-        else
-        {
-          endServer = (numServers == -1 ? m_numServers : numServers);
-        }
-        for (int serverNum = startServer; serverNum <= endServer; serverNum++)
-        {
-          if (m_exiting)
-          {
-            break;
-          }
-          string serverId = hostGroup + '_' + serverNum;
-          HostInfo hostInfo = GetHostInfo(serverId);
-          string targetHost = hostInfo.HostName;
-          string hostType = hostInfo.HostType;
-          if (targetHost == null || targetHost.Length == 0 ||
-            Util.IsHostMyself(targetHost))
-          {
-            FwkInfo("KillJavaServers() killing '{0}' on localhost", serverId);
-            KillLocalJavaServer(serverId, '-' + signal);
-          }
-          else if (hostType != Util.SystemType)
-          {
-            FwkInfo("KillJavaServers() killing '{0}' on remote host " +
-              "'{1}' of type {2}", serverId, targetHost, hostType);
-            string startDir = GetJavaStartDir(serverId, hostType);
-            string killCmd = '"' + Util.GetFwkLogDir(hostType) +
-              "/data/killJavaServer.sh\" " + signal + " \"" + startDir + '"';
-            FwkInfo(Util.RunClientShellTask(Util.ClientId, targetHost,
-              killCmd, null));
-          }
-          else
-          {
-            string taskSpec = CreateWorkerTaskSpecification(
-              "killJavaServers", serverNum.ToString(), signal);
-            FwkInfo("KillJavaServers() killing '{0}' on host '{1}'",
-              serverId, targetHost);
-            if (!Util.RunClientWinTask(Util.ClientId, targetHost, taskSpec))
-            {
-              FwkSevere("KillJavaServers() failed to kill '{0}' on host '{1}'",
-                serverId, targetHost);
-            }
-          }
-          lock (((ICollection)m_javaServerHostMap).SyncRoot)
-          {
-            hostInfo.Started = false;
-            m_javaServerHostMap[serverId] = hostInfo;
-          }
-          Util.ServerLog("KillJavaServers() killed '{0}' on host '{1}'",
-            serverId, targetHost);
-        }
-      }
-      FwkInfo("KillJavaServers() completed.");
-    }
-
-    private static string GetGFJavaPID(string javaLog)
-    {
-      string javaPID = null;
-      bool islocator = javaLog.Contains("locator.log");
-      using (FileStream fs = new FileStream(javaLog, FileMode.Open,
-        FileAccess.Read, FileShare.ReadWrite))
-      {
-        StreamReader sr = new StreamReader(fs);
-        Regex pidRE = new Regex(@"Process ID: [\s]*(?<PID>[^\s]*)",
-          RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Multiline);
-        while (!sr.EndOfStream)
-        {
-          Match mt = pidRE.Match(sr.ReadLine());
-          if (mt != null && mt.Length > 0)
-          {
-            javaPID = mt.Groups["PID"].Value;
-            if(!islocator)
-              break;
-          }
-        }
-        sr.Close();
-        fs.Close();
-      }
-      return javaPID;
-    }
-
-    private static string GetJavaServerPID(string serverId)
-    {
-      string startDir = GetJavaStartDir(serverId, Util.SystemType);
-      string javaLog = startDir + "/cacheserver.log";
-      return GetGFJavaPID(javaLog);
-    }
-
-    private static bool KillLocalGFJava(string javaPID, string signal)
-    {
-      try
-      {
-        Process.GetProcessById(int.Parse(javaPID)).Kill();
-        return true;
-      }
-      catch (Exception excp)
-      {
-        LogException("KillLocalGFJava: {0}: {1}", excp.GetType().Name, excp.Message);
-        return false;
-      }
-    }
-
-    private static bool KillLocalGFJava_disabled(string javaPID, string signal)
-    {
-      bool success = false;
-      if (javaPID != null)
-      {
-        Process javaProc;
-        if (!Util.StartProcess("/bin/kill", "-f " + signal + ' ' + javaPID,
-          false, TempDir, false, false, false, out javaProc))
-        {
-          LogException("KillLocalGFJava(): unable to run 'kill'");
-        }
-
-        // Wait for java process to stop
-        bool stopped = javaProc.WaitForExit(MaxWaitMillis);
-        if (!stopped)
-        {
-          try
-          {
-            javaProc.Kill();
-          }
-          catch
-          {
-          }
-          LogSevere("KillLocalGFJava() Could not execute " +
-            "kill successfully.");
-        }
-        int numTries = 30;
-        while (numTries-- > 0)
-        {
-          if (!Util.StartProcess("/bin/kill", "-f -0 " + javaPID,
-            false, TempDir, false, false, false, out javaProc))
-          {
-            LogException("KillLocalGFJava(): unable to run 'kill'");
-          }
-          stopped = javaProc.WaitForExit(MaxWaitMillis);
-          if (stopped && javaProc.ExitCode == 0)
-          {
-            success = true;
-            break;
-          }
-          Thread.Sleep(10000);
-        }
-      }
-      return success;
-    }
-
-    private static void KillLocalJavaServer(string serverId, string signal)
-    {
-      string javaPID = GetJavaServerPID(serverId);
-      LogInfo("KillLocalJavaServer() killing '{0}' with PID '{1}' using " +
-        "signal '{2}'", serverId, javaPID, signal);
-      if (KillLocalGFJava(javaPID, signal))
-      {
-        string startDir = GetJavaStartDir(serverId, Util.SystemType);
-        File.Delete(startDir + "/.cacheserver.ser");
-      }
-      else
-      {
-        LogException("KillLocalJavaServer() Timed out waiting for " +
-          "Java cacheserver to stop.");
-      }
-    }
-
-    #endregion
-
-    #region Public methods loaded by XMLs
-
-    /// <summary>
-    /// Will run a process using Cygwin bash
-    /// </summary>
-    public void DoRunProcess()
-    {
-      string progName = GetStringValue("program");
-      
-      //bool driverUsingpsexec = false;
-      bool hostIsWindows = false;
-      try
-      {
-        //driverUsingpsexec = (bool)Util.BBGet(string.Empty, "UsePsexec");
-        hostIsWindows = (bool)Util.BBGet(string.Empty, Util.HostName + ".IsWindows");
-      }
-      catch
-      {
-      }
-      
-      if (progName == null)
-      {
-        FwkException("DoRunProcess(): program not specified for task {0}.",
-          TaskName);
-      }
-      string args = GetStringValue("arguments");
-      
-      if (progName == "cp") // for smpke perf xml
-      {
-        if (hostIsWindows )//&& driverUsingpsexec)
-          progName = "copy";
-        
-        string[] argStr = args.Split(' ');
-        int i = argStr[0].IndexOf("/framework/xml/");
-        string gfBaseDir = Util.GetEnvironmentVariable("GFBASE");
-        string sharePath = Util.NormalizePath(gfBaseDir);
-        string specName = argStr[0].Substring(i);
-        string perfStatictic = sharePath + specName;
-        args = perfStatictic + ' ' + (string)Util.BBGet(string.Empty,"XMLLOGDIR") + '/' + argStr[1];
-      }
-      string fullProg = progName + ' ' + args;
-      fullProg = fullProg.Trim();
-
-      // Special treatment for java server scripts since they are C++ specific
-      // (e.g. the environment variables they require, the FwkBBClient program,
-      //  the auto-ssh ...)
-      string[] progs = fullProg.Split(';');
-      for (int index = 0; index < progs.Length; index++)
-      {
-        if (m_exiting)
-        {
-          break;
-        }
-        string prog = progs[index].Trim();
-        int javaIndx;
-        if ((javaIndx = prog.IndexOf(SetupJSName)) >= 0)
-        {
-          args = prog.Substring(javaIndx + SetupJSName.Length).Trim();
-          SetupJavaServers(args);
-        }
-        else if ((javaIndx = prog.IndexOf(StartJSName)) >= 0)
-        {
-          args = prog.Substring(javaIndx + StartJSName.Length).Trim();
-          StartJavaServers(args);
-        }
-        else if ((javaIndx = prog.IndexOf(StopJSName)) >= 0)
-        {
-          args = prog.Substring(javaIndx + StopJSName.Length).Trim();
-          StopJavaServers(args);
-        }
-        else if ((javaIndx = prog.IndexOf(KillJSName)) >= 0)
-        {
-          args = prog.Substring(javaIndx + KillJSName.Length).Trim();
-          KillJavaServers(args);
-        }
-        else
-        {
-          FwkInfo("DoRunProcess() starting '{0}' using bash", prog);
-          
-          Process runProc = new Process();
-          ProcessStartInfo startInfo; 
-          
-          if (hostIsWindows)// && driverUsingpsexec)
-          {
-            prog = prog.Replace('/', '\\');
-            startInfo = new ProcessStartInfo("cmd",
-               string.Format("/C \"{0}\"", prog));
-          }
-          else
-            startInfo = new ProcessStartInfo("bash",
-              string.Format("-c \"{0}\"", prog));
-              
-          startInfo.CreateNoWindow = true;
-          startInfo.UseShellExecute = false;
-          startInfo.RedirectStandardOutput = true;
-          startInfo.RedirectStandardError = true;
-          runProc.StartInfo = startInfo;
-
-          if (!runProc.Start())
-          {
-            FwkException("DoRunProcess() unable to run '{0}' using bash", prog);
-          }
-          StreamReader outSr = runProc.StandardOutput;
-          StreamReader errSr = runProc.StandardError;
-          string outStr = outSr.ReadToEnd();
-          string errStr = errSr.ReadToEnd();
-          runProc.WaitForExit();
-          errSr.Close();
-          outSr.Close();
-
-          if (outStr != null && outStr.Length > 0)
-          {
-            FwkInfo("DoRunProcess() Output from executing '{0}':" +
-              "{1}{2}{3}{4}", prog, Environment.NewLine, outStr,
-              Environment.NewLine, Util.MarkerString);
-          }
-          if (errStr != null && errStr.Length > 0)
-          {
-            FwkSevere("DoRunProcess() Error output from executing '{0}':" +
-              "{1}{2}{3}{4}", prog, Environment.NewLine, errStr,
-              Environment.NewLine, Util.MarkerString);
-          }
-          FwkInfo("DoRunProcess() completed '{0}'.", prog);
-        }
-      }
-    }
-
-    public void DoSleep()
-    {
-      int secs = GetUIntValue(SleepTime);
-      if (secs < 1)
-      {
-        secs = 30;
-      }
-      FwkInfo("DoSleep() called for task: '{0}', sleeping for {1} seconds.",
-        TaskName, secs);
-      Thread.Sleep(secs * 1000);
-    }
-
-    public void DoRunProcessAndSleep()
-    {
-      DoRunProcess();
-      if (!m_exiting)
-      {
-        int secs = GetUIntValue(SleepTime);
-        if (secs > 0)
-        {
-          Thread.Sleep(secs * 1000);
-        }
-      }
-    }
-
-    public void DoStopStartServer()
-    {
-      if (m_firstRun)
-      {
-        m_firstRun = false;
-        Util.BBIncrement(JavaServerBB, JavaServerCountKey);
-      }
-
-      string op = GetStringValue("operation");
-      if (op == null || op.Length == 0)
-      {
-        FwkException("DoStopStartServer(): operation not specified.");
-      }
-      string serverId = GetStringValue("ServerId");
-      if (serverId == null || serverId.Length == 0)
-      {
-        FwkException("DoStopStartServer(): server id not specified.");
-      }
-      FwkInfo("DoStopStartServer(): stopping and starting server {0}.",
-        serverId);
-
-      UnitFnMethod<string> stopDeleg = null;
-      string stopArg = null;
-      if (op == "stop")
-      {
-        stopDeleg = StopJavaServers;
-        stopArg = serverId;
-      }
-      else if (op == "term")
-      {
-        stopDeleg = KillJavaServers;
-        stopArg = serverId;
-      }
-      else if (op == "kill")
-      {
-        stopDeleg = KillJavaServers;
-        stopArg = serverId + " 9";
-      }
-      else
-      {
-        FwkException("DoStopStartServer(): unknown operation {0}.", op);
-      }
-
-      int secs = GetUIntValue(SleepTime);
-      int minServers = GetUIntValue(MinServers);
-      minServers = (minServers <= 0) ? 1 : minServers;
-      FwkInfo("DoStopStartServer(): using minServers: {0}", minServers);
-      bool done = false;
-      while (!done)
-      {
-        int numServers = Util.BBDecrement(JavaServerBB, JavaServerCountKey);
-        if (numServers >= minServers)
-        {
-          stopDeleg(stopArg);
-          Thread.Sleep(60000);
-          StartJavaServers(serverId);
-          Thread.Sleep(60000);
-          Util.BBIncrement(JavaServerBB, JavaServerCountKey);
-          done = true;
-        }
-        else
-        {
-          Util.BBIncrement(JavaServerBB, JavaServerCountKey);
-          Thread.Sleep(1000);
-        }
-      }
-      if (secs > 0)
-      {
-        Thread.Sleep(secs * 1000);
-      }
-    }
-
-    #endregion
-
-    public static void TestCompleteWithSSL()
-    {
-      TestComplete(true);
-    }
-
-    public static void TestCompleteWithoutSSL()
-    {
-      TestComplete(false);
-    }
-
-    public static void TestComplete(bool ssl)
-    {
-      m_exiting = true;
-      lock (((ICollection)m_javaServerHostMap).SyncRoot)
-      {
-        if (m_javaServerHostMap.Count == 0)
-        {
-          try
-          {
-            m_javaServerHostMap = Util.BBGet(JavaServerBB, JavaServerMapKey)
-              as Dictionary<string, HostInfo>;
-          }
-          catch
-          {
-          }
-        }
-        if (m_javaServerHostMap.Count > 0)
-        {
-          // Stop all the remaining java servers here.
-          string gfeDir = Util.GetEnvironmentVariable("GFE_DIR");
-
-          LogAssert(gfeDir != null, "ClientExit() GFE_DIR is not set.");
-          LogAssert(gfeDir.Length != 0, "ClientExit() GFE_DIR is not set.");
-
-          Match mt = Regex.Match(gfeDir, "^[^:]+:[0-9]+(,[^:]+:[0-9]+)*$");
-          if (mt == null || mt.Length == 0)
-          {
-            foreach (KeyValuePair<string, HostInfo> serverHostPair
-              in m_javaServerHostMap)
-            {
-              string serverId = serverHostPair.Key;
-              string targetHost = serverHostPair.Value.HostName;
-              string hostType = serverHostPair.Value.HostType;
-              string startDir = GetJavaStartDir(serverId, hostType);
-              string javaServerArgs = "stop -dir=" + startDir;
-              if (serverHostPair.Value.Started)
-              {
-                if (targetHost == null || targetHost.Length == 0 ||
-                    Util.IsHostMyself(targetHost))
-                {
-                  LogInfo("ClientExit() stopping {0} with GFE_DIR {1} and " +
-                    "arguments: {2}", JavaServerName, gfeDir, javaServerArgs);
-
-                  string outStr;
-                  int status = StartLocalGFExe(JavaServerName, gfeDir,
-                    javaServerArgs, out outStr);
-                  if (status != GFNoError)
-                  {
-                    if (status == GFTimeout)
-                    {
-                      LogSevere("ClientExit() Timed out waiting for Java " +
-                        "cacheserver to stop. Please check the server log " +
-                        "in {0}.", startDir);
-                    }
-                    KillLocalJavaServer(serverId, "-9");
-                  }
-                }
-                else if (hostType != Util.SystemType)
-                {
-                  // Stop the remote host
-                  LogInfo("ClientExit() stopping '{0}' on remote host " +
-                    "'{1}' of type {2}", serverId, targetHost, hostType);
-                  LogInfo(StartRemoteGFExe(targetHost, hostType,
-                    "cacheserver", javaServerArgs));
-                }
-              }
-            }
-          }
-          m_javaServerHostMap.Clear();
-        }
-        // Stop the locator here.
-        if (m_locatorHost != null && m_locatorType != null)
-        {
-          LogInfo("ClientExit() stopping locator on host {0}", m_locatorHost);
-          for (int i = 0; i < locCount; i++)
-          {
-            string locatorDir = GetLocatorStartDir((i + 1).ToString(), Util.SystemType);
-            /* if (ssl)
-            {
-              locatorDir = locatorDir + "/..";
-            }
-            */
-          string locatorPID = GetGFJavaPID(locatorDir +
-            PathSep + "locator.log");
-          if (locatorPID != null && locatorPID.Length > 0)
-          {
-            if (m_locatorType != Util.SystemType)
-            {
-              string killCmd = "kill -15 " + locatorPID;
-              LogInfo(Util.RunClientShellTask(Util.ClientId, m_locatorHost,
-                killCmd, null));
-              Thread.Sleep(3000);
-              killCmd = "kill -9 " + locatorPID;
-              LogInfo(Util.RunClientShellTask(Util.ClientId, m_locatorHost,
-                killCmd, null));
-              LogInfo("ClientExit() successfully stopped locator PID {0} on host {1}",
-                locatorPID, m_locatorHost);
-            }
-            else
-            {
-              if (!KillLocalGFJava(locatorPID, "-15") &&
-                  !KillLocalGFJava(locatorPID, "-9"))
-              {
-                LogSevere("ClientExit() Error while stopping " +
-                  "locator. Please check the logs in {0}", locatorDir);
-              }
-              else
-              {
-                LogInfo("ClientExit() successfully stopped locator on host {0}",
-                  m_locatorHost);
-              }
-            }
-          }
-        }
-        }
-      }
-      locCount = 0;
-      m_locatorHost = null;
-      m_locatorType = null;
-      Util.BBRemove(string.Empty, "LOCATOR_ADDRESS");
-      Util.BBRemove(string.Empty, "LOCATOR_ADDRESS_POOL");
-      m_exiting = false;
-    }
-  }
-}
diff --git a/tests/cli/NewTestObject/CMakeLists.txt b/tests/cli/NewTestObject/CMakeLists.txt
new file mode 100644
index 0000000..8040825
--- /dev/null
+++ b/tests/cli/NewTestObject/CMakeLists.txt
@@ -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.
+
+
+project(NewTestObject CSharp)
+
+add_library(NewTestObject SHARED
+  #ArrayOfByte.cs
+  #BatchObject.cs
+  CMakeLists.txt
+  DeltaEx.cs
+  #DeltaFastAssetAccount.cs
+  #DeltaPSTObject.cs
+  DeltaTestImpl.cs
+  #EqStruct.cs
+  #FastAsset.cs
+  #FastAssetAccount.cs
+  #NoopAuthInit.cs
+  PdxAutoSerializerObj.cs
+  Portfolio.cs
+  PortfolioPdx.cs
+  Position.cs
+  PositionPdx.cs
+  #PSTObject.cs
+  SimpleCacheListener.cs
+  TestObject1.cs
+  #TimeStampdObject.cs
+)
+
+target_link_libraries(NewTestObject
+  PUBLIC
+    Apache.Geode
+    DUnitFramework
+)
+
+set_target_properties(NewTestObject PROPERTIES
+  VS_GLOBAL_ROOTNAMESPACE Apache.Geode.Client.Tests
+  VS_GLOBAL_TreatWarningsAsErrors True
+  VS_GLOBAL_PROJECT_TYPES "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+  VS_DOTNET_REFERENCES "System;System.Xml;System.Data"
+  FOLDER cli/test/integration
+)
+
diff --git a/tests/cli/NewTestObject/SimpleCacheListener.cs b/tests/cli/NewTestObject/SimpleCacheListener.cs
index 60ebd20..ee7077d 100644
--- a/tests/cli/NewTestObject/SimpleCacheListener.cs
+++ b/tests/cli/NewTestObject/SimpleCacheListener.cs
@@ -24,7 +24,7 @@
   /// <summary>
   /// Capture and display cache events.
   /// </summary>
-  class SimpleCacheListener<TKey, TValue> : ICacheListener<TKey, TValue>
+  public class SimpleCacheListener<TKey, TValue> : ICacheListener<TKey, TValue>
   {
     #region ICacheListener Members
     public static bool isSuccess = true;
diff --git a/tests/cli/PdxClassLibrary/CMakeLists.txt b/tests/cli/PdxClassLibrary/CMakeLists.txt
index 9ce4a6f..075cce4 100644
--- a/tests/cli/PdxClassLibrary/CMakeLists.txt
+++ b/tests/cli/PdxClassLibrary/CMakeLists.txt
@@ -41,9 +41,3 @@
   FOLDER cli/test/integration
 )
 
-if(NOT "${STRONG_NAME_KEY}" STREQUAL "")
-  set_target_properties( PdxClassLibrary PROPERTIES
-    VS_GLOBAL_SignAssembly "true"
-    VS_GLOBAL_AssemblyOriginatorKeyFile ${STRONG_NAME_KEY}
-  )
-endif()
diff --git a/packer/ubuntu/install-packages.sh b/tests/cli/PdxVersion1Lib/CMakeLists.txt
similarity index 62%
copy from packer/ubuntu/install-packages.sh
copy to tests/cli/PdxVersion1Lib/CMakeLists.txt
index f3e803f..6f9f9fc 100644
--- a/packer/ubuntu/install-packages.sh
+++ b/tests/cli/PdxVersion1Lib/CMakeLists.txt
@@ -1,5 +1,3 @@
-#!/usr/bin/env bash
-
 # 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.
@@ -15,19 +13,24 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-set -x -e -o pipefail
 
-apt-get -y install \
-    build-essential \
-    libc++-dev \
-    libc++abi-dev \
-    zlib1g-dev \
-    libssl-dev \
-    wget \
-    doxygen \
-    graphviz \
-    openjdk-8-jdk \
-    python \
-    python-pip
+project(PdxVersion1Lib CSharp)
 
-pip install --upgrade pip
+add_library(PdxVersion1Lib SHARED
+  Properties/AssemblyInfo.cs
+  Version1.cs
+)
+
+target_link_libraries(PdxVersion1Lib
+  PUBLIC
+    Apache.Geode
+)
+
+set_target_properties(PdxVersion1Lib PROPERTIES
+  VS_GLOBAL_ROOTNAMESPACE PdxVersionTests
+  VS_GLOBAL_TreatWarningsAsErrors True
+  VS_GLOBAL_PROJECT_TYPES "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+  VS_DOTNET_REFERENCES "System;System.Xml;System.Data"
+  FOLDER cli/test/integration
+)
+
diff --git a/tests/cli/PdxVersion1Lib/PdxVersion1Lib.csproj.in b/tests/cli/PdxVersion1Lib/PdxVersion1Lib.csproj.in
deleted file mode 100644
index 7f76396..0000000
--- a/tests/cli/PdxVersion1Lib/PdxVersion1Lib.csproj.in
+++ /dev/null
@@ -1,141 +0,0 @@
-<?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.
--->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
-  <PropertyGroup>
-    <CMAKE_SOURCE_DIR>${CMAKE_SOURCE_DIR_NATIVE}</CMAKE_SOURCE_DIR>
-    <CMAKE_CURRENT_SOURCE_DIR>${CMAKE_CURRENT_SOURCE_DIR_NATIVE}</CMAKE_CURRENT_SOURCE_DIR>
-    <CMAKE_BINARY_DIR>${CMAKE_BINARY_DIR_NATIVE}</CMAKE_BINARY_DIR>
-    <CMAKE_CURRENT_BINARY_DIR>${CMAKE_CURRENT_BINARY_DIR_NATIVE}</CMAKE_CURRENT_BINARY_DIR>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">x64</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{D421A19F-9EDC-3838-A9D3-12F5ED663E6E}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>PdxVersion1Lib</RootNamespace>
-    <AssemblyName>PdxVersion1Lib</AssemblyName>
-    <SignAssembly>${STRONG_NAME_KEY_ENABLED}</SignAssembly>
-    <AssemblyOriginatorKeyFile>${STRONG_NAME_KEY}</AssemblyOriginatorKeyFile>
-    <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
-    <FileUpgradeFlags>
-    </FileUpgradeFlags>
-    <OldToolsVersion>2.0</OldToolsVersion>
-    <UpgradeBackupLocation />
-    <PublishUrl>publish\</PublishUrl>
-    <Install>true</Install>
-    <InstallFrom>Disk</InstallFrom>
-    <UpdateEnabled>false</UpdateEnabled>
-    <UpdateMode>Foreground</UpdateMode>
-    <UpdateInterval>7</UpdateInterval>
-    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
-    <UpdatePeriodically>false</UpdatePeriodically>
-    <UpdateRequired>false</UpdateRequired>
-    <MapFileExtensions>true</MapFileExtensions>
-    <ApplicationRevision>0</ApplicationRevision>
-    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
-    <IsWebBootstrapper>false</IsWebBootstrapper>
-    <UseApplicationTrust>false</UseApplicationTrust>
-    <BootstrapperEnabled>true</BootstrapperEnabled>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <IntermediateOutputPath>Debug</IntermediateOutputPath>
-    <OutputPath>Debug</OutputPath>
-    <Optimize>false</Optimize>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <PlatformTarget>x86</PlatformTarget>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <NoWarn>659</NoWarn>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <IntermediateOutputPath>Release</IntermediateOutputPath>
-    <OutputPath>Release</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <PlatformTarget>x86</PlatformTarget>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <NoWarn>659</NoWarn>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <IntermediateOutputPath>Debug</IntermediateOutputPath>
-    <OutputPath>Debug</OutputPath>
-    <DebugType>full</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <NoWarn>659</NoWarn>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <IntermediateOutputPath>Release</IntermediateOutputPath>
-    <OutputPath>Release</OutputPath>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <NoWarn>659</NoWarn>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' ">
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <IntermediateOutputPath>RelWithDebInfo</IntermediateOutputPath>
-    <OutputPath>RelWithDebInfo</OutputPath>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <NoWarn>659</NoWarn>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CMAKE_BINARY_DIR)\clicache\src\Apache.Geode.vcxproj">
-      <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
-    </ProjectReference>    
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\PdxVersion1Lib\Version1.cs">
-      <Link>Version1.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\PdxVersion1Lib\Properties\AssemblyInfo.cs">
-      <Link>AssemblyInfo.cs</Link>
-    </Compile>
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-</Project>
diff --git a/tests/cli/PdxVersion1Lib/Version1.cs b/tests/cli/PdxVersion1Lib/Version1.cs
index 6c38eb6..1a92ce5 100755
--- a/tests/cli/PdxVersion1Lib/Version1.cs
+++ b/tests/cli/PdxVersion1Lib/Version1.cs
@@ -928,10 +928,11 @@
       return false;
     }
 
-    //public override int GetHashCode()
-    //{
-    //  return _id.GetHashCode();
-    //}
+    public override int GetHashCode()
+    {
+      return base.GetHashCode();
+    }
+
     #region IPdxSerializer Members
 
     public object FromData(string classname, IPdxReader reader)
@@ -1584,6 +1585,13 @@
                 throw new Exception("pdx enum is not equal");
             return true;
         }
+
+
+        public override int GetHashCode()
+        {
+            return base.GetHashCode();
+        }
+
         public void FromData(IPdxReader reader)
         {
             //byte[][] baa = reader.ReadArrayOfByteArrays("m_byteByteArray");
diff --git a/packer/ubuntu/install-packages.sh b/tests/cli/PdxVersion2Lib/CMakeLists.txt
similarity index 62%
copy from packer/ubuntu/install-packages.sh
copy to tests/cli/PdxVersion2Lib/CMakeLists.txt
index f3e803f..cfd2b87 100644
--- a/packer/ubuntu/install-packages.sh
+++ b/tests/cli/PdxVersion2Lib/CMakeLists.txt
@@ -1,5 +1,3 @@
-#!/usr/bin/env bash
-
 # 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.
@@ -15,19 +13,24 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-set -x -e -o pipefail
 
-apt-get -y install \
-    build-essential \
-    libc++-dev \
-    libc++abi-dev \
-    zlib1g-dev \
-    libssl-dev \
-    wget \
-    doxygen \
-    graphviz \
-    openjdk-8-jdk \
-    python \
-    python-pip
+project(PdxVersion2Lib CSharp)
 
-pip install --upgrade pip
+add_library(PdxVersion2Lib SHARED
+  Properties/AssemblyInfo.cs
+  Version2.cs
+)
+
+target_link_libraries(PdxVersion2Lib
+  PUBLIC
+    Apache.Geode
+)
+
+set_target_properties(PdxVersion2Lib PROPERTIES
+  VS_GLOBAL_ROOTNAMESPACE PdxVersionTests
+  VS_GLOBAL_TreatWarningsAsErrors True
+  VS_GLOBAL_PROJECT_TYPES "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+  VS_DOTNET_REFERENCES "System;System.Xml;System.Data"
+  FOLDER cli/test/integration
+)
+
diff --git a/tests/cli/PdxVersion2Lib/PdxVersion2Lib.csproj.in b/tests/cli/PdxVersion2Lib/PdxVersion2Lib.csproj.in
deleted file mode 100644
index 0decded..0000000
--- a/tests/cli/PdxVersion2Lib/PdxVersion2Lib.csproj.in
+++ /dev/null
@@ -1,137 +0,0 @@
-<?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.
--->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
-  <PropertyGroup>
-    <CMAKE_SOURCE_DIR>${CMAKE_SOURCE_DIR_NATIVE}</CMAKE_SOURCE_DIR>
-    <CMAKE_CURRENT_SOURCE_DIR>${CMAKE_CURRENT_SOURCE_DIR_NATIVE}</CMAKE_CURRENT_SOURCE_DIR>
-    <CMAKE_BINARY_DIR>${CMAKE_BINARY_DIR_NATIVE}</CMAKE_BINARY_DIR>
-    <CMAKE_CURRENT_BINARY_DIR>${CMAKE_CURRENT_BINARY_DIR_NATIVE}</CMAKE_CURRENT_BINARY_DIR>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">x64</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{406859C6-CC02-3AE9-9B89-AA99D0BF474A}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>PdxVersion2Lib</RootNamespace>
-    <AssemblyName>PdxVersion2Lib</AssemblyName>
-    <SignAssembly>${STRONG_NAME_KEY_ENABLED}</SignAssembly>
-    <AssemblyOriginatorKeyFile>${STRONG_NAME_KEY}</AssemblyOriginatorKeyFile>
-    <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
-    <FileUpgradeFlags>
-    </FileUpgradeFlags>
-    <OldToolsVersion>2.0</OldToolsVersion>
-    <UpgradeBackupLocation />
-    <PublishUrl>publish\</PublishUrl>
-    <Install>true</Install>
-    <InstallFrom>Disk</InstallFrom>
-    <UpdateEnabled>false</UpdateEnabled>
-    <UpdateMode>Foreground</UpdateMode>
-    <UpdateInterval>7</UpdateInterval>
-    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
-    <UpdatePeriodically>false</UpdatePeriodically>
-    <UpdateRequired>false</UpdateRequired>
-    <MapFileExtensions>true</MapFileExtensions>
-    <ApplicationRevision>0</ApplicationRevision>
-    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
-    <IsWebBootstrapper>false</IsWebBootstrapper>
-    <UseApplicationTrust>false</UseApplicationTrust>
-    <BootstrapperEnabled>true</BootstrapperEnabled>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <IntermediateOutputPath>Debug</IntermediateOutputPath>
-    <OutputPath>Debug</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <PlatformTarget>x86</PlatformTarget>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <NoWarn>659</NoWarn>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <IntermediateOutputPath>Release</IntermediateOutputPath>
-    <OutputPath>Release</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <PlatformTarget>x86</PlatformTarget>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <IntermediateOutputPath>Debug</IntermediateOutputPath>
-    <OutputPath>Debug</OutputPath>
-    <DebugType>full</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <IntermediateOutputPath>Release</IntermediateOutputPath>
-    <OutputPath>Release</OutputPath>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' ">
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <IntermediateOutputPath>RelWithDebInfo</IntermediateOutputPath>
-    <OutputPath>RelWithDebInfo</OutputPath>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CMAKE_BINARY_DIR)\clicache\src\Apache.Geode.vcxproj">
-      <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\PdxVersion2Lib\Version2.cs">
-      <Link>Version2.cs</Link>
-    </Compile>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\PdxVersion2Lib\Properties\AssemblyInfo.cs">
-      <Link>AssemblyInfo.cs</Link>
-    </Compile>
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-</Project>
diff --git a/tests/cli/QueryHelper/CMakeLists.txt b/tests/cli/QueryHelper/CMakeLists.txt
index 03164d2..1e5a2e7 100644
--- a/tests/cli/QueryHelper/CMakeLists.txt
+++ b/tests/cli/QueryHelper/CMakeLists.txt
@@ -55,7 +55,6 @@
 add_dependencies(QueryWrapper Apache.Geode)
 
 string(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
-set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${SHARED_LINKER_FLAGS_STRONG_KEY}")
 
 # For Visual Studio organization
 set_target_properties(QueryWrapper PROPERTIES FOLDER cli/test/integration)
diff --git a/tests/cli/SecurityUtil/CMakeLists.txt b/tests/cli/SecurityUtil/CMakeLists.txt
new file mode 100644
index 0000000..a5dd5f1
--- /dev/null
+++ b/tests/cli/SecurityUtil/CMakeLists.txt
@@ -0,0 +1,42 @@
+# 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.
+
+
+project(SecurityUtil CSharp)
+
+add_library(SecurityUtil SHARED
+  AuthzCredentialGeneratorN.cs
+  CredentialGeneratorN.cs
+  DummyAuthorization3N.cs
+  LdapCredentialGeneratorN.cs
+  #PKCSCredentialGeneratorN.cs
+  XmlAuthzCredentialGeneratorN.cs
+)
+
+target_link_libraries(SecurityUtil
+  PUBLIC
+    Apache.Geode
+    DUnitFramework
+    Apache.Geode.Templates.Cache.Security
+)
+
+set_target_properties(SecurityUtil PROPERTIES
+  VS_GLOBAL_ROOTNAMESPACE Apache.Geode.Client.Tests
+  VS_GLOBAL_TreatWarningsAsErrors True
+  VS_GLOBAL_PROJECT_TYPES "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+  VS_DOTNET_REFERENCES "System;System.Xml;System.Data"
+  FOLDER cli/test/integration
+)
+
diff --git a/tests/cli/SecurityUtil/SecurityUtil.csproj.in b/tests/cli/SecurityUtil/SecurityUtil.csproj.in
deleted file mode 100644
index a6ae959..0000000
--- a/tests/cli/SecurityUtil/SecurityUtil.csproj.in
+++ /dev/null
@@ -1,129 +0,0 @@
-<?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.
--->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
-  <PropertyGroup>
-    <CMAKE_SOURCE_DIR>${CMAKE_SOURCE_DIR_NATIVE}</CMAKE_SOURCE_DIR>
-    <CMAKE_CURRENT_SOURCE_DIR>${CMAKE_CURRENT_SOURCE_DIR_NATIVE}</CMAKE_CURRENT_SOURCE_DIR>
-    <CMAKE_BINARY_DIR>${CMAKE_BINARY_DIR_NATIVE}</CMAKE_BINARY_DIR>
-    <CMAKE_CURRENT_BINARY_DIR>${CMAKE_CURRENT_BINARY_DIR_NATIVE}</CMAKE_CURRENT_BINARY_DIR>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">x64</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{79DD6052-5570-30C0-8B0C-4974F50ACF12}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Apache.Geode.Client.Tests</RootNamespace>
-    <AssemblyName>SecurityUtil</AssemblyName>
-    <SignAssembly>${STRONG_NAME_KEY_ENABLED}</SignAssembly>
-    <AssemblyOriginatorKeyFile>${STRONG_NAME_KEY}</AssemblyOriginatorKeyFile>
-    <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
-    <FileUpgradeFlags>
-    </FileUpgradeFlags>
-    <OldToolsVersion>2.0</OldToolsVersion>
-    <UpgradeBackupLocation />
-    <PublishUrl>publish\</PublishUrl>
-    <Install>true</Install>
-    <InstallFrom>Disk</InstallFrom>
-    <UpdateEnabled>false</UpdateEnabled>
-    <UpdateMode>Foreground</UpdateMode>
-    <UpdateInterval>7</UpdateInterval>
-    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
-    <UpdatePeriodically>false</UpdatePeriodically>
-    <UpdateRequired>false</UpdateRequired>
-    <MapFileExtensions>true</MapFileExtensions>
-    <ApplicationRevision>0</ApplicationRevision>
-    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
-    <IsWebBootstrapper>false</IsWebBootstrapper>
-    <UseApplicationTrust>false</UseApplicationTrust>
-    <BootstrapperEnabled>true</BootstrapperEnabled>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
-    <DebugSymbols>true</DebugSymbols>
-    <Optimize>false</Optimize>
-    <IntermediateOutputPath>Debug</IntermediateOutputPath>
-    <OutputPath>Debug</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DebugType>full</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <IntermediateOutputPath>Release</IntermediateOutputPath>
-    <OutputPath>Release</OutputPath>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <WarningLevel>4</WarningLevel>
-    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' ">
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <IntermediateOutputPath>RelWithDebInfo</IntermediateOutputPath>
-    <OutputPath>RelWithDebInfo</OutputPath>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <WarningLevel>4</WarningLevel>
-    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="$(CMAKE_BINARY_DIR)\clicache\src\Apache.Geode.vcxproj">
-      <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\..\..\clicache\templates\Templates.csproj">  
-      <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
-      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\SecurityUtil\AuthzCredentialGeneratorN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\SecurityUtil\CredentialGeneratorN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\SecurityUtil\DummyAuthorization3N.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\SecurityUtil\LdapCredentialGeneratorN.cs" />
-    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\SecurityUtil\XmlAuthzCredentialGeneratorN.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\DUnitFramework\DUnitFramework.csproj">
-      <Project>{796727E8-3A6A-46BE-A2DB-584A4774CD51}</Project>
-      <Name>DUnitFramework</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-</Project>
diff --git a/tests/cpp/.clang-tidy b/tests/cpp/.clang-tidy
new file mode 100644
index 0000000..6f51aee
--- /dev/null
+++ b/tests/cpp/.clang-tidy
@@ -0,0 +1,4 @@
+---
+InheritParentConfig: true
+Checks: ''
+...
diff --git a/tests/cpp/fwklib/CMakeLists.txt b/tests/cpp/fwklib/CMakeLists.txt
index 8aeec6a..3136e6d 100644
--- a/tests/cpp/fwklib/CMakeLists.txt
+++ b/tests/cpp/fwklib/CMakeLists.txt
@@ -13,33 +13,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.10)
 project(framework LANGUAGES CXX)
 
 add_library(framework STATIC
-  FwkBB.hpp
-  FwkBBClient.cpp
-  FwkBBClient.hpp
-  FwkBBServer.cpp
-  FwkBBServer.hpp
-  FwkException.hpp
-  FwkExport.hpp
-  FwkLog.cpp
-  FwkLog.hpp
-  FwkStrCvt.cpp
-  FwkStrCvt.hpp
   GsRandom.cpp
-  GsRandom.hpp
-  IpcHandler.cpp
-  IpcHandler.hpp
-  Service.cpp
-  Service.hpp
-  TcpIpc.cpp
-  TcpIpc.hpp
-  TimeBomb.cpp
-  TimeBomb.hpp
-  UDPIpc.cpp
-  UDPIpc.hpp
 )
 
 set_target_properties(framework PROPERTIES
@@ -65,7 +42,7 @@
   PUBLIC
     apache-geode
   PRIVATE
-    ACE::ACE
+    Boost::boost
     internal
     _WarningsAsError
 )
@@ -73,4 +50,4 @@
 add_clangformat(framework)
 
 # For Visual Studio organization
-set_target_properties(framework PROPERTIES FOLDER cpp/test/integration)
+set_target_properties(framework PROPERTIES FOLDER cpp/test/integration/legacy)
diff --git a/tests/cpp/fwklib/FwkBB.hpp b/tests/cpp/fwklib/FwkBB.hpp
deleted file mode 100644
index b13eba3..0000000
--- a/tests/cpp/fwklib/FwkBB.hpp
+++ /dev/null
@@ -1,233 +0,0 @@
-#pragma once
-
-#ifndef GEODE_FWKLIB_FWKBB_H_
-#define GEODE_FWKLIB_FWKBB_H_
-
-/*
- * 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.
- */
-
-/**
- * @file    FwkBB.hpp
- * @since   1.0
- * @version 1.0
- * @see
- */
-
-#include <fwklib/FwkLog.hpp>
-#include <sstream>
-#include <string>
-#include <vector>
-
-#include <geode/internal/geode_base.hpp>
-
-// ----------------------------------------------------------------------------
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace testframework {
-
-// ----------------------------------------------------------------------------
-
-//    #define BB_START_TAG              "<s>"
-#define BB_ID_TAG "<i>"
-#define BB_COMMAND_TAG "<c>"
-#define BB_PARAMETER_TAG "<p>"
-#define BB_RESULT_TAG "<r>"
-//    #define BB_END_TAG                "<e>"
-
-#define BB_CLEAR_COMMAND "C"           //"clear"
-#define BB_DUMP_COMMAND "d"            //"dump"
-#define BB_GET_COMMAND "g"             //"get"
-#define BB_SET_COMMAND "s"             //"set"
-#define BB_ADD_COMMAND "A"             //"add"
-#define BB_SUBTRACT_COMMAND "S"        //"subtract"
-#define BB_INCREMENT_COMMAND "I"       //"increment"
-#define BB_DECREMENT_COMMAND "D"       //"decrement"
-#define BB_ZERO_COMMAND "z"            //"zero"
-#define BB_SET_IF_GREATER_COMMAND "G"  //"setIfGreater"
-#define BB_SET_IF_LESS_COMMAND "L"     //"setIfLess"
-#define BB_SET_ACK_COMMAND "a"         //"ack"
-
-// ----------------------------------------------------------------------------
-
-/** @class FwkBBMessage
-  * @brief Framework BB message
-  *
-  * Message stream format
-  * @verbatim
-      <start><id>IIII<c>CCCC<p>PPPP<p>PPPP<p>PPPP<r>RRRR<end>
-
-        <start> start tag of message
-        <id> id of operation
-        <c> command value
-        <p> parameter value
-        <r> result value
-        <end> end tag of message
-    @endverbatim
-  */
-class FwkBBMessage {
- public:
-  explicit FwkBBMessage(const char* cmd) : m_cmd(cmd) {}
-  FwkBBMessage() {}
-  virtual ~FwkBBMessage() {}
-
-  /** @brief clear message data
-   */
-  void clear() {
-    m_parameterVector.clear();
-    m_id.clear();
-    m_cmd.clear();
-    m_result.clear();
-  }
-
-  /** @brief pass to data to parse onReceive message
-   * @param data string of data
-   * @retval true = Success, false = Failed
-   */
-  void fromMessageStream(std::string data) {
-    //        FWKINFO( "FwkBBMessage::fromMessageStream: " << data );
-    char* str = const_cast<char*>(data.c_str());
-    char* tag = strstr(str, BB_ID_TAG);
-    if (!tag) {
-      FWKEXCEPTION("Invalid BB message: " << data);
-    }
-    tag += 3;
-    int32_t len = static_cast<int32_t>(strcspn(tag, "<"));
-    std::string id(tag, len);
-    setId(id);
-
-    tag = strstr(str, BB_COMMAND_TAG);
-    if (!tag) {
-      FWKEXCEPTION("Invalid BB message: " << data);
-    }
-    tag += 3;
-    len = static_cast<int32_t>(strcspn(tag, "<"));
-    std::string cmd(tag, len);
-    setCommand(cmd);
-
-    tag = strstr(str, BB_RESULT_TAG);
-    if (tag) {
-      tag += 3;
-      len = static_cast<int32_t>(strcspn(tag, "<"));
-      std::string result(tag, len);
-      setResult(result);
-    }
-
-    tag = strstr(str, BB_PARAMETER_TAG);
-    while (tag) {
-      tag += 3;
-      len = static_cast<int32_t>(strcspn(tag, "<"));
-      std::string param(tag, len);
-      addParameter(param);
-      tag = strstr(tag, BB_PARAMETER_TAG);
-    }
-  }
-
-  /** @brief get data stream to send
-   * @retval true = Success, false = Failed
-   */
-  std::string& toMessageStream() {
-    m_stream.clear();
-    std::ostringstream osMessage;
-    if (m_id.empty()) {
-      FWKEXCEPTION("Invalid BB Message, id not set.");
-    }
-    if (m_cmd.empty()) {
-      FWKEXCEPTION("Invalid BB Message, command not set.");
-    }
-
-    osMessage << BB_ID_TAG << m_id << BB_COMMAND_TAG << m_cmd;
-    if (m_parameterVector.size() > 0) {
-      std::vector<std::string>::iterator it = m_parameterVector.begin();
-      while (it != m_parameterVector.end()) {
-        osMessage << BB_PARAMETER_TAG << *it;
-        it++;
-      }
-    }
-    if (!m_result.empty()) osMessage << BB_RESULT_TAG << m_result;
-
-    m_stream.append(osMessage.str());
-    return m_stream;
-  }
-
-  /** @brief set Id of message
-   * @param id id of message
-   */
-  void setId(std::string id) { m_id = id; }
-
-  /** @brief set command of message
-   * @param cmd command of message
-   */
-  void setCommand(std::string cmd) { m_cmd = cmd; }
-
-  /** @brief set result of message
-   * @param result result of message
-   */
-  void setResult(std::string result) { m_result = result; }
-
-  /** @brief add parameter value to message
-   * @param parameter parameter of message
-   */
-  void addParameter(std::string parameter) {
-    m_parameterVector.push_back(parameter);
-  }
-
-  /** @brief get id of message
-   * @retval id of message
-   */
-  std::string getId() { return m_id; }
-
-  /** @brief get command of message
-   * @retval command of message
-   */
-  std::string getCommand() { return m_cmd; }
-  char getCmdChar() { return m_cmd.at(0); }
-
-  /** @brief get result of message
-   * @retval result of message
-   */
-  std::string getResult() { return m_result; }
-
-  /** @brief get parameter of message
-   * @retval parameter of message
-   */
-  std::string getParameter(size_t index) {
-    std::string value;
-    if (index < m_parameterVector.size()) value = m_parameterVector[index];
-
-    return value;
-  }
-
- private:
-  std::vector<std::string> m_parameterVector;
-  std::string m_id;
-  std::string m_cmd;
-  std::string m_result;
-  std::string m_stream;
-};
-
-// ----------------------------------------------------------------------------
-
-}  // namespace  testframework
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-// ----------------------------------------------------------------------------
-
-#endif  // GEODE_FWKLIB_FWKBB_H_
diff --git a/tests/cpp/fwklib/FwkBBClient.cpp b/tests/cpp/fwklib/FwkBBClient.cpp
deleted file mode 100644
index 644cbdf..0000000
--- a/tests/cpp/fwklib/FwkBBClient.cpp
+++ /dev/null
@@ -1,297 +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.
- */
-
-/**
- * @file    FwkBBClient.cpp
- * @since   1.0
- * @version 1.0
- * @see
- */
-
-#include "FwkBBClient.hpp"
-
-#include <ace/OS.h>
-#include <ace/Synch.h>
-
-#include "FwkLog.hpp"
-#include "FwkStrCvt.hpp"
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace testframework {
-
-void FwkBBClient::sendToServer(FwkBBMessage& message) {
-  message.setId(FwkStrCvt(getNewMessageId()).toString());
-  std::string msg = message.toMessageStream();
-  if (msg.empty()) {
-    FWKEXCEPTION("Empty message in FwkBBClient::sendToServer");
-  }
-
-  int32_t tries = 5;
-  bool done = false;
-  ACE_Time_Value timeout(CLIENT_WAIT_TIME_FOR_REPLY);
-  int32_t sCnt = 0;
-  int32_t rCnt = 0;
-  int32_t nrCnt = 0;
-  int32_t eCnt = 0;
-  while (!done && (tries-- > 0)) {
-    try {
-      UDPMessage udpMsg(msg);
-      udpMsg.setSender(m_client.getServer());
-      if (!udpMsg.send(m_client.getConn())) {
-        sCnt++;
-        FWKEXCEPTION("Send failed in FwkBBClient::sendToServer");
-      }
-      if (!udpMsg.receiveFrom(m_client.getConn(), &timeout)) {
-        rCnt++;
-        FWKEXCEPTION("Receive failed in FwkBBClient::sendToServer");
-      }
-      if (udpMsg.length() == 0) {
-        nrCnt++;
-        FWKEXCEPTION("No Reply from server in FwkBBClient::sendToServer");
-      }
-      message.fromMessageStream(udpMsg.what());
-      m_result.clear();
-      m_result = message.getResult();
-      done = true;
-    } catch (FwkException& /* ex */) {
-      eCnt++;
-      // FWKSEVERE( "Caught exception in FwkBBClient::sendToServer: " <<
-      // ex.what() << ", tried to send: " << msg.substr( 0, 50 ) );
-    }
-  }
-  if (!done) {
-    FWKSEVERE("FwkBBClient::sendToServer: FAILED, ( "
-              << eCnt << ", " << sCnt << ", " << rCnt << ", " << nrCnt
-              << " ) tried to send: " << msg.substr(0, 50));
-  }
-}
-
-// ----------------------------------------------------------------------------
-
-std::string FwkBBClient::dump() {
-  FwkBBMessage message(BB_DUMP_COMMAND);
-  try {
-    sendToServer(message);
-  } catch (FwkException& ex) {
-    ex.what();
-  }
-  return m_result;
-}
-
-// ----------------------------------------------------------------------------
-
-std::string FwkBBClient::dump(const std::string& BBName) {
-  FwkBBMessage message(BB_DUMP_COMMAND);
-  message.addParameter(BBName);
-  try {
-    sendToServer(message);
-  } catch (FwkException& ex) {
-    ex.what();
-  }
-  return m_result;
-}
-
-// ----------------------------------------------------------------------------
-
-void FwkBBClient::clear(const std::string& BBName) {
-  FwkBBMessage message(BB_CLEAR_COMMAND);
-  message.addParameter(BBName);
-  try {
-    sendToServer(message);
-  } catch (FwkException& ex) {
-    ex.what();
-  }
-}
-
-// ----------------------------------------------------------------------------
-
-std::string FwkBBClient::getString(const std::string& BBName,
-                                   const std::string& Key) {
-  FwkBBMessage message(BB_GET_COMMAND);
-  message.addParameter("key");
-  message.addParameter(BBName);
-  message.addParameter(Key);
-  try {
-    sendToServer(message);
-  } catch (FwkException& ex) {
-    ex.what();
-  }
-  return m_result;
-}
-
-// ----------------------------------------------------------------------------
-
-int64_t FwkBBClient::get(const std::string& BBName, const std::string& Key) {
-  FwkBBMessage message(BB_GET_COMMAND);
-  message.addParameter("counter");
-  message.addParameter(BBName);
-  message.addParameter(Key);
-  try {
-    sendToServer(message);
-  } catch (FwkException& ex) {
-    ex.what();
-  }
-  return FwkStrCvt::toInt64(m_result.c_str());
-}
-
-// ----------------------------------------------------------------------------
-
-void FwkBBClient::set(const std::string& BBName, const std::string& Key,
-                      const std::string& Value) {
-  FwkBBMessage message(BB_SET_COMMAND);
-  message.addParameter("key");
-  message.addParameter(BBName);
-  message.addParameter(Key);
-  message.addParameter(Value);
-  try {
-    sendToServer(message);
-  } catch (FwkException& ex) {
-    ex.what();
-  }
-}
-
-// ----------------------------------------------------------------------------
-
-void FwkBBClient::set(const std::string& BBName, const std::string& Key,
-                      const int64_t Value) {
-  FwkBBMessage message(BB_SET_COMMAND);
-  message.addParameter("counter");
-  message.addParameter(BBName);
-  message.addParameter(Key);
-  message.addParameter(FwkStrCvt(Value).toString());
-  try {
-    sendToServer(message);
-  } catch (FwkException& ex) {
-    ex.what();
-  }
-}
-
-// ----------------------------------------------------------------------------
-
-int64_t FwkBBClient::add(const std::string& BBName, const std::string& Key,
-                         const int64_t Value) {
-  FwkBBMessage message(BB_ADD_COMMAND);
-  message.addParameter(BBName);
-  message.addParameter(Key);
-  message.addParameter(FwkStrCvt(Value).toString());
-  try {
-    sendToServer(message);
-  } catch (FwkException& ex) {
-    ex.what();
-  }
-  return FwkStrCvt::toInt64(m_result.c_str());
-}
-
-// ----------------------------------------------------------------------------
-
-int64_t FwkBBClient::subtract(const std::string& BBName, const std::string& Key,
-                              const int64_t Value) {
-  FwkBBMessage message(BB_SUBTRACT_COMMAND);
-  message.addParameter(BBName);
-  message.addParameter(Key);
-  message.addParameter(FwkStrCvt(Value).toString());
-  try {
-    sendToServer(message);
-  } catch (FwkException& ex) {
-    ex.what();
-  }
-  return FwkStrCvt::toInt64(m_result.c_str());
-}
-
-// ----------------------------------------------------------------------------
-
-int64_t FwkBBClient::increment(const std::string& BBName,
-                               const std::string& Key) {
-  FwkBBMessage message(BB_INCREMENT_COMMAND);
-  message.addParameter(BBName);
-  message.addParameter(Key);
-  try {
-    sendToServer(message);
-  } catch (FwkException& ex) {
-    ex.what();
-  }
-  return FwkStrCvt::toInt64(m_result.c_str());
-}
-
-// ----------------------------------------------------------------------------
-
-int64_t FwkBBClient::decrement(const std::string& BBName,
-                               const std::string& Key) {
-  FwkBBMessage message(BB_DECREMENT_COMMAND);
-  message.addParameter(BBName);
-  message.addParameter(Key);
-  try {
-    sendToServer(message);
-  } catch (FwkException& ex) {
-    ex.what();
-  }
-  return FwkStrCvt::toInt64(m_result.c_str());
-}
-
-// ----------------------------------------------------------------------------
-
-void FwkBBClient::zero(const std::string& BBName, const std::string& Key) {
-  FwkBBMessage message(BB_ZERO_COMMAND);
-  message.addParameter(BBName);
-  message.addParameter(Key);
-  try {
-    sendToServer(message);
-  } catch (FwkException& ex) {
-    ex.what();
-  }
-}
-
-// ----------------------------------------------------------------------------
-
-int64_t FwkBBClient::setIfGreater(const std::string& BBName,
-                                  const std::string& Key, const int64_t Value) {
-  FwkBBMessage message(BB_SET_IF_GREATER_COMMAND);
-  message.addParameter(BBName);
-  message.addParameter(Key);
-  message.addParameter(FwkStrCvt(Value).toString());
-  try {
-    sendToServer(message);
-  } catch (FwkException& ex) {
-    ex.what();
-  }
-  return FwkStrCvt::toInt64(m_result.c_str());
-}
-
-// ----------------------------------------------------------------------------
-
-int64_t FwkBBClient::setIfLess(const std::string& BBName,
-                               const std::string& Key, const int64_t Value) {
-  FwkBBMessage message(BB_SET_IF_LESS_COMMAND);
-  message.addParameter(BBName);
-  message.addParameter(Key);
-  message.addParameter(FwkStrCvt(Value).toString());
-  try {
-    sendToServer(message);
-  } catch (FwkException& ex) {
-    ex.what();
-  }
-  return FwkStrCvt::toInt64(m_result.c_str());
-}
-
-// ----------------------------------------------------------------------------
-
-}  // namespace testframework
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
diff --git a/tests/cpp/fwklib/FwkBBClient.hpp b/tests/cpp/fwklib/FwkBBClient.hpp
deleted file mode 100644
index 4084097..0000000
--- a/tests/cpp/fwklib/FwkBBClient.hpp
+++ /dev/null
@@ -1,192 +0,0 @@
-#pragma once
-
-#ifndef GEODE_FWKLIB_FWKBBCLIENT_H_
-#define GEODE_FWKLIB_FWKBBCLIENT_H_
-
-/*
- * 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.
- */
-
-/**
- * @file    FwkBBClient.hpp
- * @since   1.0
- * @version 1.0
- * @see
- */
-
-#include <ace/OS.h>
-
-#include "FwkBB.hpp"
-#include "UDPIpc.hpp"
-
-// ----------------------------------------------------------------------------
-//  Some widely used BBs and counters
-
-static std::string CLIENTBB("CLIENTBB");
-static std::string CLIENTCOUNT("ClientCount");
-
-// ----------------------------------------------------------------------------
-
-#define CLIENT_WAIT_TIME_FOR_REPLY 5  // seconds
-
-// ----------------------------------------------------------------------------
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace testframework {
-/** @class FwkBBClient
- * @brief Framework BB client
- */
-class FwkBBClient {
- public:
-  explicit FwkBBClient(std::string serverAddr)
-      : m_client(serverAddr), m_messageId(0) {}
-
-  ~FwkBBClient() {}
-
-  /** @brief dump all data
-   * @retval result of dump
-   */
-  std::string dump();
-
-  /** @brief dump BB data
-   * @param BBName name of BB
-   * @retval result of dump
-   */
-  std::string dump(const std::string& BBName);
-
-  /** @brief clear BB data
-   * @param BBName name of BB
-   */
-  void clear(const std::string& BBName);
-
-  /** @brief get BB key value
-   * @param BBName name of BB
-   * @param Key name of Key
-   * @retval value
-   */
-  std::string getString(const std::string& BBName, const std::string& Key);
-
-  /** @brief get BB counter value
-   * @param BBName name of BB
-   * @param Key name of counter
-   * @retval value of counter
-   */
-  int64_t get(const std::string& BBName, const std::string& Key);
-
-  /** @brief set BB key value
-   * @param BBName name of BB
-   * @param Key name of key
-   * @param Value value to set
-   */
-  void set(const std::string& BBName, const std::string& Key,
-           const std::string& Value);
-
-  /** @brief set BB counter value
-   * @param BBName name of BB
-   * @param Key name of counter
-   * @param Value value to add to counter
-   * @retval value of counter
-   */
-  void set(const std::string& BBName, const std::string& Key,
-           const int64_t Value);
-
-  /** @brief add BB counter value
-   * @param BBName name of BB
-   * @param Key name of counter
-   * @param Value value to add to counter
-   * @retval value after add
-   */
-  int64_t add(const std::string& BBName, const std::string& Key,
-              const int64_t Value);
-
-  /** @brief subtract BB counter value
-   * @param BBName name of BB
-   * @param Key name of counter
-   * @param Value value to subtract from counter
-   * @retval value after subtract
-   */
-  int64_t subtract(const std::string& BBName, const std::string& Key,
-                   const int64_t Value);
-
-  /** @brief increment BB counter value by 1
-   * @param BBName name of BB
-   * @param Key name of counter
-   * @retval value after increment
-   */
-  int64_t increment(const std::string& BBName, const std::string& Key);
-
-  /** @brief decrement BB counter value by 1
-   * @param BBName name of BB
-   * @param Key name of counter
-   * @retval value after decrement
-   */
-  int64_t decrement(const std::string& BBName, const std::string& Key);
-
-  /** @brief zero BB counter value to 0
-   * @param BBName name of BB
-   * @param Key name of counter
-   */
-  void zero(const std::string& BBName, const std::string& Key);
-
-  /** @brief setIfGreater BB counter value is greater
-   * @param BBName name of BB
-   * @param Key name of counter
-   * @param Value value to set
-   * @retval value after setIfGreater
-   */
-  int64_t setIfGreater(const std::string& BBName, const std::string& Key,
-                       const int64_t Value);
-
-  /** @brief setIfLess BB counter value is less
-   * @param BBName name of BB
-   * @param Key name of counter
-   * @param Value value to set
-   * @retval value after setIfLess
-   */
-  int64_t setIfLess(const std::string& BBName, const std::string& Key,
-                    const int64_t Value);
-
- private:
-  /** @brief get new message id
-   */
-  uint32_t getNewMessageId() { return ++m_messageId; }
-
-  /** @brief get current message id
-   */
-  uint32_t getCurrentMessageId() { return m_messageId; }
-
-  /** @brief send a message to server
-   * @param message message to send
-   * @retval true = Success, false = Failed
-   */
-  void sendToServer(FwkBBMessage& message);
-
- private:
-  UDPMessageClient m_client;
-  std::string m_result;
-  uint32_t m_messageId;
-};
-
-// ----------------------------------------------------------------------------
-
-}  // namespace  testframework
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_FWKLIB_FWKBBCLIENT_H_
diff --git a/tests/cpp/fwklib/FwkBBServer.cpp b/tests/cpp/fwklib/FwkBBServer.cpp
deleted file mode 100644
index 0a7241b..0000000
--- a/tests/cpp/fwklib/FwkBBServer.cpp
+++ /dev/null
@@ -1,518 +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.
- */
-
-#include "FwkBBServer.hpp"
-
-#include <set>
-
-#include "FwkLog.hpp"
-#include "FwkStrCvt.hpp"
-#include "UDPIpc.hpp"
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace testframework {
-
-FwkBBServer::~FwkBBServer() {
-  //  stop();
-  clear();
-}
-
-////
-///----------------------------------------------------------------------------
-//
-// void FwkBBServer::stop() {
-//  m_farm->stopThreads();
-//  clear();
-//  delete m_farm;
-//}
-//
-////
-///----------------------------------------------------------------------------
-//
-// void FwkBBServer::start( uint32_t port ) {
-//  UDPMessageQueues * shared = new UDPMessageQueues( "BlackBoard" );
-//
-//  m_farm = new Service( 10 );
-//
-//  Receiver recv( shared, port );
-//  BBProcessor serv( shared, this );
-//  Responder resp( shared, port );
-//
-//  uint32_t thrds = m_farm->runThreaded( &recv, 5 );
-//  thrds = m_farm->runThreaded( &resp, 4 );
-//  thrds = m_farm->runThreaded( &serv, 1 );
-//}
-
-// ----------------------------------------------------------------------------
-
-void FwkBBServer::clear() {
-  m_nameKeyMap.clear();
-  m_nameCounterMap.clear();
-}
-
-// ----------------------------------------------------------------------------
-// <start><id>IIII<c>dump<end>
-//    bool dump(std::string& result);
-// <start><id>IIII<c>dump<p>BBName<end>
-//    bool dump(const char* BBName, std::string& result)
-// ----------------------------------------------------------------------------
-
-void FwkBBServer::onDump(FwkBBMessage& message, FwkBBMessage& reply) {
-  std::string sParameter1 = message.getParameter(0);
-
-  std::string response;
-  if (sParameter1.size()) {
-    dump(sParameter1, response);
-  } else {  // dump all
-    dump(response);
-  }
-  reply.setResult(response);
-}
-
-void FwkBBServer::onClearBB(FwkBBMessage& message) {
-  std::string sParameter1 = message.getParameter(0);
-
-  if (sParameter1.size()) clearBB(sParameter1);
-}
-
-// ----------------------------------------------------------------------------
-// <start><id>IIII<c>get<p>key<p>BBName<p>Key<end>
-//   bool get(const char* BBName, const char* Key, std::string& result)
-// <start><id>IIII<c>get<p>counter<p>BBName<p>Key<end>
-//   bool get(const char* BBName, const char* Key,
-//     int64_t* piResult)
-// ----------------------------------------------------------------------------
-
-void FwkBBServer::onGet(FwkBBMessage& message, FwkBBMessage& reply) {
-  std::string sParameter1 = message.getParameter(0);
-  std::string sParameter2 = message.getParameter(1);
-  std::string sParameter3 = message.getParameter(2);
-
-  if (sParameter1.size() && sParameter2.size() && sParameter3.size()) {
-    if (sParameter1 == "key") {
-      reply.setResult(getString(sParameter2, sParameter3));
-    } else if (sParameter1 == "counter") {
-      int64_t result = get(sParameter2, sParameter3);
-      reply.setResult(FwkStrCvt(result).toString());
-    }
-  }
-}
-
-// ----------------------------------------------------------------------------
-// <start><id>IIII<c>set<p>key<p>BBName<p>Key<p>pszValue<end>
-// bool set(const char* BBName, const char* Key, const char* pszValue)
-// <start><id>IIII<c>set<p>counter<p>BBName<p>Key<p>Value<end>
-// bool set(const char* BBName, const char* Key,
-//   const int64_t Value)
-// ----------------------------------------------------------------------------
-
-void FwkBBServer::onSet(FwkBBMessage& message) {
-  std::string sParameter1 = message.getParameter(0);
-  std::string sParameter2 = message.getParameter(1);
-  std::string sParameter3 = message.getParameter(2);
-  std::string sParameter4 = message.getParameter(3);
-
-  if (sParameter1.size() && sParameter2.size() && sParameter3.size() &&
-      sParameter4.size()) {
-    if (sParameter1 == "key") {
-      set(sParameter2, sParameter3, sParameter4);
-    } else if (sParameter1 == "counter") {
-      int64_t Value = FwkStrCvt(sParameter4.c_str()).toInt64();
-      set(sParameter2, sParameter3, Value);
-    }
-  }
-}
-
-// ----------------------------------------------------------------------------
-// <start><id>IIII<c>add<p>BBName<p>Key<p>Value<end>
-// bool add(const char* BBName, const char* Key,
-//   const int64_t Value, int64_t* piResult)
-// ----------------------------------------------------------------------------
-
-void FwkBBServer::onAdd(FwkBBMessage& message, FwkBBMessage& reply) {
-  int64_t result = 0;
-  std::string sParameter1 = message.getParameter(0);
-  std::string sParameter2 = message.getParameter(1);
-  std::string sParameter3 = message.getParameter(2);
-
-  if (sParameter1.size() && sParameter2.size() && sParameter3.size()) {
-    int64_t Value = FwkStrCvt(sParameter3).toInt64();
-    result = add(sParameter1, sParameter2, Value);
-  }
-
-  reply.setResult(FwkStrCvt(result).toString());
-}
-
-// ----------------------------------------------------------------------------
-// <start><id>IIII<c>subtract<p>BBName<p>Key<p>Value<end>
-// bool subtract(const char* BBName, const char* Key,
-//   const int64_t Value, int64_t* piResult)
-// ----------------------------------------------------------------------------
-
-void FwkBBServer::onSubtract(FwkBBMessage& message, FwkBBMessage& reply) {
-  int64_t result = 0;
-  std::string sParameter1 = message.getParameter(0);
-  std::string sParameter2 = message.getParameter(1);
-  std::string sParameter3 = message.getParameter(2);
-
-  if (sParameter1.size() && sParameter2.size() && sParameter3.size()) {
-    int64_t Value = FwkStrCvt(sParameter3).toInt64();
-    result = subtract(sParameter1, sParameter2, Value);
-  }
-
-  reply.setResult(FwkStrCvt(result).toString());
-}
-
-// ----------------------------------------------------------------------------
-// <start><id>IIII<c>increment<p>BBName<p>Key<p>Value<end>
-// bool increment(const char* BBName, const char* Key,
-//   int64_t* piResult)
-// ----------------------------------------------------------------------------
-
-void FwkBBServer::onIncrement(FwkBBMessage& message, FwkBBMessage& reply) {
-  int64_t result = 0;
-  std::string sParameter1 = message.getParameter(0);
-  std::string sParameter2 = message.getParameter(1);
-
-  if (sParameter1.size() && sParameter2.size()) {
-    result = increment(sParameter1, sParameter2);
-  }
-
-  reply.setResult(FwkStrCvt(result).toString());
-}
-
-// ----------------------------------------------------------------------------
-// <start><id>IIII<c>decrement<p>BBName<p>Key<p>Value<end>
-// bool decrement(const char* BBName, const char* Key,
-//   int64_t* piResult)
-// ----------------------------------------------------------------------------
-
-void FwkBBServer::onDecrement(FwkBBMessage& message, FwkBBMessage& reply) {
-  int64_t result = 0;
-  std::string sParameter1 = message.getParameter(0);
-  std::string sParameter2 = message.getParameter(1);
-
-  if (sParameter1.size() && sParameter2.size()) {
-    result = decrement(sParameter1, sParameter2);
-  }
-
-  reply.setResult(FwkStrCvt(result).toString());
-}
-
-// ----------------------------------------------------------------------------
-// <start><id>IIII<c>zero<p>BBName<p>Key<end>
-// bool zero(const char* BBName, const char* Key)
-// ----------------------------------------------------------------------------
-
-void FwkBBServer::onZero(FwkBBMessage& message) {
-  std::string sParameter1 = message.getParameter(0);
-  std::string sParameter2 = message.getParameter(1);
-
-  if (sParameter1.size() && sParameter2.size()) zero(sParameter1, sParameter2);
-}
-
-// ----------------------------------------------------------------------------
-// <start><id>IIII<c>setIfGreater<p>BBName<p>Key<p>Value<end>
-// bool setIfGreater(const char* BBName,
-//   const char* Key, const int64_t Value, int64_t* piResult)
-// ----------------------------------------------------------------------------
-
-void FwkBBServer::onSetIfGreater(FwkBBMessage& message, FwkBBMessage& reply) {
-  int64_t result = 0;
-  std::string sParameter1 = message.getParameter(0);
-  std::string sParameter2 = message.getParameter(1);
-  std::string sParameter3 = message.getParameter(2);
-
-  if (sParameter1.size() && sParameter2.size() && sParameter3.size()) {
-    int64_t Value = FwkStrCvt(sParameter3).toInt64();
-    result = setIfGreater(sParameter1, sParameter2, Value);
-  }
-
-  reply.setResult(FwkStrCvt(result).toString());
-}
-
-// ----------------------------------------------------------------------------
-// <start><id>IIII<c>setIfLess<p>BBName<p>Key<p>Value<end>
-// bool setIfLess(const char* BBName,
-//   const char* Key, const int64_t Value, int64_t* piResult)
-// ----------------------------------------------------------------------------
-
-void FwkBBServer::onSetIfLess(FwkBBMessage& message, FwkBBMessage& reply) {
-  int64_t result = 0;
-  std::string sParameter1 = message.getParameter(0);
-  std::string sParameter2 = message.getParameter(1);
-  std::string sParameter3 = message.getParameter(2);
-
-  if (sParameter1.size() && sParameter2.size() && sParameter3.size()) {
-    int64_t Value = FwkStrCvt(sParameter3).toInt64();
-    result = setIfLess(sParameter1, sParameter2, Value);
-  }
-
-  reply.setResult(FwkStrCvt(result).toString());
-}
-
-// ----------------------------------------------------------------------------
-
-void FwkBBServer::dump(std::string& result) {
-  // set of all bb's
-  std::set<std::string> bbSet;
-
-  // get all bbNames in nameKeyMap
-  NameKeyMap::iterator nameKeyIt = m_nameKeyMap.begin();
-  while (nameKeyIt != m_nameKeyMap.end()) {
-    bbSet.insert(nameKeyIt->first.getName());
-    nameKeyIt++;
-  }
-
-  // get all bbnames in nameCounterMap
-  NameCounterMap::iterator nameCounterIt = m_nameCounterMap.begin();
-  while (nameCounterIt != m_nameCounterMap.end()) {
-    bbSet.insert(nameCounterIt->first.getName());
-    nameCounterIt++;
-  }
-
-  // dump all bb's
-  std::set<std::string>::iterator bbIt = bbSet.begin();
-  while (bbIt != bbSet.end()) {
-    std::string bb(*bbIt);
-    std::string response;
-    dump(bb, response);
-    result += response;
-    bbIt++;
-  }
-}
-
-// ----------------------------------------------------------------------------
-
-void FwkBBServer::dump(const std::string& BBName, std::string& result) {
-  result = "\nBlack Board: ";
-  result += BBName;
-  result += "\n";
-
-  // get keys
-  NameKeyMap::iterator nameKeyIt = m_nameKeyMap.begin();
-
-  while (nameKeyIt != m_nameKeyMap.end()) {
-    if (nameKeyIt->first.getName() == BBName) {
-      result += "  Key: ";
-      result += nameKeyIt->first.getKey();
-      result += " Value: ";
-      result += nameKeyIt->second;
-      result += "\n";
-    }
-
-    nameKeyIt++;
-  }
-
-  // get counters
-  NameCounterMap::iterator nameCounterIt = m_nameCounterMap.begin();
-
-  while (nameCounterIt != m_nameCounterMap.end()) {
-    if (nameCounterIt->first.getName() == BBName) {
-      result += "  Counter: ";
-      result += nameCounterIt->first.getKey();
-      result += " Value: ";
-      result += FwkStrCvt(nameCounterIt->second).toString();
-      result += "\n";
-    }
-
-    nameCounterIt++;
-  }
-}
-
-// ----------------------------------------------------------------------------
-
-void FwkBBServer::clearBB(const std::string& BBName) {
-  NameKeyMap::iterator nameKeyIt = m_nameKeyMap.begin();
-  NameKeyMap::iterator prevK = m_nameKeyMap.begin();
-  while (nameKeyIt != m_nameKeyMap.end()) {
-    //    FWKINFO( "Looking at: " << nameKeyIt->first.getName() << "  Key: " <<
-    //    nameKeyIt->first.getKey() );
-    if (nameKeyIt->first.getName() == BBName) {
-      //    FWKINFO( "Calling erase." );
-      m_nameKeyMap.erase(nameKeyIt);
-      nameKeyIt = prevK;
-    } else {
-      prevK = nameKeyIt;
-    }
-    nameKeyIt++;
-  }
-
-  NameCounterMap::iterator nameCounterIt = m_nameCounterMap.begin();
-  NameCounterMap::iterator prevC = m_nameCounterMap.begin();
-  while (nameCounterIt != m_nameCounterMap.end()) {
-    //    FWKINFO( "Looking at: " << nameCounterIt->first.getName() << "
-    //    Counter: " << nameCounterIt->first.getKey() );
-    if (nameCounterIt->first.getName() == BBName) {
-      //    FWKINFO( "Calling erase." );
-      m_nameCounterMap.erase(nameCounterIt);
-      nameCounterIt = prevC;
-    } else {
-      prevC = nameCounterIt;
-    }
-    nameCounterIt++;
-  }
-}
-
-// ----------------------------------------------------------------------------
-
-std::string FwkBBServer::getString(const std::string& BBName,
-                                   const std::string& Key) {
-  std::string result;
-  NameKeyPair nameKeyPair(BBName, Key);
-
-  NameKeyMap::iterator it = m_nameKeyMap.find(nameKeyPair);
-  if (it != m_nameKeyMap.end()) {  // if found
-    result = it->second;
-  }
-
-  return result;
-}
-
-// ----------------------------------------------------------------------------
-
-int64_t FwkBBServer::get(const std::string& BBName, const std::string& Key) {
-  int64_t result = 0;
-  NameKeyPair nameKeyPair(BBName, Key);
-
-  NameCounterMap::iterator it = m_nameCounterMap.find(nameKeyPair);
-  if (it != m_nameCounterMap.end()) {  // if found
-    result = it->second;
-  } else {  // not found, set to Value;
-    m_nameCounterMap[nameKeyPair] = 0;
-  }
-
-  return result;
-}
-
-// ----------------------------------------------------------------------------
-
-void FwkBBServer::set(const std::string& BBName, const std::string& Key,
-                      const std::string& Value) {
-  NameKeyPair nameKeyPair(BBName, Key);
-
-  NameKeyMap::iterator it = m_nameKeyMap.find(nameKeyPair);
-  if (it != m_nameKeyMap.end()) {  // if found
-    it->second = std::string(Value);
-  } else {  // not found, set to Value;
-    m_nameKeyMap[nameKeyPair] = std::string(Value);
-  }
-}
-
-// ----------------------------------------------------------------------------
-
-void FwkBBServer::set(const std::string& BBName, const std::string& Key,
-                      const int64_t Value) {
-  NameKeyPair nameKeyPair(BBName, Key);
-
-  NameCounterMap::iterator it = m_nameCounterMap.find(nameKeyPair);
-  if (it != m_nameCounterMap.end()) {  // if found
-    it->second = Value;
-  } else {  // not found, set to Value;
-    m_nameCounterMap[nameKeyPair] = Value;
-  }
-}
-
-// ----------------------------------------------------------------------------
-
-int64_t FwkBBServer::add(const std::string& BBName, const std::string& Key,
-                         const int64_t Value) {
-  int64_t result = Value;
-  NameKeyPair nameKeyPair(BBName, Key);
-  NameCounterMap::iterator it = m_nameCounterMap.find(nameKeyPair);
-  if (it != m_nameCounterMap.end()) {  // if found
-    it->second = it->second + Value;
-    result = it->second;
-  } else {  // not found, set to Value;
-    m_nameCounterMap[nameKeyPair] = Value;
-  }
-
-  return result;
-}
-
-// ----------------------------------------------------------------------------
-
-int64_t FwkBBServer::subtract(const std::string& BBName, const std::string& Key,
-                              const int64_t Value) {
-  return add(BBName, Key, Value * -1);
-}
-
-// ----------------------------------------------------------------------------
-
-int64_t FwkBBServer::increment(const std::string& BBName,
-                               const std::string& Key) {
-  return add(BBName, Key, 1);
-}
-
-// ----------------------------------------------------------------------------
-
-int64_t FwkBBServer::decrement(const std::string& BBName,
-                               const std::string& Key) {
-  return add(BBName, Key, -1);
-}
-
-// ----------------------------------------------------------------------------
-
-void FwkBBServer::zero(const std::string& BBName, const std::string& Key) {
-  set(BBName, Key, 0ll);
-}
-
-// ----------------------------------------------------------------------------
-
-int64_t FwkBBServer::setIfGreater(const std::string& BBName,
-                                  const std::string& Key, const int64_t Value) {
-  int64_t result = Value;
-  NameKeyPair nameKeyPair(BBName, Key);
-
-  NameCounterMap::iterator it = m_nameCounterMap.find(nameKeyPair);
-  if (it != m_nameCounterMap.end()) {  // if found
-    if (Value > it->second) it->second = Value;
-    result = it->second;
-  } else {  // not found, set to Value;
-    m_nameCounterMap[nameKeyPair] = Value;
-  }
-
-  return result;
-}
-
-// ----------------------------------------------------------------------------
-
-int64_t FwkBBServer::setIfLess(const std::string& BBName,
-                               const std::string& Key, const int64_t Value) {
-  int64_t result = Value;
-
-  NameKeyPair nameKeyPair(BBName, Key);
-
-  NameCounterMap::iterator it = m_nameCounterMap.find(nameKeyPair);
-  if (it != m_nameCounterMap.end()) {  // if found
-    if (Value < it->second) it->second = Value;
-    result = it->second;
-  } else {  // not found, set to Value;
-    m_nameCounterMap[nameKeyPair] = Value;
-  }
-
-  return result;
-}
-
-// ----------------------------------------------------------------------------
-
-}  // namespace testframework
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
diff --git a/tests/cpp/fwklib/FwkBBServer.hpp b/tests/cpp/fwklib/FwkBBServer.hpp
deleted file mode 100644
index 0404f43..0000000
--- a/tests/cpp/fwklib/FwkBBServer.hpp
+++ /dev/null
@@ -1,226 +0,0 @@
-#pragma once
-
-#ifndef GEODE_FWKLIB_FWKBBSERVER_H_
-#define GEODE_FWKLIB_FWKBBSERVER_H_
-
-/*
- * 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.
- */
-
-/**
- * @file    FwkBBServer.hpp
- * @since   1.0
- * @version 1.0
- * @see
- */
-
-#include <map>
-#include <string>
-
-#include <ace/OS.h>
-
-#include "FwkBB.hpp"
-#include "UDPIpc.hpp"
-
-// ----------------------------------------------------------------------------
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace testframework {
-
-// ----------------------------------------------------------------------------
-
-/** @class NameKeyPair
- * @brief basic name/key pair
- */
-class NameKeyPair {
- public:
-  NameKeyPair(std::string sName, std::string sKey)
-      : m_name(sName), m_key(sKey) {}
-
-  /** @brief get name */
-  const std::string& getName() const { return m_name; }
-
-  /** @brief get value */
-  const std::string& getKey() const { return m_key; }
-
- private:
-  std::string m_name;
-  std::string m_key;
-};
-
-// ----------------------------------------------------------------------------
-
-/** @class NameKeyCmp
- * @brief name/key compare
- */
-class NameKeyCmp {
- public:
-  /** @brief Compares two NameKeyPair objects */
-  bool operator()(const NameKeyPair& p1, const NameKeyPair& p2) const {
-    return ((p1.getName().compare(p2.getName()) * 2) +
-            p1.getKey().compare(p2.getKey())) < 0;
-  }
-};
-
-// ----------------------------------------------------------------------------
-
-typedef std::map<NameKeyPair, std::string, NameKeyCmp> NameKeyMap;
-typedef std::map<NameKeyPair, int64_t, NameKeyCmp> NameCounterMap;
-
-// ----------------------------------------------------------------------------
-
-/** @class FwkBBServer
- * @brief Framework BB server
- */
-class FwkBBServer {
- public:
-  FwkBBServer() {}
-  ~FwkBBServer();
-
-  //  void start( uint32_t port );
-  //  void stop();
-
-  /** @brief Clear all server data */
-  void clear();
-
-  void onDump(FwkBBMessage& message, FwkBBMessage& reply);
-  void onClearBB(FwkBBMessage& message);
-  void onGet(FwkBBMessage& message, FwkBBMessage& reply);
-  void onSet(FwkBBMessage& message);
-  void onAdd(FwkBBMessage& message, FwkBBMessage& reply);
-  void onSubtract(FwkBBMessage& message, FwkBBMessage& reply);
-  void onIncrement(FwkBBMessage& message, FwkBBMessage& reply);
-  void onDecrement(FwkBBMessage& message, FwkBBMessage& reply);
-  void onZero(FwkBBMessage& message);
-  void onSetIfGreater(FwkBBMessage& message, FwkBBMessage& reply);
-  void onSetIfLess(FwkBBMessage& message, FwkBBMessage& reply);
-
-  // ----------------------------------------------------------------------------
-
-  void dump(std::string& result);
-  void dump(const std::string& BBName, std::string& result);
-  void clearBB(const std::string& BBName);
-  std::string getString(const std::string& BBName, const std::string& Key);
-  int64_t get(const std::string& BBName, const std::string& Key);
-  void set(const std::string& BBName, const std::string& Key,
-           const std::string& Value);
-  void set(const std::string& BBName, const std::string& Key,
-           const int64_t Value);
-  int64_t add(const std::string& BBName, const std::string& Key,
-              const int64_t Value);
-  int64_t subtract(const std::string& BBName, const std::string& Key,
-                   const int64_t Value);
-  int64_t increment(const std::string& BBName, const std::string& Key);
-  int64_t decrement(const std::string& BBName, const std::string& Key);
-  void zero(const std::string& BBName, const std::string& Key);
-  int64_t setIfGreater(const std::string& BBName, const std::string& Key,
-                       const int64_t Value);
-  int64_t setIfLess(const std::string& BBName, const std::string& Key,
-                    const int64_t Value);
-
- private:
-  NameKeyMap m_nameKeyMap;
-  NameCounterMap m_nameCounterMap;
-
-  //  Service * m_farm;
-};
-
-// ----------------------------------------------------------------------------
-
-class BBProcessor : public ServiceTask {
- private:
-  UDPMessageQueues* m_queues;
-  FwkBBServer* m_server;
-
- public:
-  BBProcessor(UDPMessageQueues* shared, FwkBBServer* server)
-      : ServiceTask(shared), m_queues(shared), m_server(server) {}
-
-  virtual ~BBProcessor() {}
-
-  virtual int doTask() {
-    while (*m_run) {
-      try {
-        UDPMessage* msg = m_queues->getInbound();
-        if (msg) {
-          // Construct the FwkBBMessage
-          FwkBBMessage message;
-          message.fromMessageStream(msg->what());
-          // Construct the reply
-          FwkBBMessage reply(BB_SET_ACK_COMMAND);
-          reply.setId(message.getId());
-          // Process the message
-          switch (message.getCmdChar()) {
-            case 'C':  // BB_CLEAR_COMMAND
-              m_server->onClearBB(message);
-              break;
-            case 'd':  // BB_DUMP_COMMAND
-              m_server->onDump(message, reply);
-              break;
-            case 'g':  // BB_GET_COMMAND
-              m_server->onGet(message, reply);
-              break;
-            case 's':  // BB_SET_COMMAND
-              m_server->onSet(message);
-              break;
-            case 'A':  // BB_ADD_COMMAND
-              m_server->onAdd(message, reply);
-              break;
-            case 'S':  // BB_SUBTRACT_COMMAND
-              m_server->onSubtract(message, reply);
-              break;
-            case 'I':  // BB_INCREMENT_COMMAND
-              m_server->onIncrement(message, reply);
-              break;
-            case 'D':  // BB_DECREMENT_COMMAND
-              m_server->onDecrement(message, reply);
-              break;
-            case 'z':  // BB_ZERO_COMMAND
-              m_server->onZero(message);
-              break;
-            case 'G':  // BB_SET_IF_GREATER_COMMAND
-              m_server->onSetIfGreater(message, reply);
-              break;
-            case 'L':  // BB_SET_IF_LESS_COMMAND
-              m_server->onSetIfLess(message, reply);
-              break;
-            default:
-              break;
-          }
-          // Construct response
-          msg->setMessage(reply.toMessageStream());
-          m_queues->putOutbound(msg);
-        }
-      } catch (FwkException& ex) {
-        FWKSEVERE("BBProcessor::doTask() caught exception: " << ex.what());
-      } catch (...) {
-        FWKSEVERE("BBProcessor::doTask() caught unknown exception");
-      }
-    }
-    return 0;
-  }
-  virtual void initialize() {}
-  virtual void finalize() {}
-};
-
-}  // namespace  testframework
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_FWKLIB_FWKBBSERVER_H_
diff --git a/tests/cpp/fwklib/FwkException.hpp b/tests/cpp/fwklib/FwkException.hpp
index 8b378dc..09092de 100644
--- a/tests/cpp/fwklib/FwkException.hpp
+++ b/tests/cpp/fwklib/FwkException.hpp
@@ -34,6 +34,14 @@
 
 // ----------------------------------------------------------------------------
 
+#define FWKEXCEPTION(x)                                              \
+  do {                                                               \
+    std::stringstream ss;                                            \
+    ss << x << " In file: " << __FILE__ << " at line: " << __LINE__; \
+    throw apache::geode::client::testframework::FwkException(        \
+        ss.str());                                                   \
+  } while (0)
+
 namespace apache {
 namespace geode {
 namespace client {
diff --git a/tests/cpp/fwklib/FwkLog.cpp b/tests/cpp/fwklib/FwkLog.cpp
deleted file mode 100644
index 4a3ad0d..0000000
--- a/tests/cpp/fwklib/FwkLog.cpp
+++ /dev/null
@@ -1,94 +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.
- */
-
-#include <cinttypes>
-#include <fwklib/FwkLog.hpp>
-
-#include <geode/Exception.hpp>
-
-#include "hacks/AceThreadId.h"
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace testframework {
-
-static ACE_utsname u;
-
-const char* getNodeName() { return u.nodename; }
-
-const char* dirAndFile(const char* str) {
-  if (!str) {
-    return "NULL";
-  }
-
-  const char* ptr = str + strlen(str);
-  int32_t found = 0;
-  while (ptr > str) {
-    ptr--;
-    if ((*ptr == '/') || (*ptr == '\\')) {
-      found++;
-      if (found >= 2) {
-        if (ptr == str) {
-          return str;
-        }
-        return ++ptr;
-      }
-    }
-  }
-  return ptr;
-}
-
-void plog(const char* l, const char* s, const char* filename, int32_t lineno) {
-  // ACE_TCHAR tstamp[64];
-  // ACE::timestamp( tstamp, 64, 1 );
-  // tstamp is like "Tue May 17 2005 12:54:22.546780"
-  // for our purpose we just want "12:54:22.546780"
-  char buf[256] = {0};
-  const size_t MINBUFSIZE = 128;
-  ACE_Time_Value clock = ACE_OS::gettimeofday();
-  time_t secs = clock.sec();
-  struct tm* tm_val = ACE_OS::localtime(&secs);
-  char* pbuf = buf;
-  pbuf += ACE_OS::strftime(pbuf, MINBUFSIZE, "%Y/%m/%d %H:%M:%S", tm_val);
-  pbuf += ACE_OS::snprintf(pbuf, 15, ".%06" PRId64 " ",
-                           static_cast<int64_t>(clock.usec()));
-  ACE_OS::strftime(pbuf, MINBUFSIZE, "%Z ", tm_val);
-  static bool needInit = true;
-  if (needInit) {
-    ACE_OS::uname(&u);
-    needInit = false;
-  }
-
-  const char* fil = dirAndFile(filename);
-
-  fprintf(stdout, "[%s %s %s:P%d:T%" PRIu64 "]::%s::%d  %s  %s\n", buf,
-          u.sysname, u.nodename, ACE_OS::getpid(),
-          hacks::aceThreadId(ACE_OS::thr_self()), fil, lineno, l, s);
-  fflush(stdout);
-}
-
-void dumpStack() {
-  apache::geode::client::Exception trace("StackTrace  ");
-  fprintf(stdout, "%s\n", trace.getStackTrace().c_str());
-  fflush(stdout);
-}
-
-}  // namespace testframework
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
diff --git a/tests/cpp/fwklib/FwkLog.hpp b/tests/cpp/fwklib/FwkLog.hpp
deleted file mode 100644
index cd34892..0000000
--- a/tests/cpp/fwklib/FwkLog.hpp
+++ /dev/null
@@ -1,126 +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.
- */
-
-#pragma once
-
-#ifndef GEODE_FWKLIB_FWKLOG_H_
-#define GEODE_FWKLIB_FWKLOG_H_
-
-// ----------------------------------------------------------------------------
-
-#include <ace/ACE.h>
-#include <ace/OS.h>
-#include <ace/Task.h>
-
-#include <geode/internal/geode_base.hpp>
-
-#include "FwkException.hpp"
-
-// kludge to compile on bar
-#define _CPP_CMATH 1
-#include <sstream>
-
-// ----------------------------------------------------------------------------
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace testframework {
-
-const char* strnrchr(const char* str, const char tok, int32_t cnt);
-const char* dirAndFile(const char* str);
-void plog(const char* l, const char* s, const char* filename, int32_t lineno);
-void dumpStack();
-const char* getNodeName();
-
-/* Macro for logging */
-#ifdef DEBUG
-
-#define FWKDEBUG(x)                                      \
-  {                                                      \
-    std::ostringstream os;                               \
-    os << x;                                             \
-    plog("Debug", os.str().c_str(), __FILE__, __LINE__); \
-  }
-
-#define FWKSLEEP(x) \
-  { ACE_OS::sleep(ACE_Time_Value(x, 0)); }
-
-#else
-
-#define FWKDEBUG(x)
-
-#define FWKSLEEP(x) \
-  { ACE_OS::sleep(ACE_Time_Value(x, 0)); }
-
-#endif
-
-#define FWKINFO(x)                                                       \
-  {                                                                      \
-    std::ostringstream os;                                               \
-    os << x;                                                             \
-    apache::geode::client::testframework::plog("Info", os.str().c_str(), \
-                                               __FILE__, __LINE__);      \
-  }
-#define FWKWARN(x)                                                       \
-  {                                                                      \
-    std::ostringstream os;                                               \
-    os << x;                                                             \
-    apache::geode::client::testframework::plog("Warn", os.str().c_str(), \
-                                               __FILE__, __LINE__);      \
-  }
-#define FWKERROR(x)                                                       \
-  {                                                                       \
-    std::ostringstream os;                                                \
-    os << x;                                                              \
-    apache::geode::client::testframework::plog("Error", os.str().c_str(), \
-                                               __FILE__, __LINE__);       \
-  }
-#define FWKSEVERE(x)                                                       \
-  {                                                                        \
-    std::ostringstream os;                                                 \
-    os << x;                                                               \
-    apache::geode::client::testframework::plog("Severe", os.str().c_str(), \
-                                               __FILE__, __LINE__);        \
-  }
-#define FWKEXCEPTION(x)                                              \
-  {                                                                  \
-    std::ostringstream os;                                           \
-    os << x << " In file: " << __FILE__ << " at line: " << __LINE__; \
-    throw apache::geode::client::testframework::FwkException(        \
-        os.str().c_str());                                           \
-  }
-
-#define WAITFORDEBUGGER(x)                                               \
-  {                                                                      \
-    apache::geode::client::testframework::plog(                          \
-        "Info", "Waiting for debugger ...", __FILE__, __LINE__);         \
-    for (int32_t i = x; i > 0; i--) ACE_OS::sleep(ACE_Time_Value(1, 0)); \
-  }
-
-#define DUMPSTACK(x)                                   \
-  {                                                    \
-    FWKSEVERE(x);                                      \
-    apache::geode::client::testframework::dumpStack(); \
-  }
-
-}  // namespace  testframework
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_FWKLIB_FWKLOG_H_
diff --git a/tests/cpp/fwklib/FwkStrCvt.cpp b/tests/cpp/fwklib/FwkStrCvt.cpp
deleted file mode 100644
index cfb8b33..0000000
--- a/tests/cpp/fwklib/FwkStrCvt.cpp
+++ /dev/null
@@ -1,135 +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.
- */
-
-#include <fwklib/FwkLog.hpp>
-#include <fwklib/FwkStrCvt.hpp>
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace testframework {
-
-// ----------------------------------------------------------------------------
-
-char* FwkStrCvt::hexify(uint8_t* buff, int32_t len) {
-  char* obuff = new char[(len + 1) * 2];
-  for (int32_t i = 0; i < len; i++) {
-    sprintf((obuff + (i * 2)), "%02x", buff[i]);
-  }
-  return obuff;
-}
-
-// ----------------------------------------------------------------------------
-
-std::string FwkStrCvt::toTimeString(int32_t seconds) {
-  std::string result;
-  const int32_t perMinute = 60;
-  const int32_t perHour = 3600;
-  const int32_t perDay = 86400;
-
-  if (seconds <= 0) {
-    result += "No limit specified.";
-    return result;
-  }
-
-  int32_t val = 0;
-  if (seconds > perDay) {
-    val = seconds / perDay;
-    if (val > 0) {
-      result += FwkStrCvt(val).toString();
-      if (val == 1) {
-        result += " day ";
-      } else {
-        result += " days ";
-      }
-    }
-    seconds %= perDay;
-  }
-  if (seconds > perHour) {
-    val = seconds / perHour;
-    if (val > 0) {
-      result += FwkStrCvt(val).toString();
-      if (val == 1) {
-        result += " hour ";
-      } else {
-        result += " hours ";
-      }
-    }
-    seconds %= perHour;
-  }
-  if (seconds > perMinute) {
-    val = seconds / perMinute;
-    if (val > 0) {
-      result += FwkStrCvt(val).toString();
-      if (val == 1) {
-        result += " minute ";
-      } else {
-        result += " minutes ";
-      }
-    }
-    seconds %= perMinute;
-  }
-  if (seconds > 0) {
-    result += FwkStrCvt(seconds).toString();
-    if (seconds == 1) {
-      result += " second ";
-    } else {
-      result += " seconds ";
-    }
-  }
-  return result;
-}
-
-// This expects a string of the form: 12h23m43s
-// and returns the time encoded in the string as
-// the integer number of seconds it represents.
-int32_t FwkStrCvt::toSeconds(const char* str) {
-  int32_t max = static_cast<int32_t>(ACE_OS::strspn(str, "0123456789hHmMsS"));
-  std::string tstr(str, max);
-
-  int32_t seconds = 0, i1 = 0, i2 = 0, i3 = 0;
-  char c1 = 0, c2 = 0, c3 = 0;
-
-  sscanf(tstr.c_str(), "%d%c%d%c%d%c", &i1, &c1, &i2, &c2, &i3, &c3);
-  if (i1 > 0) seconds += asSeconds(i1, c1);
-  if (i2 > 0) seconds += asSeconds(i2, c2);
-  if (i3 > 0) seconds += asSeconds(i3, c3);
-  return seconds;
-}
-
-int32_t FwkStrCvt::asSeconds(int32_t val, char typ) {
-  int32_t ret = 0;
-  switch (typ) {
-    case 'm':
-    case 'M':
-      ret = val * 60;
-      break;
-    case 'h':
-    case 'H':
-      ret = val * 3600;
-      break;
-    default:
-      ret = val;
-      break;
-  }
-  return ret;
-}
-
-}  // namespace testframework
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
diff --git a/tests/cpp/fwklib/FwkStrCvt.hpp b/tests/cpp/fwklib/FwkStrCvt.hpp
deleted file mode 100644
index 6fbc356..0000000
--- a/tests/cpp/fwklib/FwkStrCvt.hpp
+++ /dev/null
@@ -1,358 +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.
- */
-
-#pragma once
-
-#ifndef GEODE_FWKLIB_FWKSTRCVT_H_
-#define GEODE_FWKLIB_FWKSTRCVT_H_
-
-#include "config.h"
-
-#if defined(_MACOSX)
-#include <cinttypes>
-#endif
-
-#include <string>
-
-#include <ace/OS.h>
-
-#include <geode/internal/geode_globals.hpp>
-
-// ----------------------------------------------------------------------------
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace testframework {
-
-// ----------------------------------------------------------------------------
-
-#if defined(WIN32)
-#define Int64_FMT "%I64d"
-#define UInt64_FMT "%I64u"
-#elif defined(_LINUX)
-#define Int64_FMT "%jd"
-#define UInt64_FMT "%ju"
-#elif defined(_SOLARIS)
-#define Int64_FMT "%lld"
-#define UInt64_FMT "%llu"
-#elif defined(_MACOSX)
-#define Int64_FMT "%" PRId64
-#define UInt64_FMT "%" PRIu64
-#else
-#error not implemented
-#endif
-
-// ----------------------------------------------------------------------------
-
-/**
- * @class FwkStrCvt
- * @brief basic string converting class
- */
-class FwkStrCvt {
- public:
-  static int64_t hton64(int64_t value);
-  static int64_t ntoh64(int64_t value);
-  static int32_t hton32(int32_t value);
-  static int32_t ntoh32(int32_t value);
-  static int16_t hton16(int16_t value);
-  static int16_t ntoh16(int16_t value);
-  static char* hexify(uint8_t* buff, int32_t len);
-
-  /** @brief convert from string value */
-  explicit FwkStrCvt(const std::string& text) { m_sText = text; }
-  /** @brief convert from string value */
-  explicit FwkStrCvt(const char* pszText) {
-    if (pszText) m_sText = pszText;
-  }
-  /** @brief convert from double value */
-  explicit FwkStrCvt(const double dValue) {
-    char szText[50];
-    if (ACE_OS::snprintf(szText, sizeof(szText) - 1, "%lf", dValue)) {
-      m_sText = szText;
-    } else {
-      m_sText.clear();
-    }
-  }
-  /** @brief convert from float value */
-  explicit FwkStrCvt(const float fValue) {
-    char szText[50];
-    if (ACE_OS::snprintf(szText, sizeof(szText) - 1, "%f", fValue)) {
-      m_sText = szText;
-    } else {
-      m_sText.clear();
-    }
-  }
-  /** @brief convert from uint32_t value */
-  explicit FwkStrCvt(const uint32_t uiValue) {
-    char szText[50];
-    if (ACE_OS::snprintf(szText, sizeof(szText) - 1, "%u", uiValue)) {
-      m_sText = szText;
-    } else {
-      m_sText.clear();
-    }
-  }
-  /** @brief convert from int32_t value */
-  explicit FwkStrCvt(const int32_t iValue) {
-    char szText[50];
-    if (ACE_OS::snprintf(szText, sizeof(szText) - 1, "%d", iValue)) {
-      m_sText = szText;
-    } else {
-      m_sText.clear();
-    }
-  }
-  /** @brief convert from bool value */
-  explicit FwkStrCvt(const bool bValue) {
-    m_sText = (bValue) ? "true" : "false";
-  }
-
-  /** @brief convert from uint64_t value */
-  explicit FwkStrCvt(const uint64_t uiValue) {
-    char szText[100];
-    if (ACE_OS::snprintf(szText, sizeof(szText) - 1, UInt64_FMT, uiValue)) {
-      m_sText = szText;
-    } else {
-      m_sText.clear();
-    }
-  }
-
-  /** @brief convert from int64_t value */
-  explicit FwkStrCvt(const int64_t iValue) {
-    char szText[100];
-    if (ACE_OS::snprintf(szText, sizeof(szText) - 1, Int64_FMT, iValue)) {
-      m_sText = szText;
-    } else {
-      m_sText.clear();
-    }
-  }
-
-  /** @brief gets double value */
-  double toDouble() { return ACE_OS::strtod(m_sText.c_str(), nullptr); }
-
-  /** @brief gets float value */
-  float toFloat() {
-    return static_cast<float>(ACE_OS::strtod(m_sText.c_str(), nullptr));
-  }
-
-  /** @brief gets int32_t value */
-  int32_t toInt() { return ACE_OS::atoi(m_sText.c_str()); }
-
-  /** @brief gets uint32_t value */
-  uint32_t toUint() {
-    return static_cast<uint32_t>(ACE_OS::atoi(m_sText.c_str()));
-  }
-
-  /** @brief gets int32_t value */
-  // TODO: : why this returns in32_t? if so why different from toInt()
-  int32_t toLong() { return toInt(); }
-
-  /** @brief gets uint32_t value */
-  // TODO: : why this returns uin32_t? if so why different from toUInt()
-  uint32_t toUlong() { return toUint(); }
-
-  /** @brief gets int32_t value */
-  int32_t toInt32() { return toInt(); }
-
-  /** @brief gets uint32_t value */
-  uint32_t toUInt32() { return toUint(); }
-
-  /** @brief gets uint64_t value */
-  uint64_t toUInt64() {
-    uint64_t uiValue = 0;
-    sscanf(m_sText.c_str(), UInt64_FMT, &uiValue);
-    return uiValue;
-  }
-
-  /** @brief gets int64_t value */
-  int64_t toInt64() {
-    int64_t iValue = 0;
-    sscanf(m_sText.c_str(), Int64_FMT, &iValue);
-    return iValue;
-  }
-
-  /** @brief gets bool value */
-  bool toBool() {
-    bool bBool = false;
-    if (m_sText.size()) {
-      if ((m_sText.at(0) == 't') || (m_sText.at(0) == 'T')) bBool = true;
-    }
-    return bBool;
-  }
-
-  /** @brief gets float value */
-  static float toFloat(const char* value) {
-    if (!value) {
-      return 0.0;
-    }
-    return static_cast<float>(ACE_OS::strtod(value, nullptr));
-  }
-
-  /** @brief gets float value */
-  static float toFloat(const std::string& value) {
-    if (value.empty()) {
-      return -1.0;
-    }
-    return FwkStrCvt::toFloat(value.c_str());
-  }
-
-  /** @brief gets double value */
-  static double toDouble(const char* value) {
-    if (!value) {
-      return 0.0;
-    }
-    return ACE_OS::strtod(value, nullptr);
-  }
-
-  /** @brief gets double value */
-  static double toDouble(const std::string& value) {
-    if (value.empty()) {
-      return -1.0;
-    }
-    return FwkStrCvt::toDouble(value.c_str());
-  }
-
-  /** @brief gets int32_t value */
-  static int32_t toInt32(const char* value) {
-    if (!value) {
-      return 0;
-    }
-    return ACE_OS::atoi(value);
-  }
-
-  /** @brief gets int32_t value */
-  static int32_t toInt32(const std::string& value) {
-    if (value.empty()) {
-      return -1;
-    }
-    return ACE_OS::atoi(value.c_str());
-  }
-
-  /** @brief gets uint32_t value */
-  static uint32_t toUInt32(const char* value) {
-    if (!value) return 0;
-    return static_cast<uint32_t>(ACE_OS::atoi(value));
-  }
-
-  /** @brief gets uint32_t value */
-  static uint32_t toUInt32(const std::string& value) {
-    if (value.empty()) {
-      return 0;
-    }
-    return static_cast<uint32_t>(ACE_OS::atoi(value.c_str()));
-  }
-
-  /** @brief gets uint64_t value */
-  static uint64_t toUInt64(const std::string& value) {
-    if (value.empty()) {
-      return 0;
-    }
-    return toUInt64(value.c_str());
-  }
-
-  /** @brief gets uint64_t value */
-  static uint64_t toUInt64(const char* value) {
-    uint64_t uiValue = 0;
-    if (!value) return uiValue;
-    sscanf(value, UInt64_FMT, &uiValue);
-    return uiValue;
-  }
-
-  /** @brief gets int64_t value */
-  static int64_t toInt64(const std::string& value) {
-    if (value.empty()) {
-      return 0;
-    }
-    return toInt64(value.c_str());
-  }
-
-  /** @brief gets int64_t value */
-  static int64_t toInt64(const char* value) {
-    int64_t iValue = 0;
-    if (!value) {
-      return iValue;
-    }
-    sscanf(value, Int64_FMT, &iValue);
-    return iValue;
-  }
-
-  /** @brief from int64_t value */
-  static std::string toString(int64_t value) {
-    char text[100];
-    ACE_OS::snprintf(text, 99, Int64_FMT, value);
-    return text;
-  }
-
-  /** @brief from uint64_t value */
-  static std::string toString(uint64_t value) {
-    char text[100];
-    ACE_OS::snprintf(text, 99, UInt64_FMT, value);
-    return text;
-  }
-
-  /** @brief gets bool value */
-  static bool toBool(const std::string& value) {
-    if (value.empty()) {
-      return false;
-    }
-    return FwkStrCvt::toBool(value.c_str());
-  }
-
-  /** @brief gets bool value */
-  static bool toBool(const char* value) {
-    if (value && ((*value == 't') || (*value == 'T'))) {
-      return true;
-    }
-    return false;
-  }
-
-  static int32_t toSeconds(const std::string& str) {
-    if (str.empty()) {
-      return -1;
-    }
-    return toSeconds(str.c_str());
-  }
-
-  static std::string toTimeString(int32_t seconds);
-
-  // This expects a string of the form: 12h23m43s
-  // and returns the time encoded in the string as
-  // the integer number of seconds it represents.
-  static int32_t toSeconds(const char* str);
-
-  /** @brief gets string value */
-  std::string& toString() { return m_sText; }
-
-  /** @brief gets string value */
-  const std::string& asString() { return m_sText; }
-
-  /** @brief gets char * value */
-  const char* asChar() { return m_sText.c_str(); }
-
- private:
-  static int32_t asSeconds(int32_t val, char typ);
-
-  std::string m_sText;
-};
-
-// ----------------------------------------------------------------------------
-
-}  // namespace  testframework
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_FWKLIB_FWKSTRCVT_H_
diff --git a/tests/cpp/fwklib/IpcHandler.cpp b/tests/cpp/fwklib/IpcHandler.cpp
deleted file mode 100644
index 54cb5bf..0000000
--- a/tests/cpp/fwklib/IpcHandler.cpp
+++ /dev/null
@@ -1,272 +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.
- */
-
-#include "IpcHandler.hpp"
-
-#include <errno.h>
-#include <memory.h>
-
-#include <fwklib/FwkLog.hpp>
-
-#include <ace/INET_Addr.h>
-#include <ace/OS.h>
-#include <ace/SOCK_Connector.h>
-#include <ace/SOCK_IO.h>
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace testframework {
-
-// This class is not thread safe, and its use in the test framework
-// does not require it to be.
-IpcHandler::IpcHandler(const ACE_INET_Addr &driver, int32_t waitSeconds)
-    : m_io(new ACE_SOCK_Stream()) {
-  ACE_OS::signal(SIGPIPE, SIG_IGN);  // Ignore broken pipe
-  ACE_SOCK_Connector conn;
-  ACE_Time_Value wtime(waitSeconds, 1000);
-  int32_t retVal = conn.connect(*m_io, driver, &wtime);
-  if (retVal == -1) {
-#ifdef WIN32
-    errno = WSAGetLastError();
-#endif
-    FWKEXCEPTION("Attempt to connect failed, error: " << errno);
-  }
-}
-
-IpcHandler::~IpcHandler() {
-  sendIpcMsg(IPC_EXITING);
-  close();
-  checkBuffer(-12);
-}
-
-void IpcHandler::close() {
-  if (m_io) {
-    m_io->close();
-    delete m_io;
-    m_io = nullptr;
-  }
-}
-
-bool IpcHandler::checkPipe() {
-  static ACE_Time_Value next;
-  if (!m_io) {
-    return false;
-  }
-  ACE_Time_Value now = ACE_OS::gettimeofday();
-  if (next < now) {
-    ACE_Time_Value interval(60);
-    next = now + interval;
-    if (!sendIpcMsg(IPC_NULL)) return false;
-  }
-  return true;
-}
-
-IpcMsg IpcHandler::readIpcMsg(int32_t waitSeconds) {
-  IpcMsg result = IPC_NULL;
-  int32_t red = readInt(waitSeconds);
-  if (red != -1) {
-    result = static_cast<IpcMsg>(red);
-    if (result == IPC_NULL) {
-      return readIpcMsg(waitSeconds);  // skip past nulls
-    }
-  }
-  return result;
-}
-
-int32_t IpcHandler::readInt(int32_t waitSeconds) {
-  int32_t result = -1;
-  if (!checkPipe()) {
-    FWKEXCEPTION("Connection failure, error: " << errno);
-  }
-
-  auto wtime = new ACE_Time_Value(waitSeconds, 1000);
-  int32_t redInt = -1;
-  auto length = m_io->recv_n(&redInt, 4, 0, wtime);
-  delete wtime;
-  if (length == 4) {
-    result = ntohl(redInt);
-    //    FWKDEBUG( "Received " << result );
-  } else {
-    if (length == -1) {
-#ifdef WIN32
-      errno = WSAGetLastError();
-#endif
-      if ((errno > 0) && (errno != ETIME)) {
-        FWKEXCEPTION("Read failure, error: " << errno);
-      }
-    }
-  }
-  return result;
-}
-
-char *IpcHandler::checkBuffer(int32_t len) {
-  static int32_t length = 512;
-  static char *buffer = nullptr;
-
-  if (len == -12) {
-    delete[] buffer;
-    buffer = nullptr;
-    return buffer;
-  }
-
-  if (length < len) {
-    length = len + 32;
-    if (buffer != nullptr) {
-      delete[] buffer;
-      buffer = nullptr;
-    }
-  }
-
-  if (buffer == nullptr) {
-    buffer = new char[length];
-  }
-
-  memset(buffer, 0, length);
-  return buffer;
-}
-
-std::string IpcHandler::readString(int32_t waitSeconds) {
-  int32_t length = readInt(waitSeconds);
-  if (length == -1) {
-    FWKEXCEPTION(
-        "Failed to read string, length not available, errno: " << errno);
-  }
-
-  char *buffer = checkBuffer(length);
-
-  ACE_Time_Value *wtime = new ACE_Time_Value(waitSeconds, 1000);
-
-  auto readLength = m_io->recv(buffer, length, 0, wtime);
-  delete wtime;
-  if (readLength <= 0) {
-    if (readLength < 0) {
-#ifdef WIN32
-      errno = WSAGetLastError();
-#endif
-    } else {
-      errno = EWOULDBLOCK;
-    }
-    FWKEXCEPTION("Failed to read string from socket, errno: " << errno);
-  }
-  //  FWKDEBUG( "Received " << buffer );
-  return buffer;
-}
-
-IpcMsg IpcHandler::getIpcMsg(int32_t waitSeconds, std::string &str) {
-  IpcMsg msg = readIpcMsg(waitSeconds);
-  switch (msg) {
-    case IPC_PING:
-    case IPC_NULL:  // null should never be seen here
-    case IPC_ACK:
-    case IPC_EXITING:
-      break;  // nothing required
-    case IPC_DONE:
-    case IPC_RUN:  // Need to read the rest
-      str = readString(waitSeconds);
-      if (!str.empty()) sendIpcMsg(IPC_ACK);
-      break;
-    case IPC_ERROR:
-    case IPC_EXIT:
-      sendIpcMsg(IPC_ACK);
-      break;
-  }
-  return msg;
-}
-
-IpcMsg IpcHandler::getIpcMsg(int32_t waitSeconds) {
-  IpcMsg msg = readIpcMsg(waitSeconds);
-  switch (msg) {
-    case IPC_PING:
-    case IPC_NULL:  // null should never be seen here
-    case IPC_ACK:
-    case IPC_EXITING:
-      break;  // nothing required
-    case IPC_DONE:
-    case IPC_RUN:  // Need to read the rest
-      break;
-    case IPC_ERROR:
-    case IPC_EXIT:
-      sendIpcMsg(IPC_ACK);
-      break;
-  }
-  return msg;
-}
-
-bool IpcHandler::sendIpcMsg(IpcMsg msg, int32_t waitSeconds) {
-  int32_t writeInt = htonl(msg);
-  //  FWKDEBUG( "Sending " << ( int32_t )msg );
-  ACE_Time_Value tv(waitSeconds, 1000);
-  auto wrote = m_io->send(&writeInt, 4, &tv);
-  if (wrote == -1) {
-#ifdef WIN32
-    errno = WSAGetLastError();
-#endif
-    if (errno > 0) {
-      FWKEXCEPTION("Send failure, error: " << errno);
-    }
-  }
-  if (wrote == 4) {
-    switch (msg) {
-      case IPC_NULL:
-      case IPC_ERROR:
-      case IPC_ACK:
-      case IPC_RUN:
-      case IPC_DONE:
-        return true;
-      case IPC_EXITING:
-      case IPC_PING:
-      case IPC_EXIT:
-        msg = getIpcMsg(60);
-        if (msg == IPC_ACK) return true;
-        break;
-    }
-  }
-  return false;
-}
-
-bool IpcHandler::sendBuffer(IpcMsg msg, const char *str) {
-  auto length = static_cast<int32_t>(strlen(str));
-  char *buffer = checkBuffer(length);
-  *reinterpret_cast<IpcMsg *>(buffer) = static_cast<IpcMsg>(htonl(msg));
-  *reinterpret_cast<int32_t *>(buffer + 4) = htonl(length);
-  strncpy((buffer + 8), str, length - 8);
-
-  //  FWKDEBUG( "Sending " << ( int32_t )msg << "  and string: " << str );
-  length += 8;
-  auto wrote = m_io->send(buffer, length);
-  if (wrote == -1) {
-#ifdef WIN32
-    errno = WSAGetLastError();
-#endif
-    if (errno > 0) {
-      FWKEXCEPTION("Send failure, error: " << errno);
-    }
-  }
-  if (wrote == length) {
-    if (getIpcMsg(180) != IPC_ACK) {
-      FWKEXCEPTION("Send was not ACK'ed.");
-    }
-    return true;
-  }
-  FWKEXCEPTION("Tried to write " << length << " bytes, only wrote " << wrote);
-}
-
-}  // namespace testframework
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
diff --git a/tests/cpp/fwklib/IpcHandler.hpp b/tests/cpp/fwklib/IpcHandler.hpp
deleted file mode 100644
index 33579fb..0000000
--- a/tests/cpp/fwklib/IpcHandler.hpp
+++ /dev/null
@@ -1,91 +0,0 @@
-#pragma once
-
-#ifndef GEODE_FWKLIB_IPCHANDLER_H_
-#define GEODE_FWKLIB_IPCHANDLER_H_
-
-/*
- * 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.
- */
-
-#include <cstdint>
-#include <string>
-
-#include <ace/OS.h>
-#include <ace/SOCK_Stream.h>
-
-#include <geode/internal/geode_base.hpp>
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace testframework {
-
-enum IpcMsg {
-  IPC_NULL = 0xabc0,
-  IPC_EXITING = 0xabc1,  // no response, client is exiting
-  IPC_ERROR = 0xabc2,    // never sent
-  IPC_ACK = 0xabc3,      // c<>d : single byte, no response
-  IPC_PING = 0xabc4,     // d->c : single byte, no response
-  //  IPC_STOP = 0xabc5, // d->c : single byte, expect ack
-  IPC_EXIT = 0xabc6,  // d->c : single byte, expect ack
-  IPC_RUN = 0xabc7,   // d->c : task id, expect ack
-                      //  IPC_SYNC = 0xabc8, // c->d : single byte, expect ack
-                      //  IPC_GO = 0xabc9,   // d->c : single byte, expect ack
-  IPC_DONE = 0xabca   // c->d : single byte, expect ack
-};
-
-class IpcHandler {
- private:
-  ACE_SOCK_Stream *m_io;
-
-  bool checkPipe();
-  int32_t readInt(int32_t waitSeconds);
-  bool sendIpcMsg(IpcMsg msg, int32_t waitSeconds = 0);
-  bool sendBuffer(IpcMsg msg, const char *str);
-  std::string readString(int32_t waitSeconds);
-  IpcMsg readIpcMsg(int32_t waitSeconds);
-
- public:
-  explicit IpcHandler(const ACE_INET_Addr &driver, int32_t maxWaitSecs = 0);
-
-  inline explicit IpcHandler(ACE_SOCK_Stream *io) : m_io(io) {
-    ACE_OS::signal(SIGPIPE, SIG_IGN);  // Ignore broken pipe
-  }
-
-  ~IpcHandler();
-
-  void close();
-
-  IpcMsg getIpcMsg(int32_t waitSeconds, std::string &result);
-  IpcMsg getIpcMsg(int32_t waitSeconds);
-  char *checkBuffer(int32_t size);
-
-  bool sendTask(char *task) { return sendBuffer(IPC_RUN, task); }
-
-  bool sendResult(char *result) { return sendBuffer(IPC_DONE, result); }
-
-  inline bool sendExit() {
-    return sendIpcMsg(IPC_EXIT);
-    close();
-  }
-};
-
-}  // namespace testframework
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_FWKLIB_IPCHANDLER_H_
diff --git a/tests/cpp/fwklib/Service.cpp b/tests/cpp/fwklib/Service.cpp
deleted file mode 100644
index 0cb6b4d..0000000
--- a/tests/cpp/fwklib/Service.cpp
+++ /dev/null
@@ -1,75 +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.
- */
-
-#include "Service.hpp"
-
-#include <fwklib/FwkLog.hpp>
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace testframework {
-
-Service::Service(int32_t threadCnt)
-    : m_ThreadCount(threadCnt), m_run(true), m_Mutex() {
-  int32_t forceActive = 1;
-
-  int32_t flags =
-      THR_NEW_LWP | THR_JOINABLE | THR_CANCEL_ENABLE | THR_CANCEL_ASYNCHRONOUS;
-
-#ifndef WIN32
-  flags |= THR_INHERIT_SCHED;
-#endif
-
-  m_busy = 0;
-  activate(flags, threadCnt, forceActive);
-}
-
-int32_t Service::svc() {
-  while (m_run) {
-    ServiceTask* task = getQ();
-    if (task) {
-      try {
-        task->initialize();
-        task->doTask();
-        task->finalize();
-      } catch (FwkException& ex) {
-        FWKERROR("Service: Caught exception in svc: " << ex.what());
-      } catch (...) {
-        FWKERROR("Service: Caught exception in svc.");
-      }
-      m_busy--;
-    }
-  }
-  return 0;
-}
-
-int32_t Service::runThreaded(ServiceTask* task, uint32_t threads) {
-  uint32_t avail = getIdleCount();
-  if (threads > avail) {
-    threads = avail;
-  }
-  task->setRunFlag(&m_run);
-  putQ(task, threads);
-
-  return threads;
-}
-
-}  // namespace testframework
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
diff --git a/tests/cpp/fwklib/Service.hpp b/tests/cpp/fwklib/Service.hpp
deleted file mode 100644
index fea7d71..0000000
--- a/tests/cpp/fwklib/Service.hpp
+++ /dev/null
@@ -1,166 +0,0 @@
-#pragma once
-
-#ifndef GEODE_FWKLIB_SERVICE_H_
-#define GEODE_FWKLIB_SERVICE_H_
-
-/*
- * 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.
- */
-
-#include <atomic>
-#include <fwklib/FwkLog.hpp>
-#include <string>
-
-#include <ace/Condition_T.h>
-#include <ace/Task.h>
-
-#include <geode/internal/geode_base.hpp>
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace testframework {
-
-class SharedTaskObject {
- public:
-  SharedTaskObject() {}
-
-  virtual ~SharedTaskObject() {}
-
-  virtual void initialize() = 0;
-  virtual void finalize() = 0;
-};
-
-class ServiceTask {
- protected:
-  volatile bool* m_run;
-  SharedTaskObject* m_shared;
-
- public:
-  explicit ServiceTask(SharedTaskObject* shared)
-      : m_run(nullptr), m_shared(shared) {}
-
-  virtual ~ServiceTask() {}
-
-  void setRunFlag(volatile bool* run) { m_run = run; }
-  virtual int32_t doTask() = 0;
-  virtual void initialize() = 0;
-  virtual void finalize() = 0;
-};
-
-class Service : public ACE_Task_Base {
- private:
-  uint32_t m_ThreadCount;
-  volatile bool m_run;
-  std::atomic<uint32_t> m_busy;
-  ACE_Thread_Mutex m_Mutex;
-  ACE_DLList<ServiceTask> m_TaskQueue;
-
-  int32_t svc();
-
-  inline void putQ(ServiceTask* task, uint32_t cnt = 1) {
-    ACE_Guard<ACE_Thread_Mutex> guard(m_Mutex);
-    m_busy += cnt;
-    for (uint32_t i = 0; i < cnt; i++) m_TaskQueue.insert_tail(task);
-  }
-
-  inline ServiceTask* getQ() {
-    ACE_Guard<ACE_Thread_Mutex> guard(m_Mutex);
-    return m_TaskQueue.delete_head();
-  }
-
- public:
-  explicit Service(int32_t threadCnt);
-
-  inline ~Service() { stopThreads(); }
-
-  int32_t runThreaded(ServiceTask* task, uint32_t threads);
-
-  inline uint32_t getBusyCount() { return m_busy; }
-  inline uint32_t getIdleCount() { return m_ThreadCount - m_busy; }
-
-  inline void stopThreads() {
-    m_run = false;
-    wait();
-  }
-};
-
-template <class T>
-class SafeQueue {
-  ACE_Thread_Mutex m_mutex;
-  ACE_DLList<T> m_queue;
-  ACE_Condition<ACE_Thread_Mutex> m_cond;
-
- public:
-  SafeQueue() : m_mutex(), m_cond(m_mutex) {}
-  ~SafeQueue() {}
-
-  void enqueue(T* val) {
-    ACE_Guard<ACE_Thread_Mutex> guard(m_mutex);
-    m_queue.insert_tail(val);
-    m_cond.signal();
-  }
-
-  T* dequeue() {
-    ACE_Guard<ACE_Thread_Mutex> guard(m_mutex);
-    if (m_queue.size() == 0) {
-      ACE_Time_Value until(2);
-      until += ACE_OS::gettimeofday();
-      ;
-      int32_t res = m_cond.wait(&until);
-      if (res == -1) return nullptr;
-    }
-    return m_queue.delete_head();
-  }
-
-  bool isEmpty() {
-    ACE_Guard<ACE_Thread_Mutex> guard(m_mutex);
-    return m_queue.isEmpty();
-  }
-
-  uint32_t size() {
-    ACE_Guard<ACE_Thread_Mutex> guard(m_mutex);
-    return static_cast<uint32_t>(m_queue.size());
-  }
-};
-
-class IPCMessage {
- protected:
-  std::string m_msg;
-
- public:
-  IPCMessage() {}
-  explicit IPCMessage(std::string content) { m_msg = content; }
-
-  virtual ~IPCMessage() {}
-
-  std::string& what() { return m_msg; }
-
-  uint32_t length() { return static_cast<uint32_t>(m_msg.size()); }
-
-  const char* getContent() { return m_msg.c_str(); }
-
-  void setMessage(std::string& content) { m_msg = content; }
-
-  virtual void clear() { m_msg.clear(); }
-};
-
-}  // namespace testframework
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_FWKLIB_SERVICE_H_
diff --git a/tests/cpp/fwklib/TcpIpc.cpp b/tests/cpp/fwklib/TcpIpc.cpp
deleted file mode 100644
index 128966b..0000000
--- a/tests/cpp/fwklib/TcpIpc.cpp
+++ /dev/null
@@ -1,205 +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.
- */
-
-#include "TcpIpc.hpp"
-
-#include <errno.h>
-#include <memory.h>
-
-#include <chrono>
-#include <fwklib/FwkLog.hpp>
-#include <thread>
-
-#include <ace/INET_Addr.h>
-#include <ace/OS.h>
-#include <ace/SOCK_Acceptor.h>
-#include <ace/SOCK_Connector.h>
-#include <ace/SOCK_IO.h>
-
-#include "config.h"
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace testframework {
-
-void TcpIpc::clearNagle(ACE_HANDLE sock) {
-  int32_t val = 1;
-  char *param = reinterpret_cast<char *>(&val);
-  int32_t plen = sizeof(val);
-
-  if (0 != ACE_OS::setsockopt(sock, IPPROTO_TCP, 1, param, plen)) {
-    FWKSEVERE("Failed to set NAGLE on socket.  Errno: " << errno);
-  }
-}
-
-int32_t TcpIpc::getSize(ACE_HANDLE sock, int32_t flag) {
-  int32_t val = 0;
-  auto *param = reinterpret_cast<char *>(&val);
-  int32_t plen = sizeof(val);
-
-  if (0 != ACE_OS::getsockopt(sock, SOL_SOCKET, flag, param, &plen)) {
-    FWKSEVERE("Failed to get buff size for flag "
-              << flag << " on socket.  Errno: " << errno);
-  }
-#ifdef _LINUX
-  val /= 2;
-#endif
-  return val;
-}
-
-int32_t TcpIpc::setSize(ACE_HANDLE sock, int32_t flag, int32_t size) {
-  int32_t val = 0;
-  if (size <= 0) return 0;
-
-  auto *param = reinterpret_cast<char *>(&val);
-  int32_t plen = sizeof(val);
-
-  int32_t inc = 32120;
-  val = size - (3 * inc);
-  if (val < 0) val = 0;
-  int32_t red = 0;
-  int32_t lastRed = -1;
-  while (lastRed != red) {
-    lastRed = red;
-    val += inc;
-    ACE_OS::setsockopt(sock, SOL_SOCKET, flag, param, plen);
-    if (0 != ACE_OS::getsockopt(sock, SOL_SOCKET, flag, param, &plen)) {
-      FWKSEVERE("Failed to get buff size for flag "
-                << flag << " on socket.  Errno: " << errno);
-    }
-#ifdef _LINUX
-    val /= 2;
-#endif
-    if (val < size) red = val;
-  }
-  return val;
-}
-
-void TcpIpc::init(int32_t sockBufferSize) {
-  auto sock = ACE_OS::socket(AF_INET, SOCK_STREAM, 0);
-  if (sock < 0) {
-    FWKSEVERE("Failed to create socket.  Errno: " << errno);
-  }
-
-  if (sockBufferSize > 0) {
-    clearNagle(sock);
-
-    setSize(sock, SO_SNDBUF, sockBufferSize);
-    setSize(sock, SO_RCVBUF, sockBufferSize);
-  }
-  m_io = new ACE_SOCK_Stream(sock);
-  ACE_OS::signal(SIGPIPE, SIG_IGN);  // Ignore broken pipe
-}
-
-bool TcpIpc::listen(int32_t waitSecs) {
-  if (m_ipaddr.empty()) {
-    FWKSEVERE("Listen failed, address not set.");
-    return false;
-  }
-  ACE_INET_Addr addr(m_ipaddr.c_str());
-  ACE_SOCK_Acceptor listener(addr, 1);
-
-  if (listener.accept(*m_io, nullptr, new ACE_Time_Value(waitSecs)) != 0) {
-    FWKSEVERE("Accept failed with errno: " << errno);
-    return false;
-  }
-  return true;
-}
-
-bool TcpIpc::accept(ACE_SOCK_Acceptor *acceptor, int32_t waitSecs) {
-  if (acceptor->accept(*m_io, nullptr, new ACE_Time_Value(waitSecs)) != 0) {
-    FWKSEVERE("Accept failed with errno: " << errno);
-    return false;
-  }
-  return true;
-}
-
-bool TcpIpc::connect(int32_t waitSecs) {
-  if (m_ipaddr.empty()) {
-    FWKSEVERE("Connect failed, address not set.");
-    return false;
-  }
-  ACE_INET_Addr driver(m_ipaddr.c_str());
-  ACE_SOCK_Connector conn;
-  int32_t retVal = -1;
-  while ((retVal == -1) && (waitSecs-- > 0)) {
-    std::this_thread::sleep_for(std::chrono::seconds(1));
-    errno = 0;
-    retVal = conn.connect(*m_io, driver);
-  }
-  if (retVal == -1) {
-    FWKSEVERE("Attempt to connect failed, errno: " << errno);
-    return false;
-  }
-  return true;
-}
-
-TcpIpc::~TcpIpc() { close(); }
-
-void TcpIpc::close() {
-  if (m_io != nullptr) {
-    m_io->close();
-    delete m_io;
-    m_io = nullptr;
-  }
-}
-
-int32_t TcpIpc::readBuffer(char **buffer, int32_t waitSecs) {
-  ACE_Time_Value wtime(waitSecs);
-  iovec buffs;
-  buffs.iov_base = nullptr;
-  buffs.iov_len = 0;
-  int32_t red = static_cast<int32_t>(m_io->recvv(&buffs, &wtime));
-  if ((red == -1) && ((errno == ECONNRESET) || (errno == EPIPE))) {
-    FWKEXCEPTION("During attempt to read: Connection failure errno: " << errno);
-  }
-  if (red == -1) {
-  }
-  *buffer = reinterpret_cast<char *>(buffs.iov_base);
-  return buffs.iov_len;
-}
-
-int32_t TcpIpc::sendBuffers(int32_t cnt, char *buffers[], int32_t lengths[],
-                            int32_t waitSecs) {
-  ACE_Time_Value wtime(waitSecs);
-  int32_t tot = 0;
-  if (cnt > 2) {
-    FWKEXCEPTION("During attempt to write: Too many buffers passed in.");
-  }
-  iovec buffs[2];
-  for (int32_t idx = 0; idx < cnt; idx++) {
-    buffs[idx].iov_base = buffers[idx];
-    buffs[idx].iov_len = lengths[idx];
-    tot += lengths[idx];
-  }
-  int32_t wrote = static_cast<int32_t>(m_io->sendv(buffs, cnt, &wtime));
-  if ((wrote == -1) && ((errno == ECONNRESET) || (errno == EPIPE))) {
-    FWKEXCEPTION(
-        "During attempt to write: Connection failure errno: " << errno);
-  }
-  if (tot != wrote) {
-    FWKSEVERE("Failed to write all bytes attempted, wrote "
-              << wrote << ", attempted " << tot);
-  }
-  return wrote;
-}
-
-}  // namespace testframework
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
diff --git a/tests/cpp/fwklib/TcpIpc.hpp b/tests/cpp/fwklib/TcpIpc.hpp
deleted file mode 100644
index affea43..0000000
--- a/tests/cpp/fwklib/TcpIpc.hpp
+++ /dev/null
@@ -1,82 +0,0 @@
-#pragma once
-
-#ifndef GEODE_FWKLIB_TCPIPC_H_
-#define GEODE_FWKLIB_TCPIPC_H_
-
-/*
- * 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.
- */
-
-#include <cstdint>
-#include <string>
-
-#include <ace/SOCK_Acceptor.h>
-#include <ace/SOCK_Stream.h>
-
-#include <geode/internal/geode_base.hpp>
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace testframework {
-
-class TcpIpc {
- private:
-  ACE_SOCK_Stream* m_io;
-  std::string m_ipaddr;
-
-  void init(int32_t sockBufferSize = 0);
-  void clearNagle(ACE_HANDLE sock);
-  int32_t setSize(ACE_HANDLE sock, int32_t flag, int32_t size);
-  int32_t getSize(ACE_HANDLE sock, int32_t flag);
-
- public:
-  explicit TcpIpc(std::string& ipaddr, int32_t sockBufferSize = 0)
-      : m_ipaddr(ipaddr) {
-    init(sockBufferSize);
-  }
-  explicit TcpIpc(char* ipaddr, int32_t sockBufferSize = 0) : m_ipaddr(ipaddr) {
-    init(sockBufferSize);
-  }
-
-  explicit TcpIpc(int32_t sockBufferSize = 0) { init(sockBufferSize); }
-
-  ~TcpIpc();
-
-  void close();
-
-  bool listen(int32_t waitSecs = 0);
-  bool accept(ACE_SOCK_Acceptor* acceptor, int32_t waitSecs = 0);
-  bool connect(int32_t waitSecs = 0);
-
-  int32_t readBuffer(char** buffer, int32_t waitSecs = 0);
-  int32_t sendBuffer(char* buffer, int32_t length, int32_t waitSecs = 0) {
-    char* buffs[1];
-    buffs[0] = buffer;
-    int32_t lengths[1];
-    lengths[0] = length;
-    return sendBuffers(1, buffs, lengths, waitSecs);
-  }
-  int32_t sendBuffers(int32_t cnt, char* buffers[], int32_t lengths[],
-                      int32_t waitSecs = 0);
-};
-
-}  // namespace testframework
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_FWKLIB_TCPIPC_H_
diff --git a/tests/cpp/fwklib/TimeBomb.cpp b/tests/cpp/fwklib/TimeBomb.cpp
deleted file mode 100644
index 59ad3ee..0000000
--- a/tests/cpp/fwklib/TimeBomb.cpp
+++ /dev/null
@@ -1,140 +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.
- */
-
-#include <chrono>
-#include <fwklib/FwkLog.hpp>
-#include <fwklib/TimeBomb.hpp>
-#include <thread>
-
-#include <geode/internal/geode_globals.hpp>
-
-#include "config.h"
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace testframework {
-
-int32_t TimeBomb::svc() {
-  while (!m_stop) {
-    if (m_armed) {
-      if (m_endOfLife < ACE_OS::gettimeofday()) {
-        if (m_msg.length() > 0) {
-          FWKSEVERE("Timeout failure has occurred, waited "
-                    << m_seconds << " seconds. " << m_msg);
-        } else {
-          FWKSEVERE("Timeout failure has occurred, waited " << m_seconds
-                                                            << " seconds.");
-        }
-
-#if defined(_SOLARIS)
-
-        int32_t pid = ACE_OS::getpid();
-        char buf[8192];
-        sprintf(buf, "bash -c \"pstack %d\"", pid);
-        FILE* pip = popen(buf, "r");
-        if (!pip) {
-          FWKSEVERE("TimeBomb: Unable to dump threads.");
-        } else {
-          std::this_thread::sleep_for(std::chrono::seconds(10));
-
-          std::string dump;
-          buf[0] = 0;
-          while (fgets(buf, 8192, pip)) {
-            dump.append(buf);
-            buf[0] = 0;
-          }
-          dump.append(buf);
-          pclose(pip);
-
-          FWKSEVERE("TimeBomb reports these threads in process:"
-                    << dump << "End of dump.\n");
-        }
-
-#endif
-
-#if defined(_LINUX)
-
-        int32_t pid = ACE_OS::getpid();
-        char buf[8192];
-        sprintf(buf,
-                "bash -c \"perl $GEODE_NATIVE_HOME/../framework/scripts/gdb.pl "
-                "%d ; cat "
-                "gdbout.%d\"",
-                pid, pid);
-        FILE* pip = popen(buf, "r");
-        if (!pip) {
-          FWKSEVERE("TimeBomb: Unable to dump threads.");
-        } else {
-          std::this_thread::sleep_for(std::chrono::seconds(10));
-
-          std::string dump;
-          buf[0] = 0;
-          while (fgets(buf, 8192, pip)) {
-            dump.append(buf);
-            buf[0] = 0;
-          }
-          dump.append(buf);
-          pclose(pip);
-
-          FWKSEVERE("TimeBomb reports these threads in process:"
-                    << dump << "End of dump.\n");
-        }
-
-#elif defined(_WIN32)
-
-        int32_t pid = ACE_OS::getpid();
-        char buf[8192];
-
-        sprintf(buf,
-                "bash -c \"perl $GEODE_NATIVE_HOME/../framework/scripts/cdb.pl "
-                "%d\"",
-                pid);
-        FILE* pip = _popen(buf, "r");
-        if (!pip) {
-          FWKSEVERE("TimeBomb: Unable to dump threads.");
-        } else {
-          std::this_thread::sleep_for(std::chrono::seconds(20));
-
-          std::string dump;
-          buf[0] = 0;
-          while (fgets(buf, 8192, pip)) {
-            dump.append(buf);
-            buf[0] = 0;
-          }
-          dump.append(buf);
-          _pclose(pip);
-
-          FWKSEVERE("TimeBomb reports these threads in process:"
-                    << dump << "End of dump.\n");
-        }
-
-#endif
-
-        FWKSEVERE("Will now abort by calling exit( " << m_exitCode << " ).");
-        exit(m_exitCode);
-      }
-    }
-    std::this_thread::sleep_for(std::chrono::seconds(1));
-  }
-  return 0;
-}
-
-}  // namespace testframework
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
diff --git a/tests/cpp/fwklib/TimeBomb.hpp b/tests/cpp/fwklib/TimeBomb.hpp
deleted file mode 100644
index bfb9650..0000000
--- a/tests/cpp/fwklib/TimeBomb.hpp
+++ /dev/null
@@ -1,86 +0,0 @@
-#pragma once
-
-#ifndef GEODE_FWKLIB_TIMEBOMB_H_
-#define GEODE_FWKLIB_TIMEBOMB_H_
-
-/*
- * 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.
- */
-
-#include <fwklib/FwkLog.hpp>
-
-#include <ace/OS.h>
-#include <ace/Task.h>
-#include <ace/Time_Value.h>
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace testframework {
-
-class TimeBomb : public ACE_Task_Base {
- private:
-  bool m_stop;
-  bool m_armed;
-  ACE_Time_Value m_endOfLife;
-  int32_t m_seconds;
-  int32_t m_exitCode;
-  std::string m_msg;
-
-  int32_t svc();
-
- public:
-  inline TimeBomb(uint32_t seconds, int32_t exitCode, const std::string& msg)
-      : m_stop(false), m_armed(false) {
-    arm(seconds, exitCode, msg);
-    activate();
-  }
-
-  inline TimeBomb()
-      : m_stop(false), m_armed(false), m_seconds(0), m_exitCode(-1) {}
-
-  inline ~TimeBomb() {
-    m_armed = false;
-    m_stop = true;
-    wait();
-  }
-
-  inline void arm(uint32_t seconds, int32_t exitCode, const std::string& msg) {
-    //      FWKINFO( "Timebomb set for " << seconds << " seconds." );
-    m_seconds = seconds;
-    m_exitCode = exitCode;
-    m_msg = msg;
-    m_endOfLife = ACE_OS::gettimeofday() + ACE_Time_Value(m_seconds);
-    m_armed = true;
-    char tbuf[64];
-    const time_t tsec = static_cast<const time_t>(m_endOfLife.sec());
-    ACE_OS::ctime_r(&tsec, tbuf, 64);
-    for (int32_t len = static_cast<int32_t>(strlen(tbuf)); len >= 0; len--) {
-      if ((tbuf[len] == '\n') || (tbuf[len] == '\r')) {
-        tbuf[len] = ' ';
-      }
-    }
-    FWKINFO("Timebomb set for: " << tbuf);
-  }
-  inline void disarm() { m_armed = false; }
-};
-
-}  // namespace testframework
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_FWKLIB_TIMEBOMB_H_
diff --git a/tests/cpp/fwklib/UDPIpc.cpp b/tests/cpp/fwklib/UDPIpc.cpp
deleted file mode 100644
index 11fc656..0000000
--- a/tests/cpp/fwklib/UDPIpc.cpp
+++ /dev/null
@@ -1,369 +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.
- */
-
-#include "UDPIpc.hpp"
-
-#include <sstream>
-#include <string>
-#include <vector>
-
-#include "FwkStrCvt.hpp"
-#include "GsRandom.hpp"
-#include "config.h"
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace testframework {
-
-bool UDPMessage::ping(ACE_SOCK_Dgram& io, ACE_INET_Addr& who) {
-  clear();
-  setCmd(ACK_REQUEST);
-  setSender(who);
-  return send(io);
-}
-
-std::string UDPMessage::dump(int32_t max) {
-  char buf[1024];
-  std::string dmp("Dump of message parts: ");
-  sprintf(buf, "\nTag: %u\nCmd: %u  %s\nId: %u\nLength: %u\nMessage:\n",
-          m_hdr.tag, m_hdr.cmd, cmdString(m_hdr.cmd), m_hdr.id,
-          ntohl(m_hdr.length));
-  dmp += buf;
-  if (!m_msg.empty()) {
-    if (max > 0) {
-      dmp += m_msg.substr(0, max);
-    } else {
-      dmp += m_msg;
-    }
-  } else {
-    dmp += "No Message.";
-  }
-  dmp += "\nEnd of Dump";
-  return dmp;
-}
-
-bool UDPMessage::receiveFrom(ACE_SOCK_Dgram& io,
-                             const ACE_Time_Value* timeout) {
-  bool ok = true;
-  ACE_Time_Value wait(2);
-  if (!timeout) {
-    timeout = &wait;
-  }
-  iovec buffs;
-  int32_t red = static_cast<int32_t>(io.recv(&buffs, m_sender, 0, timeout));
-  if (red < 0) {
-    if (errno != ETIME) {
-      FWKEXCEPTION("UDPMessage::receiveFrom: Failed, errno: " << errno);
-    }
-    return false;
-  }
-  uint32_t len = buffs.iov_len;
-  if (len < UDP_HEADER_SIZE) {  // We must at least have a header
-    FWKEXCEPTION("UDPMessage::receiveFrom: Failed, header length: " << len);
-  }
-  clear();
-  memcpy(&m_hdr, buffs.iov_base, UDP_HEADER_SIZE);
-  if (m_hdr.tag != UDP_MSG_TAG) {
-    FWKEXCEPTION("UDPMessage::receiveFrom: Failed, invalid tag: " << m_hdr.tag);
-  }
-  char* ptr = reinterpret_cast<char*>(buffs.iov_base);
-  ptr += UDP_HEADER_SIZE;
-  len -= UDP_HEADER_SIZE;
-  uint32_t sent = ntohl(m_hdr.length);
-  if (sent != len) {
-    FWKEXCEPTION("UDPMessage::receiveFrom: Failed, expected "
-                 << sent << " bytes, received " << len);
-  }
-  if (len > 0) {
-    m_msg = std::string(ptr, len);
-  }
-  delete[] reinterpret_cast<char*>(buffs.iov_base);
-  // FWKINFO( "UDPMessage::receiveFrom: " << dump( 50 ) );;
-  if (needToAck()) {
-    UDPMessage ack(ACK);
-    ok = (ok && ack.sendTo(io, m_sender));
-  }
-  return ok;
-}
-
-bool UDPMessage::sendTo(ACE_SOCK_Dgram& io, ACE_INET_Addr& who) {
-  setSender(who);
-  return send(io);
-}
-
-bool UDPMessage::send(ACE_SOCK_Dgram& io) {
-  bool ok = true;
-  int32_t tot = 0;
-  int32_t vcnt = 1;
-  iovec buffs[2];
-  m_hdr.length = 0;
-  buffs[0].iov_base = reinterpret_cast<char*>(&m_hdr);
-  buffs[0].iov_len = UDP_HEADER_SIZE;
-  tot += UDP_HEADER_SIZE;
-  if (!m_msg.empty()) {
-    auto len = static_cast<uint32_t>(m_msg.size());
-    m_hdr.length = htonl(len);
-    buffs[1].iov_base = const_cast<char*>(m_msg.c_str());
-    buffs[1].iov_len = len;
-    vcnt = 2;
-    tot += len;
-  }
-  // FWKINFO( "UDPMessage::send: " << dump( 50 ) );;
-  int32_t sent = static_cast<int32_t>(io.send(buffs, vcnt, m_sender));
-  if (sent < 0) {
-    FWKEXCEPTION("UDPMessage::send: Failed, errno: " << errno);
-  }
-  if (sent != tot) {
-    ok = false;
-    FWKSEVERE("UDPMessage::send: Failed to completely send, " << sent << ", "
-                                                              << tot);
-  }
-  if (needToAck()) {
-    UDPMessage ack;
-    ok = (ok && ack.receiveFrom(io));
-  }
-  return ok;
-}
-
-UDPMessageClient::UDPMessageClient(std::string server)
-    : m_server(server.c_str()) {
-  int32_t result = -1;
-  int32_t tries = 100;
-  ACE_INET_Addr* client = new ACE_INET_Addr();
-  while ((result < 0) && (tries > 0)) {
-    uint32_t port = GsRandom::random(1111u, 31111u) + tries;
-    client->set(port, "localhost");
-    result = m_io.open(*client);
-  }
-  delete client;
-  if (result < 0) {
-    FWKEXCEPTION("Client failed to open io, " << errno);
-  }
-  const ACE_Time_Value timeout(20);
-  UDPMessage msg;
-  tries = 3;
-  bool pingMsg = false;
-  while (!pingMsg && tries-- > 0) {
-    try {
-      pingMsg = msg.ping(m_io, m_server);
-    } catch (...) {
-      continue;
-    }
-  }
-  if (pingMsg) {
-    // if ( msg.ping( m_io, m_server ) ) {
-    msg.setSender(m_server);
-    bool connectionOK = false;
-    tries = 10;
-    while (!connectionOK && (--tries > 0)) {
-      try {
-        msg.clear();
-        msg.setCmd(ADDR_REQUEST);
-        if (msg.sendTo(m_io, m_server)) {
-          if (msg.receiveFrom(m_io, &timeout)) {
-            std::string newConn = msg.what();
-            ACE_INET_Addr conn(newConn.c_str());
-            if (msg.ping(m_io, conn)) {  // We have a working addr
-              m_server = conn;
-              connectionOK = true;
-              tries = 0;
-            }
-          }
-        }
-      } catch (...) {
-        continue;
-      }
-    }
-    if (!connectionOK) {
-      FWKEXCEPTION(
-          "UDPMessageClient failed to establish connection to server.");
-    }
-  } else {
-    FWKEXCEPTION("Failed to contact " << server);
-  }
-}
-
-int32_t Receiver::doTask() {
-  auto msg = std::unique_ptr<UDPMessage>(new UDPMessage());
-  UDPMessage cmsg;
-  try {
-    while (*m_run) {
-      if (isListener()) {
-        cmsg.clear();
-        ACE_Time_Value wait(30);  // Timeout is relative time.
-        if (cmsg.receiveFrom(*m_io, &wait)) {
-          if (cmsg.getCmd() == ADDR_REQUEST) {
-            auto&& addr = m_addrs.front();
-            m_addrs.pop_front();
-            m_addrs.push_back(addr);
-            cmsg.clear();
-            cmsg.setMessage(addr);
-            cmsg.setCmd(ADDR_RESPONSE);
-            cmsg.send(*m_io);
-          }
-        }
-      } else {
-        msg->clear();
-        ACE_Time_Value timeout(2);
-        if (msg->receiveFrom(
-                *m_io, &timeout)) {  // Timeout is relative time, send ack.
-          if (msg->getCmd() == ADDR_REQUEST) {
-            auto&& addr = m_addrs.front();
-            m_addrs.pop_front();
-            m_addrs.push_back(addr);
-            cmsg.clear();
-            cmsg.setMessage(addr);
-            cmsg.setCmd(ADDR_RESPONSE);
-            cmsg.send(*m_io);
-          }
-          if (msg->length() > 0) {
-            m_queues->putInbound(msg.release());
-            msg.reset(new UDPMessage());
-          }
-        }
-      }
-    }
-  } catch (FwkException& ex) {
-    FWKSEVERE("Receiver::doTask() caught exception: " << ex.what());
-  } catch (...) {
-    FWKSEVERE("Receiver::doTask() caught unknown exception");
-  }
-  return 0;
-}
-
-void Receiver::initialize() {
-  int32_t tries = 100;
-  uint16_t port = m_basePort;
-  int32_t lockResult = m_mutex.tryacquire();
-  int32_t result = -1;
-  if (lockResult != -1) {  // The listener thread
-    ACE_INET_Addr addr(port, "localhost");
-    m_listener = ACE_Thread::self();
-    result = m_io->open(addr);
-  } else {
-    while ((result < 0) && (--tries > 0)) {
-      port += ++m_offset;
-      ACE_INET_Addr addr(port, "localhost");
-      result = m_io->open(addr);
-      if (result == 0) {
-        char hbuff[256];
-        char* hst = &hbuff[0];
-        char* fqdn = ACE_OS::getenv("GF_FQDN");
-        if (fqdn) {
-          hst = fqdn;
-        } else {
-          addr.get_host_name(hbuff, 255);
-        }
-        char buff[1024];
-        sprintf(buff, "%s:%u", hst, port);
-        m_addrs.push_back(buff);
-      }
-    }
-  }
-  if (result < 0) {
-    FWKEXCEPTION("Server failed to open io, " << errno << ", on port " << port);
-  }
-}
-
-int32_t STReceiver::doTask() {
-  auto msg = std::unique_ptr<UDPMessage>(new UDPMessage());
-  try {
-    while (*m_run) {
-      msg->clear();
-      ACE_Time_Value timeout(2);  // Timeout is relative time
-      if (msg->receiveFrom(m_io, &timeout)) {
-        if (msg->getCmd() == ADDR_REQUEST) {
-          msg->clear();
-          msg->setMessage(m_addr);
-          msg->setCmd(ADDR_RESPONSE);
-          msg->send(m_io);
-        } else {
-          if (msg->length() > 0) {
-            m_queues->putInbound(msg.release());
-            msg.reset(new UDPMessage());
-          }
-        }
-      }
-    }
-  } catch (FwkException& ex) {
-    FWKSEVERE("STReceiver::doTask() caught exception: " << ex.what());
-  } catch (...) {
-    FWKSEVERE("STReceiver::doTask() caught unknown exception");
-  }
-  return 0;
-}
-
-void STReceiver::initialize() {
-  int32_t result = -1;
-  ACE_INET_Addr addr(m_basePort, "localhost");
-  result = m_io.open(addr);
-  if (result == 0) {
-    char hbuff[256];
-    char* hst = &hbuff[0];
-    char* fqdn = ACE_OS::getenv("GF_FQDN");
-    if (fqdn) {
-      hst = fqdn;
-    } else {
-      addr.get_host_name(hbuff, 255);
-    }
-    char buff[1024];
-    sprintf(buff, "%s:%u", hst, m_basePort);
-    m_addr = buff;
-  }
-  if (result < 0) {
-    FWKEXCEPTION("STReceiver::initialize failed to open io, "
-                 << errno << ", on port " << m_basePort);
-  }
-}
-
-int32_t Responder::doTask() {
-  try {
-    while (*m_run) {
-      UDPMessage* msg = m_queues->getOutbound();
-      if (msg) {
-        msg->send(*m_io);
-        delete msg;
-      }
-    }
-  } catch (FwkException& ex) {
-    FWKSEVERE("Responder::doTask() caught exception: " << ex.what());
-  } catch (...) {
-    FWKSEVERE("Responder::doTask() caught unknown exception");
-  }
-  return 0;
-}
-
-void Responder::initialize() {
-  int32_t result = -1;
-  int32_t tries = 100;
-  while ((result < 0) && (--tries > 0)) {
-    uint16_t port = ++m_offset + 111 + m_basePort;
-    result = m_io->open(ACE_INET_Addr(port, "localhost"));
-    if (result < 0) {
-      FWKWARN("Server failed to open io, " << errno << ", on port " << port);
-    }
-  }
-  if (result < 0) {
-    FWKEXCEPTION("Server failed to open io, " << errno);
-  }
-}
-
-}  // namespace testframework
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
diff --git a/tests/cpp/fwklib/UDPIpc.hpp b/tests/cpp/fwklib/UDPIpc.hpp
deleted file mode 100644
index b4201fe..0000000
--- a/tests/cpp/fwklib/UDPIpc.hpp
+++ /dev/null
@@ -1,300 +0,0 @@
-#pragma once
-
-#ifndef GEODE_FWKLIB_UDPIPC_H_
-#define GEODE_FWKLIB_UDPIPC_H_
-
-/*
- * 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.
- */
-
-#include <atomic>
-#include <list>
-#include <string>
-
-#include <ace/INET_Addr.h>
-#include <ace/SOCK_Dgram.h>
-#include <ace/TSS_T.h>
-#include <ace/Task.h>
-#include <ace/Thread_Mutex.h>
-
-#include "FwkLog.hpp"
-#include "GsRandom.hpp"
-#include "Service.hpp"
-#include "config.h"
-
-#ifdef _WIN32
-
-#define popen _popen
-#define pclose _pclose
-#define MODE "wt"
-
-#else  // linux, et. al.
-
-#include <unistd.h>
-#define MODE "w"
-
-#endif  // WIN32
-
-namespace apache {
-namespace geode {
-namespace client {
-namespace testframework {
-
-#define UDP_HEADER_SIZE 8
-#define UDP_MSG_TAG static_cast<uint8_t>(189)
-
-enum UdpCmds { Null, ACK, ACK_REQUEST, ADDR_REQUEST, ADDR_RESPONSE };
-
-typedef struct {
-  uint8_t tag;
-  uint8_t cmd;
-  uint16_t id;
-  uint32_t length;
-} UdpHeader;
-
-class UDPMessage : public IPCMessage {
- protected:
-  ACE_INET_Addr m_sender;
-  UdpHeader m_hdr;
-
- public:
-  UDPMessage() {
-    clearHdr();
-    m_msg.clear();
-  }
-
-  explicit UDPMessage(UdpCmds cmd) {
-    clearHdr();
-    m_msg.clear();
-    setCmd(cmd);
-  }
-
-  explicit UDPMessage(std::string content) : IPCMessage(content) { clearHdr(); }
-
-  UDPMessage(UDPMessage& msg) : IPCMessage(msg.what()) {
-    clearHdr();
-    setCmd(msg.getCmd());
-  }
-
-  virtual ~UDPMessage() {}
-
-  void setCmd(UdpCmds cmd) { m_hdr.cmd = cmd; }
-
-  UdpCmds getCmd() { return static_cast<UdpCmds>(m_hdr.cmd); }
-
-  ACE_INET_Addr& getSender() { return m_sender; }
-
-  void setSender(ACE_INET_Addr& addr) { m_sender = addr; }
-
-  bool receiveFrom(ACE_SOCK_Dgram& io, const ACE_Time_Value* timeout = nullptr);
-
-  bool sendTo(ACE_SOCK_Dgram& io, ACE_INET_Addr& who);
-
-  bool ping(ACE_SOCK_Dgram& io, ACE_INET_Addr& who);
-
-  bool send(ACE_SOCK_Dgram& io);
-
-  std::string dump(int32_t max = 0);
-
-  bool needToAck() { return (m_hdr.cmd == ACK_REQUEST); }
-
-  const char* cmdString(uint32_t cmd) {
-    const char* UdpStrings[] = {"Null", "ACK", "ACK_REQUEST", "ADDR_REQUEST",
-                                "ADDR_RESPONSE"};
-    if (cmd > 4) {
-      return "UNKNOWN";
-    }
-    return UdpStrings[cmd];
-  }
-
-  void clearHdr() {
-    m_hdr.tag = UDP_MSG_TAG;
-    m_hdr.cmd = 0;
-    m_hdr.id = 0;
-    m_hdr.length = 0;
-  }
-
-  virtual void clear() {
-    clearHdr();
-    m_msg.clear();
-  }
-};
-
-class UDPMessageClient {
- private:
-  ACE_INET_Addr m_server;
-  ACE_SOCK_Dgram m_io;
-
- public:
-  explicit UDPMessageClient(std::string server);
-
-  ~UDPMessageClient() { m_io.close(); }
-
-  ACE_SOCK_Dgram& getConn() { return m_io; }
-
-  ACE_INET_Addr& getServer() { return m_server; }
-};
-
-class UDPMessageQueues : public SharedTaskObject {
- private:
-  std::atomic<int32_t> m_cntInbound;
-  std::atomic<int32_t> m_cntOutbound;
-  std::atomic<int32_t> m_cntProcessed;
-
-  SafeQueue<UDPMessage> m_inbound;
-  SafeQueue<UDPMessage> m_outbound;
-
-  std::string m_label;
-
- public:
-  explicit UDPMessageQueues(std::string label)
-      : m_cntInbound(), m_cntOutbound(0), m_cntProcessed(0), m_label(label) {}
-  ~UDPMessageQueues() {
-    FWKINFO(m_label << "MessageQueues::Inbound   count: " << m_cntInbound);
-    FWKINFO(m_label << "MessageQueues::Processed count: " << m_cntProcessed);
-    FWKINFO(m_label << "MessageQueues::Outbound  count: " << m_cntOutbound);
-    FWKINFO(m_label << "MessageQueues::Inbound  still queued: "
-                    << m_inbound.size());
-    FWKINFO(m_label << "MessageQueues::Outbound still queued: "
-                    << m_outbound.size());
-  }
-
-  void putInbound(UDPMessage* msg) {
-    m_inbound.enqueue(msg);
-    m_cntInbound++;
-  }
-
-  void putOutbound(UDPMessage* msg) {
-    m_outbound.enqueue(msg);
-    m_cntProcessed++;
-  }
-
-  UDPMessage* getInbound() { return m_inbound.dequeue(); }
-
-  UDPMessage* getOutbound() {
-    UDPMessage* msg = m_outbound.dequeue();
-    if (msg) {
-      m_cntOutbound++;
-    }
-    return msg;
-  }
-
-  virtual void initialize() {}
-  virtual void finalize() {}
-};
-
-class Receiver : public ServiceTask {
- private:
-  ACE_TSS<ACE_SOCK_Dgram> m_io;
-  uint16_t m_basePort;
-  ACE_thread_t m_listener;
-  std::atomic<uint16_t> m_offset{0};
-  std::list<std::string> m_addrs;
-  UDPMessageQueues* m_queues;
-  ACE_Thread_Mutex m_mutex;
-
- public:
-  Receiver(UDPMessageQueues* shared, uint16_t port)
-      : ServiceTask(shared), m_basePort(port), m_mutex() {
-    m_listener = ACE_Thread_NULL;
-    m_queues = dynamic_cast<UDPMessageQueues*>(m_shared);
-  }
-
-  virtual ~Receiver() {}
-
-  bool isListener() { return (m_listener == ACE_Thread::self()); }
-
-  int32_t doTask();
-
-  void initialize();
-
-  void finalize() { m_io->close(); }
-};
-
-class STReceiver : public ServiceTask {
- private:
-  ACE_SOCK_Dgram m_io;
-  uint16_t m_basePort;
-  UDPMessageQueues* m_queues;
-  std::string m_addr;
-
- public:
-  STReceiver(UDPMessageQueues* shared, uint16_t port)
-      : ServiceTask(shared), m_basePort(port) {
-    m_queues = dynamic_cast<UDPMessageQueues*>(m_shared);
-  }
-
-  virtual ~STReceiver() {}
-
-  int32_t doTask();
-
-  void initialize();
-
-  void finalize() { m_io.close(); }
-};
-
-class Processor : public ServiceTask {
- private:
-  UDPMessageQueues* m_queues;
-  // UNUSED bool m_sendReply;
-
- public:
-  explicit Processor(UDPMessageQueues* shared) : ServiceTask(shared) {
-    m_queues = dynamic_cast<UDPMessageQueues*>(m_shared);
-  }
-
-  virtual ~Processor() {}
-
-  int32_t doTask() {
-    while (*m_run) {
-      UDPMessage* msg = m_queues->getInbound();
-      if (msg) {
-        m_queues->putOutbound(msg);
-      }
-    }
-    return 0;
-  }
-  void initialize() {}
-  void finalize() {}
-};
-
-class Responder : public ServiceTask {
- private:
-  ACE_TSS<ACE_SOCK_Dgram> m_io;
-  uint16_t m_basePort;
-  std::atomic<uint16_t> m_offset{0};
-  UDPMessageQueues* m_queues;
-
- public:
-  Responder(UDPMessageQueues* shared, uint16_t port)
-      : ServiceTask(shared), m_basePort(port) {
-    m_queues = dynamic_cast<UDPMessageQueues*>(m_shared);
-  }
-
-  virtual ~Responder() {}
-
-  int32_t doTask();
-
-  void initialize();
-
-  void finalize() { m_io->close(); }
-};
-}  // namespace testframework
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif  // GEODE_FWKLIB_UDPIPC_H_
diff --git a/tests/cpp/security/CMakeLists.txt b/tests/cpp/security/CMakeLists.txt
index 847bb5d..cd5c0db 100644
--- a/tests/cpp/security/CMakeLists.txt
+++ b/tests/cpp/security/CMakeLists.txt
@@ -19,13 +19,19 @@
 add_library(security STATIC
   CredentialGenerator.cpp
   CredentialGenerator.hpp
+  DummyCredentialGenerator.cpp
   DummyCredentialGenerator.hpp
+  DummyCredentialGenerator2.cpp
   DummyCredentialGenerator2.hpp
+  DummyCredentialGenerator3.cpp
   DummyCredentialGenerator3.hpp
+  LdapUserCredentialGenerator.cpp
   LdapUserCredentialGenerator.hpp
   NoopCredentialGenerator.hpp
+  PkcsCredentialGenerator.cpp
   PkcsCredentialGenerator.hpp
   typedefs.hpp
+  XmlAuthzCredentialGenerator.cpp
   XmlAuthzCredentialGenerator.hpp
 )
 
@@ -46,7 +52,8 @@
     OpenSSL::Crypto
     OpenSSL::SSL
   PRIVATE
-    ACE::ACE
+    Boost::boost
+    Boost::log
     _WarningsAsError
 )
 
diff --git a/tests/cpp/security/CredentialGenerator.cpp b/tests/cpp/security/CredentialGenerator.cpp
index 9d8157f..a5ff5f3 100644
--- a/tests/cpp/security/CredentialGenerator.cpp
+++ b/tests/cpp/security/CredentialGenerator.cpp
@@ -17,12 +17,27 @@
 
 #include "CredentialGenerator.hpp"
 
+// Disable warning for "extra qualifications" here.  One of the boost log
+// headers triggers this warning.  Note: use of disable pragma here is
+// intentional - attempts to use push/pop as you ordinarily should just
+// yielded a gripe from the MS tools that "warning number '4596' is not a
+// valid compiler warning". re-enabling the warning after the include
+// fails in the same way, so just leave it disabled for the rest of the
+// file.  This is safe, since the warning can only trigger inside a class
+// declaration, of which there are none in this file.
+#ifdef WIN32
+#pragma warning(disable : 4596)
+#endif
+
+#include <boost/log/trivial.hpp>
+
 #include "DummyCredentialGenerator.hpp"
 #include "DummyCredentialGenerator2.hpp"
 #include "DummyCredentialGenerator3.hpp"
 #include "LdapUserCredentialGenerator.hpp"
 #include "NoopCredentialGenerator.hpp"
 #include "PkcsCredentialGenerator.hpp"
+#include "Utils.hpp"
 
 namespace apache {
 namespace geode {
@@ -60,6 +75,80 @@
   }
 }
 
+void CredentialGenerator::dump() {
+  BOOST_LOG_TRIVIAL(info) << "dumping all registered classes ";
+  registeredClassMap::iterator it = generators().begin();
+  while (it != generators().end()) {
+    BOOST_LOG_TRIVIAL(info) << ((*it).second)->toString();
+    it++;
+  }
+}
+
+void CredentialGenerator::getAuthInit(std::shared_ptr<Properties>& prop) {
+  std::string authinit = getClientAuthInitLoaderFactory();
+  if (!authinit.empty()) {
+    BOOST_LOG_TRIVIAL(info) << "Authentication initializer : " << authinit
+                            << " library " << getClientAuthInitLoaderLibrary();
+
+    prop->insert("security-client-auth-factory", authinit.c_str());
+    prop->insert("security-client-auth-library",
+                 getClientAuthInitLoaderLibrary().c_str());
+  }
+}
+
+std::string CredentialGenerator::getPublickeyfile() {
+  auto path = Utils::getEnv("TESTSRC");
+  if (path.empty()) {
+    path = Utils::getEnv("BUILDDIR") + "/framework/data";
+  }
+
+  return path + "/keystore/publickeyfile";
+}
+
+std::string CredentialGenerator::getServerCmdParams(std::string securityParams,
+                                                    std::string workingDir,
+                                                    bool userMode) {
+  std::string securityCmdStr;
+  BOOST_LOG_TRIVIAL(info) << "User mode is " << userMode;
+  if (securityParams.find("authenticator") != std::string::npos &&
+      !getClientAuthenticator().empty()) {
+    securityCmdStr = getInitArgs(workingDir, userMode);
+    securityCmdStr +=
+        std::string(" --J=-Dgemfire.security-client-authenticator=") +
+        getClientAuthenticator();
+  }
+  if ((securityParams.find("authorizer") != std::string::npos) &&
+      (!getClientAuthorizer().empty())) {
+    securityCmdStr += std::string(" --J=-Dgemfire.security-client-accessor=") +
+                      getClientAuthorizer();
+  }
+  if ((securityParams.find("authorizerPP") != std::string::npos) &&
+      (!getClientAuthorizer().empty())) {
+    securityCmdStr +=
+        std::string(" --J=-Dgemfire.security-client-accessor-pp=") +
+        getClientAuthorizer();
+  }
+  if (m_id == ID_PKI) {
+    securityCmdStr +=
+        std::string(" --J=-Dgemfire.security-publickey-filepath=") +
+        getPublickeyfile();
+    securityCmdStr +=
+        std::string(" --J=-Dgemfire.security-publickey-pass=geode");
+  }
+  if ((securityParams.find("dummy") != std::string::npos) &&
+      (!getClientDummyAuthorizer().empty())) {
+    securityCmdStr += std::string(" --J=-Dgemfire.security-client-accessor=") +
+                      getClientDummyAuthorizer();
+  }
+#ifdef __COMPILE_DUNIT_  // lets suppress -N option in case of unit tests.
+  int idx;
+  while ((idx = securityCmdStr.find("--J=-Dgemfire.", 0)) >= 0) {
+    securityCmdStr.replace(idx, 2, "");
+  }
+#endif
+  return securityCmdStr;
+}
+
 void CredentialGenerator::getValidCredentials(std::shared_ptr<Properties>&) {}
 
 void CredentialGenerator::getInvalidCredentials(std::shared_ptr<Properties>&) {}
diff --git a/tests/cpp/security/CredentialGenerator.hpp b/tests/cpp/security/CredentialGenerator.hpp
index 22fca50..e221920 100644
--- a/tests/cpp/security/CredentialGenerator.hpp
+++ b/tests/cpp/security/CredentialGenerator.hpp
@@ -32,22 +32,9 @@
 
 // ----------------------------------------------------------------------------
 
-#include <geode/Properties.hpp>
-
-#ifndef __COMPILE_DUNIT_
-#include <fwklib/FwkLog.hpp>
-#else
-#ifndef FWKINFO
-#define FWKINFO(x)
-#endif
-#ifndef FWKDEBUG
-#define FWKDEBUG(x)
-#endif
-#endif
-
 #include <map>
 
-#include <ace/OS.h>
+#include <geode/Properties.hpp>
 
 #include "typedefs.hpp"
 
@@ -140,94 +127,18 @@
   ID id() { return m_id; }
   std::string name() { return m_name; }
 
-  std::string toString() {
-    char chID[5];
-    sprintf(chID, "%d", m_id);
-    return std::string(chID) + m_name;
-  }
-  static void dump() {
-    FWKINFO("dumping all registered classes ");
-    registeredClassMap::iterator it = generators().begin();
-    while (it != generators().end()) {
-      FWKINFO(((*it).second)->toString());
-      it++;
-    }
-  }
+  std::string toString() { return std::to_string(m_id) + m_name; }
+  static void dump();
 
   void hashCode() {}
 
-  void getAuthInit(std::shared_ptr<Properties>& prop) {
-    std::string authinit = this->getClientAuthInitLoaderFactory();
-    if (!authinit.empty()) {
-      FWKINFO("Authentication initializer : "
-              << authinit << " library "
-              << this->getClientAuthInitLoaderLibrary());
-      prop->insert("security-client-auth-factory", authinit.c_str());
-      prop->insert("security-client-auth-library",
-                   this->getClientAuthInitLoaderLibrary().c_str());
-    }
-  }
+  void getAuthInit(std::shared_ptr<Properties>& prop);
 
-  std::string getPublickeyfile() {
-    char* tempPath = nullptr;
-    tempPath = ACE_OS::getenv("TESTSRC");
-    std::string path = "";
-    if (!tempPath) {
-      tempPath = ACE_OS::getenv("BUILDDIR");
-      path = std::string(tempPath) + "/framework/data";
-    } else {
-      path = std::string(tempPath);
-    }
-    char pubfile[1000] = {'\0'};
-    sprintf(pubfile, "%s/keystore/publickeyfile", path.c_str());
-    return std::string(pubfile);
-  }
+  std::string getPublickeyfile();
 
   std::string getServerCmdParams(std::string securityParams,
                                  std::string workingDir = "",
-                                 bool userMode = false) {
-    std::string securityCmdStr;
-    FWKINFO("User mode is " << userMode);
-    if (securityParams.find("authenticator") != std::string::npos &&
-        !this->getClientAuthenticator().empty()) {
-      securityCmdStr = this->getInitArgs(workingDir, userMode);
-      securityCmdStr +=
-          std::string(" --J=-Dgemfire.security-client-authenticator=") +
-          this->getClientAuthenticator();
-    }
-    if ((securityParams.find("authorizer") != std::string::npos) &&
-        (!this->getClientAuthorizer().empty())) {
-      securityCmdStr +=
-          std::string(" --J=-Dgemfire.security-client-accessor=") +
-          this->getClientAuthorizer();
-    }
-    if ((securityParams.find("authorizerPP") != std::string::npos) &&
-        (!this->getClientAuthorizer().empty())) {
-      securityCmdStr +=
-          std::string(" --J=-Dgemfire.security-client-accessor-pp=") +
-          this->getClientAuthorizer();
-    }
-    if (m_id == ID_PKI) {
-      securityCmdStr +=
-          std::string(" --J=-Dgemfire.security-publickey-filepath=") +
-          this->getPublickeyfile();
-      securityCmdStr +=
-          std::string(" --J=-Dgemfire.security-publickey-pass=geode");
-    }
-    if ((securityParams.find("dummy") != std::string::npos) &&
-        (!this->getClientDummyAuthorizer().empty())) {
-      securityCmdStr +=
-          std::string(" --J=-Dgemfire.security-client-accessor=") +
-          this->getClientDummyAuthorizer();
-    }
-#ifdef __COMPILE_DUNIT_  // lets suppress -N option in case of unit tests.
-    int idx;
-    while ((idx = securityCmdStr.find("--J=-Dgemfire.", 0)) >= 0) {
-      securityCmdStr.replace(idx, 2, "");
-    }
-#endif
-    return securityCmdStr;
-  }
+                                 bool userMode = false);
 
   virtual void getValidCredentials(std::shared_ptr<Properties>& p);
 
diff --git a/tests/cpp/security/DummyCredentialGenerator.cpp b/tests/cpp/security/DummyCredentialGenerator.cpp
new file mode 100644
index 0000000..703acd2
--- /dev/null
+++ b/tests/cpp/security/DummyCredentialGenerator.cpp
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+#include "DummyCredentialGenerator.hpp"
+
+// Disable warning for "extra qualifications" here.  One of the boost log
+// headers triggers this warning.  Note: use of disable pragma here is
+// intentional - attempts to use push/pop as you ordinarily should just
+// yielded a gripe from the MS tools that "warning number '4596' is not a
+// valid compiler warning". re-enabling the warning after the include
+// fails in the same way, so just leave it disabled for the rest of the
+// file.  This is safe, since the warning can only trigger inside a class
+// declaration, of which there are none in this file.
+#ifdef WIN32
+#pragma warning(disable : 4596)
+#endif
+
+#include <boost/log/trivial.hpp>
+
+#include "Utils.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+namespace testframework {
+namespace security {
+
+std::string DummyCredentialGenerator::getInitArgs(std::string workingDir,
+                                                  bool userMode) {
+  auto buildDir = Utils::getEnv("BUILDDIR");
+  if (!buildDir.empty() && workingDir.empty()) {
+    workingDir = buildDir + "/framework/xml/Security/";
+  }
+
+  BOOST_LOG_TRIVIAL(info) << "Inside dummy Credentials usermode is "
+                          << userMode;
+
+  std::string result = " --J=-Dgemfire.security-authz-xml-uri=" + workingDir;
+  result += (userMode ? "authz-dummyMU.xml" : "authz-dummy.xml");
+  return result;
+}
+
+void DummyCredentialGenerator::getValidCredentials(
+    std::shared_ptr<Properties>& p) {
+  p->insert("security-username", "user1");
+  p->insert("security-password", "user1");
+
+  BOOST_LOG_TRIVIAL(debug) << "inserted valid security-username "
+                           << p->find("security-username")->value()
+                           << " password "
+                           << p->find("security-password")->value();
+}
+
+void DummyCredentialGenerator::getInvalidCredentials(
+    std::shared_ptr<Properties>& p) {
+  p->insert("security-username", "1user");
+  p->insert("security-password", "user1");
+
+  BOOST_LOG_TRIVIAL(debug) << "inserted invalid security-username "
+                           << p->find("security-username")->value()
+                           << " password "
+                           << p->find("security-password")->value();
+}
+
+}  // namespace security
+}  // namespace testframework
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
diff --git a/tests/cpp/security/DummyCredentialGenerator.hpp b/tests/cpp/security/DummyCredentialGenerator.hpp
index ac9e258..3781e64 100644
--- a/tests/cpp/security/DummyCredentialGenerator.hpp
+++ b/tests/cpp/security/DummyCredentialGenerator.hpp
@@ -31,30 +31,9 @@
 
 class DummyCredentialGenerator : public CredentialGenerator {
  public:
-  DummyCredentialGenerator() : CredentialGenerator(ID_DUMMY, "DUMMY") {
-    ;
-    ;
-  }
+  DummyCredentialGenerator() : CredentialGenerator(ID_DUMMY, "DUMMY") {}
 
-  std::string getInitArgs(std::string workingDir, bool userMode) override {
-    std::string additionalArgs;
-    char* buildDir = ACE_OS::getenv("BUILDDIR");
-    if (buildDir && workingDir.length() == 0) {
-      workingDir = std::string(buildDir);
-      workingDir += std::string("/framework/xml/Security/");
-    }
-    FWKINFO("Inside dummy Credentials usermode is " << userMode);
-    if (userMode) {
-      additionalArgs = std::string(" --J=-Dgemfire.security-authz-xml-uri=") +
-                       std::string(workingDir) +
-                       std::string("authz-dummyMU.xml");
-    } else {
-      additionalArgs = std::string(" --J=-Dgemfire.security-authz-xml-uri=") +
-                       std::string(workingDir) + std::string("authz-dummy.xml");
-    }
-
-    return additionalArgs;
-  }
+  std::string getInitArgs(std::string workingDir, bool userMode) override;
 
   std::string getClientAuthInitLoaderFactory() override {
     return "createUserPasswordAuthInitInstance";
@@ -73,21 +52,8 @@
     return "javaobject.DummyAuthorization.create";
   }
 
-  void getValidCredentials(std::shared_ptr<Properties>& p) override {
-    p->insert("security-username", "user1");
-    p->insert("security-password", "user1");
-    FWKDEBUG("inserted valid security-username "
-             << p->find("security-username")->value().c_str() << " password "
-             << p->find("security-password")->value().c_str());
-  }
-
-  void getInvalidCredentials(std::shared_ptr<Properties>& p) override {
-    p->insert("security-username", "1user");
-    p->insert("security-password", "user1");
-    FWKDEBUG("inserted invalid security-username "
-             << p->find("security-username")->value().c_str() << " password "
-             << p->find("security-password")->value().c_str());
-  }
+  void getValidCredentials(std::shared_ptr<Properties>& p) override;
+  void getInvalidCredentials(std::shared_ptr<Properties>& p) override;
 
   void getAllowedCredentialsForOps(opCodeList& opCodes,
                                    std::shared_ptr<Properties>& p,
diff --git a/tests/cpp/security/DummyCredentialGenerator2.cpp b/tests/cpp/security/DummyCredentialGenerator2.cpp
new file mode 100644
index 0000000..5c2969f
--- /dev/null
+++ b/tests/cpp/security/DummyCredentialGenerator2.cpp
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+#include "DummyCredentialGenerator2.hpp"
+
+// Disable warning for "extra qualifications" here.  One of the boost log
+// headers triggers this warning.  Note: use of disable pragma here is
+// intentional - attempts to use push/pop as you ordinarily should just
+// yielded a gripe from the MS tools that "warning number '4596' is not a
+// valid compiler warning". re-enabling the warning after the include
+// fails in the same way, so just leave it disabled for the rest of the
+// file.  This is safe, since the warning can only trigger inside a class
+// declaration, of which there are none in this file.
+#ifdef WIN32
+#pragma warning(disable : 4596)
+#endif
+
+#include <boost/log/trivial.hpp>
+
+#include "Utils.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+namespace testframework {
+namespace security {
+
+std::string DummyCredentialGenerator2::getInitArgs(std::string workingDir,
+                                                   bool userMode) {
+  auto buildDir = Utils::getEnv("BUILDDIR");
+  if (!buildDir.empty() && workingDir.empty()) {
+    workingDir = buildDir + "/framework/xml/Security/";
+  }
+
+  auto result = " --J=-Dgemfire.security-authz-xml-uri=" + workingDir;
+  result += (userMode ? "authz-dummyMU.xml" : "authz-dummy.xml");
+  return result;
+}
+
+void DummyCredentialGenerator2::getInvalidCredentials(
+    std::shared_ptr<Properties>& p) {
+  p->insert("security-username", "1user");
+  p->insert("security-password", "user1");
+  BOOST_LOG_TRIVIAL(debug) << "inserted invalid security-username "
+                           << p->find("security-username")->value()
+                           << " password "
+                           << p->find("security-password")->value();
+}
+
+void DummyCredentialGenerator2::getValidCredentials(
+    std::shared_ptr<Properties>& p) {
+  p->insert("security-username", "user1");
+  p->insert("security-password", "user1");
+  BOOST_LOG_TRIVIAL(debug) << "inserted valid security-username "
+                           << p->find("security-username")->value()
+                           << " password "
+                           << p->find("security-password")->value();
+}
+
+}  // namespace security
+}  // namespace testframework
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
diff --git a/tests/cpp/security/DummyCredentialGenerator2.hpp b/tests/cpp/security/DummyCredentialGenerator2.hpp
index afe33cb..f7d742d 100644
--- a/tests/cpp/security/DummyCredentialGenerator2.hpp
+++ b/tests/cpp/security/DummyCredentialGenerator2.hpp
@@ -33,24 +33,7 @@
  public:
   DummyCredentialGenerator2() : CredentialGenerator(ID_DUMMY2, "DUMMY2") {}
 
-  std::string getInitArgs(std::string workingDir, bool userMode) override {
-    std::string additionalArgs;
-    char* buildDir = ACE_OS::getenv("BUILDDIR");
-    if (buildDir && workingDir.length() == 0) {
-      workingDir = std::string(buildDir);
-      workingDir += std::string("/framework/xml/Security/");
-    }
-    if (userMode) {
-      additionalArgs = std::string(" --J=-Dgemfire.security-authz-xml-uri=") +
-                       std::string(workingDir) +
-                       std::string("authz-dummyMU.xml");
-    } else {
-      additionalArgs = std::string(" --J=-Dgemfire.security-authz-xml-uri=") +
-                       std::string(workingDir) + std::string("authz-dummy.xml");
-    }
-
-    return additionalArgs;
-  }
+  std::string getInitArgs(std::string workingDir, bool userMode) override;
 
   std::string getClientAuthInitLoaderFactory() override {
     return "createUserPasswordAuthInitInstance";
@@ -69,22 +52,9 @@
     return "javaobject.DummyAuthorization.create";
   }
 
-  void getValidCredentials(std::shared_ptr<Properties>& p) override {
-    p->insert("security-username", "user1");
-    p->insert("security-password", "user1");
-    FWKDEBUG("inserted valid security-username "
-             << p->find("security-username")->value().c_str() << " password "
-             << p->find("security-password")->value().c_str());
-  }
+  void getValidCredentials(std::shared_ptr<Properties>& p) override;
 
-  void getInvalidCredentials(std::shared_ptr<Properties>& p) override {
-    p->insert("security-username", "1user");
-    p->insert("security-password", "user1");
-    FWKDEBUG("inserted invalid security-username "
-             << p->find("security-username")->value().c_str() << " password "
-             << p->find("security-password")->value().c_str());
-  }
-
+  void getInvalidCredentials(std::shared_ptr<Properties>& p) override;
   void getAllowedCredentialsForOps(opCodeList& opCodes,
                                    std::shared_ptr<Properties>& p,
                                    stringList* regionNames) override {
diff --git a/tests/cpp/security/DummyCredentialGenerator3.cpp b/tests/cpp/security/DummyCredentialGenerator3.cpp
new file mode 100644
index 0000000..2386f23
--- /dev/null
+++ b/tests/cpp/security/DummyCredentialGenerator3.cpp
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#include "DummyCredentialGenerator3.hpp"
+
+// Disable warning for "extra qualifications" here.  One of the boost log
+// headers triggers this warning.  Note: use of disable pragma here is
+// intentional - attempts to use push/pop as you ordinarily should just
+// yielded a gripe from the MS tools that "warning number '4596' is not a
+// valid compiler warning". re-enabling the warning after the include
+// fails in the same way, so just leave it disabled for the rest of the
+// file.  This is safe, since the warning can only trigger inside a class
+// declaration, of which there are none in this file.
+#ifdef WIN32
+#pragma warning(disable : 4596)
+#endif
+
+#include <boost/log/trivial.hpp>
+
+#include "Utils.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+namespace testframework {
+namespace security {
+std::string DummyCredentialGenerator3::getInitArgs(std::string workingDir,
+                                                   bool userMode) {
+  auto buildDir = Utils::getEnv("BUILDDIR");
+  if (!buildDir.empty() && workingDir.empty()) {
+    workingDir = buildDir + "/framework/xml/Security/";
+  }
+
+  auto result = " --J=-Dgemfire.security-authz-xml-uri=" + workingDir;
+  result += (userMode ? "authz-dummyMU.xml" : "authz-dummy.xml");
+  return result;
+}
+
+void DummyCredentialGenerator3::getValidCredentials(
+    std::shared_ptr<Properties>& p) {
+  p->insert("security-username", "user1");
+  p->insert("security-password", "user1");
+  BOOST_LOG_TRIVIAL(debug) << "inserted valid security-username "
+                           << p->find("security-username")->value()
+                           << " password "
+                           << p->find("security-password")->value();
+}
+
+void DummyCredentialGenerator3::getInvalidCredentials(
+    std::shared_ptr<Properties>& p) {
+  p->insert("security-username", "1user");
+  p->insert("security-password", "user1");
+  BOOST_LOG_TRIVIAL(debug) << "inserted invalid security-username "
+                           << p->find("security-username")->value()
+                           << " password "
+                           << p->find("security-password")->value();
+}
+
+}  // namespace security
+}  // namespace testframework
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
diff --git a/tests/cpp/security/DummyCredentialGenerator3.hpp b/tests/cpp/security/DummyCredentialGenerator3.hpp
index 6e448de..728a85a 100644
--- a/tests/cpp/security/DummyCredentialGenerator3.hpp
+++ b/tests/cpp/security/DummyCredentialGenerator3.hpp
@@ -33,24 +33,7 @@
  public:
   DummyCredentialGenerator3() : CredentialGenerator(ID_DUMMY3, "DUMMY3") {}
 
-  std::string getInitArgs(std::string workingDir, bool userMode) override {
-    std::string additionalArgs;
-    char* buildDir = ACE_OS::getenv("BUILDDIR");
-    if (buildDir && workingDir.length() == 0) {
-      workingDir = std::string(buildDir);
-      workingDir += std::string("/framework/xml/Security/");
-    }
-    if (userMode) {
-      additionalArgs = std::string(" --J=-Dgemfire.security-authz-xml-uri=") +
-                       std::string(workingDir) +
-                       std::string("authz-dummyMU.xml");
-    } else {
-      additionalArgs = std::string(" --J=-Dgemfire.security-authz-xml-uri=") +
-                       std::string(workingDir) + std::string("authz-dummy.xml");
-    }
-
-    return additionalArgs;
-  }
+  std::string getInitArgs(std::string workingDir, bool userMode) override;
 
   std::string getClientAuthInitLoaderFactory() override {
     return "createUserPasswordAuthInitInstance";
@@ -69,21 +52,9 @@
     return "javaobject.DummyAuthorization.create";
   }
 
-  void getValidCredentials(std::shared_ptr<Properties>& p) override {
-    p->insert("security-username", "user1");
-    p->insert("security-password", "user1");
-    FWKDEBUG("inserted valid security-username "
-             << p->find("security-username")->value().c_str() << " password "
-             << p->find("security-password")->value().c_str());
-  }
+  void getValidCredentials(std::shared_ptr<Properties>& p) override;
 
-  void getInvalidCredentials(std::shared_ptr<Properties>& p) override {
-    p->insert("security-username", "1user");
-    p->insert("security-password", "user1");
-    FWKDEBUG("inserted invalid security-username "
-             << p->find("security-username")->value().c_str() << " password "
-             << p->find("security-password")->value().c_str());
-  }
+  void getInvalidCredentials(std::shared_ptr<Properties>& p) override;
 
   void getAllowedCredentialsForOps(opCodeList& opCodes,
                                    std::shared_ptr<Properties>& p,
diff --git a/tests/cpp/security/LdapUserCredentialGenerator.cpp b/tests/cpp/security/LdapUserCredentialGenerator.cpp
new file mode 100644
index 0000000..d4cf0c1
--- /dev/null
+++ b/tests/cpp/security/LdapUserCredentialGenerator.cpp
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ */
+
+#include "LdapUserCredentialGenerator.hpp"
+
+// Disable warning for "extra qualifications" here.  One of the boost log
+// headers triggers this warning.  Note: use of disable pragma here is
+// intentional - attempts to use push/pop as you ordinarily should just
+// yielded a gripe from the MS tools that "warning number '4596' is not a
+// valid compiler warning". re-enabling the warning after the include
+// fails in the same way, so just leave it disabled for the rest of the
+// file.  This is safe, since the warning can only trigger inside a class
+// declaration, of which there are none in this file.
+#ifdef WIN32
+#pragma warning(disable : 4596)
+#endif
+
+#include <boost/log/trivial.hpp>
+
+#include "Utils.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+namespace testframework {
+namespace security {
+
+std::string LdapUserCredentialGenerator::getInitArgs(std::string workingDir,
+                                                     bool) {
+  auto buildDir = Utils::getEnv("BUILDDIR");
+  if (!buildDir.empty() && workingDir.empty()) {
+    workingDir = buildDir + "/framework/xml/Security/";
+  }
+
+  std::string result =
+      " --J=-Dgemfire.security-authz-xml-uri=" + workingDir + "authz-ldap.xml";
+
+  auto ldapSrv = Utils::getEnv("LDAP_SERVER");
+  result += " --J=-Dgemfire.security-ldap-server=" +
+            (ldapSrv.empty() ? "ldap" : ldapSrv);
+
+  auto ldapRoot = Utils::getEnv("LDAP_BASEDN");
+  result += " --J=\\\"-Dgemfire.security-ldap-basedn=";
+  result +=
+      ldapRoot.empty() ? "ou=ldapTesting,dc=ldap,dc=apache,dc=org" : ldapRoot;
+  result += "\\\"";
+
+  auto ldapSSL = Utils::getEnv("LDAP_USESSL");
+  result += " --J=-Dgemfire.security-ldap-usessl=";
+  result += (ldapSSL.empty() ? "false" : ldapSSL);
+
+  return result;
+}
+
+void LdapUserCredentialGenerator::getValidCredentials(
+    std::shared_ptr<Properties>& p) {
+  p->insert("security-username", "geode1");
+  p->insert("security-password", "geode1");
+  BOOST_LOG_TRIVIAL(debug) << "inserted valid security-username "
+                           << p->find("security-username")->value()
+                           << " password "
+                           << p->find("security-password")->value();
+}
+
+void LdapUserCredentialGenerator::getInvalidCredentials(
+    std::shared_ptr<Properties>& p) {
+  p->insert("security-username", "geode1");
+  p->insert("security-password", "1geode");
+  BOOST_LOG_TRIVIAL(debug) << "inserted invalid security-username "
+                           << p->find("security-username")->value()
+                           << " password "
+                           << p->find("security-password")->value();
+}
+
+}  // namespace security
+}  // namespace testframework
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
diff --git a/tests/cpp/security/LdapUserCredentialGenerator.hpp b/tests/cpp/security/LdapUserCredentialGenerator.hpp
index 97d8430..2cebb47 100644
--- a/tests/cpp/security/LdapUserCredentialGenerator.hpp
+++ b/tests/cpp/security/LdapUserCredentialGenerator.hpp
@@ -20,8 +20,6 @@
  * limitations under the License.
  */
 
-#include <ace/ACE.h>
-#include <ace/OS.h>
 
 #include "CredentialGenerator.hpp"
 #include "XmlAuthzCredentialGenerator.hpp"
@@ -36,34 +34,7 @@
  public:
   LdapUserCredentialGenerator() : CredentialGenerator(ID_LDAP, "LDAP") {}
 
-  std::string getInitArgs(std::string workingDir, bool) override {
-    std::string additionalArgs;
-    char* buildDir = ACE_OS::getenv("BUILDDIR");
-    if (buildDir != nullptr && workingDir.length() == 0) {
-      workingDir = std::string(buildDir);
-      workingDir += std::string("/framework/xml/Security/");
-    }
-
-    additionalArgs = std::string(" --J=-Dgemfire.security-authz-xml-uri=") +
-                     std::string(workingDir) + std::string("authz-ldap.xml");
-
-    char* ldapSrv = ACE_OS::getenv("LDAP_SERVER");
-    additionalArgs += std::string(" --J=-Dgemfire.security-ldap-server=") +
-                      (ldapSrv != nullptr ? ldapSrv : "ldap");
-
-    char* ldapRoot = ACE_OS::getenv("LDAP_BASEDN");
-    additionalArgs +=
-        std::string(" --J=\\\"-Dgemfire.security-ldap-basedn=") +
-        (ldapRoot != nullptr ? ldapRoot
-                             : "ou=ldapTesting,dc=ldap,dc=apache,dc=org") +
-        "\\\"";
-
-    char* ldapSSL = ACE_OS::getenv("LDAP_USESSL");
-    additionalArgs += std::string(" --J=-Dgemfire.security-ldap-usessl=") +
-                      (ldapSSL != nullptr ? ldapSSL : "false");
-
-    return additionalArgs;
-  }
+  std::string getInitArgs(std::string workingDir, bool) override;
 
   std::string getClientAuthInitLoaderFactory() override {
     return "createUserPasswordAuthInitInstance";
@@ -81,21 +52,10 @@
   std::string getClientDummyAuthorizer() override {
     return "javaobject.DummyAuthorization.create";
   }
-  void getValidCredentials(std::shared_ptr<Properties>& p) override {
-    p->insert("security-username", "geode1");
-    p->insert("security-password", "geode1");
-    FWKDEBUG("inserted valid security-username "
-             << p->find("security-username")->value().c_str() << " password "
-             << p->find("security-password")->value().c_str());
-  }
 
-  void getInvalidCredentials(std::shared_ptr<Properties>& p) override {
-    p->insert("security-username", "geode1");
-    p->insert("security-password", "1geode");
-    FWKDEBUG("inserted invalid security-username "
-             << p->find("security-username")->value().c_str() << " password "
-             << p->find("security-password")->value().c_str());
-  }
+  void getValidCredentials(std::shared_ptr<Properties>& p) override;
+
+  void getInvalidCredentials(std::shared_ptr<Properties>& p) override;
 
   void getAllowedCredentialsForOps(opCodeList& opCodes,
                                    std::shared_ptr<Properties>& p,
diff --git a/tests/cpp/security/NoopCredentialGenerator.hpp b/tests/cpp/security/NoopCredentialGenerator.hpp
index 59e50cf..db13b6f 100644
--- a/tests/cpp/security/NoopCredentialGenerator.hpp
+++ b/tests/cpp/security/NoopCredentialGenerator.hpp
@@ -32,16 +32,8 @@
  public:
   NoopCredentialGenerator() : CredentialGenerator(ID_NOOP, "NOOP") {}
 
-  std::string getInitArgs(std::string workingDir, bool) override {
-    std::string additionalArgs;
-    char* buildDir = ACE_OS::getenv("BUILDDIR");
-    if (buildDir && workingDir.length() == 0) {
-      workingDir = std::string(buildDir);
-      workingDir += std::string("/framework/xml/Security/");
-    }
-    additionalArgs = " ";
-
-    return additionalArgs;
+  std::string getInitArgs(std::string, bool) override {
+    return " ";
   }
 
   std::string getClientAuthInitLoaderFactory() override {
diff --git a/tests/cpp/security/PkcsCredentialGenerator.cpp b/tests/cpp/security/PkcsCredentialGenerator.cpp
new file mode 100644
index 0000000..3c64e61
--- /dev/null
+++ b/tests/cpp/security/PkcsCredentialGenerator.cpp
@@ -0,0 +1,96 @@
+/*
+ * 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.
+ */
+
+#include "PkcsCredentialGenerator.hpp"
+
+// Disable warning for "extra qualifications" here.  One of the boost log
+// headers triggers this warning.  Note: use of disable pragma here is
+// intentional - attempts to use push/pop as you ordinarily should just
+// yielded a gripe from the MS tools that "warning number '4596' is not a
+// valid compiler warning". re-enabling the warning after the include
+// fails in the same way, so just leave it disabled for the rest of the
+// file.  This is safe, since the warning can only trigger inside a class
+// declaration, of which there are none in this file.
+#ifdef WIN32
+#pragma warning(disable : 4596)
+#endif
+
+#include <boost/log/trivial.hpp>
+
+#include "Utils.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+namespace testframework {
+namespace security {
+std::string PKCSCredentialGenerator::getInitArgs(std::string workingDir, bool) {
+  BOOST_LOG_TRIVIAL(info) << "Inside PKCS credentials";
+  auto buildDir = Utils::getEnv("BUILDDIR");
+
+  if (!buildDir.empty() && workingDir.empty()) {
+    workingDir = buildDir + "/framework/xml/Security/";
+  }
+
+  auto xmlUri = Utils::getEnv("AUTHZ_XML_URI");
+  if (xmlUri.empty()) {
+    xmlUri = "authz-pkcs.xml";
+  }
+
+  return " --J=-Dgemfire.security-authz-xml-uri=" + workingDir + xmlUri;
+}
+
+void PKCSCredentialGenerator::getValidCredentials(
+    std::shared_ptr<Properties>& p) {
+  setPKCSProperties(p, "geode" + std::to_string(randomValue(1, 10)));
+  BOOST_LOG_TRIVIAL(info) << "inserted valid security-username "
+                          << p->find("security-username")->value();
+}
+
+void PKCSCredentialGenerator::getInvalidCredentials(
+    std::shared_ptr<Properties>& p) {
+  setPKCSProperties(p, std::to_string(randomValue(1, 11)) + "geode");
+  BOOST_LOG_TRIVIAL(info) << "inserted invalid security-username "
+                          << p->find("security-username")->value();
+}
+
+void PKCSCredentialGenerator::insertKeyStorePath(std::shared_ptr<Properties>& p,
+                                                 const std::string& username) {
+  auto path = Utils::getEnv("TESTSRC");
+  if (path.empty()) {
+    path = Utils::getEnv("BUILDDIR") + "/framework/data";
+  }
+
+  path += "/keystore/";
+  path += username;
+  path += ".keystore";
+  p->insert(KEYSTORE_FILE_PATH, path);
+}
+
+void PKCSCredentialGenerator::setPKCSProperties(std::shared_ptr<Properties>& p,
+                                                const std::string& username) {
+  p->insert(SECURITY_USERNAME, "geode");
+  p->insert(KEYSTORE_ALIAS, username);
+  p->insert(KEYSTORE_PASSWORD, "geode");
+  insertKeyStorePath(p, username);
+}
+
+}  // namespace security
+}  // namespace testframework
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
diff --git a/tests/cpp/security/PkcsCredentialGenerator.hpp b/tests/cpp/security/PkcsCredentialGenerator.hpp
index f21a3d6..031e880 100644
--- a/tests/cpp/security/PkcsCredentialGenerator.hpp
+++ b/tests/cpp/security/PkcsCredentialGenerator.hpp
@@ -30,9 +30,6 @@
 const char KEYSTORE_ALIAS[] = "security-alias";
 const char KEYSTORE_PASSWORD[] = "security-keystorepass";
 
-#include <ace/ACE.h>
-#include <ace/OS.h>
-
 namespace apache {
 namespace geode {
 namespace client {
@@ -50,28 +47,7 @@
  public:
   PKCSCredentialGenerator() : CredentialGenerator(ID_PKI, "PKCS") {}
 
-  std::string getInitArgs(std::string workingDir, bool) override {
-    FWKINFO("Inside PKCS credentials");
-    std::string additionalArgs;
-    char* buildDir = ACE_OS::getenv("BUILDDIR");
-
-    if (buildDir && workingDir.length() == 0) {
-      workingDir = std::string(buildDir);
-      workingDir += std::string("/framework/xml/Security/");
-    }
-
-    if (buildDir && workingDir.length() == 0) {
-      workingDir = std::string(buildDir);
-      workingDir += std::string("/framework/xml/Security/");
-    }
-
-    char* authzXmlUri = ACE_OS::getenv("AUTHZ_XML_URI");
-    additionalArgs = std::string(" --J=-Dgemfire.security-authz-xml-uri=") +
-                     std::string(workingDir) +
-                     std::string(authzXmlUri ? authzXmlUri : "authz-pkcs.xml");
-
-    return additionalArgs;
-  }
+  std::string getInitArgs(std::string workingDir, bool) override;
 
   std::string getClientAuthInitLoaderFactory() override {
     return "createPKCSAuthInitInstance";
@@ -90,48 +66,14 @@
   }
 
   void insertKeyStorePath(std::shared_ptr<Properties>& p,
-                          const char* username) {
-    char keystoreFilePath[1024];
-    char* tempPath = nullptr;
-    tempPath = ACE_OS::getenv("TESTSRC");
-    std::string path = "";
-    if (!tempPath) {
-      tempPath = ACE_OS::getenv("BUILDDIR");
-      path = std::string(tempPath) + "/framework/data";
-    } else {
-      path = std::string(tempPath);
-    }
+                          const std::string& username);
 
-    sprintf(keystoreFilePath, "%s/keystore/%s.keystore", path.c_str(),
-            username);
-    p->insert(KEYSTORE_FILE_PATH, keystoreFilePath);
-  }
+  void setPKCSProperties(std::shared_ptr<Properties>& p,
+                         const std::string& username);
 
-  void setPKCSProperties(std::shared_ptr<Properties>& p, char* username) {
-    char keyStorePassWord[1024];
+  void getValidCredentials(std::shared_ptr<Properties>& p) override;
 
-    sprintf(keyStorePassWord, "%s", "geode");
-    p->insert(SECURITY_USERNAME, "geode");
-    p->insert(KEYSTORE_ALIAS, username);
-    p->insert(KEYSTORE_PASSWORD, keyStorePassWord);
-    insertKeyStorePath(p, username);
-  }
-
-  void getValidCredentials(std::shared_ptr<Properties>& p) override {
-    char username[20] = {'\0'};
-    sprintf(username, "geode%d", randomValue(1, 10));
-    setPKCSProperties(p, username);
-    FWKINFO("inserted valid security-username "
-            << p->find("security-username")->value().c_str());
-  }
-
-  void getInvalidCredentials(std::shared_ptr<Properties>& p) override {
-    char username[20] = {'\0'};
-    sprintf(username, "%dgeode", randomValue(1, 11));
-    setPKCSProperties(p, username);
-    FWKINFO("inserted invalid security-username "
-            << p->find("security-username")->value().c_str());
-  }
+  void getInvalidCredentials(std::shared_ptr<Properties>& p) override;
 
   void getAllowedCredentialsForOps(opCodeList& opCodes,
                                    std::shared_ptr<Properties>& p,
diff --git a/tests/cpp/security/XmlAuthzCredentialGenerator.cpp b/tests/cpp/security/XmlAuthzCredentialGenerator.cpp
new file mode 100644
index 0000000..9226862
--- /dev/null
+++ b/tests/cpp/security/XmlAuthzCredentialGenerator.cpp
@@ -0,0 +1,152 @@
+/*
+ * 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.
+ */
+
+#include "XmlAuthzCredentialGenerator.hpp"
+
+// Disable warning for "extra qualifications" here.  One of the boost log
+// headers triggers this warning.  Note: use of disable pragma here is
+// intentional - attempts to use push/pop as you ordinarily should just
+// yielded a gripe from the MS tools that "warning number '4596' is not a
+// valid compiler warning". re-enabling the warning after the include
+// fails in the same way, so just leave it disabled for the rest of the
+// file.  This is safe, since the warning can only trigger inside a class
+// declaration, of which there are none in this file.
+#ifdef WIN32
+#pragma warning(disable : 4596)
+#endif
+
+#include <boost/log/trivial.hpp>
+
+namespace apache {
+namespace geode {
+namespace client {
+namespace testframework {
+namespace security {
+
+void XmlAuthzCredentialGenerator::getAllowedDummyAuthz(ROLES role) {
+  const char* adminUsers[] = {"admin", "root", "administrator"};
+  const int adminUsrSz = (sizeof adminUsers / sizeof *adminUsers) - 1;
+  std::string validity = "invalid";
+
+  if (role == NO_ROLE) {
+    role = getRequiredRole();
+    validity = "valid";
+  }
+
+  std::string userName;
+  switch (role) {
+    case READER_ROLE:
+      userName = "reader" + std::to_string(randomValue(2));
+      break;
+    case WRITER_ROLE:
+      userName = "writer" + std::to_string(randomValue(2));
+      break;
+    case QUERY_ROLE:
+      userName = "reader" + std::to_string(randomValue(1) + 3);
+      break;
+    case ADMIN_ROLE:
+      userName = adminUsers[randomValue(adminUsrSz)];
+      break;
+    case NO_ROLE:
+      userName = "user" + std::to_string(randomValue(2));
+      break;
+  }
+
+  (*m_prop)->insert("security-username", userName);
+  (*m_prop)->insert("security-password", userName);
+
+  BOOST_LOG_TRIVIAL(info)
+      << "inserted " << validity << " dummy security-username "
+      << (*m_prop)->find("security-username")->value().c_str() << " password "
+      << ((*m_prop)->find("security-password") != nullptr
+              ? (*m_prop)->find("security-password")->value().c_str()
+              : "not set");
+}
+
+std::string XmlAuthzCredentialGenerator::getAllowedUser(ROLES role) {
+  const std::string userPrefix = "geode";
+  const int readerIndices[] = {3, 4, 5};
+  const int writerIndices[] = {6, 7, 8};
+  const int queryIndices[] = {9, 10};
+  const int adminIndices[] = {1, 2};
+  const int readerIndSz = (sizeof readerIndices / sizeof *readerIndices) - 1;
+  const int writerIndSz = (sizeof writerIndices / sizeof *writerIndices) - 1;
+  const int queryIndSz = (sizeof queryIndices / sizeof *queryIndices) - 1;
+  const int adminIndSz = (sizeof adminIndices / sizeof *adminIndices) - 1;
+
+  std::string validity = "invalid";
+
+  if (role == NO_ROLE) {
+    role = getRequiredRole();
+    validity = "valid";
+  }
+  std::string userName;
+  switch (role) {
+    case READER_ROLE:
+      userName =
+          userPrefix + std::to_string(readerIndices[randomValue(readerIndSz)]);
+      break;
+    case WRITER_ROLE:
+      userName =
+          userPrefix + std::to_string(writerIndices[randomValue(writerIndSz)]);
+      break;
+    case QUERY_ROLE:
+      userName =
+          userPrefix + std::to_string(queryIndices[randomValue(queryIndSz)]);
+      break;
+    case ADMIN_ROLE:
+    case NO_ROLE:
+      userName =
+          userPrefix + std::to_string(adminIndices[randomValue(adminIndSz)]);
+      break;
+  }
+  BOOST_LOG_TRIVIAL(info) << "inserted " << validity << " username "
+                          << userName;
+  return userName;
+}
+
+void XmlAuthzCredentialGenerator::getAllowedLdapAuthz(ROLES role) {
+  const std::string userName = getAllowedUser(role);
+  (*m_prop)->insert("security-username", userName.c_str());
+  (*m_prop)->insert("security-password", userName.c_str());
+
+  BOOST_LOG_TRIVIAL(info)
+      << "inserted  ldap security-username "
+      << (*m_prop)->find("security-username")->value() << " password "
+      << ((*m_prop)->find("security-password") != nullptr
+              ? (*m_prop)->find("security-password")->value()
+              : "not set");
+}
+
+void XmlAuthzCredentialGenerator::getAllowedPkcsAuthz(ROLES role) {
+  const std::string userName = getAllowedUser(role);
+  (*m_prop)->insert("security-alias", userName.c_str());
+  (*m_prop)->insert("security-keystorepass", "geode");
+
+  BOOST_LOG_TRIVIAL(info)
+      << "inserted  PKCS security-alias"
+      << (*m_prop)->find("security-alias")->value() << " password "
+      << ((*m_prop)->find("security-keystorepass") != nullptr
+              ? (*m_prop)->find("security-keystorepass")->value()
+              : "not set");
+}
+
+}  // namespace security
+}  // namespace testframework
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
diff --git a/tests/cpp/security/XmlAuthzCredentialGenerator.hpp b/tests/cpp/security/XmlAuthzCredentialGenerator.hpp
index 5b120a2..c9f95e1 100644
--- a/tests/cpp/security/XmlAuthzCredentialGenerator.hpp
+++ b/tests/cpp/security/XmlAuthzCredentialGenerator.hpp
@@ -55,8 +55,6 @@
 
 const stringList::value_type QRArr[] = {"Portfolios", "Positions"};
 
-static const char* kPRiUsername = "%s%d";
-
 class XmlAuthzCredentialGenerator;
 
 class XmlAuthzCredentialGenerator {
@@ -84,7 +82,7 @@
     /* initialize random seed: */
     srand(static_cast<unsigned int>(time(nullptr)));
   }
-  virtual ~XmlAuthzCredentialGenerator() { ; }
+  virtual ~XmlAuthzCredentialGenerator() {}
 
   virtual void getAllowedCredentials(opCodeList& opCode,
                                      std::shared_ptr<Properties>& prop,
@@ -109,7 +107,7 @@
         case ID_DUMMY2:
         case ID_DUMMY3:
           break;
-      };
+      }
 
     } catch (...) {
       reset();
@@ -147,7 +145,7 @@
           break;
         case NO_ROLE:
           /* UNNECESSARY role = role*/ break;
-      };
+      }
 
       switch (m_id) {
         case ID_DUMMY:
@@ -164,7 +162,7 @@
         case ID_DUMMY2:
         case ID_DUMMY3:
           break;
-      };
+      }
 
     } catch (...) {
       reset();
@@ -174,112 +172,10 @@
   }
 
  private:
-  void getAllowedDummyAuthz(ROLES role) {
-    const char* adminUsers[] = {"admin", "root", "administrator"};
-    const int adminUsrSz = (sizeof adminUsers / sizeof *adminUsers) - 1;
-    std::string validity = "invalid";
-
-    if (role == NO_ROLE) {
-      role = getRequiredRole();
-      validity = "valid";
-    }
-    char userName[100];
-    switch (role) {
-      case READER_ROLE:
-        sprintf(userName, kPRiUsername, "reader", randomValue(2));
-        break;
-      case WRITER_ROLE:
-        sprintf(userName, kPRiUsername, "writer", randomValue(2));
-        break;
-      case QUERY_ROLE:
-        sprintf(userName, kPRiUsername, "reader", randomValue(1) + 3);
-        break;
-      case ADMIN_ROLE:
-        sprintf(userName, "%s", adminUsers[randomValue(adminUsrSz)]);
-        break;
-      case NO_ROLE:
-        sprintf(userName, kPRiUsername, "user", randomValue(2));
-        break;
-    };
-
-    (*m_prop)->insert("security-username", userName);
-    (*m_prop)->insert("security-password", userName);
-
-    FWKINFO("inserted "
-            << validity << " dummy security-username "
-            << (*m_prop)->find("security-username")->value().c_str()
-            << " password "
-            << ((*m_prop)->find("security-password") != nullptr
-                    ? (*m_prop)->find("security-password")->value().c_str()
-                    : "not set"));
-  }
-
-  std::string getAllowedUser(ROLES role) {
-    const std::string userPrefix = "geode";
-    const int readerIndices[] = {3, 4, 5};
-    const int writerIndices[] = {6, 7, 8};
-    const int queryIndices[] = {9, 10};
-    const int adminIndices[] = {1, 2};
-    const int readerIndSz = (sizeof readerIndices / sizeof *readerIndices) - 1;
-    const int writerIndSz = (sizeof writerIndices / sizeof *writerIndices) - 1;
-    const int queryIndSz = (sizeof queryIndices / sizeof *queryIndices) - 1;
-    const int adminIndSz = (sizeof adminIndices / sizeof *adminIndices) - 1;
-
-    std::string validity = "invalid";
-
-    if (role == NO_ROLE) {
-      role = getRequiredRole();
-      validity = "valid";
-    }
-    char userName[256];
-    switch (role) {
-      case READER_ROLE:
-        sprintf(userName, kPRiUsername, userPrefix.c_str(),
-                readerIndices[randomValue(readerIndSz)]);
-        break;
-      case WRITER_ROLE:
-        sprintf(userName, kPRiUsername, userPrefix.c_str(),
-                writerIndices[randomValue(writerIndSz)]);
-        break;
-      case QUERY_ROLE:
-        sprintf(userName, kPRiUsername, userPrefix.c_str(),
-                queryIndices[randomValue(queryIndSz)]);
-        break;
-      case ADMIN_ROLE:
-      case NO_ROLE:
-        sprintf(userName, kPRiUsername, userPrefix.c_str(),
-                adminIndices[randomValue(adminIndSz)]);
-        break;
-    };
-    FWKINFO("inserted " << validity << " username " << userName);
-    return std::string(userName);
-  }
-
-  void getAllowedLdapAuthz(ROLES role) {
-    const std::string userName = getAllowedUser(role);
-    (*m_prop)->insert("security-username", userName.c_str());
-    (*m_prop)->insert("security-password", userName.c_str());
-
-    FWKINFO("inserted  ldap security-username "
-            << (*m_prop)->find("security-username")->value().c_str()
-            << " password "
-            << ((*m_prop)->find("security-password") != nullptr
-                    ? (*m_prop)->find("security-password")->value().c_str()
-                    : "not set"));
-  }
-
-  void getAllowedPkcsAuthz(ROLES role) {
-    const std::string userName = getAllowedUser(role);
-    (*m_prop)->insert("security-alias", userName.c_str());
-    (*m_prop)->insert("security-keystorepass", "geode");
-
-    FWKINFO("inserted  PKCS security-alias"
-            << (*m_prop)->find("security-alias")->value().c_str()
-            << " password "
-            << ((*m_prop)->find("security-keystorepass") != nullptr
-                    ? (*m_prop)->find("security-keystorepass")->value().c_str()
-                    : "not set"));
-  }
+  void getAllowedDummyAuthz(ROLES role);
+  std::string getAllowedUser(ROLES role);
+  void getAllowedLdapAuthz(ROLES role);
+  void getAllowedPkcsAuthz(ROLES role);
 
   ROLES getRequiredRole() {
     bool requireReaders = true, requireWriters = true, requireQuery = true;
diff --git a/tests/cpp/testobject/ArrayOfByte.cpp b/tests/cpp/testobject/ArrayOfByte.cpp
new file mode 100644
index 0000000..ceb8411
--- /dev/null
+++ b/tests/cpp/testobject/ArrayOfByte.cpp
@@ -0,0 +1,101 @@
+/*
+ * 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.
+ */
+
+#include "ArrayOfByte.hpp"
+
+#include <fwklib/FwkException.hpp>
+#include <fwklib/GsRandom.hpp>
+#include <sstream>
+
+namespace testobject {
+
+using apache::geode::client::DataInputInternal;
+using apache::geode::client::DataOutputInternal;
+using apache::geode::client::Exception;
+using apache::geode::client::testframework::FwkException;
+using apache::geode::client::testframework::GsRandom;
+
+std::shared_ptr<CacheableBytes> ArrayOfByte::init(int size, bool encodeKey,
+                                                  bool encodeTimestamp) {
+  if (encodeKey) {
+    DataOutputInternal dos;
+    try {
+      int32_t index = 1234;
+      dos.writeInt(index);
+      if (encodeTimestamp) {
+        dos.writeInt(
+            std::chrono::system_clock::now().time_since_epoch().count());
+      }
+    } catch (Exception &e) {
+      FWKEXCEPTION("Unable to write to stream " << e.what());
+    }
+    int32_t bufSize = size;
+    char *buf = new char[bufSize];
+    memset(buf, 'V', bufSize);
+    int32_t rsiz = (bufSize <= 20) ? bufSize : 20;
+    GsRandom::getAlphanumericString(rsiz, buf);
+    memcpy(buf, dos.getBuffer(), dos.getBufferLength());
+    return CacheableBytes::create(std::vector<int8_t>(buf, buf + bufSize));
+  } else if (encodeTimestamp) {
+    FWKEXCEPTION("Should not happen");
+  } else {
+    return CacheableBytes::create(std::vector<int8_t>(size));
+  }
+}
+
+int64_t ArrayOfByte::getTimestamp(std::shared_ptr<CacheableBytes> bytes) {
+  if (bytes == nullptr) {
+    throw apache::geode::client::IllegalArgumentException(
+        "the bytes arg was null");
+  }
+  DataInputInternal di(reinterpret_cast<const uint8_t *>(bytes->value().data()),
+                       bytes->length(), nullptr);
+  try {
+    di.readInt32();
+    int64_t timestamp = di.readInt64();
+    if (timestamp == 0) {
+      FWKEXCEPTION("Object is not configured to encode timestamp");
+    }
+    return timestamp;
+  } catch (Exception &e) {
+    FWKEXCEPTION("Unable to read from stream " << e.what());
+  }
+}
+
+void ArrayOfByte::resetTimestamp(std::shared_ptr<CacheableBytes> bytes) {
+  DataInputInternal di(reinterpret_cast<const uint8_t *>(bytes->value().data()),
+                       bytes->length(), nullptr);
+  int32_t index;
+  try {
+    index = di.readInt32();
+    int64_t timestamp = di.readInt64();
+    if (timestamp == 0) {
+      return;
+    }
+  } catch (Exception &e) {
+    FWKEXCEPTION("Unable to read from stream " << e.what());
+  }
+  DataOutputInternal dos;
+  try {
+    dos.writeInt(index);
+    dos.writeInt(std::chrono::system_clock::now().time_since_epoch().count());
+  } catch (Exception &e) {
+    FWKEXCEPTION("Unable to write to stream " << e.what());
+  }
+}
+
+}  // namespace testobject
diff --git a/tests/cpp/testobject/ArrayOfByte.hpp b/tests/cpp/testobject/ArrayOfByte.hpp
index ca91ac8..9d749b3 100644
--- a/tests/cpp/testobject/ArrayOfByte.hpp
+++ b/tests/cpp/testobject/ArrayOfByte.hpp
@@ -20,106 +20,24 @@
  * limitations under the License.
  */
 
-#include <fwklib/FwkLog.hpp>
 #include <string>
 
-#include <ace/Time_Value.h>
-
 #include "DataInputInternal.hpp"
 #include "DataOutputInternal.hpp"
-#include "SerializationRegistry.hpp"
 #include "testobject_export.h"
 
 namespace testobject {
 
 using apache::geode::client::CacheableBytes;
-using apache::geode::client::DataInputInternal;
-using apache::geode::client::DataOutputInternal;
-using apache::geode::client::Exception;
-using apache::geode::client::testframework::FwkException;
-using apache::geode::client::testframework::GsRandom;
 
 class TESTOBJECT_EXPORT ArrayOfByte {
  public:
   static std::shared_ptr<CacheableBytes> init(int size, bool encodeKey,
-                                              bool encodeTimestamp) {
-    if (encodeKey) {
-      DataOutputInternal dos;
-      try {
-        int32_t index = 1234;
-        dos.writeInt(index);
-        if (encodeTimestamp) {
-          ACE_Time_Value startTime;
-          startTime = ACE_OS::gettimeofday();
-          ACE_UINT64 tusec = 0;
-          startTime.to_usec(tusec);
-          int64_t timestamp = tusec * 1000;
-          dos.writeInt(timestamp);
-        }
-      } catch (Exception &e) {
-        FWKEXCEPTION("Unable to write to stream " << e.what());
-      }
-      int32_t bufSize = size;
-      char *buf = new char[bufSize];
-      memset(buf, 'V', bufSize);
-      int32_t rsiz = (bufSize <= 20) ? bufSize : 20;
-      GsRandom::getAlphanumericString(rsiz, buf);
-      memcpy(buf, dos.getBuffer(), dos.getBufferLength());
-      return CacheableBytes::create(std::vector<int8_t>(buf, buf + bufSize));
-    } else if (encodeTimestamp) {
-      FWKEXCEPTION("Should not happen");
-    } else {
-      return CacheableBytes::create(std::vector<int8_t>(size));
-    }
-  }
+                                              bool encodeTimestamp);
 
-  static int64_t getTimestamp(std::shared_ptr<CacheableBytes> bytes) {
-    if (bytes == nullptr) {
-      throw apache::geode::client::IllegalArgumentException(
-          "the bytes arg was null");
-    }
-    DataInputInternal di(
-        reinterpret_cast<const uint8_t *>(bytes->value().data()),
-        bytes->length(), nullptr);
-    try {
-      di.readInt32();
-      int64_t timestamp = di.readInt64();
-      if (timestamp == 0) {
-        FWKEXCEPTION("Object is not configured to encode timestamp");
-      }
-      return timestamp;
-    } catch (Exception &e) {
-      FWKEXCEPTION("Unable to read from stream " << e.what());
-    }
-  }
+  static int64_t getTimestamp(std::shared_ptr<CacheableBytes> bytes);
 
-  static void resetTimestamp(std::shared_ptr<CacheableBytes> bytes) {
-    DataInputInternal di(
-        reinterpret_cast<const uint8_t *>(bytes->value().data()),
-        bytes->length(), nullptr);
-    int32_t index;
-    try {
-      index = di.readInt32();
-      int64_t timestamp = di.readInt64();
-      if (timestamp == 0) {
-        return;
-      }
-    } catch (Exception &e) {
-      FWKEXCEPTION("Unable to read from stream " << e.what());
-    }
-    DataOutputInternal dos;
-    try {
-      dos.writeInt(index);
-      ACE_Time_Value startTime;
-      startTime = ACE_OS::gettimeofday();
-      ACE_UINT64 tusec = 0;
-      startTime.to_usec(tusec);
-      int64_t timestamp = tusec * 1000;
-      dos.writeInt(timestamp);
-    } catch (Exception &e) {
-      FWKEXCEPTION("Unable to write to stream " << e.what());
-    }
-  }
+  static void resetTimestamp(std::shared_ptr<CacheableBytes> bytes);
 };
 }  // namespace testobject
 
diff --git a/tests/cpp/testobject/BatchObject.cpp b/tests/cpp/testobject/BatchObject.cpp
index 50d53c0..c1ea92a 100644
--- a/tests/cpp/testobject/BatchObject.cpp
+++ b/tests/cpp/testobject/BatchObject.cpp
@@ -17,17 +17,15 @@
 
 #include "BatchObject.hpp"
 
+#include <sstream>
+
 namespace testobject {
 
 using apache::geode::client::CacheableBytes;
 
 BatchObject::BatchObject(int32_t anIndex, int32_t batchSize, int32_t size) {
   index = anIndex;
-  ACE_Time_Value startTime;
-  startTime = ACE_OS::gettimeofday();
-  ACE_UINT64 tusec = 0;
-  startTime.to_usec(tusec);
-  timestamp = tusec * 1000;
+  timestamp = std::chrono::system_clock::now().time_since_epoch().count();
   batch = anIndex / batchSize;
   byteArray = CacheableBytes::create(std::vector<int8_t>(size));
 }
@@ -46,12 +44,11 @@
   byteArray = std::dynamic_pointer_cast<CacheableBytes>(input.readObject());
 }
 std::string BatchObject::toString() const {
-  char buf[102500];
-  sprintf(buf,
-          "BatchObject:[index = %d timestamp = %" PRIu64
-          " batch = %d byteArray=%d ]",
-          index, timestamp, batch, byteArray->length());
-  return buf;
+  std::stringstream strm;
+
+  strm << "BatchObject:[index = " << index << " timestamp = " << timestamp
+       << " batch = " << batch << " byteArray = " << byteArray->length() << "]";
+  return strm.str();
 }
 
 }  // namespace testobject
diff --git a/tests/cpp/testobject/BatchObject.hpp b/tests/cpp/testobject/BatchObject.hpp
index 8a8d29e..8d88d6c 100644
--- a/tests/cpp/testobject/BatchObject.hpp
+++ b/tests/cpp/testobject/BatchObject.hpp
@@ -23,10 +23,6 @@
 #include <cinttypes>
 #include <string>
 
-#include <ace/ACE.h>
-#include <ace/OS.h>
-#include <ace/Time_Value.h>
-
 #include <geode/CacheableBuiltins.hpp>
 
 #include "TimestampedObject.hpp"
@@ -67,11 +63,7 @@
   int getIndex() { return index; }
   int getBatch() { return batch; }
   void resetTimestamp() override {
-    ACE_Time_Value startTime;
-    startTime = ACE_OS::gettimeofday();
-    ACE_UINT64 tusec;
-    startTime.to_usec(tusec);
-    timestamp = tusec * 1000;
+    timestamp = std::chrono::system_clock::now().time_since_epoch().count();
   }
 
   static apache::geode::client::Serializable* createDeserializable() {
diff --git a/tests/cpp/testobject/CMakeLists.txt b/tests/cpp/testobject/CMakeLists.txt
index c5cfeb5..59c49c2 100644
--- a/tests/cpp/testobject/CMakeLists.txt
+++ b/tests/cpp/testobject/CMakeLists.txt
@@ -17,6 +17,7 @@
 project(testobject LANGUAGES CXX)
 
 add_library(testobject SHARED 
+  ArrayOfByte.cpp
   ArrayOfByte.hpp
   BatchObject.cpp
   BatchObject.hpp
@@ -61,6 +62,7 @@
   PositionPdx.hpp
   PSTObject.cpp
   PSTObject.hpp
+  TestFactories.cpp
   TestObject1.cpp
   TestObject1.hpp
   TimestampedObject.hpp
@@ -93,7 +95,7 @@
     apache-geode
     framework
   PRIVATE
-    ACE::ACE
+    Boost::boost
     _WarningsAsError
 )
 
diff --git a/tests/cpp/testobject/DeltaFastAssetAccount.cpp b/tests/cpp/testobject/DeltaFastAssetAccount.cpp
index 111818f..dbde67c 100644
--- a/tests/cpp/testobject/DeltaFastAssetAccount.cpp
+++ b/tests/cpp/testobject/DeltaFastAssetAccount.cpp
@@ -35,13 +35,11 @@
     assets->emplace(CacheableInt32::create(i), asset);
     netWorth += asset->getValue();
   }
+
   if (encodeTimestamp) {
-    ACE_Time_Value startTime;
-    startTime = ACE_OS::gettimeofday();
-    ACE_UINT64 tusec = 0;
-    startTime.to_usec(tusec);
-    timestamp = tusec * 1000;
+    timestamp = std::chrono::system_clock::now().time_since_epoch().count();
   }
+
   getBeforeUpdate = getbfrUpdate;
 }
 
diff --git a/tests/cpp/testobject/DeltaFastAssetAccount.hpp b/tests/cpp/testobject/DeltaFastAssetAccount.hpp
index ad96bdc..0a99ebc 100644
--- a/tests/cpp/testobject/DeltaFastAssetAccount.hpp
+++ b/tests/cpp/testobject/DeltaFastAssetAccount.hpp
@@ -21,12 +21,9 @@
 #define GEODE_TESTOBJECT_DELTAFASTASSETACCOUNT_H_
 
 #include <cinttypes>
+#include <sstream>
 #include <string>
 
-#include <ace/ACE.h>
-#include <ace/OS.h>
-#include <ace/Time_Value.h>
-
 #include <geode/CacheableBuiltins.hpp>
 #include <geode/Delta.hpp>
 
@@ -76,12 +73,12 @@
   void fromDelta(apache::geode::client::DataInput& input) override;
 
   std::string toString() const override {
-    char buf[102500];
-    sprintf(buf,
-            "DeltaFastAssetAccount:[acctId = %d customerName = %s netWorth = "
-            "%f timestamp = %" PRIu64 "]",
-            acctId, customerName->toString().c_str(), netWorth, timestamp);
-    return buf;
+    std::stringstream strm;
+
+    strm << "DeltaFastAssetAccount:[acctId = " << acctId
+         << " customerName = " << customerName->toString()
+         << " netWorth = " << netWorth << " timestamp = " << timestamp << "]";
+    return strm.str();
   }
 
   int getAcctId() { return acctId; }
@@ -103,15 +100,10 @@
   }
 
   void resetTimestamp() {
-    if (encodeTimestamp) {
-      ACE_Time_Value startTime;
-      startTime = ACE_OS::gettimeofday();
-      ACE_UINT64 tusec;
-      startTime.to_usec(tusec);
-      timestamp = tusec * 1000;
-    } else {
-      timestamp = 0;
-    }
+    timestamp =
+        encodeTimestamp
+            ? std::chrono::system_clock::now().time_since_epoch().count()
+            : 0;
   }
 
   void update() {
diff --git a/tests/cpp/testobject/DeltaPSTObject.cpp b/tests/cpp/testobject/DeltaPSTObject.cpp
index b34cb58..e981393 100644
--- a/tests/cpp/testobject/DeltaPSTObject.cpp
+++ b/tests/cpp/testobject/DeltaPSTObject.cpp
@@ -18,17 +18,14 @@
 #include "DeltaPSTObject.hpp"
 
 #include <fwklib/GsRandom.hpp>
+#include <sstream>
 
 #include "ArrayOfByte.hpp"
 
 namespace testobject {
 
 DeltaPSTObject::DeltaPSTObject(int size, bool encodeKey) : Delta() {
-  ACE_Time_Value startTime;
-  startTime = ACE_OS::gettimeofday();
-  ACE_UINT64 tusec = 0;
-  startTime.to_usec(tusec);
-  timestamp = tusec * 1000;
+  timestamp = std::chrono::system_clock::now().time_since_epoch().count();
   field1 = 1234;
   field2 = '*';
   if (size == 0) {
@@ -63,12 +60,12 @@
   valueData = std::dynamic_pointer_cast<CacheableBytes>(input.readObject());
 }
 std::string DeltaPSTObject::toString() const {
-  char buf[102500];
-  sprintf(buf,
-          "DeltaPSTObject:[timestamp = %" PRIu64
-          " field1 = %d field2 = %c valueData=%d ]",
-          timestamp, field1, field2, valueData->length());
-  return buf;
+  std::stringstream strm;
+
+  strm << "DeltaPSTObject:[timestamp = " << timestamp << " field1 = " << field1
+       << " field2 = " << field2 << " valueData = " << valueData->length()
+       << "]";
+  return strm.str();
 }
 
 }  // namespace testobject
diff --git a/tests/cpp/testobject/DeltaPSTObject.hpp b/tests/cpp/testobject/DeltaPSTObject.hpp
index ddab236..3927cef 100644
--- a/tests/cpp/testobject/DeltaPSTObject.hpp
+++ b/tests/cpp/testobject/DeltaPSTObject.hpp
@@ -23,10 +23,6 @@
 #include <cinttypes>
 #include <string>
 
-#include <ace/ACE.h>
-#include <ace/OS.h>
-#include <ace/Time_Value.h>
-
 #include <geode/Delta.hpp>
 
 #include "TimestampedObject.hpp"
@@ -69,11 +65,7 @@
   uint64_t getTimestamp() { return timestamp; }
 
   void resetTimestamp() {
-    ACE_Time_Value startTime;
-    startTime = ACE_OS::gettimeofday();
-    ACE_UINT64 tusec;
-    startTime.to_usec(tusec);
-    timestamp = tusec * 1000;
+    timestamp = std::chrono::system_clock::now().time_since_epoch().count();
   }
 
   inline std::shared_ptr<Delta> clone() const override { return nullptr; }
diff --git a/tests/cpp/testobject/DeltaTestImpl.cpp b/tests/cpp/testobject/DeltaTestImpl.cpp
index 50e9918..a919486 100644
--- a/tests/cpp/testobject/DeltaTestImpl.cpp
+++ b/tests/cpp/testobject/DeltaTestImpl.cpp
@@ -17,6 +17,8 @@
 
 #include "DeltaTestImpl.hpp"
 
+#include <sstream>
+
 namespace testobject {
 
 uint8_t DeltaTestImpl::INT_MASK = 0x1;
@@ -79,12 +81,8 @@
 }
 
 void DeltaTestImpl::toDelta(DataOutput& output) const {
-  {
-    ACE_Recursive_Thread_Mutex* lock =
-        const_cast<ACE_Recursive_Thread_Mutex*>(&m_lock);
-    ACE_Guard<ACE_Recursive_Thread_Mutex> _guard(*lock);
-    toDeltaCounter++;
-  }
+  ++toDeltaCounter;
+
   output.write(deltaBits);
   if ((deltaBits & INT_MASK) == INT_MASK) {
     output.writeInt(intVar);
@@ -104,11 +102,7 @@
 }
 
 void DeltaTestImpl::fromDelta(DataInput& input) {
-  {
-    ACE_Guard<ACE_Recursive_Thread_Mutex> _guard(m_lock);
-    fromDeltaCounter++;
-  }
-
+  ++fromDeltaCounter;
   deltaBits = input.read();
 
   if ((deltaBits & INT_MASK) == INT_MASK) {
@@ -129,10 +123,11 @@
 }
 
 std::string DeltaTestImpl::toString() const {
-  char buf[102500];
-  sprintf(buf, "DeltaTestImpl[hasDelta=%d int=%d double=%f str=%s \n",
-          m_hasDelta, intVar, doubleVar, str->toString().c_str());
-  return buf;
+  std::stringstream strm;
+
+  strm << "DeltaTestImpl[hasDelta=" << m_hasDelta << " int = " << intVar
+       << " double = " << doubleVar << " str = " << str->toString() << "\n";
+  return strm.str();
 }
 
 }  // namespace testobject
diff --git a/tests/cpp/testobject/DeltaTestImpl.hpp b/tests/cpp/testobject/DeltaTestImpl.hpp
index 96eab03..e6d861c 100644
--- a/tests/cpp/testobject/DeltaTestImpl.hpp
+++ b/tests/cpp/testobject/DeltaTestImpl.hpp
@@ -20,12 +20,7 @@
 #ifndef GEODE_TESTOBJECT_DELTATESTIMPL_H_
 #define GEODE_TESTOBJECT_DELTATESTIMPL_H_
 
-#include <ace/ACE.h>
-#include <ace/Condition_T.h>
-#include <ace/OS.h>
-#include <ace/Recursive_Thread_Mutex.h>
-#include <ace/Task.h>
-#include <ace/Time_Value.h>
+#include <atomic>
 
 #include <geode/DataSerializable.hpp>
 #include <geode/Delta.hpp>
@@ -60,9 +55,8 @@
 
   bool m_hasDelta;
   uint8_t deltaBits;
-  mutable int64_t toDeltaCounter;
-  int64_t fromDeltaCounter;
-  ACE_Recursive_Thread_Mutex m_lock;
+  mutable std::atomic<int64_t> toDeltaCounter;
+  std::atomic<int64_t> fromDeltaCounter;
 
  public:
   DeltaTestImpl();
diff --git a/tests/cpp/testobject/DeltaTestObj.hpp b/tests/cpp/testobject/DeltaTestObj.hpp
index d6de7a0..5c318fa 100644
--- a/tests/cpp/testobject/DeltaTestObj.hpp
+++ b/tests/cpp/testobject/DeltaTestObj.hpp
@@ -20,6 +20,8 @@
  * limitations under the License.
  */
 
+#include <sstream>
+
 #include "DeltaTestImpl.hpp"
 #include "testobject_export.h"
 
@@ -65,12 +67,12 @@
   void setFromDeltaCounter(int counter) { fromDeltaCounter = counter; }
   void setToDeltaCounter(int counter) { toDeltaCounter = counter; }
   std::string toString() const {
-    char buf[102500];
-    sprintf(buf,
-            "DeltaTestObj: toDeltaCounter = %lld fromDeltaCounter = %lld\n",
-            toDeltaCounter, fromDeltaCounter);
-    // DeltaTestImpl::toString();
-    return buf;
+    std::stringstream strm;
+
+    strm << "DeltaTestObj: toDeltaCounter = " << toDeltaCounter
+         << ", fromDeltaCounter = " << fromDeltaCounter << "\n";
+
+    return strm.str();
   }
   static Serializable* create() { return new DeltaTestObj(); }
   int32_t classId() const override { return 32; }
diff --git a/tests/cpp/testobject/EqStruct.cpp b/tests/cpp/testobject/EqStruct.cpp
index 3584e90..8fd99bb 100644
--- a/tests/cpp/testobject/EqStruct.cpp
+++ b/tests/cpp/testobject/EqStruct.cpp
@@ -17,6 +17,8 @@
 
 #include "EqStruct.hpp"
 
+#include <sstream>
+
 #include <geode/DataInput.hpp>
 #include <geode/DataOutput.hpp>
 
@@ -25,11 +27,8 @@
 EqStruct::EqStruct(int index) {
   myIndex = index;  // index
   state = "1";
-  ACE_Time_Value startTime;
-  startTime = ACE_OS::gettimeofday();
-  ACE_UINT64 tusec = 0;
-  startTime.to_usec(tusec);
-  timestamp = tusec * 1000;
+
+  timestamp = std::chrono::system_clock::now().time_since_epoch().count();
   executedPriceSum = 5.5;
   cxlQty = 10;
   isSyntheticOrder = 0;
@@ -200,10 +199,11 @@
   discretionOffset = in.readDouble();
 }
 std::string EqStruct::toString() const {
-  char buf[102500];
-  sprintf(buf, "EqStruct:[timestamp = %" PRIu64 " myIndex = %d cxlQty = %d ]",
-          timestamp, myIndex, cxlQty);
-  return buf;
+  std::stringstream strm;
+
+  strm << "EqStruct:[timestamp = " << timestamp << " myIndex = " << myIndex
+       << " cxlQty = " << cxlQty << "]";
+  return strm.str();
 }
 
 }  // namespace testobject
diff --git a/tests/cpp/testobject/EqStruct.hpp b/tests/cpp/testobject/EqStruct.hpp
index 538063d..120ff9c 100644
--- a/tests/cpp/testobject/EqStruct.hpp
+++ b/tests/cpp/testobject/EqStruct.hpp
@@ -24,10 +24,6 @@
 #include <fwklib/FwkException.hpp>
 #include <string>
 
-#include <ace/ACE.h>
-#include <ace/OS.h>
-#include <ace/Time_Value.h>
-
 #include "TimestampedObject.hpp"
 #include "testobject_export.h"
 
@@ -112,9 +108,9 @@
   void validate(int index) {
     int encodedIndex = myIndex;
     if (encodedIndex != index) {
-      char logmsg[2048];
-      sprintf(logmsg, "Expected index %d , got %d.\n", index, encodedIndex);
-      throw FwkException(logmsg);
+      throw FwkException(std::string("Expected index ") +
+                         std::to_string(index) + ", got " +
+                         std::to_string(encodedIndex) + ".\n");
     }
   }
   void update() {
@@ -127,11 +123,7 @@
 
   uint64_t getTimestamp() override { return timestamp; }
   void resetTimestamp() override {
-    ACE_Time_Value startTime;
-    startTime = ACE_OS::gettimeofday();
-    ACE_UINT64 tusec;
-    startTime.to_usec(tusec);
-    timestamp = tusec * 1000;
+    timestamp = std::chrono::system_clock::now().time_since_epoch().count();
   }
 
   static apache::geode::client::Serializable* createDeserializable() {
diff --git a/tests/cpp/testobject/FastAsset.hpp b/tests/cpp/testobject/FastAsset.hpp
index 8f21a79..8ef534d 100644
--- a/tests/cpp/testobject/FastAsset.hpp
+++ b/tests/cpp/testobject/FastAsset.hpp
@@ -26,10 +26,6 @@
 
 #include <string>
 
-#include <ace/ACE.h>
-#include <ace/OS.h>
-#include <ace/Time_Value.h>
-
 #include "TimestampedObject.hpp"
 #include "testobject_export.h"
 
diff --git a/tests/cpp/testobject/FastAssetAccount.cpp b/tests/cpp/testobject/FastAssetAccount.cpp
index 9f154d5..bbcbb10 100644
--- a/tests/cpp/testobject/FastAssetAccount.cpp
+++ b/tests/cpp/testobject/FastAssetAccount.cpp
@@ -18,6 +18,7 @@
 #include "FastAssetAccount.hpp"
 
 #include <cinttypes>
+#include <sstream>
 
 #include "FastAsset.hpp"
 
@@ -39,12 +40,9 @@
     assets->emplace(CacheableInt32::create(i), asset);
     netWorth += asset->getValue();
   }
+
   if (encodeTimestamp) {
-    ACE_Time_Value startTime;
-    startTime = ACE_OS::gettimeofday();
-    ACE_UINT64 tusec = 0;
-    startTime.to_usec(tusec);
-    timestamp = tusec * 1000;
+    timestamp = std::chrono::system_clock::now().time_since_epoch().count();
   }
 }
 
@@ -65,12 +63,12 @@
 }
 
 std::string FastAssetAccount::toString() const {
-  char buf[102500];
-  sprintf(buf,
-          "FastAssetAccount:[acctId = %d customerName = %s netWorth = %f "
-          "timestamp = %" PRIu64 "]",
-          acctId, customerName->toString().c_str(), netWorth, timestamp);
-  return buf;
+  std::stringstream strm;
+
+  strm << "FastAssetAccount:[acctId = " << acctId
+       << " customerName = " << customerName->toString()
+       << " netWorth = " << netWorth << "timestamp = " << timestamp;
+  return strm.str();
 }
 
 }  // namespace testobject
diff --git a/tests/cpp/testobject/FastAssetAccount.hpp b/tests/cpp/testobject/FastAssetAccount.hpp
index 7ed2905..b310336 100644
--- a/tests/cpp/testobject/FastAssetAccount.hpp
+++ b/tests/cpp/testobject/FastAssetAccount.hpp
@@ -22,10 +22,6 @@
 
 #include <string>
 
-#include <ace/ACE.h>
-#include <ace/OS.h>
-#include <ace/Time_Value.h>
-
 #include <geode/CacheableBuiltins.hpp>
 
 #include "TimestampedObject.hpp"
@@ -92,16 +88,12 @@
   }
 
   void resetTimestamp() override {
-    if (encodeTimestamp) {
-      ACE_Time_Value startTime;
-      startTime = ACE_OS::gettimeofday();
-      ACE_UINT64 tusec;
-      startTime.to_usec(tusec);
-      timestamp = tusec * 1000;
-    } else {
-      timestamp = 0;
-    }
+    timestamp =
+        encodeTimestamp
+            ? std::chrono::system_clock::now().time_since_epoch().count()
+            : 0;
   }
+
   void update() {
     incrementNetWorth();
     if (encodeTimestamp) {
diff --git a/tests/cpp/testobject/InvalidPdxUsage.cpp b/tests/cpp/testobject/InvalidPdxUsage.cpp
index 5532250..1f49653 100644
--- a/tests/cpp/testobject/InvalidPdxUsage.cpp
+++ b/tests/cpp/testobject/InvalidPdxUsage.cpp
@@ -744,12 +744,7 @@
       fromDataexceptionCounter, exceptionCounter);
 }
 std::string InvalidPdxUsage::toString() const {
-  char idbuf[1024];
-  // sprintf(idbuf,"PdxObject: [ m_bool=%d ] [m_byte=%d] [m_int16=%d]
-  // [m_int32=%d] [m_float=%f] [m_double=%lf] [ m_string=%s ]",m_bool, m_byte,
-  // m_int16, m_int32, m_float, m_double, m_string);
-  sprintf(idbuf, "PdxObject:[m_int32=%d]", m_int32);
-  return idbuf;
+  return "PdxObject:[m_int32=" + std::to_string(m_int32) + "]";
 }
 
 bool InvalidPdxUsage::equals(PdxTests::InvalidPdxUsage& other,
diff --git a/tests/cpp/testobject/InvalidPdxUsage.hpp b/tests/cpp/testobject/InvalidPdxUsage.hpp
index 1be93f9..bab9579 100644
--- a/tests/cpp/testobject/InvalidPdxUsage.hpp
+++ b/tests/cpp/testobject/InvalidPdxUsage.hpp
@@ -26,6 +26,7 @@
  *      Author: npatel
  */
 
+#include <sstream>
 #include <util/Log.hpp>
 
 #include <geode/CacheableEnum.hpp>
@@ -75,9 +76,10 @@
   CharTypesWithInvalidUsage() { init(); }
 
   std::string toString() const override {
-    char idbuf[1024];
-    sprintf(idbuf, "%c %c %c", m_ch, m_chArray[0], m_chArray[1]);
-    return idbuf;
+    std::stringstream strm;
+
+    strm << m_ch << " " << m_chArray[0] << " " << m_chArray[1];
+    return strm.str();
   }
 
   bool equals(CharTypesWithInvalidUsage& other) const {
diff --git a/tests/cpp/testobject/NestedPdxObject.cpp b/tests/cpp/testobject/NestedPdxObject.cpp
index 44fc86e..d85215f 100644
--- a/tests/cpp/testobject/NestedPdxObject.cpp
+++ b/tests/cpp/testobject/NestedPdxObject.cpp
@@ -21,15 +21,17 @@
 
 #include "NestedPdxObject.hpp"
 
+#include <sstream>
+
 namespace testobject {
 
 void ChildPdx::toData(PdxWriter& pw) const {
   LOGDEBUG("ChildPdx::toData() Started......");
 
-  pw.writeInt("m_childId", m_childId);
+  pw.writeInt("m_childId", childId_);
   pw.markIdentityField("m_childId");
-  pw.writeObject("m_enum", m_enum);
-  pw.writeString("m_childName", m_childName);
+  pw.writeObject("m_enum", enum_);
+  pw.writeString("m_childName", childName_);
 
   LOGDEBUG("ChildPdx::toData() Done......");
 }
@@ -37,17 +39,17 @@
 void ChildPdx::fromData(PdxReader& pr) {
   LOGINFO("ChildPdx::fromData() start...");
 
-  m_childId = pr.readInt("m_childId");
-  LOGINFO("ChildPdx::fromData() m_childId = %d ", m_childId);
-  m_enum = std::dynamic_pointer_cast<CacheableEnum>(pr.readObject("m_enum"));
-  m_childName = pr.readString("m_childName");
+  childId_ = pr.readInt("m_childId");
+  LOGINFO("ChildPdx::fromData() m_childId = %d ", childId_);
+  enum_ = std::dynamic_pointer_cast<CacheableEnum>(pr.readObject("m_enum"));
+  childName_ = pr.readString("m_childName");
 
   LOGINFO("ChildPdx::fromData() end...");
 }
 
 std::string ChildPdx::toString() const {
-  return "ChildPdx: [m_childId=" + std::to_string(m_childId) +
-         "] [ m_childName=" + m_childName + " ]";
+  return "ChildPdx: [m_childId=" + std::to_string(childId_) +
+         "] [ m_childName=" + childName_ + " ]";
 }
 
 bool ChildPdx::equals(ChildPdx& other) const {
@@ -58,32 +60,57 @@
     LOGINFO("ChildPdx::equals1");
     return false;
   }
-  if ((m_childName == other.m_childName) && (m_childId == other.m_childId) &&
-      (m_enum->getEnumOrdinal() == other.m_enum->getEnumOrdinal()) &&
-      (m_enum->getEnumClassName() == other.m_enum->getEnumClassName()) &&
-      (m_enum->getEnumName() == other.m_enum->getEnumName())) {
+  if ((childName_ == other.childName_) && (childId_ == other.childId_) &&
+      (enum_->getEnumOrdinal() == other.enum_->getEnumOrdinal()) &&
+      (enum_->getEnumClassName() == other.enum_->getEnumClassName()) &&
+      (enum_->getEnumName() == other.enum_->getEnumName())) {
     LOGINFO("ChildPdx::equals2");
     return true;
   }
   return false;
 }
 
+ParentPdx::ParentPdx()
+    : parentId_{-1},
+      parentName_{},
+      childPdx_{},
+      enum_{},
+      char_{L'\0'},
+      charArray_{} {}
+
+ParentPdx::ParentPdx(int id)
+    : parentId_{id},
+      parentName_{"name-" + std::to_string(id)},
+      childPdx_{std::make_shared<ChildPdx>(id)},
+      enum_{CacheableEnum::create("Gender", "male", 6)},
+      char_{'C'},
+      charArray_{{'X', 'Y'}} {}
+
+const std::string& ParentPdx::getClassName() const {
+  static std::string className = "testobject.ParentPdx";
+  return className;
+}
+
+std::shared_ptr<PdxSerializable> ParentPdx::createDeserializable() {
+  return std::make_shared<ParentPdx>();
+}
+
 void ParentPdx::toData(PdxWriter& pw) const {
   LOGDEBUG("ParentPdx::toData() Started......");
 
-  pw.writeInt("m_parentId", m_parentId);
+  pw.writeInt("m_parentId", parentId_);
   LOGDEBUG("ParentPdx::toData() m_parentId......");
   pw.markIdentityField("m_parentId");
-  pw.writeObject("m_enum", m_enum);
+  pw.writeObject("m_enum", enum_);
   LOGDEBUG("ParentPdx::toData() m_enum......");
-  pw.writeString("m_parentName", m_parentName);
+  pw.writeString("m_parentName", parentName_);
   LOGDEBUG("ParentPdx::toData() m_parentName......");
-  pw.writeObject("m_childPdx", m_childPdx);
+  pw.writeObject("m_childPdx", childPdx_);
   LOGDEBUG("ParentPdx::toData() m_childPdx......");
   pw.markIdentityField("m_childPdx");
 
-  pw.writeChar("m_char", m_char);
-  pw.writeCharArray("m_charArray", m_charArray);
+  pw.writeChar("m_char", char_);
+  pw.writeCharArray("m_charArray", charArray_);
 
   LOGDEBUG("ParentPdx::toData() Done......");
 }
@@ -91,39 +118,39 @@
 void ParentPdx::fromData(PdxReader& pr) {
   LOGINFO("ParentPdx::fromData() start...");
 
-  m_parentId = pr.readInt("m_parentId");
-  LOGINFO("ParentPdx::fromData() m_parentId = %d ", m_parentId);
-  m_enum = std::dynamic_pointer_cast<CacheableEnum>(pr.readObject("m_enum"));
+  parentId_ = pr.readInt("m_parentId");
+  LOGINFO("ParentPdx::fromData() m_parentId = %d ", parentId_);
+  enum_ = std::dynamic_pointer_cast<CacheableEnum>(pr.readObject("m_enum"));
   LOGINFO("ParentPdx::fromData() read gender ");
-  m_parentName = pr.readString("m_parentName");
-  LOGINFO("ParentPdx::fromData() m_parentName = %s ", m_parentName.c_str());
-  m_childPdx = pr.readObject("m_childPdx");
+  parentName_ = pr.readString("m_parentName");
+  LOGINFO("ParentPdx::fromData() m_parentName = %s ", parentName_.c_str());
+  childPdx_ = pr.readObject("m_childPdx");
   LOGINFO("ParentPdx::fromData() start3...");
 
-  m_char = pr.readChar("m_char");
-  m_charArray = pr.readCharArray("m_charArray");
+  char_ = pr.readChar("m_char");
+  charArray_ = pr.readCharArray("m_charArray");
 
   LOGINFO("ParentPdx::fromData() end...");
 }
 
 std::string ParentPdx::toString() const {
-  char idbuf[1024];
-  sprintf(idbuf,
-          "ParentPdx: [m_parentId=%d] [ m_parentName=%s ] [m_childPdx = %s ] ",
-          m_parentId, m_parentName.c_str(), m_childPdx->toString().c_str());
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "ParentPdx: [m_parentId=" << parentId_
+       << "][m_parentName = " << parentName_ << "][m_childPdx = " << childPdx_
+       << "] ";
+  return strm.str();
 }
 
 bool ParentPdx::equals(const ParentPdx& other, bool isPdxReadSerialized) const {
-  if ((m_parentName == other.m_parentName) &&
-      (m_parentId == other.m_parentId) &&
-      (m_enum->getEnumOrdinal() == other.m_enum->getEnumOrdinal()) &&
-      (m_enum->getEnumClassName() == other.m_enum->getEnumClassName()) &&
-      (m_enum->getEnumName() == other.m_enum->getEnumName()) &&
-      m_char == other.m_char && m_charArray == other.m_charArray) {
+  if ((parentName_ == other.parentName_) && (parentId_ == other.parentId_) &&
+      (enum_->getEnumOrdinal() == other.enum_->getEnumOrdinal()) &&
+      (enum_->getEnumClassName() == other.enum_->getEnumClassName()) &&
+      (enum_->getEnumName() == other.enum_->getEnumName()) &&
+      char_ == other.char_ && charArray_ == other.charArray_) {
     if (!isPdxReadSerialized) {
-      ChildPdx* ch1 = dynamic_cast<ChildPdx*>(m_childPdx.get());
-      ChildPdx* ch2 = dynamic_cast<ChildPdx*>(other.m_childPdx.get());
+      ChildPdx* ch1 = dynamic_cast<ChildPdx*>(childPdx_.get());
+      ChildPdx* ch2 = dynamic_cast<ChildPdx*>(other.childPdx_.get());
 
       if (ch1->equals(*ch2)) {
         return true;
diff --git a/tests/cpp/testobject/NestedPdxObject.hpp b/tests/cpp/testobject/NestedPdxObject.hpp
index b5724d7..e1f43f2 100644
--- a/tests/cpp/testobject/NestedPdxObject.hpp
+++ b/tests/cpp/testobject/NestedPdxObject.hpp
@@ -45,17 +45,17 @@
 
 class TESTOBJECT_EXPORT ChildPdx : public PdxSerializable {
  private:
-  int m_childId;
-  std::string m_childName;
-  std::shared_ptr<CacheableEnum> m_enum;
+  int childId_;
+  std::string childName_;
+  std::shared_ptr<CacheableEnum> enum_;
 
  public:
   ChildPdx() {}
 
   explicit ChildPdx(int id) {
-    m_childId = id;
-    m_childName = "name-" + std::to_string(id);
-    m_enum = CacheableEnum::create("Gender", "female", 5);
+    childId_ = id;
+    childName_ = "name-" + std::to_string(id);
+    enum_ = CacheableEnum::create("Gender", "female", 5);
   }
 
   ~ChildPdx() override = default;
@@ -65,9 +65,9 @@
     return objectSize;
   }
 
-  int32_t getChildId() { return m_childId; }
+  int32_t getChildId() { return childId_; }
 
-  const std::string& getChildName() { return m_childName; }
+  const std::string& getChildName() { return childName_; }
 
   using PdxSerializable::fromData;
   using PdxSerializable::toData;
@@ -92,47 +92,34 @@
 
 class TESTOBJECT_EXPORT ParentPdx : public PdxSerializable {
  private:
-  int m_parentId;
-  std::string m_parentName;
-  std::shared_ptr<Cacheable> m_childPdx;
-  std::shared_ptr<CacheableEnum> m_enum;
-  char16_t m_char;
-  std::vector<char16_t> m_charArray;
+  int parentId_;
+  std::string parentName_;
+  std::shared_ptr<Cacheable> childPdx_;
+  std::shared_ptr<CacheableEnum> enum_;
+  char16_t char_;
+  std::vector<char16_t> charArray_;
 
  public:
-  ParentPdx() {}
-
-  explicit ParentPdx(int id) {
-    m_parentId = id;
-    m_parentName = "name-" + std::to_string(id);
-    m_childPdx = std::make_shared<ChildPdx>(id /** 1393*/);
-    m_enum = CacheableEnum::create("Gender", "male", 6);
-
-    m_char = 'C';
-
-    m_charArray = std::vector<char16_t>({'X', 'Y'});
-  }
+  ParentPdx();
+  explicit ParentPdx(int id);
 
   ~ParentPdx() override = default;
 
-  virtual size_t objectSize() const override {
-    auto objectSize = sizeof(ParentPdx);
-    return objectSize;
-  }
+  virtual size_t objectSize() const override { return sizeof(ParentPdx); }
 
-  int32_t getParentId() { return m_parentId; }
+  int32_t getParentId() { return parentId_; }
 
-  const std::string& getParentName() { return m_parentName; }
+  const std::string& getParentName() { return parentName_; }
 
   std::shared_ptr<ChildPdx> getChildPdx() {
-    return std::dynamic_pointer_cast<ChildPdx>(m_childPdx);
+    return std::dynamic_pointer_cast<ChildPdx>(childPdx_);
   }
 
-  std::shared_ptr<CacheableEnum> getEnum() { return m_enum; }
+  std::shared_ptr<CacheableEnum> getEnum() { return enum_; }
 
-  char16_t getChar() { return m_char; }
+  char16_t getChar() { return char_; }
 
-  std::vector<char16_t> getCharArray() { return m_charArray; }
+  std::vector<char16_t> getCharArray() { return charArray_; }
 
   using PdxSerializable::fromData;
   using PdxSerializable::toData;
@@ -143,14 +130,9 @@
 
   std::string toString() const override;
 
-  const std::string& getClassName() const override {
-    static std::string className = "testobject.ParentPdx";
-    return className;
-  }
+  const std::string& getClassName() const override;
 
-  static std::shared_ptr<PdxSerializable> createDeserializable() {
-    return std::make_shared<ParentPdx>();
-  }
+  static std::shared_ptr<PdxSerializable> createDeserializable();
 
   bool equals(const ParentPdx& other, bool isPdxReadSerialized) const;
 };
diff --git a/tests/cpp/testobject/NonPdxType.hpp b/tests/cpp/testobject/NonPdxType.hpp
index 40e3472..07ad4dd 100644
--- a/tests/cpp/testobject/NonPdxType.hpp
+++ b/tests/cpp/testobject/NonPdxType.hpp
@@ -32,7 +32,6 @@
 #include <geode/CacheableObjectArray.hpp>
 #include <geode/PdxWrapper.hpp>
 
-#include "SerializationRegistry.hpp"
 #include "testobject_export.h"
 
 namespace PdxTests {
diff --git a/tests/cpp/testobject/PSTObject.cpp b/tests/cpp/testobject/PSTObject.cpp
index 96b2e44..465554b 100644
--- a/tests/cpp/testobject/PSTObject.cpp
+++ b/tests/cpp/testobject/PSTObject.cpp
@@ -18,17 +18,14 @@
 #include "PSTObject.hpp"
 
 #include <fwklib/GsRandom.hpp>
+#include <sstream>
 
 #include "ArrayOfByte.hpp"
 
 namespace testobject {
 
 PSTObject::PSTObject(int size, bool encodeKey) {
-  ACE_Time_Value startTime;
-  startTime = ACE_OS::gettimeofday();
-  ACE_UINT64 tusec = 0;
-  startTime.to_usec(tusec);
-  timestamp = tusec * 1000;
+  timestamp = std::chrono::system_clock::now().time_since_epoch().count();
   field1 = 1234;
   field2 = '*';
   if (size == 0) {
@@ -53,12 +50,12 @@
   valueData = std::dynamic_pointer_cast<CacheableBytes>(input.readObject());
 }
 std::string PSTObject::toString() const {
-  char buf[102500];
-  sprintf(buf,
-          "PSTObject:[timestamp = %" PRIu64
-          " field1 = %d field2 = %c valueData=%d ]",
-          timestamp, field1, field2, valueData->length());
-  return buf;
+  std::stringstream strm;
+
+  strm << "PSTObject:[timestamp = " << timestamp << " field1 = " << field1
+       << " field2 = " << field2 << " valueData = " << valueData->length()
+       << "]";
+  return strm.str();
 }
 
 }  // namespace testobject
diff --git a/tests/cpp/testobject/PSTObject.hpp b/tests/cpp/testobject/PSTObject.hpp
index fddb1c4..c738ed6 100644
--- a/tests/cpp/testobject/PSTObject.hpp
+++ b/tests/cpp/testobject/PSTObject.hpp
@@ -23,10 +23,6 @@
 #include <cinttypes>
 #include <string>
 
-#include <ace/ACE.h>
-#include <ace/OS.h>
-#include <ace/Time_Value.h>
-
 #include <geode/CacheableBuiltins.hpp>
 
 #include "TimestampedObject.hpp"
@@ -68,11 +64,7 @@
 
   uint64_t getTimestamp() override { return timestamp; }
   void resetTimestamp() override {
-    ACE_Time_Value startTime;
-    startTime = ACE_OS::gettimeofday();
-    ACE_UINT64 tusec;
-    startTime.to_usec(tusec);
-    timestamp = tusec * 1000;
+    timestamp = std::chrono::system_clock::now().time_since_epoch().count();
   }
 
   static apache::geode::client::Serializable* createDeserializable() {
diff --git a/tests/cpp/testobject/PdxClassV1.cpp b/tests/cpp/testobject/PdxClassV1.cpp
index 830e07f..23b07cc 100644
--- a/tests/cpp/testobject/PdxClassV1.cpp
+++ b/tests/cpp/testobject/PdxClassV1.cpp
@@ -17,6 +17,8 @@
 
 #include "PdxClassV1.hpp"
 
+#include <sstream>
+
 namespace PdxTests {
 
 using apache::geode::client::Exception;
@@ -145,19 +147,11 @@
   LOGDEBUG("PdxObject::fromData() End...");
 }
 std::string PdxType1V1::toString() const {
-  char idbuf[4096];
-  // sprintf(idbuf,"PdxObject: [ m_bool=%d ] [m_byte=%d] [m_int16=%d]
-  // [m_int32=%d] [m_long=%lld] [m_float=%f] [ m_string=%s ]",m_bool, m_byte,
-  // m_int16, m_int32, m_long, m_float, m_string);
-  // sprintf(idbuf,"PdxObject: [ m_bool=%d ] [m_byte=%d] [m_int16=%d]
-  // [m_int32=%d] [m_long=%lld] [m_float=%f] [m_double=%Lf] [ m_string=%s
-  // ]",m_bool, m_byte, m_int16, m_int32, m_long, m_float, m_double, m_string);
-  // sprintf(idbuf,"PdxObject: [ m_bool=%d ] [m_byte=%d] [m_int16=%d]
-  // [m_int32=%d] [m_float=%f] [m_double=%lf] [ m_string=%s ]",m_bool, m_byte,
-  // m_int16, m_int32, m_float, m_double, m_string);
-  sprintf(idbuf, "PdxType1V1:[ m_i1=%d ] [ m_i2=%d ] [ m_i3=%d ] [ m_i4=%d ]",
-          m_i1, m_i2, m_i3, m_i4);
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "PdxType1V1:[m_i1 = " << m_i1 << " ][m_i2 = " << m_i2
+       << "][m_i3 = " << m_i3 << "][m_i4 = " << m_i4 << "]";
+  return strm.str();
 }
 
 /************************************************************
@@ -226,10 +220,11 @@
   m_i4 = pr.readInt("i4");
 }
 std::string PdxType2V1::toString() const {
-  char idbuf[4096];
-  sprintf(idbuf, "PdxType2V1:[ m_i1=%d ] [ m_i2=%d ] [ m_i3=%d ] [ m_i4=%d ]",
-          m_i1, m_i2, m_i3, m_i4);
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "PdxType2V1:[m_i1 = " << m_i1 << " ][m_i2 = " << m_i2
+       << "][m_i3 = " << m_i3 << "][m_i4 = " << m_i4 << "]";
+  return strm.str();
 }
 
 /************************************************************
@@ -392,10 +387,11 @@
   m_i4 = pr.readInt("i4");
 }
 std::string PdxTypesV1R1::toString() const {
-  char idbuf[4096];
-  sprintf(idbuf, "PdxTypesV1R1:[ m_i1=%d ] [ m_i2=%d ] [ m_i3=%d ] [ m_i4=%d ]",
-          m_i1, m_i2, m_i3, m_i4);
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "PdxTypesV1R1:[m_i1 = " << m_i1 << " ][m_i2 = " << m_i2
+       << "][m_i3 = " << m_i3 << "][m_i4 = " << m_i4 << "]";
+  return strm.str();
 }
 
 /************************************************************
@@ -461,10 +457,11 @@
   m_i4 = pr.readInt("i4");
 }
 std::string PdxTypesV1R2::toString() const {
-  char idbuf[4096];
-  sprintf(idbuf, "PdxTypesV1R1:[ m_i1=%d ] [ m_i2=%d ] [ m_i3=%d ] [ m_i4=%d ]",
-          m_i1, m_i2, m_i3, m_i4);
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "PdxTypesV1R2:[m_i1 = " << m_i1 << " ][m_i2 = " << m_i2
+       << "][m_i3 = " << m_i3 << "][m_i4 = " << m_i4 << "]";
+  return strm.str();
 }
 
 /************************************************************
@@ -541,10 +538,12 @@
   if (!hasField) throw Exception("i4 is an valid field");
 }
 std::string PdxTypesIgnoreUnreadFieldsV1::toString() const {
-  char idbuf[4096];
-  sprintf(idbuf, "PdxTypesV1R1:[ m_i1=%d ] [ m_i2=%d ] [ m_i3=%d ] [ m_i4=%d ]",
-          m_i1, m_i2, m_i3, m_i4);
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "PdxTypesIgnoreUnreadFieldsV1:[m_i1 = " << m_i1
+       << " ][m_i2 = " << m_i2 << "][m_i3 = " << m_i3 << "][m_i4 = " << m_i4
+       << "]";
+  return strm.str();
 }
 
 /************************************************************
@@ -648,12 +647,7 @@
   m_floatArray = pr.readFloatArray("m_floatArray");
   m_doubleArray = pr.readDoubleArray("m_doubleArray");
 }
-std::string PdxVersionedV1::toString() const {
-  char idbuf[4096];
-  // sprintf(idbuf,"PdxTypesV1R1:[ m_i1=%d ] [ m_i2=%d ] [ m_i3=%d ] [ m_i4=%d
-  // ]", m_i1, m_i2, m_i3, m_i4 );
-  return idbuf;
-}
+std::string PdxVersionedV1::toString() const { return ""; }
 
 /************************************************************
  *  TestKey
@@ -717,9 +711,10 @@
   // sArr = (string[]) reader.ReadObject("sArrObject");
 }
 std::string TestEqualsV1::toString() const {
-  char idbuf[1024];
-  sprintf(idbuf, "TestEqualsV1:[i1=%d ] [i2=%d] ", i1, i2);
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "TestEqualsV1:[i1 = " << i1 << " ][i2 = " << i2 << "]";
+  return strm.str();
 }
 
 }  // namespace PdxTests
diff --git a/tests/cpp/testobject/PdxClassV2.cpp b/tests/cpp/testobject/PdxClassV2.cpp
index 624d571..de717f3 100644
--- a/tests/cpp/testobject/PdxClassV2.cpp
+++ b/tests/cpp/testobject/PdxClassV2.cpp
@@ -17,6 +17,8 @@
 
 #include "PdxClassV2.hpp"
 
+#include <sstream>
+
 namespace PdxTests {
 
 using apache::geode::client::Exception;
@@ -106,12 +108,13 @@
   // LOGDEBUG("PdxType1V2::fromData() End...");
 }
 std::string PdxTypes1V2::toString() const {
-  char idbuf[4096];
-  sprintf(idbuf,
-          "PdxType1V1:[ m_i1=%d ] [ m_i2=%d ] [ m_i3=%d ] [ m_i4=%d ] [ "
-          "m_i5=%d ] [ m_i6=%d ] [ m_diffInExtraFields=%d ]",
-          m_i1, m_i2, m_i3, m_i4, m_i5, m_i6, m_diffInExtraFields);
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "PdxTypes1V2:[m_i1 = " << m_i1 << " ][m_i2 = " << m_i2
+       << "][m_i3 = " << m_i3 << "][m_i4 = " << m_i4 << "]"
+       << "[m_i5 = " << m_i5 << "][m_i6 = " << m_i6
+       << "][m_diffInExtraFields = " << m_diffInExtraFields << "]";
+  return strm.str();
 }
 
 /************************************************************
@@ -193,12 +196,12 @@
   m_i4 = pr.readInt("i4");
 }
 std::string PdxTypes2V2::toString() const {
-  char idbuf[4096];
-  sprintf(idbuf,
-          "PdxTypes2V2:[ m_i1=%d ] [ m_i2=%d ] [ m_i3=%d ] [ m_i4=%d ] [ "
-          "m_i5=%d ] [ m_i6=%d ]",
-          m_i1, m_i2, m_i3, m_i4, m_i5, m_i6);
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "PdxTypes2V2:[m_i1 = " << m_i1 << " ][m_i2 = " << m_i2
+       << "][m_i3 = " << m_i3 << "][m_i4 = " << m_i4 << "]"
+       << "[m_i5 = " << m_i5 << "][m_i6 = " << m_i6 << "]";
+  return strm.str();
 }
 
 /************************************************************
@@ -379,12 +382,12 @@
   m_i6 = pr.readInt("i6");
 }
 std::string PdxTypesR1V2::toString() const {
-  char idbuf[4096];
-  sprintf(idbuf,
-          "PdxTypesR1V2:[ m_i1=%d ] [ m_i2=%d ] [ m_i3=%d ] [ m_i4=%d ] [ "
-          "m_i5=%d ] [ m_i6=%d ]",
-          m_i1, m_i2, m_i3, m_i4, m_i5, m_i6);
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "PdxTypesR1V2:[m_i1 = " << m_i1 << " ][m_i2 = " << m_i2
+       << "][m_i3 = " << m_i3 << "][m_i4 = " << m_i4 << "]"
+       << "[m_i5 = " << m_i5 << "][m_i6 = " << m_i6 << "]";
+  return strm.str();
 }
 
 /************************************************************
@@ -456,9 +459,7 @@
   m_diffInExtraFields++;
   m_diffInSameFields++;
 
-  char tmpBuf[512] = {0};
-  sprintf(tmpBuf, "%d", m_diffInExtraFields);
-  pw.writeString("m_str1", tmpBuf);
+  pw.writeString("m_str1", std::to_string(m_diffInExtraFields));
 }
 
 void PdxTypesR2V2::fromData(PdxReader& pr) {
@@ -587,12 +588,13 @@
   m_i6 = pr.readInt("i6");
 }
 std::string PdxTypesIgnoreUnreadFieldsV2::toString() const {
-  char idbuf[4096];
-  sprintf(idbuf,
-          "PdxTypesV1R1:[m_i1=%d] [m_i2=%d] [m_i3=%d] [m_i4=%d] [m_i5=%d] "
-          "[m_i6=%d]",
-          m_i1, m_i2, m_i3, m_i4, m_i5, m_i6);
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "PdxTypesIgnoreUnreadFieldsV2:[m_i1 = " << m_i1
+       << " ][m_i2 = " << m_i2 << "][m_i3 = " << m_i3 << "][m_i4 = " << m_i4
+       << "]"
+       << "[m_i5 = " << m_i5 << "][m_i6 = " << m_i6 << "]";
+  return strm.str();
 }
 
 /************************************************************
@@ -694,12 +696,7 @@
   m_floatArray = pr.readFloatArray("m_floatArray");
   m_doubleArray = pr.readDoubleArray("m_doubleArray");
 }
-std::string PdxVersionedV2::toString() const {
-  char idbuf[4096];
-  // sprintf(idbuf,"PdxTypesV1R1:[ m_i1=%d ] [ m_i2=%d ] [ m_i3=%d ] [ m_i4=%d
-  // ]", m_i1, m_i2, m_i3, m_i4 );
-  return idbuf;
-}
+std::string PdxVersionedV2::toString() const { return ""; }
 
 /************************************************************
  *  TestKeyV2
diff --git a/tests/cpp/testobject/PdxType.cpp b/tests/cpp/testobject/PdxType.cpp
index 1b734c2..adee40e 100644
--- a/tests/cpp/testobject/PdxType.cpp
+++ b/tests/cpp/testobject/PdxType.cpp
@@ -69,6 +69,213 @@
 // PdxType::~PdxObject() {
 //}
 
+PdxTests::PdxType::PdxType() { init(); }
+
+PdxTests::PdxType::~PdxType() { deleteByteByteArray(); }
+
+void PdxTests::PdxType::init() {
+  m_char = 'C';
+  m_bool = true;
+  m_byte = 0x74;
+  m_sbyte = 0x67;
+  m_int16 = 0xab;
+  m_uint16 = 0x2dd5;
+  m_int32 = 0x2345abdc;
+  m_uint32 = 0x2a65c434;
+  m_long = 324897980;
+  m_ulong = 238749898;
+  m_float = 23324.324f;
+  m_double = 3243298498.00;
+
+  m_string = "gfestring";
+
+  m_boolArray = std::vector<bool>(3);
+  m_boolArray[0] = true;
+  m_boolArray[1] = false;
+  m_boolArray[2] = true;
+  /*for(int i=0; i<3; i++){
+    m_boolArray[i] = true;
+  };*/
+
+  m_byteArray = std::vector<int8_t>(2);
+  m_byteArray[0] = 0x34;
+  m_byteArray[1] = 0x64;
+
+  m_sbyteArray = std::vector<int8_t>(2);
+  m_sbyteArray[0] = 0x34;
+  m_sbyteArray[1] = 0x64;
+
+  m_charArray = std::vector<char16_t>(2);
+  m_charArray[0] = L'c';
+  m_charArray[1] = L'v';
+
+  int64_t d = 1310447869154L;
+  m_date = CacheableDate::create(CacheableDate::duration(d));
+
+  m_int16Array = std::vector<int16_t>(2);
+  m_int16Array[0] = 0x2332;
+  m_int16Array[1] = 0x4545;
+
+  m_uint16Array = std::vector<int16_t>(2);
+  m_uint16Array[0] = 0x3243;
+  m_uint16Array[1] = 0x3232;
+
+  m_int32Array = std::vector<int32_t>(4);
+  m_int32Array[0] = 23;
+  m_int32Array[1] = 676868;
+  m_int32Array[2] = 34343;
+  m_int32Array[3] = 2323;
+
+  m_uint32Array = std::vector<int32_t>(4);
+  m_uint32Array[0] = 435;
+  m_uint32Array[1] = 234324;
+  m_uint32Array[2] = 324324;
+  m_uint32Array[3] = 23432432;
+
+  m_longArray = std::vector<int64_t>(2);
+  m_longArray[0] = 324324L;
+  m_longArray[1] = 23434545L;
+
+  m_ulongArray = std::vector<int64_t>(2);
+  m_ulongArray[0] = 3245435;
+  m_ulongArray[1] = 3425435;
+
+  m_floatArray = std::vector<float>(2);
+  m_floatArray[0] = 232.565f;
+  m_floatArray[1] = 2343254.67f;
+
+  m_doubleArray = std::vector<double>(2);
+  m_doubleArray[0] = 23423432;
+  m_doubleArray[1] = 4324235435.00;
+
+  m_byteByteArray = new int8_t*[2];
+  m_byteByteArray[0] = new int8_t[1];
+  m_byteByteArray[1] = new int8_t[2];
+  m_byteByteArray[0][0] = 0x23;
+  m_byteByteArray[1][0] = 0x34;
+  m_byteByteArray[1][1] = 0x55;
+
+  m_stringArray = {"one", "two"};
+
+  m_arraylist = CacheableArrayList::create();
+  m_arraylist->push_back(CacheableInt32::create(1));
+  m_arraylist->push_back(CacheableInt32::create(2));
+
+  m_linkedlist = CacheableLinkedList::create();
+  m_linkedlist->push_back(CacheableInt32::create(1));
+  m_linkedlist->push_back(CacheableInt32::create(2));
+
+  m_map = CacheableHashMap::create();
+  m_map->emplace(CacheableInt32::create(1), CacheableInt32::create(1));
+  m_map->emplace(CacheableInt32::create(2), CacheableInt32::create(2));
+
+  m_hashtable = CacheableHashTable::create();
+  m_hashtable->emplace(CacheableInt32::create(1),
+                       CacheableString::create("1111111111111111"));
+  m_hashtable->emplace(CacheableInt32::create(2),
+                       CacheableString::create("2222222222221111111111111111"));
+
+  m_vector = CacheableVector::create();
+  m_vector->push_back(CacheableInt32::create(1));
+  m_vector->push_back(CacheableInt32::create(2));
+  m_vector->push_back(CacheableInt32::create(3));
+
+  m_chs = CacheableHashSet::create();
+  m_chs->insert(CacheableInt32::create(1));
+
+  m_clhs = CacheableLinkedHashSet::create();
+  m_clhs->insert(CacheableInt32::create(1));
+  m_clhs->insert(CacheableInt32::create(2));
+
+  m_pdxEnum = CacheableEnum::create("PdxTests.pdxEnumTest", "pdx2", pdx2);
+
+  // std::shared_ptr<Address>* addPtr = NULL;
+  // m_add = new Address[10];
+  // addPtr[i] = Address::create();
+
+  m_add[0].reset(new Address{1, "street0", "city0"});
+  m_add[1].reset(new Address{2, "street1", "city1"});
+  m_add[2].reset(new Address{3, "street2", "city2"});
+  m_add[3].reset(new Address{4, "street3", "city3"});
+  m_add[4].reset(new Address{5, "street4", "city4"});
+  m_add[5].reset(new Address{6, "street5", "city5"});
+  m_add[6].reset(new Address{7, "street6", "city6"});
+  m_add[7].reset(new Address{8, "street7", "city7"});
+  m_add[8].reset(new Address{9, "street8", "city8"});
+  m_add[9].reset(new Address{10, "street9", "city9"});
+
+  m_objectArray = nullptr;
+  m_objectArrayEmptyPdxFieldName = nullptr;
+
+  m_objectArray = CacheableObjectArray::create();
+  m_objectArray->emplace_back(std::make_shared<Address>(1, "street0", "city0"));
+  m_objectArray->emplace_back(std::make_shared<Address>(2, "street1", "city1"));
+  m_objectArray->emplace_back(std::make_shared<Address>(3, "street2", "city2"));
+  m_objectArray->emplace_back(std::make_shared<Address>(4, "street3", "city3"));
+  m_objectArray->emplace_back(std::make_shared<Address>(5, "street4", "city4"));
+  m_objectArray->emplace_back(std::make_shared<Address>(6, "street5", "city5"));
+  m_objectArray->emplace_back(std::make_shared<Address>(7, "street6", "city6"));
+  m_objectArray->emplace_back(std::make_shared<Address>(8, "street7", "city7"));
+  m_objectArray->emplace_back(std::make_shared<Address>(9, "street8", "city8"));
+  m_objectArray->emplace_back(
+      std::make_shared<Address>(10, "street9", "city9"));
+
+  m_objectArrayEmptyPdxFieldName = CacheableObjectArray::create();
+  m_objectArrayEmptyPdxFieldName->emplace_back(
+      std::make_shared<Address>(1, "street0", "city0"));
+  m_objectArrayEmptyPdxFieldName->emplace_back(
+      std::make_shared<Address>(2, "street1", "city1"));
+  m_objectArrayEmptyPdxFieldName->emplace_back(
+      std::make_shared<Address>(3, "street2", "city2"));
+  m_objectArrayEmptyPdxFieldName->emplace_back(
+      std::make_shared<Address>(4, "street3", "city3"));
+  m_objectArrayEmptyPdxFieldName->emplace_back(
+      std::make_shared<Address>(5, "street4", "city4"));
+  m_objectArrayEmptyPdxFieldName->emplace_back(
+      std::make_shared<Address>(6, "street5", "city5"));
+  m_objectArrayEmptyPdxFieldName->emplace_back(
+      std::make_shared<Address>(7, "street6", "city6"));
+  m_objectArrayEmptyPdxFieldName->emplace_back(
+      std::make_shared<Address>(8, "street7", "city7"));
+  m_objectArrayEmptyPdxFieldName->emplace_back(
+      std::make_shared<Address>(9, "street8", "city8"));
+  m_objectArrayEmptyPdxFieldName->emplace_back(
+      std::make_shared<Address>(10, "street9", "city9"));
+
+  m_byte252 = std::vector<int8_t>(252, 0);
+
+  m_byte253 = std::vector<int8_t>(253, 0);
+
+  m_byte65535 = std::vector<int8_t>(65535, 0);
+
+  m_byte65536 = std::vector<int8_t>(65536, 0);
+
+  /*for (int32_t index = 0; index <3; ++index) {
+    m_objectArray->push_back(objectArray[index]);
+  }*/
+  /*
+  if (keys.size() > 0) {
+    m_objectArray = CacheableObjectArray::create();
+    for (int32_t index = 0; index < keys.size(); ++index) {
+      m_objectArray->push_back(keys.operator[](index));
+    }
+  }*/
+
+  boolArrayLen = 3;
+  byteArrayLen = 2;
+  shortArrayLen = 2;
+  intArrayLen = 4;
+  longArrayLen = 2;
+  doubleArrayLen = 2;
+  floatArrayLen = 2;
+  strLenArray = 2;
+  charArrayLen = 2;
+  byteByteArrayLen = 2;
+
+  lengthArr[0] = 1;
+  lengthArr[1] = 2;
+}
+
 void PdxTests::PdxType::toData(PdxWriter& pw) const {
   std::vector<int> lengths(2);
 
@@ -171,8 +378,8 @@
 }
 
 void PdxTests::PdxType::fromData(PdxReader& pr) {
-  int32_t* Lengtharr;
   int32_t arrLen = 0;
+  int32_t* Lengtharr = nullptr;
   deleteByteByteArray();
   m_byteByteArray =
       pr.readArrayOfByteArrays("m_byteByteArray", arrLen, &Lengtharr);
@@ -259,12 +466,7 @@
   LOGINFO("PdxObject::readObject() for enum Done...");
 }
 std::string PdxTests::PdxType::toString() const {
-  char idbuf[1024];
-  // sprintf(idbuf,"PdxObject: [ m_bool=%d ] [m_byte=%d] [m_int16=%d]
-  // [m_int32=%d] [m_float=%f] [m_double=%lf] [ m_string=%s ]",m_bool, m_byte,
-  // m_int16, m_int32, m_float, m_double, m_string);
-  sprintf(idbuf, "PdxObject:[m_int32=%d]", m_int32);
-  return idbuf;
+  return "PdxObject:[m_int32=" + std::to_string(m_int32) + "]";
 }
 
 bool PdxTests::PdxType::equals(PdxTests::PdxType& other,
diff --git a/tests/cpp/testobject/PdxType.hpp b/tests/cpp/testobject/PdxType.hpp
index a70fde4..a51b9d0 100644
--- a/tests/cpp/testobject/PdxType.hpp
+++ b/tests/cpp/testobject/PdxType.hpp
@@ -20,6 +20,7 @@
 #ifndef GEODE_TESTOBJECT_PDXTYPE_H_
 #define GEODE_TESTOBJECT_PDXTYPE_H_
 
+#include <sstream>
 #include <util/Log.hpp>
 
 #include <geode/CacheableEnum.hpp>
@@ -106,9 +107,11 @@
   int32_t getMember_f() { return m_f; }
 
   std::string toString() const override {
-    char idbuf[512];
-    sprintf(idbuf, " Child:: %d %d %d %d %d %d ", m_a, m_b, m_c, m_d, m_e, m_f);
-    return idbuf;
+    std::stringstream strm;
+
+    strm << "Child:: " << m_a << " " << m_b << " " << m_c << " " << m_d << " "
+         << m_e << " " << m_f;
+    return strm.str();
   }
 
   const std::string& getClassName() const override {
@@ -179,9 +182,10 @@
   CharTypes() { init(); }
 
   std::string toString() const override {
-    char idbuf[1024];
-    sprintf(idbuf, "%c %c %c", m_ch, m_chArray[0], m_chArray[1]);
-    return idbuf;
+    std::stringstream strm;
+
+    strm << m_ch << " " << m_chArray[0] << " " << m_chArray[1];
+    return strm.str();
   }
 
   bool equals(CharTypes& other) const {
@@ -257,6 +261,12 @@
     _city = city;
   }
 
+  Address(int32_t aptN, const std::string& street, const std::string& city) {
+    _aptNumber = aptN;
+    _street = street;
+    _city = city;
+  }
+
   bool equals(Address& other) const {
     LOGDEBUG("Inside Address equals");
     Address* ot = dynamic_cast<Address*>(&other);
@@ -361,7 +371,7 @@
 
   std::vector<std::string> m_stringArray;
   std::shared_ptr<Serializable> m_address;
-  Address* m_add[10];
+  std::unique_ptr<Address> m_add[10];
 
   std::shared_ptr<CacheableArrayList> m_arraylist;
   std::shared_ptr<CacheableLinkedList> m_linkedlist;
@@ -393,226 +403,12 @@
 
   int lengthArr[2];
 
+ protected:
+  void init();
+
  public:
-  inline void init() {
-    m_char = 'C';
-    m_bool = true;
-    m_byte = 0x74;
-    m_sbyte = 0x67;
-    m_int16 = 0xab;
-    m_uint16 = 0x2dd5;
-    m_int32 = 0x2345abdc;
-    m_uint32 = 0x2a65c434;
-    m_long = 324897980;
-    m_ulong = 238749898;
-    m_float = 23324.324f;
-    m_double = 3243298498.00;
-
-    m_string = "gfestring";
-
-    m_boolArray = std::vector<bool>(3);
-    m_boolArray[0] = true;
-    m_boolArray[1] = false;
-    m_boolArray[2] = true;
-    /*for(int i=0; i<3; i++){
-      m_boolArray[i] = true;
-    };*/
-
-    m_byteArray = std::vector<int8_t>(2);
-    m_byteArray[0] = 0x34;
-    m_byteArray[1] = 0x64;
-
-    m_sbyteArray = std::vector<int8_t>(2);
-    m_sbyteArray[0] = 0x34;
-    m_sbyteArray[1] = 0x64;
-
-    m_charArray = std::vector<char16_t>(2);
-    m_charArray[0] = L'c';
-    m_charArray[1] = L'v';
-
-    int64_t d = 1310447869154L;
-    m_date = CacheableDate::create(CacheableDate::duration(d));
-
-    m_int16Array = std::vector<int16_t>(2);
-    m_int16Array[0] = 0x2332;
-    m_int16Array[1] = 0x4545;
-
-    m_uint16Array = std::vector<int16_t>(2);
-    m_uint16Array[0] = 0x3243;
-    m_uint16Array[1] = 0x3232;
-
-    m_int32Array = std::vector<int32_t>(4);
-    m_int32Array[0] = 23;
-    m_int32Array[1] = 676868;
-    m_int32Array[2] = 34343;
-    m_int32Array[3] = 2323;
-
-    m_uint32Array = std::vector<int32_t>(4);
-    m_uint32Array[0] = 435;
-    m_uint32Array[1] = 234324;
-    m_uint32Array[2] = 324324;
-    m_uint32Array[3] = 23432432;
-
-    m_longArray = std::vector<int64_t>(2);
-    m_longArray[0] = 324324L;
-    m_longArray[1] = 23434545L;
-
-    m_ulongArray = std::vector<int64_t>(2);
-    m_ulongArray[0] = 3245435;
-    m_ulongArray[1] = 3425435;
-
-    m_floatArray = std::vector<float>(2);
-    m_floatArray[0] = 232.565f;
-    m_floatArray[1] = 2343254.67f;
-
-    m_doubleArray = std::vector<double>(2);
-    m_doubleArray[0] = 23423432;
-    m_doubleArray[1] = 4324235435.00;
-
-    m_byteByteArray = new int8_t*[2];
-    m_byteByteArray[0] = new int8_t[1];
-    m_byteByteArray[1] = new int8_t[2];
-    m_byteByteArray[0][0] = 0x23;
-    m_byteByteArray[1][0] = 0x34;
-    m_byteByteArray[1][1] = 0x55;
-
-    m_stringArray = {"one", "two"};
-
-    m_arraylist = CacheableArrayList::create();
-    m_arraylist->push_back(CacheableInt32::create(1));
-    m_arraylist->push_back(CacheableInt32::create(2));
-
-    m_linkedlist = CacheableLinkedList::create();
-    m_linkedlist->push_back(CacheableInt32::create(1));
-    m_linkedlist->push_back(CacheableInt32::create(2));
-
-    m_map = CacheableHashMap::create();
-    m_map->emplace(CacheableInt32::create(1), CacheableInt32::create(1));
-    m_map->emplace(CacheableInt32::create(2), CacheableInt32::create(2));
-
-    m_hashtable = CacheableHashTable::create();
-    m_hashtable->emplace(CacheableInt32::create(1),
-                         CacheableString::create("1111111111111111"));
-    m_hashtable->emplace(
-        CacheableInt32::create(2),
-        CacheableString::create("2222222222221111111111111111"));
-
-    m_vector = CacheableVector::create();
-    m_vector->push_back(CacheableInt32::create(1));
-    m_vector->push_back(CacheableInt32::create(2));
-    m_vector->push_back(CacheableInt32::create(3));
-
-    m_chs = CacheableHashSet::create();
-    m_chs->insert(CacheableInt32::create(1));
-
-    m_clhs = CacheableLinkedHashSet::create();
-    m_clhs->insert(CacheableInt32::create(1));
-    m_clhs->insert(CacheableInt32::create(2));
-
-    m_pdxEnum = CacheableEnum::create("PdxTests.pdxEnumTest", "pdx2", pdx2);
-
-    // std::shared_ptr<Address>* addPtr = NULL;
-    // m_add = new Address[10];
-    // addPtr[i] = Address::create();
-
-    m_add[0] = new Address(1, "street0", "city0");
-    m_add[1] = new Address(2, "street1", "city1");
-    m_add[2] = new Address(3, "street2", "city2");
-    m_add[3] = new Address(4, "street3", "city3");
-    m_add[4] = new Address(5, "street4", "city4");
-    m_add[5] = new Address(6, "street5", "city5");
-    m_add[6] = new Address(7, "street6", "city6");
-    m_add[7] = new Address(8, "street7", "city7");
-    m_add[8] = new Address(9, "street8", "city8");
-    m_add[9] = new Address(10, "street9", "city9");
-
-    m_objectArray = nullptr;
-    m_objectArrayEmptyPdxFieldName = nullptr;
-
-    m_objectArray = CacheableObjectArray::create();
-    m_objectArray->push_back(
-        std::shared_ptr<Address>(new Address(1, "street0", "city0")));
-    m_objectArray->push_back(
-        std::shared_ptr<Address>(new Address(2, "street1", "city1")));
-    m_objectArray->push_back(
-        std::shared_ptr<Address>(new Address(3, "street2", "city2")));
-    m_objectArray->push_back(
-        std::shared_ptr<Address>(new Address(4, "street3", "city3")));
-    m_objectArray->push_back(
-        std::shared_ptr<Address>(new Address(5, "street4", "city4")));
-    m_objectArray->push_back(
-        std::shared_ptr<Address>(new Address(6, "street5", "city5")));
-    m_objectArray->push_back(
-        std::shared_ptr<Address>(new Address(7, "street6", "city6")));
-    m_objectArray->push_back(
-        std::shared_ptr<Address>(new Address(8, "street7", "city7")));
-    m_objectArray->push_back(
-        std::shared_ptr<Address>(new Address(9, "street8", "city8")));
-    m_objectArray->push_back(
-        std::shared_ptr<Address>(new Address(10, "street9", "city9")));
-
-    m_objectArrayEmptyPdxFieldName = CacheableObjectArray::create();
-    m_objectArrayEmptyPdxFieldName->push_back(
-        std::shared_ptr<Address>(new Address(1, "street0", "city0")));
-    m_objectArrayEmptyPdxFieldName->push_back(
-        std::shared_ptr<Address>(new Address(2, "street1", "city1")));
-    m_objectArrayEmptyPdxFieldName->push_back(
-        std::shared_ptr<Address>(new Address(3, "street2", "city2")));
-    m_objectArrayEmptyPdxFieldName->push_back(
-        std::shared_ptr<Address>(new Address(4, "street3", "city3")));
-    m_objectArrayEmptyPdxFieldName->push_back(
-        std::shared_ptr<Address>(new Address(5, "street4", "city4")));
-    m_objectArrayEmptyPdxFieldName->push_back(
-        std::shared_ptr<Address>(new Address(6, "street5", "city5")));
-    m_objectArrayEmptyPdxFieldName->push_back(
-        std::shared_ptr<Address>(new Address(7, "street6", "city6")));
-    m_objectArrayEmptyPdxFieldName->push_back(
-        std::shared_ptr<Address>(new Address(8, "street7", "city7")));
-    m_objectArrayEmptyPdxFieldName->push_back(
-        std::shared_ptr<Address>(new Address(9, "street8", "city8")));
-    m_objectArrayEmptyPdxFieldName->push_back(
-        std::shared_ptr<Address>(new Address(10, "street9", "city9")));
-
-    m_byte252 = std::vector<int8_t>(252, 0);
-
-    m_byte253 = std::vector<int8_t>(253, 0);
-
-    m_byte65535 = std::vector<int8_t>(65535, 0);
-
-    m_byte65536 = std::vector<int8_t>(65536, 0);
-
-    /*for (int32_t index = 0; index <3; ++index) {
-      m_objectArray->push_back(objectArray[index]);
-    }*/
-    /*
-    if (keys.size() > 0) {
-      m_objectArray = CacheableObjectArray::create();
-      for (int32_t index = 0; index < keys.size(); ++index) {
-        m_objectArray->push_back(keys.operator[](index));
-      }
-    }*/
-
-    boolArrayLen = 3;
-    byteArrayLen = 2;
-    shortArrayLen = 2;
-    intArrayLen = 4;
-    longArrayLen = 2;
-    doubleArrayLen = 2;
-    floatArrayLen = 2;
-    strLenArray = 2;
-    charArrayLen = 2;
-    byteByteArrayLen = 2;
-
-    lengthArr[0] = 1;
-    lengthArr[1] = 2;
-  }
-
-  PdxType() { init(); }
-
-  inline bool compareBool(bool b, bool b2) {
-    if (b == b2) return b;
-    throw IllegalStateException("Not got expected value for bool type: ");
-  }
+  PdxType();
+  ~PdxType() override;
 
   void deleteByteByteArray() {
     if (m_byteByteArray == nullptr) {
@@ -623,13 +419,6 @@
     _GEODE_SAFE_DELETE_ARRAY(m_byteByteArray);
   }
 
-  ~PdxType() override {
-    deleteByteByteArray();
-    for (auto i = 0; i <= 9; i++) {
-      _GEODE_SAFE_DELETE(m_add[i]);
-    }
-  }
-
   virtual size_t objectSize() const override {
     auto objectSize = sizeof(PdxType);
     return objectSize;
@@ -764,6 +553,11 @@
     return std::make_shared<PdxType>();
   }
 
+  inline bool compareBool(bool b, bool b2) {
+    if (b == b2) return b;
+    throw IllegalStateException("Not got expected value for bool type: ");
+  }
+
   bool equals(PdxTests::PdxType& other, bool isPdxReadSerialized) const;
 
   template <typename T1, typename T2>
diff --git a/tests/cpp/testobject/Portfolio.cpp b/tests/cpp/testobject/Portfolio.cpp
index b711ef5..7b6784c 100644
--- a/tests/cpp/testobject/Portfolio.cpp
+++ b/tests/cpp/testobject/Portfolio.cpp
@@ -16,116 +16,102 @@
  */
 #include "Portfolio.hpp"
 
-namespace testobject {
+#include <sstream>
 
-const char* Portfolio::secIds[] = {"SUN", "IBM",  "YHOO", "GOOG", "MSFT",
-                                   "AOL", "APPL", "ORCL", "SAP",  "DELL"};
+namespace testobject {
+const char* Portfolio::_secIds[] = {"SUN", "IBM",  "YHOO", "GOOG", "MSFT",
+                                    "AOL", "APPL", "ORCL", "SAP",  "DELL"};
 
 Portfolio::Portfolio(int32_t i, uint32_t size,
                      std::shared_ptr<CacheableStringArray> nm)
-    : names(nm) {
-  ID = i;
-  char pkidbuf[1024];
-  sprintf(pkidbuf, "%d", i);
-  pkid = CacheableString::create(pkidbuf);
-  status = (i % 2 == 0) ? "active" : "inactive";
-  char buf[100];
-  sprintf(buf, "type%d", (i % 3));
-  type = CacheableString::create(buf);
-  int numSecIds = sizeof(secIds) / sizeof(char*);
-  position1 = std::make_shared<Position>(secIds[Position::cnt % numSecIds],
-                                         Position::cnt * 1000);
+    : _names(nm) {
+  _ID = i;
+  _pkid = CacheableString::create(std::to_string(i));
+  _status = (i % 2 == 0) ? "active" : "inactive";
+  _type = CacheableString::create("_type" + std::to_string(i % 3));
+  int numSecIds = sizeof(_secIds) / sizeof(char*);
+  _position1 = std::make_shared<Position>(_secIds[Position::cnt % numSecIds],
+                                          Position::cnt * 1000);
   if (i % 2 != 0) {
-    position2 = std::make_shared<Position>(secIds[Position::cnt % numSecIds],
-                                           Position::cnt * 1000);
+    _position2 = std::make_shared<Position>(_secIds[Position::cnt % numSecIds],
+                                            Position::cnt * 1000);
   } else {
-    position2 = nullptr;
+    _position2 = nullptr;
   }
-  positions = CacheableHashMap::create();
-  positions->emplace(CacheableString::create(secIds[Position::cnt % numSecIds]),
-                     position1);
-  newVal = new uint8_t[size + 1];
-  memset(newVal, 'B', size);
-  newVal[size] = '\0';
-  newValSize = size;
-  creationDate = CacheableDate::create(time(nullptr));
-  arrayNull = nullptr;
-  arrayZeroSize = nullptr;
+  _positions = CacheableHashMap::create();
+  _positions->emplace(
+      CacheableString::create(_secIds[Position::cnt % numSecIds]), _position1);
+  _newVal = new uint8_t[size + 1];
+  memset(_newVal, 'B', size);
+  _newVal[size] = '\0';
+  _newValSize = size;
+  _creationDate = CacheableDate::create(time(nullptr));
+  _arrayNull = nullptr;
+  _arrayZeroSize = nullptr;
 }
 
 Portfolio::~Portfolio() noexcept {
-  if (newVal) {
-    delete[] newVal;
-    newVal = nullptr;
+  if (_newVal) {
+    delete[] _newVal;
+    _newVal = nullptr;
   }
 }
 
 void Portfolio::toData(DataOutput& output) const {
-  output.writeInt(ID);
-  output.writeObject(pkid);
-  output.writeObject(position1);
-  output.writeObject(position2);
-  output.writeObject(positions);
-  output.writeObject(type);
-  output.writeUTF(status);
-  output.writeObject(names);
-  output.writeBytes(newVal, newValSize + 1);
-  output.writeObject(creationDate);
-  output.writeBytes(arrayNull, 0);
-  output.writeBytes(arrayZeroSize, 0);
+  output.writeInt(_ID);
+  output.writeObject(_pkid);
+  output.writeObject(_position1);
+  output.writeObject(_position2);
+  output.writeObject(_positions);
+  output.writeObject(_type);
+  output.writeUTF(_status);
+  output.writeObject(_names);
+  output.writeBytes(_newVal, _newValSize + 1);
+  output.writeObject(_creationDate);
+  output.writeBytes(_arrayNull, 0);
+  output.writeBytes(_arrayZeroSize, 0);
 }
 
 void Portfolio::fromData(DataInput& input) {
-  ID = input.readInt32();
-  pkid = std::dynamic_pointer_cast<CacheableString>(input.readObject());
-  position1 = std::dynamic_pointer_cast<Position>(input.readObject());
-  position2 = std::dynamic_pointer_cast<Position>(input.readObject());
-  positions = std::dynamic_pointer_cast<CacheableHashMap>(input.readObject());
-  type = std::dynamic_pointer_cast<CacheableString>(input.readObject());
-  status = input.readUTF();
-  names = std::dynamic_pointer_cast<CacheableStringArray>(input.readObject());
-  input.readBytes(&newVal, &newValSize);
-  creationDate = std::dynamic_pointer_cast<CacheableDate>(input.readObject());
+  _ID = input.readInt32();
+  _pkid = std::dynamic_pointer_cast<CacheableString>(input.readObject());
+  _position1 = std::dynamic_pointer_cast<Position>(input.readObject());
+  _position2 = std::dynamic_pointer_cast<Position>(input.readObject());
+  _positions = std::dynamic_pointer_cast<CacheableHashMap>(input.readObject());
+  _type = std::dynamic_pointer_cast<CacheableString>(input.readObject());
+  _status = input.readUTF();
+  _names = std::dynamic_pointer_cast<CacheableStringArray>(input.readObject());
+  input.readBytes(&_newVal, &_newValSize);
+  _creationDate = std::dynamic_pointer_cast<CacheableDate>(input.readObject());
   int tmp = 0;
-  input.readBytes(&arrayNull, &tmp);
-  input.readBytes(&arrayZeroSize, &tmp);
+  input.readBytes(&_arrayNull, &tmp);
+  input.readBytes(&_arrayZeroSize, &tmp);
 }
-std::string Portfolio::toString() const {
-  char idbuf[1024];
-  sprintf(idbuf, "PortfolioObject: [ ID=%d", ID);
-  char pkidbuf[1024];
-  if (pkid != nullptr) {
-    sprintf(pkidbuf, " status=%s type=%s pkid=%s\n", this->status.c_str(),
-            this->type->toString().c_str(), this->pkid->value().c_str());
-  } else {
-    sprintf(pkidbuf, " status=%s type=%s pkid=%s\n", this->status.c_str(),
-            this->type->toString().c_str(), this->pkid->value().c_str());
-  }
-  char position1buf[2048];
-  if (position1 != nullptr) {
-    sprintf(position1buf, "\t\t\t  P1: %s", position1->toString().c_str());
-  } else {
-    sprintf(position1buf, "\t\t\t  P1: %s", "NULL");
-  }
-  char position2buf[2048];
-  if (position2 != nullptr) {
-    snprintf(position2buf, sizeof(position2buf), " P2: %s",
-             position2->toString().c_str());
-  } else {
-    snprintf(position2buf, sizeof(position2buf), " P2: %s ]", "NULL");
-  }
-  char creationdatebuf[2048];
-  if (creationDate != nullptr) {
-    sprintf(creationdatebuf, "creation Date %s",
-            creationDate->toString().c_str());
-  } else {
-    sprintf(creationdatebuf, "creation Date %s", "NULL");
-  }
 
-  char stringBuf[9000];
-  snprintf(stringBuf, sizeof(stringBuf), "%.1024s%.1024s%.1024s%.2048s%.2048s",
-           idbuf, pkidbuf, creationdatebuf, position1buf, position2buf);
-  return stringBuf;
+std::string Portfolio::toString() const {
+  std::stringstream result;
+  auto suffix = "\n    ";
+
+  result << "PortfolioObject: [" << suffix;
+
+  result << "ID = " << _ID << suffix;
+
+  result << " status=" << _status << suffix;
+
+  result << " type=" << (_type ? _type->toString() : "NULL") << suffix;
+
+  result << " pkid=" << (_pkid ? _pkid->toString() : "NULL") << suffix;
+
+  result << " creation Date="
+         << (_creationDate ? _creationDate->toString() : "NULL") << suffix;
+
+  result << "P1: " << (_position1 ? _position1->toString() : "NULL") << suffix;
+
+  result << "P2: " << (_position2 ? _position2->toString() : "NULL") << "\n";
+
+  result << "]";
+
+  return result.str();
 }
 
 }  // namespace testobject
diff --git a/tests/cpp/testobject/Portfolio.hpp b/tests/cpp/testobject/Portfolio.hpp
index e551c98..56045c2 100644
--- a/tests/cpp/testobject/Portfolio.hpp
+++ b/tests/cpp/testobject/Portfolio.hpp
@@ -39,20 +39,20 @@
 
 class TESTOBJECT_EXPORT Portfolio : public DataSerializable {
  private:
-  int32_t ID;
-  std::shared_ptr<CacheableString> pkid;
-  std::shared_ptr<Position> position1;
-  std::shared_ptr<Position> position2;
-  std::shared_ptr<CacheableHashMap> positions;
-  std::shared_ptr<CacheableString> type;
-  std::string status;
-  std::shared_ptr<CacheableStringArray> names;
-  static const char* secIds[];
-  uint8_t* newVal;
-  int32_t newValSize;
-  std::shared_ptr<CacheableDate> creationDate;
-  uint8_t* arrayNull;
-  uint8_t* arrayZeroSize;
+  int32_t _ID;
+  std::shared_ptr<CacheableString> _pkid;
+  std::shared_ptr<Position> _position1;
+  std::shared_ptr<Position> _position2;
+  std::shared_ptr<CacheableHashMap> _positions;
+  std::shared_ptr<CacheableString> _type;
+  std::string _status;
+  std::shared_ptr<CacheableStringArray> _names;
+  static const char* _secIds[];
+  uint8_t* _newVal;
+  int32_t _newValSize;
+  std::shared_ptr<CacheableDate> _creationDate;
+  uint8_t* _arrayNull;
+  uint8_t* _arrayZeroSize;
 
   inline size_t getObjectSize(const std::shared_ptr<Serializable>& obj) const {
     return (obj == nullptr ? 0 : obj->objectSize());
@@ -60,69 +60,69 @@
 
  public:
   Portfolio()
-      : ID(0),
-        pkid(nullptr),
-        type(nullptr),
-        status(),
-        newVal(nullptr),
-        creationDate(nullptr),
-        arrayNull(nullptr),
-        arrayZeroSize(nullptr) {}
+      : _ID(0),
+        _pkid(nullptr),
+        _type(nullptr),
+        _status(),
+        _newVal(nullptr),
+        _creationDate(nullptr),
+        _arrayNull(nullptr),
+        _arrayZeroSize(nullptr) {}
   explicit Portfolio(int32_t id, uint32_t size = 0,
                      std::shared_ptr<CacheableStringArray> nm = nullptr);
   ~Portfolio() noexcept override;
 
   size_t objectSize() const override {
     auto objectSize = sizeof(Portfolio);
-    objectSize += getObjectSize(pkid);
-    objectSize += getObjectSize(position1);
-    objectSize += getObjectSize(position2);
-    objectSize += getObjectSize(positions);
-    objectSize += getObjectSize(type);
-    objectSize += sizeof(decltype(status)::value_type) * status.length();
-    objectSize += getObjectSize(names);
-    objectSize += sizeof(uint8_t) * newValSize;
-    objectSize += getObjectSize(creationDate);
+    objectSize += getObjectSize(_pkid);
+    objectSize += getObjectSize(_position1);
+    objectSize += getObjectSize(_position2);
+    objectSize += getObjectSize(_positions);
+    objectSize += getObjectSize(_type);
+    objectSize += sizeof(decltype(_status)::value_type) * _status.length();
+    objectSize += getObjectSize(_names);
+    objectSize += sizeof(uint8_t) * _newValSize;
+    objectSize += getObjectSize(_creationDate);
     return objectSize;
   }
 
-  int32_t getID() { return ID; }
+  int32_t getID() { return _ID; }
   void showNames(const char* label) {
     LOGINFO(label);
-    if (!names) {
+    if (!_names) {
       LOGINFO("names is NULL");
       return;
     }
-    for (int i = 0; i < names->length(); i++) {
-      LOGINFO("names[%d]=%s", i, names->operator[](i)->value().c_str());
+    for (int i = 0; i < _names->length(); i++) {
+      LOGINFO("names[%d]=%s", i, _names->operator[](i)->value().c_str());
     }
   }
 
-  std::shared_ptr<CacheableString> getPkid() const { return pkid; }
+  std::shared_ptr<CacheableString> getPkid() const { return _pkid; }
 
-  std::shared_ptr<Position> getP1() const { return position1; }
+  std::shared_ptr<Position> getP1() const { return _position1; }
 
-  std::shared_ptr<Position> getP2() const { return position2; }
+  std::shared_ptr<Position> getP2() const { return _position2; }
 
-  std::shared_ptr<CacheableHashMap> getPositions() const { return positions; }
+  std::shared_ptr<CacheableHashMap> getPositions() const { return _positions; }
 
   bool testMethod() const { return true; }
 
-  const std::string& getStatus() const { return status; }
+  const std::string& getStatus() const { return _status; }
 
-  bool isActive() const { return status == "active"; }
+  bool isActive() const { return _status == "active"; }
 
-  uint8_t* getNewVal() const { return newVal; }
+  uint8_t* getNewVal() const { return _newVal; }
 
-  int32_t getNewValSize() const { return newValSize; }
+  int32_t getNewValSize() const { return _newValSize; }
 
   std::shared_ptr<CacheableDate> getCreationDate() const {
-    return creationDate;
+    return _creationDate;
   }
 
-  uint8_t* getArrayNull() const { return arrayNull; }
+  uint8_t* getArrayNull() const { return _arrayNull; }
 
-  uint8_t* getArrayZeroSize() const { return arrayZeroSize; }
+  uint8_t* getArrayZeroSize() const { return _arrayZeroSize; }
 
   static std::shared_ptr<Serializable> createDeserializable() {
     return std::make_shared<Portfolio>();
diff --git a/tests/cpp/testobject/PortfolioPdx.cpp b/tests/cpp/testobject/PortfolioPdx.cpp
index ba2c79a..5bce656 100644
--- a/tests/cpp/testobject/PortfolioPdx.cpp
+++ b/tests/cpp/testobject/PortfolioPdx.cpp
@@ -16,140 +16,132 @@
  */
 #include "PortfolioPdx.hpp"
 
+#include <sstream>
 #include <util/Log.hpp>
 
 namespace testobject {
-
 using apache::geode::client::CacheableDate;
 using apache::geode::client::CacheableHashMap;
 using apache::geode::client::CacheableString;
 
-const char* PortfolioPdx::secIds[] = {"SUN", "IBM",  "YHOO", "GOOG", "MSFT",
-                                      "AOL", "APPL", "ORCL", "SAP",  "DELL"};
+const char* PortfolioPdx::_secIds[] = {"SUN", "IBM",  "YHOO", "GOOG", "MSFT",
+                                       "AOL", "APPL", "ORCL", "SAP",  "DELL"};
 
 PortfolioPdx::PortfolioPdx(int32_t i, int32_t size, std::vector<std::string> nm)
-    : names(nm) {
-  id = i;
+    : _names(nm) {
+  _id = i;
 
-  pkid = std::to_string(i);
+  _pkid = std::to_string(i);
 
-  status = (i % 2 == 0) ? "active" : "inactive";
+  _status = (i % 2 == 0) ? "active" : "inactive";
 
-  type = "type" + std::to_string(i % 3);
+  _type = "_type" + std::to_string(i % 3);
 
-  int numSecIds = sizeof(secIds) / sizeof(char*);
-  position1 = std::make_shared<PositionPdx>(
-      secIds[PositionPdx::cnt % numSecIds], PositionPdx::cnt * 1000);
+  int numSecIds = sizeof(_secIds) / sizeof(char*);
+  _position1 = std::make_shared<PositionPdx>(
+      _secIds[PositionPdx::cnt % numSecIds], PositionPdx::cnt * 1000);
   if (i % 2 != 0) {
-    position2 = std::make_shared<PositionPdx>(
-        secIds[PositionPdx::cnt % numSecIds], PositionPdx::cnt * 1000);
+    _position2 = std::make_shared<PositionPdx>(
+        _secIds[PositionPdx::cnt % numSecIds], PositionPdx::cnt * 1000);
   } else {
-    position2 = nullptr;
+    _position2 = nullptr;
   }
-  positions = CacheableHashMap::create();
-  positions->emplace(
-      CacheableString::create(secIds[PositionPdx::cnt % numSecIds]), position1);
+  _positions = CacheableHashMap::create();
+  _positions->emplace(
+      CacheableString::create(_secIds[PositionPdx::cnt % numSecIds]),
+      _position1);
 
   if (size > 0) {
-    newVal = std::vector<int8_t>(size);
+    _newVal = std::vector<int8_t>(size);
     for (int index = 0; index < size; index++) {
-      newVal[index] = static_cast<int8_t>('B');
+      _newVal[index] = static_cast<int8_t>('B');
     }
   }
-  newValSize = size;
+  _newValSize = size;
 
   time_t timeVal = 1310447869;
-  creationDate = CacheableDate::create(timeVal);
-  arrayZeroSize = std::vector<int8_t>(0);
+  _creationDate = CacheableDate::create(timeVal);
+  _arrayZeroSize = std::vector<int8_t>(0);
 }
 
 void PortfolioPdx::toData(PdxWriter& pw) const {
-  pw.writeInt("ID", id);
+  pw.writeInt("ID", _id);
   pw.markIdentityField("ID");
 
-  pw.writeString("pkid", pkid);
+  pw.writeString("pkid", _pkid);
   pw.markIdentityField("pkid");
 
-  pw.writeObject("position1", position1);
+  pw.writeObject("position1", _position1);
   pw.markIdentityField("position1");
 
-  pw.writeObject("position2", position2);
+  pw.writeObject("position2", _position2);
   pw.markIdentityField("position2");
 
-  pw.writeObject("positions", positions);
+  pw.writeObject("positions", _positions);
   pw.markIdentityField("positions");
 
-  pw.writeString("type", type);
+  pw.writeString("type", _type);
   pw.markIdentityField("type");
 
-  pw.writeString("status", status);
+  pw.writeString("status", _status);
   pw.markIdentityField("status");
 
-  pw.writeStringArray("names", names);
+  pw.writeStringArray("names", _names);
   pw.markIdentityField("names");
 
-  pw.writeByteArray("newVal", newVal);
+  pw.writeByteArray("newVal", _newVal);
   pw.markIdentityField("newVal");
 
-  pw.writeDate("creationDate", creationDate);
+  pw.writeDate("creationDate", _creationDate);
   pw.markIdentityField("creationDate");
 
-  pw.writeByteArray("arrayNull", arrayNull);
-  pw.writeByteArray("arrayZeroSize", arrayZeroSize);
+  pw.writeByteArray("arrayNull", _arrayNull);
+  pw.writeByteArray("arrayZeroSize", _arrayZeroSize);
 }
 
 void PortfolioPdx::fromData(PdxReader& pr) {
-  id = pr.readInt("ID");
-  pkid = pr.readString("pkid");
+  _id = pr.readInt("ID");
+  _pkid = pr.readString("pkid");
 
-  position1 =
+  _position1 =
       std::dynamic_pointer_cast<PositionPdx>(pr.readObject("position1"));
-  position2 =
+  _position2 =
       std::dynamic_pointer_cast<PositionPdx>(pr.readObject("position2"));
-  positions =
+  _positions =
       std::dynamic_pointer_cast<CacheableHashMap>(pr.readObject("positions"));
-  type = pr.readString("type");
-  status = pr.readString("status");
+  _type = pr.readString("type");
+  _status = pr.readString("status");
 
-  names = pr.readStringArray("names");
-  newVal = pr.readByteArray("newVal");
-  creationDate = pr.readDate("creationDate");
-  arrayNull = pr.readByteArray("arrayNull");
-  arrayZeroSize = pr.readByteArray("arrayZeroSize");
+  _names = pr.readStringArray("names");
+  _newVal = pr.readByteArray("newVal");
+  _creationDate = pr.readDate("creationDate");
+  _arrayNull = pr.readByteArray("arrayNull");
+  _arrayZeroSize = pr.readByteArray("arrayZeroSize");
 }
 std::string PortfolioPdx::toString() const {
-  LOGINFO("PortfolioPdx::toString() Start");
-  char idbuf[1024];
-  sprintf(idbuf, "PortfolioPdxObject: [ id=%d ]", id);
+  std::stringstream result;
+  auto suffix = "\n    ";
 
-  char pkidbuf[1024];
-  sprintf(pkidbuf, " status=%s type=%s pkid=%s\n", this->status.c_str(),
-          this->type.c_str(), this->pkid.c_str());
+  result << "PortfolioPdxObject: [" << suffix;
 
-  char position1buf[2048];
-  if (position1 != nullptr) {
-    sprintf(position1buf, "\t\t\t  P1: %s", position1->toString().c_str());
-  } else {
-    sprintf(position1buf, "\t\t\t  P1: %s", "NULL");
-  }
-  char position2buf[2048];
-  if (position2 != nullptr) {
-    sprintf(position2buf, " P2: %s", position2->toString().c_str());
-  } else {
-    sprintf(position2buf, " P2: %s ]", "NULL");
-  }
-  char creationdatebuf[2048];
-  if (creationDate != nullptr) {
-    sprintf(creationdatebuf, "creation Date %s",
-            creationDate->toString().c_str());
-  } else {
-    sprintf(creationdatebuf, "creation Date %s", "NULL");
-  }
+  result << "id = " << _id << suffix;
 
-  char stringBuf[9000];
-  snprintf(stringBuf, sizeof(stringBuf), "%s%s%s%s%s", idbuf, pkidbuf,
-           creationdatebuf, position1buf, position2buf);
-  return stringBuf;
+  result << "status=" << _status << suffix;
+
+  result << "type=" << _type << suffix;
+
+  result << "pkid=" << _pkid << suffix;
+
+  result << "creation Date="
+         << (_creationDate ? _creationDate->toString() : "NULL") << suffix;
+
+  result << "P1: " << (_position1 ? _position1->toString() : "NULL") << suffix;
+
+  result << "P2: " << (_position2 ? _position2->toString() : "NULL") << "\n";
+
+  result << "]";
+
+  return result.str();
 }
 
 }  // namespace testobject
diff --git a/tests/cpp/testobject/PortfolioPdx.hpp b/tests/cpp/testobject/PortfolioPdx.hpp
index c1f9ed6..bcb4f42 100644
--- a/tests/cpp/testobject/PortfolioPdx.hpp
+++ b/tests/cpp/testobject/PortfolioPdx.hpp
@@ -27,71 +27,70 @@
 #include "PositionPdx.hpp"
 
 namespace testobject {
-
 using apache::geode::client::CacheableDate;
 using apache::geode::client::CacheableHashMap;
 using apache::geode::client::PdxSerializable;
 
 class TESTOBJECT_EXPORT PortfolioPdx : public PdxSerializable {
  private:
-  int32_t id;
+  int32_t _id;
 
-  std::string pkid;
+  std::string _pkid;
 
-  std::shared_ptr<PositionPdx> position1;
-  std::shared_ptr<PositionPdx> position2;
-  std::shared_ptr<CacheableHashMap> positions;
-  std::string type;
-  std::string status;
-  std::vector<std::string> names;
-  static const char* secIds[];
-  std::vector<int8_t> newVal;
-  int32_t newValSize;
-  std::shared_ptr<CacheableDate> creationDate;
-  std::vector<int8_t> arrayNull;
-  std::vector<int8_t> arrayZeroSize;
+  std::shared_ptr<PositionPdx> _position1;
+  std::shared_ptr<PositionPdx> _position2;
+  std::shared_ptr<CacheableHashMap> _positions;
+  std::string _type;
+  std::string _status;
+  std::vector<std::string> _names;
+  static const char* _secIds[];
+  std::vector<int8_t> _newVal;
+  int32_t _newValSize;
+  std::shared_ptr<CacheableDate> _creationDate;
+  std::vector<int8_t> _arrayNull;
+  std::vector<int8_t> _arrayZeroSize;
 
  public:
   PortfolioPdx()
-      : id(0),
-        pkid(),
-        type(),
-        status(),
-        newVal(),
-        creationDate(nullptr),
-        arrayNull(),
-        arrayZeroSize() {}
+      : _id(0),
+        _pkid(),
+        _type(),
+        _status(),
+        _newVal(),
+        _creationDate(nullptr),
+        _arrayNull(),
+        _arrayZeroSize() {}
 
   explicit PortfolioPdx(int32_t id, int32_t size = 0,
                         std::vector<std::string> nm = {});
 
-  int32_t getID() { return id; }
+  int32_t getID() { return _id; }
 
-  std::string getPkid() { return pkid; }
+  std::string getPkid() { return _pkid; }
 
-  std::shared_ptr<PositionPdx> getP1() { return position1; }
+  std::shared_ptr<PositionPdx> getP1() { return _position1; }
 
-  std::shared_ptr<PositionPdx> getP2() { return position2; }
+  std::shared_ptr<PositionPdx> getP2() { return _position2; }
 
-  std::shared_ptr<CacheableHashMap> getPositions() { return positions; }
+  std::shared_ptr<CacheableHashMap> getPositions() { return _positions; }
 
   bool testMethod() { return true; }
 
-  const std::string& getStatus() { return status; }
+  const std::string& getStatus() { return _status; }
 
-  bool isActive() { return status == "active"; }
+  bool isActive() { return _status == "active"; }
 
-  std::vector<int8_t> getNewVal() { return newVal; }
+  std::vector<int8_t> getNewVal() { return _newVal; }
 
-  int32_t getNewValSize() { return newValSize; }
+  int32_t getNewValSize() { return _newValSize; }
 
-  const std::string& getClassName() { return this->type; }
+  const std::string& getClassName() { return this->_type; }
 
-  std::shared_ptr<CacheableDate> getCreationDate() { return creationDate; }
+  std::shared_ptr<CacheableDate> getCreationDate() { return _creationDate; }
 
-  std::vector<int8_t> getArrayNull() { return arrayNull; }
+  std::vector<int8_t> getArrayNull() { return _arrayNull; }
 
-  std::vector<int8_t> getArrayZeroSize() { return arrayZeroSize; }
+  std::vector<int8_t> getArrayZeroSize() { return _arrayZeroSize; }
 
   static std::shared_ptr<PdxSerializable> createDeserializable() {
     return std::make_shared<PortfolioPdx>();
diff --git a/tests/cpp/testobject/Position.cpp b/tests/cpp/testobject/Position.cpp
index 36b3364..fc99531 100644
--- a/tests/cpp/testobject/Position.cpp
+++ b/tests/cpp/testobject/Position.cpp
@@ -14,11 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 #include "Position.hpp"
 
 #include <wchar.h>
 
 #include <cwchar>
+#include <sstream>
 
 #include <geode/DataInput.hpp>
 #include <geode/DataOutput.hpp>
@@ -35,7 +37,7 @@
   qty = out - (cnt % 2 == 0 ? 1000 : 100);
   mktValue = qty * 1.2345998;
   sharesOutstanding = out;
-  secType = L"a";
+  secType = "a";
   pid = cnt++;
 }
 
@@ -52,7 +54,7 @@
   qty = (iForExactVal % 2 == 0 ? 1000 : 100);
   mktValue = qty * 2;
   sharesOutstanding = iForExactVal;
-  secType = L"a";
+  secType = "a";
   pid = iForExactVal;
 }
 
@@ -68,7 +70,7 @@
   qty = 0.0;
   secId = nullptr;
   secLinks = nullptr;
-  secType = L"";
+  secType = "";
   sharesOutstanding = 0;
   underlyer = nullptr;
   volatility = 0;
@@ -106,19 +108,18 @@
   qty = input.readDouble();
   secId = std::dynamic_pointer_cast<CacheableString>(input.readObject());
   secLinks = std::dynamic_pointer_cast<CacheableString>(input.readObject());
-  secType = input.readUTF<wchar_t>();
+  secType = input.readUTF<char>();
   sharesOutstanding = input.readInt32();
   underlyer = std::dynamic_pointer_cast<CacheableString>(input.readObject());
   volatility = input.readInt64();
   pid = input.readInt32();
 }
 std::string Position::toString() const {
-  char buf[2048];
-  sprintf(buf,
-          "Position Object:[ secId=%s type=%ls sharesOutstanding=%d id=%d ]",
-          secId->toString().c_str(), this->secType.c_str(),
-          this->sharesOutstanding, this->pid);
-  return buf;
+  std::stringstream strm;
+
+  strm << "Position Object:[ secId=" << secId->toString() << " type=" << secType
+       << " sharesOutstanding=" << sharesOutstanding << " id=" << pid << " ]";
+  return strm.str();
 }
 
 }  // namespace testobject
diff --git a/tests/cpp/testobject/Position.hpp b/tests/cpp/testobject/Position.hpp
index 7256e55..9115c2a 100644
--- a/tests/cpp/testobject/Position.hpp
+++ b/tests/cpp/testobject/Position.hpp
@@ -51,8 +51,7 @@
   double qty;
   std::shared_ptr<CacheableString> secId;
   std::shared_ptr<CacheableString> secLinks;
-  // wchar_t* secType;
-  std::wstring secType;
+  std::string secType;
   int32_t sharesOutstanding;
   std::shared_ptr<CacheableString> underlyer;
   int64_t volatility;
diff --git a/tests/cpp/testobject/PositionPdx.cpp b/tests/cpp/testobject/PositionPdx.cpp
index a680663..83b1d1d 100644
--- a/tests/cpp/testobject/PositionPdx.cpp
+++ b/tests/cpp/testobject/PositionPdx.cpp
@@ -141,8 +141,7 @@
 }
 std::string PositionPdx::toString() const {
   char buf[1024];
-  sprintf(buf, "PositionPdx Object:[ id=%d ]", this->pid);
-  return buf;
+  return "PositionPdx Object:[ id=" + std::to_string(pid) + "]";
 }
 
 }  // namespace testobject
diff --git a/tests/cpp/testobject/TestFactories.cpp b/tests/cpp/testobject/TestFactories.cpp
new file mode 100644
index 0000000..ff501ec
--- /dev/null
+++ b/tests/cpp/testobject/TestFactories.cpp
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+
+#include <geode/PartitionResolver.hpp>
+
+#include "testobject_export.h"
+
+using apache::geode::client::CacheableKey;
+using apache::geode::client::EntryEvent;
+using apache::geode::client::PartitionResolver;
+
+namespace {
+class TestLibPartitionResolver : public PartitionResolver {
+ public:
+  const std::string& getName() override {
+    static std::string name = "TestLibPartitionResolver";
+    return name;
+  }
+
+  std::shared_ptr<CacheableKey> getRoutingObject(const EntryEvent&) override {
+    return {};
+  }
+};
+}  // namespace
+
+extern "C" TESTOBJECT_EXPORT PartitionResolver*
+createTestLibPartitionResolver() {
+  return new TestLibPartitionResolver{};
+}
diff --git a/tests/cpp/testobject/VariousPdxTypes.cpp b/tests/cpp/testobject/VariousPdxTypes.cpp
index a0a6007..12812f4 100644
--- a/tests/cpp/testobject/VariousPdxTypes.cpp
+++ b/tests/cpp/testobject/VariousPdxTypes.cpp
@@ -23,6 +23,7 @@
 
 #include "VariousPdxTypes.hpp"
 
+#include <sstream>
 #include <util/Log.hpp>
 
 #include <geode/CacheableEnum.hpp>
@@ -74,10 +75,11 @@
   return false;
 }
 std::string PdxTypes1::toString() const {
-  char idbuf[4096];
-  sprintf(idbuf, "PdxTypes1:[m_i1=%d] [m_i2=%d] [m_i3=%d] [m_i4=%d]", m_i1,
-          m_i2, m_i3, m_i4);
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "PdxTypes1:[m_i1 = " << m_i1 << " ][m_i2 = " << m_i2
+       << "][m_i3 = " << m_i3 << "][m_i4 = " << m_i4 << "]";
+  return strm.str();
 }
 
 void PdxTypes1::toData(PdxWriter &pw) const {
@@ -131,10 +133,12 @@
   return false;
 }
 std::string PdxTypes2::toString() const {
-  char idbuf[4096];
-  sprintf(idbuf, "PdxTypes2:[m_i1=%d] [m_i2=%d] [m_i3=%d] [m_i4=%d] [m_s1=%s]",
-          m_i1, m_i2, m_i3, m_i4, m_s1.c_str());
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "PdxTypes2:[m_i1 = " << m_i1 << " ][m_i2 = " << m_i2
+       << "][m_i3 = " << m_i3 << "][m_i4 = " << m_i4 << "][m_s1 = " << m_s1
+       << "]";
+  return strm.str();
 }
 
 void PdxTypes2::toData(PdxWriter &pw) const {
@@ -187,10 +191,12 @@
   return false;
 }
 std::string PdxTypes3::toString() const {
-  char idbuf[4096];
-  sprintf(idbuf, "PdxTypes3:[m_i1=%d] [m_i2=%d] [m_i3=%d] [m_i4=%d] [m_s1=%s]",
-          m_i1, m_i2, m_i3, m_i4, m_s1.c_str());
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "PdxTypes3:[m_i1 = " << m_i1 << " ][m_i2 = " << m_i2
+       << "][m_i3 = " << m_i3 << "][m_i4 = " << m_i4 << "][m_s1 = " << m_s1
+       << "]";
+  return strm.str();
 }
 
 void PdxTypes3::toData(PdxWriter &pw) const {
@@ -243,10 +249,12 @@
   return false;
 }
 std::string PdxTypes4::toString() const {
-  char idbuf[4096];
-  sprintf(idbuf, "PdxTypes4:[m_i1=%d] [m_i2=%d] [m_i3=%d] [m_i4=%d] [m_s1=%s]",
-          m_i1, m_i2, m_i3, m_i4, m_s1.c_str());
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "PdxTypes4:[m_i1 = " << m_i1 << " ][m_i2 = " << m_i2
+       << "][m_i3 = " << m_i3 << "][m_i4 = " << m_i4 << "][m_s1 = " << m_s1
+       << "]";
+  return strm.str();
 }
 
 void PdxTypes4::toData(PdxWriter &pw) const {
@@ -300,12 +308,12 @@
   return false;
 }
 std::string PdxTypes5::toString() const {
-  char idbuf[4096];
-  sprintf(
-      idbuf,
-      "PdxTypes4:[m_i1=%d] [m_i2=%d] [m_i3=%d] [m_i4=%d] [m_s1=%s] [m_s2=%s]",
-      m_i1, m_i2, m_i3, m_i4, m_s1.c_str(), m_s2.c_str());
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "PdxTypes5:[m_i1 = " << m_i1 << " ][m_i2 = " << m_i2
+       << "][m_i3 = " << m_i3 << "][m_i4 = " << m_i4 << "]"
+       << "[m_s1 = " << m_s1 << "][m_s2 = " << m_s2 << "]";
+  return strm.str();
 }
 
 void PdxTypes5::toData(PdxWriter &pw) const {
@@ -334,7 +342,6 @@
   m_s2 = "two";
   bytes128 = std::vector<int8_t>(2);
   bytes128[0] = 0x34;
-  ;
   bytes128[1] = 0x64;
   m_i1 = 34324;
   m_i2 = 2144;
@@ -382,12 +389,12 @@
   return false;
 }
 std::string PdxTypes6::toString() const {
-  char idbuf[4096];
-  sprintf(
-      idbuf,
-      "PdxTypes4:[m_i1=%d] [m_i2=%d] [m_i3=%d] [m_i4=%d] [m_s1=%s] [m_s2=%s]",
-      m_i1, m_i2, m_i3, m_i4, m_s1.c_str(), m_s2.c_str());
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "PdxTypes6:[m_i1 = " << m_i1 << " ][m_i2 = " << m_i2
+       << "][m_i3 = " << m_i3 << "][m_i4 = " << m_i4 << "]"
+       << "[m_s1 = " << m_s1 << "][m_s2 = " << m_s2 << "]";
+  return strm.str();
 }
 
 void PdxTypes6::toData(PdxWriter &pw) const {
@@ -458,12 +465,12 @@
   return false;
 }
 std::string PdxTypes7::toString() const {
-  char idbuf[4096];
-  sprintf(
-      idbuf,
-      "PdxTypes7:[m_i1=%d] [m_i2=%d] [m_i3=%d] [m_i4=%d] [m_s1=%s] [m_s2=%s]",
-      m_i1, m_i2, m_i3, m_i4, m_s1.c_str(), m_s2.c_str());
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "PdxTypes7:[m_i1 = " << m_i1 << " ][m_i2 = " << m_i2
+       << "][m_i3 = " << m_i3 << "][m_i4 = " << m_i4 << "]"
+       << "[m_s1 = " << m_s1 << "][m_s2 = " << m_s2 << "]";
+  return strm.str();
 }
 
 void PdxTypes7::toData(PdxWriter &pw) const {
@@ -522,12 +529,12 @@
   return false;
 }
 std::string PdxTypes8::toString() const {
-  char idbuf[4096];
-  sprintf(
-      idbuf,
-      "PdxTypes8:[m_i1=%d] [m_i2=%d] [m_i3=%d] [m_i4=%d] [m_s1=%s] [m_s2=%s]",
-      m_i1, m_i2, m_i3, m_i4, m_s1.c_str(), m_s2.c_str());
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "PdxTypes8:[m_i1 = " << m_i1 << " ][m_i2 = " << m_i2
+       << "][m_i3 = " << m_i3 << "][m_i4 = " << m_i4 << "]"
+       << "[m_s1 = " << m_s1 << "][m_s2 = " << m_s2 << "]";
+  return strm.str();
 }
 
 void PdxTypes8::toData(PdxWriter &pw) const {
@@ -585,10 +592,12 @@
   return false;
 }
 std::string PdxTypes9::toString() const {
-  char idbuf[4096];
-  sprintf(idbuf, "PdxTypes9:[m_s1=%s] [m_s2=%s] [m_s3=%s] [m_s4=%s] [m_s5=%s] ",
-          m_s1.c_str(), m_s2.c_str(), m_s3.c_str(), m_s4.c_str(), m_s5.c_str());
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "PdxTypes9:[m_s1 = " << m_s1 << " ][m_s2 = " << m_s2
+       << "][m_s3 = " << m_s3 << "][m_s4 = " << m_s4 << "]"
+       << "[m_s5 = " << m_s5 << "]";
+  return strm.str();
 }
 
 void PdxTypes9::toData(PdxWriter &pw) const {
@@ -642,10 +651,12 @@
   return false;
 }
 std::string PdxTypes10::toString() const {
-  char idbuf[4096];
-  sprintf(idbuf, "PdxTypes9:[m_s1=%s] [m_s2=%s] [m_s3=%s] [m_s4=%s] [m_s5=%s] ",
-          m_s1.c_str(), m_s2.c_str(), m_s3.c_str(), m_s4.c_str(), m_s5.c_str());
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "PdxTypes10:[m_s1 = " << m_s1 << " ][m_s2 = " << m_s2
+       << "][m_s3 = " << m_s3 << "][m_s4 = " << m_s4 << "]"
+       << "[m_s5 = " << m_s5 << "]";
+  return strm.str();
 }
 
 void PdxTypes10::toData(PdxWriter &pw) const {
@@ -715,12 +726,12 @@
   return false;
 }
 std::string NestedPdx::toString() const {
-  char idbuf[4096];
-  sprintf(
-      idbuf,
-      "NestedPdx:[m_i1=%d] [m_i2=%d] [m_i3=%d] [m_i4=%d] [m_s1=%s] [m_s2=%s]",
-      m_i1, m_i2, m_i3, m_i4, m_s1.c_str(), m_s2.c_str());
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "NestedPdx:[m_i1 = " << m_i1 << " ][m_i2 = " << m_i2
+       << "][m_i3 = " << m_i3 << "][m_i4 = " << m_i4 << "]"
+       << "[m_s1 = " << m_s1 << "][m_s2 = " << m_s2 << "]";
+  return strm.str();
 }
 
 void NestedPdx::toData(PdxWriter &pw) const {
@@ -796,12 +807,12 @@
   return false;
 }
 std::string MixedVersionNestedPdx::toString() const {
-  char idbuf[4096];
-  sprintf(idbuf,
-          "MixedVersionNestedPdx:[m_i1=%d] [m_i2=%d] [m_i3=%d] [m_i4=%d] "
-          "[m_s1=%s] [m_s2=%s]",
-          m_i1, m_i2, m_i3, m_i4, m_s1.c_str(), m_s2.c_str());
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "MixedVersionNestedPdx:[m_i1 = " << m_i1 << " ][m_i2 = " << m_i2
+       << "][m_i3 = " << m_i3 << "][m_i4 = " << m_i4 << "]"
+       << "[m_s1 = " << m_s1 << "][m_s2 = " << m_s2 << "]";
+  return strm.str();
 }
 
 void MixedVersionNestedPdx::toData(PdxWriter &pw) const {
@@ -866,12 +877,12 @@
   return false;
 }
 std::string PdxInsideIGeodeSerializable::toString() const {
-  char idbuf[4096];
-  sprintf(idbuf,
-          "PdxInsideIGeodeSerializable:[m_i1=%d] [m_i2=%d] [m_i3=%d] [m_i4=%d] "
-          "[m_s1=%s] [m_s2=%s]",
-          m_i1, m_i2, m_i3, m_i4, m_s1.c_str(), m_s2.c_str());
-  return idbuf;
+  std::stringstream strm;
+
+  strm << "PdxInsideIGeodeSerializable:[m_i1 = " << m_i1 << " ][m_i2 = " << m_i2
+       << "][m_i3 = " << m_i3 << "][m_i4 = " << m_i4 << "]"
+       << "[m_s1 = " << m_s1 << "][m_s2 = " << m_s2 << "]";
+  return strm.str();
 }
 
 void PdxInsideIGeodeSerializable::toData(DataOutput &output) const {
diff --git a/tests/javaobject/CMakeLists.txt b/tests/javaobject/CMakeLists.txt
index f65806b..7672379 100644
--- a/tests/javaobject/CMakeLists.txt
+++ b/tests/javaobject/CMakeLists.txt
@@ -19,12 +19,19 @@
 find_package(Java REQUIRED)
 
 include(UseJava)
+include(CheckJavaClassExists)
+
+check_java_class_exists(org.apache.geode.security.AuthenticationExpiredException ${Geode_CLASSPATH} hasAuthenticationExpiredException)
 
 file(GLOB_RECURSE SOURCES "*.java")
 
+# Check for versions of GEODE that don't support AuthenticationExpiredException
+if (NOT ${hasAuthenticationExpiredException})
+  list(REMOVE_ITEM SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/SimulatedExpirationSecurityManager.java)
+endif()
+
 add_jar(javaobject ${SOURCES}
   INCLUDE_JARS ${Geode_CLASSPATH}
 )
 
 set(EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/javaobject.jar)
-
diff --git a/tests/javaobject/CacheWriterTransactionDelay.java b/tests/javaobject/CacheWriterTransactionDelay.java
new file mode 100644
index 0000000..a8f376e
--- /dev/null
+++ b/tests/javaobject/CacheWriterTransactionDelay.java
@@ -0,0 +1,45 @@
+/*
+ * 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 javaobject;
+
+import java.util.*;
+import org.apache.geode.cache.CacheWriter;
+import org.apache.geode.cache.CacheWriterException;
+import org.apache.geode.cache.EntryEvent;
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.RegionEvent;
+import org.apache.geode.cache.RegionService;
+
+public class CacheWriterTransactionDelay implements CacheWriter<String, String> {
+
+  public CacheWriterTransactionDelay() {}
+
+  public void beforeCreate(EntryEvent<String, String> event) {
+    final RegionService cache = event.getRegion().getRegionService();
+    cache.close();
+  }
+
+  public void beforeUpdate(EntryEvent<String, String> event) {}
+
+  public void beforeDestroy(EntryEvent<String, String> event) {}
+
+  public void beforeRegionDestroy(RegionEvent<String, String> event) {}
+
+  public void beforeRegionClear(RegionEvent<String, String> event) {}
+
+  public void close() {}
+}
diff --git a/tests/javaobject/MultiGetAllFunctionNonHA.java b/tests/javaobject/MultiGetAllFunctionNonHA.java
new file mode 100755
index 0000000..aa2eced
--- /dev/null
+++ b/tests/javaobject/MultiGetAllFunctionNonHA.java
@@ -0,0 +1,70 @@
+/*
+ * 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 javaobject;
+
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Vector;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.geode.cache.Cache;
+import org.apache.geode.cache.CacheFactory;
+import org.apache.geode.cache.execute.FunctionContext;
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.execute.ResultSender;
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.execute.Function;
+import org.apache.geode.cache.execute.FunctionContext;
+import org.apache.geode.cache.execute.RegionFunctionContext;
+import org.apache.geode.cache.partition.PartitionRegionHelper;
+
+public class MultiGetAllFunctionNonHA implements Function {
+
+  @Override
+  public void execute(FunctionContext context) {
+    RegionFunctionContext regionContext = (RegionFunctionContext) context;
+    final Region<String, String> region =
+        PartitionRegionHelper.getLocalDataForContext(regionContext);
+
+    Set<String> keys = region.keySet();
+    if (keys.isEmpty()) {
+      context.getResultSender().lastResult(null);
+    }
+    int counter = 1;
+    for (String key : keys) {
+      if (counter == keys.size()) {
+        context.getResultSender().lastResult(key);
+      } else {
+        context.getResultSender().sendResult(key);
+      }
+      counter++;
+    }
+  }
+
+  @Override
+  public String getId() {
+    return "MultiGetAllFunctionNonHA";
+  }
+
+  @Override
+  public boolean isHA() {
+    return false;
+  }
+}
diff --git a/tests/javaobject/QueryFunction.java b/tests/javaobject/QueryFunction.java
index e4c137d..5b7158e 100644
--- a/tests/javaobject/QueryFunction.java
+++ b/tests/javaobject/QueryFunction.java
@@ -14,24 +14,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-/*
- * 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 javaobject;
 
+package javaobject;
 
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.Declarable;
diff --git a/tests/javaobject/SimulatedExpirationSecurityManager.java b/tests/javaobject/SimulatedExpirationSecurityManager.java
new file mode 100644
index 0000000..872f59d
--- /dev/null
+++ b/tests/javaobject/SimulatedExpirationSecurityManager.java
@@ -0,0 +1,77 @@
+/*
+ * 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 javaobject;
+
+import java.util.HashMap;
+import java.util.Properties;
+
+import org.apache.geode.management.internal.security.ResourceConstants;
+import org.apache.geode.security.AuthenticationFailedException;
+import org.apache.geode.security.AuthenticationExpiredException;
+import org.apache.geode.security.ResourcePermission;
+import org.apache.geode.security.SecurityManager;
+
+import java.lang.management.ManagementFactory;
+import java.util.Random;
+
+import javaobject.UserPasswordAuthInit;
+import javaobject.UsernamePrincipal;
+
+/**
+  This Security manager uses a random number generator to decide which users
+  are authenticated. It is designed to force reauthentication for roughly
+  one percent of the operations. Also, user "root" is always valid to allow
+  executing gfsh commands during test setup.
+*/
+public class SimulatedExpirationSecurityManager implements SecurityManager {
+
+  @Override
+  public Object authenticate(Properties credentials) throws AuthenticationFailedException {
+    String user = credentials.getProperty(ResourceConstants.USER_NAME);
+    String password = credentials.getProperty(ResourceConstants.PASSWORD);
+
+    if (getUserCredentials().containsKey(user) && getUserCredentials().get(user).equals(password)) {
+        return user;
+    }
+    throw new AuthenticationFailedException("Non-authenticated user: " + user);
+  }
+
+  @Override
+  public boolean authorize(Object principal, ResourcePermission permission) throws AuthenticationExpiredException {
+
+    // User "root" is allows authorized, and can be used to run gfsh commands to setup the cluster for testing.
+    if (principal.toString() == "root")
+      return true;
+
+    // Throw AuthenticationExpiredException 1% of the time to allow testing expiration
+    int numUsers = 100;
+    Random rand = new Random();
+    int userNumber = rand.nextInt(numUsers);
+
+    if (userNumber < 1)
+      throw new AuthenticationExpiredException("User authentication expired.");
+    else
+      return true;
+  }
+
+  private HashMap<String, String> getUserCredentials() {
+    HashMap<String, String> userCredentials = new HashMap<String, String>();
+    userCredentials.put("root", "root-password");
+    userCredentials.put("user", "user-password");
+    return userCredentials;
+  }
+}
diff --git a/tests/javaobject/cli/InstantiateDataSerializable.java b/tests/javaobject/cli/InstantiateDataSerializable.java
index 14b7c1f..96db447 100644
--- a/tests/javaobject/cli/InstantiateDataSerializable.java
+++ b/tests/javaobject/cli/InstantiateDataSerializable.java
@@ -32,15 +32,16 @@
 public class InstantiateDataSerializable extends FunctionAdapter implements Declarable{
 
 public void execute(FunctionContext context) {
-  Instantiator.register(new Instantiator(javaobject.cli.Position.class, 22) {
+
+  Instantiator.register(new Instantiator(javaobject.cli.PositionKey.class, 21) {
     public DataSerializable newInstance() {
-      return new javaobject.cli.Position();
+      return new javaobject.cli.PositionKey();
     }
   });
 
-  Instantiator.register(new Instantiator(javaobject.cli.PositionKey.class, 77) {
+  Instantiator.register(new Instantiator(javaobject.cli.Position.class, 22) {
     public DataSerializable newInstance() {
-      return new javaobject.cli.PositionKey();
+      return new javaobject.cli.Position();
     }
   });
 
diff --git a/tests/javaobject/cli/PositionKey.java b/tests/javaobject/cli/PositionKey.java
index b0ece8e..9921ad0 100644
--- a/tests/javaobject/cli/PositionKey.java
+++ b/tests/javaobject/cli/PositionKey.java
@@ -26,7 +26,7 @@
   private long positionId;
 
   static {
-     Instantiator.register(new Instantiator(javaobject.cli.PositionKey.class, (byte) 77) {
+     Instantiator.register(new Instantiator(javaobject.cli.PositionKey.class, 21) {
      public DataSerializable newInstance() {
         return new PositionKey();
      }
@@ -52,11 +52,8 @@
     out.writeLong(this.positionId);
   } 
   
-  public int hashCode()
-  {
-      final int prime = 31;
-      int result = prime * (int)positionId;
-      return result;
+  public int hashCode() {
+    return Objects.hash(positionId);
   }
 
   public boolean equals(final Object obj)
diff --git a/tools/gnmsg/chunked_message_decoder.py b/tools/gnmsg/chunked_message_decoder.py
new file mode 100644
index 0000000..e030c46
--- /dev/null
+++ b/tools/gnmsg/chunked_message_decoder.py
@@ -0,0 +1,97 @@
+#!/usr/local/bin/python3
+
+# 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.
+import re
+import struct
+
+from message_types import message_types
+from read_values import read_int_value, read_byte_value, call_reader_function
+
+CHUNKED_MESSAGE_HEADER_LENGTH = 17
+
+
+class ChunkedResponseDecoder:
+    def __init__(self):
+        self.reset()
+
+    def add_header(self, connection, header):
+        if len(self.chunked_message) > 2:
+            raise Exception(
+                "Previous chunked message is not completed, can't process another header"
+            )
+
+        if len(header) == 2 * CHUNKED_MESSAGE_HEADER_LENGTH:
+            offset = 0
+            message_type = ""
+            (message_type, offset) = call_reader_function(
+                header, offset, read_int_value
+            )
+            self.chunked_message["Type"] = message_types[message_type]
+            # TODO: pass connection value in as a parameter
+            self.chunked_message["Connection"] = connection
+            self.chunked_message["Direction"] = "<---"
+            (self.chunked_message["Parts"], offset) = call_reader_function(
+                header, offset, read_int_value
+            )
+            (self.chunked_message["TransactionId"], offset) = call_reader_function(
+                header, offset, read_int_value
+            )
+            chunk_size = 0
+            flags = 0
+            (chunk_size, offset) = call_reader_function(header, offset, read_int_value)
+            (flags, offset) = call_reader_function(header, offset, read_byte_value)
+            self.add_chunk_header(chunk_size, flags)
+        else:
+            raise IndexError(
+                "Chunked message header should be "
+                + str(CHUNKED_MESSAGE_HEADER_LENGTH)
+                + " bytes"
+            )
+
+    def add_chunk_header(self, chunk_size, flags):
+        if len(self.chunked_message) == 2:
+            raise Exception("Can't add chunk header before message header")
+
+        #
+        # Chunked messages can be *really* large, like several tens of
+        # thousands of chunks for a really huge response.  We used to
+        # report out a list of all the chunk sizes based on all the
+        # chunk headers, but it presented performance issues and really
+        # wasn't conveying particularly interesting info.  Now, we just
+        # tally up all the chunk sizes and report the total size of the
+        # response and the timestamp of the last incoming chunk, both
+        # of which are potentially much more meaningful than the details
+        # of each individual chunk.
+        #
+        self.chunk_flags = flags
+        self.chunked_message["ResponseSize"] += chunk_size
+        self.chunked_message["NumberOfChunks"] += 1
+
+    def is_complete_message(self):
+        return self.chunk_flags & 0x1
+
+    def get_decoded_message(self, time_stamp):
+        # Return a re-ordered dictionary, with Timestamp at the front.  This
+        # makes output consistent with other messages
+        decoded_message = {"Timestamp": time_stamp}
+        decoded_message.update(self.chunked_message)
+        return decoded_message
+
+    def reset(self):
+        self.header = ""
+        # self.message_body = ""
+        self.chunked_message = {"ResponseSize": 0, "NumberOfChunks": 0}
+        self.complete = False
+        self.chunk_flags = 0xFF
diff --git a/tools/gnmsg/client_message_decoder.py b/tools/gnmsg/client_message_decoder.py
index c9f9fb5..5e49566 100644
--- a/tools/gnmsg/client_message_decoder.py
+++ b/tools/gnmsg/client_message_decoder.py
@@ -15,13 +15,16 @@
 # limitations under the License.
 import re
 import struct
+import sys
 
+from collections import OrderedDict
 from dateutil import parser
 
 from client_messages import parse_client_message
 from decoder_base import DecoderBase
 from message_types import message_types
 from numeric_conversion import to_hex_digit
+from gnmsg_globals import global_protocol_state
 
 
 class ClientMessageDecoder(DecoderBase):
@@ -32,24 +35,15 @@
         self.send_trace_parts_retriever_ = None
         self.send_trace_parser_ = None
         self.connection_states_ = {}
-        self.nc_version_ = None
-        self.send_trace_parts_retriever_ = None
-        self.get_send_trace_parts_functions = {
-            "0.0.42": self.get_send_trace_parts_base,
-            "10.0.3": self.get_send_trace_parts_base,
-            "10.1.1": self.get_send_trace_parts_base,
-            "10.1.2": self.get_send_trace_parts_base,
-            "10.1.3": self.get_send_trace_parts_base,
-            "9.1.1": self.get_send_trace_parts_v911,
-        }
-        self.send_trace_parsers = {
-            "0.0.42": self.parse_request_fields_base,
-            "10.0.3": self.parse_request_fields_base,
-            "10.1.1": self.parse_request_fields_base,
-            "10.1.2": self.parse_request_fields_base,
-            "10.1.3": self.parse_request_fields_base,
-            "9.1.1": self.parse_request_fields_v911,
-        }
+        self.get_send_trace_parts_functions = [
+            self.get_send_trace_parts_base,
+            self.get_send_trace_parts_v911,
+        ]
+        self.send_trace_parsers = [
+            self.parse_request_fields_base,
+            self.parse_request_fields_v911,
+        ]
+
         #
         # Native client code believes this is the list of messages that require a security footer.
         # We will use this list to verify and report if a message is sent that needs one but doesn't
@@ -78,34 +72,35 @@
             "PERIODIC_ACK",
             "PING",
             "REQUEST_EVENT_VALUE",
-            "ROLLBACK"
+            "ROLLBACK",
             "SIZE",
             "TX_FAILOVER",
             "TX_SYNCHRONIZATION",
             "USER_CREDENTIAL_MESSAGE",
         ]
-    def search_for_version(self, line):
-        if self.nc_version_ == None:
-            expression = re.compile(r"Product version:.*Native (\d+)\.(\d+)\.(\d+)-")
-            match = expression.search(line)
-            if match:
-                major = match.group(1)
-                minor = match.group(2)
-                patch = match.group(3)
-                self.nc_version_ = major + "." + minor + "." + patch
-                self.send_trace_parts_retriever_ = self.get_send_trace_parts_functions[
-                    self.nc_version_
-                ]
-                self.send_trace_parser_ = self.send_trace_parsers[self.nc_version_]
+
+        self.security_trace_expression_ = re.compile(
+            r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).*([\d|a-f|A-F|x|X]+) .*\]\s*TcrMessage::addSecurityPart\s*\[(0x[\d|a-f|A-F]*).*length\s*=\s*(\d+)\s*,\s*encrypted\s+ID\s*=\s*([\d|a-f|A-F]+)"
+        )
+
+        self.send_trace_expression_v911_ = re.compile(
+            r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).*TcrConnection::send:\s*\[([\d|a-f|A-F|x|X]+).*sending request to endpoint.*bytes:\s*([\d| ]+)"
+        )
+
+        self.send_trace_expression_base_ = re.compile(
+            r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).+:\d+\s+([\d|a-f|A-F|x|X]+).*\]\s*TcrConnection::send:\s*\[([\d|a-f|A-F|x|X]+).*sending request to endpoint.*bytes:\s*(.+)"
+        )
+        self.send_trace_expression_with_thread_name_ = re.compile(
+            r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).+:\d+\s+([\d|a-f|A-F|x|X]+) \(([\w|\s]+).*\]\s*TcrConnection::send:\s*\[([\d|a-f|A-F|x|X]+).*sending request to endpoint.*bytes:\s*(.+)"
+        )
 
     def get_send_trace_parts_v911(self, line, parts):
         result = False
-        expression = re.compile(
-            r"(\d\d:\d\d:\d\d\.\d+).*TcrConnection::send:\s*\[([\d|a-f|A-F|x|X]+).*sending request to endpoint.*bytes:\s*([\d| ]+)"
-        )
-        match = expression.search(line)
+        match = self.send_trace_expression_v911_.search(line)
         if match:
-            parts.append(dateutil.parser.parse(match.group(1)))
+            parts.append(parser.parse(match.group(1)))
+            # TODO: Revisit parsing TID here if we ever see a v9 client log again
+            parts.append("0")
             parts.append(match.group(2))
             parts.append(match.group(3))
             result = True
@@ -114,34 +109,52 @@
 
     def get_send_trace_parts_base(self, line, parts):
         result = False
-        expression = re.compile(
-            r"(\d\d:\d\d:\d\d\.\d+).*TcrConnection::send:\s*\[([\d|a-f|A-F|x|X]+).*sending request to endpoint.*bytes:\s*([\d|a-f|A-F]+)"
-        )
-        match = expression.search(line)
+        match = self.send_trace_expression_with_thread_name_.search(line)
         if match:
             parts.append(parser.parse(match.group(1)))
             parts.append(match.group(2))
             parts.append(match.group(3))
+            parts.append(match.group(4))
+            parts.append(match.group(5))
             result = True
+        else:
+            match = self.send_trace_expression_base_.search(line)
+            if match:
+                parts.append(parser.parse(match.group(1)))
+                parts.append(match.group(2))
+                parts.append("")
+                parts.append(match.group(3))
+                parts.append(match.group(4))
+                result = True
 
         return result
 
     def get_send_trace_parts(self, line, parts):
         if self.send_trace_parts_retriever_ is not None:
             return self.send_trace_parts_retriever_(line, parts)
+        else:
+            for retriever in self.get_send_trace_parts_functions:
+                if retriever(line, parts):
+                    self.send_trace_parts_retriever_ = retriever
+                    self.send_trace_parser_ = self.send_trace_parsers[
+                        self.get_send_trace_parts_functions.index(retriever)
+                    ]
+                    return True
+            else:
+                return False
 
     def get_add_security_trace_parts(self, line, parts):
         result = False
-        expression = re.compile(
-            r"(\d\d:\d\d:\d\d\.\d+).*TcrMessage::addSecurityPart\s*\[(0x[\d|a-f|A-F]*).*length\s*=\s*(\d+)\s*,\s*encrypted\s+ID\s*=\s*([\d|a-f|A-F]+)"
-        )
-        match = expression.search(line)
-        if match:
-            parts.append(parser.parse(match.group(1)))
-            parts.append(match.group(2))
-            parts.append(match.group(3))
-            parts.append(match.group(4))
-            result = True
+
+        if "addSec" in line:
+            match = self.security_trace_expression_.search(line)
+            if match:
+                parts.append(parser.parse(match.group(1)))
+                parts.append(match.group(2))
+                parts.append(match.group(3))
+                parts.append(match.group(4))
+                parts.append(match.group(5))
+                result = True
 
         return result
 
@@ -198,20 +211,32 @@
     def request_requires_security_footer(self, message_type):
         return message_type in self.message_requires_security_part
 
+    def is_candidate_line(self, line):
+        return "TcrMess" in line or "TcrConn" in line
+
     def process_line(self, line):
         connection = None
         is_send_trace = False
         is_add_security_trace = False
-        send_trace = {}
+        send_trace = OrderedDict()
 
-        self.search_for_version(line)
+        if not self.is_candidate_line(line):
+            return
 
         parts = []
         if self.get_send_trace_parts(line, parts):
-            send_trace["Timestamp"], send_trace["Connection"], message_bytes = parts
+            (
+                send_trace["Timestamp"],
+                send_trace["tid"],
+                send_trace["ThreadName"],
+                send_trace["Connection"],
+                message_bytes,
+            ) = parts
+            if send_trace["ThreadName"] == "":
+                del send_trace["ThreadName"]
             is_send_trace = True
         elif self.get_add_security_trace_parts(line, parts):
-            timestamp, connection, security_footer_length, message_bytes = parts
+            timestamp, tid, connection, security_footer_length, message_bytes = parts
             is_add_security_trace = True
         else:
             return
@@ -235,11 +260,15 @@
                     self.request_requires_security_footer(str(send_trace["Type"]))
                 ):
                     print(
-                        "ERROR: Security flag is set, but no footer was added for this message!"
+                        "ERROR: Security flag is set, but no footer was added for this message!",
+                        file=sys.stderr,
                     )
 
                 parse_client_message(send_trace, message_bytes)
                 self.output_queue_.put({"message": send_trace})
+                global_protocol_state.set_last_client_message(
+                    send_trace["tid"], send_trace["Type"]
+                )
         elif self.connection_states_[connection] == self.STATE_FOUND_SECURITY_FOOTER_:
             if is_send_trace:
                 send_trace["Direction"] = "--->"
@@ -251,3 +280,6 @@
                     send_trace["SecurityFlag"],
                 ) = self.parse_request_fields(message_bytes)
                 self.output_queue_.put({"message": send_trace})
+                global_protocol_state.set_last_client_message(
+                    send_trace["tid"], send_trace["Type"]
+                )
diff --git a/tools/gnmsg/client_messages.py b/tools/gnmsg/client_messages.py
index 6f8b9e1..1060ec1 100644
--- a/tools/gnmsg/client_messages.py
+++ b/tools/gnmsg/client_messages.py
@@ -16,21 +16,24 @@
 import sys
 import json
 
+from ds_codes import ds_codes
 from read_values import (
-    read_number_from_hex_string,
+    call_reader_function,
+    parse_key_or_value,
+    read_array_length,
     read_byte_value,
-    read_number_from_hex_string,
-    read_short_value,
-    read_number_from_hex_string,
+    read_cacheable,
+    read_geode_jmutf8_string_value,
     read_int_value,
     read_long_value,
+    read_short_value,
     read_string_value,
-    read_jmutf8_string_value,
-    read_number_from_hex_string,
-    call_reader_function,
-    read_cacheable,
-    parse_key_or_value,
+    read_unsigned_byte_value,
 )
+from read_parts import read_object_header, read_int_part
+from numeric_conversion import decimal_string_to_hex_string, int_to_hex_string
+from interest_policy import interest_policy
+from interest_type import interest_type
 
 CHARS_IN_MESSAGE_HEADER = 34
 
@@ -49,6 +52,20 @@
     return (region_part, offset)
 
 
+def parse_regex_part(message_bytes, offset):
+    regex_part = {}
+    (regex_part["Size"], offset) = call_reader_function(
+        message_bytes, offset, read_int_value
+    )
+    (regex_part["IsObject"], offset) = call_reader_function(
+        message_bytes, offset, read_byte_value
+    )
+    (regex_part["Expression"], offset) = read_string_value(
+        message_bytes, regex_part["Size"], offset
+    )
+    return (regex_part, offset)
+
+
 def parse_object_part(message_bytes, offset):
     object_part = {}
     (object_part["Size"], offset) = call_reader_function(
@@ -120,24 +137,6 @@
     return (flags_part, offset)
 
 
-def read_array_len(message_bytes, offset):
-    (byte_value, offset) = call_reader_function(message_bytes, offset, read_byte_value)
-    array_len = 0
-    if byte_value == 255:
-        raise Exception("Don't know how to handle len == -1 in serialized array!")
-    elif byte_value == 254:
-        (array_len, offset) = call_reader_function(
-            message_bytes, offset, read_short_value
-        )
-    elif byte_value == 253:
-        (array_len, offset) = call_reader_function(
-            message_bytes, offset, read_int_value
-        )
-    else:
-        array_len = byte_value
-    return (array_len, offset)
-
-
 def parse_credentials(message_bytes, offset):
     credentials = {}
     array_len = 0
@@ -147,7 +146,7 @@
     (credentials["IsObject"], offset) = call_reader_function(
         message_bytes, offset, read_byte_value
     )
-    (array_len, offset) = read_array_len(message_bytes, offset)
+    (array_len, offset) = read_array_length(message_bytes, offset)
     for i in range(0, array_len):
         (credentials["Key" + str(i)], offset) = read_cacheable(message_bytes, offset)
         (credentials["Value" + str(i)], offset) = read_cacheable(message_bytes, offset)
@@ -162,8 +161,8 @@
     (string_part["IsObject"], offset) = call_reader_function(
         message_bytes, offset, read_byte_value
     )
-    (string_part["Value"], offset) = read_jmutf8_string_value(
-        message_bytes, string_part["Size"], offset
+    (string_part["Value"], offset) = read_geode_jmutf8_string_value(
+        message_bytes, offset
     )
     return (string_part, offset)
 
@@ -228,6 +227,33 @@
     return (byte_and_timeout_part, offset)
 
 
+def parse_interest_result_policy_part(message_bytes, offset):
+    interest_result_policy_part = {}
+    (interest_result_policy_part["Size"], offset) = call_reader_function(
+        message_bytes, offset, read_int_value
+    )
+    (interest_result_policy_part["IsObject"], offset) = call_reader_function(
+        message_bytes, offset, read_byte_value
+    )
+    dscode, offset = call_reader_function(message_bytes, offset, read_byte_value)
+    interest_result_policy_part["DSCode1"] = ds_codes[dscode]
+
+    dscode, offset = call_reader_function(message_bytes, offset, read_byte_value)
+    interest_result_policy_part["DSCode2"] = ds_codes[dscode]
+
+    policy, offset = call_reader_function(message_bytes, offset, read_byte_value)
+    interest_result_policy_part["Policy"] = interest_policy[policy]
+
+    return (interest_result_policy_part, offset)
+
+
+def parse_interest_type_part(message_bytes, offset):
+    value, offset = parse_raw_int_part(message_bytes, offset)
+    value["InterestType"] = interest_type[value["Value"]]
+    del value["Value"]
+    return value, offset
+
+
 def read_put_message(properties, message_bytes, offset):
     (properties["Region"], offset) = parse_region_part(message_bytes, offset)
     (properties["Operation"], offset) = parse_operation_part(message_bytes, offset)
@@ -240,7 +266,20 @@
 
     (properties["Value"], offset) = parse_key_or_value(message_bytes, offset)
 
-    (properties["EventId"], offset) = parse_event_id_part(message_bytes, offset)
+    # This is a little weird, so here's the explanation: the geode-native logger has a buffer size limit of 8KB, so we
+    # can't fully parse any message that's longer than that.  At the same time, we would really like to extract as much
+    # information as we can from such a message.  Since the first 5 parts of the PUT message are trivial in size, the
+    # actual value being PUT is the thing that we can't decode.  Even then, we would like to know as much about the
+    # "Value" part of the message as we can, so we will attempt to parse the value, and catch any exceptions above this
+    # level.  In the case of large values that we don't attempt to parse, such as PDX, we will still inform that the
+    # value is of size (n), is or is not an object, and the type is (PDX or whatever).  Great so far, but what about the
+    # EventId part, that sits at the very end of the PUT message?  Well, we shouldn't bother with it if the length of
+    # the message is > the logger size limit, because we're guaranteed it's not in the log.  So that's what we do here,
+    # just skip the EventId.
+    if properties["Length"] < 8192:
+        (properties["EventId"], offset) = parse_event_id_part(message_bytes, offset)
+    else:
+        properties["EventId"] = {"Data": "Unavailable - message is too long"}
 
 
 def read_request_message(properties, message_bytes, offset):
@@ -265,6 +304,16 @@
     properties["ObjectPart"] = object_part
 
 
+def read_contains_key_message(properties, message_bytes, offset):
+    (properties["RegionPart"], offset) = parse_region_part(message_bytes, offset)
+    (properties["Key"], offset) = parse_key_or_value(message_bytes, offset)
+    (request_type, offset) = parse_raw_int_part(message_bytes, offset)
+    if request_type["Value"] == 1:
+        properties["RequestType"] == "ContainsValueForKey"
+    else:
+        properties["RequestType"] = "ContainsKey"
+
+
 def read_destroy_message(properties, message_bytes, offset):
     if properties["Parts"] > 5:
         raise Exception(
@@ -372,38 +421,90 @@
     (properties["FunctionName"], offset) = parse_region_part(message_bytes, offset)
     (properties["Arguments"], offset) = parse_object_part(message_bytes, offset)
 
+
 def parse_getall_optional_callback_arguments(message_bytes, offset):
     (local_object, local_offset) = parse_object_part(message_bytes, offset)
-    if (local_object["IsObject"] == 0):
+    if local_object["IsObject"] == 0:
         (local_object, local_offset) = parse_raw_int_part(message_bytes, offset)
     return (local_object, local_offset)
 
+
 def read_get_all_70_message(properties, message_bytes, offset):
     (properties["Region"], offset) = parse_region_part(message_bytes, offset)
     (properties["KeyList"], offset) = parse_key_or_value(message_bytes, offset)
-    (properties["CallbackArguments"], offset) = parse_getall_optional_callback_arguments(message_bytes, offset)
+    (
+        properties["CallbackArguments"],
+        offset,
+    ) = parse_getall_optional_callback_arguments(message_bytes, offset)
+
 
 def read_key_set(properties, message_bytes, offset):
     (properties["Region"], offset) = parse_region_part(message_bytes, offset)
 
+
+def read_object_as_raw_bytes(message_bytes, offset):
+    raw_bytes_part, offset = read_object_header(message_bytes, offset)
+
+    bytes_string = ""
+    for i in range(raw_bytes_part["Size"]):
+        if i:
+            bytes_string += " "
+        byte_val, offset = call_reader_function(
+            message_bytes, offset, read_unsigned_byte_value
+        )
+        bytes_string += decimal_string_to_hex_string(str(byte_val))
+    raw_bytes_part["Bytes"] = bytes_string
+    return raw_bytes_part, offset
+
+
+def read_add_pdx_type_message(properties, message_bytes, offset):
+    properties["PdxType"], offset = read_object_as_raw_bytes(message_bytes, offset)
+    properties["TypeId"], offset = read_int_part(message_bytes, offset)
+
+
+def read_register_interest_message(properties, message_bytes, offset):
+    properties["Region"], offset = parse_region_part(message_bytes, offset)
+    properties["InterestType"], offset = parse_interest_type_part(message_bytes, offset)
+    properties["InterestResultPolicy"], offset = parse_interest_result_policy_part(
+        message_bytes, offset
+    )
+    properties["IsDurable"], offset = parse_raw_byte_part(message_bytes, offset)
+    properties["Regex"], offset = parse_regex_part(message_bytes, offset)
+
+    properties["Param1"], offset = read_object_as_raw_bytes(message_bytes, offset)
+    byte_values = properties["Param1"]["Bytes"]
+    del properties["Param1"]["Bytes"]
+    properties["Param1"]["ReceiveValues"] = int(byte_values)
+
+    properties["Param2"], offset = read_object_as_raw_bytes(message_bytes, offset)
+    byte_values = properties["Param2"]["Bytes"]
+    del properties["Param2"]["Bytes"]
+    caching_enabled, serialize_values = byte_values.split(" ")
+    properties["Param2"]["CachingEnabled"] = int(caching_enabled)
+    properties["Param2"]["SerializeValues"] = int(serialize_values)
+
+
 client_message_parsers = {
-    "PUT": read_put_message,
-    "REQUEST": read_request_message,
+    "ADD_PDX_TYPE": read_add_pdx_type_message,
+    "CLOSECQ_MSG_TYPE": read_stopcq_or_closecq_msg_type_message,
     "CLOSE_CONNECTION": read_close_connection_message,
+    "CONTAINS_KEY": read_contains_key_message,
     "DESTROY": read_destroy_message,
-    "GET_CLIENT_PARTITION_ATTRIBUTES": read_get_client_partition_attributes_message,
-    "GET_CLIENT_PR_METADATA": read_get_client_pr_metadata_message,
-    "QUERY": read_query_message,
-    "USER_CREDENTIAL_MESSAGE": read_user_credential_message,
     "EXECUTECQ_MSG_TYPE": read_executecq_msg_type_message,
     "EXECUTECQ_WITH_IR_MSG_TYPE": read_executecq_with_ir_msg_type_message,
-    "STOPCQ_MSG_TYPE": read_stopcq_or_closecq_msg_type_message,
-    "CLOSECQ_MSG_TYPE": read_stopcq_or_closecq_msg_type_message,
-    "GET_ALL_70": read_get_all_70_message,
-    "KEY_SET": read_key_set,
-    "GET_PDX_ID_FOR_TYPE": read_get_pdx_id_for_type_message,
-    "GET_FUNCTION_ATTRIBUTES": read_get_function_attributes_message,
     "EXECUTE_FUNCTION": read_execute_function_message,
+    "GET_ALL_70": read_get_all_70_message,
+    "GET_CLIENT_PARTITION_ATTRIBUTES": read_get_client_partition_attributes_message,
+    "GET_CLIENT_PR_METADATA": read_get_client_pr_metadata_message,
+    "GET_FUNCTION_ATTRIBUTES": read_get_function_attributes_message,
+    "GET_PDX_ID_FOR_TYPE": read_get_pdx_id_for_type_message,
+    "KEY_SET": read_key_set,
+    "PUT": read_put_message,
+    "QUERY": read_query_message,
+    "REGISTER_INTEREST": read_register_interest_message,
+    "REQUEST": read_request_message,
+    "STOPCQ_MSG_TYPE": read_stopcq_or_closecq_msg_type_message,
+    "USER_CREDENTIAL_MESSAGE": read_user_credential_message,
 }
 
 
@@ -411,7 +512,9 @@
     offset = CHARS_IN_MESSAGE_HEADER
     if properties["Type"] in client_message_parsers.keys():
         try:
-            client_message_parsers[properties["Type"]](properties, message_bytes, offset)
+            client_message_parsers[properties["Type"]](
+                properties, message_bytes, offset
+            )
         except:
             properties["ERROR"] = "Exception reading message - probably incomplete"
-            return
\ No newline at end of file
+            return
diff --git a/tools/gnmsg/command_line.py b/tools/gnmsg/command_line.py
index dac4c59..04a6044 100755
--- a/tools/gnmsg/command_line.py
+++ b/tools/gnmsg/command_line.py
@@ -37,6 +37,15 @@
         help="(optionally) print out regular message details",
     )
 
+    parser.add_argument(
+        "--thread_id", metavar="T", nargs="?", help="Show only messages on this thread"
+    )
+
+    parser.add_argument(
+        "--rolled",
+        action="store_true",
+        help="(optionally) treat file as first in a sequence of rolled log files, and scan all sequential files.",
+    )
     args = parser.parse_args()
 
     if args.file is None:
@@ -44,4 +53,4 @@
         parser.print_help()
         sys.exit(1)
 
-    return (args.file, args.handshake, args.messages)
+    return (args.file, args.handshake, args.messages, args.thread_id, args.rolled)
diff --git a/tools/gnmsg/ds_codes.py b/tools/gnmsg/ds_codes.py
index 86a54b3..83b1a86 100644
--- a/tools/gnmsg/ds_codes.py
+++ b/tools/gnmsg/ds_codes.py
@@ -24,6 +24,9 @@
     17: "PdxType",
     26: "BooleanArray",
     27: "CharArray",
+    37: "CacheableUserData4",
+    38: "CacheableUserData2",
+    39: "CacheableUserData",
     41: "NullObj",
     42: "CacheableString",
     43: "Class",
@@ -60,13 +63,6 @@
     87: "CacheableASCIIString",
     88: "CacheableASCIIStringHuge",
     89: "CacheableStringHuge",
-    92: "InternalDistributedMember",
-    94: "CacheableEnum",
-    38: "ClientProxyMembershipId",
-    39: "CacheableUserData",
-    38: "CacheableUserData2",
-    37: "CacheableUserData4",
     93: "PDX",
     94: "PDX_ENUM",
-    37: "InterestResultPolicy",
 }
diff --git a/tools/gnmsg/ds_fids.py b/tools/gnmsg/ds_fids.py
new file mode 100644
index 0000000..59ed97a
--- /dev/null
+++ b/tools/gnmsg/ds_fids.py
@@ -0,0 +1,42 @@
+#!/usr/local/bin/python3
+
+# 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.
+ds_fids = {
+    -135: "GatewaySenderEventCallbackArgument",
+    -126: "ClientHealthStats",
+    -120: "VersionTag",
+    -59: "CollectionTypeImpl",
+    -54: "LocatorListRequest",
+    -53: "ClientConnectionRequest",
+    -52: "QueueConnectionRequest",
+    -51: "LocatorListResponse",
+    -50: "ClientConnectionResponse",
+    -49: "QueueConnectionResponse",
+    -48: "ClientReplacementRequest",
+    -43: "GetAllServersRequest",
+    -42: "GetAllServersResponse",
+    7: "VersionedObjectPartList",
+    9: "EnumInfo",
+    25: "CacheableObjectPartList",
+    31: "CacheableUndefined",
+    32: "Struct",
+    36: "EventId",
+    37: "InterestResultPolicy",
+    38: "ClientProxyMembershipId",
+    92: "InternalDistributedMember",
+    110: "TXCommitMessage",
+    2131: "DiskVersionTag",
+    2133: "DiskStoreId",
+}
diff --git a/tools/gnmsg/gnmsg.py b/tools/gnmsg/gnmsg.py
index 37ff72f..933cf06 100755
--- a/tools/gnmsg/gnmsg.py
+++ b/tools/gnmsg/gnmsg.py
@@ -15,71 +15,56 @@
 # limitations under the License.
 import json
 import queue
-import re
+import os
 import sys
-import threading
 import traceback
 
-from modified_utf8 import utf8m_to_utf8s
-from numeric_conversion import to_hex_digit
+
 import command_line
 
-from ds_codes import ds_codes
-from connection_types import ConnectionTypes, ConnectionTypeStrings
-from read_values import (
-    read_number_from_hex_string,
-    read_byte_value,
-    read_number_from_hex_string,
-    read_short_value,
-    read_number_from_hex_string,
-    read_int_value,
-    read_long_value,
-    read_string_value,
-    read_jmutf8_string_value,
-    read_number_from_hex_string,
-    call_reader_function,
-)
 from client_message_decoder import ClientMessageDecoder
 from server_message_decoder import ServerMessageDecoder
 from handshake_decoder import HandshakeDecoder
 
 
-def scan_file(filename, dump_handshake, dump_messages):
-    output_queue = queue.Queue()
-    separator = ""
-    if dump_handshake:
-        handshake_decoder = HandshakeDecoder(output_queue)
-        with open(filename, "rb") as f:
-            for line in f:
-                handshake_decoder.process_line(line.decode("utf-8"))
-                try:
-                    data = output_queue.get_nowait()
-                    for key, value in data.items():
-                        if key == "handshake":
-                            print(separator + json.dumps(data, indent=2, default=str))
-                            separator = ","
-                except queue.Empty:
-                    continue
-
-    separator = ""
-    client_decoder = ClientMessageDecoder(output_queue)
-    server_decoder = ServerMessageDecoder(output_queue)
-    with open(filename, "rb") as f:
-        for line in f:
-            linestr = line.decode("utf-8")
-            client_decoder.process_line(linestr)
-            server_decoder.process_line(linestr)
-            try:
-                data = output_queue.get_nowait()
-                for key, value in data.items():
+def scan_opened_file(
+    file,
+    handshake_decoder,
+    client_decoder,
+    server_decoder,
+    output_queue,
+    dump_handshake,
+    dump_messages,
+    thread_id,
+    start_string,
+):
+    separator = start_string
+    for line in file:
+        linestr = line.decode("utf-8").rstrip()
+        client_decoder.process_line(linestr)
+        server_decoder.process_line(linestr)
+        handshake_decoder.process_line(linestr)
+        try:
+            data = output_queue.get_nowait()
+            for key, value in data.items():
+                if (
+                    "tid" not in value.keys()
+                    or ("tid" in value.keys() and value["tid"] == thread_id)
+                    or thread_id is None
+                ):
                     if key == "message" and dump_messages:
-                        print(separator + json.dumps(data, indent=2, default=str))
+                        print(separator + json.dumps(value, indent=2, default=str))
                         separator = ","
-            except queue.Empty:
-                continue
-            except:
-                traceback.print_exc()
-                continue
+                    elif key == "handshake" and dump_handshake:
+                        print(separator + json.dumps(value, indent=2, default=str))
+                        separator = ","
+
+        except queue.Empty:
+            continue
+        except:
+            traceback.print_exc()
+            continue
+
     while True:
         try:
             data = output_queue.get_nowait()
@@ -91,6 +76,94 @@
             break
 
 
+def scan_file(filename, dump_handshake, dump_messages, thread_id):
+    print("[")
+
+    output_queue = queue.Queue()
+
+    f = open(filename, "rb")
+    print("Scanning " + filename, file=sys.stderr)
+    scan_opened_file(
+        f,
+        HandshakeDecoder(output_queue),
+        ClientMessageDecoder(output_queue),
+        ServerMessageDecoder(output_queue),
+        output_queue,
+        dump_handshake,
+        dump_messages,
+        thread_id,
+        "",
+    )
+    f.close()
+
+    print("]")
+
+
+def scan_file_sequence(file, handshake, messages, thread_id):
+    dirname = os.path.dirname(file)
+    basename, ext = os.path.splitext(os.path.basename(file))
+
+    base_parts = basename.split("-")
+    if len(base_parts) == 2:
+        print("[")
+
+        root = base_parts[0]
+        roll_index = int(base_parts[1])
+
+        output_queue = queue.Queue()
+        handshake_decoder = HandshakeDecoder(output_queue)
+        client_decoder = ClientMessageDecoder(output_queue)
+        server_decoder = ServerMessageDecoder(output_queue)
+        start_string = ""
+        last_chance = False
+
+        while True:
+            if last_chance:
+                if len(dirname) > 0:
+                    filename = dirname + os.sep + root + ext
+                else:
+                    filename = root + ext
+            else:
+                if len(dirname) > 0:
+                    filename = dirname + os.sep + root + "-" + str(roll_index) + ext
+                else:
+                    filename = root + "-" + str(roll_index) + ext
+
+            try:
+                print("Scanning " + filename, file=sys.stderr)
+                f = open(filename, "rb")
+                scan_opened_file(
+                    f,
+                    handshake_decoder,
+                    client_decoder,
+                    server_decoder,
+                    output_queue,
+                    handshake,
+                    messages,
+                    thread_id,
+                    start_string,
+                )
+                start_string = ","
+                f.close()
+                roll_index += 1
+                if last_chance:
+                    break
+            except FileNotFoundError:
+                if last_chance:
+                    break
+                last_chance = True
+                continue
+
+        print("]")
+
+    else:
+        raise ValueError(basename + " is not a valid rolled logfile name")
+
+
 if __name__ == "__main__":
-    (file, handshake, messages) = command_line.parse_command_line()
-    scan_file(file, handshake, messages)
+    (file, handshake, messages, thread_id, rolled) = command_line.parse_command_line()
+
+    if rolled:
+        scan_file_sequence(file, handshake, messages, thread_id)
+    else:
+        scan_file(file, handshake, messages, thread_id)
diff --git a/packer/windows/install-openssl.ps1 b/tools/gnmsg/gnmsg_globals.py
similarity index 73%
copy from packer/windows/install-openssl.ps1
copy to tools/gnmsg/gnmsg_globals.py
index f20f510..0298ff3 100644
--- a/packer/windows/install-openssl.ps1
+++ b/tools/gnmsg/gnmsg_globals.py
@@ -1,19 +1,21 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
+#!/usr/local/bin/python3
+
 # 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.
+import protocol_state
 
-$ErrorActionPreference = "Stop"
-Import-Module Packer -Force
 
-Install-Package https://slproweb.com/download/Win64OpenSSL-1_1_1d.exe -ArgumentList /silent
+# global protocol state.  We need to keep track of (at least) the last client
+# message sent, per thread, in order to decode server responses.
+global_protocol_state = protocol_state.ProtocolState()
diff --git a/packer/windows/install-openssl.ps1 b/tools/gnmsg/handshake_acceptance_codes.py
similarity index 65%
copy from packer/windows/install-openssl.ps1
copy to tools/gnmsg/handshake_acceptance_codes.py
index f20f510..1289664 100644
--- a/packer/windows/install-openssl.ps1
+++ b/tools/gnmsg/handshake_acceptance_codes.py
@@ -1,19 +1,26 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
+#!/usr/local/bin/python3
+
 # 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.
-
-$ErrorActionPreference = "Stop"
-Import-Module Packer -Force
-
-Install-Package https://slproweb.com/download/Win64OpenSSL-1_1_1d.exe -ArgumentList /silent
+server_handshake_reply_codes = {
+    21: "REPLY_SSL_ENABLED",
+    59: "REPLY_OK",
+    60: "REPLY_REFUSED",
+    61: "REPLY_INVALID",
+    62: "REPLY_AUTHENTICATION_REQUIRED",
+    63: "REPLY_AUTHENTICATION_FAILED",
+    64: "REPLY_DUPLICATE_DURABLE_CLIENT",
+    105: "SUCCESSFUL_SERVER_TO_CLIENT",
+    106: "UNSUCCESSFUL_SERVER_TO_CLIENT",
+}
diff --git a/tools/gnmsg/handshake_decoder.py b/tools/gnmsg/handshake_decoder.py
index 9450bbb..dffc3bb 100644
--- a/tools/gnmsg/handshake_decoder.py
+++ b/tools/gnmsg/handshake_decoder.py
@@ -13,28 +13,35 @@
 # 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.
-import json
 import re
 
+from collections import OrderedDict
+from dateutil import parser
+
 from decoder_base import DecoderBase
 from ds_codes import ds_codes
+from ds_fids import ds_fids
 from modified_utf8 import utf8m_to_utf8s
 from connection_types import ConnectionTypes, ConnectionTypeStrings
+from handshake_acceptance_codes import server_handshake_reply_codes
 
 from read_values import (
-    read_number_from_hex_string,
-    read_byte_value,
-    read_number_from_hex_string,
-    read_short_value,
-    read_number_from_hex_string,
-    read_int_value,
-    read_long_value,
-    read_string_value,
-    read_jmutf8_string_value,
-    read_number_from_hex_string,
     call_reader_function,
+    read_boolean_value,
+    read_byte_array,
+    read_byte_array_with_length,
+    read_byte_value,
+    read_cacheable_ascii_string_value,
+    read_fixed_id_byte_value,
+    read_int_value,
+    read_short_value,
+    read_cacheable_string_value,
+    read_unsigned_byte_value,
 )
 
+# TODO: Find a more reasonable place for this and other REPLY_* constants
+REPLY_SSL_ENABLED = 21
+
 
 class HandshakeDecoder(DecoderBase):
     def __init__(self, output_queue):
@@ -46,39 +53,128 @@
             2: "SECURITY_CREDENTIALS_DHENCRYPT",
             3: "SECURITY_MULTIUSER_NOTIFICATIONCHANNEL",
         }
+        self.client_connection_request_expression_ = re.compile(
+            r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).* ([\d]+) .*\]\s*ThinClientLocatorHelper::sendRequest\([0-9|a-f|A-F|x|X]+\): sending \d+ bytes to locator:\s*([0-9|a-f|A-F]+)"
+        )
+        self.client_connection_response_expression_ = re.compile(
+            r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).* ([\d]+) .*\]\s*ThinClientLocatorHelper::sendRequest\([0-9|a-f|A-F|x|X]+\): received \d+ bytes from locator:\s*([0-9|a-f|A-F]+)"
+        )
+        self.server_handshake_request_expression_ = expression = re.compile(
+            r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).* ([\d]+) .*\].*\sHandshake bytes: \(\d+\):\s*([0-9|a-f|A-F]+)"
+        )
+        self.server_handshake_response_expression_ = expression = re.compile(
+            r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).* ([\d]+) .*\].*isClientNotification=([t|r|u|e|f|a|l|s]+),\s+Handshake response bytes: \(\d+\)\s*([0-9|a-f|A-F]+)"
+        )
 
-    def is_handshake_trace(self, line):
-        expression = re.compile(r"Handshake bytes \(\d+\):\s*([0-9|a-f|A-F]+)")
-        match = expression.search(line)
+    def is_candidate_line(self, line):
+        return "Helper::sendR" in line or "ake bytes:" in line or "onse bytes:" in line
+
+    def is_locator_request(self, line):
+        match = self.client_connection_request_expression_.search(line)
         if match:
             return True
         else:
             return False
 
-    def get_handshake_bytes(self, line):
-        expression = re.compile(r"Handshake bytes \(\d+\):\s*([0-9|a-f|A-F]+)")
-        match = expression.search(line)
+    def get_locator_request_parts(self, line, parts):
+        result = False
+        match = self.client_connection_request_expression_.search(line)
         if match:
-            return match.group(1)
+            parts.append(parser.parse(match.group(1)))
+            parts.append(match.group(2))
+            parts.append(match.group(3))
+            result = True
+
+        return result
+
+    def is_locator_response(self, line):
+        match = self.client_connection_response_expression_.search(line)
+        if match:
+            return True
+        else:
+            return False
+
+    def get_locator_response_parts(self, line, parts):
+        result = False
+        match = self.client_connection_response_expression_.search(line)
+        if match:
+            parts.append(parser.parse(match.group(1)))
+            parts.append(match.group(2))
+            parts.append(match.group(3))
+            result = True
+
+        return result
+
+    def is_server_handshake_request(self, line):
+        match = self.server_handshake_request_expression_.search(line)
+        if match:
+            return True
+        else:
+            return False
+
+    def get_server_handshake_request_parts(self, line, parts):
+        match = self.server_handshake_request_expression_.search(line)
+        if match:
+            parts.append(parser.parse(match.group(1)))
+            parts.append(match.group(2))
+            parts.append(match.group(3))
         else:
             exit(1)
 
-    # TODO: Find a handshake that uses a list and implement this function to parse it
-    def read_list_of_ports(string):
-        return (1001, 1002, 1003)
+    def is_server_handshake_response(self, line):
+        match = self.server_handshake_response_expression_.search(line)
+        if match:
+            return True
+        else:
+            return False
+
+    def get_server_handshake_response_parts(self, line, parts):
+        match = self.server_handshake_response_expression_.search(line)
+        if match:
+            parts.append(parser.parse(match.group(1)))
+            parts.append(match.group(2))
+            parts.append(match.group(3))
+            parts.append(match.group(4))
+        else:
+            exit(1)
+
+    def read_list_of_ports(self, string, offset):
+        (number_of_ports, offset) = call_reader_function(string, offset, read_int_value)
+        ports = []
+        for i in range(number_of_ports):
+            (port, offset) = call_reader_function(string, offset, read_int_value)
+            ports.append(port)
+
+        return (ports, offset)
 
     def get_client_proxy_address(self, string, offset):
         (address_size, offset) = call_reader_function(string, offset, read_byte_value)
         result = ""
 
         if int(address_size) == 4:
-            (octet1, offset) = call_reader_function(string, offset, read_byte_value)
-            (octet2, offset) = call_reader_function(string, offset, read_byte_value)
-            (octet3, offset) = call_reader_function(string, offset, read_byte_value)
-            (octet4, offset) = call_reader_function(string, offset, read_byte_value)
+            (octet1, offset) = call_reader_function(
+                string, offset, read_unsigned_byte_value
+            )
+            (octet2, offset) = call_reader_function(
+                string, offset, read_unsigned_byte_value
+            )
+            (octet3, offset) = call_reader_function(
+                string, offset, read_unsigned_byte_value
+            )
+            (octet4, offset) = call_reader_function(
+                string, offset, read_unsigned_byte_value
+            )
             result = (
                 str(octet1) + "." + str(octet2) + "." + str(octet3) + "." + str(octet4)
             )
+        else:
+            # don't really know what these bytes represent, so we'll just do a hex dump.
+            for i in range(offset, offset + (address_size * 2), 2):
+                result += string[i : i + 2]
+                result += " "
+            result = result[:-1]
+            offset += address_size * 2
+
         return (result, offset)
 
     def convert_to_bytes(self, string, length):
@@ -104,7 +200,7 @@
             string_bytes = string[offset : offset + string_length * 2]
             hostname = utf8m_to_utf8s(
                 self.convert_to_bytes(string_bytes, string_length * 2)
-            ).decode("utf-8")
+            )
             offset += string_length * 2
         elif string_type == "CacheableStringHuge":
             (length_byte_3, offset) = call_reader_function(
@@ -173,8 +269,15 @@
         )
         return (self.credentials_types[credential_type], offset)
 
-    def get_handshake_info(self, line, handshake_info):
-        handshake_bytes = self.get_handshake_bytes(line)
+    def get_server_handshake_info(self, line, handshake_info):
+        parts = []
+        self.get_server_handshake_request_parts(line, parts)
+        handshake_info["Timestamp"] = parts[0]
+        handshake_info["tid"] = parts[1]
+        handshake_info["Direction"] = "--->"
+        handshake_info["Type"] = "ServerHandshakeRequest"
+        handshake_bytes = parts[2]
+
         (connection_type, offset) = call_reader_function(
             handshake_bytes, 0, read_byte_value
         )
@@ -189,16 +292,14 @@
         )
 
         ports = ()
-        if (connection_type == ConnectionTypes.PRIMARY_SERVER_TO_CLIENT) or (
-            connection_type == ConnectionTypes.SECONDARY_SERVER_TO_CLIENT
-        ):
-            ports = self.read_list_of_ports(handshake_bytes)
+        if connection_type == ConnectionTypes.CLIENT_TO_SERVER:
+            (handshake_info["ReadTimeout"], offset) = call_reader_function(
+                handshake_bytes, offset, read_int_value
+            )
+        else:
+            (ports, offset) = self.read_list_of_ports(handshake_bytes, offset)
             handshake_info["Ports"] = ports
 
-        (handshake_info["ReadTimeout"], offset) = call_reader_function(
-            handshake_bytes, offset, read_int_value
-        )
-
         (handshake_info["FixedIDByte"], offset) = call_reader_function(
             handshake_bytes, offset, read_byte_value
         )
@@ -290,8 +391,295 @@
             handshake_bytes, offset
         )
 
+    def read_client_connection_request(self, request_bytes, offset):
+        client_connection_request = {}
+        server_group = {}
+        (server_group["name"], offset) = read_cacheable_string_value(
+            request_bytes, offset
+        )
+        client_connection_request["ServerGroup"] = server_group
+        (server_location_count, offset) = call_reader_function(
+            request_bytes, offset, read_int_value
+        )
+        client_connection_request["ServerLocationCount"] = server_location_count
+        server_locations = {}
+        for i in range(client_connection_request["ServerLocationCount"]):
+            (server_location, offset) = self.read_server_location(request_bytes, offset)
+            server_locations["Server" + str(i)] = server_location
+        client_connection_request["ServerLocations"] = server_locations
+        return client_connection_request, offset
+
+    def read_queue_connection_request(self, request_bytes, offset):
+        queue_connection_request = {}
+        server_group = {}
+        (server_group["name"], offset) = read_cacheable_string_value(
+            request_bytes, offset
+        )
+        queue_connection_request["servergroup"] = server_group
+        (ds_fid, offset) = read_fixed_id_byte_value(request_bytes, offset)
+        if ds_fids[ds_fid] != "ClientProxyMembershipId":
+            raise TypeError("Expected type ClientProxyMembershipId")
+        (
+            queue_connection_request["ClientProxyMembershipId"],
+            offset,
+        ) = read_byte_array(request_bytes, offset)
+        (
+            queue_connection_request["ThisValueIsAlways1"],
+            offset,
+        ) = call_reader_function(request_bytes, offset, read_int_value)
+        (
+            queue_connection_request["RedundantCopies"],
+            offset,
+        ) = call_reader_function(request_bytes, offset, read_int_value)
+        (
+            queue_connection_request["ServerLocationCount"],
+            offset,
+        ) = call_reader_function(request_bytes, offset, read_int_value)
+        server_locations = {}
+        for i in range(queue_connection_request["ServerLocationCount"]):
+            (server_location, offset) = self.read_server_location(request_bytes, offset)
+            server_locations["Server" + str(i)] = server_location
+        queue_connection_request["ServerLocations"] = server_locations
+        (
+            queue_connection_request["FindDurable"],
+            offset,
+        ) = call_reader_function(request_bytes, offset, read_boolean_value)
+        return queue_connection_request, offset
+
+    def read_locator_list_request(self, request_bytes, offset):
+        locator_list_request = {}
+        server_group = {}
+        (server_group["name"], offset) = read_cacheable_string_value(
+            request_bytes, offset
+        )
+        locator_list_request["servergroup"] = server_group
+        return locator_list_request, offset
+
+    def read_server_location(self, line, offset):
+        server_location = {}
+        (server_location["hostname"], offset) = read_cacheable_ascii_string_value(
+            line, offset
+        )
+        (server_location["port"], offset) = call_reader_function(
+            line, offset, read_int_value
+        )
+
+        return server_location, offset
+
+    def read_locator_location(self, line, offset):
+        return self.read_server_location(line, offset)
+
+    def read_client_connection_response(self, response_bytes, offset):
+        client_connection_response = {}
+        (server_found, offset) = call_reader_function(
+            response_bytes, offset, read_byte_value
+        )
+        client_connection_response["ServerFound"] = (
+            "True" if server_found == 1 else "False"
+        )
+
+        if server_found == 1:
+            (
+                client_connection_response["ServerLocation"],
+                offset,
+            ) = self.read_server_location(response_bytes, offset)
+        return client_connection_response, offset
+
+    def read_queue_connection_response(self, response_bytes, offset):
+        queue_connection_response = {}
+
+        (
+            queue_connection_response["DurableQueueFound"],
+            offset,
+        ) = read_boolean_value(response_bytes, offset)
+
+        (
+            queue_connection_response["ServerLocationCount"],
+            offset,
+        ) = call_reader_function(response_bytes, offset, read_int_value)
+
+        server_locations = {}
+        for i in range(queue_connection_response["ServerLocationCount"]):
+            (server_location, offset) = self.read_server_location(
+                response_bytes, offset
+            )
+            server_locations["Server" + str(i)] = server_location
+        queue_connection_response["ServerLocations"] = server_locations
+        return queue_connection_response, offset
+
+    def read_locator_list_response(self, response_bytes, offset):
+        locator_list_response = {}
+        (
+            locator_list_response["LocatorLocationCount"],
+            offset,
+        ) = call_reader_function(response_bytes, offset, read_int_value)
+        locator_locations = {}
+        for i in range(locator_list_response["LocatorLocationCount"]):
+            (locator_location, offset) = self.read_locator_location(
+                response_bytes, offset
+            )
+            locator_locations["Locator" + str(i)] = locator_location
+        locator_list_response["LocatorLocations"] = locator_locations
+        return locator_list_response, offset
+
+    def decode_locator_request(self, line, handshake_request):
+        parts = []
+        if self.get_locator_request_parts(line, parts):
+            offset = 0
+            handshake_request["Timestamp"] = parts[0]
+            handshake_request["tid"] = parts[1]
+            handshake_request["Direction"] = "--->"
+            request_bytes = parts[2]
+
+            (handshake_request["GossipVersion"], offset) = call_reader_function(
+                request_bytes, offset, read_int_value
+            )
+            (handshake_request["ProtocolOrdinal"], offset) = call_reader_function(
+                request_bytes, offset, read_short_value
+            )
+
+            (ds_code, offset) = call_reader_function(
+                request_bytes, offset, read_byte_value
+            )
+
+            (dsfid, offset) = call_reader_function(
+                request_bytes, offset, read_byte_value
+            )
+            request_type = ds_fids[dsfid]
+            handshake_request["Type"] = request_type
+            if request_type == "ClientConnectionRequest":
+                (
+                    handshake_request["ClientConnectionRequest"],
+                    offset,
+                ) = self.read_client_connection_request(request_bytes, offset)
+
+            elif request_type == "QueueConnectionRequest":
+                (
+                    handshake_request["QueueConnectionRequest"],
+                    offset,
+                ) = self.read_queue_connection_request(request_bytes, offset)
+
+            elif request_type == "LocatorListRequest":
+                (
+                    handshake_request["LocatorListRequest"],
+                    offset,
+                ) = self.read_locator_list_request(request_bytes, offset)
+            else:
+                pass
+                # TODO: decode other request types (locator list, server list, ...)
+
+    def decode_locator_response(self, line, handshake_response):
+        parts = []
+        if self.get_locator_response_parts(line, parts):
+            handshake_response["Timestamp"] = parts[0]
+            handshake_response["tid"] = parts[1]
+            handshake_response["Direction"] = "<---"
+            response_bytes = parts[2]
+            offset = 0
+
+            (ssl_enabled, offset) = call_reader_function(
+                response_bytes, offset, read_byte_value
+            )
+            if ssl_enabled == REPLY_SSL_ENABLED:
+                handshake_response["SSLEnabled"] = "True"
+            else:
+                handshake_response["SSLEnabled"] = "False"
+                offset = 0
+
+            (fixed_id, offset) = read_fixed_id_byte_value(response_bytes, offset)
+            response_type = ds_fids[fixed_id]
+            handshake_response["Type"] = response_type
+            if response_type == "ClientConnectionResponse":
+                (
+                    handshake_response["ClientConnectionResponse"],
+                    offset,
+                ) = self.read_client_connection_response(response_bytes, offset)
+            elif response_type == "QueueConnectionResponse":
+                (
+                    handshake_response["QueueConnectionResponse"],
+                    offset,
+                ) = self.read_queue_connection_response(response_bytes, offset)
+            elif response_type == "LocatorListResponse":
+                (
+                    handshake_response["LocatorListResponse"],
+                    offset,
+                ) = self.read_locator_list_response(response_bytes, offset)
+            else:
+                pass
+                # TODO: decode other response types
+
+    def decode_server_handshake_response(self, line, handshake_response):
+        parts = []
+        self.get_server_handshake_response_parts(line, parts)
+
+        handshake_response["Timestamp"] = parts[0]
+        handshake_response["tid"] = parts[1]
+        handshake_response["Direction"] = "<---"
+        handshake_response["Type"] = "ServerHandshakeResponse"
+
+        is_client_notification = True if parts[2] == "true" else False
+        handshake_response["IsClientNotification"] = str(is_client_notification)
+
+        response_bytes = parts[3]
+        offset = 0
+        (acceptance_code, offset) = call_reader_function(
+            response_bytes, offset, read_byte_value
+        )
+        handshake_response["AcceptanceCode"] = server_handshake_reply_codes[
+            acceptance_code
+        ]
+
+        (server_queue_status, offset) = call_reader_function(
+            response_bytes, offset, read_byte_value
+        )
+        if server_queue_status == 1:
+            handshake_response["ServerQueueStatus"] = "REDUNDANT_SERVER"
+        elif server_queue_status == 2:
+            handshake_response["ServerQueueStatus"] = "PRIMARY_SERVER"
+        else:
+            handshake_response["ServerQueueStatus"] = "NON_REDUNDANT_SERVER"
+
+        (handshake_response["QueueSize"], offset) = call_reader_function(
+            response_bytes, offset, read_int_value
+        )
+
+        if not is_client_notification:
+            (receive_message_length, offset) = call_reader_function(
+                response_bytes, offset, read_int_value
+            )
+            (receive_message, offset) = read_byte_array_with_length(
+                response_bytes, offset, receive_message_length
+            )
+            handshake_response["ReceiveMessage"] = receive_message
+
+        (receive_message_length, offset) = call_reader_function(
+            response_bytes, offset, read_short_value
+        )
+        (receive_message, offset) = read_byte_array_with_length(
+            response_bytes, offset, receive_message_length
+        )
+        handshake_response["ReceiveMessage2"] = receive_message
+
+        if not is_client_notification:
+            (delta_enabled, offset) = call_reader_function(
+                response_bytes, offset, read_byte_value
+            )
+            handshake_response["DeltaEnabled"] = "True" if delta_enabled else "False"
+
     def process_line(self, line):
-        handshake = {}
-        if self.is_handshake_trace(line):
-            self.get_handshake_info(line, handshake)
+        if not self.is_candidate_line(line):
+            return
+
+        handshake = OrderedDict()
+        if self.is_locator_request(line):
+            self.decode_locator_request(line, handshake)
+            self.output_queue_.put({"handshake": handshake})
+        elif self.is_locator_response(line):
+            self.decode_locator_response(line, handshake)
+            self.output_queue_.put({"handshake": handshake})
+        elif self.is_server_handshake_request(line):
+            self.get_server_handshake_info(line, handshake)
+            self.output_queue_.put({"handshake": handshake})
+        elif self.is_server_handshake_response(line):
+            self.decode_server_handshake_response(line, handshake)
             self.output_queue_.put({"handshake": handshake})
diff --git a/packer/solaris/cleanup.sh b/tools/gnmsg/interest_policy.py
old mode 100755
new mode 100644
similarity index 86%
rename from packer/solaris/cleanup.sh
rename to tools/gnmsg/interest_policy.py
index 1213356..50fb0e4
--- a/packer/solaris/cleanup.sh
+++ b/tools/gnmsg/interest_policy.py
@@ -1,19 +1,20 @@
-#!/usr/bin/env bash
+#!/usr/local/bin/python3
 
-# 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.
-
-
-exit 0
\ No newline at end of file
+interest_policy = {
+    0: "NONE",
+    1: "KEYS",
+    2: "KEYS/VALUES",
+}
diff --git a/packer/rhel/update.sh b/tools/gnmsg/interest_type.py
similarity index 82%
copy from packer/rhel/update.sh
copy to tools/gnmsg/interest_type.py
index 819de1d..b7ce768 100644
--- a/packer/rhel/update.sh
+++ b/tools/gnmsg/interest_type.py
@@ -1,20 +1,22 @@
-#!/usr/bin/env bash
+#!/usr/local/bin/python3
 
-# 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.
-
-set -x -e -o pipefail
-
-yum update -y
+interest_type = {
+    0: "KEY",
+    1: "REGULAR_EXPRESSION",
+    2: "FILTER_CLASS",
+    3: "OQL_QUERY",
+    4: "CQ"
+}
diff --git a/tools/gnmsg/modified_utf8.py b/tools/gnmsg/modified_utf8.py
index 6fe922a..9c4cb9d 100644
--- a/tools/gnmsg/modified_utf8.py
+++ b/tools/gnmsg/modified_utf8.py
@@ -16,6 +16,7 @@
 # translated from: http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/94cc251d0c45/src/share/npt/utf.c
 # Source:  https://gist.github.com/BarelyAliveMau5/000e7e453b6d4ebd0cb06f39bc2e7aec
 
+
 def utf8s_to_utf8m(string):
     """
     :param string: utf8 encoded string
@@ -128,4 +129,4 @@
             new_string.append(byte2)
             new_string.append(byte3)
         i += 1
-    return bytes(new_string)
+    return bytes(new_string).decode("utf-8")
diff --git a/tools/gnmsg/numeric_conversion.py b/tools/gnmsg/numeric_conversion.py
index 97472a5..649cd42 100644
--- a/tools/gnmsg/numeric_conversion.py
+++ b/tools/gnmsg/numeric_conversion.py
@@ -31,3 +31,22 @@
     14: "e",
     15: "f",
 }
+
+
+def int_to_hex_string(intval):
+    byte3 = (intval & 0xFF000000) >> 24
+    byte2 = (intval & 0xFF0000) >> 16
+    byte1 = (intval & 0xFF00) >> 8
+    byte0 = intval & 0xFF
+    return (
+        decimal_string_to_hex_string(byte3)
+        + decimal_string_to_hex_string(byte2)
+        + decimal_string_to_hex_string(byte1)
+        + decimal_string_to_hex_string(byte0)
+    )
+
+
+def decimal_string_to_hex_string(byte):
+    high_nibble = int(int(byte) / 16)
+    low_nibble = int(byte) % 16
+    return to_hex_digit[high_nibble] + to_hex_digit[low_nibble]
diff --git a/tools/gnmsg/protocol_state.py b/tools/gnmsg/protocol_state.py
new file mode 100644
index 0000000..e6a72af
--- /dev/null
+++ b/tools/gnmsg/protocol_state.py
@@ -0,0 +1,32 @@
+#!/usr/local/bin/python3
+
+# 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.
+
+from message_types import message_types
+from read_values import read_int_value, read_byte_value, call_reader_function
+
+
+class ProtocolState:
+    def __init__(self):
+        self.last_client_message_ = {}
+
+    def get_last_client_message(self, thread_id):
+        result = ""
+        if thread_id in self.last_client_message_.keys():
+            result = self.last_client_message_[thread_id]
+        return result
+
+    def set_last_client_message(self, thread_id, client_message):
+        self.last_client_message_[thread_id] = client_message
diff --git a/tools/gnmsg/read_parts.py b/tools/gnmsg/read_parts.py
new file mode 100644
index 0000000..4d9d12a
--- /dev/null
+++ b/tools/gnmsg/read_parts.py
@@ -0,0 +1,53 @@
+#!/usr/local/bin/python3
+
+# 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.
+from read_values import (
+    call_reader_function,
+    parse_key_or_value,
+    read_byte_value,
+    read_cacheable,
+    read_int_value,
+    read_short_value,
+    read_unsigned_byte_value,
+    read_unsigned_vl,
+    read_string_value,
+)
+from numeric_conversion import int_to_hex_string
+
+
+def read_object_header(message_bytes, offset):
+    object_base = {}
+    (object_base["Size"], offset) = call_reader_function(
+        message_bytes, offset, read_int_value
+    )
+    (object_base["IsObject"], offset) = call_reader_function(
+        message_bytes, offset, read_byte_value
+    )
+    return object_base, offset
+
+
+def read_object_part(message_bytes, offset):
+    object_part, offset = read_object_header(message_bytes, offset)
+
+    offset += 2 * object_part["Size"]
+    return object_part, offset
+
+
+def read_int_part(message_bytes, offset):
+    int_part, offset = read_object_header(message_bytes, offset)
+
+    int_value, offset = call_reader_function(message_bytes, offset, read_int_value)
+    int_part["Value"] = int_to_hex_string(int_value)
+    return int_part, offset
diff --git a/tools/gnmsg/read_values.py b/tools/gnmsg/read_values.py
index c3bb7f7..e2e9d9a 100644
--- a/tools/gnmsg/read_values.py
+++ b/tools/gnmsg/read_values.py
@@ -14,6 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 from ds_codes import ds_codes
+from modified_utf8 import utf8m_to_utf8s
 
 
 def read_number_from_hex_string(string, offset, size):
@@ -21,13 +22,23 @@
     bits = size * 4
     if value & (1 << (bits - 1)):
         value -= 1 << bits
-    return (value, size)
+    return value, size
+
+
+def read_unsigned_number_from_hex_string(string, offset, size):
+    value = int(string[offset : offset + size], 16)
+    bits = size * 4
+    return value, size
 
 
 def read_byte_value(string, offset):
     return read_number_from_hex_string(string, offset, 2)
 
 
+def read_unsigned_byte_value(string, offset):
+    return read_unsigned_number_from_hex_string(string, offset, 2)
+
+
 def read_short_value(string, offset):
     return read_number_from_hex_string(string, offset, 4)
 
@@ -40,6 +51,67 @@
     return read_number_from_hex_string(string, offset, 16)
 
 
+def read_array_length(message_bytes, offset):
+    (byte_value, offset) = call_reader_function(message_bytes, offset, read_byte_value)
+    array_len = 0
+    if byte_value == 255:
+        raise Exception("Don't know how to handle len == -1 in serialized array!")
+    elif byte_value == 254:
+        (array_len, offset) = call_reader_function(
+            message_bytes, offset, read_short_value
+        )
+    elif byte_value == 253:
+        (array_len, offset) = call_reader_function(
+            message_bytes, offset, read_int_value
+        )
+    else:
+        array_len = byte_value
+    return array_len, offset
+
+
+def read_byte_array(string, offset):
+    (array_length, offset) = read_array_length(string, offset)
+    byte_string = ""
+    for i in range(offset, offset + (array_length * 2), 2):
+        byte_string += string[i : i + 2]
+        byte_string += " "
+    byte_string = byte_string[:-1]
+    return byte_string, offset + (array_length * 2)
+
+
+def read_byte_array_with_length(string, offset, array_length):
+    byte_string = ""
+    for i in range(offset, offset + (array_length * 2), 2):
+        byte_string += string[i : i + 2]
+        byte_string += " "
+    byte_string = byte_string[:-1]
+    return byte_string, offset + (array_length * 2)
+
+
+def read_boolean_value(message_bytes, offset):
+    (bool_val, offset) = call_reader_function(message_bytes, offset, read_byte_value)
+    bool_string = "True" if bool_val == 1 else "False"
+    return bool_string, offset
+
+
+def read_unsigned_vl(string, offset):
+    shift = 0
+    result = 0
+    cursor = offset
+
+    while shift < 64:
+        b, cursor = call_reader_function(string, cursor, read_byte_value)
+
+        result |= (b & 0x7F) << shift
+        if not (b & 0x80):
+            break
+        shift += 7
+
+    if shift >= 64:
+        raise ValueError("Malformed variable length integer")
+    return result, cursor - offset
+
+
 def read_string_value(string, length, offset):
     string_value = bytearray.fromhex(string[offset : offset + (length * 2)]).decode(
         "utf-8"
@@ -47,11 +119,76 @@
     return (string_value, offset + (length * 2))
 
 
-def read_jmutf8_string_value(string, length, offset):
-    # TODO: Read Java Modified utf-8 string from bytes.  Cheating is okay for
-    # now, cause it's super unlikely I'll hit a string where it makes a
-    # difference
-    return read_string_value(string, length, offset)
+def read_fixed_id_byte_value(string, offset):
+    (ds_code, offset) = call_reader_function(string, offset, read_byte_value)
+    if ds_codes[ds_code] == "FixedIDByte":
+        (byte_value, offset) = call_reader_function(string, offset, read_byte_value)
+    else:
+        raise TypeError("Expected DSCode 'FixedIDByte'")
+
+    return (byte_value, offset)
+
+
+def read_cacheable_string_value(string, offset):
+    (dscode, offset) = call_reader_function(string, offset, read_byte_value)
+    string_type = ds_codes[dscode]
+    if string_type == "CacheableString":
+        (string_length, offset) = call_reader_function(string, offset, read_short_value)
+        return read_geode_jmutf8_string_value(string, offset, string_length)
+    elif string_type == "CacheableStringHuge":
+        (string_length, offset) = call_reader_function(string, offset, read_int_value)
+        offset += string_length
+    else:
+        raise TypeError("Expected CacheableString or CacheableStringHuge")
+
+
+def read_cacheable_ascii_string_value(string, offset):
+    (ds_code, offset) = call_reader_function(string, offset, read_byte_value)
+    string_value = []
+    if ds_codes[ds_code] == "CacheableASCIIString":
+        (size, offset) = call_reader_function(string, offset, read_short_value)
+        for i in range(size):
+            (ascii_char, offset) = call_reader_function(string, offset, read_byte_value)
+            string_value.append(ascii_char)
+    else:
+        raise TypeError("Attempt to decode another type as CacheableASCIIString")
+
+    return (bytes(string_value).decode("ascii"), offset)
+
+
+# Decodes a hex string to JM utf-8 bytes, returns plain utf-8 string
+def read_geode_jmutf8_string_value(buffer, offset, string_length):
+    cursor = offset
+    string = []
+    bad_length = IndexError("Insufficient length for JM utf-8 string")
+
+    while cursor < offset + (string_length * 2):
+        code_point, cursor = call_reader_function(buffer, cursor, read_byte_value)
+        if code_point == 0:
+            raise TypeError("Should not encounter a 0 byte in JM utf-8")
+        elif code_point < 0x7F:  # one-byte encoding
+            string.append(code_point)
+        elif (code_point & 0xE0) == 0xC0:  # two-byte encoding
+            if cursor < string_length - 1:
+                (byte2, cursor) = call_reader_function(buffer, cursor, read_byte_value)
+                string.append(code_point)
+                string.append(byte2)
+            else:
+                raise bad_length
+        # 3-byte or 6-byte encoding.  We don't care which here, because we'll
+        # just pick up the next 3-byte encoding in the loop, and the conversion
+        # at the end will raise an exception if there's a problem.
+        elif (code_point & 0xF0) == 0xE0:
+            if cursor < string_length - 3:
+                (byte2, cursor) = call_reader_function(buffer, cursor, read_byte_value)
+                (byte3, cursor) = call_reader_function(buffer, cursor, read_byte_value)
+                string.append(code_point)
+                string.append(byte2)
+                string.append(byte3)
+            else:
+                raise bad_length
+
+    return (utf8m_to_utf8s(string), cursor)
 
 
 def call_reader_function(string, offset, fn):
@@ -79,15 +216,25 @@
             message_bytes, offset, read_byte_value
         )
         value["Value"] = "False" if bool_val == 0 else "True"
+    elif value["DSCode"] == "CacheableInt16":
+        (int_val, offset) = call_reader_function(message_bytes, offset, read_short_value)
+        value["Value"] = int_val
     elif value["DSCode"] == "CacheableInt32":
         (int_val, offset) = call_reader_function(message_bytes, offset, read_int_value)
         value["Value"] = int_val
+    elif value["DSCode"] == "CacheableInt64":
+        (int_val, offset) = call_reader_function(message_bytes, offset, read_long_value)
+        value["Value"] = int_val
     elif value["DSCode"] == "NullObj":
         # Gah!  Nasty little bug in the protocol here.  NC writes '1' in the
         # size field for a NullObj, but the payload is actually ZERO bytes,
         # and if you read 1 byte of payload like it says to you'll blow the
         # message parse.
         value["Value"] = "<<null>>"
+    elif value["DSCode"] == "PDX":
+        value["Value"] = "<<Unreadable - no type info available in gnmsg>>"
+        # This is here for completion, but not actually necessary.
+        offset = len(message_bytes)
     else:
         raise Exception("Unknown DSCode")
 
diff --git a/tools/gnmsg/server_message_decoder.py b/tools/gnmsg/server_message_decoder.py
index 5c3eab5..6b510a5 100644
--- a/tools/gnmsg/server_message_decoder.py
+++ b/tools/gnmsg/server_message_decoder.py
@@ -1,4 +1,5 @@
-#!/usr/local/bin/python3
+# get_send_trace_parts_functionsrse
+# !/usr/local/bin/python3
 
 # contributor license agreements.  See the NOTICE file distributed with
 # this work for additional information regarding copyright ownership.
@@ -21,7 +22,10 @@
 from server_messages import parse_server_message
 from decoder_base import DecoderBase
 from message_types import message_types
-from numeric_conversion import to_hex_digit
+from numeric_conversion import to_hex_digit, decimal_string_to_hex_string
+from chunked_message_decoder import ChunkedResponseDecoder
+from read_values import read_number_from_hex_string
+from gnmsg_globals import global_protocol_state
 
 
 class ServerMessageDecoder(DecoderBase):
@@ -32,65 +36,106 @@
         self.receive_trace_parts_retriever_ = None
         self.receive_trace_parser_ = None
         self.connection_states_ = {}
-        self.last_header_ = {}
+        self.headers_ = {}
         self.nc_version_ = None
-        self.get_receive_trace_parts_functions_ = {
-            "0.0.42": self.get_receive_trace_header_base,
-            "10.0.3": self.get_receive_trace_header_base,
-            "10.1.1": self.get_receive_trace_header_base,
-            "10.1.2": self.get_receive_trace_header_base,
-            "10.1.3": self.get_receive_trace_header_base,
-            "9.1.1": self.get_receive_trace_header_v911,
-        }
-        self.receive_trace_parsers_ = {
-            "0.0.42": self.parse_response_fields_base,
-            "10.0.3": self.parse_response_fields_base,
-            "10.1.1": self.parse_response_fields_base,
-            "10.1.2": self.parse_response_fields_base,
-            "10.1.3": self.parse_response_fields_base,
-            "9.1.1": self.parse_response_fields_v911,
-        }
+        self.get_receive_trace_parts_functions_ = [
+            self.get_receive_trace_header_base,
+            self.get_receive_trace_header_v911,
+        ]
+        self.receive_trace_parsers_ = [
+            self.parse_response_fields_base,
+            self.parse_response_fields_v911,
+        ]
+        self.chunk_decoders_ = {}
+        self.threads_connections_ = {}
 
-    def search_for_version(self, line):
-        if self.nc_version_ == None:
-            expression = re.compile(r"Product version:.*Native (\d+)\.(\d+)\.(\d+)-")
-            match = expression.search(line)
-            if match:
-                major = match.group(1)
-                minor = match.group(2)
-                patch = match.group(3)
-                self.nc_version_ = major + "." + minor + "." + patch
-                self.receive_trace_parts_retriever_ = self.get_receive_trace_parts_functions_[
-                    self.nc_version_
-                ]
-                self.receive_trace_parser_ = self.receive_trace_parsers_[
-                    self.nc_version_
-                ]
+        self.connection_to_tid_expression_ = re.compile(
+            r"(\d\d:\d\d:\d\d\.\d+).+:\d+\s+([\d|a-f|A-F|x|X]+).*\]\s*TcrConnection::send:\s*\[([\d|a-f|A-F|x|X]+).*sending request to endpoint.*bytes:\s*(.+)"
+        )
+
+        self.trace_header_with_pointer_expression_ = re.compile(
+            r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).+:\d+\s+([\d|a-f|A-F|x|X]+).*\]\s*TcrConnection::readMessage\(([\d|a-f|A-F|x|X]+)\):.*received header from endpoint.*bytes:\s*(.+)"
+        )
+
+        self.trace_header_without_pointer_expression_ = re.compile(
+            r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).*:\d+\s+([\d|a-f|A-F|x|X]+).*\]\s*TcrConnection::readMessage:\s*received header from endpoint.*bytes:\s*(.+)"
+        )
+
+        self.trace_header_v911_expression_ = re.compile(
+            r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).*:\d+\s+(\d+).*\]\s*TcrConnection::readMessage: received header from endpoint.*bytes:\s*([\d| ]+)"
+        )
+
+        self.receive_trace_body_expression_ = re.compile(
+            ":\d+\s+([\d|a-f|A-F|x|X]+).*\]\s*TcrConnection::readMessage: received message body from endpoint.*bytes:\s*(.+)"
+        )
+
+        self.security_trace_expression_ = re.compile(
+            r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).*:\d+\s+(\d+).*\]\s*TcrMessage::addSecurityPart\s*\[(0x[\d|a-f|A-F]*).*length\s*=\s*(\d+)\s*,\s*encrypted\s+ID\s*=\s*(.+)"
+        )
+
+        self.response_header_with_pointer_expression_ = re.compile(
+            r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).*:\d+\s+(\d+)\]\s*TcrConnection::readResponseHeader\(([0-9|a-f|A-F|x]+)\):\s*received header from endpoint\s*([\w|:|\d|\.|-]+);\s*bytes:\s*(.+)"
+        )
+
+        self.response_header_without_pointer_expression_ = re.compile(
+            r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).*:\d+\s+(\d+)\]\s*TcrConnection::readResponseHeader:\s*received header from endpoint\s*([\w|:|\d|\.|-]+);\s*bytes:\s*(.+)"
+        )
+
+        self.chunk_header_with_pointer_expression_ = re.compile(
+            r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).*:\d+\s+(\d+)\]\s*TcrConnection::readChunkHeader\(([0-9|a-f|A-F|x]+)\):\s*.*, chunkLen=(\d+), lastChunkAndSecurityFlags=([0-9|a-f|A-F|x]+)"
+        )
+
+        self.chunk_header_without_pointer_expression_ = re.compile(
+            r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).*:\d+\s+(\d+)\]\s*TcrConnection::readChunkHeader:\s*.*, chunkLen=(\d+), lastChunkAndSecurityFlags=(.+)"
+        )
+
+        self.chunk_bytes_with_pointer_expression_ = re.compile(
+            r"(\d\d:\d\d:\d\d\.\d+).*:\d+\s+(\d+)\]\s*TcrConnection::readChunkBody\(([0-9|a-f|A-F|x]+)\): \s*received chunk body from endpoint\s*([\w|:|\d|\.|-]+);\s*bytes:\s*(.+)"
+        )
+        self.chunk_bytes_without_pointer_expression_ = re.compile(
+            r"(\d\d\d\d\/\d\d\/\d\d \d\d:\d\d:\d\d\.\d+).*:\d+\s+(\d+)\]\s*TcrConnection::readChunkBody: \s*received chunk body from endpoint\s*([\w|:|\d|\.|-]+);\s*bytes:\s*(.+)"
+        )
+
+    def associate_connection_to_tid(self, line):
+        result = False
+        match = self.connection_to_tid_expression_.search(line)
+        if match:
+            tid = match.group(2)
+            connection = match.group(3)
+            self.threads_connections_[tid] = connection
+            result = True
+
+        return result
 
     def get_receive_trace_header_with_pointer(self, line, parts):
         result = False
-        expression = re.compile(
-            r"(\d\d:\d\d:\d\d\.\d+).*TcrConnection::readMessage:\s*\[([\d|a-f|A-F|x|X]+).*received header from endpoint.*bytes:\s*([\d|a-f|A-F]+)"
-        )
-        match = expression.search(line)
+        match = self.trace_header_with_pointer_expression_.search(line)
         if match:
-            parts.append(match.group(1))
-            parts.append(match.group(2))
-            parts.append(match.group(3))
+            date_time = parser.parse(match.group(1))
+            tid = match.group(2)
+            connection = match.group(3)
+            bytes = match.group(4)
+            parts.append(date_time)
+            parts.append(tid)
+            parts.append(connection)
+            parts.append(bytes)
+            self.threads_connections_[tid] = connection
             result = True
 
         return result
 
     def get_receive_trace_header_without_pointer(self, line, parts):
         result = False
-        expression = re.compile(
-            r"(\d\d:\d\d:\d\d\.\d+).*TcrConnection::readMessage:\s*received header from endpoint.*bytes:\s*([\d|a-f|A-F]+)"
-        )
-        match = expression.search(line)
+        match = self.trace_header_without_pointer_expression_.search(line)
         if match:
-            parts.append(match.group(1))
-            parts.append("0")
-            parts.append(match.group(2))
+            tid = match.group(2)
+            parts.append(parser.parse(match.group(1)))
+            parts.append(tid)
+            if tid in self.threads_connections_.keys():
+                parts.append(self.threads_connections_[tid])
+            else:
+                parts.append("0")
+            parts.append(match.group(3))
             result = True
 
         return result
@@ -104,27 +149,31 @@
 
     def get_receive_trace_header_v911(self, line, parts):
         result = False
-        expression = re.compile(
-            r"(\d\d:\d\d:\d\d\.\d+).*TcrConnection::readMessage: received header from endpoint.*bytes:\s*([\d| ]+)"
-        )
-        match = expression.search(line)
+        match = self.trace_header_v911_expression_.search(line)
         if match:
+            tid = match.group(2)
             parts.append(parser.parse(match.group(1)))
-            parts.append("0")
-            parts.append(match.group(2))
+            parts.append(parser.parse(tid))
+            if tid in self.threads_connections_.keys():
+                parts.append(self.threads_connections_[tid])
+            else:
+                parts.append("0")
+            parts.append(match.group(3))
             result = True
 
         return result
 
     def get_receive_trace_body_parts(self, line, parts):
         result = False
-        expression = re.compile(
-            "received message body from endpoint.*bytes:\s*([\d|a-f|A-F]+)"
-        )
-        match = expression.search(line)
+        match = self.receive_trace_body_expression_.search(line)
         if match:
-            message = match.group(1)
-            parts.append(message)
+            tid = match.group(1)
+            parts.append(tid)
+            if tid in self.threads_connections_.keys():
+                parts.append(self.threads_connections_[tid])
+            else:
+                parts.append("0")
+            parts.append(match.group(2))
             result = True
 
         return result
@@ -132,33 +181,124 @@
     def get_receive_trace_parts(self, line, parts):
         if self.receive_trace_parts_retriever_ is not None:
             return self.receive_trace_parts_retriever_(line, parts)
+        else:
+            for retriever in self.get_receive_trace_parts_functions_:
+                if retriever(line, parts):
+                    self.receive_trace_parts_retriever_ = retriever
+                    self.receive_trace_parser_ = self.receive_trace_parsers_[
+                        self.get_receive_trace_parts_functions_.index(retriever)
+                    ]
+                    return True
+            else:
+                return False
 
     def get_add_security_trace_parts(self, line, parts):
         result = False
-        expression = re.compile(
-            r"(\d\d:\d\d:\d\d\.\d+).*TcrMessage::addSecurityPart\s*\[(0x[\d|a-f|A-F]*).*length\s*=\s*(\d+)\s*,\s*encrypted\s+ID\s*=\s*([\d|a-f|A-F]+)"
-        )
-        match = expression.search(line)
+        match = self.security_trace_expression_.search(line)
         if match:
             parts.append(parser.parse(match.group(1)))
             parts.append(match.group(2))
             parts.append(match.group(3))
             parts.append(match.group(4))
+            parts.append(match.group(5))
             result = True
 
         return result
 
-    def decimal_string_to_hex_string(self, byte):
-        high_nibble = int(int(byte) / 16)
-        low_nibble = int(byte) % 16
-        return to_hex_digit[high_nibble] + to_hex_digit[low_nibble]
+    def get_response_header(self, line, parts):
+        # Check if this is a header for a chunked message
+        result = False
+
+        match = self.response_header_with_pointer_expression_.search(line)
+        if match:
+            tid = match.group(2)
+            connection = match.group(3)
+            self.threads_connections_[tid] = connection
+            parts.append(parser.parse(match.group(1)))
+            parts.append(tid)
+            parts.append(connection)
+            parts.append(match.group(4))
+            parts.append(match.group(5))
+            result = True
+
+        if not result:
+            match = self.response_header_without_pointer_expression_.search(line)
+            if match:
+                parts.append(parser.parse(match.group(1)))
+                parts.append(match.group(2))
+                parts.append("")
+                parts.append(match.group(3))
+                parts.append(match.group(4))
+                result = True
+
+        return result
+
+    def get_chunk_header(self, line, parts):
+        # Check if this is a header for a chunked message
+        result = False
+        match = self.chunk_header_with_pointer_expression_.search(line)
+        if match:
+            tid = match.group(2)
+            connection = match.group(3)
+            self.threads_connections_[tid] = connection
+            parts.append(parser.parse(match.group(1)))
+            parts.append(tid)
+            parts.append(connection)
+            parts.append(match.group(4))
+            parts.append(match.group(5))
+            result = True
+
+        if not result:
+            match = self.chunk_header_without_pointer_expression_.search(line)
+            if match:
+                parts.append(parser.parse(match.group(1)))
+                tid = match.group(2)
+                parts.append(tid)
+                if tid in self.threads_connections_.keys():
+                    parts.append(self.threads_connections_[tid])
+                else:
+                    parts.append("0")
+                parts.append(match.group(3))
+                parts.append(match.group(4))
+                result = True
+
+        return result
+
+    def get_chunk_bytes(self, line, parts):
+        # Check if this is a message chunk.
+        # If it is, add it to the chunked decoder
+        result = False
+        match = self.chunk_bytes_with_pointer_expression_.search(line)
+        if match:
+            parts.append(parser.parse(match.group(1)))
+            parts.append(match.group(2))
+            parts.append(match.group(3))
+            parts.append(match.group(4))
+            parts.append(match.group(5))
+            result = True
+
+        if not result:
+            match = self.chunk_bytes_without_pointer_expression_.search(line)
+            if match:
+                parts.append(parser.parse(match.group(1)))
+                tid = match.group(2)
+                parts.append(tid)
+                if tid in self.threads_connections_.keys():
+                    parts.append(self.threads_connections_[tid])
+                else:
+                    parts.append("0")
+                parts.append(match.group(3))
+                parts.append(match.group(4))
+                result = True
+
+        return result
 
     def format_bytes_as_hex_v911(self, message_bytes):
         byte_list = message_bytes.split(" ")
         hex_string = ""
         for byte in byte_list:
             if byte:
-                hex_string += self.decimal_string_to_hex_string(byte)
+                hex_string += decimal_string_to_hex_string(byte)
         return hex_string
 
     def parse_response_fields_base(self, message_bytes):
@@ -198,49 +338,93 @@
         if self.receive_trace_parser_ is not None:
             return self.receive_trace_parser_(message_bytes)
 
+    def is_candidate_line(self, line):
+        return "TcrMess" in line or "TcrConn" in line
+
     def process_line(self, line):
         connection = None
         message_bytes = None
         message_body = None
+        chunk_bytes = None
+        tid = None
 
-        self.search_for_version(line)
+        if not self.is_candidate_line(line):
+            return
 
         parts = []
-        if self.get_receive_trace_parts(line, parts):
-            (
-                self.last_header_["Timestamp"],
-                self.last_header_["Connection"],
-                message_bytes,
-            ) = parts
+        if self.associate_connection_to_tid(line):
+            pass
+        elif self.get_receive_trace_parts(line, parts):
+            tid = parts[1]
+            last_header = {"Timestamp": parts[0], "tid": tid, "Connection": parts[2]}
+            message_bytes = parts[3]
+            self.headers_[tid] = last_header
+            if (
+                tid in self.connection_states_.keys()
+                and self.connection_states_[tid] != self.STATE_NEUTRAL_
+            ):
+                print("WARNING: Multiple headers rec'd without a message body.")
+            self.connection_states_[tid] = self.STATE_NEUTRAL_
         elif self.get_receive_trace_body_parts(line, parts):
-            message_body = parts[0]
-        elif self.get_add_security_trace_parts(line, parts):
+            tid = parts[0]
             connection = parts[1]
+            message_body = parts[2]
+        elif self.get_add_security_trace_parts(line, parts):
+            tid = parts[1]
+            connection = parts[2]
+        elif self.get_response_header(line, parts):
+            tid = parts[1]
+            connection = parts[2]
+            if tid in self.chunk_decoders_.keys():
+                self.chunk_decoders_[tid].add_header(parts[2], parts[4])
+            else:
+                self.chunk_decoders_[tid] = ChunkedResponseDecoder()
+                self.chunk_decoders_[tid].add_header(parts[2], parts[4])
+
+            if self.chunk_decoders_[tid].is_complete_message():
+                receive_trace = self.chunk_decoders_[tid].get_decoded_message(parts[0])
+                receive_trace["tid"] = str(tid)
+                self.output_queue_.put({"message": receive_trace})
+                self.chunk_decoders_[tid].reset()
+        elif self.get_chunk_header(line, parts):
+            flags = 0xFF
+            size = 0
+            tid = parts[1]
+            (flags, size) = read_number_from_hex_string(parts[4], 2, len(parts[4]) - 2)
+            if tid in self.chunk_decoders_.keys():
+                self.chunk_decoders_[tid].add_chunk_header(int(parts[3]), flags)
+                if self.chunk_decoders_[tid].is_complete_message():
+                    receive_trace = self.chunk_decoders_[tid].get_decoded_message(
+                        parts[0]
+                    )
+                    receive_trace["tid"] = str(tid)
+                    self.output_queue_.put({"message": receive_trace})
+                    self.chunk_decoders_[tid].reset()
         else:
             return
 
-        if connection not in self.connection_states_:
-            self.connection_states_[connection] = self.STATE_NEUTRAL_
+        if tid not in self.connection_states_:
+            self.connection_states_[tid] = self.STATE_NEUTRAL_
 
-        if self.connection_states_[connection] == self.STATE_NEUTRAL_:
+        if self.connection_states_[tid] == self.STATE_NEUTRAL_:
             if message_bytes:
-                self.last_header_["Direction"] = "<---"
+
+                last_header = self.headers_[tid]
+                last_header["Direction"] = "<---"
                 (
-                    self.last_header_["Type"],
-                    self.last_header_["Length"],
-                    self.last_header_["Parts"],
-                    self.last_header_["TransactionId"],
-                    self.last_header_["SecurityFlag"],
+                    last_header["Type"],
+                    last_header["Length"],
+                    last_header["Parts"],
+                    last_header["TransactionId"],
+                    last_header["SecurityFlag"],
                 ) = self.parse_response_fields(message_bytes)
-                self.connection_states_[
-                    connection
-                ] = self.STATE_WAITING_FOR_MESSAGE_BODY_
-        elif (
-            self.connection_states_[connection] == self.STATE_WAITING_FOR_MESSAGE_BODY_
-        ):
+                self.headers_[tid] = last_header
+
+                self.connection_states_[tid] = self.STATE_WAITING_FOR_MESSAGE_BODY_
+        elif self.connection_states_[tid] == self.STATE_WAITING_FOR_MESSAGE_BODY_:
             if message_body:
-                receive_trace = self.last_header_
-                self.last_header_ = {}
+                receive_trace = self.headers_[tid]
+                self.headers_[tid] = None
                 parse_server_message(receive_trace, message_body)
-                self.connection_states_[connection] = self.STATE_NEUTRAL_
+                self.connection_states_[tid] = self.STATE_NEUTRAL_
                 self.output_queue_.put({"message": receive_trace})
diff --git a/tools/gnmsg/server_messages.py b/tools/gnmsg/server_messages.py
index b0a4758..a4616ae 100644
--- a/tools/gnmsg/server_messages.py
+++ b/tools/gnmsg/server_messages.py
@@ -15,11 +15,32 @@
 # limitations under the License.
 from read_values import (
     call_reader_function,
-    read_int_value,
+    parse_key_or_value,
     read_byte_value,
     read_cacheable,
-    parse_key_or_value,
+    read_int_value,
+    read_short_value,
+    read_unsigned_byte_value,
+    read_unsigned_vl,
+    read_string_value,
 )
+from read_parts import read_object_header, read_object_part, read_int_part
+from numeric_conversion import decimal_string_to_hex_string, int_to_hex_string
+from gnmsg_globals import global_protocol_state
+from enum import IntFlag
+
+
+class VersionTagFlags(IntFlag):
+    HAS_MEMBER_ID = 1
+    HAS_PREVIOUS_MEMBER_ID = 2
+    VERSION_TWO_BYTES = 4
+    DUPLICATE_MEMBER_IDS = 8
+    HAS_RVV_HIGH_BYTE = 16
+
+
+class DestroyReplyFlags(IntFlag):
+    HAS_VERSION_TAG = 1
+    HAS_ENTRY_NOT_FOUND_PART = 2
 
 
 def read_bucket_count(message_bytes, offset):
@@ -32,18 +53,22 @@
     )
     (object_part["Data"], offset) = read_cacheable(message_bytes, offset)
 
-    return (object_part, offset)
+    return object_part, offset
 
 
 def read_partition_attributes(properties, message_bytes, offset):
     (properties["BucketCount"], offset) = read_bucket_count(message_bytes, offset)
     (properties["ColocatedWith"], offset) = parse_key_or_value(message_bytes, offset)
     if properties["Parts"] == 4:
-        (properties["PartitionResolverName"], offset) = parse_key_or_value(message_bytes, offset)
+        (properties["PartitionResolverName"], offset) = parse_key_or_value(
+            message_bytes, offset
+        )
         # TODO: parse part 4 (list of partition attributes)
     elif properties["Parts"] == 3:
         try:
-            (properties["PartitionResolverName"], offset) = parse_key_or_value(message_bytes, offset)
+            (properties["PartitionResolverName"], offset) = parse_key_or_value(
+                message_bytes, offset
+            )
         except:
             raise Exception(
                 "Don't know how to parse a RESPONSE_CLIENT_PARTITION_ATTRIBUTES message with "
@@ -52,7 +77,192 @@
         # TODO: parse part 3 if it is not partition resolver but list of partition attributes
 
 
+def read_bytes_part(message_bytes, offset):
+    bytes_part, offset = read_object_header(message_bytes, offset)
+
+    bytes_string = ""
+    for i in range(bytes_part["Size"]):
+        if i:
+            bytes_string += " "
+        byte_val, offset = call_reader_function(message_bytes, offset, read_byte_value)
+        bytes_string += decimal_string_to_hex_string(str(byte_val))
+    bytes_part["Bytes"] = bytes_string
+    return bytes_part, offset
+
+
+def read_old_value_part(message_bytes, offset):
+    old_value_part, offset = read_object_header(message_bytes, offset)
+
+    bytes_string = ""
+    for i in range(old_value_part["Size"]):
+        if i:
+            bytes_string += " "
+        byte_val, offset = call_reader_function(
+            message_bytes, offset, read_unsigned_byte_value
+        )
+        bytes_string += decimal_string_to_hex_string(str(byte_val))
+    old_value_part["Bytes"] = bytes_string
+    return old_value_part, offset
+
+
+def read_put_reply(properties, message_bytes, offset):
+    (properties["Bytes"], offset) = read_bytes_part(message_bytes, offset)
+    (properties["Flags"], offset) = read_int_part(message_bytes, offset)
+    if properties["Parts"] >= 3:
+        (properties["OldValue"], offset) = read_old_value_part(message_bytes, offset)
+        if properties["Parts"] == 4:
+            (properties["VersionTag"], offset) = read_object_part(message_bytes, offset)
+
+
+def read_contains_key_response(properties, message_bytes, offset):
+    properties["Response"] = parse_key_or_value(message_bytes, offset)
+    return properties, offset
+
+
+def read_flags_part(message_bytes, offset):
+    flags_part, offset = read_object_header(message_bytes, offset)
+    int_value, offset = call_reader_function(message_bytes, offset, read_int_value)
+
+    flags_part["Flags"] = int_to_hex_string(int_value) + " ("
+    if int_value & DestroyReplyFlags.HAS_VERSION_TAG:
+        flags_part["Flags"] += "HAS_VERSION_TAG"
+    if int_value & DestroyReplyFlags.HAS_ENTRY_NOT_FOUND_PART:
+        flags_part["Flags"] += " | HAS_ENTRY_NOT_FOUND_PART"
+    flags_part["Flags"] += ")"
+
+    return flags_part, offset, int_value
+
+
+def version_flags_to_string(version_flags):
+    version_flags_string = "("
+    if version_flags & VersionTagFlags.HAS_MEMBER_ID:
+        version_flags_string += "HAS_MEMBER_ID"
+    if version_flags & VersionTagFlags.HAS_PREVIOUS_MEMBER_ID:
+        version_flags_string += "| " if version_flags_string == ")" else ""
+        version_flags_string += "HAS_PREVIOUS_MEMBER_ID"
+    if version_flags & VersionTagFlags.VERSION_TWO_BYTES:
+        version_flags_string += "| " if version_flags_string == ")" else ""
+        version_flags_string += "VERSION_TWO_BYTES"
+    if version_flags & VersionTagFlags.DUPLICATE_MEMBER_IDS:
+        version_flags_string += "| " if version_flags_string == ")" else ""
+        version_flags_string += "DUPLICATE_MEMBER_IDS"
+    if version_flags & VersionTagFlags.HAS_RVV_HIGH_BYTE:
+        version_flags_string += "| " if version_flags_string == ")" else ""
+        version_flags_string += "HAS_RVV_HIGH_BYTE"
+    version_flags_string += ")"
+    return version_flags_string
+
+
+def read_version_tag_part(message_bytes, offset):
+    version_tag_part, offset = read_object_header(message_bytes, offset)
+    cursor = offset
+    version_flags, cursor = call_reader_function(
+        message_bytes, cursor, read_short_value
+    )
+
+    version_tag_part["Flags"] = version_flags_to_string(version_flags)
+
+    entry_version = 0
+    if version_flags & VersionTagFlags.VERSION_TWO_BYTES:
+        entry_version, cursor = call_reader_function(
+            message_bytes, cursor, read_short_value
+        )
+    else:
+        entry_version, cursor = call_reader_function(
+            message_bytes, cursor, read_int_value
+        )
+    version_tag_part["EntryVersion"] = int_to_hex_string(entry_version)
+
+    if version_flags & VersionTagFlags.HAS_RVV_HIGH_BYTE:
+        region_version_high_bytes, cursor = call_reader_function(
+            message_bytes, cursor, read_short_value
+        )
+        version_tag_part["RegionVersionHighBytes"] = int_to_hex_string(
+            region_version_high_bytes
+        )
+
+    region_version_low_bytes, cursor = call_reader_function(
+        message_bytes, cursor, read_int_value
+    )
+
+    timestamp, cursor = call_reader_function(message_bytes, cursor, read_unsigned_vl)
+    version_tag_part["Timestamp"] = int_to_hex_string(timestamp)
+
+    version_tag_part["RegionVersionLowBytes"] = int_to_hex_string(
+        region_version_low_bytes
+    )
+
+    bytes_string = ""
+    for i in range(0, offset + 2 * version_tag_part["Size"] - cursor, 2):
+        if i:
+            bytes_string += " "
+        byte_val, cursor = call_reader_function(
+            message_bytes, cursor, read_unsigned_byte_value
+        )
+        bytes_string += decimal_string_to_hex_string(str(byte_val))
+    version_tag_part[
+        "Un-decodable part (member id, [previous member id])"
+    ] = bytes_string
+
+    return version_tag_part, offset + 2 * version_tag_part["Size"]
+
+
+def read_bytes_part(message_bytes, offset):
+    bytes_part, offset = read_object_header(message_bytes, offset)
+    cursor = offset
+    bytes_string = ""
+    for i in range(0, offset + 2 * bytes_part["Size"] - cursor, 2):
+        if i:
+            bytes_string += " "
+        byte_val, cursor = call_reader_function(
+            message_bytes, cursor, read_unsigned_byte_value
+        )
+        bytes_string += decimal_string_to_hex_string(str(byte_val))
+    bytes_part["Bytes"] = bytes_string
+    return bytes_part, cursor
+
+
+def read_entry_not_found_part(message_bytes, offset):
+    entry_not_found_part, offset = read_object_header(message_bytes, offset)
+    int_value, offset = call_reader_function(message_bytes, offset, read_int_value)
+    entry_not_found_part["EntryNotFound"] = "true" if int_value == 1 else "false"
+    return entry_not_found_part, offset
+
+
+def read_destroy_reply(properties, message_bytes, offset):
+    (
+        properties["Flags"],
+        offset,
+        flags,
+    ) = read_flags_part(message_bytes, offset)
+
+    if flags & DestroyReplyFlags.HAS_VERSION_TAG:
+        properties["VersionTag"], offset = read_version_tag_part(message_bytes, offset)
+
+    properties["OkBytes"], offset = read_bytes_part(message_bytes, offset)
+
+    if flags & DestroyReplyFlags.HAS_ENTRY_NOT_FOUND_PART:
+        properties["EntryNotFoundPart"], offset = read_entry_not_found_part(
+            message_bytes, offset
+        )
+
+
+def read_exception_msg(properties, message_bytes, offset):
+    (properties["SerializedJavaObjectPart"], offset) = read_object_part(
+        message_bytes, offset
+    )
+    object_part, offset = read_object_header(message_bytes, offset)
+    (object_part["ExceptionMessageAndCallstack"], offset) = read_string_value(
+        message_bytes, object_part["Size"], offset
+    )
+    properties["StringRepresentationPart"] = object_part
+
+
 server_message_parsers = {
+    "CONTAINS_KEY_RESPONSE": read_contains_key_response,
+    "DESTROY_REPLY": read_destroy_reply,
+    "EXCEPTION": read_exception_msg,
+    "PUT_REPLY": read_put_reply,
     "RESPONSE_CLIENT_PARTITION_ATTRIBUTES": read_partition_attributes,
 }
 
@@ -61,3 +271,11 @@
     offset = 0
     if properties["Type"] in server_message_parsers.keys():
         server_message_parsers[properties["Type"]](properties, message_bytes, offset)
+    else:
+        key = (
+            global_protocol_state.get_last_client_message(properties["tid"])
+            + "_"
+            + properties["Type"]
+        )
+        if key in server_message_parsers.keys():
+            server_message_parsers[key](properties, message_bytes, offset)