[
https://issues.apache.org/jira/browse/STORM-1000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14703857#comment-14703857
]
ASF GitHub Bot commented on STORM-1000:
---------------------------------------
GitHub user YvonneIronberg opened a pull request:
https://github.com/apache/storm/pull/691
STORM-1000
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/YvonneIronberg/storm storm-1000
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/storm/pull/691.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #691
----
commit 6a30be80a895c63d5e0c53183a9807b8e8c3a8b5
Author: YvonneIronberg <[email protected]>
Date: 2015-08-18T17:37:31Z
STORM-829.
commit 8d487852e51c67d943ee6ea2b778e9e68da5f062
Author: YvonneIronberg <[email protected]>
Date: 2015-08-18T17:44:29Z
STORM-829.
commit a59823446b89ccce461c72b655e157983be4dca2
Author: YvonneIronberg <[email protected]>
Date: 2015-08-19T19:35:42Z
STORM-1000.
commit a7cc363572ae324f5b46e05d7ce2a8efc641812d
Author: YvonneIronberg <[email protected]>
Date: 2015-08-19T22:09:42Z
STORM-1000.
commit 6ae2a9a88443342a6aab12bf5d5dd15e6405907b
Author: YvonneIronberg <[email protected]>
Date: 2015-08-19T22:33:47Z
storm-1000.
----
> Use static member classes when permitted
> ----------------------------------------
>
> Key: STORM-1000
> URL: https://issues.apache.org/jira/browse/STORM-1000
> Project: Apache Storm
> Issue Type: Improvement
> Reporter: Yvonne Ironberg
> Assignee: Yvonne Ironberg
> Priority: Minor
> Attachments: STORM-1000.patch
>
>
> In Java, the difference between “static member class” and “nonstatic member
> class” is simply a reference to its enclosing instance. “Static” here means
> “independent of the enclosing instance”. Or “an enclosed instance can survive
> without an enclosing instance”.
> * For an instance of a nonstatic member class, there is a reference from the
> enclosed instance to the enclosing instance. When the enclosing instance
> doesn’t exist, you cannot instantiate the nonstatic member class.
> * For an instance of a static member class, there isn’t such a reference from
> the enclosed instance to the enclosing instance. So this helps the enclosing
> instance be garbage-collected.
> Favoring static member classes when permitted improves performance because
> time and space for extra references are saved.
> This optimization was done before for Storm (e.g., as part of STORM-797), see
> its patch
> (https://patch-diff.githubusercontent.com/raw/apache/storm/pull/537.patch).
> This issue tries to improve all such places in the current codebase.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)