Brooklyn

brooklyn.policy.loadbalancing
[Java] Class BalanceableWorkerPool

java.lang.Object
  groovy.lang.GroovyObjectSupport
      brooklyn.entity.basic.AbstractEntity
          brooklyn.policy.loadbalancing.BalanceableWorkerPool
All Implemented Interfaces:
Resizable

public class BalanceableWorkerPool
extends AbstractEntity

Represents an elastic group of "container" entities, each of which is capable of hosting "item" entities that perform work and consume the container's available resources (e.g. CPU or bandwidth). Auto-scaling and load-balancing policies can be attached to this pool to provide dynamic elasticity based on workrates reported by the individual item entities.


Nested Class Summary
static class BalanceableWorkerPool.ContainerItemPair

Encapsulates an item and a container; emitted for ITEM_ADDED, ITEM_REMOVED and ITEM_MOVED sensors.

 
Field Summary
static BasicNotificationSensor CONTAINER_ADDED

static BasicNotificationSensor CONTAINER_REMOVED

static BasicNotificationSensor ITEM_ADDED

static BasicNotificationSensor ITEM_MOVED

static BasicNotificationSensor ITEM_REMOVED

 
Fields inherited from class AbstractEntity
LOG, POLICY_ADDED, POLICY_REMOVED, SENSOR_ADDED, SENSOR_REMOVED, _subscriptionTracker, attributesInternal, configsInternal, managementSupport, tempWorkings
 
Method Summary
java.lang.Object BalanceableWorkerPool()

java.lang.Object BalanceableWorkerPool(java.util.Map properties)

java.lang.Object BalanceableWorkerPool(Entity parent)

java.lang.Object BalanceableWorkerPool(java.util.Map properties, Entity parent)

Group getContainerGroup()

java.lang.Integer getCurrentSize()

Group getItemGroup()

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

void setContents(Group containerGroup, Group itemGroup)

void setResizable(Resizable resizable)

 
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()
 

Field Detail

CONTAINER_ADDED

public static BasicNotificationSensor CONTAINER_ADDED


CONTAINER_REMOVED

public static BasicNotificationSensor CONTAINER_REMOVED


ITEM_ADDED

public static BasicNotificationSensor ITEM_ADDED


ITEM_MOVED

public static BasicNotificationSensor ITEM_MOVED


ITEM_REMOVED

public static BasicNotificationSensor ITEM_REMOVED


 
Method Detail

BalanceableWorkerPool

public java.lang.Object BalanceableWorkerPool()


BalanceableWorkerPool

public java.lang.Object BalanceableWorkerPool(java.util.Map properties)


BalanceableWorkerPool

public java.lang.Object BalanceableWorkerPool(Entity parent)


BalanceableWorkerPool

public java.lang.Object BalanceableWorkerPool(java.util.Map properties, Entity parent)


getContainerGroup

public Group getContainerGroup()


getCurrentSize

public java.lang.Integer getCurrentSize()


getItemGroup

public Group getItemGroup()


resize

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


setContents

public void setContents(Group containerGroup, Group itemGroup)


setResizable

public void setResizable(Resizable resizable)


 

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