geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbarr...@apache.org
Subject [36/50] [abbrv] geode git commit: GEODE-2316: Rename some minor namespaces.
Date Mon, 23 Jan 2017 19:17:28 GMT
GEODE-2316: Rename some minor namespaces.

- gemfire_impl -> apache::geode::client::impl
- gemfire_log_globals -> apache::geode::log::globals
- gemfire_stats_globals -> apache::geode::statistics::globals


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

Branch: refs/heads/next-gen-native-client-software-grant
Commit: 69c3ac34a72b016f9781d8269c4ac985971b8335
Parents: 984d11c
Author: Jacob Barrett <jbarrett@pivotal.io>
Authored: Wed Jan 18 20:49:15 2017 -0800
Committer: Jacob Barrett <jbarrett@pivotal.io>
Committed: Mon Jan 23 11:15:38 2017 -0800

----------------------------------------------------------------------
 src/cppcache/src/CacheXmlParser.cpp             |  12 +-
 src/cppcache/src/Log.cpp                        |  15 ++-
 src/cppcache/src/RegionAttributes.cpp           | 112 +++++++++++--------
 src/cppcache/src/SystemProperties.cpp           |  14 ++-
 src/cppcache/src/statistics/HostStatSampler.cpp |  16 ++-
 5 files changed, 105 insertions(+), 64 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/69c3ac34/src/cppcache/src/CacheXmlParser.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/CacheXmlParser.cpp b/src/cppcache/src/CacheXmlParser.cpp
index c8643ec..e4f43ce 100644
--- a/src/cppcache/src/CacheXmlParser.cpp
+++ b/src/cppcache/src/CacheXmlParser.cpp
@@ -29,11 +29,17 @@
 
 using namespace apache::geode::client;
 
-namespace gemfire_impl {
+namespace apache {
+namespace geode {
+namespace client {
+namespace impl {
 void* getFactoryFunc(const char* lib, const char* funcName);
-}  // namespace gemfire_impl
+}  // namespace impl
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
 
-using namespace gemfire_impl;
+using namespace apache::geode::client::impl;
 
 namespace {
 std::vector<std::pair<std::string, int>> parseEndPoints(

http://git-wip-us.apache.org/repos/asf/geode/blob/69c3ac34/src/cppcache/src/Log.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/Log.cpp b/src/cppcache/src/Log.cpp
index 58bcca1..c2a17ed 100644
--- a/src/cppcache/src/Log.cpp
+++ b/src/cppcache/src/Log.cpp
@@ -60,7 +60,10 @@ Log::LogLevel Log::s_logLevel = Default;
 
 /*****************************************************************************/
 
-namespace gemfire_log_globals {
+namespace apache {
+namespace geode {
+namespace log {
+namespace globals {
 
 std::string* g_logFile = NULL;
 std::string* g_logFileWithExt = NULL;
@@ -85,14 +88,18 @@ typedef std::vector<std::pair<std::string, int64_t> > g_fileInfo;
 FILE* g_log = NULL;
 ACE_utsname g_uname;
 pid_t g_pid = 0;
-}  // namespace gemfire_log_globals
+
+}  // namespace globals
+}  // namespace log
+}  // namespace geode
+}  // namespace apache
 
 extern "C" {
 
 static int selector(const dirent* d) {
   std::string inputname(d->d_name);
   std::string filebasename =
-      ACE::basename(gemfire_log_globals::g_logFileWithExt->c_str());
+      ACE::basename(apache::geode::log::globals::g_logFileWithExt->c_str());
   size_t actualHyphenPos = filebasename.find_last_of('.');
   if (strcmp(filebasename.c_str(), d->d_name) == 0) return 1;
   size_t fileExtPos = inputname.find_last_of('.');
@@ -142,7 +149,7 @@ static int comparator(const dirent** d1, const dirent** d2) {
 }
 }
 
-using namespace gemfire_log_globals;
+using namespace apache::geode::log::globals;
 
 namespace apache {
 namespace geode {

http://git-wip-us.apache.org/repos/asf/geode/blob/69c3ac34/src/cppcache/src/RegionAttributes.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/RegionAttributes.cpp b/src/cppcache/src/RegionAttributes.cpp
index 30df986..cbb39e4 100644
--- a/src/cppcache/src/RegionAttributes.cpp
+++ b/src/cppcache/src/RegionAttributes.cpp
@@ -206,7 +206,10 @@ RegionAttributes::~RegionAttributes() {
   RA_DELSTRING(m_poolName);
 }
 
-namespace gemfire_impl {
+namespace apache {
+namespace geode {
+namespace client {
+namespace impl {
 
 /**
  * lib should be in the form required by ACE_DLL, typically just like specifying
@@ -231,7 +234,10 @@ void* getFactoryFunc(const char* lib, const char* funcName) {
   }
   return func;
 }
-}  // namespace gemfire_impl
+}  // namespace impl
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
 
 CacheLoaderPtr RegionAttributes::getCacheLoader() {
   if ((m_cacheLoader == NULLPTR) && (m_cacheLoaderLibrary != NULL)) {
@@ -242,9 +248,9 @@ CacheLoaderPtr RegionAttributes::getCacheLoader() {
           m_cacheLoaderLibrary, m_cacheLoaderFactory);
     } else {
       CacheLoader* (*funcptr)();
-      funcptr =
-          reinterpret_cast<CacheLoader* (*)()>(gemfire_impl::getFactoryFunc(
-              m_cacheLoaderLibrary, m_cacheLoaderFactory));
+      funcptr = reinterpret_cast<CacheLoader* (*)()>(
+          apache::geode::client::impl::getFactoryFunc(m_cacheLoaderLibrary,
+                                                      m_cacheLoaderFactory));
       m_cacheLoader = funcptr();
     }
   }
@@ -260,9 +266,9 @@ CacheWriterPtr RegionAttributes::getCacheWriter() {
           m_cacheWriterLibrary, m_cacheWriterFactory);
     } else {
       CacheWriter* (*funcptr)();
-      funcptr =
-          reinterpret_cast<CacheWriter* (*)()>(gemfire_impl::getFactoryFunc(
-              m_cacheWriterLibrary, m_cacheWriterFactory));
+      funcptr = reinterpret_cast<CacheWriter* (*)()>(
+          apache::geode::client::impl::getFactoryFunc(m_cacheWriterLibrary,
+                                                      m_cacheWriterFactory));
       m_cacheWriter = funcptr();
     }
   }
@@ -280,9 +286,9 @@ CacheListenerPtr RegionAttributes::getCacheListener() {
           m_cacheListenerLibrary, m_cacheListenerFactory);
     } else {
       CacheListener* (*funcptr)();
-      funcptr =
-          reinterpret_cast<CacheListener* (*)()>(gemfire_impl::getFactoryFunc(
-              m_cacheListenerLibrary, m_cacheListenerFactory));
+      funcptr = reinterpret_cast<CacheListener* (*)()>(
+          apache::geode::client::impl::getFactoryFunc(m_cacheListenerLibrary,
+                                                      m_cacheListenerFactory));
       m_cacheListener = funcptr();
     }
   }
@@ -302,8 +308,8 @@ PartitionResolverPtr RegionAttributes::getPartitionResolver() {
     } else {
       PartitionResolver* (*funcptr)();
       funcptr = reinterpret_cast<PartitionResolver* (*)()>(
-          gemfire_impl::getFactoryFunc(m_partitionResolverLibrary,
-                                       m_partitionResolverFactory));
+          apache::geode::client::impl::getFactoryFunc(
+              m_partitionResolverLibrary, m_partitionResolverFactory));
       m_partitionResolver = funcptr();
     }
   }
@@ -323,8 +329,8 @@ PersistenceManagerPtr RegionAttributes::getPersistenceManager() {
     } else {
       PersistenceManager* (*funcptr)();
       funcptr = reinterpret_cast<PersistenceManager* (*)()>(
-          gemfire_impl::getFactoryFunc(m_persistenceLibrary,
-                                       m_persistenceFactory));
+          apache::geode::client::impl::getFactoryFunc(m_persistenceLibrary,
+                                                      m_persistenceFactory));
       m_persistenceManager = funcptr();
     }
   }
@@ -431,7 +437,11 @@ int8_t RegionAttributes::typeId() const {
   return GemfireTypeIds::RegionAttributes;
 }
 
-namespace gemfire_impl {
+namespace apache {
+namespace geode {
+namespace client {
+namespace impl {
+
 void writeBool(DataOutput& out, bool field) {
   out.write(static_cast<int8_t>(field ? 1 : 0));
 }
@@ -461,7 +471,11 @@ void readCharStar(DataInput& in, char** field) {
     in.readBytesOnly(reinterpret_cast<int8_t*>(*field), memlen);
   }
 }
-}  // namespace gemfire_impl
+
+}  // namespace impl
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
 
 void RegionAttributes::toData(DataOutput& out) const {
   out.writeInt(static_cast<int32_t>(m_regionTimeToLive));
@@ -479,24 +493,24 @@ void RegionAttributes::toData(DataOutput& out) const {
   out.writeInt(static_cast<int32_t>(m_lruEntriesLimit));
   out.writeInt(static_cast<int32_t>(m_lruEvictionAction));
 
-  gemfire_impl::writeBool(out, m_caching);
-  gemfire_impl::writeBool(out, m_clientNotificationEnabled);
-
-  gemfire_impl::writeCharStar(out, m_cacheLoaderLibrary);
-  gemfire_impl::writeCharStar(out, m_cacheLoaderFactory);
-  gemfire_impl::writeCharStar(out, m_cacheWriterLibrary);
-  gemfire_impl::writeCharStar(out, m_cacheWriterFactory);
-  gemfire_impl::writeCharStar(out, m_cacheListenerLibrary);
-  gemfire_impl::writeCharStar(out, m_cacheListenerFactory);
-  gemfire_impl::writeCharStar(out, m_partitionResolverLibrary);
-  gemfire_impl::writeCharStar(out, m_partitionResolverFactory);
+  apache::geode::client::impl::writeBool(out, m_caching);
+  apache::geode::client::impl::writeBool(out, m_clientNotificationEnabled);
+
+  apache::geode::client::impl::writeCharStar(out, m_cacheLoaderLibrary);
+  apache::geode::client::impl::writeCharStar(out, m_cacheLoaderFactory);
+  apache::geode::client::impl::writeCharStar(out, m_cacheWriterLibrary);
+  apache::geode::client::impl::writeCharStar(out, m_cacheWriterFactory);
+  apache::geode::client::impl::writeCharStar(out, m_cacheListenerLibrary);
+  apache::geode::client::impl::writeCharStar(out, m_cacheListenerFactory);
+  apache::geode::client::impl::writeCharStar(out, m_partitionResolverLibrary);
+  apache::geode::client::impl::writeCharStar(out, m_partitionResolverFactory);
   out.writeInt(static_cast<int32_t>(m_diskPolicy));
-  gemfire_impl::writeCharStar(out, m_endpoints);
-  gemfire_impl::writeCharStar(out, m_persistenceLibrary);
-  gemfire_impl::writeCharStar(out, m_persistenceFactory);
+  apache::geode::client::impl::writeCharStar(out, m_endpoints);
+  apache::geode::client::impl::writeCharStar(out, m_persistenceLibrary);
+  apache::geode::client::impl::writeCharStar(out, m_persistenceFactory);
   out.writeObject(m_persistenceProperties);
-  gemfire_impl::writeCharStar(out, m_poolName);
-  gemfire_impl::writeBool(out, m_isConcurrencyChecksEnabled);
+  apache::geode::client::impl::writeCharStar(out, m_poolName);
+  apache::geode::client::impl::writeBool(out, m_isConcurrencyChecksEnabled);
 }
 
 Serializable* RegionAttributes::fromData(DataInput& in) {
@@ -515,24 +529,24 @@ Serializable* RegionAttributes::fromData(DataInput& in) {
   in.readInt(reinterpret_cast<int32_t*>(&m_lruEntriesLimit));
   in.readInt(reinterpret_cast<int32_t*>(&m_lruEvictionAction));
 
-  gemfire_impl::readBool(in, &m_caching);
-  gemfire_impl::readBool(in, &m_clientNotificationEnabled);
-
-  gemfire_impl::readCharStar(in, &m_cacheLoaderLibrary);
-  gemfire_impl::readCharStar(in, &m_cacheLoaderFactory);
-  gemfire_impl::readCharStar(in, &m_cacheWriterLibrary);
-  gemfire_impl::readCharStar(in, &m_cacheWriterFactory);
-  gemfire_impl::readCharStar(in, &m_cacheListenerLibrary);
-  gemfire_impl::readCharStar(in, &m_cacheListenerFactory);
-  gemfire_impl::readCharStar(in, &m_partitionResolverLibrary);
-  gemfire_impl::readCharStar(in, &m_partitionResolverFactory);
+  apache::geode::client::impl::readBool(in, &m_caching);
+  apache::geode::client::impl::readBool(in, &m_clientNotificationEnabled);
+
+  apache::geode::client::impl::readCharStar(in, &m_cacheLoaderLibrary);
+  apache::geode::client::impl::readCharStar(in, &m_cacheLoaderFactory);
+  apache::geode::client::impl::readCharStar(in, &m_cacheWriterLibrary);
+  apache::geode::client::impl::readCharStar(in, &m_cacheWriterFactory);
+  apache::geode::client::impl::readCharStar(in, &m_cacheListenerLibrary);
+  apache::geode::client::impl::readCharStar(in, &m_cacheListenerFactory);
+  apache::geode::client::impl::readCharStar(in, &m_partitionResolverLibrary);
+  apache::geode::client::impl::readCharStar(in, &m_partitionResolverFactory);
   in.readInt(reinterpret_cast<int32_t*>(&m_diskPolicy));
-  gemfire_impl::readCharStar(in, &m_endpoints);
-  gemfire_impl::readCharStar(in, &m_persistenceLibrary);
-  gemfire_impl::readCharStar(in, &m_persistenceFactory);
+  apache::geode::client::impl::readCharStar(in, &m_endpoints);
+  apache::geode::client::impl::readCharStar(in, &m_persistenceLibrary);
+  apache::geode::client::impl::readCharStar(in, &m_persistenceFactory);
   in.readObject(m_persistenceProperties, true);
-  gemfire_impl::readCharStar(in, &m_poolName);
-  gemfire_impl::readBool(in, &m_isConcurrencyChecksEnabled);
+  apache::geode::client::impl::readCharStar(in, &m_poolName);
+  apache::geode::client::impl::readBool(in, &m_isConcurrencyChecksEnabled);
 
   return this;
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/69c3ac34/src/cppcache/src/SystemProperties.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/SystemProperties.cpp b/src/cppcache/src/SystemProperties.cpp
index 32449e9..20f1a46 100644
--- a/src/cppcache/src/SystemProperties.cpp
+++ b/src/cppcache/src/SystemProperties.cpp
@@ -35,11 +35,19 @@
 #endif
 
 using namespace apache::geode::client;
-namespace gemfire_impl {
+namespace apache {
+namespace geode {
+namespace client {
+namespace impl {
+
 void* getFactoryFunc(const char* lib, const char* funcName);
-}  // namespace gemfire_impl
 
-using namespace gemfire_impl;
+}  // namespace impl
+}  // namespace client
+}  // namespace geode
+}  // namespace apache
+
+using namespace apache::geode::client::impl;
 
 /******************************************************************************/
 

http://git-wip-us.apache.org/repos/asf/geode/blob/69c3ac34/src/cppcache/src/statistics/HostStatSampler.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/statistics/HostStatSampler.cpp b/src/cppcache/src/statistics/HostStatSampler.cpp
index b2d1896..45b60d8 100644
--- a/src/cppcache/src/statistics/HostStatSampler.cpp
+++ b/src/cppcache/src/statistics/HostStatSampler.cpp
@@ -41,7 +41,10 @@
 using namespace apache::geode::statistics;
 using namespace apache::geode::client;
 
-namespace gemfire_stats_globals {
+namespace apache {
+namespace geode {
+namespace statistics {
+namespace globals {
 std::string g_statFile;
 std::string g_statFileWithExt;
 int64 g_spaceUsed = 0;
@@ -51,16 +54,19 @@ int64 g_previoussamplesizeLastFile = 0;
 std::pair<std::string, size_t> g_fileInfoPair;
 // Vector to hold the fileInformation
 typedef std::vector<std::pair<std::string, int64> > g_fileInfo;
-}  // namespace gemfire_stats_globals
+}  // namespace globals
+}  // namespace statistics
+}  // namespace geode
+}  // namespace apache
 
-using namespace gemfire_stats_globals;
+using namespace apache::geode::statistics::globals;
 
 extern "C" {
 
 int selector(const dirent* d) {
   std::string inputname(d->d_name);
-  std::string filebasename =
-      ACE::basename(gemfire_stats_globals::g_statFileWithExt.c_str());
+  std::string filebasename = ACE::basename(
+      apache::geode::statistics::globals::g_statFileWithExt.c_str());
   size_t actualHyphenPos = filebasename.find_last_of('.');
   if (strcmp(filebasename.c_str(), d->d_name) == 0) return 1;
   size_t fileExtPos = inputname.find_last_of('.');


Mime
View raw message