brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorb...@apache.org
Subject [5/9] incubator-brooklyn git commit: Expose DynamicGroup.rescanEntities as an effector
Date Fri, 09 Jan 2015 13:11:49 GMT
Expose DynamicGroup.rescanEntities as an effector


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

Branch: refs/heads/master
Commit: 85a12af0658d969395827189d6db20e5789a71ec
Parents: abcf43e
Author: Sam Corbett <sam.corbett@cloudsoftcorp.com>
Authored: Thu Nov 27 19:13:59 2014 +0000
Committer: Sam Corbett <sam.corbett@cloudsoftcorp.com>
Committed: Wed Jan 7 17:15:22 2015 +0000

----------------------------------------------------------------------
 .../main/java/brooklyn/entity/basic/DynamicGroup.java | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/85a12af0/core/src/main/java/brooklyn/entity/basic/DynamicGroup.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/entity/basic/DynamicGroup.java b/core/src/main/java/brooklyn/entity/basic/DynamicGroup.java
index bd2f87e..0b9613d 100644
--- a/core/src/main/java/brooklyn/entity/basic/DynamicGroup.java
+++ b/core/src/main/java/brooklyn/entity/basic/DynamicGroup.java
@@ -18,9 +18,12 @@
  */
 package brooklyn.entity.basic;
 
-import groovy.lang.Closure;
+import com.google.common.base.Predicate;
+import com.google.common.reflect.TypeToken;
+
 import brooklyn.config.ConfigKey;
 import brooklyn.entity.Entity;
+import brooklyn.entity.annotation.Effector;
 import brooklyn.entity.proxying.ImplementedBy;
 import brooklyn.entity.trait.Startable;
 import brooklyn.event.AttributeSensor;
@@ -28,9 +31,7 @@ import brooklyn.event.Sensor;
 import brooklyn.event.SensorEvent;
 import brooklyn.event.basic.Sensors;
 import brooklyn.util.flags.SetFromFlag;
-
-import com.google.common.base.Predicate;
-import com.google.common.reflect.TypeToken;
+import groovy.lang.Closure;
 
 @ImplementedBy(DynamicGroupImpl.class)
 public interface DynamicGroup extends AbstractGroup {
@@ -43,12 +44,14 @@ public interface DynamicGroup extends AbstractGroup {
     AttributeSensor<Boolean> RUNNING = Sensors.newBooleanSensor(
             "dynamicgroup.running", "Whether the entity is running, and will automatically
update group membership");
 
+    MethodEffector<Void> RESCAN_EFFECTOR = new MethodEffector<Void>(DynamicGroup.class,
"rescanEntities");
+
     /**
      * Stops this group.
      * <p>
      * Does not stop any of its members. De-activates the filter and unsubscribes to
      * entity-updates, so the membership of the group will not change.
-     * 
+     *
      * @deprecated since 0.7; no longer supported (was only used in tests, and by classes
that
      *             also implemented {@link Startable#stop()}!)
      */
@@ -56,6 +59,7 @@ public interface DynamicGroup extends AbstractGroup {
     void stop();
 
     /** Rescans <em>all</em> entities to determine whether they match the filter.
*/
+    @Effector(description = "Rescans all entities to determine whether they match the configured
filter.")
     void rescanEntities();
 
     /** Sets {@link #ENTITY_FILTER}, overriding (and rescanning all) if already set. */


Mime
View raw message