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.
BrooklynObject.TagSupport
Configurable.ConfigurationSupport
Modifier and Type | Field and Description |
---|---|
static AttributeSensor<Entity> |
FIRST |
static AttributeSensor<java.lang.Boolean> |
FIRST_MEMBER |
static AttributeSensor<java.util.Collection<Entity>> |
GROUP_MEMBERS |
static ConfigKey<java.lang.Boolean> |
MEMBER_DELEGATE_CHILDREN |
static ConfigKey<java.lang.String> |
MEMBER_DELEGATE_NAME_FORMAT |
static ConfigKey<QuorumCheck> |
RUNNING_QUORUM_CHECK |
static ConfigKey<QuorumCheck> |
UP_QUORUM_CHECK |
GROUP_SIZE, MEMBER_ADDED, MEMBER_REMOVED
Modifier and Type | Method and Description |
---|---|
void |
setMembers(java.util.Collection<Entity> m) |
void |
setMembers(java.util.Collection<Entity> mm,
com.google.common.base.Predicate<Entity> 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
addEnricher, 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, setParent
getCatalogItemId, getTagSupport, tags
config, setConfig
static final AttributeSensor<java.util.Collection<Entity>> GROUP_MEMBERS
static final AttributeSensor<java.lang.Boolean> FIRST_MEMBER
static final AttributeSensor<Entity> FIRST
static final ConfigKey<java.lang.Boolean> MEMBER_DELEGATE_CHILDREN
static final ConfigKey<java.lang.String> MEMBER_DELEGATE_NAME_FORMAT
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, com.google.common.base.Predicate<Entity> filter)
mm
- Entities to test against the filter, and to addfilter
- Filter for entities that are to be members (or null for "all")