brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Add basic sensors to RedisCluster
Date Fri, 31 Jul 2015 00:14:29 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/782#discussion_r35936178
  
    --- Diff: software/nosql/src/main/java/brooklyn/entity/nosql/redis/RedisClusterImpl.java
---
    @@ -80,4 +84,26 @@ protected boolean calculateServiceUp() {
             return up;
         }
     
    +    @Override
    +    public void init() {
    +        super.init();
    +
    +        subscribe(master, RedisStore.HOSTNAME, new MasterAttributePropagator());
    --- End diff --
    
    However, at this point (in `init`), `master` will be null. The reason it seems to work
is that `subscribe(null, ...)` is taken to mean a wild card to subscribe to all entities for
that sensor! Therefore when master does have its sensor published, we receive it here.
    
    Perhaps better to do this subscription / addEnricher in `start` where the `master` is
being set.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message