Brooklyn

brooklyn.entity.group
[Java] Class DynamicCluster

java.lang.Object
  groovy.lang.GroovyObjectSupport
      brooklyn.entity.basic.AbstractEntity
          brooklyn.entity.basic.AbstractGroup
              brooklyn.entity.group.DynamicCluster
All Implemented Interfaces:
Cluster

public class DynamicCluster
extends AbstractGroup

A cluster of entities that can dynamically increase or decrease the number of entities.


Field Summary
static BasicAttributeSensor SERVICE_STATE

 
Fields inherited from class AbstractEntity
LOG, SENSOR_ADDED, SENSOR_REMOVED, _subscriptionTracker, application, attributesInternal, configsInternal, execution, managementContext, managementData, subscription, tempWorkings
 
Constructor Summary
DynamicCluster(java.util.Map properties, Entity owner)

Instantiate a new DynamicCluster.

DynamicCluster(Entity owner)

DynamicCluster(java.util.Map properties)

 
Method Summary
protected Entity addNode()

protected boolean calculateServiceUp()

Default impl is to be up when running, and !

protected java.util.Map getCustomChildFlags()

EntityFactory getFactory()

protected Entity removeNode()

protected Entity removeNode(Entity entity)

boolean removeOwnedChild(Entity child)

java.lang.Integer resize(java.lang.Integer desiredSize)

void restart()

void setFactory(EntityFactory factory)

void setRemovalStrategy(Function val)

void setRemovalStrategy(groovy.lang.Closure val)

void start(java.util.Collection locs)

void stop()

protected java.lang.Throwable unwrapException(java.lang.Throwable e)

protected void waitForTasksOnEntityStart(java.util.Map tasks)

 
Methods inherited from class AbstractGroup
addMember, getCurrentSize, getMembers, hasMember, removeMember, setMembers, setMembers
 
Methods inherited from class AbstractEntity
addEnricher, addGroup, addOwnedChild, addPolicy, assertNotYetOwned, clearOwner, configure, configure, destroy, emit, emitInternal, firstLocation, getAllConfig, getApplication, getApplicationId, getAttribute, getAttributeByNameParts, getConfig, getConfig, getConfig, getConfig, getConfigMap, getEffector, getEnrichers, getEntityType, getExecutionContext, getGroups, getLocations, getManagementContext, getMutableEntityType, getOwnedChildren, getOwner, getPolicies, getSubscriptionContext, getSubscriptionTracker, hasEverBeenManaged, invalidate, invoke, invoke, invokeFromJava, invokeMethod, onManagementBecomingMaster, onManagementNoLongerMaster, refreshInheritedConfig, refreshInheritedConfigOfChildren, removeAllEnrichers, removeAllPolicies, removeAttribute, removeEnricher, removeOwnedChild, removePolicy, setApplication, setAttribute, setAttribute, setBeingManaged, setConfig, setConfig, setConfigEvenIfOwned, setConfigEvenIfOwned, setConfigIfValNonNull, setConfigIfValNonNull, setOwner, subscribe, subscribeToChildren, subscribeToMembers, toString, toStringFieldsToInclude, unsubscribe, unsubscribe
 
Methods inherited from class groovy.lang.GroovyObjectSupport
groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll()
 

Field Detail

SERVICE_STATE

public static final BasicAttributeSensor SERVICE_STATE


 
Constructor Detail

DynamicCluster

public DynamicCluster(java.util.Map properties, Entity owner)
Instantiate a new DynamicCluster. Valid properties are:
Parameters:
properties - the properties of the cluster (these may be visible to created children by inheritance, but to set properties on children explicitly, use the factory)
owner - the entity that owns this cluster (optional)


DynamicCluster

public DynamicCluster(Entity owner)


DynamicCluster

public DynamicCluster(java.util.Map properties)


 
Method Detail

addNode

protected Entity addNode()


calculateServiceUp

protected boolean calculateServiceUp()
Default impl is to be up when running, and !up otherwise.


getCustomChildFlags

protected java.util.Map getCustomChildFlags()


getFactory

public EntityFactory getFactory()


removeNode

protected Entity removeNode()


removeNode

protected Entity removeNode(Entity entity)


removeOwnedChild

@Override
public boolean removeOwnedChild(Entity child)


resize

public java.lang.Integer resize(java.lang.Integer desiredSize)


restart

public void restart()


setFactory

public void setFactory(EntityFactory factory)


setRemovalStrategy

public void setRemovalStrategy(Function val)


setRemovalStrategy

public void setRemovalStrategy(groovy.lang.Closure val)


start

public void start(java.util.Collection locs)


stop

public void stop()


unwrapException

protected java.lang.Throwable unwrapException(java.lang.Throwable e)


waitForTasksOnEntityStart

protected void waitForTasksOnEntityStart(java.util.Map tasks)


 

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