com.atlassian.bamboo.agent.elastic.schedule
Interface ElasticRunningInstancesOptimizer

All Known Implementing Classes:
ElasticRunningInstancesOptimizerImpl

public interface ElasticRunningInstancesOptimizer

ElasticRunningInstancesOptimizer is responsible for determining what elastic images and how many of them need to be started to speed up queue processing. It also checks what elastic instances can be shutdown without impacting the queue processing.

Author:
anatoli

Method Summary
 java.util.Collection<RemoteElasticInstance> getAgentsToStop()
          Returns a collection of currently running elastic agents that should be stopped.
 java.util.Collection<ElasticImageConfiguration> getImagesToStart()
          Which and how many elastic images should be started.
 

Method Detail

getImagesToStart

@NotNull
java.util.Collection<ElasticImageConfiguration> getImagesToStart()
Which and how many elastic images should be started.

Returns:

getAgentsToStop

@NotNull
java.util.Collection<RemoteElasticInstance> getAgentsToStop()
Returns a collection of currently running elastic agents that should be stopped. Current implementation returns the list of elastic instances that - cannot run any of the builds currently in queue - have been idle for longer than ELASTIC_AGENT_IDLE_THRESHOLD - in the last 10 minutes of full running hour (instances are paid in one hour increments)

Returns:
list of elastic instances that cannot run any of the builds currently in queue


Copyright © 2012 Atlassian. All Rights Reserved.