com.atlassian.bamboo.buildqueue.manager
Class AgentAssignmentServiceImpl

java.lang.Object
  extended by com.atlassian.bamboo.buildqueue.manager.AgentAssignmentServiceImpl
All Implemented Interfaces:
AgentAssignmentService

public class AgentAssignmentServiceImpl
extends java.lang.Object
implements AgentAssignmentService


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.bamboo.buildqueue.manager.AgentAssignmentService
AgentAssignmentService.AgentAssignmentExecutable, AgentAssignmentService.AgentAssignmentExecutor
 
Field Summary
protected  AgentAssignmentDao agentAssignmentDao
           
 
Constructor Summary
AgentAssignmentServiceImpl(AgentAssignmentDao agentAssignmentDao, org.springframework.transaction.support.TransactionTemplate transactionTemplate, org.springframework.orm.hibernate.HibernateTemplate hibernateTemplate, ProjectManager projectManager, CachedPlanManager cachedPlanManager, DeploymentProjectService deploymentProjectService, EnvironmentService environmentService, com.atlassian.event.api.EventPublisher eventPublisher, CapabilitySetManager capabilitySetManager, CapabilityRequirementsMatcher capabilityRequirementsMatcher)
           
 
Method Summary
 void deleteExecutableAssignments(java.lang.Iterable<AgentAssignmentService.AgentAssignmentExecutable> agentAssignments)
          Remove a collection of agent assignments.
 void deleteExecutorAssignments(java.lang.Iterable<AgentAssignmentService.AgentAssignmentExecutor> agentAssignments)
          Remove a collection of agent assignments.
 AgentAssignmentMap getAgentAssignments()
          Retrieve an assignment map used to access executable and executor assignments
 boolean isCapabilitiesMatch(BuildAgent agent, ImmutableJob job)
          Helper methods to check if executor is capable of running executable
 boolean isCapabilitiesMatch(BuildAgent agent, long environmentId)
           
 boolean isCapabilitiesMatch(ElasticImageConfiguration image, ImmutableJob job)
           
 boolean isCapabilitiesMatch(ElasticImageConfiguration image, long environmentid)
           
 AgentAssignment saveAgentAssignment(AgentAssignment.ExecutorType executorType, long executorId, AgentAssignment.ExecutableType executableType, long entityId)
          Save an agent assignment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

agentAssignmentDao

protected final AgentAssignmentDao agentAssignmentDao
Constructor Detail

AgentAssignmentServiceImpl

public AgentAssignmentServiceImpl(@NotNull
                                  AgentAssignmentDao agentAssignmentDao,
                                  @NotNull
                                  org.springframework.transaction.support.TransactionTemplate transactionTemplate,
                                  @NotNull
                                  org.springframework.orm.hibernate.HibernateTemplate hibernateTemplate,
                                  @NotNull
                                  ProjectManager projectManager,
                                  @NotNull
                                  CachedPlanManager cachedPlanManager,
                                  @NotNull
                                  DeploymentProjectService deploymentProjectService,
                                  @NotNull
                                  EnvironmentService environmentService,
                                  @NotNull
                                  com.atlassian.event.api.EventPublisher eventPublisher,
                                  @NotNull
                                  CapabilitySetManager capabilitySetManager,
                                  @NotNull
                                  CapabilityRequirementsMatcher capabilityRequirementsMatcher)
Method Detail

saveAgentAssignment

@NotNull
public AgentAssignment saveAgentAssignment(@NotNull
                                                   AgentAssignment.ExecutorType executorType,
                                                   long executorId,
                                                   @NotNull
                                                   AgentAssignment.ExecutableType executableType,
                                                   long entityId)
                                    throws WebValidationException
Description copied from interface: AgentAssignmentService
Save an agent assignment

Specified by:
saveAgentAssignment in interface AgentAssignmentService
Returns:
The saved agent assignment
Throws:
WebValidationException

deleteExecutableAssignments

public void deleteExecutableAssignments(@NotNull
                                        java.lang.Iterable<AgentAssignmentService.AgentAssignmentExecutable> agentAssignments)
Description copied from interface: AgentAssignmentService
Remove a collection of agent assignments.

Specified by:
deleteExecutableAssignments in interface AgentAssignmentService
Parameters:
agentAssignments - to delete

deleteExecutorAssignments

public void deleteExecutorAssignments(@NotNull
                                      java.lang.Iterable<AgentAssignmentService.AgentAssignmentExecutor> agentAssignments)
Description copied from interface: AgentAssignmentService
Remove a collection of agent assignments.

Specified by:
deleteExecutorAssignments in interface AgentAssignmentService
Parameters:
agentAssignments - to delete

getAgentAssignments

public AgentAssignmentMap getAgentAssignments()
Description copied from interface: AgentAssignmentService
Retrieve an assignment map used to access executable and executor assignments

Specified by:
getAgentAssignments in interface AgentAssignmentService
Returns:

isCapabilitiesMatch

public boolean isCapabilitiesMatch(BuildAgent agent,
                                   ImmutableJob job)
Description copied from interface: AgentAssignmentService
Helper methods to check if executor is capable of running executable

Specified by:
isCapabilitiesMatch in interface AgentAssignmentService

isCapabilitiesMatch

public boolean isCapabilitiesMatch(ElasticImageConfiguration image,
                                   ImmutableJob job)
Specified by:
isCapabilitiesMatch in interface AgentAssignmentService

isCapabilitiesMatch

public boolean isCapabilitiesMatch(BuildAgent agent,
                                   long environmentId)
Specified by:
isCapabilitiesMatch in interface AgentAssignmentService

isCapabilitiesMatch

public boolean isCapabilitiesMatch(ElasticImageConfiguration image,
                                   long environmentid)
Specified by:
isCapabilitiesMatch in interface AgentAssignmentService


Copyright © 2014 Atlassian Software Systems Pty Ltd. All Rights Reserved.