You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by du...@apache.org on 2020/12/07 14:10:38 UTC

[brooklyn-library] branch update-stop-interface created (now e8c95a7)

This is an automated email from the ASF dual-hosted git repository.

duncangrant pushed a change to branch update-stop-interface
in repository https://gitbox.apache.org/repos/asf/brooklyn-library.git.


      at e8c95a7  Update with new signatures

This branch includes the following new commits:

     new e8c95a7  Update with new signatures

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[brooklyn-library] 01/01: Update with new signatures

Posted by du...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

duncangrant pushed a commit to branch update-stop-interface
in repository https://gitbox.apache.org/repos/asf/brooklyn-library.git

commit e8c95a7aa523e717761df0a44020cf170a089eb5
Author: Duncan Grant <du...@cloudsoft.io>
AuthorDate: Mon Dec 7 14:09:55 2020 +0000

    Update with new signatures
    
    Required due to changes in
    https://github.com/apache/brooklyn-server/pull/1128
---
 .../brooklyn/entity/chef/ChefLifecycleEffectorTasks.java     | 12 ++++++------
 .../entity/cm/salt/impl/SaltLifecycleEffectorTasks.java      |  3 ++-
 .../postgresql/PostgreSqlNodeChefImplFromScratch.java        |  8 ++++----
 3 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/software/cm/chef/src/main/java/org/apache/brooklyn/entity/chef/ChefLifecycleEffectorTasks.java b/software/cm/chef/src/main/java/org/apache/brooklyn/entity/chef/ChefLifecycleEffectorTasks.java
index a142de4..5b211f7 100644
--- a/software/cm/chef/src/main/java/org/apache/brooklyn/entity/chef/ChefLifecycleEffectorTasks.java
+++ b/software/cm/chef/src/main/java/org/apache/brooklyn/entity/chef/ChefLifecycleEffectorTasks.java
@@ -57,7 +57,7 @@ import com.google.common.collect.ImmutableList;
  * <p>
  * Instances of this should use the {@link ChefConfig} config attributes to configure startup,
  * and invoke {@link #usePidFile(String)} or {@link #useService(String)} to determine check-running and stop behaviour.
- * Alternatively this can be subclassed and {@link #postStartCustom()} and {@link #stopProcessesAtMachine()} overridden.
+ * Alternatively this can be subclassed and {@link #postStartCustom(ConfigBag)} and {@link #stopProcessesAtMachine(ConfigBag)} overridden.
  * 
  * @since 0.6.0
  **/
@@ -237,7 +237,7 @@ public class ChefLifecycleEffectorTasks extends MachineLifecycleEffectorTasks im
     }
 
     @Override
-    protected void postStartCustom() {
+    protected void postStartCustom(ConfigBag parameters) {
         boolean result = false;
         result |= tryCheckStartPid();
         result |= tryCheckStartService();
@@ -246,7 +246,7 @@ public class ChefLifecycleEffectorTasks extends MachineLifecycleEffectorTasks im
             log.warn("No way to check whether "+entity()+" is running; assuming yes");
         }
         entity().sensors().set(SoftwareProcess.SERVICE_UP, true);
-        super.postStartCustom();
+        super.postStartCustom(parameters);
     }
     
     protected boolean tryCheckStartPid() {
@@ -289,7 +289,7 @@ public class ChefLifecycleEffectorTasks extends MachineLifecycleEffectorTasks im
     }
 
     @Override
-    protected String stopProcessesAtMachine() {
+    protected String stopProcessesAtMachine(ConfigBag parameters) {
         boolean result = false;
         result |= tryStopService();
         result |= tryStopWindowsService();
@@ -301,7 +301,7 @@ public class ChefLifecycleEffectorTasks extends MachineLifecycleEffectorTasks im
     }
     
     @Override
-    protected StopMachineDetails<Integer> stopAnyProvisionedMachines() {
+    protected StopMachineDetails<Integer> stopAnyProvisionedMachines(ConfigBag parameters) {
         if (detectChefMode(entity())==ChefModes.KNIFE) {
             DynamicTasks.queue(
                 // if this task fails show it as failed but don't block subsequent routines
@@ -315,7 +315,7 @@ public class ChefLifecycleEffectorTasks extends MachineLifecycleEffectorTasks im
                     .newTask() ));
         }
 
-        return super.stopAnyProvisionedMachines();
+        return super.stopAnyProvisionedMachines(parameters);
     }
     
     protected boolean tryStopService() {
diff --git a/software/cm/salt/src/main/java/org/apache/brooklyn/entity/cm/salt/impl/SaltLifecycleEffectorTasks.java b/software/cm/salt/src/main/java/org/apache/brooklyn/entity/cm/salt/impl/SaltLifecycleEffectorTasks.java
index b79c92d..3ae27a0 100644
--- a/software/cm/salt/src/main/java/org/apache/brooklyn/entity/cm/salt/impl/SaltLifecycleEffectorTasks.java
+++ b/software/cm/salt/src/main/java/org/apache/brooklyn/entity/cm/salt/impl/SaltLifecycleEffectorTasks.java
@@ -24,6 +24,7 @@ import org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffect
 
 import com.google.common.annotations.Beta;
 import com.google.common.base.Supplier;
+import org.apache.brooklyn.util.core.config.ConfigBag;
 
 /**
  * Kept only for rebinding to historic persisted state; not used.
@@ -38,7 +39,7 @@ class SaltLifecycleEffectorTasks extends MachineLifecycleEffectorTasks implement
     }
 
     @Override
-    protected String stopProcessesAtMachine() {
+    protected String stopProcessesAtMachine(ConfigBag params) {
         throw new UnsupportedOperationException("Legacy SaltEntity no longer supported");
     }
     
diff --git a/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlNodeChefImplFromScratch.java b/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlNodeChefImplFromScratch.java
index ec9f08f..7b60f5c 100644
--- a/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlNodeChefImplFromScratch.java
+++ b/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlNodeChefImplFromScratch.java
@@ -98,7 +98,7 @@ public class PostgreSqlNodeChefImplFromScratch extends EffectorStartableImpl imp
                 );
         }
         @Override
-        protected void postStartCustom() {
+        protected void postStartCustom(ConfigBag parameters) {
             // now run the creation script
             String creationScript;
             String creationScriptUrl = entity().getConfig(PostgreSqlNode.CREATION_SCRIPT_URL);
@@ -111,12 +111,12 @@ public class PostgreSqlNodeChefImplFromScratch extends EffectorStartableImpl imp
 
             // and finally connect sensors
             entity().connectSensors();
-            super.postStartCustom();
+            super.postStartCustom(parameters);
         }
         @Override
-        protected void preStopCustom() {
+        protected void preStopCustom(ConfigBag parameters) {
             entity().disconnectSensors();
-            super.preStopCustom();
+            super.preStopCustom(parameters);
         }
         @Override
         protected PostgreSqlNodeChefImplFromScratch entity() {