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 #403: Adds DynamicFabric.includeInitialChildren...
Date Tue, 08 Nov 2016 10:02:03 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/403#discussion_r86957078
  
    --- Diff: core/src/main/java/org/apache/brooklyn/entity/group/DynamicFabricImpl.java ---
    @@ -122,27 +124,50 @@ public void start(Collection<? extends Location> locsO) {
             try {
                 Map<Entity, Task<?>> tasks = Maps.newLinkedHashMap();
                 
    -            // first look at existing Startable children - start them with the locations
passed in here,
    -            // if they have no locations yet
    -            for (Entity child: getChildren()) {
    -                if (child instanceof Startable) {
    -                    addMember(child);
    -                    Location it = null;
    -                    if (child.getLocations().isEmpty())
    -                        // give him any of these locations if he has none, allowing round
robin here
    -                        if (!locationsToStart.isEmpty()) {
    -                            it = locationsToStart.get(locIndex++ % locationsToStart.size());
    -                            ((EntityInternal)child).addLocations(Arrays.asList(it));
    +            if (includeInitialChildren) {
    +                // first look at existing Startable children - start them with the locations
passed in here,
    +                // if they have no locations yet
    +                for (Entity child: getChildren()) {
    +                    if (child instanceof Startable) {
    +                        addMember(child);
    --- End diff --
    
    Yes - if `includeInitialChildren=false` then these initial children are not considered
"members" of the fabric, but are extra things.


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