You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2019/02/08 18:45:00 UTC

[jira] [Commented] (GEODE-3583) Remove all usages of static methods to the Cache

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

ASF subversion and git services commented on GEODE-3583:
--------------------------------------------------------

Commit 0040e259b5448e6205be4b2be11c2a833afc0ef9 in geode's branch refs/heads/develop from Dan Smith
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=0040e25 ]

GEODE-3583: Marking static variables final that are never modified

To help reduce the number of mutable statics to look through, adding
final to all of the statics that are not actually mutated outside of a
static initializer.

This change *only* consists of adding final to these variables.


> Remove all usages of static methods to the Cache
> ------------------------------------------------
>
>                 Key: GEODE-3583
>                 URL: https://issues.apache.org/jira/browse/GEODE-3583
>             Project: Geode
>          Issue Type: Improvement
>            Reporter: Udo Kohlmeyer
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: CacheFactoryList.txt, CombinedList.txt, GemFireCacheImplList.txt, InternalDistributedSystemList.txt
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> This ticket is the parent ticket to remove all invocations of CacheFactory.getAnyInstance(), GemFireCacheImpl.getInstance(), etc... 
> This improvement is complete is there are no more usages of the static methods to retrieve a Cache
> As per some work that [~huynhja] has done
> _ grep -rl "GemFireCacheImpl.getInstance" --include \*.java . > GemFireCacheImplList.txt
> grep -rl "CacheFactory.getAnyInstance" --include \*.java . > CacheFactoryList.txt
> grep -rl "InternalDistributedSystem.getAnyInstance" --include \*.java . > InternalDistributedSystemList.txt
> I've attached the files to this email...
> The combinedList.txt is a grep that combined all 3 calls into a single file... _
> [EDIT] Complete list of all singleton getters for which calls need to be removed:
> * CacheFactory.getAnyInstance()
> * CacheFactory.getInstance(DistributedSystem)
> * CacheFactory.getInstanceCloseOk(DistributedSystem)
> * GemFireCacheImpl.getExisting()
> * GemFireCacheImpl.getExisting(String)
> * GemFireCacheImpl.getForPdx(String)
> * GemFireCacheImpl.getInstance()
> * GemFireCacheImpl.setInstanceForTests(GemFireCacheImpl)
> * InternalDistributedSystem.getAnyInstance()
> * InternalDistributedSystem getConnectedInstance()
> * InternalDistributedSystem unsafeGetConnectedInstance()



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