brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neykov <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Add ManagementContext.getConfigWi...
Date Wed, 11 Nov 2015 13:03:13 GMT
Github user neykov commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1018#issuecomment-155780641
  
    So we need to resolve external values at `getConfig` time, but at the same time allow
mutations of the properties. What if you patch the config in the `AbstractManagementContext`
constructor, but lazily - here's what I mean. In the constructor wrap the properties in a
delegate, including a reference to the mgmt context. On `get`s check the value and if needed
resolve. Alternatively convert any external values to suppliers, resolving on `get` (i.e.
make `BrooklynProperties` handle suppliers).
    
    It's obviously hackish to mutate the `ManagementContext.getConfig()` - might be a good
reason to find a generic way to do it, but out of scope for this.


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