brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <>
Subject [GitHub] incubator-brooklyn pull request: Support suspending machines
Date Fri, 31 Jul 2015 19:50:05 GMT
Github user aledsage commented on a diff in the pull request:
    --- Diff: software/base/src/main/java/brooklyn/entity/software/
    @@ -155,29 +155,42 @@ public void attachLifecycleEffectors(Entity entity) {
    +    /** @see {@link #newStartEffector()} */
    +    public Effector<Void> newSuspendEffector() {
    +        return Effectors.effector(Void.class, "suspend")
    +                .description("Suspend the process/service represented by an entity")
    +                .parameter(StopSoftwareParameters.STOP_PROCESS_MODE)
    +                .parameter(StopSoftwareParameters.STOP_MACHINE_MODE)
    +                .impl(newSuspendEffectorTask())
    +                .build();
    +    }
    -     * Returns the {@link TaskFactory} which supplies the implementation for the start
    +     * Returns the {@link EffectorBody} which supplies the implementation for the start
          * <p>
          * Calls {@link #start(Collection)} in this class.
         public EffectorBody<Void> newStartEffectorTask() {
    -        return new EffectorBody<Void>() {
    -            @Override
    -            public Void call(ConfigBag parameters) {
    -                Collection<? extends Location> locations  = null;
    +        return new StartEffectorBody();
    --- End diff --
    @sjcorbett @neykov This is a big scary. I just hit it in my testing for a customer release.
But that's because I tested a release candidate a day ago and then again today with this change.
    Looking at what is persisted (with non-static classes etc), it feels scary for trying
to support (or transform) that in future releases.
    I'm going to change SoftwareProcess. LIFECYCLE_EFFECTOR_TASKS so that if the config is
null it defaults to as before; if it's non-null then it will use the config value. That means
we can take our time over whether we want to have a SoftwareProcessDriverLifecycleEffectorTasks
instances persisted by pretty much every customer.

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

View raw message