You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2024/05/08 09:46:53 UTC
(brooklyn-server) branch master updated: allow workflow policy and callable to be subclassed
This is an automated email from the ASF dual-hosted git repository.
heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git
The following commit(s) were added to refs/heads/master by this push:
new 3bfae5b2fa allow workflow policy and callable to be subclassed
3bfae5b2fa is described below
commit 3bfae5b2fa8d7d25e79703271ecc49bb9b5529df
Author: Alex Heneveld <al...@cloudsoft.io>
AuthorDate: Wed May 8 10:46:35 2024 +0100
allow workflow policy and callable to be subclassed
---
.../main/java/org/apache/brooklyn/core/workflow/WorkflowPolicy.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/core/src/main/java/org/apache/brooklyn/core/workflow/WorkflowPolicy.java b/core/src/main/java/org/apache/brooklyn/core/workflow/WorkflowPolicy.java
index 1d2c9db914..58e445e296 100644
--- a/core/src/main/java/org/apache/brooklyn/core/workflow/WorkflowPolicy.java
+++ b/core/src/main/java/org/apache/brooklyn/core/workflow/WorkflowPolicy.java
@@ -146,12 +146,16 @@ public class WorkflowPolicy<T> extends AbstractPolicy implements WorkflowCommonC
.condition(new ConditionSupplierFromAdjunct());
Set<PollConfig> pollConfigs = MutableSet.of(pc);
- pollCallable = new WorkflowPollCallable(WorkflowContextType.POLICY, getDisplayName() + " (policy)", config().getBag(), this);
+ pollCallable = newWorkflowPollCallable();
poller.schedulePoll(this, pollConfigs, pollCallable, new PolicyNoOpPollHandler());
if (!isSuspended()) resume();
}
+ protected WorkflowPollCallable newWorkflowPollCallable() {
+ return new WorkflowPollCallable(WorkflowContextType.POLICY, getDisplayName() + " (policy)", config().getBag(), this);
+ }
+
@Override
public void suspend() {
super.suspend();