brooklyn.entity
Interface Group

All Superinterfaces:
Entity, Identifiable, Rebindable

public interface Group
extends Entity

An Entity that groups together other entities. The grouping can be for any purpose, such as allowing easy management/monitoring of a group of entities. The grouping could be static (i.e. a fixed set of entities) or dynamic (i.e. contains all entities that match some filter).


Method Summary
 boolean addMember(Entity member)
          Adds the given member, returning true if this modifies the set of members (i.e.
 Integer getCurrentSize()
           
 Collection<Entity> getMembers()
          Return the entities that are members of this group.
 boolean hasMember(Entity member)
           
 boolean removeMember(Entity member)
          Removes the given member, returning true if this modifies the set of members (i.e.
 
Methods inherited from interface brooklyn.entity.Entity
addChild, addChild, addEnricher, addGroup, addPolicy, clearParent, getApplication, getApplicationId, getAttribute, getChildren, getConfig, getConfig, getCreationTime, getDisplayName, getEnrichers, getEntityType, getGroups, getIconUrl, getId, getLocations, getParent, getPolicies, getRebindSupport, invoke, removeChild, removeEnricher, removePolicy, setParent
 

Method Detail

getMembers

Collection<Entity> getMembers()
Return the entities that are members of this group.


hasMember

boolean hasMember(Entity member)
Returns:
True if it is a member of this group.

addMember

boolean addMember(Entity member)
Adds the given member, returning true if this modifies the set of members (i.e. it was not already a member).


removeMember

boolean removeMember(Entity member)
Removes the given member, returning true if this modifies the set of members (i.e. it was a member).


getCurrentSize

Integer getCurrentSize()
Returns:
The number of members in this group.


Copyright © 2013. All Rights Reserved.