brooklyn.entity.basic
[Java] Interface AbstractGroup
brooklyn.entity.Entity
brooklyn.entity.Group
brooklyn.entity.trait.Changeable
brooklyn.entity.basic.AbstractGroup
brooklyn.entity.rebind.Rebindable
- All Superinterfaces:
- Entity, Group, Changeable, Rebindable
public interface AbstractGroup
extends Changeable, Entity, Group
Represents a group of entities - sub-classes can support dynamically changing membership,
ad hoc groupings, etc.
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.
Method Summary |
void
|
setMembers(java.util.Collection m)
|
void
|
setMembers(java.util.Collection mm, Predicate filter)
Removes any existing members that do not match the given filter, and adds those entities in
the given collection that match the predicate.
|
Methods inherited from interface Entity
|
addChild, addChild, addEnricher, addGroup, addOwnedChild, addPolicy, clearOwner, clearParent, getApplication, getApplicationId, getAttribute, getChildren, getConfig, getDisplayName, getEnrichers, getEntityType, getGroups, getId, getLocations, getOwnedChildren, getOwner, getParent, getPolicies, getRebindSupport, invoke, removeChild, removeEnricher, removeOwnedChild, removePolicy, setOwner, setParent |
setMembers
public void setMembers(java.util.Collection m)
-
setMembers
public void setMembers(java.util.Collection mm, Predicate filter)
- Removes any existing members that do not match the given filter, and adds those entities in
the given collection that match the predicate.
- Parameters:
mm
- Entities to test against the filter, and to addfilter
- Filter for entities that are to be members (or null for "all")
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.