Class PlannedNodeBuilder
- java.lang.Object
-
- org.csanchez.jenkins.plugins.kubernetes.PlannedNodeBuilder
-
- Direct Known Subclasses:
StandardPlannedNodeBuilder
public abstract class PlannedNodeBuilder extends Object
A builder ofNodeProvisioner.PlannedNode
implementations for Kubernetes. Can be subclassed to provide alternative implementations ofNodeProvisioner.PlannedNode
.
-
-
Constructor Summary
Constructors Constructor Description PlannedNodeBuilder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract NodeProvisioner.PlannedNode
build()
Builds theNodeProvisioner.PlannedNode
instance based on the given inputs.PlannedNodeBuilder
cloud(KubernetesCloud cloud)
KubernetesCloud
getCloud()
Returns theKubernetesCloud
.Label
getLabel()
int
getNumExecutors()
PodTemplate
getTemplate()
Returns thePodTemplate
.PlannedNodeBuilder
label(Label label)
PlannedNodeBuilder
numExecutors(int numExecutors)
PlannedNodeBuilder
template(PodTemplate template)
-
-
-
Method Detail
-
getCloud
public KubernetesCloud getCloud()
Returns theKubernetesCloud
.- Returns:
- the
KubernetesCloud
.
-
getTemplate
public PodTemplate getTemplate()
Returns thePodTemplate
.- Returns:
-
getLabel
public Label getLabel()
-
getNumExecutors
public int getNumExecutors()
-
cloud
public PlannedNodeBuilder cloud(KubernetesCloud cloud)
- Parameters:
cloud
- theKubernetesCloud
instance to use.- Returns:
- the current builder.
-
template
public PlannedNodeBuilder template(PodTemplate template)
- Parameters:
template
- thePodTemplate
instance to use.- Returns:
- the current builder.
-
label
public PlannedNodeBuilder label(Label label)
- Parameters:
label
- theLabel
to use.- Returns:
- the current builder.
-
numExecutors
public PlannedNodeBuilder numExecutors(int numExecutors)
- Parameters:
numExecutors
- the number of executors.- Returns:
- the current builder.
-
build
public abstract NodeProvisioner.PlannedNode build()
Builds theNodeProvisioner.PlannedNode
instance based on the given inputs.- Returns:
- a
NodeProvisioner.PlannedNode
configured from this builder.
-
-