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

Reply via email to