Interface ManagedAgentContainersOptimizer
-
- All Known Implementing Classes:
ManagedAgentContainersOptimizerImpl
@Internal public interface ManagedAgentContainersOptimizer
ManagedAgentContainersOptimizer
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull Pair<Collection<ElasticImageConfiguration>,Collection<EphemeralAgentLaunchRequest>>
findAgentContainersToStart(boolean elasticsEnabled, boolean ephemeralsEnabled)
Which and how many elastic images should be started.@NotNull Collection<RemoteElasticInstance>
getElasticAgentsToStop()
Returns a collection of currently running elastic agents that should be stopped.
-
-
-
Method Detail
-
findAgentContainersToStart
@NotNull @NotNull Pair<Collection<ElasticImageConfiguration>,Collection<EphemeralAgentLaunchRequest>> findAgentContainersToStart(boolean elasticsEnabled, boolean ephemeralsEnabled)
Which and how many elastic images should be started.- Returns:
- list of elastic image configurations to start
-
getElasticAgentsToStop
@NotNull @NotNull Collection<RemoteElasticInstance> getElasticAgentsToStop()
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 - nearing the end of their billing period - didn't have an agent running of them within an hour of startup- Returns:
- list of elastic instances that cannot run any of the builds currently in queue
-
-