Interface AgentAssignmentService
-
- All Known Implementing Classes:
AgentAssignmentServiceImpl
public interface AgentAssignmentServiceService for managing the exclusive assignment for agents to jobs/environments
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAgentAssignmentService.AgentAssignmentExecutablestatic classAgentAssignmentService.AgentAssignmentExecutor
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddeleteAssignment(AgentAssignment.ExecutorType executorType, long executorId, AgentAssignment.ExecutableType executableType, long entityId)Remove agent assignment.voiddeleteExecutableAssignments(@NotNull Iterable<AgentAssignmentService.AgentAssignmentExecutable> agentAssignments)Remove a collection of agent assignments.voiddeleteExecutorAssignments(@NotNull Iterable<AgentAssignmentService.AgentAssignmentExecutor> agentAssignments)Remove a collection of agent assignments.AgentAssignmentMapgetAgentAssignments()Retrieve an assignment map used to access executable and executor assignmentsbooleanisAgentAssignmentAllowed()booleanisCapabilitiesMatch(ElasticImageConfiguration image, long environmentId)booleanisCapabilitiesMatch(ElasticImageConfiguration image, ImmutableJob job)booleanisCapabilitiesMatch(EphemeralAgentTemplate template, long environmentId)booleanisCapabilitiesMatch(EphemeralAgentTemplate template, ImmutableJob job)booleanisCapabilitiesMatch(BuildAgent agent, long environmentid)booleanisCapabilitiesMatch(BuildAgent agent, ImmutableJob job)Helper methods to check if executor is capable of running executable@NotNull AgentAssignmentsaveAgentAssignment(AgentAssignment.ExecutorType executorType, long executorId, AgentAssignment.ExecutableType executableType, long entityId)Save an agent assignment
-
-
-
Method Detail
-
saveAgentAssignment
@NotNull @NotNull AgentAssignment saveAgentAssignment(@NotNull AgentAssignment.ExecutorType executorType, long executorId, @NotNull AgentAssignment.ExecutableType executableType, long entityId) throws WebValidationException, AccessDeniedException
Save an agent assignment- Returns:
- The saved agent assignment
- Throws:
WebValidationExceptionAccessDeniedException
-
deleteExecutableAssignments
void deleteExecutableAssignments(@NotNull @NotNull Iterable<AgentAssignmentService.AgentAssignmentExecutable> agentAssignments) throws AccessDeniedExceptionRemove a collection of agent assignments.- Parameters:
agentAssignments- to delete- Throws:
AccessDeniedException
-
deleteExecutorAssignments
void deleteExecutorAssignments(@NotNull @NotNull Iterable<AgentAssignmentService.AgentAssignmentExecutor> agentAssignments) throws AccessDeniedExceptionRemove a collection of agent assignments.- Parameters:
agentAssignments- to delete- Throws:
AccessDeniedException
-
deleteAssignment
void deleteAssignment(AgentAssignment.ExecutorType executorType, long executorId, AgentAssignment.ExecutableType executableType, long entityId) throws AccessDeniedException
Remove agent assignment.- Parameters:
executorType- executor typeexecutorId- executor idexecutableType- executable typeentityId- executable id- Throws:
AccessDeniedException- if don't have permissions to edit entity
-
getAgentAssignments
AgentAssignmentMap getAgentAssignments()
Retrieve an assignment map used to access executable and executor assignments- Returns:
-
isCapabilitiesMatch
boolean isCapabilitiesMatch(BuildAgent agent, ImmutableJob job)
Helper methods to check if executor is capable of running executable
-
isCapabilitiesMatch
boolean isCapabilitiesMatch(ElasticImageConfiguration image, ImmutableJob job)
-
isCapabilitiesMatch
boolean isCapabilitiesMatch(EphemeralAgentTemplate template, ImmutableJob job)
-
isCapabilitiesMatch
boolean isCapabilitiesMatch(BuildAgent agent, long environmentid)
-
isCapabilitiesMatch
boolean isCapabilitiesMatch(ElasticImageConfiguration image, long environmentId)
-
isCapabilitiesMatch
boolean isCapabilitiesMatch(EphemeralAgentTemplate template, long environmentId)
-
isAgentAssignmentAllowed
boolean isAgentAssignmentAllowed()
- Returns:
- true if agent assignment is allowed at Global settings or user is instance Administrator.
-
-