geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbarr...@apache.org
Subject [11/23] geode-native git commit: GEODE-2741: Code cleanup to move to std::shared_ptr
Date Tue, 06 Jun 2017 17:56:37 GMT
http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/EventIdMap.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/EventIdMap.cpp b/src/cppcache/src/EventIdMap.cpp
index ec61be3..778205c 100644
--- a/src/cppcache/src/EventIdMap.cpp
+++ b/src/cppcache/src/EventIdMap.cpp
@@ -36,9 +36,9 @@ EventIdMapEntry EventIdMap::make(EventIdPtr eventid) {
 
 bool EventIdMap::isDuplicate(EventSourcePtr key, EventSequencePtr value) {
   GUARD_MAP;
-  EventIdMapType::Iterator entry = m_map.find(key);
+  const auto& entry = m_map.find(key);
 
-  if (entry != m_map.end() && ((*value.get()) <= (*entry.second().get()))) {
+  if (entry != m_map.end() && ((*value) <= (*(entry->second)))) {
     return true;
   }
   return false;
@@ -49,17 +49,17 @@ bool EventIdMap::put(EventSourcePtr key, EventSequencePtr value, bool onlynew) {
 
   value->touch(m_expiry);
 
-  EventIdMapType::Iterator entry = m_map.find(key);
+  const auto& entry = m_map.find(key);
 
   if (entry != m_map.end()) {
-    if (onlynew && ((*value.get()) <= (*entry.second().get()))) {
+    if (onlynew && ((*value) <= (*(entry->second)))) {
       return false;
     } else {
-      m_map.update(key, value);
+      m_map[key] = value;
       return true;
     }
   } else {
-    m_map.insert(key, value);
+    m_map[key] = value;
     return true;
   }
 }
@@ -67,10 +67,10 @@ bool EventIdMap::put(EventSourcePtr key, EventSequencePtr value, bool onlynew) {
 bool EventIdMap::touch(EventSourcePtr key) {
   GUARD_MAP;
 
-  EventIdMapType::Iterator entry = m_map.find(key);
+  const auto& entry = m_map.find(key);
 
   if (entry != m_map.end()) {
-    entry.second()->touch(m_expiry);
+    entry->second->touch(m_expiry);
     return true;
   } else {
     return false;
@@ -80,7 +80,7 @@ bool EventIdMap::touch(EventSourcePtr key) {
 bool EventIdMap::remove(EventSourcePtr key) {
   GUARD_MAP;
 
-  EventIdMapType::Iterator entry = m_map.find(key);
+  const auto& entry = m_map.find(key);
 
   if (entry != m_map.end()) {
     m_map.erase(key);
@@ -96,14 +96,13 @@ EventIdMapEntryList EventIdMap::getUnAcked() {
 
   EventIdMapEntryList entries;
 
-  for (EventIdMapType::Iterator entry = m_map.begin(); entry != m_map.end();
-       entry++) {
-    if (entry.second()->getAcked()) {
+  for (const auto& entry : m_map) {
+    if (entry.second->getAcked()) {
       continue;
     }
 
-    entry.second()->setAcked(true);
-    entries.push_back(std::make_pair(entry.first(), entry.second()));
+    entry.second->setAcked(true);
+    entries.push_back(std::make_pair(entry.first, entry.second));
   }
 
   return entries;
@@ -114,12 +113,11 @@ uint32_t EventIdMap::clearAckedFlags(EventIdMapEntryList& entries) {
 
   uint32_t cleared = 0;
 
-  for (EventIdMapEntryList::iterator item = entries.begin();
-       item != entries.end(); item++) {
-    EventIdMapType::Iterator entry = m_map.find((*item).first);
+  for (const auto& item : entries) {
+    const auto& entry = m_map.find((item).first);
 
     if (entry != m_map.end()) {
-      entry.second()->setAcked(false);
+      entry->second->setAcked(false);
       cleared++;
     }
   }
@@ -136,14 +134,13 @@ uint32_t EventIdMap::expire(bool onlyacked) {
 
   ACE_Time_Value current = ACE_OS::gettimeofday();
 
-  for (EventIdMapType::Iterator entry = m_map.begin(); entry != m_map.end();
-       entry++) {
-    if (onlyacked && !entry.second()->getAcked()) {
+  for (const auto& entry : m_map) {
+    if (onlyacked && !entry.second->getAcked()) {
       continue;
     }
 
-    if (entry.second()->getDeadline() < current) {
-      entries.push_back(std::make_pair(entry.first(), entry.second()));
+    if (entry.second->getDeadline() < current) {
+      entries.push_back(std::make_pair(entry.first, entry.second));
     }
   }
 
@@ -156,68 +153,6 @@ uint32_t EventIdMap::expire(bool onlyacked) {
   return expired;
 }
 
-EventSource::EventSource(const char* memId, int32_t memIdLen, int64_t thrId) {
-  init();
-
-  if (memId == NULL || memIdLen <= 0) {
-    return;
-  }
-
-  m_thrId = thrId;
-
-  m_srcIdLen = memIdLen + sizeof(thrId);  // 8; // sizeof(thrId or int64_t);
-  m_srcId = new char[m_srcIdLen];
-  memcpy(m_srcId, memId, memIdLen);
-
-  // convert the int64 thrId to a byte-array and place at the end of m_srcId
-  memcpy(m_srcId + memIdLen, &thrId, sizeof(thrId));
-}
-
-EventSource::~EventSource() { clear(); }
-
-void EventSource::init() {
-  m_srcId = NULL;
-  m_srcIdLen = 0;
-  m_hash = 0;
-  m_thrId = -1;
-}
-
-void EventSource::clear() {
-  delete[] m_srcId;
-  init();
-}
-
-char* EventSource::getSrcId() { return m_srcId; }
-
-int32_t EventSource::getSrcIdLen() { return m_srcIdLen; }
-
-char* EventSource::getMemId() { return m_srcId; }
-
-int32_t EventSource::getMemIdLen() { return m_srcIdLen - sizeof(m_thrId); }
-
-int64_t EventSource::getThrId() { return m_thrId; }
-
-int32_t EventSource::hashcode() {
-  if (m_srcId == NULL || m_srcIdLen <= 0) {
-    return 0;
-  }
-
-  if (m_hash == 0) {
-    m_hash = ACE::hash_pjw(m_srcId, m_srcIdLen);
-  }
-
-  return m_hash;
-}
-
-bool EventSource::operator==(const EventSource& rhs) const {
-  if (this->m_srcId == NULL || (&rhs)->m_srcId == NULL ||
-      this->m_srcIdLen != (&rhs)->m_srcIdLen) {
-    return false;
-  }
-
-  return memcmp(this->m_srcId, (&rhs)->m_srcId, this->m_srcIdLen) == 0;
-}
-
 void EventSequence::init() {
   m_seqNum = -1;
   m_acked = false;

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/EventIdMap.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/EventIdMap.hpp b/src/cppcache/src/EventIdMap.hpp
index a752289..8b4f9b9 100644
--- a/src/cppcache/src/EventIdMap.hpp
+++ b/src/cppcache/src/EventIdMap.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_EVENTIDMAP_H_
-#define GEODE_EVENTIDMAP_H_
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -20,32 +15,38 @@
  * limitations under the License.
  */
 
+#pragma once
+
+#ifndef GEODE_EVENTIDMAP_H_
+#define GEODE_EVENTIDMAP_H_
+
+#include <functional>
+#include <memory>
+#include <unordered_map>
+#include <vector>
+#include <utility>
+
 #include <ace/ACE.h>
 #include <ace/Time_Value.h>
 #include <ace/Recursive_Thread_Mutex.h>
 #include <ace/Guard_T.h>
 
-#include "EventId.hpp"
-#include <geode/HashMapT.hpp>
+#include <geode/utils.hpp>
 #include <geode/SharedPtr.hpp>
 
-#include <vector>
-#include <utility>
+#include "EventId.hpp"
+#include "EventSource.hpp"
 
 namespace apache {
 namespace geode {
 namespace client {
 
-class EventSource;
 class EventSequence;
 class EventIdMap;
 
-typedef SharedPtr<EventSource> EventSourcePtr;
 typedef SharedPtr<EventSequence> EventSequencePtr;
 typedef SharedPtr<EventIdMap> EventIdMapPtr;
 
-typedef HashMapT<EventSourcePtr, EventSequencePtr> EventIdMapType;
-
 typedef std::pair<EventSourcePtr, EventSequencePtr> EventIdMapEntry;
 typedef std::vector<EventIdMapEntry> EventIdMapEntryList;
 
@@ -60,8 +61,14 @@ typedef ACE_Guard<ACE_Recursive_Thread_Mutex> MapGuard;
  * expiry of idle event IDs from notifications.
  */
 class CPPCACHE_EXPORT EventIdMap : public SharedBase {
+ private:
+  typedef std::unordered_map<EventSourcePtr, EventSequencePtr,
+                             dereference_hash<EventSourcePtr>,
+                             dereference_equal_to<EventSourcePtr>>
+      map_type;
+
   int32_t m_expiry;
-  EventIdMapType m_map;
+  map_type m_map;
   ACE_Recursive_Thread_Mutex m_lock;
 
   // hidden
@@ -69,11 +76,7 @@ class CPPCACHE_EXPORT EventIdMap : public SharedBase {
   EventIdMap &operator=(const EventIdMap &);
 
  public:
-  EventIdMap()
-      : /* adongre
-         * CID 28935: Uninitialized scalar field (UNINIT_CTOR)
-         */
-        m_expiry(0){};
+  EventIdMap() : m_expiry(0){};
 
   void clear();
 
@@ -126,42 +129,6 @@ class CPPCACHE_EXPORT EventIdMap : public SharedBase {
   uint32_t expire(bool onlyacked);
 };
 
-/** @class EventSource
- *
- * EventSource is the combination of MembershipId and ThreadId from the EventId
- */
-class CPPCACHE_EXPORT EventSource : public SharedBase {
-  char *m_srcId;
-  int32_t m_srcIdLen;
-  int64_t m_thrId;
-
-  uint32_t m_hash;
-
-  void init();
-
-  // hide copy ctor and assignment operator
-  EventSource();
-  EventSource(const EventSource &);
-  EventSource &operator=(const EventSource &);
-
- public:
-  void clear();
-
-  EventSource(const char *memId, int32_t memIdLen, int64_t thrId);
-  ~EventSource();
-
-  int32_t hashcode();
-  bool operator==(const EventSource &rhs) const;
-
-  // Accessors
-
-  char *getSrcId();
-  int32_t getSrcIdLen();
-  char *getMemId();
-  int32_t getMemIdLen();
-  int64_t getThrId();
-};
-
 /** @class EventSequence
  *
  * EventSequence is the combination of SequenceNum from EventId, a timestamp and
@@ -202,5 +169,4 @@ class CPPCACHE_EXPORT EventSequence : public SharedBase {
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
-
 #endif  // GEODE_EVENTIDMAP_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/EventSource.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/EventSource.cpp b/src/cppcache/src/EventSource.cpp
new file mode 100644
index 0000000..d303416
--- /dev/null
+++ b/src/cppcache/src/EventSource.cpp
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 "EventIdMap.hpp"
+
+namespace apache {
+namespace geode {
+namespace client {
+
+EventSource::EventSource(const char* memId, int32_t memIdLen, int64_t thrId) {
+  init();
+
+  if (memId == nullptr || memIdLen <= 0) {
+    return;
+  }
+
+  m_thrId = thrId;
+
+  m_srcIdLen = memIdLen + sizeof(thrId);  // 8; // sizeof(thrId or int64_t);
+  m_srcId = new char[m_srcIdLen];
+  memcpy(m_srcId, memId, memIdLen);
+
+  // convert the int64 thrId to a byte-array and place at the end of m_srcId
+  memcpy(m_srcId + memIdLen, &thrId, sizeof(thrId));
+}
+
+EventSource::~EventSource() { clear(); }
+
+void EventSource::init() {
+  m_srcId = nullptr;
+  m_srcIdLen = 0;
+  m_hash = 0;
+  m_thrId = -1;
+}
+
+void EventSource::clear() {
+  delete[] m_srcId;
+  init();
+}
+
+char* EventSource::getSrcId() { return m_srcId; }
+
+int32_t EventSource::getSrcIdLen() { return m_srcIdLen; }
+
+char* EventSource::getMemId() { return m_srcId; }
+
+int32_t EventSource::getMemIdLen() { return m_srcIdLen - sizeof(m_thrId); }
+
+int64_t EventSource::getThrId() { return m_thrId; }
+
+int32_t EventSource::hashcode() const {
+  if (m_srcId == nullptr || m_srcIdLen <= 0) {
+    return 0;
+  }
+
+  if (m_hash == 0) {
+    m_hash = ACE::hash_pjw(m_srcId, m_srcIdLen);
+  }
+
+  return m_hash;
+}
+
+bool EventSource::operator==(const EventSource& rhs) const {
+  if (this->m_srcId == nullptr || (&rhs)->m_srcId == nullptr ||
+      this->m_srcIdLen != (&rhs)->m_srcIdLen) {
+    return false;
+  }
+
+  return memcmp(this->m_srcId, (&rhs)->m_srcId, this->m_srcIdLen) == 0;
+}
+
+}  // namespace client
+}  // namespace geode
+}  // namespace apache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/EventSource.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/EventSource.hpp b/src/cppcache/src/EventSource.hpp
new file mode 100644
index 0000000..8a0f7e0
--- /dev/null
+++ b/src/cppcache/src/EventSource.hpp
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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_EVENTSOURCE_H_
+#define GEODE_EVENTSOURCE_H_
+
+#include <functional>
+#include <memory>
+
+namespace apache {
+namespace geode {
+namespace client {
+
+/** @class EventSource
+ *
+ * EventSource is the combination of MembershipId and ThreadId from the EventId
+ */
+class CPPCACHE_EXPORT EventSource : public SharedBase {
+  char *m_srcId;
+  int32_t m_srcIdLen;
+  int64_t m_thrId;
+
+  mutable uint32_t m_hash;
+
+  void init();
+
+  // hide copy ctor and assignment operator
+  EventSource();
+  EventSource(const EventSource &);
+  EventSource &operator=(const EventSource &);
+
+ public:
+  void clear();
+
+  EventSource(const char *memId, int32_t memIdLen, int64_t thrId);
+  ~EventSource();
+
+  int32_t hashcode() const;
+  bool operator==(const EventSource &rhs) const;
+
+  // Accessors
+
+  char *getSrcId();
+  int32_t getSrcIdLen();
+  char *getMemId();
+  int32_t getMemIdLen();
+  int64_t getThrId();
+
+  struct hash {
+    inline std::size_t operator()(const EventSource &val) const {
+      return val.hashcode();
+    }
+
+    inline std::size_t operator()(const EventSource *val) const {
+      return val->hashcode();
+    }
+
+    inline std::size_t operator()(
+        const std::shared_ptr<EventSource> &val) const {
+      return val->hashcode();
+    }
+  };
+
+  struct equal_to {
+    inline bool operator()(const EventSource &lhs,
+                           const EventSource &rhs) const {
+      return lhs == rhs;
+    }
+
+    inline bool operator()(const EventSource *lhs,
+                           const EventSource *rhs) const {
+      return (*lhs) == (*rhs);
+    }
+
+    inline bool operator()(const std::shared_ptr<EventSource> &lhs,
+                           const std::shared_ptr<EventSource> &rhs) const {
+      return (*lhs) == (*rhs);
+    }
+  };
+};
+
+typedef SharedPtr<EventSource> EventSourcePtr;
+
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+namespace std {
+
+template <>
+struct hash<apache::geode::client::EventSource> {
+  typedef apache::geode::client::EventSource argument_type;
+  typedef size_t result_type;
+  size_t operator()(const apache::geode::client::EventSource &val) const {
+    return apache::geode::client::EventSource::hash{}(val);
+  }
+};
+
+}  // namespace std
+#endif  // GEODE_EVENTSOURCE_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/EvictionController.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/EvictionController.cpp b/src/cppcache/src/EvictionController.cpp
index 067e77f..726e464 100644
--- a/src/cppcache/src/EvictionController.cpp
+++ b/src/cppcache/src/EvictionController.cpp
@@ -159,7 +159,7 @@ void EvictionController::evict(int32_t percentage) {
     m_cacheImpl->getRegion(str.c_str(), rptr);
     if (rptr != nullptr) {
       RegionInternal* rimpl = dynamic_cast<RegionInternal*>(rptr.get());
-      if (rimpl != NULL) {
+      if (rimpl != nullptr) {
         rimpl->evict(percentage);
       }
     }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/Exception.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/Exception.cpp b/src/cppcache/src/Exception.cpp
index 80aea76..49967bf 100644
--- a/src/cppcache/src/Exception.cpp
+++ b/src/cppcache/src/Exception.cpp
@@ -143,7 +143,7 @@ ACE_TSS<TSSExceptionString> TSSExceptionString::s_tssExceptionMsg;
 
 void setTSSExceptionMessage(const char* exMsg) {
   TSSExceptionString::s_tssExceptionMsg->str().clear();
-  if (exMsg != NULL) {
+  if (exMsg != nullptr) {
     TSSExceptionString::s_tssExceptionMsg->str().append(exMsg);
   }
 }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/ExceptionTypes.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/ExceptionTypes.cpp b/src/cppcache/src/ExceptionTypes.cpp
index 653f3ca..7ae4e2e 100644
--- a/src/cppcache/src/ExceptionTypes.cpp
+++ b/src/cppcache/src/ExceptionTypes.cpp
@@ -30,8 +30,8 @@ const char* getTSSExceptionMessage();
 void GfErrTypeThrowException(const char* str, GfErrType err) {
   std::string func;
   const char* exMsg = getTSSExceptionMessage();
-  if (exMsg != NULL && exMsg[0] == '\0') {
-    exMsg = NULL;
+  if (exMsg != nullptr && exMsg[0] == '\0') {
+    exMsg = nullptr;
   } else {
     func.append(str);
     func.append(": ");
@@ -40,300 +40,305 @@ void GfErrTypeThrowException(const char* str, GfErrType err) {
   switch (err) {
     case GF_NOTCON: {
       NotConnectedException ex(
-          str, (exMsg != NULL ? exMsg : ": not connected to Geode"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": not connected to Geode"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_MSG: {
       MessageException ex(
-          str, (exMsg != NULL ? exMsg
-                              : ": message from server could not be handled"));
-      setTSSExceptionMessage(NULL);
+          str,
+          (exMsg != nullptr ? exMsg
+                            : ": message from server could not be handled"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHESERVER_EXCEPTION: {
       CacheServerException ex(
           str,
-          (exMsg != NULL ? exMsg : ": exception happened at cache server"));
-      setTSSExceptionMessage(NULL);
+          (exMsg != nullptr ? exMsg : ": exception happened at cache server"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_NOTOWN: {
-      NotOwnerException ex(str, (exMsg != NULL ? exMsg : ": not own the lock"));
-      setTSSExceptionMessage(NULL);
+      NotOwnerException ex(str,
+                           (exMsg != nullptr ? exMsg : ": not own the lock"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_REGION_NOT_FOUND: {
       CacheServerException ex(
-          str, (exMsg != NULL ? exMsg : ": region not found on server"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": region not found on server"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_REGION_NOT_GLOBAL: {
-      IllegalStateException ex(str,
-                               (exMsg != NULL ? exMsg : ": region not global"));
-      setTSSExceptionMessage(NULL);
+      IllegalStateException ex(
+          str, (exMsg != nullptr ? exMsg : ": region not global"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_ILLEGAL_ARGUMENT_EXCEPTION: {
       IllegalArgumentException ex(
-          str, (exMsg != NULL ? exMsg : ": illegal argument"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": illegal argument"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_ILLEGAL_STATE_EXCEPTION: {
       IllegalStateException ex(str,
-                               (exMsg != NULL ? exMsg : ": illegal State"));
-      setTSSExceptionMessage(NULL);
+                               (exMsg != nullptr ? exMsg : ": illegal State"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_WRITER_EXCEPTION: {
       CacheWriterException ex(
-          str, (exMsg != NULL ? exMsg : ": exception on server during write"));
-      setTSSExceptionMessage(NULL);
+          str,
+          (exMsg != nullptr ? exMsg : ": exception on server during write"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHEWRITER_ERROR: {
       CacheWriterException ex(
-          str, (exMsg != NULL ? exMsg : ": exception in CacheWriter"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": exception in CacheWriter"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_LOADER_EXCEPTION: {
       CacheLoaderException ex(
-          str, (exMsg != NULL ? exMsg : ": exception in CacheLoader"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": exception in CacheLoader"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_LISTENER_EXCEPTION: {
       CacheListenerException ex(
-          str, (exMsg != NULL ? exMsg : ": exception in CacheListener"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": exception in CacheListener"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_REGION_INVALID: {
       RegionDestroyedException ex(
-          str, (exMsg != NULL ? exMsg : ": region not valid"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": region not valid"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_PROXY: {
       CacheProxyException ex(
-          str, (exMsg != NULL ? exMsg : ": error in Cache proxy"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": error in Cache proxy"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_IOERR: {
       GeodeIOException ex(
-          str, (exMsg != NULL ? exMsg : ": Input/Output error in operation"));
-      setTSSExceptionMessage(NULL);
+          str,
+          (exMsg != nullptr ? exMsg : ": Input/Output error in operation"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_ENOENT: {
-      NoSystemException ex(str,
-                           (exMsg != NULL ? exMsg : ": entity does not exist"));
-      setTSSExceptionMessage(NULL);
+      NoSystemException ex(
+          str, (exMsg != nullptr ? exMsg : ": entity does not exist"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_REGION_KEYS_NOT_STRINGS: {
       IllegalArgumentException ex(
-          str,
-          (exMsg != NULL ? exMsg : ": region entries do not support C access"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg
+                                 : ": region entries do not support C access"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_REGION_ENTRY_NOT_BYTES: {
       IllegalArgumentException ex(
-          str,
-          (exMsg != NULL ? exMsg
-                         : ": existing non-null values was not a byte array"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr
+                    ? exMsg
+                    : ": existing non-null values was not a byte array"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_TIMEOUT_EXCEPTION: {
-      TimeoutException ex(str, (exMsg != NULL ? exMsg : ": timed out"));
-      setTSSExceptionMessage(NULL);
+      TimeoutException ex(str, (exMsg != nullptr ? exMsg : ": timed out"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_TIMOUT: {
-      TimeoutException ex(str, (exMsg != NULL ? exMsg : ": timed out"));
-      setTSSExceptionMessage(NULL);
+      TimeoutException ex(str, (exMsg != nullptr ? exMsg : ": timed out"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CLIENT_WAIT_TIMEOUT: {
       TimeoutException ex(
-          str,
-          (exMsg != NULL ? exMsg
-                         : ": timed out, possibly bucket is not available."));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr
+                    ? exMsg
+                    : ": timed out, possibly bucket is not available."));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_ENOMEM: {
-      OutOfMemoryException ex(str, (exMsg != NULL ? exMsg : ": Out of memory"));
-      setTSSExceptionMessage(NULL);
+      OutOfMemoryException ex(str,
+                              (exMsg != nullptr ? exMsg : ": Out of memory"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_ERANGE: {
       BufferSizeExceededException ex(
-          str, (exMsg != NULL ? exMsg : ": Buffer Size Exceeded"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": Buffer Size Exceeded"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_LEASE_EXPIRED_EXCEPTION: {
       LeaseExpiredException ex(
-          str, (exMsg != NULL ? exMsg : ": lock Lease Expired On you"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": lock Lease Expired On you"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_REGION_EXISTS_EXCEPTION: {
       RegionExistsException ex(
-          str, (exMsg != NULL ? exMsg : ": Named Region Exists"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": Named Region Exists"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_ENTRY_NOT_FOUND: {
-      EntryNotFoundException ex(str,
-                                (exMsg != NULL ? exMsg : ": Entry not found"));
-      setTSSExceptionMessage(NULL);
+      EntryNotFoundException ex(
+          str, (exMsg != nullptr ? exMsg : ": Entry not found"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_ENTRY_EXISTS: {
       EntryExistsException ex(
           str,
-          (exMsg != NULL ? exMsg : ": Entry already exists in the region"));
-      setTSSExceptionMessage(NULL);
+          (exMsg != nullptr ? exMsg : ": Entry already exists in the region"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_ENTRY_DESTROYED_EXCEPTION: {
       EntryDestroyedException ex(
-          str, (exMsg != NULL ? exMsg : ": Entry has been destroyed"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": Entry has been destroyed"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_REGION_DESTROYED_EXCEPTION: {
       RegionDestroyedException ex(
-          str, (exMsg != NULL ? exMsg : ": Named Region Destroyed"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": Named Region Destroyed"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_CLOSED_EXCEPTION: {
       CacheClosedException ex(
-          str, (exMsg != NULL ? exMsg : ": Cache has been closed"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": Cache has been closed"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_STATISTICS_DISABLED_EXCEPTION: {
       StatisticsDisabledException ex(
-          str,
-          (exMsg != NULL ? exMsg
-                         : ": Statistics have been disabled for the region"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr
+                    ? exMsg
+                    : ": Statistics have been disabled for the region"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION: {
       ConcurrentModificationException ex(
-          str,
-          (exMsg != NULL ? exMsg : ": Concurrent modification in the cache"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg
+                                 : ": Concurrent modification in the cache"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_NOT_AUTHORIZED_EXCEPTION: {
       NotAuthorizedException ex(
-          str, (exMsg != NULL ? exMsg : ": unauthorized operation"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": unauthorized operation"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_AUTHENTICATION_FAILED_EXCEPTION: {
       AuthenticationFailedException ex(
-          str, (exMsg != NULL ? exMsg : ": authentication failed"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": authentication failed"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_AUTHENTICATION_REQUIRED_EXCEPTION: {
       AuthenticationRequiredException ex(
-          str, (exMsg != NULL ? exMsg : ": no authentication provided"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": no authentication provided"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_DUPLICATE_DURABLE_CLIENT: {
       DuplicateDurableClientException ex(
-          str, (exMsg != NULL ? exMsg : ": Duplicate Durable Client Id"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": Duplicate Durable Client Id"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_REMOTE_QUERY_EXCEPTION: {
-      QueryException ex(str, (exMsg != NULL ? exMsg : ": Query failed"));
-      setTSSExceptionMessage(NULL);
+      QueryException ex(str, (exMsg != nullptr ? exMsg : ": Query failed"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_CACHE_LOCATOR_EXCEPTION: {
       auto exCause = std::make_shared<NoAvailableLocatorsException>(
-          str, (exMsg != NULL ? exMsg : ": No locators available"));
+          str, (exMsg != nullptr ? exMsg : ": No locators available"));
       NotConnectedException ex(
-          str, (exMsg != NULL ? exMsg : ": No locators available"), false,
+          str, (exMsg != nullptr ? exMsg : ": No locators available"), false,
           exCause);
-      setTSSExceptionMessage(NULL);
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_ALL_CONNECTIONS_IN_USE_EXCEPTION: {
       AllConnectionsInUseException ex(
-          str, (exMsg != NULL ? exMsg : ": All connections are in use"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": All connections are in use"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_FUNCTION_EXCEPTION: {
       FunctionExecutionException ex(
-          str, (exMsg != NULL ? exMsg : ": Function execution failed"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": Function execution failed"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_DISKFULL: {
-      DiskFailureException ex(str, (exMsg != NULL ? exMsg : ": Disk full"));
-      setTSSExceptionMessage(NULL);
+      DiskFailureException ex(str, (exMsg != nullptr ? exMsg : ": Disk full"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_ROLLBACK_EXCEPTION: {
       RollbackException ex(
-          str, (exMsg != NULL ? exMsg : ": Transaction rolled back"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": Transaction rolled back"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_COMMIT_CONFLICT_EXCEPTION: {
       CommitConflictException ex(
-          str, (exMsg != NULL ? exMsg : ": Commit conflict exception"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": Commit conflict exception"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_TRANSACTION_DATA_REBALANCED_EXCEPTION: {
       TransactionDataRebalancedException ex(
-          str,
-          (exMsg != NULL ? exMsg : ": Transaction data rebalanced exception"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg
+                                 : ": Transaction data rebalanced exception"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_TRANSACTION_DATA_NODE_HAS_DEPARTED_EXCEPTION: {
       TransactionDataNodeHasDepartedException ex(
-          str,
-          (exMsg != NULL ? exMsg
-                         : ": Transaction data node has departed exception"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr
+                    ? exMsg
+                    : ": Transaction data node has departed exception"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     case GF_PUTALL_PARTIAL_RESULT_EXCEPTION: {
       PutAllPartialResultException ex(
-          str, (exMsg != NULL ? exMsg : ": PutAll Partial exception"));
-      setTSSExceptionMessage(NULL);
+          str, (exMsg != nullptr ? exMsg : ": PutAll Partial exception"));
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
     default: {
       char buf[64];
       LOGINFO("error code: %d", err);
-      if (exMsg == NULL) {
+      if (exMsg == nullptr) {
         ACE_OS::snprintf(buf, 64, "Unknown error code[0x%X]", err);
         exMsg = buf;
       }
       UnknownException ex(str, exMsg);
-      setTSSExceptionMessage(NULL);
+      setTSSExceptionMessage(nullptr);
       throw ex;
     }
   }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/ExecutionImpl.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/ExecutionImpl.cpp b/src/cppcache/src/ExecutionImpl.cpp
index 84db490..3a9e1b1 100644
--- a/src/cppcache/src/ExecutionImpl.cpp
+++ b/src/cppcache/src/ExecutionImpl.cpp
@@ -66,7 +66,7 @@ std::vector<int8_t>* ExecutionImpl::getFunctionAttributes(const char* func) {
   if (itr != m_func_attrs.end()) {
     return itr->second;
   }
-  return NULL;
+  return nullptr;
 }
 
 ResultCollectorPtr ExecutionImpl::execute(CacheableVectorPtr& routingObj,
@@ -93,11 +93,11 @@ ResultCollectorPtr ExecutionImpl::execute(const char* fn, uint32_t timeout) {
 
   std::vector<int8_t>* attr = getFunctionAttributes(fn);
   {
-    if (attr == NULL) {
+    if (attr == nullptr) {
       ACE_Guard<ACE_Recursive_Thread_Mutex> _guard(m_func_attrs_lock);
       GfErrType err = GF_NOERR;
       attr = getFunctionAttributes(fn);
-      if (attr == NULL) {
+      if (attr == nullptr) {
         if (m_region != nullptr) {
           err = dynamic_cast<ThinClientRegion*>(m_region.get())
                     ->getFuncAttributes(fn, &attr);
@@ -146,7 +146,7 @@ ResultCollectorPtr ExecutionImpl::execute(const char* fn, uint32_t timeout) {
            isHAHasResultOptimizeForWrite);
   TXState* txState = TSSTXStateWrapper::s_geodeTSSTXState->getTXState();
 
-  if (txState != NULL && m_allServer == true) {
+  if (txState != nullptr && m_allServer == true) {
     throw UnsupportedOperationException(
         "Execution::execute: Transaction function execution on all servers is "
         "not supported");
@@ -158,7 +158,7 @@ ResultCollectorPtr ExecutionImpl::execute(const char* fn, uint32_t timeout) {
       retryAttempts = m_pool->getRetryAttempts();
     }
 
-    //    if(txState != NULL && !txState->isReplay())
+    //    if(txState != nullptr && !txState->isReplay())
     //    {
     //		auto args = std::make_shared<VectorOfCacheable>();
     //		args->push_back(m_args);
@@ -167,50 +167,61 @@ ResultCollectorPtr ExecutionImpl::execute(const char* fn, uint32_t timeout) {
     //		args->push_back(CacheableString::create(func));
     //		args->push_back(CacheableInt32::create(timeout));
     //		txState->recordTXOperation(GF_EXECUTE_FUNCTION,
-    // m_region==nullptr?NULL:m_region->getFullPath(), nullptr, args);
+    // m_region==nullptr?nullptr:m_region->getFullPath(), nullptr, args);
     //    }
     //    try{
     if (m_pool != nullptr && m_pool->getPRSingleHopEnabled()) {
-      ThinClientPoolDM* tcrdm = dynamic_cast<ThinClientPoolDM*>(m_pool.get());
-      if (tcrdm == NULL) {
+      auto tcrdm = std::dynamic_pointer_cast<ThinClientPoolDM>(m_pool);
+      if (!tcrdm) {
         throw IllegalArgumentException(
             "Execute: pool cast to ThinClientPoolDM failed");
       }
-      ClientMetadataService* cms = tcrdm->getClientMetaDataService();
-      CacheableHashSetPtr failedNodes = CacheableHashSet::create();
-      if ((m_routingObj == nullptr || m_routingObj->empty()) &&
-          txState ==
-              NULL) {  // For transactions we should not create multiple threads
+      auto cms = tcrdm->getClientMetaDataService();
+      auto failedNodes = CacheableHashSet::create();
+      if ((!m_routingObj || m_routingObj->empty()) &&
+          txState == nullptr) {  // For transactions we should not create
+                                 // multiple threads
         LOGDEBUG("ExecutionImpl::execute: m_routingObj is empty");
-        HashMapT<BucketServerLocationPtr, CacheableHashSetPtr>* locationMap =
-            cms->groupByServerToAllBuckets(
-                m_region,
-                /*serverOptimizeForWrite*/ (isHAHasResultOptimizeForWrite & 4));
-        if (locationMap == NULL || locationMap->empty()) {
+        auto serverToBucketsMap = cms->groupByServerToAllBuckets(
+            m_region,
+            /*serverOptimizeForWrite*/ (isHAHasResultOptimizeForWrite & 4));
+        if (!serverToBucketsMap || serverToBucketsMap->empty()) {
           LOGDEBUG(
               "ExecutionImpl::execute: m_routingObj is empty and locationMap "
               "is also empty so use old FE onRegion");
-          dynamic_cast<ThinClientRegion*>(m_region.get())
+          std::dynamic_pointer_cast<ThinClientRegion>(m_region)
               ->executeFunction(
                   fn, m_args, m_routingObj, isHAHasResultOptimizeForWrite, m_rc,
                   (isHAHasResultOptimizeForWrite & 1) ? retryAttempts : 0,
                   timeout);
           cms->enqueueForMetadataRefresh(m_region->getFullPath(), 0);
         } else {
+          // convert server to bucket map to server to key map where bucket id
+          // is key.
+          auto serverToKeysMap =
+              std::make_shared<ClientMetadataService::ServerToKeysMap>(
+                  serverToBucketsMap->size());
+          for (const auto& entry : *serverToBucketsMap) {
+            auto keys =
+                std::make_shared<CacheableHashSet>(entry.second->size());
+            for (const auto& bucket : *(entry.second)) {
+              keys->insert(CacheableInt32::create(bucket));
+            }
+            serverToKeysMap->emplace(entry.first, keys);
+          }
           LOGDEBUG(
               "ExecutionImpl::execute: withoutFilter and locationMap is not "
               "empty");
-          bool reExecute =
-              dynamic_cast<ThinClientRegion*>(m_region.get())
-                  ->executeFunctionSH(fn, m_args, isHAHasResultOptimizeForWrite,
-                                      m_rc, locationMap, failedNodes, timeout,
-                                      /*allBuckets*/ true);
-          delete locationMap;
+          bool reExecute = std::dynamic_pointer_cast<ThinClientRegion>(m_region)
+                               ->executeFunctionSH(
+                                   fn, m_args, isHAHasResultOptimizeForWrite,
+                                   m_rc, serverToKeysMap, failedNodes, timeout,
+                                   /*allBuckets*/ true);
           if (reExecute) {  // Fallback to old FE onREgion
             if (isHAHasResultOptimizeForWrite & 1) {  // isHA = true
               m_rc->clearResults();
               CacheableVectorPtr rs =
-                  dynamic_cast<ThinClientRegion*>(m_region.get())
+                  std::dynamic_pointer_cast<ThinClientRegion>(m_region)
                       ->reExecuteFunction(fn, m_args, m_routingObj,
                                           isHAHasResultOptimizeForWrite, m_rc,
                                           (isHAHasResultOptimizeForWrite & 1)
@@ -236,12 +247,11 @@ ResultCollectorPtr ExecutionImpl::execute(const char* fn, uint32_t timeout) {
                 (isHAHasResultOptimizeForWrite & 1) ? retryAttempts : 0,
                 timeout);
       } else {
-        if (txState == NULL) {
-          HashMapT<BucketServerLocationPtr, CacheableHashSetPtr>* locationMap =
-              cms->getServerToFilterMapFESHOP(
-                  &m_routingObj, m_region, /*serverOptimizeForWrite*/ (
-                                     isHAHasResultOptimizeForWrite & 4));
-          if (locationMap == NULL || locationMap->empty()) {
+        if (txState == nullptr) {
+          auto serverToKeysMap = cms->getServerToFilterMapFESHOP(
+              m_routingObj, m_region, /*serverOptimizeForWrite*/
+              (isHAHasResultOptimizeForWrite & 4));
+          if (!serverToKeysMap || serverToKeysMap->empty()) {
             LOGDEBUG(
                 "ExecutionImpl::execute: withFilter but locationMap is empty "
                 "so use old FE onRegion");
@@ -256,12 +266,12 @@ ResultCollectorPtr ExecutionImpl::execute(const char* fn, uint32_t timeout) {
             LOGDEBUG(
                 "ExecutionImpl::execute: withFilter and locationMap is not "
                 "empty");
-            bool reExecute = dynamic_cast<ThinClientRegion*>(m_region.get())
-                                 ->executeFunctionSH(
-                                     fn, m_args, isHAHasResultOptimizeForWrite,
-                                     m_rc, locationMap, failedNodes, timeout,
-                                     /*allBuckets*/ false);
-            delete locationMap;
+            bool reExecute =
+                dynamic_cast<ThinClientRegion*>(m_region.get())
+                    ->executeFunctionSH(fn, m_args,
+                                        isHAHasResultOptimizeForWrite, m_rc,
+                                        serverToKeysMap, failedNodes, timeout,
+                                        /*allBuckets*/ false);
             if (reExecute) {  // Fallback to old FE onREgion
               if (isHAHasResultOptimizeForWrite & 1) {  // isHA = true
                 m_rc->clearResults();
@@ -299,18 +309,18 @@ ResultCollectorPtr ExecutionImpl::execute(const char* fn, uint32_t timeout) {
               (isHAHasResultOptimizeForWrite & 1) ? retryAttempts : 0, timeout);
     }
     /*    } catch (TransactionDataNodeHasDepartedException e) {
-                    if(txState == NULL)
+                    if(txState == nullptr)
                     {
-                            GfErrTypeThrowException("Transaction is NULL",
+                            GfErrTypeThrowException("Transaction is nullptr",
        GF_CACHE_ILLEGAL_STATE_EXCEPTION);
                     }
 
                     if(!txState->isReplay())
                             txState->replay(false);
             } catch(TransactionDataRebalancedException e) {
-                    if(txState == NULL)
+                    if(txState == nullptr)
                     {
-                            GfErrTypeThrowException("Transaction is NULL",
+                            GfErrTypeThrowException("Transaction is nullptr",
        GF_CACHE_ILLEGAL_STATE_EXCEPTION);
                     }
 
@@ -325,7 +335,7 @@ ResultCollectorPtr ExecutionImpl::execute(const char* fn, uint32_t timeout) {
 
     return m_rc;
   } else if (m_pool != nullptr) {
-    if (txState != NULL) {
+    if (txState != nullptr) {
       throw UnsupportedOperationException(
           "Execution::execute: Transaction function execution on pool is not "
           "supported");
@@ -351,7 +361,7 @@ ResultCollectorPtr ExecutionImpl::execute(const char* fn, uint32_t timeout) {
 GfErrType ExecutionImpl::getFuncAttributes(const char* func,
                                            std::vector<int8_t>** attr) {
   ThinClientPoolDM* tcrdm = dynamic_cast<ThinClientPoolDM*>(m_pool.get());
-  if (tcrdm == NULL) {
+  if (tcrdm == nullptr) {
     throw IllegalArgumentException(
         "Execute: pool cast to ThinClientPoolDM failed");
   }
@@ -401,7 +411,7 @@ void ExecutionImpl::addResults(ResultCollectorPtr& collector,
 void ExecutionImpl::executeOnAllServers(std::string& func, uint8_t getResult,
                                         uint32_t timeout) {
   ThinClientPoolDM* tcrdm = dynamic_cast<ThinClientPoolDM*>(m_pool.get());
-  if (tcrdm == NULL) {
+  if (tcrdm == nullptr) {
     throw IllegalArgumentException(
         "Execute: pool cast to ThinClientPoolDM failed");
   }
@@ -444,7 +454,7 @@ CacheableVectorPtr ExecutionImpl::executeOnPool(std::string& func,
                                                 int32_t retryAttempts,
                                                 uint32_t timeout) {
   ThinClientPoolDM* tcrdm = dynamic_cast<ThinClientPoolDM*>(m_pool.get());
-  if (tcrdm == NULL) {
+  if (tcrdm == nullptr) {
     throw IllegalArgumentException(
         "Execute: pool cast to ThinClientPoolDM failed");
   }
@@ -456,7 +466,7 @@ CacheableVectorPtr ExecutionImpl::executeOnPool(std::string& func,
   //  for (int i = 0; i < csArray->length(); i++)
   //  {
   //    CacheableStringPtr cs = csArray[i];
-  //    TcrEndpoint *ep = NULL;
+  //    TcrEndpoint *ep = nullptr;
   //    /*
   //    std::string endpointStr = Utils::convertHostToCanonicalForm(cs->asChar()
   //    );
@@ -533,7 +543,7 @@ CacheableVectorPtr ExecutionImpl::executeOnPool(std::string& func,
     /export/pnq-gst-dev01a/users/adongre/cedar_dev_Nov12/build-artifacts/linux/tests/cppcache/testThinClientPoolExecuteFunctionPrSHOP)
     */
     delete resultCollector;
-    resultCollector = NULL;
+    resultCollector = nullptr;
 
     return nullptr;
   }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/ExpMapEntry.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/ExpMapEntry.cpp b/src/cppcache/src/ExpMapEntry.cpp
index db17a8e..22ef261 100644
--- a/src/cppcache/src/ExpMapEntry.cpp
+++ b/src/cppcache/src/ExpMapEntry.cpp
@@ -19,7 +19,7 @@
 
 using namespace apache::geode::client;
 
-ExpEntryFactory* ExpEntryFactory::singleton = NULL;
+ExpEntryFactory* ExpEntryFactory::singleton = nullptr;
 
 /**
  * @brief called when library is initialized... see CppCacheLibrary.

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/ExpirationAction.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/ExpirationAction.cpp b/src/cppcache/src/ExpirationAction.cpp
index 0afb9bb..9579c55 100644
--- a/src/cppcache/src/ExpirationAction.cpp
+++ b/src/cppcache/src/ExpirationAction.cpp
@@ -24,11 +24,11 @@ using namespace apache::geode::client;
 
 char* ExpirationAction::names[] = {(char*)"INVALIDATE",
                                    (char*)"LOCAL_INVALIDATE", (char*)"DESTROY",
-                                   (char*)"LOCAL_DESTROY", (char*)NULL};
+                                   (char*)"LOCAL_DESTROY", (char*)nullptr};
 
 ExpirationAction::Action ExpirationAction::fromName(const char* name) {
   uint32_t i = 0;
-  while ((names[i] != NULL) || (i <= static_cast<uint32_t>(LOCAL_DESTROY))) {
+  while ((names[i] != nullptr) || (i <= static_cast<uint32_t>(LOCAL_DESTROY))) {
     if (name && names[i] && ACE_OS::strcasecmp(names[i], name) == 0) {
       return static_cast<Action>(i);
     }
@@ -41,7 +41,7 @@ const char* ExpirationAction::fromOrdinal(const int ordinal) {
   if (INVALIDATE <= ordinal && ordinal <= LOCAL_DESTROY) {
     return names[ordinal];
   }
-  return NULL;
+  return nullptr;
 }
 
 ExpirationAction::ExpirationAction() {}

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/ExpiryTaskManager.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/ExpiryTaskManager.cpp b/src/cppcache/src/ExpiryTaskManager.cpp
index 1220380..95e3a06 100644
--- a/src/cppcache/src/ExpiryTaskManager.cpp
+++ b/src/cppcache/src/ExpiryTaskManager.cpp
@@ -37,13 +37,13 @@ const char* ExpiryTaskManager::NC_ETM_Thread = "NC ETM Thread";
 ExpiryTaskManager::ExpiryTaskManager() : m_reactorEventLoopRunning(false) {
 #if defined(_WIN32)
   m_reactor = new ACE_Reactor(
-      new ACE_WFMO_Reactor(NULL, new GF_Timer_Heap_ImmediateReset()), 1);
+      new ACE_WFMO_Reactor(nullptr, new GF_Timer_Heap_ImmediateReset()), 1);
 #elif defined(WITH_ACE_Select_Reactor)
   m_reactor = new ACE_Reactor(
-      new ACE_Select_Reactor(NULL, new GF_Timer_Heap_ImmediateReset()), 1);
+      new ACE_Select_Reactor(nullptr, new GF_Timer_Heap_ImmediateReset()), 1);
 #else
   m_reactor = new ACE_Reactor(
-      new ACE_Dev_Poll_Reactor(NULL, new GF_Timer_Heap_ImmediateReset()), 1);
+      new ACE_Dev_Poll_Reactor(nullptr, new GF_Timer_Heap_ImmediateReset()), 1);
 #endif
 }
 
@@ -73,12 +73,12 @@ long ExpiryTaskManager::scheduleExpiryTask(ACE_Event_Handler* handler,
   return m_reactor->schedule_timer(handler, 0, expTimeValue, intervalVal);
 }
 
-int ExpiryTaskManager::resetTask(long id, uint32_t sec) {
+int ExpiryTaskManager::resetTask(ExpiryTaskManager::id_type id, uint32_t sec) {
   ACE_Time_Value interval(sec);
   return m_reactor->reset_timer_interval(id, interval);
 }
 
-int ExpiryTaskManager::cancelTask(long id) {
+int ExpiryTaskManager::cancelTask(ExpiryTaskManager::id_type id) {
   return m_reactor->cancel_timer(id, 0, 0);
 }
 
@@ -113,5 +113,5 @@ void ExpiryTaskManager::begin() {
 ExpiryTaskManager::~ExpiryTaskManager() {
   stopExpiryTaskManager();
   delete m_reactor;
-  m_reactor = NULL;
+  m_reactor = nullptr;
 }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/ExpiryTaskManager.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/ExpiryTaskManager.hpp b/src/cppcache/src/ExpiryTaskManager.hpp
index 1fbe1e1..bae3df0 100644
--- a/src/cppcache/src/ExpiryTaskManager.hpp
+++ b/src/cppcache/src/ExpiryTaskManager.hpp
@@ -42,6 +42,7 @@ namespace client {
  */
 class CPPCACHE_EXPORT ExpiryTaskManager : public ACE_Task_Base {
  public:
+  typedef long 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
@@ -80,7 +81,7 @@ class CPPCACHE_EXPORT ExpiryTaskManager : public ACE_Task_Base {
       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 = NULL;
+      ACE_Timer_Node_T<TYPE>* expired = nullptr;
 
       // Create a scope for the lock ...
       {
@@ -93,7 +94,7 @@ class CPPCACHE_EXPORT ExpiryTaskManager : public ACE_Task_Base {
 
         expired = this->getFirstNode(cur_time, info);
 
-        if (expired == NULL) return 0;
+        if (expired == nullptr) return 0;
       }
 
       const void* upcall_act = 0;
@@ -152,9 +153,9 @@ class CPPCACHE_EXPORT ExpiryTaskManager : public ACE_Task_Base {
         return 0;
       }
       int number_of_timers_expired = 0;
-      ACE_Timer_Node_T<TYPE>* expired = NULL;
+      ACE_Timer_Node_T<TYPE>* expired = nullptr;
       ACE_Timer_Node_Dispatch_Info_T<TYPE> info;
-      while ((expired = this->getFirstNode(cur_time, info)) != NULL) {
+      while ((expired = this->getFirstNode(cur_time, info)) != nullptr) {
         const void* upcall_act = 0;
         this->preinvoke(info, cur_time, upcall_act);
 
@@ -194,16 +195,16 @@ class CPPCACHE_EXPORT ExpiryTaskManager : public ACE_Task_Base {
       ACE_TRACE("GF_Timer_Heap_ImmediateReset_T::getFirstNode");
 
       if (this->is_empty()) {
-        return NULL;
+        return nullptr;
       }
-      ACE_Timer_Node_T<TYPE>* expired = NULL;
+      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 NULL;
+      return nullptr;
     }
   };
 
@@ -240,13 +241,13 @@ class CPPCACHE_EXPORT ExpiryTaskManager : public ACE_Task_Base {
    * millisec - The time after which you would like it to get
    * invoked from the current time.
    */
-  int resetTask(long id, uint32_t sec);
+  int resetTask(id_type id, uint32_t sec);
   /**
    * for cancelling an already registered task.
    * returns '0' if successful '-1' on failure.
    * id - the id assigned to the expiry task initially.
    */
-  int cancelTask(long id);
+  int cancelTask(id_type id);
   /**
    * A separate thread is started in which the reactor event loop
    * is kept running unless explicitly stopped or when this object

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/FairQueue.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/FairQueue.hpp b/src/cppcache/src/FairQueue.hpp
index 0c1e23f..d87305f 100644
--- a/src/cppcache/src/FairQueue.hpp
+++ b/src/cppcache/src/FairQueue.hpp
@@ -53,8 +53,8 @@ class FairQueue {
     bool isClosed;
     T* mp = getNoGetLock(isClosed);
 
-    if (mp == NULL && !isClosed) {
-      mp = getUntilWithToken(sec, isClosed, (void*)NULL);
+    if (mp == nullptr && !isClosed) {
+      mp = getUntilWithToken(sec, isClosed, (void*)nullptr);
     }
     return mp;
   }
@@ -129,7 +129,7 @@ class FairQueue {
   MUTEX m_queueLock;
 
   inline T* popFromQueue(bool& isClosed) {
-    T* mp = NULL;
+    T* mp = nullptr;
 
     isClosed = m_closed;
     if (!isClosed && m_queue.size() > 0) {
@@ -140,8 +140,8 @@ class FairQueue {
   }
 
   template <typename U>
-  T* getUntilWithToken(int64_t& sec, bool& isClosed, U* excludeList = NULL) {
-    T* mp = NULL;
+  T* getUntilWithToken(int64_t& sec, bool& isClosed, U* excludeList = nullptr) {
+    T* mp = nullptr;
 
     ACE_Guard<ACE_Token> _guard(m_queueGetLock);
 
@@ -162,7 +162,7 @@ class FairQueue {
             deleteAction();
           }
         }
-      } while (mp == NULL && (currTime = ACE_OS::gettimeofday()) < stopAt &&
+      } while (mp == nullptr && (currTime = ACE_OS::gettimeofday()) < stopAt &&
                !isClosed);
       sec = (stopAt - currTime).sec();
     }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/FarSideEntryOp.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/FarSideEntryOp.cpp b/src/cppcache/src/FarSideEntryOp.cpp
index c1b6a69..6ed18f9 100644
--- a/src/cppcache/src/FarSideEntryOp.cpp
+++ b/src/cppcache/src/FarSideEntryOp.cpp
@@ -108,7 +108,7 @@ void FarSideEntryOp::fromData(DataInput& input, bool largeModCount,
           input.readObject(m_value);
         }
       } else {
-        // uint8_t* buf = NULL;
+        // uint8_t* buf = nullptr;
         int32_t len;
         input.readArrayLen(&len);
         input.readObject(m_value);

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/FunctionService.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/FunctionService.cpp b/src/cppcache/src/FunctionService.cpp
index 77336b6..600fa03 100644
--- a/src/cppcache/src/FunctionService.cpp
+++ b/src/cppcache/src/FunctionService.cpp
@@ -41,7 +41,7 @@ ExecutionPtr FunctionService::onRegion(RegionPtr region) {
 
   if (pool->getMultiuserAuthentication()) {
     ProxyRegion* pr = dynamic_cast<ProxyRegion*>(region.get());
-    if (pr != NULL) {
+    if (pr != nullptr) {
       LOGDEBUG("FunctionService::onRegion(RegionPtr region) proxy cache");
       // it is in multiuser mode
       proxyCache = pr->m_proxyCache;
@@ -108,7 +108,7 @@ ExecutionPtr FunctionService::onServerWithCache(const RegionServicePtr& cache) {
   auto pc = std::dynamic_pointer_cast<ProxyCache>(cache);
 
   LOGDEBUG("FunctionService::onServer:");
-  if (pc != NULL) {
+  if (pc != nullptr) {
     PoolPtr userAttachedPool = pc->m_userAttributes->getPool();
     PoolPtr pool = PoolManager::find(userAttachedPool->getName());
     if (pool != nullptr && pool.get() == userAttachedPool.get() &&
@@ -118,7 +118,8 @@ ExecutionPtr FunctionService::onServerWithCache(const RegionServicePtr& cache) {
     throw IllegalStateException(
         "Pool has been close to execute function on server");
   } else {
-    CachePtr realcache = std::static_pointer_cast<GF_UNWRAP_SP(CachePtr)>(cache);
+    CachePtr realcache =
+        std::static_pointer_cast<GF_UNWRAP_SP(CachePtr)>(cache);
     return FunctionService::onServer(realcache->m_cacheImpl->getDefaultPool());
   }
 }
@@ -132,7 +133,7 @@ ExecutionPtr FunctionService::onServersWithCache(
   auto pc = std::dynamic_pointer_cast<ProxyCache>(cache);
 
   LOGDEBUG("FunctionService::onServers:");
-  if (pc != NULL && !cache->isClosed()) {
+  if (pc != nullptr && !cache->isClosed()) {
     PoolPtr userAttachedPool = pc->m_userAttributes->getPool();
     PoolPtr pool = PoolManager::find(userAttachedPool->getName());
     if (pool != nullptr && pool.get() == userAttachedPool.get() &&
@@ -142,7 +143,8 @@ ExecutionPtr FunctionService::onServersWithCache(
     throw IllegalStateException(
         "Pool has been close to execute function on server");
   } else {
-    CachePtr realcache = std::static_pointer_cast<GF_UNWRAP_SP(CachePtr)>(cache);
+    CachePtr realcache =
+        std::static_pointer_cast<GF_UNWRAP_SP(CachePtr)>(cache);
     return FunctionService::onServers(realcache->m_cacheImpl->getDefaultPool());
   }
 }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/HashMapOfSharedBase.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/HashMapOfSharedBase.cpp b/src/cppcache/src/HashMapOfSharedBase.cpp
deleted file mode 100644
index 2e42368..0000000
--- a/src/cppcache/src/HashMapOfSharedBase.cpp
+++ /dev/null
@@ -1,171 +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 <geode/HashMapOfSharedBase.hpp>
-
-namespace apache {
-namespace geode {
-namespace client {
-
-// Iterator methods
-
-HashMapOfSharedBase::Iterator::Iterator(const HMofSBPIterator& iter) {
-  m_iter = new HMofSBPIterator(iter);
-}
-
-HashMapOfSharedBase::Iterator::Iterator(
-    const HashMapOfSharedBase::Iterator& other) {
-  m_iter = new HMofSBPIterator(*(other.m_iter));
-}
-
-const SharedBasePtr HashMapOfSharedBase::Iterator::first() const {
-  return (*m_iter)->first;
-}
-
-const SharedBasePtr HashMapOfSharedBase::Iterator::second() const {
-  return (*m_iter)->second;
-}
-
-HashMapOfSharedBase::Iterator& HashMapOfSharedBase::Iterator::operator++() {
-  ++(*m_iter);
-  return *this;
-}
-
-void HashMapOfSharedBase::Iterator::operator++(int) { ++(*m_iter); }
-
-bool HashMapOfSharedBase::Iterator::operator==(
-    const HashMapOfSharedBase::Iterator& other) const {
-  return (*m_iter == *other.m_iter);
-}
-
-bool HashMapOfSharedBase::Iterator::operator!=(
-    const HashMapOfSharedBase::Iterator& other) const {
-  return (*m_iter != *other.m_iter);
-}
-
-HashMapOfSharedBase::Iterator::~Iterator() { delete m_iter; }
-
-// HashMap methods
-
-int32_t HashMapOfSharedBase::size() const {
-  return static_cast<int32_t>(m_stdHashMap->size());
-}
-
-int32_t HashMapOfSharedBase::max_size() const {
-  return static_cast<int32_t>(m_stdHashMap->max_size());
-}
-
-bool HashMapOfSharedBase::empty() const { return m_stdHashMap->empty(); }
-
-int32_t HashMapOfSharedBase::bucket_count() const {
-  return static_cast<int32_t>(m_stdHashMap->bucket_count());
-}
-
-void HashMapOfSharedBase::resize(int32_t n) { m_stdHashMap->rehash(n); }
-
-void HashMapOfSharedBase::swap(HashMapOfSharedBase& other) {
-  m_stdHashMap->swap(*(other.m_stdHashMap));
-}
-
-bool HashMapOfSharedBase::insert(const SharedBasePtr& k,
-                                 const SharedBasePtr& v) {
-  std::pair<HMofSBP::iterator, bool> result =
-      m_stdHashMap->insert(HMofSBP::value_type(k, v));
-  return result.second;
-}
-
-int32_t HashMapOfSharedBase::erase(const SharedBasePtr& k) {
-  return static_cast<int32_t>(m_stdHashMap->erase(k));
-}
-
-void HashMapOfSharedBase::clear() { m_stdHashMap->clear(); }
-
-bool HashMapOfSharedBase::contains(const SharedBasePtr& k) const {
-  HMofSBP::const_iterator iter = m_stdHashMap->find(k);
-  return (iter != m_stdHashMap->end());
-}
-
-HashMapOfSharedBase::Iterator HashMapOfSharedBase::find(
-    const SharedBasePtr& k) const {
-  return Iterator(m_stdHashMap->find(k));
-}
-
-int32_t HashMapOfSharedBase::count(const SharedBasePtr& k) const {
-  return static_cast<int32_t>(m_stdHashMap->count(k));
-}
-
-SharedBasePtr& HashMapOfSharedBase::operator[](const SharedBasePtr& k) {
-  return (*m_stdHashMap)[k];
-}
-
-HashMapOfSharedBase::Iterator HashMapOfSharedBase::begin() const {
-  return HashMapOfSharedBase::Iterator(m_stdHashMap->begin());
-}
-
-HashMapOfSharedBase::Iterator HashMapOfSharedBase::end() const {
-  return HashMapOfSharedBase::Iterator(m_stdHashMap->end());
-}
-
-HashMapOfSharedBase& HashMapOfSharedBase::operator=(
-    const HashMapOfSharedBase& other) {
-  *m_stdHashMap = *(other.m_stdHashMap);
-  return *this;
-}
-
-HashMapOfSharedBase::HashMapOfSharedBase(const Hasher h, const EqualTo k) {
-  HashSB hSB(h);
-  EqualToSB eqSB(k);
-  m_stdHashMap = new HMofSBP(100, hSB, eqSB);
-}
-
-HashMapOfSharedBase::HashMapOfSharedBase(int32_t n, const Hasher h,
-                                         const EqualTo k) {
-  HashSB hSB(h);
-  EqualToSB eqSB(k);
-  m_stdHashMap = new HMofSBP(n, hSB, eqSB);
-}
-
-HashMapOfSharedBase::HashMapOfSharedBase(const HashMapOfSharedBase& other) {
-  /*
-  Note: The line below marked ORIGINAL doesn't compile on newer compilers.
-  For example, on Microsoft Visual 2013 or later, it generates error C2248
-  because the HashSB() and
-  EqualToSB() constructors are private.
-
-  Until we refactor this class (HashMapOfSharedBase) to include HashSB and
-  EqualToSB functionality this line
-  is replaced with the code marked NEW below.
-  */
-
-  // *** ORIGINAL ***
-  // m_stdHashMap = new HMofSBP(*(other.m_stdHashMap));
-
-  // *** NEW ***
-  HashSB hSB((other.m_stdHashMap)->hash_function());
-  EqualToSB eqSB((other.m_stdHashMap)->key_eq());
-  size_t size = other.size();
-  m_stdHashMap = new HMofSBP(size, hSB, eqSB);
-  *m_stdHashMap = *(other.m_stdHashMap);
-}
-
-HashMapOfSharedBase::~HashMapOfSharedBase() {
-  m_stdHashMap->clear();
-  delete m_stdHashMap;
-}
-}  // namespace client
-}  // namespace geode
-}  // namespace apache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/HashSetOfSharedBase.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/HashSetOfSharedBase.cpp b/src/cppcache/src/HashSetOfSharedBase.cpp
deleted file mode 100644
index a7470e5..0000000
--- a/src/cppcache/src/HashSetOfSharedBase.cpp
+++ /dev/null
@@ -1,167 +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 <geode/HashSetOfSharedBase.hpp>
-
-namespace apache {
-namespace geode {
-namespace client {
-
-// Iterator methods
-
-HashSetOfSharedBase::Iterator::Iterator(const HSofSBPIterator& iter,
-                                        const HashSetOfSharedBase& set)
-    : m_set(set) {
-  m_iter = new HSofSBPIterator(iter);
-}
-
-HashSetOfSharedBase::Iterator::Iterator(
-    const HashSetOfSharedBase::Iterator& other)
-    : m_set(other.m_set) {
-  m_iter = new HSofSBPIterator(*(other.m_iter));
-}
-
-const SharedBasePtr HashSetOfSharedBase::Iterator::operator*() const {
-  return *(*m_iter);
-}
-
-bool HashSetOfSharedBase::Iterator::isEnd() const {
-  return (*m_iter == m_set.m_stdHashSet->end());
-}
-
-HashSetOfSharedBase::Iterator& HashSetOfSharedBase::Iterator::operator++() {
-  ++(*m_iter);
-  return *this;
-}
-
-void HashSetOfSharedBase::Iterator::operator++(int) { ++(*m_iter); }
-
-bool HashSetOfSharedBase::Iterator::operator==(
-    const HashSetOfSharedBase::Iterator& other) const {
-  return (*m_iter == *other.m_iter);
-}
-
-bool HashSetOfSharedBase::Iterator::operator!=(
-    const HashSetOfSharedBase::Iterator& other) const {
-  return (*m_iter != *other.m_iter);
-}
-
-void HashSetOfSharedBase::Iterator::reset() {
-  *m_iter = m_set.m_stdHashSet->begin();
-}
-
-HashSetOfSharedBase::Iterator::~Iterator() { delete m_iter; }
-
-// HashSet methods
-
-int32_t HashSetOfSharedBase::size() const {
-  return static_cast<int32_t>(m_stdHashSet->size());
-}
-
-int32_t HashSetOfSharedBase::max_size() const {
-  return static_cast<int32_t>(m_stdHashSet->max_size());
-}
-
-bool HashSetOfSharedBase::empty() const { return m_stdHashSet->empty(); }
-
-int32_t HashSetOfSharedBase::bucket_count() const {
-  return static_cast<int32_t>(m_stdHashSet->bucket_count());
-}
-
-void HashSetOfSharedBase::resize(int32_t n) { m_stdHashSet->rehash(n); }
-
-void HashSetOfSharedBase::swap(HashSetOfSharedBase& other) {
-  m_stdHashSet->swap(*(other.m_stdHashSet));
-}
-
-bool HashSetOfSharedBase::insert(const SharedBasePtr& k) {
-  std::pair<HSofSBP::iterator, bool> result = m_stdHashSet->insert(k);
-  return result.second;
-}
-
-int32_t HashSetOfSharedBase::erase(const SharedBasePtr& k) {
-  return static_cast<int32_t>(m_stdHashSet->erase(k));
-}
-
-void HashSetOfSharedBase::clear() { m_stdHashSet->clear(); }
-
-bool HashSetOfSharedBase::contains(const SharedBasePtr& k) const {
-  HSofSBP::const_iterator iter = m_stdHashSet->find(k);
-  return (iter != m_stdHashSet->end());
-}
-
-int32_t HashSetOfSharedBase::count(const SharedBasePtr& k) const {
-  return static_cast<int32_t>(m_stdHashSet->count(k));
-}
-
-HashSetOfSharedBase::Iterator HashSetOfSharedBase::begin() const {
-  return Iterator(m_stdHashSet->begin(), *this);
-}
-
-HashSetOfSharedBase::Iterator HashSetOfSharedBase::end() const {
-  return Iterator(m_stdHashSet->end(), *this);
-}
-
-HashSetOfSharedBase& HashSetOfSharedBase::operator=(
-    const HashSetOfSharedBase& other) {
-  *m_stdHashSet = *(other.m_stdHashSet);
-  return *this;
-}
-
-HashSetOfSharedBase::HashSetOfSharedBase(const Hasher h, const EqualTo k) {
-  HashSB hSB(h);
-  EqualToSB eqSB(k);
-  m_stdHashSet = new HSofSBP(100, hSB, eqSB);
-}
-
-HashSetOfSharedBase::HashSetOfSharedBase(int32_t n, const Hasher h,
-                                         const EqualTo k) {
-  HashSB hSB(h);
-  EqualToSB eqSB(k);
-  m_stdHashSet = new HSofSBP(n, hSB, eqSB);
-}
-
-HashSetOfSharedBase::HashSetOfSharedBase(const HashSetOfSharedBase& other) {
-  /*
-     Note: The line below marked ORIGINAL doesn't compile on newer compilers.
-     For example, on Microsoft Visual 2013 or later, it generates error C2248
-     because the HashSB() and
-     EqualToSB() constructors are private.
-
-     Until we refactor this class (HashSetOfSharedBase) to include HashSB and
-     EqualToSB functionality this line
-     is replaced with the code marked NEW below.
-  */
-
-  // *** ORIGINAL ***
-  // m_stdHashSet = new HSofSBP(*(other.m_stdHashSet));
-
-  // *** NEW ***
-  HashSB hSB((other.m_stdHashSet)->hash_function());
-  EqualToSB eqSB((other.m_stdHashSet)->key_eq());
-  size_t size = other.size();
-  m_stdHashSet = new HSofSBP(size, hSB, eqSB);
-  *m_stdHashSet = *(other.m_stdHashSet);
-}
-
-HashSetOfSharedBase::~HashSetOfSharedBase() {
-  m_stdHashSet->clear();
-  delete m_stdHashSet;
-}
-}  // namespace client
-}  // namespace geode
-}  // namespace apache

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/InternalCacheTransactionManager2PCImpl.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/InternalCacheTransactionManager2PCImpl.cpp b/src/cppcache/src/InternalCacheTransactionManager2PCImpl.cpp
index 047f02f..12d1f6a 100644
--- a/src/cppcache/src/InternalCacheTransactionManager2PCImpl.cpp
+++ b/src/cppcache/src/InternalCacheTransactionManager2PCImpl.cpp
@@ -48,7 +48,7 @@ void InternalCacheTransactionManager2PCImpl::prepare() {
     TSSTXStateWrapper* txStateWrapper = TSSTXStateWrapper::s_geodeTSSTXState;
     TXState* txState = txStateWrapper->getTXState();
 
-    if (txState == NULL) {
+    if (txState == nullptr) {
       GfErrTypeThrowException(
           "Transaction is null, cannot prepare of a null transaction",
           GF_CACHE_ILLEGAL_STATE_EXCEPTION);
@@ -57,18 +57,18 @@ void InternalCacheTransactionManager2PCImpl::prepare() {
     ThinClientPoolDM* tcr_dm = getDM();
     // This is for the case when no cache operation/s is performed between
     // tx->begin() and tx->commit()/rollback(),
-    // simply return without sending COMMIT message to server. tcr_dm is NULL
+    // simply return without sending COMMIT message to server. tcr_dm is nullptr
     // implies no cache operation is performed.
     // Theres no need to call txCleaner.clean(); here, because TXCleaner
     // destructor is called which cleans ThreadLocal.
-    if (tcr_dm == NULL) {
+    if (tcr_dm == nullptr) {
       return;
     }
 
     TcrMessageTxSynchronization requestCommitBefore(
         BEFORE_COMMIT, txState->getTransactionId()->getId(), STATUS_COMMITTED);
 
-    TcrMessageReply replyCommitBefore(true, NULL);
+    TcrMessageReply replyCommitBefore(true, nullptr);
     GfErrType err =
         tcr_dm->sendSyncRequest(requestCommitBefore, replyCommitBefore);
     if (err != GF_NOERR) {
@@ -123,7 +123,7 @@ void InternalCacheTransactionManager2PCImpl::afterCompletion(int32_t status) {
     TSSTXStateWrapper* txStateWrapper = TSSTXStateWrapper::s_geodeTSSTXState;
     TXState* txState = txStateWrapper->getTXState();
 
-    if (txState == NULL) {
+    if (txState == nullptr) {
       GfErrTypeThrowException(
           "Transaction is null, cannot commit a null transaction",
           GF_CACHE_ILLEGAL_STATE_EXCEPTION);
@@ -132,11 +132,11 @@ void InternalCacheTransactionManager2PCImpl::afterCompletion(int32_t status) {
     ThinClientPoolDM* tcr_dm = getDM();
     // This is for the case when no cache operation/s is performed between
     // tx->begin() and tx->commit()/rollback(),
-    // simply return without sending COMMIT message to server. tcr_dm is NULL
+    // simply return without sending COMMIT message to server. tcr_dm is nullptr
     // implies no cache operation is performed.
     // Theres no need to call txCleaner.clean(); here, because TXCleaner
     // destructor is called which cleans ThreadLocal.
-    if (tcr_dm == NULL) {
+    if (tcr_dm == nullptr) {
       return;
     }
 
@@ -163,7 +163,7 @@ void InternalCacheTransactionManager2PCImpl::afterCompletion(int32_t status) {
     TcrMessageTxSynchronization requestCommitAfter(
         AFTER_COMMIT, txState->getTransactionId()->getId(), status);
 
-    TcrMessageReply replyCommitAfter(true, NULL);
+    TcrMessageReply replyCommitAfter(true, nullptr);
     GfErrType err =
         tcr_dm->sendSyncRequest(requestCommitAfter, replyCommitAfter);
 
@@ -173,9 +173,10 @@ void InternalCacheTransactionManager2PCImpl::afterCompletion(int32_t status) {
       switch (replyCommitAfter.getMessageType()) {
         case TcrMessage::RESPONSE: {
           TXCommitMessagePtr commit =
-              std::static_pointer_cast<GF_UNWRAP_SP(TXCommitMessagePtr)>(replyCommitAfter.getValue());
+              std::static_pointer_cast<GF_UNWRAP_SP(TXCommitMessagePtr)>(
+                  replyCommitAfter.getValue());
           if (commit.get() !=
-              NULL)  // e.g. when afterCompletion(STATUS_ROLLEDBACK) called
+              nullptr)  // e.g. when afterCompletion(STATUS_ROLLEDBACK) called
           {
             txCleaner.clean();
             commit->apply(this->getCache());

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/LRUAction.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LRUAction.cpp b/src/cppcache/src/LRUAction.cpp
index b21f406..6abb9ee 100644
--- a/src/cppcache/src/LRUAction.cpp
+++ b/src/cppcache/src/LRUAction.cpp
@@ -25,7 +25,7 @@ using namespace apache::geode::client;
 LRUAction* LRUAction::newLRUAction(const LRUAction::Action& actionType,
                                    RegionInternal* regionPtr,
                                    LRUEntriesMap* entriesMapPtr) {
-  LRUAction* result = NULL;
+  LRUAction* result = nullptr;
 
   switch (actionType) {
     case LRUAction::INVALIDATE:
@@ -70,7 +70,7 @@ bool LRUOverFlowToDiskAction::evict(const MapEntryImplPtr& mePtr) {
   LRUEntryProperties& lruProps = mePtr->getLRUProperties();
   void* persistenceInfo = lruProps.getPersistenceInfo();
   bool setInfo = false;
-  if (persistenceInfo == NULL) {
+  if (persistenceInfo == nullptr) {
     setInfo = true;
   }
   PersistenceManagerPtr pmPtr = m_regionPtr->getPersistenceManager();
@@ -91,7 +91,7 @@ bool LRUOverFlowToDiskAction::evict(const MapEntryImplPtr& mePtr) {
   // set value after write on disk to indicate that it is on disk.
   mePtr->setValueI(CacheableToken::overflowed());
 
-  if (m_entriesMapPtr != NULL) {
+  if (m_entriesMapPtr != nullptr) {
     int64_t newSize =
         CacheableToken::overflowed()->objectSize() - valuePtr->objectSize();
     m_entriesMapPtr->updateMapSize(newSize);

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/LRUEntriesMap.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LRUEntriesMap.cpp b/src/cppcache/src/LRUEntriesMap.cpp
index 29a0aff..ef705c3 100644
--- a/src/cppcache/src/LRUEntriesMap.cpp
+++ b/src/cppcache/src/LRUEntriesMap.cpp
@@ -67,16 +67,16 @@ LRUEntriesMap::LRUEntriesMap(EntryFactory* entryFactory, RegionInternal* region,
       m_validEntries(0),
       m_heapLRUEnabled(heapLRUEnabled) {
   m_currentMapSize = 0;
-  m_action = NULL;
-  m_evictionControllerPtr = NULL;
+  m_action = nullptr;
+  m_evictionControllerPtr = nullptr;
   // translate action type to an instance.
   if (region) {
     m_action = LRUAction::newLRUAction(lruAction, region, this);
     m_name = region->getName();
     CacheImpl* cImpl = region->getCacheImpl();
-    if (cImpl != NULL) {
+    if (cImpl != nullptr) {
       m_evictionControllerPtr = cImpl->getEvictionController();
-      if (m_evictionControllerPtr != NULL) {
+      if (m_evictionControllerPtr != nullptr) {
         m_evictionControllerPtr->registerRegion(m_name);
         LOGINFO("Heap LRU eviction controller registered region %s",
                 m_name.c_str());
@@ -88,7 +88,7 @@ LRUEntriesMap::LRUEntriesMap(EntryFactory* entryFactory, RegionInternal* region,
 }
 
 void LRUEntriesMap::close() {
-  if (m_evictionControllerPtr != NULL) {
+  if (m_evictionControllerPtr != nullptr) {
     m_evictionControllerPtr->updateRegionHeapInfo((-1 * (m_currentMapSize)));
     m_evictionControllerPtr->deregisterRegion(m_name);
   }
@@ -137,7 +137,7 @@ GfErrType LRUEntriesMap::create(const CacheableKeyPtr& key,
     m_lruList.appendEntry(mePtr);
     me = mePtr;
   }
-  if (m_evictionControllerPtr != NULL) {
+  if (m_evictionControllerPtr != nullptr) {
     int64_t newSize =
         static_cast<int64_t>(Utils::checkAndGetObjectSize(newValue));
     newSize += static_cast<int64_t>(Utils::checkAndGetObjectSize(key));
@@ -238,7 +238,7 @@ GfErrType LRUEntriesMap::invalidate(const CacheableKeyPtr& key,
     } else {
       newSize -= sizeof(void*);
     }
-    if (m_evictionControllerPtr != NULL) {
+    if (m_evictionControllerPtr != nullptr) {
       if (newSize != 0) {
         updateMapSize(newSize);
       }
@@ -253,12 +253,12 @@ GfErrType LRUEntriesMap::put(const CacheableKeyPtr& key,
                              int destroyTracker, VersionTagPtr versionTag,
                              bool& isUpdate, DataInput* delta) {
   MapSegment* segmentRPtr = segmentFor(key);
-  GF_D_ASSERT(segmentRPtr != NULL);
+  GF_D_ASSERT(segmentRPtr != nullptr);
 
   GfErrType err = GF_NOERR;
   bool segmentLocked = false;
   {
-    if (m_action != NULL &&
+    if (m_action != nullptr &&
         m_action->getType() == LRUAction::OVERFLOW_TO_DISK) {
       segmentRPtr->acquire();
       segmentLocked = true;
@@ -328,7 +328,7 @@ GfErrType LRUEntriesMap::put(const CacheableKeyPtr& key,
       }
     }
   }
-  if (m_evictionControllerPtr != NULL) {
+  if (m_evictionControllerPtr != nullptr) {
     int64_t newSize =
         static_cast<int64_t>(Utils::checkAndGetObjectSize(newValue));
     /*
@@ -372,7 +372,8 @@ bool LRUEntriesMap::get(const CacheableKeyPtr& key, CacheablePtr& returnPtr,
   bool doProcessLRU = false;
   MapSegment* segmentRPtr = segmentFor(key);
   bool segmentLocked = false;
-  if (m_action != NULL && m_action->getType() == LRUAction::OVERFLOW_TO_DISK) {
+  if (m_action != nullptr &&
+      m_action->getType() == LRUAction::OVERFLOW_TO_DISK) {
     segmentRPtr->acquire();
     segmentLocked = true;
   }
@@ -404,16 +405,15 @@ bool LRUEntriesMap::get(const CacheableKeyPtr& key, CacheablePtr& returnPtr,
       CacheablePtr oldValue;
       bool isUpdate;
       VersionTagPtr versionTag;
-      if (GF_NOERR ==
-          segmentRPtr->put(key, tmpObj, mePtr, oldValue, 0, 0, isUpdate,
-                           versionTag, NULL)) {
+      if (GF_NOERR == segmentRPtr->put(key, tmpObj, mePtr, oldValue, 0, 0,
+                                       isUpdate, versionTag, nullptr)) {
         // m_entriesRetrieved++;
         ++m_validEntries;
         lruProps.clearEvicted();
         m_lruList.appendEntry(nodeToMark);
       }
       doProcessLRU = true;
-      if (m_evictionControllerPtr != NULL) {
+      if (m_evictionControllerPtr != nullptr) {
         int64_t newSize = 0;
         if (tmpObj != nullptr) {
           newSize += static_cast<int64_t>(
@@ -475,7 +475,7 @@ GfErrType LRUEntriesMap::remove(const CacheableKeyPtr& key,
           m_pmPtr->destroy(key, persistenceInfo);
         }
       }
-      if (m_evictionControllerPtr != NULL) {
+      if (m_evictionControllerPtr != nullptr) {
         int64_t sizeToRemove = static_cast<int64_t>(key->objectSize());
         sizeToRemove += static_cast<int64_t>(result->objectSize());
         updateMapSize((-1 * sizeToRemove));
@@ -488,7 +488,7 @@ GfErrType LRUEntriesMap::remove(const CacheableKeyPtr& key,
 void LRUEntriesMap::updateMapSize(int64_t size) {
   // TODO: check and remove null check since this has already been done
   // by all the callers
-  if (m_evictionControllerPtr != NULL) {
+  if (m_evictionControllerPtr != nullptr) {
     {
       SpinLockGuard __guard(m_mapInfoLock);
       m_currentMapSize += size;

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/LRUEntriesMap.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LRUEntriesMap.hpp b/src/cppcache/src/LRUEntriesMap.hpp
index a50658f..c92f4fd 100644
--- a/src/cppcache/src/LRUEntriesMap.hpp
+++ b/src/cppcache/src/LRUEntriesMap.hpp
@@ -83,7 +83,7 @@ class CPPCACHE_EXPORT LRUEntriesMap : public ConcurrentEntriesMap,
                         CacheablePtr& oldValue, int updateCount,
                         int destroyTracker, VersionTagPtr versionTag,
                         bool& isUpdate = EntriesMap::boolVal,
-                        DataInput* delta = NULL);
+                        DataInput* delta = nullptr);
   virtual GfErrType invalidate(const CacheableKeyPtr& key, MapEntryImplPtr& me,
                                CacheablePtr& oldValue,
                                VersionTagPtr versionTag);
@@ -113,8 +113,8 @@ class CPPCACHE_EXPORT LRUEntriesMap : public ConcurrentEntriesMap,
   virtual void close();
 
   inline bool mustEvict() const {
-    if (m_action == NULL) {
-      LOGFINE("Eviction action is NULL");
+    if (m_action == nullptr) {
+      LOGFINE("Eviction action is nullptr");
       return false;
     }
     if (m_action->overflows()) {

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/LRUExpMapEntry.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LRUExpMapEntry.cpp b/src/cppcache/src/LRUExpMapEntry.cpp
index 69f7588..e3213cc 100644
--- a/src/cppcache/src/LRUExpMapEntry.cpp
+++ b/src/cppcache/src/LRUExpMapEntry.cpp
@@ -19,7 +19,7 @@
 
 using namespace apache::geode::client;
 
-LRUExpEntryFactory* LRUExpEntryFactory::singleton = NULL;
+LRUExpEntryFactory* LRUExpEntryFactory::singleton = nullptr;
 
 /**
  * @brief called when library is initialized... see CppCacheLibrary.

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/LRUList.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LRUList.cpp b/src/cppcache/src/LRUList.cpp
index c8d9fbd..343a18a 100644
--- a/src/cppcache/src/LRUList.cpp
+++ b/src/cppcache/src/LRUList.cpp
@@ -32,9 +32,9 @@ LRUList<TEntry, TCreateEntry>::LRUList() : m_headLock(), m_tailLock() {
 
 template <typename TEntry, typename TCreateEntry>
 LRUList<TEntry, TCreateEntry>::~LRUList() {
-  m_tailNode = NULL;
+  m_tailNode = nullptr;
   LRUListNode* next;
-  while (m_headNode != NULL) {
+  while (m_headNode != nullptr) {
     next = m_headNode->getNextLRUListNode();
     delete m_headNode;
     m_headNode = next;
@@ -54,7 +54,7 @@ template <typename TEntry, typename TCreateEntry>
 void LRUList<TEntry, TCreateEntry>::appendNode(LRUListNode* aNode) {
   LOCK_TAIL;
 
-  GF_D_ASSERT(aNode != NULL);
+  GF_D_ASSERT(aNode != nullptr);
 
   aNode->clearNextLRUListNode();
   m_tailNode->setNextLRUListNode(aNode);
@@ -67,7 +67,7 @@ void LRUList<TEntry, TCreateEntry>::getLRUEntry(LRUListEntryPtr& result) {
   LRUListNode* aNode;
   while (true) {
     aNode = getHeadNode(isLast);
-    if (aNode == NULL) {
+    if (aNode == nullptr) {
       result = nullptr;
       break;
     }
@@ -105,14 +105,14 @@ LRUList<TEntry, TCreateEntry>::getHeadNode(bool& isLast) {
   {
     LOCK_TAIL;
     nextNode = m_headNode->getNextLRUListNode();
-    if (nextNode == NULL) {
+    if (nextNode == nullptr) {
       // last one in the list...
       isLast = true;
       LRUListEntryPtr entry;
       result->getEntry(entry);
       if (entry->getLRUProperties().testEvicted()) {
         // list is empty.
-        return NULL;
+        return nullptr;
       } else {
         entry->getLRUProperties().setEvicted();
         return result;

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/LRUList.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LRUList.hpp b/src/cppcache/src/LRUList.hpp
index 3e1d30a..38cc4a9 100644
--- a/src/cppcache/src/LRUList.hpp
+++ b/src/cppcache/src/LRUList.hpp
@@ -37,7 +37,7 @@ namespace client {
  */
 class CPPCACHE_EXPORT LRUEntryProperties {
  public:
-  inline LRUEntryProperties() : m_bits(0), m_persistenceInfo(NULL) {}
+  inline LRUEntryProperties() : m_bits(0), m_persistenceInfo(nullptr) {}
 
   inline void setRecentlyUsed() {
     HostAsm::atomicSetBits(m_bits, RECENTLY_USED_BITS);
@@ -92,7 +92,7 @@ class LRUList {
   class LRUListNode {
    public:
     inline LRUListNode(const LRUListEntryPtr& entry)
-        : m_entry(entry), m_nextLRUListNode(NULL) {}
+        : m_entry(entry), m_nextLRUListNode(nullptr) {}
 
     inline ~LRUListNode() {}
 
@@ -104,7 +104,7 @@ class LRUList {
       m_nextLRUListNode = next;
     }
 
-    inline void clearNextLRUListNode() { m_nextLRUListNode = NULL; }
+    inline void clearNextLRUListNode() { m_nextLRUListNode = nullptr; }
 
    private:
     LRUListEntryPtr m_entry;

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/src/LRUMapEntry.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LRUMapEntry.cpp b/src/cppcache/src/LRUMapEntry.cpp
index 9972219..8cae083 100644
--- a/src/cppcache/src/LRUMapEntry.cpp
+++ b/src/cppcache/src/LRUMapEntry.cpp
@@ -19,7 +19,7 @@
 
 using namespace apache::geode::client;
 
-LRUEntryFactory* LRUEntryFactory::singleton = NULL;
+LRUEntryFactory* LRUEntryFactory::singleton = nullptr;
 
 /**
  * @brief called when library is initialized... see CppCacheLibrary.


Mime
View raw message