geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbarr...@apache.org
Subject [1/2] geode-native git commit: Revert "GEODE-2494: Replace global statics with class scoped statics."
Date Wed, 15 Mar 2017 18:24:58 GMT
Repository: geode-native
Updated Branches:
  refs/heads/feature/GEODE-2602 57e915b28 -> d782efa7d


Revert "GEODE-2494: Replace global statics with class scoped statics."

- Solaris Studio 12.5 has unknown issue with constexpr.

This reverts commit 3dd36d608a27696bba28f7b1dde6d8453f6217e2.


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

Branch: refs/heads/feature/GEODE-2602
Commit: 6f2952e76aecaa6e1c317bac9983fb74b9e64352
Parents: 57e915b
Author: Jacob Barrett <jbarrett@pivotal.io>
Authored: Tue Mar 7 10:15:04 2017 -0800
Committer: Jacob Barrett <jbarrett@pivotal.io>
Committed: Tue Mar 7 10:16:08 2017 -0800

----------------------------------------------------------------------
 src/cppcache/src/CqQueryVsdStats.cpp   | 5 ++++-
 src/cppcache/src/CqQueryVsdStats.hpp   | 2 --
 src/cppcache/src/CqServiceVsdStats.cpp | 6 +++++-
 src/cppcache/src/CqServiceVsdStats.hpp | 2 --
 src/cppcache/src/LRUList.hpp           | 9 +++++----
 src/cppcache/src/RegionStats.cpp       | 3 +++
 src/cppcache/src/RegionStats.hpp       | 2 --
 7 files changed, 17 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/6f2952e7/src/cppcache/src/CqQueryVsdStats.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/CqQueryVsdStats.cpp b/src/cppcache/src/CqQueryVsdStats.cpp
index f24208a..ceb40a6 100644
--- a/src/cppcache/src/CqQueryVsdStats.cpp
+++ b/src/cppcache/src/CqQueryVsdStats.cpp
@@ -26,6 +26,9 @@
 
 #include "util/concurrent/spinlock_mutex.hpp"
 
+const char* cqStatsName = "CqQueryStatistics";
+const char* cqStatsDesc = "Statistics for this cq query";
+
 ////////////////////////////////////////////////////////////////////////////////
 
 namespace apache {
@@ -62,7 +65,7 @@ StatisticsType* CqQueryStatType::getStatType() {
         "events", "The total number of events for this cq query", "entries",
         largerIsBetter);
 
-    statsType = factory->createType(statsName, statsDesc, m_stats, 4);
+    statsType = factory->createType(cqStatsName, cqStatsDesc, m_stats, 4);
 
     m_numInsertsId = statsType->nameToId("inserts");
     m_numUpdatesId = statsType->nameToId("updates");

http://git-wip-us.apache.org/repos/asf/geode-native/blob/6f2952e7/src/cppcache/src/CqQueryVsdStats.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/CqQueryVsdStats.hpp b/src/cppcache/src/CqQueryVsdStats.hpp
index fdfae5a..3cc5672 100644
--- a/src/cppcache/src/CqQueryVsdStats.hpp
+++ b/src/cppcache/src/CqQueryVsdStats.hpp
@@ -79,8 +79,6 @@ class CPPCACHE_EXPORT CqQueryVsdStats : public CqStatistics {
 class CqQueryStatType {
  private:
   static spinlock_mutex m_statTypeLock;
-  static constexpr const char* statsName = "CqQueryStatistics";
-  static constexpr const char* statsDesc = "Statistics for this cq query";
 
  public:
   static CqQueryStatType& getInstance();

http://git-wip-us.apache.org/repos/asf/geode-native/blob/6f2952e7/src/cppcache/src/CqServiceVsdStats.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/CqServiceVsdStats.cpp b/src/cppcache/src/CqServiceVsdStats.cpp
index 562224f..08f331b 100644
--- a/src/cppcache/src/CqServiceVsdStats.cpp
+++ b/src/cppcache/src/CqServiceVsdStats.cpp
@@ -26,6 +26,9 @@
 
 #include "util/concurrent/spinlock_mutex.hpp"
 
+const char* cqServiceStatsName = "CqServiceStatistics";
+const char* cqServiceStatsDesc = "Statistics for this cq Service";
+
 ////////////////////////////////////////////////////////////////////////////////
 
 namespace apache {
@@ -66,7 +69,8 @@ StatisticsType* CqServiceStatType::getStatType() {
         "The total number of Cqs on the client for this cq Service", "entries",
         largerIsBetter);
 
-    statsType = factory->createType(statsName, statsDesc, m_stats, 5);
+    statsType =
+        factory->createType(cqServiceStatsName, cqServiceStatsDesc, m_stats, 5);
 
     m_numCqsActiveId = statsType->nameToId("CqsActive");
     m_numCqsCreatedId = statsType->nameToId("CqsCreated");

http://git-wip-us.apache.org/repos/asf/geode-native/blob/6f2952e7/src/cppcache/src/CqServiceVsdStats.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/CqServiceVsdStats.hpp b/src/cppcache/src/CqServiceVsdStats.hpp
index 9946e2b..710dfdb 100644
--- a/src/cppcache/src/CqServiceVsdStats.hpp
+++ b/src/cppcache/src/CqServiceVsdStats.hpp
@@ -113,8 +113,6 @@ class CPPCACHE_EXPORT CqServiceVsdStats : public CqServiceStatistics {
 class CqServiceStatType {
  private:
   static spinlock_mutex m_statTypeLock;
-  static constexpr const char* statsName = "CqServiceStatistics";
-  static constexpr const char* statsDesc = "Statistics for this cq Service";
 
  public:
   static CqServiceStatType& getInstance();

http://git-wip-us.apache.org/repos/asf/geode-native/blob/6f2952e7/src/cppcache/src/LRUList.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LRUList.hpp b/src/cppcache/src/LRUList.hpp
index 2db5a09..b773221 100644
--- a/src/cppcache/src/LRUList.hpp
+++ b/src/cppcache/src/LRUList.hpp
@@ -31,6 +31,11 @@ namespace apache {
 namespace geode {
 namespace client {
 
+// Bit mask for recently used
+#define RECENTLY_USED_BITS 1u
+// Bit mask for evicted
+#define EVICTED_BITS 2u
+
 /**
  * @brief This class encapsulates LRU specific properties for a LRUList node.
  */
@@ -67,10 +72,6 @@ class CPPCACHE_EXPORT LRUEntryProperties {
  private:
   std::atomic<uint32_t> m_bits;
   void* m_persistenceInfo;
-  // Bit mask for recently used
-  static constexpr uint32_t RECENTLY_USED_BITS = 1u;
-  // Bit mask for evicted
-  static constexpr uint32_t EVICTED_BITS = 2u;
 };
 
 using util::concurrent::spinlock_mutex;

http://git-wip-us.apache.org/repos/asf/geode-native/blob/6f2952e7/src/cppcache/src/RegionStats.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/RegionStats.cpp b/src/cppcache/src/RegionStats.cpp
index 677ec7c..285cf76 100644
--- a/src/cppcache/src/RegionStats.cpp
+++ b/src/cppcache/src/RegionStats.cpp
@@ -27,6 +27,9 @@
 
 #include "util/concurrent/spinlock_mutex.hpp"
 
+const char* statsName = "RegionStatistics";
+const char* statsDesc = "Statistics for this region";
+
 ////////////////////////////////////////////////////////////////////////////////
 
 namespace apache {

http://git-wip-us.apache.org/repos/asf/geode-native/blob/6f2952e7/src/cppcache/src/RegionStats.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/RegionStats.hpp b/src/cppcache/src/RegionStats.hpp
index 30ad7df..1f72d77 100644
--- a/src/cppcache/src/RegionStats.hpp
+++ b/src/cppcache/src/RegionStats.hpp
@@ -132,8 +132,6 @@ class RegionStatType {
   static RegionStatType* single;
   static spinlock_mutex m_singletonLock;
   static spinlock_mutex m_statTypeLock;
-  static constexpr const char* statsName = "RegionStatistics";
-  static constexpr const char* statsDesc = "Statistics for this region";
 
  public:
   static RegionStatType* getInstance();


Mime
View raw message