@Test(groups="Integration") public void testResizeUpStabilizationDelayIgnoresBlip() throws Exception { long resizeUpStabilizationDelay = 1000L; Duration minPeriodBetweenExecs = Duration.ZERO; resizable.policies().remove(policy); policy = AutoScalerPolicy.builder() .resizeUpStabilizationDelay(Duration.of(resizeUpStabilizationDelay, TimeUnit.MILLISECONDS)) .minPeriodBetweenExecs(minPeriodBetweenExecs) .build(); resizable.policies().add(policy); resizable.resize(1); resizable.sensors().emit(AutoScalerPolicy.DEFAULT_POOL_HOT_SENSOR, message(1, 61L, 1*10L, 1*20L)); Thread.sleep(resizeUpStabilizationDelay-OVERHEAD_DURATION_MS); resizable.sensors().emit(AutoScalerPolicy.DEFAULT_POOL_OK_SENSOR, message(1, 11L, 4*10L, 4*20L)); assertEquals(resizable.getCurrentSize(), (Integer)1); Asserts.succeedsContinually(MutableMap.of("duration", 2000L), new Runnable() { @Override public void run() { assertEquals(resizable.sizes, ImmutableList.of(1)); }}); }
public static Builder builder() { return new Builder(); }
AutoScalerPolicy extends AbstractPolicy { public static Builder builder() { return new Builder(); } }
AutoScalerPolicy extends AbstractPolicy { public static Builder builder() { return new Builder(); } AutoScalerPolicy();  AutoScalerPolicy(Map<String,?> props); }
AutoScalerPolicy extends AbstractPolicy { public static Builder builder() { return new Builder(); } AutoScalerPolicy();  AutoScalerPolicy(Map<String,?> props); static Builder builder(); @Override void init(); @Override void rebind(); void setMetricLowerBound(Number val); void setMetricUpperBound(Number val); int getResizeUpIterationIncrement(); void setResizeUpIterationIncrement(Integer val); int getResizeDownIterationIncrement(); void setResizeDownIterationIncrement(Integer val); int getResizeUpIterationMax(); void setResizeUpIterationMax(Integer val); int getResizeDownIterationMax(); void setResizeDownIterationMax(Integer val); void setMinPeriodBetweenExecs(Duration val); void setResizeUpStabilizationDelay(Duration val); void setResizeDownStabilizationDelay(Duration val); void setMinPoolSize(int val); void setMaxPoolSize(int val); @Override void suspend(); @Override void resume(); @Override void setEntity(EntityLocal entity); @Override String toString(); }
AutoScalerPolicy extends AbstractPolicy { public static Builder builder() { return new Builder(); } AutoScalerPolicy();  AutoScalerPolicy(Map<String,?> props); static Builder builder(); @Override void init(); @Override void rebind(); void setMetricLowerBound(Number val); void setMetricUpperBound(Number val); int getResizeUpIterationIncrement(); void setResizeUpIterationIncrement(Integer val); int getResizeDownIterationIncrement(); void setResizeDownIterationIncrement(Integer val); int getResizeUpIterationMax(); void setResizeUpIterationMax(Integer val); int getResizeDownIterationMax(); void setResizeDownIterationMax(Integer val); void setMinPeriodBetweenExecs(Duration val); void setResizeUpStabilizationDelay(Duration val); void setResizeDownStabilizationDelay(Duration val); void setMinPoolSize(int val); void setMaxPoolSize(int val); @Override void suspend(); @Override void resume(); @Override void setEntity(EntityLocal entity); @Override String toString(); static BasicNotificationSensor<Map> DEFAULT_POOL_HOT_SENSOR; static BasicNotificationSensor<Map> DEFAULT_POOL_COLD_SENSOR; static BasicNotificationSensor<Map> DEFAULT_POOL_OK_SENSOR; static BasicNotificationSensor<MaxPoolSizeReachedEvent> DEFAULT_MAX_SIZE_REACHED_SENSOR; static final String POOL_CURRENT_SIZE_KEY; static final String POOL_HIGH_THRESHOLD_KEY; static final String POOL_LOW_THRESHOLD_KEY; static final String POOL_CURRENT_WORKRATE_KEY; @SuppressWarnings("serial")
    @SetFromFlag("metric")
    static final ConfigKey<AttributeSensor<? extends Number>> METRIC; @SetFromFlag("entityWithMetric")
    static final ConfigKey<Entity> ENTITY_WITH_METRIC; @SetFromFlag("metricLowerBound")
    static final ConfigKey<Number> METRIC_LOWER_BOUND; @SetFromFlag("metricUpperBound")
    static final ConfigKey<Number> METRIC_UPPER_BOUND; @SetFromFlag("resizeUpIterationIncrement")
    static final ConfigKey<Integer> RESIZE_UP_ITERATION_INCREMENT; @SetFromFlag("resizeUpIterationMax")
    static final ConfigKey<Integer> RESIZE_UP_ITERATION_MAX; @SetFromFlag("resizeDownIterationIncrement")
    static final ConfigKey<Integer> RESIZE_DOWN_ITERATION_INCREMENT; @SetFromFlag("resizeDownIterationMax")
    static final ConfigKey<Integer> RESIZE_DOWN_ITERATION_MAX; @SetFromFlag("minPeriodBetweenExecs")
    static final ConfigKey<Duration> MIN_PERIOD_BETWEEN_EXECS; @SetFromFlag("resizeUpStabilizationDelay")
    static final ConfigKey<Duration> RESIZE_UP_STABILIZATION_DELAY; @SetFromFlag("resizeDownStabilizationDelay")
    static final ConfigKey<Duration> RESIZE_DOWN_STABILIZATION_DELAY; @SetFromFlag("minPoolSize")
    static final ConfigKey<Integer> MIN_POOL_SIZE; @SetFromFlag("maxPoolSize")
    static final ConfigKey<Integer> MAX_POOL_SIZE; static final ConfigKey<Integer> INSUFFICIENT_CAPACITY_HIGH_WATER_MARK; @SetFromFlag("resizeOperator")
    static final ConfigKey<ResizeOperator> RESIZE_OPERATOR; @SuppressWarnings("serial")
    @SetFromFlag("currentSizeOperator")
    static final ConfigKey<Function<Entity,Integer>> CURRENT_SIZE_OPERATOR; @SuppressWarnings("serial")
    @SetFromFlag("poolHotSensor")
    static final ConfigKey<BasicNotificationSensor<? extends Map>> POOL_HOT_SENSOR; @SuppressWarnings("serial")
    @SetFromFlag("poolColdSensor")
    static final ConfigKey<BasicNotificationSensor<? extends Map>> POOL_COLD_SENSOR; @SuppressWarnings("serial")
    @SetFromFlag("poolOkSensor")
    static final ConfigKey<BasicNotificationSensor<? extends Map>> POOL_OK_SENSOR; @SuppressWarnings("serial")
    @SetFromFlag("maxSizeReachedSensor")
    static final ConfigKey<BasicNotificationSensor<? super MaxPoolSizeReachedEvent>> MAX_SIZE_REACHED_SENSOR; @SetFromFlag("maxReachedNotificationDelay")
    static final ConfigKey<Duration> MAX_REACHED_NOTIFICATION_DELAY; }