brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rich...@apache.org
Subject [12/16] git commit: Tidy persistence TODO comments
Date Tue, 27 May 2014 11:05:28 GMT
Tidy persistence TODO comments


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

Branch: refs/heads/feature/policy-persistence
Commit: b951b7be32906ce0adc46e31a5ab55d12be5ae5d
Parents: 6e43318
Author: Aled Sage <aled.sage@gmail.com>
Authored: Tue May 27 10:51:13 2014 +0100
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Tue May 27 11:22:45 2014 +0100

----------------------------------------------------------------------
 .../java/brooklyn/management/internal/EntityChangeListener.java | 4 +++-
 .../brooklyn/management/internal/EntityManagementSupport.java   | 5 +++--
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/b951b7be/core/src/main/java/brooklyn/management/internal/EntityChangeListener.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/management/internal/EntityChangeListener.java b/core/src/main/java/brooklyn/management/internal/EntityChangeListener.java
index 36a6324..d564074 100644
--- a/core/src/main/java/brooklyn/management/internal/EntityChangeListener.java
+++ b/core/src/main/java/brooklyn/management/internal/EntityChangeListener.java
@@ -30,7 +30,9 @@ public interface EntityChangeListener {
 
     void onChildrenChanged();
 
-    void onPoliciesChanged(); // TODO
+    // FIXME Also want something to be notified when policy's state/config changes.
+    //       Do we want a separate PolicyChangeListener instead? Or everything through EntityChangeListener?
+    void onPoliciesChanged();
 
     void onEffectorStarting(Effector<?> effector);
     

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/b951b7be/core/src/main/java/brooklyn/management/internal/EntityManagementSupport.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/management/internal/EntityManagementSupport.java
b/core/src/main/java/brooklyn/management/internal/EntityManagementSupport.java
index 6d65648..6b9dcde 100644
--- a/core/src/main/java/brooklyn/management/internal/EntityManagementSupport.java
+++ b/core/src/main/java/brooklyn/management/internal/EntityManagementSupport.java
@@ -344,9 +344,10 @@ public class EntityManagementSupport {
         }
         @Override
         public void onAttributeChanged(AttributeSensor<?> attribute) {
-            // if important persist, otherwiise ignore
+            // TODO Could make this more efficient by inspecting the attribute to decide
if needs persisted
+            // immediately, or not important, or transient (e.g. do we really need to persist

+            // request-per-second count for rebind purposes?!)
             getManagementContext().getRebindManager().getChangeListener().onChanged(entity);
-            // getManagementContext().getRebindManager().getAttributeChangeListener().onChanged(entity,
attribute);
         }
         @Override
         public void onConfigChanged(ConfigKey<?> key) {


Mime
View raw message