[
https://issues.apache.org/jira/browse/CURATOR-144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14113941#comment-14113941
]
ASF GitHub Bot commented on CURATOR-144:
----------------------------------------
Github user dragonsinth commented on a diff in the pull request:
https://github.com/apache/curator/pull/41#discussion_r16851772
--- Diff:
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCache.java
---
@@ -461,11 +546,16 @@ public void close()
*
* @return listenable
*/
- public ListenerContainer<TreeCacheListener> getListenable()
+ public Listenable<TreeCacheListener> getListenable()
--- End diff --
It's just a surface area reduction. Returning Listenable only allows a
caller to add and remove listeners (which you want). Returning the subtype
ListenableContainer would let a caller manipulate the collection, i.e. size(),
clear(), and forEach(). How weird would it be for an external caller to be
able to do `cache.getListenable().forEach(...)`?
> TreeCache should use a builder for advanced options
> ---------------------------------------------------
>
> Key: CURATOR-144
> URL: https://issues.apache.org/jira/browse/CURATOR-144
> Project: Apache Curator
> Issue Type: Improvement
> Components: Recipes
> Reporter: Scott Blum
> Priority: Minor
> Original Estimate: 24h
> Remaining Estimate: 24h
>
--
This message was sent by Atlassian JIRA
(v6.2#6252)