com.atlassian.bamboo.agent.elastic.schedule
Class ElasticRunningInstancesOptimizerImpl
java.lang.Object
com.atlassian.bamboo.agent.elastic.schedule.ElasticRunningInstancesOptimizerImpl
- All Implemented Interfaces:
- ElasticRunningInstancesOptimizer
public class ElasticRunningInstancesOptimizerImpl
- extends java.lang.Object
- implements ElasticRunningInstancesOptimizer
Constructor Summary |
ElasticRunningInstancesOptimizerImpl(BuildQueueManager buildQueueManager,
AgentManager agentManager,
PlanManager planManager,
ElasticInstanceManager elasticInstanceManager,
ElasticAccountBean elasticAccountBean,
BuildExecutionManager buildExecutionManager,
BambooLicenseManager bambooLicenseManager,
ResultsSummaryManager buildResultsSummaryManager,
AdministrationConfigurationManager administrationConfigurationManager,
com.opensymphony.xwork.TextProvider textProvider,
AwsAccountBean awsAccountBean)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ElasticRunningInstancesOptimizerImpl
public ElasticRunningInstancesOptimizerImpl(BuildQueueManager buildQueueManager,
AgentManager agentManager,
PlanManager planManager,
ElasticInstanceManager elasticInstanceManager,
ElasticAccountBean elasticAccountBean,
BuildExecutionManager buildExecutionManager,
BambooLicenseManager bambooLicenseManager,
ResultsSummaryManager buildResultsSummaryManager,
AdministrationConfigurationManager administrationConfigurationManager,
com.opensymphony.xwork.TextProvider textProvider,
AwsAccountBean awsAccountBean)
getImagesToStart
@NotNull
public java.util.Collection<ElasticImageConfiguration> getImagesToStart()
- Description copied from interface:
ElasticRunningInstancesOptimizer
- Which and how many elastic images should be started.
- Specified by:
getImagesToStart
in interface ElasticRunningInstancesOptimizer
- Returns:
getAgentsToStop
@NotNull
public java.util.Collection<RemoteElasticInstance> getAgentsToStop()
- Description copied from interface:
ElasticRunningInstancesOptimizer
- 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)
- Specified by:
getAgentsToStop
in interface ElasticRunningInstancesOptimizer
- Returns:
- list of elastic instances that cannot run any of the builds currently in queue
Copyright © 2012 Atlassian. All Rights Reserved.