brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request: Test clocker
Date Tue, 22 Mar 2016 15:33:05 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/59#discussion_r57007967
  
    --- Diff: core/src/main/java/org/apache/brooklyn/core/location/dynamic/DynamicLocation.java
---
    @@ -47,4 +49,14 @@
     
         E getOwner();
     
    +    /**
    +     * An opportunity to register this location (e.g. with the {@link LocationRegistry}
or the 
    +     * catalog, so that it will be persisted).
    +     */
    +    LocationDefinition register();
    --- End diff --
    
    `register()` is being used (in Clocker) to register the new "BasicLocationDefinition"
for that new named location. We could maybe do it in init(), rebind() and unmanage(). But
by having an explicit register() method called by the entity that owns the location, we can
ensure that the LocationRegistry is only updated when the location object is completely initialised.


---
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