public abstract class AbstractCloud
extends hudson.slaves.Cloud
AbstractCloudImpl
, but it doesn't provide templates
and has bad counter type.Modifier and Type | Field and Description |
---|---|
protected int |
containerCap
Total max allowed number of containers
|
protected HashMap<DockerSlaveTemplate,Integer> |
provisionedImages
Track the count per image name for images currently being
provisioned, but not necessarily reported yet by docker.
|
protected List<DockerSlaveTemplate> |
templates |
Modifier | Constructor and Description |
---|---|
protected |
AbstractCloud(String name) |
Modifier and Type | Method and Description |
---|---|
void |
addTemplate(DockerSlaveTemplate t)
Add a new template to the cloud
|
boolean |
canProvision(hudson.model.Label label) |
protected void |
decrementAmiSlaveProvision(DockerSlaveTemplate container)
Decrease the count of slaves being "provisioned".
|
int |
getContainerCap() |
DockerSlaveTemplate |
getTemplate(hudson.model.Label label)
Gets first
DockerSlaveTemplate that has the matching Label . |
DockerSlaveTemplate |
getTemplate(String template) |
DockerSlaveTemplate |
getTemplateById(String id) |
List<DockerSlaveTemplate> |
getTemplates() |
List<DockerSlaveTemplate> |
getTemplates(hudson.model.Label label)
Multiple templates may have the same label.
|
void |
removeTemplate(DockerSlaveTemplate t)
Remove slave template
|
void |
setContainerCap(int containerCap) |
void |
setTemplates(List<DockerSlaveTemplate> replaceTemplates)
Set list of available templates
|
all, checkPermission, getACL, getDescriptor, getDisplayName, getSearchUrl, hasPermission, provision
protected final HashMap<DockerSlaveTemplate,Integer> provisionedImages
@Nonnull protected List<DockerSlaveTemplate> templates
protected int containerCap
protected AbstractCloud(String name)
public int getContainerCap()
public void setContainerCap(int containerCap)
public boolean canProvision(hudson.model.Label label)
canProvision
in class hudson.slaves.Cloud
@CheckForNull public DockerSlaveTemplate getTemplate(String template)
@CheckForNull public DockerSlaveTemplate getTemplateById(String id)
@CheckForNull public DockerSlaveTemplate getTemplate(hudson.model.Label label)
DockerSlaveTemplate
that has the matching Label
.public void addTemplate(DockerSlaveTemplate t)
public List<DockerSlaveTemplate> getTemplates()
@Nonnull public List<DockerSlaveTemplate> getTemplates(hudson.model.Label label)
public void setTemplates(List<DockerSlaveTemplate> replaceTemplates)
public void removeTemplate(DockerSlaveTemplate t)
protected void decrementAmiSlaveProvision(DockerSlaveTemplate container)
Copyright © 2016–2020. All rights reserved.