Class ProvisionedWorkerPoolProperties.Builder
java.lang.Object
co.yellowdog.platform.model.builders.ValidatedBuilder<ProvisionedWorkerPoolProperties>
co.yellowdog.platform.model.ProvisionedWorkerPoolProperties.Builder
- Enclosing class:
ProvisionedWorkerPoolProperties
public static class ProvisionedWorkerPoolProperties.Builder
extends ValidatedBuilder<ProvisionedWorkerPoolProperties>
A builder that can be used to build a new ProvisionedWorkerPoolProperties that is automatically validated on build.
-
Method Summary
Modifier and TypeMethodDescriptionBuilds the object without enforcing validation constraints.createNodeWorkers
(NodeWorkerTarget createNodeWorkers) How many workers to create on each node.idleNodeShutdown
(AutoShutdown idleNodeShutdown) Determines the auto shutdown behaviour applied for idle nodes.idleNodeShutdownTimeout
(Duration timeout) idlePoolShutdown
(AutoShutdown idlePoolShutdown) Determines the auto shutdown behaviour applied for an idle pool.idlePoolShutdownTimeout
(Duration timeout) The maximum number of nodes that the worker pool can be scaled up to.metricsEnabled
(Boolean metricsEnabled) The minimum number of nodes that the worker pool can be scaled down to.nodeBootTimeout
(Duration nodeBootTimeout) The time given for a node to be registered before it is considered to have failed.nodeConfiguration
(WorkerPoolNodeConfiguration nodeConfiguration) toString()
workersPerNode
(int targetCount) workersPerVcpu
(double targetCount) An optional tag value that will be attached to all workers in this pool and used to constrain worker allocation.Methods inherited from class co.yellowdog.platform.model.builders.ValidatedBuilder
build, validate
-
Method Details
-
workersPerNode
-
workersPerVcpu
-
idleNodeShutdownTimeout
-
idlePoolShutdownTimeout
-
createNodeWorkers
public ProvisionedWorkerPoolProperties.Builder createNodeWorkers(NodeWorkerTarget createNodeWorkers) How many workers to create on each node.- Parameters:
createNodeWorkers
- how many workers to create on each node- Returns:
this
.
-
minNodes
The minimum number of nodes that the worker pool can be scaled down to.- Parameters:
minNodes
- the minimum number of nodes- Returns:
this
.
-
maxNodes
The maximum number of nodes that the worker pool can be scaled up to.- Parameters:
maxNodes
- the maximum number of nodes- Returns:
this
.
-
nodeBootTimeout
The time given for a node to be registered before it is considered to have failed.- Parameters:
nodeBootTimeout
- the time given for a node to be registered before it is considered to have failed- Returns:
this
.
-
idleNodeShutdown
Determines the auto shutdown behaviour applied for idle nodes.- Parameters:
idleNodeShutdown
- the auto shutdown behaviour applied for idle nodes- Returns:
this
.
-
idlePoolShutdown
Determines the auto shutdown behaviour applied for an idle pool.- Parameters:
idlePoolShutdown
- the auto shutdown behaviour applied for an idle pool- Returns:
this
.
-
workerTag
An optional tag value that will be attached to all workers in this pool and used to constrain worker allocation.- Parameters:
workerTag
- an optional tag value- Returns:
this
.
-
nodeConfiguration
public ProvisionedWorkerPoolProperties.Builder nodeConfiguration(WorkerPoolNodeConfiguration nodeConfiguration) - Returns:
this
.
-
metricsEnabled
- Returns:
this
.
-
buildUnchecked
Description copied from class:ValidatedBuilder
Builds the object without enforcing validation constraints. This should only be used for testing purposes- Overrides:
buildUnchecked
in classValidatedBuilder<ProvisionedWorkerPoolProperties>
- Returns:
- the object being built
-
toString
-