geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From echobr...@apache.org
Subject [04/27] geode-native git commit: GEODE-2729: Remove global variables
Date Thu, 10 Aug 2017 15:20:12 GMT
http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/cppcache/test/DataOutputTest.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/test/DataOutputTest.cpp b/src/cppcache/test/DataOutputTest.cpp
index a3af420..48a8936 100644
--- a/src/cppcache/test/DataOutputTest.cpp
+++ b/src/cppcache/test/DataOutputTest.cpp
@@ -22,13 +22,19 @@
 #include <gtest/gtest.h>
 
 #include <geode/DataOutput.hpp>
+#include <geode/CacheFactory.hpp>
 #include "ByteArrayFixture.hpp"
+#include "DataOutputInternal.hpp"
+#include "SerializationRegistry.hpp"
+
+namespace {
 
 using namespace apache::geode::client;
 
-class TestDataOutput : public DataOutput {
+class TestDataOutput : public DataOutputInternal {
  public:
-  TestDataOutput() : m_byteArray(nullptr) {
+  TestDataOutput(Cache* cache)
+      : DataOutputInternal(cache), m_byteArray(nullptr), m_serializationRegistry() {
     // NOP
   }
 
@@ -44,8 +50,15 @@ class TestDataOutput : public DataOutput {
     return *m_byteArray;
   }
 
+ protected:
+  virtual const SerializationRegistry& getSerializationRegistry()
+      const override {
+    return m_serializationRegistry;
+  }
+
  private:
   mutable ByteArray* m_byteArray;
+  SerializationRegistry m_serializationRegistry;
 };
 
 class DataOutputTest : public ::testing::Test, public ByteArrayFixture {
@@ -77,21 +90,21 @@ class DataOutputTest : public ::testing::Test, public ByteArrayFixture {
 };
 
 TEST_F(DataOutputTest, TestWriteUint8) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.write(static_cast<uint8_t>(55U));
   dataOutput.write(static_cast<uint8_t>(66U));
   EXPECT_BYTEARRAY_EQ("3742", dataOutput.getByteArray());
 }
 
 TEST_F(DataOutputTest, TestWriteInt8) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.write(static_cast<int8_t>(66));
   dataOutput.write(static_cast<int8_t>(55));
   EXPECT_BYTEARRAY_EQ("4237", dataOutput.getByteArray());
 }
 
 TEST_F(DataOutputTest, TestWriteSequenceNumber) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.writeInt((int32_t)55);
   dataOutput.writeInt((int32_t)17);
   dataOutput.writeInt((int32_t)0);
@@ -102,7 +115,7 @@ TEST_F(DataOutputTest, TestWriteSequenceNumber) {
 }
 
 TEST_F(DataOutputTest, TestWriteBoolean) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.writeBoolean(true);
   dataOutput.writeBoolean(false);
   EXPECT_BYTEARRAY_EQ("0100", dataOutput.getByteArray());
@@ -111,7 +124,7 @@ TEST_F(DataOutputTest, TestWriteBoolean) {
 TEST_F(DataOutputTest, TestWriteBytesSigned) {
   int8_t bytes[] = {0, 1, 2, 3, 4, 5, -4, -3, -2, -1, 0};
 
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.writeBytes(bytes, 11);
   EXPECT_BYTEARRAY_EQ("0B000102030405FCFDFEFF00", dataOutput.getByteArray());
 }
@@ -119,7 +132,7 @@ TEST_F(DataOutputTest, TestWriteBytesSigned) {
 TEST_F(DataOutputTest, TestWriteBytesOnlyUnsigned) {
   uint8_t bytes[] = {0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0};
 
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.writeBytesOnly(bytes, 11);
   EXPECT_BYTEARRAY_EQ("0001020304050403020100", dataOutput.getByteArray());
 }
@@ -127,13 +140,13 @@ TEST_F(DataOutputTest, TestWriteBytesOnlyUnsigned) {
 TEST_F(DataOutputTest, TestWriteBytesOnlySigned) {
   int8_t bytes[] = {0, 1, 2, 3, 4, 5, -4, -3, -2, -1, 0};
 
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.writeBytesOnly(bytes, 11);
   EXPECT_BYTEARRAY_EQ("000102030405FCFDFEFF00", dataOutput.getByteArray());
 }
 
 TEST_F(DataOutputTest, TestWriteIntUInt16) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.writeInt(static_cast<uint16_t>(66));
   dataOutput.writeInt(static_cast<uint16_t>(55));
   dataOutput.writeInt(static_cast<uint16_t>(3333));
@@ -141,7 +154,7 @@ TEST_F(DataOutputTest, TestWriteIntUInt16) {
 }
 
 TEST_F(DataOutputTest, TestWriteCharUInt16) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.writeChar(static_cast<uint16_t>(66));
   dataOutput.writeChar(static_cast<uint16_t>(55));
   dataOutput.writeChar(static_cast<uint16_t>(3333));
@@ -149,20 +162,20 @@ TEST_F(DataOutputTest, TestWriteCharUInt16) {
 }
 
 TEST_F(DataOutputTest, TestWriteIntUInt32) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.writeInt(static_cast<uint32_t>(3435973836));
   EXPECT_BYTEARRAY_EQ("CCCCCCCC", dataOutput.getByteArray());
 }
 
 TEST_F(DataOutputTest, TestWriteIntUInt64) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   uint64_t big = 13455272147882261178U;
   dataOutput.writeInt(big);
   EXPECT_BYTEARRAY_EQ("BABABABABABABABA", dataOutput.getByteArray());
 }
 
 TEST_F(DataOutputTest, TestWriteIntInt16) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.writeInt(static_cast<int16_t>(66));
   dataOutput.writeInt(static_cast<int16_t>(55));
   dataOutput.writeInt(static_cast<int16_t>(3333));
@@ -170,40 +183,40 @@ TEST_F(DataOutputTest, TestWriteIntInt16) {
 }
 
 TEST_F(DataOutputTest, TestWriteIntInt32) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.writeInt(static_cast<int32_t>(3435973836));
   EXPECT_BYTEARRAY_EQ("CCCCCCCC", dataOutput.getByteArray());
 }
 
 TEST_F(DataOutputTest, TestWriteIntInt64) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   int64_t big = 773738426788457421;
   dataOutput.writeInt(big);
   EXPECT_BYTEARRAY_EQ("0ABCDEFFEDCBABCD", dataOutput.getByteArray());
 }
 
 TEST_F(DataOutputTest, TestWriteArrayLength) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.writeArrayLen(static_cast<int32_t>(3435973836));
   EXPECT_BYTEARRAY_EQ("CC", dataOutput.getByteArray());
 }
 
 TEST_F(DataOutputTest, TestWriteFloat) {
-  TestDataOutput dataOutput;
-  float pi = 3.14;
+  TestDataOutput dataOutput(nullptr);
+  float pi = 3.14f;
   dataOutput.writeFloat(pi);
   EXPECT_BYTEARRAY_EQ("4048F5C3", dataOutput.getByteArray());
 }
 
 TEST_F(DataOutputTest, TestWriteDouble) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   double pi = 3.14159265359;
   dataOutput.writeDouble(pi);
   EXPECT_BYTEARRAY_EQ("400921FB54442EEA", dataOutput.getByteArray());
 }
 
 TEST_F(DataOutputTest, TestWriteASCII) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.writeASCII("You had me at meat tornado.");
   EXPECT_BYTEARRAY_EQ(
       "001B596F7520686164206D65206174206D65617420746F726E61646F2E",
@@ -211,7 +224,7 @@ TEST_F(DataOutputTest, TestWriteASCII) {
 }
 
 TEST_F(DataOutputTest, TestWriteNativeString) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.writeNativeString("You had me at meat tornado.");
   EXPECT_BYTEARRAY_EQ(
       "57001B596F7520686164206D65206174206D65617420746F726E61646F2E",
@@ -219,7 +232,7 @@ TEST_F(DataOutputTest, TestWriteNativeString) {
 }
 
 TEST_F(DataOutputTest, TestWriteASCIIHuge) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.writeASCIIHuge("You had me at meat tornado.");
   EXPECT_BYTEARRAY_EQ(
       "0000001B596F7520686164206D65206174206D65617420746F726E61646F2E",
@@ -227,7 +240,7 @@ TEST_F(DataOutputTest, TestWriteASCIIHuge) {
 }
 
 TEST_F(DataOutputTest, TestWriteFullUTF) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.writeFullUTF("You had me at meat tornado.");
   EXPECT_BYTEARRAY_EQ(
       "0000001B00596F7520686164206D65206174206D65617420746F726E61646F2E",
@@ -235,7 +248,7 @@ TEST_F(DataOutputTest, TestWriteFullUTF) {
 }
 
 TEST_F(DataOutputTest, TestWriteUTF) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.writeUTF("You had me at meat tornado.");
   EXPECT_BYTEARRAY_EQ(
       "001B596F7520686164206D65206174206D65617420746F726E61646F2E",
@@ -243,7 +256,7 @@ TEST_F(DataOutputTest, TestWriteUTF) {
 }
 
 TEST_F(DataOutputTest, TestWriteUTFHuge) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.writeUTFHuge("You had me at meat tornado.");
   EXPECT_BYTEARRAY_EQ(
       "0000001B0059006F007500200068006100640020006D00650020006100740020006D0065"
@@ -252,7 +265,7 @@ TEST_F(DataOutputTest, TestWriteUTFHuge) {
 }
 
 TEST_F(DataOutputTest, TestWriteUTFWide) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.writeUTF(L"You had me at meat tornado!");
   EXPECT_BYTEARRAY_EQ(
       "001B596F7520686164206D65206174206D65617420746F726E61646F21",
@@ -260,7 +273,7 @@ TEST_F(DataOutputTest, TestWriteUTFWide) {
 }
 
 TEST_F(DataOutputTest, TestWriteUTFHugeWide) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.writeUTFHuge(L"You had me at meat tornado.");
   EXPECT_BYTEARRAY_EQ(
       "0000001B0059006F007500200068006100640020006D00650020006100740020006D0065"
@@ -269,17 +282,17 @@ TEST_F(DataOutputTest, TestWriteUTFHugeWide) {
 }
 
 TEST_F(DataOutputTest, TestEncodedLength) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   EXPECT_EQ(27, dataOutput.getEncodedLength("You had me at meat tornado!"));
 }
 
 TEST_F(DataOutputTest, TestEncodedLengthWide) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   EXPECT_EQ(27, dataOutput.getEncodedLength(L"You had me at meat tornado."));
 }
 
 TEST_F(DataOutputTest, TestWriteObjectSharedPtr) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   std::shared_ptr<CacheableString> objptr =
       CacheableString::create("You had me at meat tornado.");
   dataOutput.writeObject(objptr);
@@ -289,7 +302,7 @@ TEST_F(DataOutputTest, TestWriteObjectSharedPtr) {
 }
 
 TEST_F(DataOutputTest, TestWriteObjectCacheableString) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   CacheableStringPtr objptr =
       CacheableString::create("You had me at meat tornado.");
   dataOutput.writeObject(objptr);
@@ -299,7 +312,7 @@ TEST_F(DataOutputTest, TestWriteObjectCacheableString) {
 }
 
 TEST_F(DataOutputTest, TestCursorAdvance) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.writeUTF("You had me at meat tornado.");
   EXPECT_BYTEARRAY_EQ(
       "001B596F7520686164206D65206174206D65617420746F726E61646F2E",
@@ -312,7 +325,7 @@ TEST_F(DataOutputTest, TestCursorAdvance) {
 }
 
 TEST_F(DataOutputTest, TestCursorNegativeAdvance) {
-  TestDataOutput dataOutput;
+  TestDataOutput dataOutput(nullptr);
   dataOutput.writeUTF("You had me at meat tornado.");
   EXPECT_BYTEARRAY_EQ(
       "001B596F7520686164206D65206174206D65617420746F726E61646F2E",
@@ -323,3 +336,5 @@ TEST_F(DataOutputTest, TestCursorNegativeAdvance) {
   EXPECT_EQ((originalLength - 2), dataOutput.getBufferLength())
       << "Correct length after negative advance";
 }
+
+}  // namespace

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/cppcache/test/PdxLocalReaderTest.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/test/PdxLocalReaderTest.cpp b/src/cppcache/test/PdxLocalReaderTest.cpp
index a424000..5852562 100644
--- a/src/cppcache/test/PdxLocalReaderTest.cpp
+++ b/src/cppcache/test/PdxLocalReaderTest.cpp
@@ -17,10 +17,14 @@
 
 #include <gtest/gtest.h>
 
+#include <geode/CacheFactory.hpp>
 #include <PdxType.hpp>
 #include <PdxLocalReader.hpp>
 #include <PdxLocalWriter.hpp>
 #include <PdxTypeRegistry.hpp>
+#include "CacheRegionHelper.hpp"
+#include "DataInputInternal.hpp"
+#include "DataOutputInternal.hpp"
 
 using namespace apache::geode::client;
 
@@ -59,31 +63,47 @@ const char *MyPdxClass::getClassName() const { return "MyPdxClass"; }
 
 PdxSerializable *MyPdxClass::CreateDeserializable() { return new MyPdxClass(); }
 
-TEST(PdxLocalReaderTest, x) {
+class DISABLED_PdxLocalReaderTest : public ::testing::Test {
+ public:
+  void SetUp() {
+    auto factory = CacheFactory::createCacheFactory();
+    cache = factory->create();
+  }
+
+ protected:
+  CachePtr cache;
+};
+
+TEST_F(DISABLED_PdxLocalReaderTest, testSerializationOfPdxType) {
   MyPdxClass expected, actual;
-  DataOutput stream;
+  DataOutputInternal stream(cache.get());
   int length = 0;
 
   expected.setAString("the_expected_string");
 
+  // TODO: Refactor static singleton patterns in PdxTypeRegistry so that
+  // tests will not interfere with each other.
+
+  auto pdxTypeRegistry =
+      CacheRegionHelper::getCacheImpl(cache.get())->getPdxTypeRegistry();
+
   // C++ Client does not require pdxDomainClassName as it is only needed
   // for reflection purposes, which we do not support in C++. We pass in
   // getClassName() for consistency reasons only.
-  auto pdx_type_ptr = std::make_shared<PdxType>(expected.getClassName(), false);
-
-  // TODO: Refactor static singleton patterns in PdxTypeRegistry so that
-  // tests will not interfere with each other.
-  PdxTypeRegistry::init();
+  auto pdx_type_ptr = std::make_shared<PdxType>(pdxTypeRegistry,
+                                                expected.getClassName(), false);
 
   // Here we construct a serialized stream of bytes representing MyPdxClass.
   // The stream is later deserialization and validated for consistency.
-  auto writer = std::make_shared<PdxLocalWriter>(stream, pdx_type_ptr);
+  auto writer =
+      std::make_shared<PdxLocalWriter>(stream, pdx_type_ptr, pdxTypeRegistry);
   expected.toData(writer);
   writer->endObjectWriting();
   uint8_t *raw_stream = writer->getPdxStream(length);
 
-  DataInput input(raw_stream, length);
-  auto reader = std::make_shared<PdxLocalReader>(input, pdx_type_ptr, length);
+  DataInputInternal input(raw_stream, length, cache.get());
+  auto reader = std::make_shared<PdxLocalReader>(input, pdx_type_ptr, length,
+                                                 pdxTypeRegistry);
 
   actual.fromData(reader);
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/cppcache/test/TcrMessage_unittest.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/test/TcrMessage_unittest.cpp b/src/cppcache/test/TcrMessage_unittest.cpp
index d58a6af..87f6c17 100644
--- a/src/cppcache/test/TcrMessage_unittest.cpp
+++ b/src/cppcache/test/TcrMessage_unittest.cpp
@@ -20,11 +20,28 @@
 #include "gtest/gtest.h"
 
 #include <geode/CqState.hpp>
+#include <geode/CacheFactory.hpp>
 #include <TcrMessage.hpp>
 #include "ByteArrayFixture.hpp"
 
+namespace {
+
 using namespace apache::geode::client;
 
+class DataOutputUnderTest : public DataOutput {
+ public:
+  using DataOutput::DataOutput;
+
+ protected:
+  virtual const SerializationRegistry &getSerializationRegistry()
+      const override {
+    return m_serializationRegistry;
+  }
+
+ private:
+  SerializationRegistry m_serializationRegistry;
+};
+
 #define EXPECT_MESSAGE_EQ(e, a) EXPECT_PRED_FORMAT2(assertMessageEqual, e, a)
 
 class TcrMessageTest : public ::testing::Test, protected ByteArrayFixture {
@@ -52,8 +69,9 @@ TEST_F(TcrMessageTest, testConstructor1MessageDataContentWithDESTROY_REGION) {
   int messageResponseTimeout = 1000;
   ThinClientBaseDM *connectionDM = nullptr;
 
-  TcrMessageDestroyRegion message(region, aCallbackArgument,
-                                  messageResponseTimeout, connectionDM);
+  TcrMessageDestroyRegion message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()), region,
+      aCallbackArgument, messageResponseTimeout, connectionDM);
 
   EXPECT_EQ(TcrMessage::DESTROY_REGION, message.getMessageType());
 
@@ -70,8 +88,9 @@ TEST_F(TcrMessageTest, testConstructor1MessageDataContentWithCLEAR_REGION) {
   int messageResponseTimeout = 1000;
   ThinClientBaseDM *connectionDM = nullptr;
 
-  TcrMessageClearRegion message(region, aCallbackArgument,
-                                messageResponseTimeout, connectionDM);
+  TcrMessageClearRegion message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()), region,
+      aCallbackArgument, messageResponseTimeout, connectionDM);
 
   EXPECT_MESSAGE_EQ(
       "000000240000003800000003\\h{8}"
@@ -84,8 +103,9 @@ TEST_F(TcrMessageTest, testQueryConstructorMessageDataCotent) {
   int messageResponseTimeout = 1000;
   ThinClientBaseDM *connectionDM = nullptr;
 
-  TcrMessageCloseCQ message("myRegionName", messageResponseTimeout,
-                            connectionDM);
+  TcrMessageCloseCQ message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
+      "myRegionName", messageResponseTimeout, connectionDM);
 
   EXPECT_EQ(TcrMessage::CLOSECQ_MSG_TYPE, message.getMessageType());
 
@@ -99,7 +119,9 @@ TEST_F(TcrMessageTest, testQueryConstructorWithQUERY) {
   int messageResponseTimeout = 1000;
   ThinClientBaseDM *connectionDM = nullptr;
 
-  TcrMessageQuery message("aRegionName", messageResponseTimeout, connectionDM);
+  TcrMessageQuery message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
+      "aRegionName", messageResponseTimeout, connectionDM);
 
   EXPECT_EQ(TcrMessage::QUERY, message.getMessageType());
 
@@ -113,7 +135,9 @@ TEST_F(TcrMessageTest, testQueryConstructorWithSTOPCQ_MSG_TYPE) {
   int messageResponseTimeout = 1000;
   ThinClientBaseDM *connectionDM = nullptr;
 
-  TcrMessageStopCQ message("aRegionName", messageResponseTimeout, connectionDM);
+  TcrMessageStopCQ message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
+      "aRegionName", messageResponseTimeout, connectionDM);
 
   EXPECT_EQ(TcrMessage::STOPCQ_MSG_TYPE, message.getMessageType());
 
@@ -127,8 +151,9 @@ TEST_F(TcrMessageTest, testQueryConstructorWithCLOSECQ_MSG_TYPE) {
   int messageResponseTimeout = 1000;
   ThinClientBaseDM *connectionDM = nullptr;
 
-  TcrMessageCloseCQ message("aRegionName", messageResponseTimeout,
-                            connectionDM);
+  TcrMessageCloseCQ message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
+      "aRegionName", messageResponseTimeout, connectionDM);
 
   EXPECT_EQ(TcrMessage::CLOSECQ_MSG_TYPE, message.getMessageType());
 
@@ -145,9 +170,10 @@ TEST_F(TcrMessageTest,
   const UserDataPtr aCallbackArgument = nullptr;
   CacheableVectorPtr paramList = CacheableVector::create();
 
-  TcrMessageQueryWithParameters message("aRegionName", aCallbackArgument,
-                                        paramList, messageResponseTimeout,
-                                        connectionDM);
+  TcrMessageQueryWithParameters message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
+      "aRegionName", aCallbackArgument, paramList, messageResponseTimeout,
+      connectionDM);
 
   EXPECT_EQ(TcrMessage::QUERY_WITH_PARAMETERS, message.getMessageType());
 
@@ -159,6 +185,7 @@ TEST_F(TcrMessageTest,
 
 TEST_F(TcrMessageTest, testConstructorWithCONTAINS_KEY) {
   TcrMessageContainsKey message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
       static_cast<const Region *>(nullptr),
       CacheableString::create(
           "mykey"),  // static_cast<const CacheableKeyPtr>(nullptr),
@@ -174,7 +201,9 @@ TEST_F(TcrMessageTest, testConstructorWithCONTAINS_KEY) {
 }
 
 TEST_F(TcrMessageTest, testConstructorWithGETDURABLECQS_MSG_TYPE) {
-  TcrMessageGetDurableCqs message(static_cast<ThinClientBaseDM *>(nullptr));
+  TcrMessageGetDurableCqs message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
+      static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::GETDURABLECQS_MSG_TYPE, message.getMessageType());
 
@@ -183,6 +212,7 @@ TEST_F(TcrMessageTest, testConstructorWithGETDURABLECQS_MSG_TYPE) {
 
 TEST_F(TcrMessageTest, testConstructor2WithREQUEST) {
   TcrMessageRequest message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
       static_cast<const Region *>(nullptr),
       CacheableString::create(
           "mykey"),  // static_cast<const CacheableKeyPtr>(nullptr),
@@ -198,11 +228,12 @@ TEST_F(TcrMessageTest, testConstructor2WithREQUEST) {
 }
 
 TEST_F(TcrMessageTest, testConstructor2WithDESTROY) {
-  TcrMessageDestroy message(static_cast<const Region *>(nullptr),
-                            CacheableString::create("mykey"),
-                            static_cast<const CacheableKeyPtr>(nullptr),
-                            static_cast<const UserDataPtr>(nullptr),
-                            static_cast<ThinClientBaseDM *>(nullptr));
+  TcrMessageDestroy message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
+      static_cast<const Region *>(nullptr), CacheableString::create("mykey"),
+      static_cast<const CacheableKeyPtr>(nullptr),
+      static_cast<const UserDataPtr>(nullptr),
+      static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::DESTROY, message.getMessageType());
 
@@ -215,6 +246,7 @@ TEST_F(TcrMessageTest, testConstructor2WithDESTROY) {
 
 TEST_F(TcrMessageTest, testConstructor2WithINVALIDATE) {
   TcrMessageInvalidate message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
       static_cast<const Region *>(nullptr),
       CacheableString::create(
           "mykey"),  // static_cast<const CacheableKeyPtr>(nullptr),
@@ -231,15 +263,16 @@ TEST_F(TcrMessageTest, testConstructor2WithINVALIDATE) {
 }
 
 TEST_F(TcrMessageTest, testConstructor3WithPUT) {
-  TcrMessagePut message(static_cast<const Region *>(nullptr),
-                        CacheableString::create("mykey"),
-                        CacheableString::create("myvalue"),
-                        static_cast<const UserDataPtr>(nullptr),
-                        false,  // isDelta
-                        static_cast<ThinClientBaseDM *>(nullptr),
-                        false,  // isMetaRegion
-                        false,  // fullValueAfterDeltaFail
-                        "myRegionName");
+  TcrMessagePut message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
+      static_cast<const Region *>(nullptr), CacheableString::create("mykey"),
+      CacheableString::create("myvalue"),
+      static_cast<const UserDataPtr>(nullptr),
+      false,  // isDelta
+      static_cast<ThinClientBaseDM *>(nullptr),
+      false,  // isMetaRegion
+      false,  // fullValueAfterDeltaFail
+      "myRegionName");
 
   EXPECT_EQ(TcrMessage::PUT, message.getMessageType());
 
@@ -261,7 +294,9 @@ TEST_F(TcrMessageTest, testConstructor4) {
 TEST_F(TcrMessageTest, testConstructor5WithREGISTER_INTERST_LIST) {
   VectorOfCacheableKey keys;
   keys.push_back(CacheableString::create("mykey"));
+
   TcrMessageRegisterInterestList message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
       static_cast<const Region *>(nullptr), keys,
       false,  // isDurable
       false,  // isCacheingEnabled
@@ -280,7 +315,9 @@ TEST_F(TcrMessageTest, testConstructor5WithREGISTER_INTERST_LIST) {
 TEST_F(TcrMessageTest, testConstructor5WithUNREGISTER_INTERST_LIST) {
   VectorOfCacheableKey keys;
   keys.push_back(CacheableString::create("mykey"));
+
   TcrMessageUnregisterInterestList message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
       static_cast<const Region *>(nullptr), keys,
       false,  // isDurable
       false,  // isCacheingEnabled
@@ -298,6 +335,7 @@ TEST_F(TcrMessageTest, testConstructor5WithUNREGISTER_INTERST_LIST) {
 
 TEST_F(TcrMessageTest, testConstructorGET_FUNCTION_ATTRIBUTES) {
   TcrMessageGetFunctionAttributes message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
       std::string("myFunction"), static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::GET_FUNCTION_ATTRIBUTES, message.getMessageType());
@@ -308,8 +346,10 @@ TEST_F(TcrMessageTest, testConstructorGET_FUNCTION_ATTRIBUTES) {
 }
 
 TEST_F(TcrMessageTest, testConstructorKEY_SET) {
-  TcrMessageKeySet message(std::string("myFunctionKeySet"),
-                           static_cast<ThinClientBaseDM *>(nullptr));
+  TcrMessageKeySet message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
+      std::string("myFunctionKeySet"),
+      static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::KEY_SET, message.getMessageType());
 
@@ -320,13 +360,15 @@ TEST_F(TcrMessageTest, testConstructorKEY_SET) {
 }
 
 TEST_F(TcrMessageTest, testConstructor6WithCREATE_REGION) {
-  TcrMessageCreateRegion message("str1",  // TODO: what does this parameter do?!
-                                 "str2",  // TODO: what does this parameter do?!
-                                 InterestResultPolicy::NONE,
-                                 false,  // isDurable
-                                 false,  // isCacheingEnabled
-                                 false,  // receiveValues
-                                 static_cast<ThinClientBaseDM *>(nullptr));
+  TcrMessageCreateRegion message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
+      "str1",  // TODO: what does this parameter do?!
+      "str2",  // TODO: what does this parameter do?!
+      InterestResultPolicy::NONE,
+      false,  // isDurable
+      false,  // isCacheingEnabled
+      false,  // receiveValues
+      static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::CREATE_REGION, message.getMessageType());
 
@@ -337,6 +379,7 @@ TEST_F(TcrMessageTest, testConstructor6WithCREATE_REGION) {
 
 TEST_F(TcrMessageTest, testConstructor6WithREGISTER_INTEREST) {
   TcrMessageRegisterInterest message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
       "str1",  // TODO: what does this parameter do?!
       "str2",  // TODO: what does this parameter do?!
       InterestResultPolicy::NONE,
@@ -355,6 +398,7 @@ TEST_F(TcrMessageTest, testConstructor6WithREGISTER_INTEREST) {
 
 TEST_F(TcrMessageTest, testConstructor6WithUNREGISTER_INTEREST) {
   TcrMessageUnregisterInterest message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
       "str1",  // TODO: what does this parameter do?!
       "str2",  // TODO: what does this parameter do?!
       InterestResultPolicy::NONE,
@@ -372,8 +416,9 @@ TEST_F(TcrMessageTest, testConstructor6WithUNREGISTER_INTEREST) {
 }
 
 TEST_F(TcrMessageTest, testConstructorGET_PDX_TYPE_BY_ID) {
-  TcrMessageGetPdxTypeById message(42,
-                                   static_cast<ThinClientBaseDM *>(nullptr));
+  TcrMessageGetPdxTypeById message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()), 42,
+      static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::GET_PDX_TYPE_BY_ID, message.getMessageType());
 
@@ -382,8 +427,9 @@ TEST_F(TcrMessageTest, testConstructorGET_PDX_TYPE_BY_ID) {
 }
 
 TEST_F(TcrMessageTest, testConstructorGET_PDX_ENUM_BY_ID) {
-  TcrMessageGetPdxEnumById message(42,
-                                   static_cast<ThinClientBaseDM *>(nullptr));
+  TcrMessageGetPdxEnumById message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()), 42,
+      static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::GET_PDX_ENUM_BY_ID, message.getMessageType());
 
@@ -394,7 +440,8 @@ TEST_F(TcrMessageTest, testConstructorGET_PDX_ENUM_BY_ID) {
 TEST_F(TcrMessageTest, testConstructorGET_PDX_ID_FOR_TYPE) {
   CacheablePtr myPtr(CacheableString::createDeserializable());
   TcrMessageGetPdxIdForType message(
-      myPtr, static_cast<ThinClientBaseDM *>(nullptr), 42);
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()), myPtr,
+      static_cast<ThinClientBaseDM *>(nullptr), 42);
 
   EXPECT_EQ(TcrMessage::GET_PDX_ID_FOR_TYPE, message.getMessageType());
 
@@ -404,8 +451,9 @@ TEST_F(TcrMessageTest, testConstructorGET_PDX_ID_FOR_TYPE) {
 
 TEST_F(TcrMessageTest, testConstructorADD_PDX_TYPE) {
   CacheablePtr myPtr(CacheableString::createDeserializable());
-  TcrMessageAddPdxType message(myPtr, static_cast<ThinClientBaseDM *>(nullptr),
-                               42);
+  TcrMessageAddPdxType message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()), myPtr,
+      static_cast<ThinClientBaseDM *>(nullptr), 42);
 
   EXPECT_EQ(TcrMessage::ADD_PDX_TYPE, message.getMessageType());
 
@@ -415,9 +463,10 @@ TEST_F(TcrMessageTest, testConstructorADD_PDX_TYPE) {
 }
 
 TEST_F(TcrMessageTest, testConstructorGET_PDX_ID_FOR_ENUM) {
-  TcrMessageGetPdxIdForEnum message(static_cast<CacheablePtr>(nullptr),
-                                    static_cast<ThinClientBaseDM *>(nullptr),
-                                    42);
+  TcrMessageGetPdxIdForEnum message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
+      static_cast<CacheablePtr>(nullptr),
+      static_cast<ThinClientBaseDM *>(nullptr), 42);
 
   EXPECT_EQ(TcrMessage::GET_PDX_ID_FOR_ENUM, message.getMessageType());
 
@@ -426,8 +475,11 @@ TEST_F(TcrMessageTest, testConstructorGET_PDX_ID_FOR_ENUM) {
 
 TEST_F(TcrMessageTest, testConstructorADD_PDX_ENUM) {
   CacheablePtr myPtr(CacheableString::createDeserializable());
-  TcrMessageAddPdxEnum message(static_cast<CacheablePtr>(nullptr),
-                               static_cast<ThinClientBaseDM *>(nullptr), 42);
+
+  TcrMessageAddPdxEnum message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
+      static_cast<CacheablePtr>(nullptr),
+      static_cast<ThinClientBaseDM *>(nullptr), 42);
 
   EXPECT_EQ(TcrMessage::ADD_PDX_ENUM, message.getMessageType());
 
@@ -437,7 +489,9 @@ TEST_F(TcrMessageTest, testConstructorADD_PDX_ENUM) {
 }
 
 TEST_F(TcrMessageTest, testConstructorEventId) {
-  TcrMessageRequestEventValue message(static_cast<EventIdPtr>(nullptr));
+  TcrMessageRequestEventValue message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
+      static_cast<EventIdPtr>(nullptr));
 
   EXPECT_EQ(TcrMessage::REQUEST_EVENT_VALUE, message.getMessageType());
 
@@ -445,15 +499,17 @@ TEST_F(TcrMessageTest, testConstructorEventId) {
 }
 
 TEST_F(TcrMessageTest, testConstructorREMOVE_USER_AUTH) {
-  TcrMessageRemoveUserAuth message(true,
-                                   static_cast<ThinClientBaseDM *>(nullptr));
+  TcrMessageRemoveUserAuth message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()), true,
+      static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::REMOVE_USER_AUTH, message.getMessageType());
 
   EXPECT_MESSAGE_EQ("0000004E0000000600000001FFFFFFFF00000000010001", message);
 
-  TcrMessageRemoveUserAuth message2(false,
-                                    static_cast<ThinClientBaseDM *>(nullptr));
+  TcrMessageRemoveUserAuth message2(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()), false,
+      static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::REMOVE_USER_AUTH, message2.getMessageType());
 
@@ -461,8 +517,10 @@ TEST_F(TcrMessageTest, testConstructorREMOVE_USER_AUTH) {
 }
 
 TEST_F(TcrMessageTest, testConstructorUSER_CREDENTIAL_MESSAGE) {
-  TcrMessageUserCredential message(static_cast<PropertiesPtr>(nullptr),
-                                   static_cast<ThinClientBaseDM *>(nullptr));
+  TcrMessageUserCredential message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
+      static_cast<PropertiesPtr>(nullptr),
+      static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::USER_CREDENTIAL_MESSAGE, message.getMessageType());
   // this message is currently blank so this should change it if the impl
@@ -471,7 +529,9 @@ TEST_F(TcrMessageTest, testConstructorUSER_CREDENTIAL_MESSAGE) {
 }
 
 TEST_F(TcrMessageTest, testConstructorGET_CLIENT_PARTITION_ATTRIBUTES) {
-  TcrMessageGetClientPartitionAttributes message("testClientRegion");
+  TcrMessageGetClientPartitionAttributes message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
+      "testClientRegion");
 
   EXPECT_EQ(TcrMessage::GET_CLIENT_PARTITION_ATTRIBUTES,
             message.getMessageType());
@@ -483,7 +543,9 @@ TEST_F(TcrMessageTest, testConstructorGET_CLIENT_PARTITION_ATTRIBUTES) {
 }
 
 TEST_F(TcrMessageTest, testConstructorGET_CLIENT_PR_METADATA) {
-  TcrMessageGetClientPrMetadata message("testClientRegionPRMETA");
+  TcrMessageGetClientPrMetadata message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
+      "testClientRegionPRMETA");
 
   EXPECT_EQ(TcrMessage::GET_CLIENT_PR_METADATA, message.getMessageType());
 
@@ -493,7 +555,9 @@ TEST_F(TcrMessageTest, testConstructorGET_CLIENT_PR_METADATA) {
       message);
 }
 TEST_F(TcrMessageTest, testConstructorSIZE) {
-  TcrMessageSize message("testClientRegionSIZE");
+  TcrMessageSize message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
+      "testClientRegionSIZE");
 
   EXPECT_EQ(TcrMessage::SIZE, message.getMessageType());
 
@@ -509,7 +573,9 @@ TEST_F(TcrMessageTest, testConstructorEXECUTE_REGION_FUNCTION_SINGLE_HOP) {
   CacheableHashSetPtr myHashCachePtr = CacheableHashSet::create();
 
   CacheablePtr myPtr(CacheableString::createDeserializable());
+
   TcrMessageExecuteRegionFunctionSingleHop message(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
       "myFuncName", region, myPtr, myHashCachePtr, 2, myHashCachePtr,
       false,  // allBuckets
       1, static_cast<ThinClientBaseDM *>(nullptr));
@@ -518,7 +584,7 @@ TEST_F(TcrMessageTest, testConstructorEXECUTE_REGION_FUNCTION_SINGLE_HOP) {
             message.getMessageType());
 
   EXPECT_MESSAGE_EQ(
-      "0000004F0000005E00000009FFFFFFFF00000000050002000003E80000001300494E5641"
+      "0000004F0000005E00000009FFFFFFFF00000000050002000000010000001300494E5641"
       "4C49445F524547494F4E5F4E414D450000000A006D7946756E634E616D65000000030157"
       "000000000001012900000001000000000004000000000000000004000000000000000002"
       "014200",
@@ -535,6 +601,7 @@ TEST_F(TcrMessageTest, testConstructorEXECUTE_REGION_FUNCTION) {
   CacheableVectorPtr myVectPtr = CacheableVector::create();
 
   TcrMessageExecuteRegionFunction testMessage(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
       "ExecuteRegion", region, myCacheablePtr, myVectPtr, 2, myHashCachePtr, 10,
       static_cast<ThinClientBaseDM *>(nullptr), 10);
 
@@ -543,7 +610,7 @@ TEST_F(TcrMessageTest, testConstructorEXECUTE_REGION_FUNCTION) {
   // changes
 
   EXPECT_MESSAGE_EQ(
-      "0000003B0000006100000009FFFFFFFF00000000050002000027100000001300494E5641"
+      "0000003B0000006100000009FFFFFFFF000000000500020000000A0000001300494E5641"
       "4C49445F524547494F4E5F4E414D450000000D0045786563757465526567696F6E000000"
       "030157000000000001012900000001000A00000004000000000000000004000000000000"
       "000002014200",
@@ -552,10 +619,11 @@ TEST_F(TcrMessageTest, testConstructorEXECUTE_REGION_FUNCTION) {
   EXPECT_TRUE(testMessage.hasResult());
 }
 
-TEST_F(TcrMessageTest, testConstructorEXECUTE_FUNCTION) {
+TEST_F(TcrMessageTest, DISABLED_testConstructorEXECUTE_FUNCTION) {
   CacheablePtr myCacheablePtr(CacheableString::createDeserializable());
 
   TcrMessageExecuteFunction testMessage(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
       "ExecuteFunction", myCacheablePtr, 1,
       static_cast<ThinClientBaseDM *>(nullptr), 10);
 
@@ -564,7 +632,7 @@ TEST_F(TcrMessageTest, testConstructorEXECUTE_FUNCTION) {
   EXPECT_TRUE(testMessage.hasResult());
 
   EXPECT_MESSAGE_EQ(
-      "0000003E0000002600000003FFFFFFFF00000000050001000027100000000F0045786563"
+      "0000003E0000002600000003FFFFFFFF000000000500010000000A0000000F0045786563"
       "75746546756E6374696F6E0000000301570000",
       testMessage);
 }
@@ -572,9 +640,10 @@ TEST_F(TcrMessageTest, testConstructorEXECUTE_FUNCTION) {
 TEST_F(TcrMessageTest, testConstructorEXECUTECQ_MSG_TYPE) {
   CacheablePtr myCacheablePtr(CacheableString::createDeserializable());
 
-  TcrMessageExecuteCq testMessage("ExecuteCQ", "select * from /somewhere",
-                                  CqState::RUNNING, false,
-                                  static_cast<ThinClientBaseDM *>(nullptr));
+  TcrMessageExecuteCq testMessage(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
+      "ExecuteCQ", "select * from /somewhere", CqState::RUNNING, false,
+      static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::EXECUTECQ_MSG_TYPE, testMessage.getMessageType());
 
@@ -603,9 +672,11 @@ TEST_F(TcrMessageTest, testConstructorWithGinormousQueryEXECUTECQ_MSG_TYPE) {
     oss << '\'';
   }
   oss << ") and s.type in SET('AAA','BBB','CCC','DDD') limit 60000";
-  TcrMessageExecuteCq testMessage("ExecuteCQ", oss.str(), CqState::RUNNING,
-                                  false,
-                                  static_cast<ThinClientBaseDM *>(nullptr));
+
+  TcrMessageExecuteCq testMessage(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
+      "ExecuteCQ", oss.str(), CqState::RUNNING, false,
+      static_cast<ThinClientBaseDM *>(nullptr));
 
   EXPECT_EQ(TcrMessage::EXECUTECQ_MSG_TYPE, testMessage.getMessageType());
 
@@ -619,6 +690,7 @@ TEST_F(TcrMessageTest, testConstructorEXECUTECQ_WITH_IR_MSG_TYPE) {
   CacheablePtr myCacheablePtr(CacheableString::createDeserializable());
 
   TcrMessageExecuteCqWithIr testMessage(
+      std::unique_ptr<DataOutputUnderTest>(new DataOutputUnderTest()),
       "ExecuteCQWithIr", "select * from /somewhere", CqState::RUNNING, false,
       static_cast<ThinClientBaseDM *>(nullptr));
 
@@ -631,3 +703,5 @@ TEST_F(TcrMessageTest, testConstructorEXECUTECQ_WITH_IR_MSG_TYPE) {
       "000001000000010000000000010001",
       testMessage);
 }
+
+}  // namespace
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/quickstart/cpp/CqQuery.cpp
----------------------------------------------------------------------
diff --git a/src/quickstart/cpp/CqQuery.cpp b/src/quickstart/cpp/CqQuery.cpp
index 07d85f8..13c51cf 100644
--- a/src/quickstart/cpp/CqQuery.cpp
+++ b/src/quickstart/cpp/CqQuery.cpp
@@ -95,8 +95,8 @@ int main(int argc, char** argv) {
 
     // Register our Serializable/Cacheable Query objects, viz. Portfolio and
     // Position.
-    Serializable::registerType(Portfolio::createDeserializable);
-    Serializable::registerType(Position::createDeserializable);
+    serializationRegistry->addType(Portfolio::createDeserializable);
+    serializationRegistry->addType(Position::createDeserializable);
 
     LOGINFO("Registered Serializable Query Objects");
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/quickstart/cpp/Delta.cpp
----------------------------------------------------------------------
diff --git a/src/quickstart/cpp/Delta.cpp b/src/quickstart/cpp/Delta.cpp
index dba53a0..00e2c03 100644
--- a/src/quickstart/cpp/Delta.cpp
+++ b/src/quickstart/cpp/Delta.cpp
@@ -61,7 +61,7 @@ int main(int argc, char** argv) {
     LOGINFO("Obtained the Region from the Cache");
 
     // Register our Serializable/Cacheable Delta objects, DeltaExample.
-    Serializable::registerType(DeltaExample::create);
+    serializationRegistry->addType(DeltaExample::create);
 
     // Creating Delta Object.
     DeltaExample* ptr = new DeltaExample(10, 15, 20);

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/quickstart/cpp/DistributedSystem.cpp
----------------------------------------------------------------------
diff --git a/src/quickstart/cpp/DistributedSystem.cpp b/src/quickstart/cpp/DistributedSystem.cpp
index b399743..090802d 100644
--- a/src/quickstart/cpp/DistributedSystem.cpp
+++ b/src/quickstart/cpp/DistributedSystem.cpp
@@ -44,7 +44,7 @@ using namespace apache::geode::client;
 void distributedsystem(CachePtr cachePtr, char *hostname, int port,
                        char *poolName, char *regionName) {
   // create pool factory to create the pool.
-  PoolFactoryPtr poolFacPtr = PoolManager::createFactory();
+  PoolFactoryPtr poolFacPtr = cachePtr->getPoolManager().createFactory();
 
   // adding host(endpoint) in pool
   poolFacPtr->addServer(hostname, port);
@@ -53,7 +53,7 @@ void distributedsystem(CachePtr cachePtr, char *hostname, int port,
   poolFacPtr->setSubscriptionEnabled(true);
 
   // creating pool with name "examplePool"
-  poolFacPtr->create(poolName);
+  poolFacPtr->create(poolName, *cachePtr.get());
 
   RegionFactoryPtr regionFactory = cachePtr->createRegionFactory(CACHING_PROXY);
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/quickstart/cpp/PdxRemoteQuery.cpp
----------------------------------------------------------------------
diff --git a/src/quickstart/cpp/PdxRemoteQuery.cpp b/src/quickstart/cpp/PdxRemoteQuery.cpp
index 40e34b2..be3fb9f 100644
--- a/src/quickstart/cpp/PdxRemoteQuery.cpp
+++ b/src/quickstart/cpp/PdxRemoteQuery.cpp
@@ -67,8 +67,8 @@ int main(int argc, char** argv) {
 
     // Register our Serializable/Cacheable Query objects, viz. PortfolioPdx and
     // PositionPdx.
-    Serializable::registerPdxType(PortfolioPdx::createDeserializable);
-    Serializable::registerPdxType(PositionPdx::createDeserializable);
+    serializationRegistry->addPdxType(PortfolioPdx::createDeserializable);
+    serializationRegistry->addPdxType(PositionPdx::createDeserializable);
 
     LOGINFO("Registered PDX Type Query Objects");
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/quickstart/cpp/PdxSerializer.cpp
----------------------------------------------------------------------
diff --git a/src/quickstart/cpp/PdxSerializer.cpp b/src/quickstart/cpp/PdxSerializer.cpp
index c0d41a1..90250eb 100644
--- a/src/quickstart/cpp/PdxSerializer.cpp
+++ b/src/quickstart/cpp/PdxSerializer.cpp
@@ -16,22 +16,22 @@
  */
 
 /*
-* The PdxSerializer QuickStart Example.
-* This example takes the following steps:
-*
-* This example shows PdxSerializer usage.
-*
-* 1. Create a Geode Cache.
-* 2. Get the Person from the Cache.
-* 3. Populate some query Person objects on the Region.
-* 4. Get the pool, get the Query Service from Pool. Pool is define in
-* clientPdxSerializer.xml.
-* 5. Execute a query that returns a Result Set.
-* 6. Execute a query that returns a Struct Set.
-* 7. Execute the region shortcut/convenience query methods.
-* 8. Close the Cache.
-*
-*/
+ * The PdxSerializer QuickStart Example.
+ * This example takes the following steps:
+ *
+ * This example shows PdxSerializer usage.
+ *
+ * 1. Create a Geode Cache.
+ * 2. Get the Person from the Cache.
+ * 3. Populate some query Person objects on the Region.
+ * 4. Get the pool, get the Query Service from Pool. Pool is define in
+ * clientPdxSerializer.xml.
+ * 5. Execute a query that returns a Result Set.
+ * 6. Execute a query that returns a Struct Set.
+ * 7. Execute the region shortcut/convenience query methods.
+ * 8. Close the Cache.
+ *
+ */
 
 // Include the Geode library.
 #include <geode/GeodeCppCache.hpp>
@@ -165,22 +165,22 @@ int main(int argc, char** argv) {
     LOGINFO("Registered Person Query Objects");
 
     // Populate the Region with some Person objects.
-    Person* p1 = new Person((char *)"John", 1 /*ID*/, 23 /*age*/);
+    Person* p1 = new Person((char*)"John", 1 /*ID*/, 23 /*age*/);
     PdxWrapperPtr pdxobj1(new PdxWrapper(p1, CLASSNAME));
     regionPtr->put("Key1", pdxobj1);
 
-    Person* p2 = new Person((char *)"Jack", 2 /*ID*/, 20 /*age*/);
+    Person* p2 = new Person((char*)"Jack", 2 /*ID*/, 20 /*age*/);
     PdxWrapperPtr pdxobj2(new PdxWrapper(p2, CLASSNAME));
     regionPtr->put("Key2", pdxobj2);
 
-    Person* p3 = new Person((char *)"Tony", 3 /*ID*/, 35 /*age*/);
+    Person* p3 = new Person((char*)"Tony", 3 /*ID*/, 35 /*age*/);
     PdxWrapperPtr pdxobj3(new PdxWrapper(p3, CLASSNAME));
     regionPtr->put("Key3", pdxobj3);
 
     LOGINFO("Populated some Person Objects through PdxWrapper");
 
     // find the pool
-    PoolPtr poolPtr = PoolManager::find("examplePool");
+    PoolPtr poolPtr = cachePtr->getPoolManager().find("examplePool");
 
     // Get the QueryService from the Pool.
     QueryServicePtr qrySvcPtr = poolPtr->getQueryService();
@@ -218,7 +218,9 @@ int main(int argc, char** argv) {
     LOGINFO("Region Query returned %d rows", resultsPtr->size());
 
     // Execute the Region selectValue() API.
-    PdxWrapperPtr pdxWrapperPtr = std::dynamic_pointer_cast<apache::geode::client::PdxWrapper>(regionPtr->selectValue("m_id = 3"));
+    PdxWrapperPtr pdxWrapperPtr =
+        std::dynamic_pointer_cast<apache::geode::client::PdxWrapper>(
+            regionPtr->selectValue("m_id = 3"));
     Person* per = reinterpret_cast<Person*>(pdxWrapperPtr->getObject());
 
     LOGINFO(

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/quickstart/cpp/PoolCqQuery.cpp
----------------------------------------------------------------------
diff --git a/src/quickstart/cpp/PoolCqQuery.cpp b/src/quickstart/cpp/PoolCqQuery.cpp
index cd91fcf..fc69953 100644
--- a/src/quickstart/cpp/PoolCqQuery.cpp
+++ b/src/quickstart/cpp/PoolCqQuery.cpp
@@ -102,8 +102,8 @@ int main(int argc, char** argv) {
 
     // Register our Serializable/Cacheable Query objects, viz. Portfolio and
     // Position.
-    Serializable::registerType(Portfolio::createDeserializable);
-    Serializable::registerType(Position::createDeserializable);
+    serializationRegistry->addType(Portfolio::createDeserializable);
+    serializationRegistry->addType(Position::createDeserializable);
 
     LOGINFO("Registered Serializable Query Objects");
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/quickstart/cpp/PoolRemoteQuery.cpp
----------------------------------------------------------------------
diff --git a/src/quickstart/cpp/PoolRemoteQuery.cpp b/src/quickstart/cpp/PoolRemoteQuery.cpp
index 4e98dbd..9172959 100644
--- a/src/quickstart/cpp/PoolRemoteQuery.cpp
+++ b/src/quickstart/cpp/PoolRemoteQuery.cpp
@@ -67,8 +67,8 @@ int main(int argc, char** argv) {
 
     // Register our Serializable/Cacheable Query objects, viz. Portfolio and
     // Position.
-    Serializable::registerType(Portfolio::createDeserializable);
-    Serializable::registerType(Position::createDeserializable);
+    serializationRegistry->addType(Portfolio::createDeserializable);
+    serializationRegistry->addType(Position::createDeserializable);
 
     LOGINFO("Registered Serializable Query Objects");
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/quickstart/cpp/PoolWithEndpoints.cpp
----------------------------------------------------------------------
diff --git a/src/quickstart/cpp/PoolWithEndpoints.cpp b/src/quickstart/cpp/PoolWithEndpoints.cpp
index c1a5cee..4c5fa59 100644
--- a/src/quickstart/cpp/PoolWithEndpoints.cpp
+++ b/src/quickstart/cpp/PoolWithEndpoints.cpp
@@ -54,7 +54,7 @@ int main(int argc, char** argv) {
     LOGINFO("Created the Geode Cache");
 
     // Create Poolfactory with endpoint and then create pool using poolfactory.
-    PoolFactoryPtr pfact = PoolManager::createFactory();
+    PoolFactoryPtr pfact = cachePtr->getPoolManager().createFactory();
     pfact->addServer("localhost", 40404);
     PoolPtr pptr = pfact->create("examplePool");
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/quickstart/cpp/RemoteQuery.cpp
----------------------------------------------------------------------
diff --git a/src/quickstart/cpp/RemoteQuery.cpp b/src/quickstart/cpp/RemoteQuery.cpp
index 9bfcf47..7694ba8 100644
--- a/src/quickstart/cpp/RemoteQuery.cpp
+++ b/src/quickstart/cpp/RemoteQuery.cpp
@@ -64,8 +64,8 @@ int main(int argc, char** argv) {
 
     // Register our Serializable/Cacheable Query objects, viz. Portfolio and
     // Position.
-    Serializable::registerType(Portfolio::createDeserializable);
-    Serializable::registerType(Position::createDeserializable);
+    serializationRegistry->addType(Portfolio::createDeserializable);
+    serializationRegistry->addType(Position::createDeserializable);
 
     LOGINFO("Registered Serializable Query Objects");
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/quickstart/csharp/CqQuery.cs
----------------------------------------------------------------------
diff --git a/src/quickstart/csharp/CqQuery.cs b/src/quickstart/csharp/CqQuery.cs
index b4c9b9a..f05323e 100644
--- a/src/quickstart/csharp/CqQuery.cs
+++ b/src/quickstart/csharp/CqQuery.cs
@@ -87,8 +87,8 @@ namespace Apache.Geode.Client.QuickStart
         Console.WriteLine("Created the Region Programmatically.");
 
         // Register our Serializable/Cacheable Query objects, viz. Portfolio and Position.
-        Serializable.RegisterTypeGeneric(Portfolio.CreateDeserializable);
-        Serializable.RegisterTypeGeneric(Position.CreateDeserializable);
+        Serializable.RegisterTypeGeneric(Portfolio.CreateDeserializable, CacheHelper.DCache);
+        Serializable.RegisterTypeGeneric(Position.CreateDeserializable, CacheHelper.DCache);
 
         Console.WriteLine("Registered Serializable Query Objects");
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/quickstart/csharp/Delta.cs
----------------------------------------------------------------------
diff --git a/src/quickstart/csharp/Delta.cs b/src/quickstart/csharp/Delta.cs
index 21c4cf6..9f9d08c 100644
--- a/src/quickstart/csharp/Delta.cs
+++ b/src/quickstart/csharp/Delta.cs
@@ -60,7 +60,7 @@ namespace Apache.Geode.Client.QuickStart
 
         Console.WriteLine("Obtained the Region from the Cache");
 
-        Serializable.RegisterTypeGeneric(DeltaExample.create);
+        Serializable.RegisterTypeGeneric(DeltaExample.create, CacheHelper.DCache);
 
         //Creating Delta Object.
         DeltaExample ptr = new DeltaExample(10, 15, 20);

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/quickstart/csharp/PoolCqQuery.cs
----------------------------------------------------------------------
diff --git a/src/quickstart/csharp/PoolCqQuery.cs b/src/quickstart/csharp/PoolCqQuery.cs
index 30751e3..b792f09 100755
--- a/src/quickstart/csharp/PoolCqQuery.cs
+++ b/src/quickstart/csharp/PoolCqQuery.cs
@@ -92,8 +92,8 @@ namespace Apache.Geode.Client.QuickStart
         Console.WriteLine("Obtained the Region from the Cache");
 
         // Register our Serializable/Cacheable Query objects, viz. Portfolio and Position.
-        Serializable.RegisterTypeGeneric(Portfolio.CreateDeserializable);
-        Serializable.RegisterTypeGeneric(Position.CreateDeserializable);
+        Serializable.RegisterTypeGeneric(Portfolio.CreateDeserializable, CacheHelper.DCache);
+        Serializable.RegisterTypeGeneric(Position.CreateDeserializable, CacheHelper.DCache);
 
         Console.WriteLine("Registered Serializable Query Objects");
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/quickstart/csharp/PoolRemoteQuery.cs
----------------------------------------------------------------------
diff --git a/src/quickstart/csharp/PoolRemoteQuery.cs b/src/quickstart/csharp/PoolRemoteQuery.cs
index 1978e6a..3f9aada 100755
--- a/src/quickstart/csharp/PoolRemoteQuery.cs
+++ b/src/quickstart/csharp/PoolRemoteQuery.cs
@@ -64,8 +64,8 @@ namespace Apache.Geode.Client.QuickStart
         Console.WriteLine("Obtained the Region from the Cache");
         
         // Register our Serializable/Cacheable Query objects, viz. Portfolio and Position.
-        Serializable.RegisterTypeGeneric(Portfolio.CreateDeserializable);
-        Serializable.RegisterTypeGeneric(Position.CreateDeserializable);
+        Serializable.RegisterTypeGeneric(Portfolio.CreateDeserializable, CacheHelper.DCache);
+        Serializable.RegisterTypeGeneric(Position.CreateDeserializable, CacheHelper.DCache);
 
         Console.WriteLine("Registered Serializable Query Objects");
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/quickstart/csharp/RemoteQuery.cs
----------------------------------------------------------------------
diff --git a/src/quickstart/csharp/RemoteQuery.cs b/src/quickstart/csharp/RemoteQuery.cs
index b33aae8..9f4f278 100644
--- a/src/quickstart/csharp/RemoteQuery.cs
+++ b/src/quickstart/csharp/RemoteQuery.cs
@@ -62,8 +62,8 @@ namespace Apache.Geode.Client.QuickStart
         Console.WriteLine("Created the Region Programmatically.");    
 
         // Register our Serializable/Cacheable Query objects, viz. Portfolio and Position.
-        Serializable.RegisterTypeGeneric(Portfolio.CreateDeserializable);
-        Serializable.RegisterTypeGeneric(Position.CreateDeserializable);
+        Serializable.RegisterTypeGeneric(Portfolio.CreateDeserializable, CacheHelper.DCache);
+        Serializable.RegisterTypeGeneric(Position.CreateDeserializable, CacheHelper.DCache);
 
         Console.WriteLine("Registered Serializable Query Objects");
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/sqliteimpl/SqLiteImpl.cpp
----------------------------------------------------------------------
diff --git a/src/sqliteimpl/SqLiteImpl.cpp b/src/sqliteimpl/SqLiteImpl.cpp
index 24052c9..c1a6a00 100644
--- a/src/sqliteimpl/SqLiteImpl.cpp
+++ b/src/sqliteimpl/SqLiteImpl.cpp
@@ -14,6 +14,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include <geode/Region.hpp>
+#include <geode/Cache.hpp>
 
 #include "SqLiteImpl.hpp"
 #ifdef _WIN32
@@ -31,6 +33,7 @@ void SqLiteImpl::init(const RegionPtr& region, PropertiesPtr& diskProperties) {
 
   int maxPageCount = 0;
   int pageSize = 0;
+  m_regionPtr = region;
   m_persistanceDir = g_default_persistence_directory;
   std::string regionName = region->getName();
   if (diskProperties != nullptr) {
@@ -108,14 +111,16 @@ void SqLiteImpl::init(const RegionPtr& region, PropertiesPtr& diskProperties) {
 void SqLiteImpl::write(const CacheableKeyPtr& key, const CacheablePtr& value,
                        void*& dbHandle) {
   // Serialize key and value.
-  DataOutput keyDataBuffer, valueDataBuffer;
+  auto* cache = m_regionPtr->getCache().get();
+  auto keyDataBuffer = cache->createDataOutput();
+  auto valueDataBuffer = cache->createDataOutput();
   uint32_t keyBufferSize, valueBufferSize;
 
-  keyDataBuffer.writeObject(key);
-  valueDataBuffer.writeObject(value);
-  void* keyData = const_cast<uint8_t*>(keyDataBuffer.getBuffer(&keyBufferSize));
+  keyDataBuffer->writeObject(key);
+  valueDataBuffer->writeObject(value);
+  void* keyData = const_cast<uint8_t*>(keyDataBuffer->getBuffer(&keyBufferSize));
   void* valueData =
-      const_cast<uint8_t*>(valueDataBuffer.getBuffer(&valueBufferSize));
+      const_cast<uint8_t*>(valueDataBuffer->getBuffer(&valueBufferSize));
 
   if (m_sqliteHelper->insertKeyValue(keyData, keyBufferSize, valueData,
                                      valueBufferSize) != 0) {
@@ -127,10 +132,10 @@ bool SqLiteImpl::writeAll() { return true; }
 
 CacheablePtr SqLiteImpl::read(const CacheableKeyPtr& key, void*& dbHandle) {
   // Serialize key.
-  DataOutput keyDataBuffer;
+  auto keyDataBuffer = m_regionPtr->getCache()->createDataOutput();
   uint32_t keyBufferSize;
-  keyDataBuffer.writeObject(key);
-  void* keyData = const_cast<uint8_t*>(keyDataBuffer.getBuffer(&keyBufferSize));
+  keyDataBuffer->writeObject(key);
+  void* keyData = const_cast<uint8_t*>(keyDataBuffer->getBuffer(&keyBufferSize));
   void* valueData;
   uint32_t valueBufferSize;
 
@@ -140,10 +145,10 @@ CacheablePtr SqLiteImpl::read(const CacheableKeyPtr& key, void*& dbHandle) {
   }
 
   // Deserialize object and return value.
-  DataInput valueDataBuffer(reinterpret_cast<uint8_t*>(valueData),
+  auto valueDataBuffer = m_regionPtr->getCache()->createDataInput(reinterpret_cast<uint8_t*>(valueData),
                             valueBufferSize);
   CacheablePtr retValue;
-  valueDataBuffer.readObject(retValue);
+  valueDataBuffer->readObject(retValue);
 
   // Free memory for serialized form of Cacheable object.
   free(valueData);
@@ -170,10 +175,10 @@ void SqLiteImpl::destroyRegion() {
 
 void SqLiteImpl::destroy(const CacheableKeyPtr& key, void*& dbHandle) {
   // Serialize key and value.
-  DataOutput keyDataBuffer;
+  auto keyDataBuffer = m_regionPtr->getCache()->createDataOutput();
   uint32_t keyBufferSize;
-  keyDataBuffer.writeObject(key);
-  void* keyData = const_cast<uint8_t*>(keyDataBuffer.getBuffer(&keyBufferSize));
+  keyDataBuffer->writeObject(key);
+  void* keyData = const_cast<uint8_t*>(keyDataBuffer->getBuffer(&keyBufferSize));
   if (m_sqliteHelper->removeKey(keyData, keyBufferSize) != 0) {
     throw IllegalStateException("Failed to destroy the key from SQLITE.");
   }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/templates/security/PkcsAuthInit.cpp
----------------------------------------------------------------------
diff --git a/src/templates/security/PkcsAuthInit.cpp b/src/templates/security/PkcsAuthInit.cpp
index a545990..ebae246 100644
--- a/src/templates/security/PkcsAuthInit.cpp
+++ b/src/templates/security/PkcsAuthInit.cpp
@@ -14,12 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
+#include "SerializationRegistry.hpp"
 #include "PkcsAuthInit.hpp"
 #include "geode/Properties.hpp"
 #include "geode/CacheableBuiltins.hpp"
 #include "geode/ExceptionTypes.hpp"
 #include <cstdio>
+#include <string>
 
 namespace apache {
 namespace geode {
@@ -90,7 +91,7 @@ static bool s_initDone = openSSLInit();
 }
 // end of extern "C"
 
-PropertiesPtr PKCSAuthInit::getCredentials(PropertiesPtr& securityprops,
+PropertiesPtr PKCSAuthInit::getCredentials(const PropertiesPtr& securityprops,
                                            const char* server) {
   if (!s_initDone) {
     throw AuthenticationFailedException(
@@ -132,7 +133,6 @@ PropertiesPtr PKCSAuthInit::getCredentials(PropertiesPtr& securityprops,
         "PKCSAuthInit::getCredentials: "
         "key-store password property KEYSTORE_PASSWORD not set.");
   }
-  DataOutput additionalMsg;
 
   FILE* keyStoreFP = fopen(keyStorePath, "r");
   if (keyStoreFP == NULL) {
@@ -158,16 +158,10 @@ PropertiesPtr PKCSAuthInit::getCredentials(PropertiesPtr& securityprops,
 
   fclose(keyStoreFP);
 
-  additionalMsg.writeUTF(alias);
-
-  uint32_t dataLen;
-  char* data = (char*)additionalMsg.getBuffer(&dataLen);
   unsigned int lengthEncryptedData = 0;
 
-  // Skip first two bytes of the java UTF-8 encoded string
-  // containing the length of the string.
   uint8_t* signatureData = createSignature(
-      privateKey, cert, reinterpret_cast<unsigned char*>(data + 2), dataLen - 2,
+      privateKey, cert, reinterpret_cast<const unsigned char*>(alias), strlen(alias),
       &lengthEncryptedData);
   EVP_PKEY_free(privateKey);
   X509_free(cert);

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/templates/security/PkcsAuthInit.hpp
----------------------------------------------------------------------
diff --git a/src/templates/security/PkcsAuthInit.hpp b/src/templates/security/PkcsAuthInit.hpp
index 8b7a385..9e2f1cb 100644
--- a/src/templates/security/PkcsAuthInit.hpp
+++ b/src/templates/security/PkcsAuthInit.hpp
@@ -85,7 +85,7 @@ class PKCSAuthInit : public AuthInitialize {
    * The format expected is "host:port".
    * @returns the credentials to be used for the given <code>server</code>
    */
-  PropertiesPtr getCredentials(PropertiesPtr& securityprops,
+  PropertiesPtr getCredentials(const PropertiesPtr& securityprops,
                                const char* server);
 
   /**

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/templates/security/UserPasswordAuthInit.cpp
----------------------------------------------------------------------
diff --git a/src/templates/security/UserPasswordAuthInit.cpp b/src/templates/security/UserPasswordAuthInit.cpp
index 8d4f4e9..4714aba 100644
--- a/src/templates/security/UserPasswordAuthInit.cpp
+++ b/src/templates/security/UserPasswordAuthInit.cpp
@@ -33,8 +33,8 @@ LIBEXP AuthInitialize* createUserPasswordAuthInitInstance() {
 }
 }
 
-PropertiesPtr UserPasswordAuthInit::getCredentials(PropertiesPtr& securityprops,
-                                                   const char* server) {
+PropertiesPtr UserPasswordAuthInit::getCredentials(
+    const PropertiesPtr& securityprops, const char* server) {
   // LOGDEBUG("UserPasswordAuthInit: inside userPassword::getCredentials");
   CacheablePtr userName;
   if (securityprops == nullptr ||

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/templates/security/UserPasswordAuthInit.hpp
----------------------------------------------------------------------
diff --git a/src/templates/security/UserPasswordAuthInit.hpp b/src/templates/security/UserPasswordAuthInit.hpp
index fec9ecf..e3d7ed6 100644
--- a/src/templates/security/UserPasswordAuthInit.hpp
+++ b/src/templates/security/UserPasswordAuthInit.hpp
@@ -65,7 +65,7 @@ class UserPasswordAuthInit : public AuthInitialize {
    * @remarks This method can modify the given set of properties. For
    * example it may invoke external agents or even interact with the user.
    */
-  PropertiesPtr getCredentials(PropertiesPtr& securityprops,
+  PropertiesPtr getCredentials(const PropertiesPtr& securityprops,
                                const char* server);
 
   /**

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/tests/cli/FwkUtil/FwkData.cs
----------------------------------------------------------------------
diff --git a/src/tests/cli/FwkUtil/FwkData.cs b/src/tests/cli/FwkUtil/FwkData.cs
index f7c3771..c5f6c40 100644
--- a/src/tests/cli/FwkUtil/FwkData.cs
+++ b/src/tests/cli/FwkUtil/FwkData.cs
@@ -21,6 +21,7 @@ using System.Collections.Generic;
 using System.Runtime.Serialization;
 using System.Xml;
 
+
 #pragma warning disable 618
 
 namespace Apache.Geode.Client.FwkLib
@@ -189,172 +190,8 @@ namespace Apache.Geode.Client.FwkLib
     
     public static Dictionary<string, FwkData> ReadDataNodes(XmlNode node)
     {
-      XmlNodeList xmlNodes = node.SelectNodes("data");
-      // Console.WriteLine("Total number of data nodes found = " + xmlNodes.Count);
-      if (xmlNodes != null)
-      {
-        Dictionary<string, FwkData> dataNodes = new Dictionary<string, FwkData>();
-        foreach (XmlNode xmlNode in xmlNodes)
-        {
-          XmlAttribute tmpattr = xmlNode.Attributes["name"];
-          string name;
-          if (tmpattr != null)
-          {
-            name = tmpattr.Value;
-          }
-          else
-          {
-            throw new IllegalArgException("The xml file passed has an unknown format");
-          }
+    throw new Exception();
 
-          //Console.WriteLine("xmlNode.FirstChild.Name = " + xmlNode.FirstChild.Name);
-          if (xmlNode.FirstChild == null || xmlNode.FirstChild.NodeType == XmlNodeType.Text)
-          {
-            object data = xmlNode.InnerText;
-          //  Console.WriteLine("Going to construct FwkData with data = " + data.ToString() +
-           //   " data2 = null " + " datakind = " + DataKind.String.ToString());
-            FwkData td = new FwkData(data, null, DataKind.String);
-            dataNodes[name] = td;
-          }
-          else if (xmlNode.FirstChild.Name == "snippet")
-          {
-            string regionName;
-            if (xmlNode.FirstChild.FirstChild.Name == "region")
-            {
-              XmlAttribute nameattr = xmlNode.FirstChild.FirstChild.Attributes["name"];
-              regionName = nameattr.Value;
-
-              // Now collect the region atributes
-              XmlNode attrnode = xmlNode.FirstChild.FirstChild.FirstChild;
-              Apache.Geode.Client.Properties<string, string> rattr = Apache.Geode.Client.Properties<string, string>.Create<string, string>();
-              //AttributesFactory af = new AttributesFactory();
-              if (attrnode.Name == "region-attributes")
-              {
-                XmlAttributeCollection attrcoll = attrnode.Attributes;
-                if (attrcoll != null)
-                {
-                  foreach (XmlAttribute eachattr in attrcoll)
-                  {
-                    rattr.Insert(eachattr.Name, eachattr.Value);
-                    //SetThisAttribute(eachattr.Name, eachattr, af);
-                  }
-                }
-                if (attrnode.ChildNodes != null)
-                {
-                  foreach (XmlNode tmpnode in attrnode.ChildNodes)
-                  {
-                    rattr.Insert(tmpnode.Name, tmpnode.Value);
-                    //SetThisAttribute(tmpnode.Name, tmpnode, af);
-                  }
-                }
-                Apache.Geode.Client.DataOutput dout = new Apache.Geode.Client.DataOutput();
-                //RegionAttributes rattr = af.CreateRegionAttributes();
-                rattr.ToData(dout);
-                // Console.WriteLine("Going to construct FwkData with region = " + regionName +
-                // " data2 = region attributes" + " datakind = " + DataKind.Region.ToString());
-                FwkData td = new FwkData(regionName, dout.GetBuffer(), DataKind.Region);
-                dataNodes[name] = td;
-              }
-              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"];
-              String poolName = nameattr.Value;
-              // Now collect the pool atributes
-              Apache.Geode.Client.Properties<string, string> prop = Apache.Geode.Client.Properties<string, string>.Create<string, string>();
-              XmlAttributeCollection attrcoll = xmlNode.FirstChild.FirstChild.Attributes;
-              if (attrcoll != null)
-              {
-                foreach (XmlAttribute eachattr in attrcoll)
-                {
-                  prop.Insert(eachattr.Name, eachattr.Value);
-                }
-                Apache.Geode.Client.DataOutput dout = new Apache.Geode.Client.DataOutput();
-                prop.ToData(dout);
-                FwkData td = new FwkData(poolName, dout.GetBuffer(), DataKind.Pool);
-                dataNodes[name] = td;
-              }
-              else
-              {
-                throw new IllegalArgException("The xml file passed has an unknown format");
-              }
-            }
-            else
-            {
-              throw new IllegalArgException("The xml file passed has an unknown format");
-            }
-          }
-          else if (xmlNode.FirstChild.Name == "list")
-          {
-            List<string> tmplist = new List<string>();
-            XmlNode listNode = xmlNode.FirstChild;
-            if (listNode.FirstChild != null)
-            {
-              bool isOneOf = false;
-              if (listNode.FirstChild.Name == "oneOf")
-              {
-                isOneOf = true;
-                listNode = listNode.FirstChild;
-              }
-              XmlNodeList tmpListNodes = listNode.ChildNodes;
-              foreach (XmlNode itemnode in tmpListNodes)
-              {
-                if (itemnode.Name == "item")
-                {
-                  tmplist.Add(itemnode.InnerText);
-                  //Console.WriteLine("Adding the value " + itemnode.InnerText + " to the list");
-                }
-                else
-                {
-                  throw new IllegalArgException("The xml file passed has an unknown node " +
-                    itemnode.Name + " in data-list");
-                }
-              }
-              //Console.WriteLine("Going to construct FwkData list data: oneof = " + isOneOf.ToString() + " datakind = " + DataKind.List.ToString());
-              FwkData td = new FwkData(tmplist, isOneOf, DataKind.List);
-              dataNodes[name] = td;
-            }
-          }
-          else if ( xmlNode.FirstChild.Name == "range" )
-          {
-            XmlAttributeCollection rangeAttr = xmlNode.FirstChild.Attributes;
-            string lowmarkstr = rangeAttr["low"].Value;
-            string highmarkstr = rangeAttr["high"].Value;
-            int lowmark = int.Parse(lowmarkstr);
-            int highmark = int.Parse(highmarkstr);
-            //Console.WriteLine("Going to construct FwkData Range datakind = " + DataKind.Range.ToString() + " high = " + highmark + " low = " + lowmark);
-            FwkData td = new FwkData(lowmark, highmark, DataKind.Range);
-            dataNodes[name] = td;
-          }
-          else if (xmlNode.FirstChild.Name == "oneof")
-          {
-            XmlNodeList itemlist = xmlNode.FirstChild.ChildNodes;
-            List<string> opItemList = new List<string>();
-            foreach (XmlNode tmpitem in itemlist)
-            {
-              if (tmpitem.Name == "item")
-              {
-                opItemList.Add(tmpitem.InnerText);
-              }
-            }
-            FwkData td = new FwkData(opItemList, true, DataKind.List);
-            dataNodes[name] = td;
-          }
-          else
-          {
-            throw new IllegalArgException("The xml file passed has an unknown child: " +
-              xmlNode.FirstChild.Name + " ; number of childnodes: " +
-              (xmlNode.ChildNodes == null ? XmlNodeType.None :
-              xmlNode.FirstChild.NodeType));
-          }
-        }
-        return dataNodes;
-      }
-      return null;
     }
 
     public static void SetThisAttribute(string name, XmlNode node, Apache.Geode.Client.AttributesFactory<string, string> af)
@@ -887,45 +724,6 @@ namespace Apache.Geode.Client.FwkLib
       return null;
     }
 
-    /// <summary>
-    /// Read the region attributes for the given key.
-    /// </summary>
-    /// <param name="key">The key of the region to read.</param>
-    /// <returns>The attributes of the region.</returns>
-    public Apache.Geode.Client.RegionAttributes<string, string> GetRegionAttributes(string key)
-    {
-      FwkData data = ReadData(key);
-      if (data != null && data.Kind == DataKind.Region)
-      {
-        Apache.Geode.Client.AttributesFactory<string, string> af = new Apache.Geode.Client.AttributesFactory<string, string>();
-        Apache.Geode.Client.RegionAttributes<string, string> attrs = af.CreateRegionAttributes();
-        byte[] attrsArr = data.Data2 as byte[];
-        if (attrsArr != null && attrsArr.Length > 0)
-        {
-          Apache.Geode.Client.DataInput dinp = new Apache.Geode.Client.DataInput(attrsArr);
-          attrs.FromData(dinp);
-        }
-        return attrs;
-      }
-      return null;
-    }
-    public Apache.Geode.Client.Properties<string, string> GetPoolAttributes(string key)
-    {
-      FwkData data = ReadData(key);
-      if (data != null && data.Kind == DataKind.Pool)
-      {
-        Apache.Geode.Client.Properties<string, string> prop = Apache.Geode.Client.Properties<string, string>.Create<string, string>();
-        //RegionAttributes attrs = af.CreateRegionAttributes();
-        byte[] attrsArr = data.Data2 as byte[];
-        if (attrsArr != null && attrsArr.Length > 0)
-        {
-          Apache.Geode.Client.DataInput dinp = new Apache.Geode.Client.DataInput(attrsArr);
-          prop.FromData(dinp);
-        }
-        return prop;
-      }
-      return null;
-    }
 
     /// <summary>
     /// Reset a key to the start.

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/tests/cli/NewFwkLib/CacheHelper.cs
----------------------------------------------------------------------
diff --git a/src/tests/cli/NewFwkLib/CacheHelper.cs b/src/tests/cli/NewFwkLib/CacheHelper.cs
index 217cb81..f3c4753 100644
--- a/src/tests/cli/NewFwkLib/CacheHelper.cs
+++ b/src/tests/cli/NewFwkLib/CacheHelper.cs
@@ -265,7 +265,7 @@ namespace Apache.Geode.Client.FwkLib
         }
         catch (CacheExistsException)
         {
-          m_cache = CacheFactory.GetAnyInstance();
+          m_cache = CacheFactory.CreateCacheFactory(config).Create();
         }
       }
 
@@ -302,14 +302,7 @@ namespace Apache.Geode.Client.FwkLib
 
     public static void Close()
     {
-      if (DistributedSystem.IsConnected)
-      {
-        CloseCache();
-        if (m_doDisconnect)
-        {
-          DistributedSystem.Disconnect();
-        }
-      }
+      CloseCache();
       m_dsys = null;
     }
 
@@ -324,14 +317,7 @@ namespace Apache.Geode.Client.FwkLib
 
     public static void CloseKeepAlive()
     {
-      if (DistributedSystem.IsConnected)
-      {
-        CloseCacheKeepAlive();
-        if (m_doDisconnect)
-        {
-          DistributedSystem.Disconnect();
-        }
-      }
+      CloseCacheKeepAlive();
       m_dsys = null;
     }
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/tests/cli/NewFwkLib/CacheServer.cs
----------------------------------------------------------------------
diff --git a/src/tests/cli/NewFwkLib/CacheServer.cs b/src/tests/cli/NewFwkLib/CacheServer.cs
index 6f9b138..1128aa9 100644
--- a/src/tests/cli/NewFwkLib/CacheServer.cs
+++ b/src/tests/cli/NewFwkLib/CacheServer.cs
@@ -37,8 +37,7 @@ namespace Apache.Geode.Client.FwkLib
 
       long currentTimeInMillies()
       {
-          DateTime startTime = DateTime.Now;
-          long curruntMillis = SmokePerf<TKey, TVal>.GetDateTimeMillis(startTime);
+          long curruntMillis = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
           return curruntMillis;
       }
     public override void AfterCreate(EntryEvent<TKey, TVal> ev)
@@ -966,7 +965,7 @@ namespace Apache.Geode.Client.FwkLib
     {
       ResetKey(ObjectType);
       string objectType = GetStringValue(ObjectType);
-      QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper();
+      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"))
@@ -991,7 +990,7 @@ namespace Apache.Geode.Client.FwkLib
       int numOfKeys = GetUIntValue(EntryCount);
       ResetKey(ValueSizes);
       int objSize = GetUIntValue(ValueSizes);
-      QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper();
+      QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
       int numSet = 0;
       int setSize = 0;
       if (objType != null && objType == "Portfolio")
@@ -1122,7 +1121,7 @@ namespace Apache.Geode.Client.FwkLib
       {
         ResetKey(EntryCount);
         int numOfKeys = GetUIntValue(EntryCount);
-        QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper();
+        QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
         int setSize = qh.PortfolioSetSize;
         if (numOfKeys < setSize)
         {
@@ -1219,7 +1218,7 @@ namespace Apache.Geode.Client.FwkLib
       {
         Int32 numSet = 0;
         Int32 setSize = 0;
-        QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper();
+        QueryHelper<TKey, TVal> qh = QueryHelper<TKey, TVal>.GetHelper(CacheHelper<TKey, TVal>.DCache);
         TVal port;
         setSize = qh.PortfolioSetSize;
         numSet = 200 / setSize;
@@ -1339,7 +1338,7 @@ namespace Apache.Geode.Client.FwkLib
           FwkInfo("Sleeping for " + sleepTime + " millis");
           Thread.Sleep(sleepTime);
           region.GetSubscriptionService().RegisterAllKeys(isDurable, keys, isGetInitialValues, isReceiveValues);
-          String durableClientId = DistributedSystem.SystemProperties.DurableClientId;
+          String durableClientId = CacheHelper<TKey, TVal>.DCache.DistributedSystem.SystemProperties.DurableClientId;
           if (durableClientId.Length > 0)
           {
               CacheHelper<TKey, TVal>.DCache.ReadyForEvents();
@@ -2963,7 +2962,7 @@ namespace Apache.Geode.Client.FwkLib
               FwkInfo("Sleeping for " + sleepTime + " millis");
               Thread.Sleep(sleepTime);
               region.GetSubscriptionService().RegisterKeys(m_KeysA, isDurable, isGetInitialValues, isReceiveValues);
-              String durableClientId = DistributedSystem.SystemProperties.DurableClientId;
+              String durableClientId = CacheHelper<TKey, TVal>.DCache.DistributedSystem.SystemProperties.DurableClientId;
               if (durableClientId.Length > 0)
               {
                   CacheHelper<TKey, TVal>.DCache.ReadyForEvents();
@@ -3019,7 +3018,7 @@ namespace Apache.Geode.Client.FwkLib
                      verifyEntry(m_KeysA[i], expected);
                   templist.Clear();
               }
-              String durableClientId = DistributedSystem.SystemProperties.DurableClientId;
+              String durableClientId = CacheHelper<TKey, TVal>.DCache.DistributedSystem.SystemProperties.DurableClientId;
               if (durableClientId.Length > 0)
               {
                   CacheHelper<TKey, TVal>.DCache.ReadyForEvents();
@@ -4086,9 +4085,8 @@ private void checkUpdatedValue(TKey key, TVal value)
           int sleepMS = 2000;
           FwkInfo("Waiting for a period of silence for " + desiredSilenceSec + " seconds...");
           long desiredSilenceMS = desiredSilenceSec * 1000;
-          DateTime startTime = DateTime.Now;
-          long silenceStartTime = SmokePerf<TKey, TVal>.GetDateTimeMillis(startTime);
-          long currentTime = SmokePerf<TKey, TVal>.GetDateTimeMillis(startTime);
+          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)
@@ -4107,8 +4105,7 @@ private void checkUpdatedValue(TKey key, TVal value)
                   // restart the wait
                   silenceStartTime = lastEventTime;
               }
-              startTime = DateTime.Now;
-              currentTime = SmokePerf<TKey, TVal>.GetDateTimeMillis(startTime);
+              currentTime = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
           }
           long duration = currentTime - silenceStartTime;
           FwkInfo("Done waiting, clients have been silent for " + duration + " ms");
@@ -4263,7 +4260,7 @@ private void checkUpdatedValue(TKey key, TVal value)
 
           if (poolName != null)
           {
-            Pool pool = PoolManager.Find(poolName);
+            Pool pool = CacheHelper<TKey, TVal>.DCache.GetPoolManager().Find(poolName);
             if (pool.MultiuserAuthentication)
             {
               FwkInfo("pool is in multiuser mode and entering CreateMultiUserCacheAndRegion");
@@ -4372,7 +4369,7 @@ private void checkUpdatedValue(TKey key, TVal value)
           userProp.Insert(KeyStoreAliasProp, userName);
           userProp.Insert(KeyStorePasswordProp, "geode");
           //mu_cache = pool.CreateSecureUserCache(userProp);
-          //IRegionService mu_cache = CacheHelper.DCache.CreateAuthenticatedView(userProp, pool.Name);
+          //IRegionService mu_cache = CacheHelper<TKey, TVal>.DCache.CreateAuthenticatedView(userProp, pool.Name);
           IRegionService mu_cache = CacheHelper<TKey, TVal>.DCache.CreateAuthenticatedView(
             CacheHelper<TKey, TVal>.GetPkcsCredentialsForMU(
               pkcs.GetCredentials(userProp, "0:0")), pool.Name);

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/tests/cli/NewFwkLib/DeltaTest/DeltaTest.cs
----------------------------------------------------------------------
diff --git a/src/tests/cli/NewFwkLib/DeltaTest/DeltaTest.cs b/src/tests/cli/NewFwkLib/DeltaTest/DeltaTest.cs
index 8f3a046..be37c81 100644
--- a/src/tests/cli/NewFwkLib/DeltaTest/DeltaTest.cs
+++ b/src/tests/cli/NewFwkLib/DeltaTest/DeltaTest.cs
@@ -520,8 +520,8 @@ namespace Apache.Geode.Client.FwkLib
       {
         if (!isObjectRegistered)
         {
-          Serializable.RegisterTypeGeneric(DeltaTestImpl.CreateDeserializable);
-          Serializable.RegisterTypeGeneric(TestObject1.CreateDeserializable);
+          Serializable.RegisterTypeGeneric(DeltaTestImpl.CreateDeserializable, CacheHelper<TKey, TVal>.DCache);
+          Serializable.RegisterTypeGeneric(TestObject1.CreateDeserializable, CacheHelper<TKey, TVal>.DCache);
           isObjectRegistered = true;
         }
           IRegion<TKey, TVal> region = CreateRootRegion();

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/tests/cli/NewFwkLib/EventTest/EventTests.cs
----------------------------------------------------------------------
diff --git a/src/tests/cli/NewFwkLib/EventTest/EventTests.cs b/src/tests/cli/NewFwkLib/EventTest/EventTests.cs
index 5f9c4d4..6f3f8f1 100644
--- a/src/tests/cli/NewFwkLib/EventTest/EventTests.cs
+++ b/src/tests/cli/NewFwkLib/EventTest/EventTests.cs
@@ -519,7 +519,7 @@ namespace Apache.Geode.Client.FwkLib
       Region rootRegion;
       RegionAttributes attr;
 
-      rootRegionArray = CacheHelper.DCache.RootRegions();
+      rootRegionArray = CacheHelper<TKey, TVal>.DCache.RootRegions();
 
       int ulRegionCount = rootRegionArray.Length;
 
@@ -562,7 +562,7 @@ namespace Apache.Geode.Client.FwkLib
       {
         FwkException("Data not provided for 'regionName', failing.");
       }
-      Region region = CacheHelper.DCache.GetRegion(testRegionName);
+      Region region = CacheHelper<TKey, TVal>.DCache.GetRegion(testRegionName);
 
       int usePid = GetUIntValue("usePID");
       int pid = Util.PID;
@@ -631,7 +631,7 @@ namespace Apache.Geode.Client.FwkLib
       {
         FwkException("Data not provided for 'regionName', failing.");
       }
-      Region region = CacheHelper.DCache.GetRegion(testRegionName);
+      Region region = CacheHelper<TKey, TVal>.DCache.GetRegion(testRegionName);
 
       int usePid = GetUIntValue("usePID");
       int pid = Util.PID;
@@ -692,8 +692,8 @@ namespace Apache.Geode.Client.FwkLib
       FwkInfo("validateCacheContent()");
       string testRegionName = GetStringValue("testRegion");
       string validateRegionName = GetStringValue("validateRegion");
-      Region testRegion = CacheHelper.DCache.GetRegion(testRegionName);
-      Region validateRegion = CacheHelper.DCache.GetRegion(validateRegionName);
+      Region testRegion = CacheHelper<TKey, TVal>.DCache.GetRegion(testRegionName);
+      Region validateRegion = CacheHelper<TKey, TVal>.DCache.GetRegion(validateRegionName);
       ICacheableKey[] keyVector;
 
       keyVector = testRegion.GetKeys();
@@ -740,8 +740,8 @@ namespace Apache.Geode.Client.FwkLib
       string testRegionName = GetStringValue("testRegion");
       string validateRegionName = GetStringValue("validateRegion");
       string regionName = GetStringValue("regionName");
-      Region testRegion = CacheHelper.DCache.GetRegion(testRegionName);
-      Region validateRegion = CacheHelper.DCache.GetRegion(validateRegionName);
+      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
@@ -750,7 +750,7 @@ namespace Apache.Geode.Client.FwkLib
 
       testRegion.LocalDestroyRegion();
       CreateRootRegion();
-      Region region = CacheHelper.DCache.GetRegion(regionName);
+      Region region = CacheHelper<TKey, TVal>.DCache.GetRegion(regionName);
 
       FwkInfo(" Recreated Region name is " + region.Name);
 
@@ -807,8 +807,8 @@ namespace Apache.Geode.Client.FwkLib
       FwkInfo("doIterateOnEntry()");
       string testRegionName = GetStringValue("testRegion");
       string validateRegionName = GetStringValue("validateRegion");
-      Region testRegion = CacheHelper.DCache.GetRegion(testRegionName);
-      Region validateRegion = CacheHelper.DCache.GetRegion(validateRegionName);
+      Region testRegion = CacheHelper<TKey, TVal>.DCache.GetRegion(testRegionName);
+      Region validateRegion = CacheHelper<TKey, TVal>.DCache.GetRegion(validateRegionName);
 
       ICacheableKey[] keyVector = null;
       int keysInRegion = 1;
@@ -849,7 +849,7 @@ namespace Apache.Geode.Client.FwkLib
       {
         FwkException("Data not provided for 'regionName', failing.");
       }
-      Region region = CacheHelper.DCache.GetRegion(testRegionName);
+      Region region = CacheHelper<TKey, TVal>.DCache.GetRegion(testRegionName);
 
       int opsSecond = GetUIntValue("opsSecond");
       if (opsSecond < 0)
@@ -1150,7 +1150,7 @@ namespace Apache.Geode.Client.FwkLib
       // TODO: For lock
       // SpinLockGuard guard( m_lck );
       // TODO: setTask(taskId)
-      if (CacheHelper.DCache == null)
+      if (CacheHelper<TKey, TVal>.DCache == null)
       {
         Properties pp = new Properties();
         //TODO: Initialize? cacheInitialize( pp );
@@ -1448,7 +1448,7 @@ namespace Apache.Geode.Client.FwkLib
     public Region GetRandomRegion(bool bAllowRootRegion)
     {
       FwkInfo("Inside GetRandomRegion ... Check 1");
-      Region[] rootRegionVector = CacheHelper.DCache.RootRegions();
+      Region[] rootRegionVector = CacheHelper<TKey, TVal>.DCache.RootRegions();
       int irootSize = rootRegionVector.Length;
 
       Region[] subRegionVector;
@@ -1666,12 +1666,12 @@ namespace Apache.Geode.Client.FwkLib
 
     public int getAllRegionCount()
     {
-      if (CacheHelper.DCache == null)
+      if (CacheHelper<TKey, TVal>.DCache == null)
       {
         FwkSevere("Null cache pointer, no connection established.");
         return 0;
       }
-      Region[] rootRegions = CacheHelper.DCache.RootRegions();
+      Region[] rootRegions = CacheHelper<TKey, TVal>.DCache.RootRegions();
       int iRootSize = rootRegions.Length;
       int iTotalRegions = iRootSize;
 
@@ -1747,7 +1747,7 @@ namespace Apache.Geode.Client.FwkLib
     public Int32 getRegionCount()
     {
       FwkInfo("Check 1.1 Inside getRegionCount");
-      Region[] roots = CacheHelper.DCache.RootRegions();
+      Region[] roots = CacheHelper<TKey, TVal>.DCache.RootRegions();
       FwkInfo("Check 1.1 root region count = {0}", roots.Length);
       return roots.Length;
     }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/tests/cli/NewFwkLib/FunctionExecution/FunctionExecution.cs
----------------------------------------------------------------------
diff --git a/src/tests/cli/NewFwkLib/FunctionExecution/FunctionExecution.cs b/src/tests/cli/NewFwkLib/FunctionExecution/FunctionExecution.cs
index 9f7fabd..9195aa6 100644
--- a/src/tests/cli/NewFwkLib/FunctionExecution/FunctionExecution.cs
+++ b/src/tests/cli/NewFwkLib/FunctionExecution/FunctionExecution.cs
@@ -736,7 +736,7 @@ namespace Apache.Geode.Client.FwkLib
         string poolname = GetStringValue( "poolName" );
         string funcName = null;
         if(executionMode == "onServers" || executionMode  == "onServer"){
-          pptr = PoolManager/*<TKey, TVal>*/.Find(poolname);
+          pptr = CacheHelper<TKey, TVal>.DCache.GetPoolManager().Find(poolname);
           if(getresult)
             funcName = "ServerOperationsFunction";
           else
@@ -1137,7 +1137,7 @@ namespace Apache.Geode.Client.FwkLib
       Apache.Geode.Client.Execution<object> exc = null;
       try
       {
-        Pool/*<TKey, TVal>*/ pptr = PoolManager/*<TKey, TVal>*/.Find(poolname);
+        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


Mime
View raw message