public class DynamicGroupImpl extends AbstractGroupImpl implements DynamicGroup
BrooklynObject.TagSupportEntityInternal.FeedSupportCHILD_ADDED, CHILD_REMOVED, EFFECTOR_ADDED, EFFECTOR_CHANGED, EFFECTOR_REMOVED, POLICY_ADDED, POLICY_REMOVED, SENSOR_ADDED, SENSOR_REMOVEDENTITY_FILTER, RUNNINGFIRST, FIRST_MEMBER, GROUP_MEMBERS, MEMBER_DELEGATE_CHILDREN, MEMBER_DELEGATE_NAME_FORMAT, RUNNING_QUORUM_CHECK, UP_QUORUM_CHECKGROUP_SIZE, MEMBER_ADDED, MEMBER_REMOVED| Constructor and Description | 
|---|
| DynamicGroupImpl() | 
| DynamicGroupImpl(java.util.Map flags,
                Entity parent)Deprecated.  | 
| Modifier and Type | Method and Description | 
|---|---|
| <T> void | addSubscription(Entity producer,
               Sensor<T> sensor)Indicates an entity and/or sensor this group should monitor | 
| <T> void | addSubscription(Entity producer,
               Sensor<T> sensor,
               com.google.common.base.Predicate<? super SensorEvent<? super T>> filter)As  DynamicGroup.addSubscription(Entity, Sensor)but with an additional filter. | 
| com.google.common.base.Predicate<? super Entity> | entityFilter() | 
| void | init()Default entity initialization, just calls  AbstractEntity.initEnrichers(). | 
| void | onManagementBecomingMaster()Invoked by  ManagementContextwhen this entity becomes managed at a particular management node,
 including the initial management started and subsequent management node master-change for this entity. | 
| void | onManagementNoLongerMaster()Invoked by  ManagementContextwhen this entity becomes mastered at a particular management node,
 including the final management end and subsequent management node master-change for this entity. | 
| void | rescanEntities()Rescans all entities to determine whether they match the filter. | 
| void | setEntityFilter(groovy.lang.Closure<java.lang.Boolean> filter)Deprecated.  | 
| void | setEntityFilter(com.google.common.base.Predicate<? super Entity> filter)Sets  DynamicGroup.ENTITY_FILTER, overriding (and rescanning all) if already set. | 
| void | stop()Stops this group. | 
addMember, addMemberChild, addMemberChild, addMemberInternal, getCurrentSize, getMembers, hasMember, removeMember, setManagementContext, setMembers, setMembersaddChild, addChild, addEnricher, addEnricher, addFeed, addGroup, addLocations, addPolicy, addPolicy, addTag, clearLocations, clearParent, configure, configure, configure, configure, configure, containsTag, destroy, emit, emitInternal, equals, feeds, firstLocation, getAllAttributes, getAllConfig, getAllConfigBag, getApplication, getApplicationId, getAttribute, getAttributeByNameParts, getChildren, getConfig, getConfig, getConfig, getConfig, getConfigMap, getConfigRaw, getConfigRaw, getCreationTime, getDisplayName, getEffector, getEnrichers, getEntityType, getExecutionContext, getFeedSupport, getGroups, getIconUrl, getLocalConfigBag, getLocations, getManagementContext, getManagementSupport, getMutableEntityType, getParent, getPolicies, getProxy, getProxyIfAvailable, getRebindSupport, getSubscriptionContext, getTags, hashCode, invalidateReferences, invoke, invoke, invoke, modifyAttribute, onManagementStarted, onManagementStarting, onManagementStopped, refreshInheritedConfig, removeAllEnrichers, removeAllPolicies, removeAttribute, removeChild, removeEnricher, removeGroup, removeLocations, removePolicy, removeTag, requestPersist, resetProxy, setAttribute, setAttribute, setAttributeWithoutPublishing, setConfig, setConfig, setConfig, setConfig, setConfig, setConfig, setConfigEvenIfOwned, setConfigEvenIfOwned, setDisplayName, setParent, setProxy, subscribe, subscribeToChildren, subscribeToMembers, toMetadataRecord, toString, unsubscribe, unsubscribegetCatalogItemId, getId, getTagSupport, rebind, setCatalogItemId, tagssetMembers, setMembersaddChild, addChild, addMember, addMemberChild, addMemberChild, getCurrentSize, getMembers, hasMember, removeMemberaddEnricher, addEnricher, addFeed, addGroup, addPolicy, addPolicy, addTag, clearParent, containsTag, getApplication, getApplicationId, getAttribute, getChildren, getConfig, getConfig, getConfigRaw, getConfigRaw, getCreationTime, getDisplayName, getEnrichers, getEntityType, getGroups, getIconUrl, getId, getLocations, getParent, getPolicies, getTags, invoke, removeChild, removeEnricher, removeGroup, removePolicy, removeTag, setParentgetCatalogItemId, getTagSupport, tagssetCatalogItemIdpublic DynamicGroupImpl()
@Deprecated
public DynamicGroupImpl(java.util.Map flags,
                           Entity parent)
public void init()
AbstractEntityAbstractEntity.initEnrichers().init in class AbstractGroupImplpublic void setEntityFilter(com.google.common.base.Predicate<? super Entity> filter)
DynamicGroupDynamicGroup.ENTITY_FILTER, overriding (and rescanning all) if already set.setEntityFilter in interface DynamicGroup@Deprecated public void setEntityFilter(groovy.lang.Closure<java.lang.Boolean> filter)
setEntityFilter in interface DynamicGrouppublic com.google.common.base.Predicate<? super Entity> entityFilter()
entityFilter in interface DynamicGrouppublic void stop()
DynamicGroupDoes not stop any of its members. De-activates the filter and unsubscribes to entity-updates, so the membership of the group will not change.
stop in interface DynamicGrouppublic <T> void addSubscription(Entity producer, Sensor<T> sensor, com.google.common.base.Predicate<? super SensorEvent<? super T>> filter)
DynamicGroupDynamicGroup.addSubscription(Entity, Sensor) but with an additional filter.addSubscription in interface DynamicGrouppublic <T> void addSubscription(Entity producer, Sensor<T> sensor)
DynamicGroup
 Setting either to null indicates everything should be monitored. Note that subscriptions
 do not restrict what can be added, they merely ensure prompt membership checking (via
 DynamicGroup.ENTITY_FILTER) for those entities so subscribed.
addSubscription in interface DynamicGrouppublic void onManagementBecomingMaster()
AbstractEntityManagementContext when this entity becomes managed at a particular management node,
 including the initial management started and subsequent management node master-change for this entity.onManagementBecomingMaster in class AbstractEntitypublic void onManagementNoLongerMaster()
AbstractEntityManagementContext when this entity becomes mastered at a particular management node,
 including the final management end and subsequent management node master-change for this entity.onManagementNoLongerMaster in class AbstractEntitypublic void rescanEntities()
DynamicGrouprescanEntities in interface DynamicGroup