Class CloudInstancesProviderImpl
- java.lang.Object
-
- jetbrains.buildServer.clouds.server.impl.CloudInstancesProviderImpl
-
- All Implemented Interfaces:
CloudInstancesExpiration,CloudInstancesMaintenance,CloudInstancesProvider,ExpiredInstancesAgents
- Direct Known Subclasses:
SecuredCloudInstancesProvider
public class CloudInstancesProviderImpl extends Object implements CloudInstancesProvider, ExpiredInstancesAgents, CloudInstancesMaintenance
- Author:
- Eugene Petrenko Created: 04.11.2009 19:00:40
-
-
Constructor Summary
Constructors Constructor Description CloudInstancesProviderImpl(CloudManagerBase manager, CloudAgentRelation cloudAgentRelation, CloudEventDispatcher cloudEventsDispatcher, EventDispatcher<BuildServerListener> serverEventsDispatcher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisAgentExpired(BuildAgent agent)booleanisInstanceExpired(String profileId, String instanceId)booleanisInstanceMaintained(String profileId, String instanceId)voiditerateInstances(CloudInstancesProviderExtendedCallback callback)Iterates through all running instances of all profiles.voiditerateProfileInstances(CloudProfile profile, CloudInstancesProviderExtendedCallback callback)Iterates through instances of particular cloud profilevoidmarkInstanceExpired(String profileId, String instanceId)Terminate instance after current build finishesvoidmarkInstanceMaintained(String profileId, String instanceId)Marks the instance as being under maintenancevoidsetRunningAgentsTracker(RunningAgentsTrackerEx runningAgentsTracker)-
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.CloudInstancesProvider
isInstanceExpired, iterateInstances, iterateProfileInstances, markInstanceExpired
-
-
-
-
Constructor Detail
-
CloudInstancesProviderImpl
public CloudInstancesProviderImpl(@NotNull CloudManagerBase manager, @NotNull CloudAgentRelation cloudAgentRelation, @NotNull CloudEventDispatcher cloudEventsDispatcher, @NotNull EventDispatcher<BuildServerListener> serverEventsDispatcher)
-
-
Method Detail
-
setRunningAgentsTracker
public void setRunningAgentsTracker(@NotNull RunningAgentsTrackerEx runningAgentsTracker)
-
iterateInstances
public void iterateInstances(@NotNull CloudInstancesProviderExtendedCallback callback)Description copied from interface:CloudInstancesProviderIterates through all running instances of all profiles.- Specified by:
iterateInstancesin interfaceCloudInstancesProvider- Parameters:
callback- uses this interface to notify next instance
-
iterateProfileInstances
public void iterateProfileInstances(@NotNull CloudProfile profile, @NotNull CloudInstancesProviderExtendedCallback callback)Description copied from interface:CloudInstancesProviderIterates through instances of particular cloud profile- Specified by:
iterateProfileInstancesin interfaceCloudInstancesProvider- Parameters:
profile- profile to processcallback- uses this interface to notify next instance
-
markInstanceExpired
public void markInstanceExpired(@NotNull String profileId, @NotNull String instanceId)Description copied from interface:CloudInstancesExpirationTerminate instance after current build finishes- Specified by:
markInstanceExpiredin interfaceCloudInstancesExpiration- Parameters:
profileId- profile idinstanceId- id of instance to terminate after current build finishes
-
isAgentExpired
public boolean isAgentExpired(@NotNull BuildAgent agent)- Specified by:
isAgentExpiredin interfaceExpiredInstancesAgents
-
isInstanceExpired
public boolean isInstanceExpired(@NotNull String profileId, @NotNull String instanceId)- Specified by:
isInstanceExpiredin interfaceCloudInstancesExpiration- Returns:
- true, if no other builds will be run on this instance. False otherwise
-
markInstanceMaintained
public void markInstanceMaintained(@NotNull String profileId, @NotNull String instanceId)Description copied from interface:CloudInstancesMaintenanceMarks the instance as being under maintenance- Specified by:
markInstanceMaintainedin interfaceCloudInstancesMaintenance- Parameters:
profileId- profile idinstanceId- id of instance to terminate after current build finishes
-
isInstanceMaintained
public boolean isInstanceMaintained(@NotNull String profileId, @NotNull String instanceId)- Specified by:
isInstanceMaintainedin interfaceCloudInstancesMaintenance- Returns:
- true, instance is marked as maintained. False otherwise
-
-