public class ElasticRunningInstancesOptimizer
- extends java.lang.Object
Class 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.
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ElasticRunningInstancesOptimizer(BuildQueueManager buildQueueManager,
public java.util.Collection<ElasticImageConfiguration> getImagesToStart()
public java.util.Collection<RemoteElasticInstance> getInstancesToStop()
- 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_THREASHOLD
- in the last 10 minutes of full running hour (instances are paid in one hour increments)
- list of elastic instances that cannot run any of the builds currently in queue
Copyright © 2010 Atlassian. All Rights Reserved.