geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (GEODE-3645) Update API CacheFactory::create to return cache object
Date Wed, 29 Nov 2017 18:08:02 GMT


ASF GitHub Bot commented on GEODE-3645:

pivotal-jbarrett commented on a change in pull request #159: GEODE-3645: Update CacheFactory::create
to return Cache by value

 File path: cppcache/src/CacheImpl.cpp
 @@ -88,14 +88,11 @@ CacheImpl::CacheImpl(Cache* c, const std::string& name,
     LOGINFO("Heap LRU eviction controller thread started");
-  m_cacheStats = new CachePerfStats(m_distributedSystem.get()
-                                        ->getStatisticsManager()
-                                        ->getStatisticsFactory());
   m_initialized = true;
-  m_poolManager = std::unique_ptr<PoolManager>(new PoolManager(*m_implementee));
+  m_pdxTypeRegistry = std::make_shared<PdxTypeRegistry>(this);
 Review comment:
   Is `this` not initialized enough in the initializer list to initialize `m_pdxTypeRegistry`

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> Update API CacheFactory::create to return cache object
> ------------------------------------------------------
>                 Key: GEODE-3645
>                 URL:
>             Project: Geode
>          Issue Type: New Feature
>          Components: native client
>            Reporter: David Kimura
> As an application developer I want to control the stack vs heap allocation of my cache
object.  If we change CacheFactory::create to return a cache object then the application user
can pick an allocation scheme.  This also allows application developers to bypass smart pointer
complexity until the developer deems them necessary.
> Example:
> {noformat}
> auto cache = CacheFactory::createFactory().create();
> auto cacheptr = std::make_shared<Cache>(CacheFactory::createFactory().create());
> {noformat}
> Difficulty of implementation is due to Cache/CacheImpl circular dependency.  Here are
a few examples of various approaches to consider:
> Here are the related email threads of interest:

This message was sent by Atlassian JIRA

View raw message