Class ComputeResources.Builder
java.lang.Object
com.netflix.genie.common.internal.dtos.ComputeResources.Builder
- Enclosing class:
- ComputeResources
Builder for generating immutable
ComputeResources
instances.- Since:
- 4.3.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create a new immutableComputeResources
instance based on the current state of this builder instance.Set the number of CPUs.withDiskMb
(Long diskMb) Set amount of disk space in MB.Set the number of GPUs.withMemoryMb
(Long memoryMb) Set amount of memory in MB.withNetworkMbps
(Long networkMbps) Set amount of network bandwidth in Mbps.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
withCpu
Set the number of CPUs.- Parameters:
cpu
- The number must be at least 1 or null- Returns:
- The
ComputeResources.Builder
-
withGpu
Set the number of GPUs.- Parameters:
gpu
- The number must be at least 1 or null- Returns:
- The
ComputeResources.Builder
-
withMemoryMb
Set amount of memory in MB.- Parameters:
memoryMb
- The number must be at least 1 or null- Returns:
- The
ComputeResources.Builder
-
withDiskMb
Set amount of disk space in MB.- Parameters:
diskMb
- The number must be at least 1 or null- Returns:
- The
ComputeResources.Builder
-
withNetworkMbps
Set amount of network bandwidth in Mbps.- Parameters:
networkMbps
- The number must be at least 1 or null- Returns:
- The
ComputeResources.Builder
-
build
Create a new immutableComputeResources
instance based on the current state of this builder instance.- Returns:
- A
ComputeResources
instance
-