com.atlassian.bamboo.agent.elastic.server
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShutdownOrderComparator
public ShutdownOrderComparator(AgentManager agentManager)
compare
public int compare(@NotNull
RemoteElasticInstance o1,
@NotNull
RemoteElasticInstance o2)
- Specified by:
compare
in interface Comparator<RemoteElasticInstance>
Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.