|
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.autoscaling.AutoScalerPolicy
@SuppressWarnings({"rawtypes", "unchecked"}) @Catalog public class AutoScalerPolicy extends AbstractPolicy
Policy that is attached to a Resizable entity and dynamically adjusts its size in response to emitted POOL_COLD and POOL_HOT events. (This policy does not itself determine whether the pool is hot or cold, but instead relies on these events being emitted by the monitored entity itself, or by another policy that is attached to it; see, for example, LoadBalancingPolicy.)
Nested Class Summary | |
---|---|
static class |
AutoScalerPolicy.Builder
|
Fields inherited from class AbstractPolicy | |
---|---|
policyStatus, suspended |
Fields inherited from class AbstractEntityAdjunct | |
---|---|
_subscriptionTracker, adjunctType, configsInternal, entity, execution, id, leftoverProperties, name |
Method Summary | |
---|---|
java.lang.Object
|
AutoScalerPolicy()
|
java.lang.Object
|
AutoScalerPolicy(java.util.Map props)
|
static AutoScalerPolicy.Builder
|
builder()
|
protected void
|
doReconfigureConfig(ConfigKey key, java.lang.Object val)
|
void
|
resume()
|
void
|
setEntity(EntityLocal entity)
|
void
|
setMaxPoolSize(int val)
|
void
|
setMetricLowerBound(java.lang.Number val)
|
void
|
setMetricUpperBound(java.lang.Number val)
|
void
|
setMinPeriodBetweenExecs(long val)
|
void
|
setMinPoolSize(int val)
|
void
|
setResizeDownStabilizationDelay(long val)
|
void
|
setResizeUpStabilizationDelay(long val)
|
void
|
suspend()
|
java.lang.String
|
toString()
|
Methods inherited from class AbstractPolicy | |
---|---|
destroy, getPolicyType, getRebindSupport, isRunning, isSuspended, resume, suspend, toString |
Field Detail |
---|
.defaultValue(new Function() { public static final ConfigKey CURRENT_SIZE_OPERATOR
public static BasicNotificationSensor DEFAULT_MAX_SIZE_REACHED_SENSOR
public static BasicNotificationSensor DEFAULT_POOL_COLD_SENSOR
public static BasicNotificationSensor DEFAULT_POOL_HOT_SENSOR
public static BasicNotificationSensor DEFAULT_POOL_OK_SENSOR
.build(); public static final ConfigKey ENTITY_WITH_METRIC
.defaultValue(Integer.MAX_VALUE) public static final ConfigKey MAX_POOL_SIZE
.description("Time (milliseconds) that we consistently wanted to go above the maxPoolSize for, after which the maxSizeReachedSensor (if any) will be emitted") public static final ConfigKey MAX_REACHED_NOTIFICATION_DELAY
.description("Sensor for which a notification will be emitted (on the associated entity) when we consistently wanted to resize the pool above the max allowed size, for maxReachedNotificationDelay milliseconds") public static final ConfigKey MAX_SIZE_REACHED_SENSOR
.build(); public static final ConfigKey METRIC
.reconfigurable(true) public static final ConfigKey METRIC_LOWER_BOUND
.reconfigurable(true) public static final ConfigKey METRIC_UPPER_BOUND
.defaultValue(100L) public static final ConfigKey MIN_PERIOD_BETWEEN_EXECS
.defaultValue(0) public static final ConfigKey MIN_POOL_SIZE
.defaultValue(DEFAULT_POOL_COLD_SENSOR) public static final ConfigKey POOL_COLD_SENSOR
public static final java.lang.String POOL_CURRENT_SIZE_KEY
public static final java.lang.String POOL_CURRENT_WORKRATE_KEY
public static final java.lang.String POOL_HIGH_THRESHOLD_KEY
.defaultValue(DEFAULT_POOL_HOT_SENSOR) public static final ConfigKey POOL_HOT_SENSOR
public static final java.lang.String POOL_LOW_THRESHOLD_KEY
.defaultValue(DEFAULT_POOL_OK_SENSOR) public static final ConfigKey POOL_OK_SENSOR
.defaultValue(0l) public static final ConfigKey RESIZE_DOWN_STABILIZATION_DELAY
.defaultValue(new ResizeOperator() { public static final ConfigKey RESIZE_OPERATOR
.defaultValue(0l) public static final ConfigKey RESIZE_UP_STABILIZATION_DELAY
Method Detail |
---|
public java.lang.Object AutoScalerPolicy()
public java.lang.Object AutoScalerPolicy(java.util.Map props)
public static AutoScalerPolicy.Builder builder()
recentDesiredResizes.setWindowSize(maxResizeStabilizationDelay); protected void doReconfigureConfig(ConfigKey key, java.lang.Object val)
if (configsInternal.getRawConfig(RESIZE_OPERATOR) == null) { public void resume()
if (getMetric() != null) { public void setEntity(EntityLocal entity)
public void setMaxPoolSize(int val)
public void setMetricLowerBound(java.lang.Number val)
public void setMetricUpperBound(java.lang.Number val)
public void setMinPeriodBetweenExecs(long val)
public void setMinPoolSize(int val)
public void setResizeDownStabilizationDelay(long val)
public void setResizeUpStabilizationDelay(long val)
@Override public void suspend()
public java.lang.String toString()
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.