public class DynamicGroupImpl extends AbstractGroupImpl implements DynamicGroup
AbstractEntity.BasicConfigurationSupport, AbstractEntity.BasicEnricherSupport, AbstractEntity.BasicGroupSupport, AbstractEntity.BasicPolicySupport, AbstractEntity.BasicSensorSupport, AbstractEntity.BasicSubscriptionSupport
Entity.AdjunctSupport<T extends EntityAdjunct>, Entity.EnricherSupport, Entity.GroupSupport, Entity.PolicySupport, Entity.SensorSupport
BrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupport
Configurable.ConfigurationSupport
EntityInternal.EnricherSupportInternal, EntityInternal.EntitySubscriptionSupportInternal, EntityInternal.FeedSupport, EntityInternal.GroupSupportInternal, EntityInternal.PolicySupportInternal, EntityInternal.SensorSupportInternal
BrooklynObjectInternal.ConfigurationSupportInternal, BrooklynObjectInternal.RelationSupportInternal<T extends BrooklynObject>, BrooklynObjectInternal.SubscriptionSupportInternal
APPLICATION_ID, CATALOG_ID, CHILD_ADDED, CHILD_REMOVED, CONFIG_KEY_ADDED, CONFIG_KEY_REMOVED, DEFAULT_DISPLAY_NAME, EFFECTOR_ADDED, EFFECTOR_CHANGED, EFFECTOR_REMOVED, ENTITY_ID, GROUP_ADDED, GROUP_REMOVED, LOCATION_ADDED, LOCATION_REMOVED, POLICY_ADDED, POLICY_REMOVED, SENSOR_ADDED, SENSOR_REMOVED
ENTITY_FILTER, RESCAN_EFFECTOR, RUNNING
FIRST, GROUP_MEMBERS, MEMBER_DELEGATE_CHILDREN, MEMBER_DELEGATE_NAME_FORMAT, RUNNING_QUORUM_CHECK, UP_QUORUM_CHECK
GROUP_SIZE, MEMBER_ADDED, MEMBER_REMOVED
Constructor and Description |
---|
DynamicGroupImpl() |
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,
<any> filter)
As
DynamicGroup.addSubscription(Entity, Sensor) but with an additional filter. |
<any> |
entityFilter() |
void |
init()
Default entity initialization sets ID sensors and calls
AbstractEntity.initEnrichers() . |
void |
onManagementBecomingMaster()
Invoked by
ManagementContext when 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
ManagementContext when 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(<any> 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, setMembers
addChild, addChild, addFeed, addLocations, addLocationsWithoutPublishing, clearLocations, clearParent, config, configure, configure, destroy, enrichers, equals, feeds, firstLocation, getApplication, getApplicationId, getAttribute, getChildren, getConfig, getConfig, getCreationTime, getDisplayName, getEffector, getEntityType, getExecutionContext, getIconUrl, getLocations, getManagementContext, getManagementSupport, getMutableEntityType, getParent, getProxy, getProxyIfAvailable, getRebindSupport, groups, hashCode, invalidateReferences, invoke, invoke, invoke, onManagementStarted, onManagementStarting, onManagementStopped, policies, relations, removeChild, removeLocations, requestPersist, resetProxy, sensors, setConfigEvenIfOwned, setConfigEvenIfOwned, setDisplayName, setParent, setProxy, subscriptions, toMetadataRecord, toString
addSearchPath, getCatalogItemId, getCatalogItemIdSearchPath, getId, rebind, setCatalogItemId, setCatalogItemIdAndSearchPath, stackCatalogItemId, tags
getFirst, setMembers, setMembers
addChild, addChild, addMember, addMemberChild, addMemberChild, getCurrentSize, getMembers, hasMember, removeMember
addFeed, clearParent, enrichers, getApplication, getApplicationId, getAttribute, getChildren, getConfig, getCreationTime, getDisplayName, getEntityType, getIconUrl, getId, getLocations, getParent, groups, invoke, policies, relations, removeChild, sensors, setDisplayName, setParent
getCatalogItemId, getCatalogItemIdSearchPath, subscriptions, tags
config, getConfig
addSearchPath, setCatalogItemId, setCatalogItemIdAndSearchPath, stackCatalogItemId
public void init()
AbstractEntity
AbstractEntity.initEnrichers()
.init
in class AbstractGroupImpl
public void setEntityFilter(<any> filter)
DynamicGroup
DynamicGroup.ENTITY_FILTER
, overriding (and rescanning all) if already set.setEntityFilter
in interface DynamicGroup
public <any> entityFilter()
entityFilter
in interface DynamicGroup
public void stop()
DynamicGroup
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.
stop
in interface DynamicGroup
public <T> void addSubscription(Entity producer, Sensor<T> sensor, <any> filter)
DynamicGroup
DynamicGroup.addSubscription(Entity, Sensor)
but with an additional filter.addSubscription
in interface DynamicGroup
public <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 DynamicGroup
public void onManagementBecomingMaster()
AbstractEntity
ManagementContext
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 AbstractEntity
public void onManagementNoLongerMaster()
AbstractEntity
ManagementContext
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 AbstractEntity
public void rescanEntities()
DynamicGroup
rescanEntities
in interface DynamicGroup