This is an automated email from the ASF dual-hosted git repository. igodwin pushed a commit to branch release/1.8 in repository https://gitbox.apache.org/repos/asf/geode-native.git
commit 58292a7a8c7d71750850a0f0864c0cf5ed0e039d Author: Blake Bender <ekalbred...@hotmail.com> AuthorDate: Tue Nov 6 07:47:15 2018 -0800 GEODE-5942: Remove named constants from PersistenceManager (#393) - These should just be agreed-upon values between client code and plugin Co-authored-by: Sai Boorlagaddda <sai.boorlaga...@gmail.com> --- cppcache/include/geode/PersistenceManager.hpp | 4 ---- cppcache/integration-test/testOverflowPutGetSqLite.cpp | 10 +++++++--- cppcache/src/PersistenceManager.cpp | 8 +------- sqliteimpl/SqLiteImpl.cpp | 4 ++++ 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/cppcache/include/geode/PersistenceManager.hpp b/cppcache/include/geode/PersistenceManager.hpp index 9cd591a..e2c0ca1 100644 --- a/cppcache/include/geode/PersistenceManager.hpp +++ b/cppcache/include/geode/PersistenceManager.hpp @@ -51,10 +51,6 @@ typedef std::shared_ptr<PersistenceManager> (*getPersistenceManagerInstance)( */ class APACHE_GEODE_EXPORT PersistenceManager { public: - static constexpr char const* MAX_PAGE_COUNT = "MaxPageCount"; - static constexpr char const* PAGE_SIZE = "PageSize"; - static constexpr char const* PERSISTENCE_DIR = "PersistenceDirectory"; - /** * Returns the current persistence manager. * @return persistence manager diff --git a/cppcache/integration-test/testOverflowPutGetSqLite.cpp b/cppcache/integration-test/testOverflowPutGetSqLite.cpp index 8ef89c7..0d753d2 100644 --- a/cppcache/integration-test/testOverflowPutGetSqLite.cpp +++ b/cppcache/integration-test/testOverflowPutGetSqLite.cpp @@ -50,6 +50,10 @@ using apache::geode::client::RegionShortcut; uint32_t numOfEnt; std::string sqlite_dir = "SqLiteRegionData"; +static constexpr char const *MAX_PAGE_COUNT = "MaxPageCount"; +static constexpr char const *PAGE_SIZE = "PageSize"; +static constexpr char const *PERSISTENCE_DIR = "PersistenceDirectory"; + // Return the number of keys and values in entries map. void getNumOfEntries(std::shared_ptr<Region> ®ionPtr, uint32_t num) { auto v = regionPtr->keys(); @@ -338,9 +342,9 @@ void setSqLiteProperties(std::shared_ptr<Properties> &sqliteProperties, int maxPageCount = 1073741823, int pageSize = 65536, std::string pDir = sqlite_dir) { sqliteProperties = Properties::create(); - sqliteProperties->insert(PersistenceManager::MAX_PAGE_COUNT, maxPageCount); - sqliteProperties->insert(PersistenceManager::PAGE_SIZE, pageSize); - sqliteProperties->insert(PersistenceManager::PERSISTENCE_DIR, pDir.c_str()); + sqliteProperties->insert(MAX_PAGE_COUNT, maxPageCount); + sqliteProperties->insert(PAGE_SIZE, pageSize); + sqliteProperties->insert(PERSISTENCE_DIR, pDir.c_str()); ASSERT(sqliteProperties != nullptr, "Expected sqlite properties to be NON-nullptr"); } diff --git a/cppcache/src/PersistenceManager.cpp b/cppcache/src/PersistenceManager.cpp index c664226..29c529b 100644 --- a/cppcache/src/PersistenceManager.cpp +++ b/cppcache/src/PersistenceManager.cpp @@ -19,12 +19,6 @@ namespace apache { namespace geode { -namespace client { - -constexpr char const* PersistenceManager::MAX_PAGE_COUNT; -constexpr char const* PersistenceManager::PAGE_SIZE; -constexpr char const* PersistenceManager::PERSISTENCE_DIR; - -} // namespace client +namespace client {} // namespace client } // namespace geode } // namespace apache diff --git a/sqliteimpl/SqLiteImpl.cpp b/sqliteimpl/SqLiteImpl.cpp index 043398a..b57fa87 100644 --- a/sqliteimpl/SqLiteImpl.cpp +++ b/sqliteimpl/SqLiteImpl.cpp @@ -33,6 +33,10 @@ namespace apache { namespace geode { namespace client { +static constexpr char const* MAX_PAGE_COUNT = "MaxPageCount"; +static constexpr char const* PAGE_SIZE = "PageSize"; +static constexpr char const* PERSISTENCE_DIR = "PersistenceDirectory"; + void SqLiteImpl::init(const std::shared_ptr<Region> ®ion, const std::shared_ptr<Properties> &diskProperties) { // Set the default values