|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.entity.basic.AbstractEntity
brooklyn.entity.basic.AbstractGroupImpl
brooklyn.entity.group.DynamicClusterImpl
public class DynamicClusterImpl extends AbstractGroupImpl
A cluster of entities that can dynamically increase or decrease the number of entities.
Field Summary | |
---|---|
protected java.lang.Object |
mutex
Mutex for synchronizing during re-size operations. |
Fields inherited from class AbstractEntity | |
---|---|
EFFECTOR_ADDED, EFFECTOR_CHANGED, EFFECTOR_REMOVED, LOG, POLICY_ADDED, POLICY_REMOVED, SENSOR_ADDED, SENSOR_REMOVED, _subscriptionTracker, managementSupport, tempWorkings |
Constructor Summary | |
DynamicClusterImpl()
|
Method Summary | |
---|---|
protected Entity
|
addNode(Location loc)
|
protected Entity
|
addNode()
|
protected boolean
|
calculateServiceUp()
|
protected void
|
cleanupFailedNodes(java.util.Collection failedEntities)
Default impl is to be up when running, and ! |
protected Entity
|
createNode(Location loc, java.util.Map flags)
|
protected Entity
|
createNode(java.util.Map flags)
|
protected void
|
discardNode(Entity entity)
|
protected java.util.List
|
findSubLocations(Location loc)
|
protected java.util.Map
|
getCustomChildFlags()
@deprecated since 0.6; use addNode(Location), so can take that location into account when configuring node |
protected EntityFactory
|
getFactory()
|
protected int
|
getInitialQuorumSize()
|
protected EntitySpec
|
getMemberSpec()
|
protected Multimap
|
getMembersByLocation()
|
protected java.util.List
|
getNonFailedSubLocations()
|
protected Group
|
getQuarantineGroup()
|
protected Function
|
getRemovalStrategy()
|
protected ZoneFailureDetector
|
getZoneFailureDetector()
|
protected NodePlacementStrategy
|
getZonePlacementStrategy()
|
protected java.util.Collection
|
grow(int delta)
Increases the cluster size by the given number. |
protected java.util.Collection
|
growByOne(Location loc)
Increases the cluster size by the given number. |
void
|
init()
|
protected boolean
|
isAvailabilityZoneEnabled()
|
protected boolean
|
isQuarantineEnabled()
|
protected Entity
|
pickAndRemoveMember()
@deprecated since 0.6.0; subclasses should instead override pickAndRemoveMembers(int) if they really need to! |
protected java.util.List
|
pickAndRemoveMembers(int delta)
|
protected void
|
quarantineFailedNodes(java.util.Collection failedEntities)
|
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
|
setZoneFailureDetector(ZoneFailureDetector val)
|
void
|
setZonePlacementStrategy(NodePlacementStrategy val)
|
protected void
|
shrink(int delta)
Decreases the cluster size by the given number. |
void
|
start(java.util.Collection locs)
|
void
|
stop()
|
protected void
|
stopAndRemoveNode(Entity member)
|
protected java.util.Map
|
waitForTasksOnEntityStart(java.util.Map tasks)
|
Methods inherited from class AbstractGroupImpl | |
---|---|
addMember, getCurrentSize, getMembers, hasMember, init, removeMember, setManagementContext, setMembers, setMembers |
Field Detail |
---|
protected final java.lang.Object mutex
Constructor Detail |
---|
public DynamicClusterImpl()
Method Detail |
---|
protected Entity addNode(Location loc)
protected Entity addNode()
protected boolean calculateServiceUp()
protected void cleanupFailedNodes(java.util.Collection failedEntities)
protected Entity createNode( Location loc, java.util.Map flags)
protected Entity createNode(java.util.Map flags)
protected void discardNode(Entity entity)
protected java.util.List findSubLocations(Location loc)
protected java.util.Map getCustomChildFlags()
protected EntityFactory getFactory()
protected int getInitialQuorumSize()
protected EntitySpec getMemberSpec()
protected Multimap getMembersByLocation()
protected java.util.List getNonFailedSubLocations()
protected Group getQuarantineGroup()
protected Function getRemovalStrategy()
protected ZoneFailureDetector getZoneFailureDetector()
protected NodePlacementStrategy getZonePlacementStrategy()
protected java.util.Collection grow(int delta)
protected java.util.Collection growByOne(Location loc)
public void init() { public void init()
protected boolean isAvailabilityZoneEnabled()
protected boolean isQuarantineEnabled()
protected Entity pickAndRemoveMember()
protected java.util.List pickAndRemoveMembers(int delta)
protected void quarantineFailedNodes(java.util.Collection failedEntities)
public boolean removeChild(Entity child)
Entity member = getEntityManager().getEntity(memberId); public java.lang.String replaceMember(java.lang.String memberId)
synchronized (mutex) { public java.lang.Integer resize(java.lang.Integer desiredSize)
throw new UnsupportedOperationException(); public void restart()
public void setFactory(EntityFactory> factory) { public void setFactory(EntityFactory factory)
public void setMemberSpec(EntitySpec> memberSpec) { public void setMemberSpec(EntitySpec memberSpec)
public void setRemovalStrategy(Function, Entity> val) { public void setRemovalStrategy(Function val)
public void setRemovalStrategy(Closure val) { public void setRemovalStrategy(groovy.lang.Closure val)
public void setZoneFailureDetector(ZoneFailureDetector val) { public void setZoneFailureDetector(ZoneFailureDetector val)
public void setZonePlacementStrategy(NodePlacementStrategy val) { public void setZonePlacementStrategy(NodePlacementStrategy val)
protected void shrink(int delta)
public void start(Collection extends Location> locs) { public void start(java.util.Collection locs)
setAttribute(SERVICE_STATE, Lifecycle.STOPPING); public void stop()
protected void stopAndRemoveNode(Entity member)
protected java.util.Map waitForTasksOnEntityStart(java.util.Map tasks)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.