Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/372#discussion_r21237483
  
    --- Diff: 
core/src/main/java/brooklyn/entity/group/DynamicMultiGroupImpl.java ---
    @@ -74,13 +88,16 @@ public String apply(@Nullable Entity input) {
             return bucketFromAttribute(sensor, null);
         }
     
    -    private Map<String, BasicGroup> buckets = Maps.newHashMap();
    -    private volatile FunctionFeed rescan;
    +    private transient FunctionFeed rescan;
     
         @Override
         public void init() {
             super.init();
    +        setAttribute(BUCKETS, MutableMap.<String, BasicGroup>of());
    +        connectScanner();
    +    }
     
    +    private void connectScanner() {
             Long interval = getConfig(RESCAN_INTERVAL);
             if (interval != null && interval > 0L) {
                 rescan = FunctionFeed.builder()
    --- End diff --
    
    It's also possible to call `addFeed(FunctionFeed.builder()...)` in 
`init()`. By calling `addFeed`, it means the feed will be persisted, so it 
doesn't need to be called in `rebind()`. However, note the existing function 
feed's `.callable` would not be serializable.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to