public class DynamicMultiGroupImpl extends DynamicGroupImpl implements DynamicMultiGroup
| Modifier and Type | Class and Description |
|---|---|
static class |
DynamicMultiGroupImpl.BucketFromAttribute
Function for deriving bucket names from a sensor value. |
AbstractEntity.BasicConfigurationSupport, AbstractEntity.BasicEnricherSupport, AbstractEntity.BasicGroupSupport, AbstractEntity.BasicPolicySupport, AbstractEntity.BasicSensorSupport, AbstractEntity.BasicSubscriptionSupportEntity.AdjunctSupport<T extends EntityAdjunct>, Entity.EnricherSupport, Entity.GroupSupport, Entity.PolicySupport, Entity.SensorSupportBrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupportConfigurable.ConfigurationSupportEntityInternal.EnricherSupportInternal, EntityInternal.EntitySubscriptionSupportInternal, EntityInternal.FeedSupport, EntityInternal.GroupSupportInternal, EntityInternal.PolicySupportInternal, EntityInternal.SensorSupportInternalBrooklynObjectInternal.ConfigurationSupportInternal, BrooklynObjectInternal.RelationSupportInternal<T extends BrooklynObject>, BrooklynObjectInternal.SubscriptionSupportInternalAPPLICATION_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_REMOVEDBUCKET_FUNCTION, BUCKET_SPEC, BUCKETS, RESCAN, RESCAN_INTERVALENTITY_FILTER, RESCAN_EFFECTOR, RUNNINGFIRST, GROUP_MEMBERS, MEMBER_DELEGATE_CHILDREN, MEMBER_DELEGATE_NAME_FORMAT, RUNNING_QUORUM_CHECK, UP_QUORUM_CHECKGROUP_SIZE, MEMBER_ADDED, MEMBER_REMOVED| Constructor and Description |
|---|
DynamicMultiGroupImpl() |
| Modifier and Type | Method and Description |
|---|---|
static <any> |
bucketFromAttribute(AttributeSensor<?> sensor)
Convenience factory method for the common use-case of deriving the bucket directly from a sensor value.
|
static <any> |
bucketFromAttribute(AttributeSensor<?> sensor,
java.lang.String defaultValue)
Convenience factory method for the common use-case of deriving the bucket directly from a sensor value.
|
void |
distributeEntities()
Distribute entities accepted by the
DynamicGroup.ENTITY_FILTER into uniquely-named
buckets according to the DynamicMultiGroup.BUCKET_FUNCTION. |
void |
init()
Default entity initialization sets ID sensors and calls
AbstractEntity.initEnrichers(). |
void |
rebind()
Called by framework on rebind (in new-style instances):
after configuring, but
before the instance is managed, and
before adjuncts are attached to entities, and
before a reference to an object is shared.
|
void |
rescanEntities()
Rescans all entities to determine whether they match the filter.
|
void |
stop()
Stops this group.
|
addSubscription, addSubscription, entityFilter, onManagementBecomingMaster, onManagementNoLongerMaster, setEntityFilteraddMember, addMemberChild, addMemberChild, addMemberInternal, getCurrentSize, getMembers, hasMember, removeMember, setManagementContext, setMembers, setMembersaddChild, 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, toStringaddSearchPath, getCatalogItemId, getCatalogItemIdSearchPath, getId, setCatalogItemId, setCatalogItemIdAndSearchPath, stackCatalogItemId, tagsaddSubscription, addSubscription, entityFilter, setEntityFiltergetFirst, setMembers, setMembersaddChild, addChild, addMember, addMemberChild, addMemberChild, getCurrentSize, getMembers, hasMember, removeMemberaddFeed, clearParent, enrichers, getApplication, getApplicationId, getAttribute, getChildren, getConfig, getCreationTime, getDisplayName, getEntityType, getIconUrl, getId, getLocations, getParent, groups, invoke, policies, relations, removeChild, sensors, setDisplayName, setParentgetCatalogItemId, getCatalogItemIdSearchPath, subscriptions, tagsconfig, getConfigaddSearchPath, setCatalogItemId, setCatalogItemIdAndSearchPath, stackCatalogItemIdpublic static <any> bucketFromAttribute(AttributeSensor<?> sensor, java.lang.String defaultValue)
DynamicMultiGroup.BUCKET_FUNCTIONpublic static <any> bucketFromAttribute(AttributeSensor<?> sensor)
DynamicMultiGroup.BUCKET_FUNCTIONpublic void init()
AbstractEntityAbstractEntity.initEnrichers().init in class DynamicGroupImplpublic void rebind()
AbstractBrooklynObjectAbstractBrooklynObject.init() will not be called on rebind.
If you need to intercept behaviour after adjuncts are attached,
consider AbstractEntity.onManagementStarting()
(but probably worth raising a discussion on the mailing list!)
rebind in class AbstractBrooklynObjectpublic 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 DynamicGroupstop in class DynamicGroupImplpublic void rescanEntities()
DynamicGrouprescanEntities in interface DynamicGrouprescanEntities in class DynamicGroupImplpublic void distributeEntities()
DynamicMultiGroupDynamicGroup.ENTITY_FILTER into uniquely-named
buckets according to the DynamicMultiGroup.BUCKET_FUNCTION.
A Group entity is created for each required bucket and added as a managed child of
this component. Entities for a given bucket are added as members of the corresponding group.
By default BasicGroup instances will be created for the buckets, however any group
entity can be used instead (e.g. with custom effectors) by specifying the relevant entity
spec via the DynamicMultiGroup.BUCKET_SPEC config key.
Entities for which the bucket function returns null are not allocated to any
bucket and are thus effectively excluded. Buckets that become empty following re-evaluation
are removed.
distributeEntities in interface DynamicMultiGroupDynamicGroup.ENTITY_FILTER,
DynamicMultiGroup.BUCKET_FUNCTION,
#GROUP_SPEC