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

    https://github.com/apache/brooklyn-server/pull/132#discussion_r62502931
  
    --- Diff: 
core/src/main/java/org/apache/brooklyn/location/byon/FixedListMachineProvisioningLocation.java
 ---
    @@ -103,10 +105,29 @@
         @Beta
         @SuppressWarnings("serial")
         public static final ConfigKey<List<LocationSpec<? extends 
MachineLocation>>> MACHINE_SPECS = ConfigKeys.newConfigKey(
    -                    new TypeToken<List<LocationSpec<? extends 
MachineLocation>>>() {}, 
    -                    "byon.machineSpecs",
    -                    "Specs of machines that should be immediatly 
instantiated on init",
    -                    ImmutableList.<LocationSpec<? extends 
MachineLocation>>of());
    +            new TypeToken<List<LocationSpec<? extends MachineLocation>>>() 
{}, 
    +            "byon.machineSpecs",
    +            "Specs of machines that should be immediatly instantiated on 
init",
    +            ImmutableList.<LocationSpec<? extends MachineLocation>>of());
    +
    +    /**
    +     * The initialMachinesFactory allows {@code 
JcloudsByonLocationResolver} to work, to defer 
    +     * instantiating the {@code JcloudsLocation} and the {@code 
JcloudsMachineLocation} instances.
    +     * (Important because the caller might not use the spec and thus might 
not unmanage the machine 
    +     * instances).
    +     * 
    +     * We clear the initialMachinesFactory in init, so they will never be 
persisted. This will help 
    +     * with backwards compatibility if we change how this is done.
    +     * 
    +     * By the end of init(), the {@link #machines} will contain the full 
list of locations.
    +     */
    +    @Beta
    +    @SuppressWarnings("serial")
    +    public static final ConfigKey<Supplier<? extends List<? extends 
MachineLocation>>> INITIAL_MACHINES_FACTORY = ConfigKeys.newConfigKey(
    +            new TypeToken<Supplier<? extends List<? extends 
MachineLocation>>>() {}, 
    +            "byon.initialMachinesFactory",
    +            "Factory for creating the machines that should be immediatly 
instantiated on init",
    --- End diff --
    
    `immediatly`


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to