Class RunningInstanceTrackerImpl
- java.lang.Object
-
- jetbrains.buildServer.clouds.server.impl.instances.RunningInstanceTrackerImpl
-
- All Implemented Interfaces:
RunningAgentsTracker
,RunningAgentsTrackerEx
public class RunningInstanceTrackerImpl extends Object implements RunningAgentsTrackerEx
- Author:
- Eugene Petrenko Created: 04.11.2009 18:19:27
-
-
Constructor Summary
Constructors Modifier Constructor Description RunningInstanceTrackerImpl(CloudAgentRelation relation, CloudEventDispatcher dispatcher, EventDispatcher<BuildServerListener> serverDispatched, UpdateInstancesCollectionFactory updateTaskFactory, ScheduledExecutorService executorService, ServerResponsibility serverResponsibility, SecurityContextEx securityContext)
protected
RunningInstanceTrackerImpl(CloudAgentRelation relation, CloudEventDispatcher dispatcher, EventDispatcher<BuildServerListener> serverDispatched, UpdateInstancesCollectionFactory updateTaskFactory, ScheduledExecutorService executorService, ServerResponsibility serverResponsibility, SecurityContextEx securityContext, int updateTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
agentConnected(SBuildAgent agent)
void
agentDisconnected(SBuildAgent agent)
Collection<SBuildAgent>
findAgentByInstance(String profileId, String instanceId)
Collection<Pair<CloudProfile,CloudInstance>>
findAllStartingInstances()
Pair<String,String>
findMatchedInstanceByAgent(SBuildAgent agent)
This method searches for the already matched instance vs given agent.void
setCloudInstanceProvider(CloudInstancesProvider instanceProvider)
void
update()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.clouds.server.instances.RunningAgentsTracker
findAgentByInstance
-
-
-
-
Field Detail
-
ORDER_ID
public static final String ORDER_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RunningInstanceTrackerImpl
@Autowired public RunningInstanceTrackerImpl(@NotNull CloudAgentRelation relation, @NotNull CloudEventDispatcher dispatcher, @NotNull EventDispatcher<BuildServerListener> serverDispatched, @NotNull UpdateInstancesCollectionFactory updateTaskFactory, @NotNull ScheduledExecutorService executorService, @NotNull ServerResponsibility serverResponsibility, @NotNull SecurityContextEx securityContext)
-
RunningInstanceTrackerImpl
protected RunningInstanceTrackerImpl(@NotNull CloudAgentRelation relation, @NotNull CloudEventDispatcher dispatcher, @NotNull EventDispatcher<BuildServerListener> serverDispatched, @NotNull UpdateInstancesCollectionFactory updateTaskFactory, @NotNull ScheduledExecutorService executorService, @NotNull ServerResponsibility serverResponsibility, @NotNull SecurityContextEx securityContext, int updateTimeout)
-
-
Method Detail
-
setCloudInstanceProvider
public void setCloudInstanceProvider(@NotNull CloudInstancesProvider instanceProvider)
-
update
public void update()
-
agentConnected
public void agentConnected(@NotNull SBuildAgent agent)
-
agentDisconnected
public void agentDisconnected(@NotNull SBuildAgent agent)
-
findAgentByInstance
@NotNull public Collection<SBuildAgent> findAgentByInstance(@NotNull String profileId, @NotNull String instanceId)
- Specified by:
findAgentByInstance
in interfaceRunningAgentsTracker
-
findMatchedInstanceByAgent
@Nullable public Pair<String,String> findMatchedInstanceByAgent(@NotNull SBuildAgent agent)
Description copied from interface:RunningAgentsTrackerEx
This method searches for the already matched instance vs given agent. UnlikeCloudAgentRelation.findInstanceByAgent(AgentDescription, boolean)
it returns correct instance for the disconnected agents, because it doesn't rely on AgentDescription from AgentType- Specified by:
findMatchedInstanceByAgent
in interfaceRunningAgentsTrackerEx
- Returns:
-
findAllStartingInstances
@NotNull public Collection<Pair<CloudProfile,CloudInstance>> findAllStartingInstances()
- Specified by:
findAllStartingInstances
in interfaceRunningAgentsTracker
-
-