Brooklyn

brooklyn.entity.group
[Java] Class DynamicClusterImpl

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

public class DynamicClusterImpl
extends AbstractGroupImpl

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


Field Summary
 
Fields inherited from class AbstractEntity
LOG, POLICY_ADDED, POLICY_REMOVED, SENSOR_ADDED, SENSOR_REMOVED, _subscriptionTracker, attributesInternal, configsInternal, managementSupport, tempWorkings
 
Constructor Summary
DynamicClusterImpl()

DynamicClusterImpl(java.util.Map properties, Entity parent)

Instantiate a new DynamicCluster.

DynamicClusterImpl(Entity parent)

DynamicClusterImpl(java.util.Map properties)

 
Method Summary
protected Entity addNode()

protected boolean calculateServiceUp()

Default impl is to be up when running, and !

protected Entity createNode(java.util.Map flags)

protected void discardNode(Entity entity)

protected java.util.Map getCustomChildFlags()

protected EntityFactory getFactory()

protected EntitySpec getMemberSpec()

protected Function getRemovalStrategy()

protected Entity pickAndRemoveMember()

boolean removeChild(Entity child)

java.lang.String replaceMember(java.lang.String memberId)

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

void restart()

void setFactory(EntityFactory factory)

void setMemberSpec(EntitySpec memberSpec)

void setRemovalStrategy(Function val)

void setRemovalStrategy(groovy.lang.Closure val)

void start(java.util.Collection locs)

void stop()

protected void stopAndRemoveNode(Entity member)

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

protected java.util.Map waitForTasksOnEntityStart(java.util.Map tasks)

 
Methods inherited from class AbstractGroupImpl
addMember, getCurrentSize, getMembers, hasMember, removeMember, setMembers, setMembers
 
Methods inherited from class AbstractEntity
addChild, addChild, addEnricher, addGroup, addLocations, addOwnedChild, addPolicy, assertNotYetOwned, clearOwner, clearParent, configure, configure, configure, configure, configure, createManagementSupport, destroy, emit, emitInternal, equals, finalize, firstLocation, getAllAttributes, getAllConfig, getApplication, getApplicationId, getAttribute, getAttributeByNameParts, getChildren, getChildrenReference, getConfig, getConfig, getConfig, getConfig, getConfigMap, getDisplayName, getEffector, getEnrichers, getEntityManager, getEntityType, getEntityTypeName, getExecutionContext, getGroups, getId, getLocations, getManagementContext, getManagementSupport, getMutableEntityType, getOwnedChildren, getOwnedChildrenReference, getOwner, getParent, getPolicies, getProxy, getProxyIfAvailable, getRebindSupport, getSubscriptionContext, getSubscriptionTracker, hasEverBeenManaged, hashCode, init, invalidateReferences, invoke, invoke, invokeFromJava, invokeMethod, isLegacyConstruction, onManagementBecomingMaster, onManagementNoLongerMaster, onManagementStarted, onManagementStarting, refreshInheritedConfig, refreshInheritedConfigOfChildren, removeAllEnrichers, removeAllPolicies, removeAttribute, removeChild, removeEnricher, removeLocations, removeOwnedChild, removePolicy, setApplication, setAttribute, setAttribute, setAttributeWithoutPublishing, setBeingManaged, setConfig, setConfig, setConfig, setConfig, setConfig, setConfig, setConfigEvenIfOwned, setConfigEvenIfOwned, setConfigIfValNonNull, setConfigIfValNonNull, setDisplayName, setManagementContext, setOwner, setParent, setProxy, subscribe, subscribeToChildren, subscribeToMembers, toString, toStringFieldsToInclude, toStringHelper, 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()
 

Constructor Detail

DynamicClusterImpl

public DynamicClusterImpl()


DynamicClusterImpl

public DynamicClusterImpl(java.util.Map properties, Entity parent)
Instantiate a new DynamicCluster. Valid properties are:
Parameters:
properties - The properties of the cluster (those corresponding to config keys will be visible to created children by inheritance, but to set properties on children explicitly, use the memberSpec or factory)
parent - the entity that owns this cluster (optional)


DynamicClusterImpl

public DynamicClusterImpl(Entity parent)


DynamicClusterImpl

public DynamicClusterImpl(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.


createNode

protected Entity createNode(java.util.Map flags)


discardNode

protected void discardNode(Entity entity)


getCustomChildFlags

protected java.util.Map getCustomChildFlags()


getFactory

protected EntityFactory getFactory()


getMemberSpec

protected EntitySpec getMemberSpec()


getRemovalStrategy

protected Function getRemovalStrategy()


pickAndRemoveMember

protected Entity pickAndRemoveMember()


removeChild

@Override
public boolean removeChild(Entity child)


replaceMember

@Override
public java.lang.String replaceMember(java.lang.String memberId)


resize

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


restart

@Override
public void restart()


setFactory

@Override
public void setFactory(EntityFactory factory)


setMemberSpec

@Override
public void setMemberSpec(EntitySpec memberSpec)


setRemovalStrategy

@Override
public void setRemovalStrategy(Function val)


setRemovalStrategy

@Override
public void setRemovalStrategy(groovy.lang.Closure val)


start

@Override
public void start(java.util.Collection locs)


stop

@Override
public void stop()


stopAndRemoveNode

protected void stopAndRemoveNode(Entity member)


unwrapException

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


waitForTasksOnEntityStart

protected java.util.Map waitForTasksOnEntityStart(java.util.Map tasks)


 

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