|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.policy.basic.AbstractEntityAdjunct
brooklyn.policy.basic.AbstractPolicy
brooklyn.policy.loadbalancing.LoadBalancingPolicy
public class LoadBalancingPolicy extends AbstractPolicy
Policy that is attached to a pool of "containers", each of which can host one or more migratable "items". The policy monitors the workrates of the items and effects migrations in an attempt to ensure that the containers are all sufficiently utilized without any of them being overloaded.
The particular sensor that defines the items' workrates is specified when the policy is constructed. High- and
low-thresholds are defined as configuration keys on each of the container entities in the pool:
for an item sensor named foo.bar.sensorName
, the corresponding container config keys would be named
foo.bar.sensorName.threshold.low
and foo.bar.sensorName.threshold.high
.
In addition to balancing items among the available containers, this policy causes the pool Entity to emit
POOL_COLD
and POOL_HOT
events when it is determined that there is a surplus or shortfall
of container resource in the pool respectively. These events may be consumed by a separate policy that is capable
of resizing the container pool.
Field Summary |
---|
Fields inherited from class AbstractPolicy | |
---|---|
execution, leftoverProperties, policyStatus, suspended |
Fields inherited from class AbstractEntityAdjunct | |
---|---|
_subscriptionTracker, entity, id, name |
Constructor Summary | |
LoadBalancingPolicy(AttributeSensor metric, BalanceablePoolModel model)
|
|
LoadBalancingPolicy(java.util.Map props, AttributeSensor metric, BalanceablePoolModel model)
|
Method Summary | |
---|---|
void
|
resume()
|
void
|
setEntity(EntityLocal entity)
|
void
|
suspend()
|
java.lang.String
|
toString()
|
Methods inherited from class AbstractPolicy | |
---|---|
configure, configure, destroy, isRunning, isSuspended, resume, suspend, toString |
Methods inherited from class AbstractEntityAdjunct | |
---|---|
check, destroy, getAllSubscriptions, getId, getManagementContext, getName, getSubscriptionTracker, isDestroyed, isRunning, setEntity, setId, setName, subscribe, subscribeToChildren, subscribeToMembers, unsubscribe, unsubscribe |
Constructor Detail |
---|
public LoadBalancingPolicy(AttributeSensor metric, BalanceablePoolModel model)
public LoadBalancingPolicy(java.util.Map props, AttributeSensor metric, BalanceablePoolModel model)
Method Detail |
---|
@Override public void resume()
@Override public void setEntity(EntityLocal entity)
@Override public void suspend()
@Override public java.lang.String toString()
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.