Brooklyn

brooklyn.entity.basic
[Java] Interface DynamicGroup

brooklyn.entity.Entity
  brooklyn.entity.Group
      brooklyn.entity.basic.DynamicGroup
          brooklyn.entity.trait.Changeable
              brooklyn.entity.basic.AbstractGroup
                  brooklyn.entity.rebind.Rebindable
All Superinterfaces:
Entity, Group, Changeable, AbstractGroup, Rebindable

@ImplementedBy(DynamicGroupImpl.class)
public interface DynamicGroup
extends AbstractGroup

Field Summary
static ConfigKey ENTITY_FILTER

static AttributeSensor RUNNING

 
Fields inherited from interface Changeable
GROUP_SIZE, MEMBER_ADDED, MEMBER_REMOVED
 
Method Summary
void addSubscription(Entity producer, Sensor sensor, Predicate filter)

as addSubscription(Entity, Sensor) but with an additional filter

void addSubscription(Entity producer, Sensor sensor)

indicates an entity and/or sensor this group should monitor; if either is null it means "all".

void rescanEntities()

rescans _all_ entities to determine whether they match the filter

void setEntityFilter(Predicate filter)

sets ENTITY_FILTER, overriding (and rescanning all) if already set

void setEntityFilter(groovy.lang.Closure filter)

see setEntityFilter(Predicate)

void stop()

Stops this group (but does not stop any of its members).

 
Methods inherited from interface AbstractGroup
setMembers, setMembers
 
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
 
Methods inherited from interface Group
addMember, getCurrentSize, getMembers, hasMember, removeMember
 

Field Detail

ENTITY_FILTER

@SetFromFlag("entityFilter")
public static final ConfigKey ENTITY_FILTER


RUNNING

public static final AttributeSensor RUNNING


 
Method Detail

addSubscription

public void addSubscription(Entity producer, Sensor sensor, Predicate filter)
as addSubscription(Entity, Sensor) but with an additional filter


addSubscription

public void addSubscription(Entity producer, Sensor sensor)
indicates an entity and/or sensor this group should monitor; if either is null it means "all". note that subscriptions do not _restrict_ what can be added, they merely ensure prompt membership checking (via ENTITY_FILTER) for those entities so subscribed


rescanEntities

public void rescanEntities()
rescans _all_ entities to determine whether they match the filter


setEntityFilter

public void setEntityFilter(Predicate filter)
sets ENTITY_FILTER, overriding (and rescanning all) if already set


setEntityFilter

public void setEntityFilter(groovy.lang.Closure filter)
see setEntityFilter(Predicate)


stop

public void stop()
Stops this group (but does not stop any of its members). De-activates the filter and unsubscribes to entity-updates, so the membership of the group will not change.


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.