Class ShutdownOrderComparator
java.lang.Object
com.atlassian.bamboo.agent.elastic.server.ShutdownOrderComparator
- All Implemented Interfaces:
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
-
Method Summary
Modifier and TypeMethodDescriptionint
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 Details
-
ShutdownOrderComparator
-
-
Method Details
-
compare
public int compare(@NotNull @NotNull RemoteElasticInstance o1, @NotNull @NotNull RemoteElasticInstance o2) - Specified by:
compare
in interfaceComparator<RemoteElasticInstance>
-