public class CapabilitySetManagerImpl extends Object implements CapabilitySetManager
Constructor and Description |
---|
CapabilitySetManagerImpl() |
Modifier and Type | Method and Description |
---|---|
@NotNull CapabilitySet |
createAgentCapabilitySet(@NotNull LocalAgentDefinition pipelineDefinition)
Create an agent scope capability set for local agents
|
@NotNull CapabilitySet |
createAgentCapabilitySet(@NotNull RemoteAgentDefinition pipelineDefinition)
Create an agent scope capability set for remote agents
|
@NotNull List<String> |
findUniqueCapabilityKeys()
Finds all the distinct capability keys
|
@NotNull ReadOnlyCapabilitySet |
getCombinedCapabilitySet(@NotNull CapabilitySet agentCapabilitySet)
Gets a combined "effective" capabilitySet given an agent's capabilitySet.
|
ReadOnlyCapabilitySet |
getCombinedCapabilitySet(@NotNull CapabilitySet agentCapabilitySet,
@Nullable CapabilitySet sharedCapabilitySet)
Gets a combined "effective" capabilitySet given an agent's capability set and a shared capability set
The agent capabilitySet will override capabilities in the
CapabilityScope.SHARED capabilities if there's
a precise key match. |
@Nullable ReadOnlyCapabilitySet |
getCombinedCapabilitySet(long agentId)
Gets the
ReadOnlyCapabilitySet for the agent. |
@Nullable ElasticImageConfiguration |
getElasticImage(@NotNull CapabilitySet capabilitySet) |
@Nullable PipelineDefinition |
getPipelineDefinition(@NotNull CapabilitySet capabilitySet) |
@Nullable CapabilitySet |
getSharedCapabilitySet(@NotNull CapabilitySet agentCapabilitySet)
Gets the shared capabilities depending on agentCapability type.
|
@Nullable CapabilitySet |
getSharedLocalCapabilitySet()
Gets the locally shared capabilities
|
CapabilitySet |
getSharedRemoteCapabilitySet()
Gets the remotely shared capabilities
|
@NotNull Collection<Capability> |
getSystemCapabilities(@NotNull String type)
Collection of
Capability which have keys prefixed with system.{type}
Used to identify Bamboo system capabilities for Builders / JDKs. |
@NotNull Collection<Capability> |
getSystemCapabilitiesByKey(@NotNull String key)
Collection of
Capability which have the specified key |
@NotNull Collection<String> |
getSystemCapabilityKeys(@NotNull String type,
boolean isElasticEnabled)
Returns a list of Capability Keys that match the given type
|
void |
saveCapabilitySet(@NotNull CapabilitySet capabilitySet)
Saves a capability set
|
@Nullable public @Nullable CapabilitySet getSharedLocalCapabilitySet()
RemotedCapabilitySetManager
getSharedLocalCapabilitySet
in interface RemotedCapabilitySetManager
CapabilitySet
public CapabilitySet getSharedRemoteCapabilitySet()
CapabilitySetManager
getSharedRemoteCapabilitySet
in interface CapabilitySetManager
CapabilitySet
@Nullable public @Nullable CapabilitySet getSharedCapabilitySet(@NotNull @NotNull CapabilitySet agentCapabilitySet)
CapabilitySetManager
getSharedCapabilitySet
in interface CapabilitySetManager
@Nullable public @Nullable PipelineDefinition getPipelineDefinition(@NotNull @NotNull CapabilitySet capabilitySet)
getPipelineDefinition
in interface CapabilitySetManager
@Nullable public @Nullable ElasticImageConfiguration getElasticImage(@NotNull @NotNull CapabilitySet capabilitySet)
getElasticImage
in interface CapabilitySetManager
@NotNull public @NotNull ReadOnlyCapabilitySet getCombinedCapabilitySet(@NotNull @NotNull CapabilitySet agentCapabilitySet)
CapabilitySetManager
CapabilityScope
.
The agent capabilitySet will override capabilities in the CapabilityScope.SHARED
capabilities if there's
a precise key match.getCombinedCapabilitySet
in interface CapabilitySetManager
public ReadOnlyCapabilitySet getCombinedCapabilitySet(@NotNull @NotNull CapabilitySet agentCapabilitySet, @Nullable @Nullable CapabilitySet sharedCapabilitySet)
CapabilitySetManager
CapabilityScope.SHARED
capabilities if there's
a precise key match.getCombinedCapabilitySet
in interface CapabilitySetManager
@Nullable public @Nullable ReadOnlyCapabilitySet getCombinedCapabilitySet(long agentId)
RemotedCapabilitySetManager
ReadOnlyCapabilitySet
for the agent.getCombinedCapabilitySet
in interface RemotedCapabilitySetManager
@NotNull public @NotNull CapabilitySet createAgentCapabilitySet(@NotNull @NotNull LocalAgentDefinition pipelineDefinition)
CapabilitySetManager
createAgentCapabilitySet
in interface CapabilitySetManager
@NotNull public @NotNull CapabilitySet createAgentCapabilitySet(@NotNull @NotNull RemoteAgentDefinition pipelineDefinition)
CapabilitySetManager
createAgentCapabilitySet
in interface CapabilitySetManager
public void saveCapabilitySet(@NotNull @NotNull CapabilitySet capabilitySet)
CapabilitySetManager
saveCapabilitySet
in interface CapabilitySetManager
@NotNull public @NotNull Collection<String> getSystemCapabilityKeys(@NotNull @NotNull String type, boolean isElasticEnabled)
CapabilitySetManager
getSystemCapabilityKeys
in interface CapabilitySetManager
type
- eg "builder" or "jdk"@NotNull public @NotNull Collection<Capability> getSystemCapabilities(@NotNull @NotNull String type)
CapabilitySetManager
Capability
which have keys prefixed with system.{type}
Used to identify Bamboo system capabilities for Builders / JDKs.getSystemCapabilities
in interface CapabilitySetManager
@NotNull public @NotNull Collection<Capability> getSystemCapabilitiesByKey(@NotNull @NotNull String key)
CapabilitySetManager
Capability
which have the specified keygetSystemCapabilitiesByKey
in interface CapabilitySetManager
@NotNull public @NotNull List<String> findUniqueCapabilityKeys()
CapabilitySetManager
findUniqueCapabilityKeys
in interface CapabilitySetManager
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.