You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Darrel Schneider (JIRA)" <ji...@apache.org> on 2018/02/03 00:40:00 UTC

[jira] [Commented] (GEODE-4559) Remove singleton calls from product code in org.apache.geode.cache.util

    [ https://issues.apache.org/jira/browse/GEODE-4559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16351126#comment-16351126 ] 

Darrel Schneider commented on GEODE-4559:
-----------------------------------------

The AutoBalancer is meant to be a plugin that a user would configure in a cache.xml in the initializer element. Since geode does not pass a reference to the cache when it calls Declarable.init(Properties) I do not see a way for this AutoBalancer to get the cache that created it.

Maybe we should add on optional method that Declarable can implement named "setCache" that allows the cache that is creating the declarable to pass a reference to itself. By default setCache would do nothing by implementors of Declarable could override it and remember the cache that created them.

> Remove singleton calls from product code in org.apache.geode.cache.util
> -----------------------------------------------------------------------
>
>                 Key: GEODE-4559
>                 URL: https://issues.apache.org/jira/browse/GEODE-4559
>             Project: Geode
>          Issue Type: Sub-task
>          Components: regions
>            Reporter: Kirk Lund
>            Priority: Major
>
> These product classes in org.apache.geode.cache.util invoke singleton getters.
> GemFireCacheImpl.getInstance():
> * AutoBalancer$GeodeCacheFacade



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)