Brooklyn

brooklyn.policy.autoscaling
[Java] Class AutoScalerPolicy

java.lang.Object
  brooklyn.policy.basic.AbstractEntityAdjunct
      brooklyn.policy.basic.AbstractPolicy
          brooklyn.policy.autoscaling.AutoScalerPolicy

@SuppressWarnings({"rawtypes", "unchecked"})
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

 
Field Summary
static ConfigKey CURRENT_SIZE_OPERATOR

static BasicNotificationSensor DEFAULT_MAX_SIZE_REACHED_SENSOR

A convenience for policies that want to register a builder.maxSizeReachedSensor(sensor).

static BasicNotificationSensor DEFAULT_POOL_COLD_SENSOR

static BasicNotificationSensor DEFAULT_POOL_HOT_SENSOR

static BasicNotificationSensor DEFAULT_POOL_OK_SENSOR

static ConfigKey ENTITY_WITH_METRIC

static ConfigKey MAX_POOL_SIZE

static ConfigKey MAX_REACHED_NOTIFICATION_DELAY

static ConfigKey MAX_SIZE_REACHED_SENSOR

static ConfigKey METRIC

static ConfigKey METRIC_LOWER_BOUND

static ConfigKey METRIC_UPPER_BOUND

static ConfigKey MIN_PERIOD_BETWEEN_EXECS

static ConfigKey MIN_POOL_SIZE

static ConfigKey POOL_COLD_SENSOR

static java.lang.String POOL_CURRENT_SIZE_KEY

static java.lang.String POOL_CURRENT_WORKRATE_KEY

static java.lang.String POOL_HIGH_THRESHOLD_KEY

static ConfigKey POOL_HOT_SENSOR

static java.lang.String POOL_LOW_THRESHOLD_KEY

static ConfigKey POOL_OK_SENSOR

static ConfigKey RESIZE_DOWN_STABILIZATION_DELAY

static ConfigKey RESIZE_OPERATOR

static ConfigKey RESIZE_UP_STABILIZATION_DELAY

 
Fields inherited from class AbstractPolicy
configsInternal, execution, leftoverProperties, policyStatus, suspended
 
Fields inherited from class AbstractEntityAdjunct
_subscriptionTracker, entity, id, 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
configure, configure, destroy, doReconfigureConfig, getAllConfig, getConfig, getConfigMap, getPolicyType, getRebindSupport, isRunning, isSuspended, resume, setConfig, suspend, toString
 
Methods inherited from class AbstractEntityAdjunct
check, destroy, getAllSubscriptions, getId, getManagementContext, getName, getSubscriptionTracker, isDestroyed, isRunning, setEntity, setId, setName, subscribe, subscribeToChildren, subscribeToMembers, unsubscribe, unsubscribe
 

Field Detail

CURRENT_SIZE_OPERATOR

@SetFromFlag("currentSizeOperator")
public static final ConfigKey CURRENT_SIZE_OPERATOR


DEFAULT_MAX_SIZE_REACHED_SENSOR

public static BasicNotificationSensor DEFAULT_MAX_SIZE_REACHED_SENSOR
A convenience for policies that want to register a builder.maxSizeReachedSensor(sensor). Note that this "default" is not set automatically; the default is for no sensor to be used (so no events emitted).


DEFAULT_POOL_COLD_SENSOR

public static BasicNotificationSensor DEFAULT_POOL_COLD_SENSOR


DEFAULT_POOL_HOT_SENSOR

public static BasicNotificationSensor DEFAULT_POOL_HOT_SENSOR


DEFAULT_POOL_OK_SENSOR

public static BasicNotificationSensor DEFAULT_POOL_OK_SENSOR


ENTITY_WITH_METRIC

@SetFromFlag("entityWithMetric")
public static final ConfigKey ENTITY_WITH_METRIC


MAX_POOL_SIZE

@SetFromFlag("maxPoolSize")
public static final ConfigKey MAX_POOL_SIZE


MAX_REACHED_NOTIFICATION_DELAY

@SetFromFlag("maxReachedNotificationDelay")
public static final ConfigKey MAX_REACHED_NOTIFICATION_DELAY


MAX_SIZE_REACHED_SENSOR

@SetFromFlag("maxSizeReachedSensor")
public static final ConfigKey MAX_SIZE_REACHED_SENSOR


METRIC

@SetFromFlag("metric")
public static final ConfigKey METRIC


METRIC_LOWER_BOUND

@SetFromFlag("metricLowerBound")
public static final ConfigKey METRIC_LOWER_BOUND


METRIC_UPPER_BOUND

@SetFromFlag("metricUpperBound")
public static final ConfigKey METRIC_UPPER_BOUND


MIN_PERIOD_BETWEEN_EXECS

@SetFromFlag("minPeriodBetweenExecs")
public static final ConfigKey MIN_PERIOD_BETWEEN_EXECS


MIN_POOL_SIZE

@SetFromFlag("minPoolSize")
public static final ConfigKey MIN_POOL_SIZE


POOL_COLD_SENSOR

@SetFromFlag("poolColdSensor")
public static final ConfigKey POOL_COLD_SENSOR


POOL_CURRENT_SIZE_KEY

public static final java.lang.String POOL_CURRENT_SIZE_KEY


POOL_CURRENT_WORKRATE_KEY

public static final java.lang.String POOL_CURRENT_WORKRATE_KEY


POOL_HIGH_THRESHOLD_KEY

public static final java.lang.String POOL_HIGH_THRESHOLD_KEY


POOL_HOT_SENSOR

@SetFromFlag("poolHotSensor")
public static final ConfigKey POOL_HOT_SENSOR


POOL_LOW_THRESHOLD_KEY

public static final java.lang.String POOL_LOW_THRESHOLD_KEY


POOL_OK_SENSOR

@SetFromFlag("poolOkSensor")
public static final ConfigKey POOL_OK_SENSOR


RESIZE_DOWN_STABILIZATION_DELAY

@SetFromFlag("resizeDownStabilizationDelay")
public static final ConfigKey RESIZE_DOWN_STABILIZATION_DELAY


RESIZE_OPERATOR

@SetFromFlag("resizeOperator")
public static final ConfigKey RESIZE_OPERATOR


RESIZE_UP_STABILIZATION_DELAY

@SetFromFlag("resizeUpStabilizationDelay")
public static final ConfigKey RESIZE_UP_STABILIZATION_DELAY


 
Method Detail

AutoScalerPolicy

public java.lang.Object AutoScalerPolicy()


AutoScalerPolicy

public java.lang.Object AutoScalerPolicy(java.util.Map props)


builder

public static AutoScalerPolicy.Builder builder()


doReconfigureConfig

@Override
protected void doReconfigureConfig(ConfigKey key, java.lang.Object val)


resume

@Override
public void resume()


setEntity

@Override
public void setEntity(EntityLocal entity)


setMaxPoolSize

public void setMaxPoolSize(int val)


setMetricLowerBound

public void setMetricLowerBound(java.lang.Number val)


setMetricUpperBound

public void setMetricUpperBound(java.lang.Number val)


setMinPeriodBetweenExecs

public void setMinPeriodBetweenExecs(long val)


setMinPoolSize

public void setMinPoolSize(int val)


setResizeDownStabilizationDelay

public void setResizeDownStabilizationDelay(long val)


setResizeUpStabilizationDelay

public void setResizeUpStabilizationDelay(long val)


suspend

@Override
public void suspend()


toString

@Override
public java.lang.String toString()


 

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