Class ShutdownOrderComparator
- java.lang.Object
-
- com.atlassian.bamboo.agent.elastic.server.ShutdownOrderComparator
-
- All Implemented Interfaces:
Comparator<RemoteElasticInstance>
public class ShutdownOrderComparator extends Object implements Comparator<RemoteElasticInstance>
A compartator that will sort agents on the order which they should shutdown. Order is- No agent found for
RemoteElasticInstance
-
BuildAgent.isRequestedToBeStopped()
is true -
BuildAgent.isEnabled()
is false (disabled agents) -
BuildAgent.getAgentStatus()
's index
-
-
Constructor Summary
Constructors Constructor Description ShutdownOrderComparator(AgentManager agentManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(@NotNull RemoteElasticInstance o1, @NotNull RemoteElasticInstance o2)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Constructor Detail
-
ShutdownOrderComparator
public ShutdownOrderComparator(AgentManager agentManager)
-
-
Method Detail
-
compare
public int compare(@NotNull @NotNull RemoteElasticInstance o1, @NotNull @NotNull RemoteElasticInstance o2)
- Specified by:
compare
in interfaceComparator<RemoteElasticInstance>
-
-