brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rich...@apache.org
Subject [4/5] git commit: Set state to RUNNING if nothing ON_FIRE and some children RUNNING
Date Thu, 05 Jun 2014 15:25:15 GMT
Set state to RUNNING if nothing ON_FIRE and some children RUNNING


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/dd905e66
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/dd905e66
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/dd905e66

Branch: refs/heads/master
Commit: dd905e66ed4c7a9c818581734996e270e4f76997
Parents: 1c21938
Author: Andrew Kennedy <andrew.kennedy@cloudsoftcorp.com>
Authored: Wed Jun 4 23:20:20 2014 +0100
Committer: Andrew Kennedy <andrew.kennedy@cloudsoftcorp.com>
Committed: Wed Jun 4 23:20:49 2014 +0100

----------------------------------------------------------------------
 core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/dd905e66/core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java b/core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java
index 7124bf2..c829593 100644
--- a/core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java
+++ b/core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java
@@ -293,6 +293,8 @@ public class DynamicClusterImpl extends AbstractGroupImpl implements DynamicClus
             int onFire = Iterables.frequency(memberStates, Lifecycle.ON_FIRE);
             if ((getInitialQuorumSize() > 0 ? running < getInitialQuorumSize() : true)
&& onFire > 0) {
                 currentState = Lifecycle.ON_FIRE;
+            } else if (onFire == 0 && running > 0) {
+                currentState = Lifecycle.RUNNING;
             }
         }
         return currentState;


Mime
View raw message