public interface AbstractGroup extends Entity, Group, Changeable
Synchronization model. When changing and reading the group membership, this class uses internal synchronization to ensure atomic operations and the "happens-before" relationship for reads/updates from different threads. Sub-classes should not use this same synchronization mutex when doing expensive operations - e.g. if resizing a cluster, don't block everyone else from asking for the current number of members.
Entity.AdjunctSupport<T extends EntityAdjunct>, Entity.EnricherSupport, Entity.GroupSupport, Entity.PolicySupport, Entity.SensorSupport
BrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupport
Configurable.ConfigurationSupport
Modifier and Type | Field and Description |
---|---|
static AttributeSensor<Entity> |
FIRST
Deprecated.
since 0.12.0 use AbstractGroup.getFirst(Group) if required,
or better use an external enricher or policy to define the primary.
|
static AttributeSensor<java.util.Collection<Entity>> |
GROUP_MEMBERS |
static ConfigKey<java.lang.Boolean> |
MEMBER_DELEGATE_CHILDREN
Deprecated.
since 0.9.0, the UI no longer relies on the use of delegates to represent group membership (see #929)
|
static ConfigKey<java.lang.String> |
MEMBER_DELEGATE_NAME_FORMAT
Deprecated.
since 0.12.0, but was only ever used in
MEMBER_DELEGATE_CHILDREN was set (so effectively deprecated since 0.9.0). |
static ConfigKey<QuorumCheck> |
RUNNING_QUORUM_CHECK |
static ConfigKey<QuorumCheck> |
UP_QUORUM_CHECK |
GROUP_SIZE, MEMBER_ADDED, MEMBER_REMOVED
Modifier and Type | Method and Description |
---|---|
static Entity |
getFirst(Group g) |
void |
setMembers(java.util.Collection<Entity> m) |
void |
setMembers(java.util.Collection<Entity> mm,
<any> filter)
Removes any existing members that do not match the given filter, and adds those entities in
the given collection that match the predicate.
|
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
static final AttributeSensor<java.util.Collection<Entity>> GROUP_MEMBERS
@Deprecated static final AttributeSensor<Entity> FIRST
@Deprecated static final ConfigKey<java.lang.Boolean> MEMBER_DELEGATE_CHILDREN
@Deprecated static final ConfigKey<java.lang.String> MEMBER_DELEGATE_NAME_FORMAT
MEMBER_DELEGATE_CHILDREN
was set (so effectively deprecated since 0.9.0).static final ConfigKey<QuorumCheck> UP_QUORUM_CHECK
static final ConfigKey<QuorumCheck> RUNNING_QUORUM_CHECK
void setMembers(java.util.Collection<Entity> m)
void setMembers(java.util.Collection<Entity> mm, <any> filter)
mm
- Entities to test against the filter, and to addfilter
- Filter for entities that are to be members (or null for "all")